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
Is there easy way to know if player is in a city?
Author Message
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Is there easy way to know if player is in a city?
Try this way open sphere_map0 and search for region blocks that starts with "a_town*", for each of these region add a tag like this:
Code:
[AREADEF a_townOcclo]
NAME=Ocllo
GROUP=Ocllo
P=3650,2519,0,0
RECT=3588,2460,3707,2685,0
RECT=3695,2558,3760,2705,0
FLAGS=region_flag_nobuilding|region_flag_guarded
EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass
TAG.MUSIC=midi_ocllo
tag.city = 1

Then inside the @start (maybe better @prestart?) trigger of the hiding skill add this check
Code:
if <region.tag.city>  && <hiding> < 900
    sysmessage You can't hide here.


Same for wilderness region
08-01-2018 05:30 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Is there easy way to know if player is in a city? - darksun84 - 08-01-2018 05:30 PM

Forum Jump:


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