The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
@RegionLeave Example for Bugtracker Request
Author Message
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #1
@RegionLeave Example for Bugtracker Request
Now this is more a tutorial/display for something I saw in BugTracker for a new trigger implementation. Basically, the user wanted control over regions and stopping players from leaving while on a quest.

What is shown below is one way of doing this. You can also check for character <src.p> as well and stop someone from leaving. I have XuN test this code using a <src.p> check.

During the tests we concluded that the player couldn't leave the area by gate, recall, walking, teleporting, or any custom items (telepads), etc.

What does this mean? Simple. Regions are checked before anything happens with a character moving from one. Same with entering one. So really the @WorldTeleport control is not needed.

Example code block:
Code:
[events e_region_block]
on=@RegionLeave
if <argo.defname> == r_painted_caves
if !(<src.tag0.quest.0001.complete>)
  src.msg You cannot leave this place until your quest is done.
  return 1
endif
endif
(This post was last modified: 03-29-2016 06:35 PM by Khaos.)
12-06-2013 08:02 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Khaos's post
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #2
RE: @RegionLeave Example for Bugtracker Request
Holy crap, that's a useful little concept. So many event and quest ideas Smile

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
12-06-2013 08:44 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #3
RE: @RegionLeave Example for Bugtracker Request
No need of ON= before @RegionLeave ?
Cool Big Grin

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
12-06-2013 09:12 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #4
RE: @RegionLeave Example for Bugtracker Request
Sorry guys. Forgot to add in <ARGO.DEFNAME> Updated now.
12-06-2013 09:23 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #5
RE: @RegionLeave Example for Bugtracker Request
Fixed the on= extreme. Didn't even think about it since it was supposed to be an example.
12-06-2013 12:15 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)