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: 246
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: 1 Guest(s)