[MudWalker] triggers? (The second phase)
Kevin Reid
kpreid
Sun Jul 24 04:34:21 PDT 2005
On Jul 17, 2005, at 14:10, aaron wallace wrote:
>> Write the trigger as:
>>
>> Match:
>> ^\S+ attacks (.*)$
>>
>> Script:
>> use strike to injure at $$arg[1]
>
> This trigger works like a charm but there is a way It could be made
> better. the xxx attack yyy is how combat starts and battle over is how
> it ends. so since I use other triggers to capture fails and successes
> and refire the skill I wanted to know if I could make this trigger
> only work the first time it matches until a battle over message
> happens then reset it gain so the
> trigger will work again.
>
> so I want a counter on the trigger that gets reset at every battle
> over and stops the trigger from working after the first use.
'attacks':
@@if not alreadyStruck then
use strike to injure at $$arg[1]
@@alreadyStruck = true
@@end
'battle over':
@@alreadyStruck = false
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the MudWalker
mailing list