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
nostra
Wanderer


Joined: 23 May 2001
Posts: 68
Location: Sweden

PostPosted: 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 :>
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: 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
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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
Reply with quote
nostra
Wanderer


Joined: 23 May 2001
Posts: 68
Location: Sweden

PostPosted: 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...
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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
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