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


Joined: 08 Apr 2004
Posts: 103
Location: USA

PostPosted: Sun Jan 20, 2008 11:49 pm   

#cond question
 
Trying to make a backup cure system on Aetolia.

You are:
deaf.
confused.


I want to heal the confused.. This is what I have


Pattern: You are
Value: #COND {deaf} {#echo I am firing} {Within|Param=5}

It is not shooting and I have no idea why.. Any ideas?
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Mon Jan 21, 2008 12:54 am   
 
Because you aren't triggering off the confused? Besides that isn't how conditional triggers work :)
#COND is used to create a substate to the most recently issued #TRIGGER command. Here is what you're looking for:

Code:
#TR {You are~:} {#STATE 1}
#COND {confused.} {#ECHO Healing Confusion;cast 'cure confusion';#STATE 0}


Obviously change the spell to be whatever you do to cure your confusion. I'm not sure if they are required anymore, but I always use explicit state changes in my conditional triggers for safety :)
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Dyron
Apprentice


Joined: 08 Apr 2004
Posts: 103
Location: USA

PostPosted: Mon Jan 21, 2008 4:39 am   
 
Hrmm.. you'll have to break that down even more for me.. I don't get what your telling me to do at all.
I change it like you say and it just stays in state 1 and still ignores state 1.
Reply with quote
Dyron
Apprentice


Joined: 08 Apr 2004
Posts: 103
Location: USA

PostPosted: Mon Jan 21, 2008 4:53 am   
 
Got it... the cond was messing it up.. Looks like it's useless for a state trigger....
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Jan 21, 2008 6:59 am   
 
@Ralgith: You don't need to use #state 1 explicitly - the trigger moves itself through the states on its own, so you can just remove that command and leave the script blank.

This isn't really a problem suited to multistate triggers because the lines are optional and there're many of them. Were it me, I'd put them all into a class and have something like this:

#oninput {^diag} {}
#cond {You are:} {#t+ DiagAffs} {within|param=4}
#cond {prompt pattern here} {#t- DiagAffs} {within|param=20}

Where diagaffs is a class with the Disable on Startup option that contains all the triggers for all the possible affliction lines
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Mon Jan 21, 2008 8:34 pm   
 
Yea Fang, like I said, I didn't think it was required anymore... but I've always used it for explicit safety :)

As for your points on what will work better, you're right of course. I should have explained it as well, but I only corrected his #COND usage ;)
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
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