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
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






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
Post Reply 


Messages In This Thread
@RegionLeave Example for Bugtracker Request - Khaos - 12-06-2013 08:02 AM

Forum Jump:


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