Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
ccogdill
Beginner


Joined: 16 Jul 2002
Posts: 27

PostPosted: Sat Feb 15, 2003 11:15 am   

flee trigger
 
On the mud I play when you flee it sends:
You flee west from combat!

I have a trigger set up like so:
#TRIGGER {^You flee (%w) from combat!} {#ECHO room link : %roomlink( ,%left( "%1", 1)));#TELEPORT %roomnum( %roomlink( ,%left( "%1", 1)))}

The roomlink function is working properly, giving me the correct ID, but how do you convert this ID to a vNum so the teleport command will work?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Feb 15, 2003 11:49 am   
 
Change your room mode to use ID's instead of vNum's and then use the %roomnum function:
#TRIGGER {^You flee (%w) from combat!} {#ECHO room link : %roomlink( ,%left( "%1", 1)));#NOOP %roommode(1);#TELEPORT %roomnum( %roomlink( ,%left( "%1", 1)));#NOOP %roommode(0)}

Kjata
Reply with quote
doomfyre
Apprentice


Joined: 03 Jan 2002
Posts: 152
Location: USA

PostPosted: Sat Feb 15, 2003 5:55 pm   
 
Just out of curiosity, wouldn't this be just as good? I don't imagine it takes alot more time to process your version or anything, just wondering.

#TR {^You flee (%w) from combat!} {#MOVE %1)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net