Dual triggers

Posted by Marvi218 on Tue 17 Feb 2004 02:18 AM — 3 posts, 12,832 views.

#0
I'm a new user to MUSHclient and might i say, I'm very impressed and I'm probably going to stick with it! I was wondering, though, if there was any way to set up a trigger reaction to two triggers. Let me provide an example

Trigger: You begin to tense your muscles, preparing to doublejab.

Reaction: jab @tar

The thing is before i can jab my target, I need to regain my equilibrium first ("You regain your equilibrium") I can't put "jab @tar" as a reaction to 'You regain your equilibrium' because there are other ways to lost equilibrium and I tried to do a delay of 1 or 2 seconds but it's either too early or too late, it's inconsistant. So what I'm asking is: Is there a way for my command to be sent when it sees one trig line, then the next trig line?
Russia #1
The most obvious solution would be to have 2 triggers:

trigger1 for when you start to tense your muscles

trigger2 for when you regain equilibrium(sends jab @tar)

You could keep both triggers disabled by default and when
you want to prepare for a jab, send the corresponding command and immediately enable trigger1. When trigger1 matches it should disable itself and enable trigger2. When trigger2 matches it should send jab @tar and disable itself.

To enable a trigger use: world.EnableTrigger "trigger_name", 1

To disable it: world.EnableTrigger "trigger_name", 0
Australia Forum Administrator #2
Yes, I agree with Ked.

Have two triggers, A and B.

A is always enabled, B is usually disabled.

When A fires it enables B.

(ie. world.EnableTrigger "B", 1)

Then when B fires it does its stuff and disables itself.

eg.

world.Send "jab @tar"
world.EnableTrigger "B", 0

This is done by "send to script" in the trigger(s).