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
region name
Author Message
Van Glan Bloom
Journeyman
*

Posts: 104
Likes Given: 2
Likes Received: 3 in 3 posts
Joined: Jun 2013
Reputation: 0



Post: #1
region name
Hello guys.

I was trying to upgrade one of my scripts, in this case taming, but for some reason it is not working properly.
My intention is for a message to appear in the world, indicating in which area of the world the animal appeared.

Code:
on=@create
serv.b @0123 Attention : a <name> has just appeared in <serv.region.name>

In the game does not appear the message with the indications of the place
06-13-2017 09:43 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #2
RE: region name
<serv.region> it's not a valid command from the server object.

Anyway, the main problem is that in the @create trigger the NPC it's still not placed in the world.
So you have to use a timerf along with a function.
Example:
Code:
[FUNCTION broadcastNpcRegion]
serv.b @0123 Attention : a <name> has just appeared in <region.name>

[CHARDEF c_test_npc]
Name = Test
id = c_man
CAN=MT_WALK|MT_USEHANDS|MT_EQUIP

ON=@Create
npc = brain_human
str = 100
maxhits = 9999
dex = 0
int = 0
mana = 0
timerf 1,broadcastNpcRegion

It works for me also take note that if you write directly the serv.b in the timerf command you will still get a wrong result from <region.name>
06-13-2017 12:04 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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