|
nostra Wanderer
Joined: 23 May 2001 Posts: 68 Location: Sweden
|
Posted: Mon May 12, 2003 11:37 pm
Trigger to "kick in" depending on next line's valu |
When I cast a spell I get one or both of following two lines:
"You have completed your casting."
"You lose your concentration."
I want to use a conditional trigger so that if:
1. I complete the casting without loosing concentration (2nd line) I want to remove the spellbook and wield a weapon.
2. If I complete the casting and loose concentration I want to cast the same spell again (history, using the command !!).
Problem is I cannot figure out how to tell zmud to check the 2nd line (if I lost concentration or not) and then execute one of the two values (wield weapon or cast again).
Any help much appreciated :> |
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Tue May 13, 2003 3:31 am |
I wish I could give you the whole details, but this needs a multi-state trigger that uses an #IF function to check to see what the next line is. Something like this
#TR {You have completed your casting.}
#COND {(*)} {#IF ("%1" <> "You lose your concentration.") {castagain} {removespeelbook, wieldweapon}} {Within|Param=1}
Something like that anyways |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue May 13, 2003 4:27 am |
I think this will work. !! is a zMUD command. If that's not what you want, you'll need to use ~!! to send it to the MUD.
#TR Recast {You have completed your casting} {}
#COND {You lose your concentration} {#STATE Recast 0;!!} {Looplines|Param=1}
#COND {} {remove spellbook;wield @weapon} {Within|Param=1}
LightBulb
Advanced Member |
|
|
|
nostra Wanderer
Joined: 23 May 2001 Posts: 68 Location: Sweden
|
Posted: Tue May 13, 2003 6:32 pm |
Probably a very stupid question, but you write:
#TR Recast {You have completed your casting} {}
Could you please explain what the "Recast" is? It doesn't show up on the trigger... |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue May 13, 2003 10:24 pm |
It's the trigger's ID. I used it to be certain of which trigger the #STATE command would reset.
LightBulb
Advanced Member |
|
|
|
|
|