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


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Sat Nov 23, 2002 11:02 am   

How to "capture" a trigger
 
Hi Everyone =)

I had a question, I want to "capture" triggers that can't go off.
Like most of us, I have a set of triggers for auto-spell casting in the mud i play.


Now, when fighting, i can't cast the trig.

the message is:
Impossible! You can't concentrate enough!

when a mob dies, i either got 1 exp for a mob or more, but theres one of two messages:

You gain one measly exp for this fight.
You gain XXX experience points for killing this opponent.

I want to figure out how to capture failed spells, and recast them after my autoloot.

example of midfight text:
in my mud you can xemote, so i xemote midfight to set my own trigger off:


| 1131H 356M 351V awful > xemote feels less protected.
You feel less protected.
cast 'armor' majere

| 1131H 356M 351V awful > Impossible! You can't concentrate enough!

| 1131H 356M 351V awful >
You pierce Inspector Very Long extremely hard in his


I really don't know the commands to begin such a task, or if it is possible with version 6.16.

THank you ZMUD users,
Majere
Reply with quote
Castaway
GURU


Joined: 10 Oct 2000
Posts: 793
Location: Swindon, England

PostPosted: Sat Nov 23, 2002 1:11 pm   
 
Hmm, theres more than one way to kill a cat, Id do it like this:

Make a new Trigger, which captures "Impossible! You can't concentrate enough!" and sets a variable like Fighting=1

In the triggers that try to re-cast your spells, check this variable, and if its set to 1, then dont cast the spell, just add the spell to a list for later use.

Make another new trigger, which triggers on: "You gain one measly exp for this fight.|You gain * experience points for killing this opponent.", and in the commands, do a loop through all the previously saved spells you couldnt cast, and cast them, and reset Fighting=0.

Lady C.
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Sat Nov 23, 2002 1:21 pm   
 
I'm sorry Lady C, i'm still not understanding right..


I understand that if i get the Impossible! message to set a var as fighting = 1 for the spell, but only manually.

I don't understand how to automatically add the spell to the loop, or how to set the var for the previous spell attempt cast automatically either.
Reply with quote
Castaway
GURU


Joined: 10 Oct 2000
Posts: 793
Location: Swindon, England

PostPosted: Sun Nov 24, 2002 12:23 am   
 
How did you set up auto-casting then? ;)

#TRIGGER {Impossible! You can't concentrate enough!} {#VAR Fighting 1}

#TRIGGER {You feel less protected.} {#IF(@Fighting) {#ADDITEM CastAfter "cast 'armor' majere"} {cast 'armor' majere}}

#TRIGGER {You gain one measly exp for this fight.|You gain %d experience points for killing this opponent.} {#FORALL @CastAfter {%i}; #VAR Fighting 0}

Something like that..
(untested)

Lady C.
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Sun Nov 24, 2002 12:54 am   
 
Thank you so much Lady C :)

I understood the part about setting the var, I didnt understand the part about additem.

hehe, now i have to go back and edit all my spell trigs for the if fightign thing *grimace* :)

Thanks again, i'll repost if i have more troubles.

Majere
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