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
talonnb
Apprentice


Joined: 30 Oct 2004
Posts: 127

PostPosted: Tue Nov 27, 2007 4:03 am   

#sub not working correctly
 
You eat a goldenseal root.
You are no longer dizzy.

That's the line I want to trigger, sub and use.

I trigger You eat a goldenseal root.$You are no longer dizzy.

This does reseting of variables, then I put #SUB "GOLDENSEAL - DIZZINESS CURED"

Now, I expected it to get rid of the two lines and replace it with my new shiny one to cut down on spam, but this did not happen. One, it replaced only the You are no longer dizzy. Two it doesn't do a newline after that and runs together with the prompt.

What am I missing or need to add?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Tue Nov 27, 2007 4:25 am   
 
You could just do this:

Code:
#TRIGGER {You eat a goldenseal root.} {#gag}
#COND {You are no longer dizzy.} {#SUB {GOLDENSEAL - DIZZINESS CURED}} {Within|param=1}


Hope that helps. Based on the information you gave, that's probably the best way to handle it.

Charneus
Reply with quote
talonnb
Apprentice


Joined: 30 Oct 2004
Posts: 127

PostPosted: Tue Nov 27, 2007 4:28 am   
 
Yeah, thing is, there are lines like:

You focus your mind intently on curing your mental maladies.
You are no longer dizzy.

Soo, that wouldn't work. I want to make a similar trigger to do #SUB "FOCUS - DIZZINESS"
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Tue Nov 27, 2007 4:59 am   
 
You can make a trigger for that, too.

Code:
#TRIGGER {You focus your mind intently on curing your mental maladies.} {#gag}
#COND {You are no longer dizzy.} {#SUB {FOCUS - DIZZINESS}} {Within|Param=1}


Just change the #TRIGGER part to whatever you need it to be. Format is still the same.

Charneus
Reply with quote
talonnb
Apprentice


Joined: 30 Oct 2004
Posts: 127

PostPosted: Tue Nov 27, 2007 5:24 am   
 
That'll work, thanks.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Tue Nov 27, 2007 6:11 am   
 
Quite welcome. Remember, CONDITIONs never fire until the first line is met. :)

Charneus
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