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
seamer
Magician


Joined: 26 Feb 2001
Posts: 358
Location: Australia

PostPosted: Sat Apr 10, 2004 7:26 am   

Executing room scripts
 
Currently I've got triggers that set off a #find after I use a travel spell (to reposition myself on the map), and from that I move in a direction and back to trigger a room script for the room. Is there a cleaner way to do this?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Apr 10, 2004 12:31 pm   
 
You can use %roomcom to get the script for the room and then execute it. However, you would have to manually delete any settings created by the script.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Apr 10, 2004 4:18 pm   
 
Use #TELEPORT.
Reply with quote
seamer
Magician


Joined: 26 Feb 2001
Posts: 358
Location: Australia

PostPosted: Sun Apr 11, 2004 12:18 am   
 
I forgot about #teleport, it'll work in specific cases when I use mud portals/travelling mobs to bump around. %roomcom takes a place with using #find though. Ended up making an alias to #find and set a 3 second alarm to execute any room scripts, calling the alias with the various generic travel triggers I use. (cant hurt to share reasonings, someone may benefit)

Thanks Kjata, Vijilante
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Apr 11, 2004 12:28 pm   
 
What Vijilante was talking about, which I forgot about, is that you can #TELEPORT to the same room you are already in and the room script is executed.

So, #TELEPORT %roomkey() should do what you want if %roomode() is 1, #TELEPORT %roomnum() if %roommode() is 0, and #TELEPORT %if(%roommode(), %roomkey(), %roomnum()) should work regardless of mode.
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