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
myrison
Beginner


Joined: 10 Nov 2006
Posts: 22

PostPosted: Fri Nov 10, 2006 5:21 pm   

Using Room Scripts and %roomcom
 
Hi all. I use a room script to store variables with the names of the herbs that can be found in that room. These change regularly, and I want to completely remove the room script upon a certain output from the MUD.

Example:

Trigger on: Your search reveals nothing special.

To remove the roomscript entirely from the room, I have tried this:

%roomcom( , "")

However, it does not clear the room script, it outputs the current script, so I suspect I need help with what the trigger action should be.

Thanks in advance! Question
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Nov 10, 2006 11:12 pm   
 
You need to use a #CALL command in front of that in order to cover the return value.

#CALL %roomcom(,"")
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
myrison
Beginner


Joined: 10 Nov 2006
Posts: 22

PostPosted: Sat Nov 11, 2006 2:46 am   
 
Thanks so much for the quick reply. This code does the trick.

Also, for anyone else who runs across this problem, I also found through trial and error that the map must be in "map" mode for the changes to take effect when the trigger is called.

It executes fine with the following code:

Code:
#NOOP %maplocked( 0)
#CALL %roomcom(,"")
#NOOP %maplocked( 1)


Thanks again.
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