|
seamer Magician
Joined: 26 Feb 2001 Posts: 358 Location: Australia
|
Posted: 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?
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Apr 10, 2004 4:18 pm |
Use #TELEPORT.
|
|
|
|
seamer Magician
Joined: 26 Feb 2001 Posts: 358 Location: Australia
|
Posted: 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 |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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. |
|
|
|
|
|