Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Lua
➜ waiting for equilibrium Need HELP!!
waiting for equilibrium Need HELP!!
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Andromache
(7 posts) Bio
|
Date
| Sun 25 Sep 2011 04:59 PM (UTC) |
Message
| GIRDLING Protective Girdling. Diamond/Crescent/Circle/Star/Pentacle
I need to be able to do this
Send ("sketch diamond")
wait for equilbrium
Send ("sketch crescent")
wait for equilibrium
Send ("sketch circle")
wait for equilbrium
Send ("sketch star")
wait for equilbrium
Send ("sketch pentacle")
wait for equilibrium
Send ("dance girdling enemies")
the text for getting equilbrium back is
You have equilibrium.
I also have variables to track my EQ if you think I should use that instead
If I don't have EQ I can't sketch them so I might need to have it resend if it fails
each ritual has a different amount of shapes and so when I type an alias for a particular ritual I need to tell it to sketch each shape on EQ then when all the shapes needed are sketched to dance the ritual | Top |
|
Posted by
| Daniel P
USA (97 posts) Bio
|
Date
| Reply #1 on Sun 25 Sep 2011 06:04 PM (UTC) Amended on Sun 25 Sep 2011 06:06 PM (UTC) by Daniel P
|
Message
| I've come up with a very effective (but a little bloated) solution to this sort of thing which I've used in multiple places. It is to create a single trigger for every step, plus an alias to initialize. Note that all triggers are not enabled at the start.
In your case:
<aliases>
<alias
enabled="y"
match="girdling"
sequence="100"
send_to="12"
>
<send>
EnableTrigger("girdling2",true)
Send("sketch diamond")
</send>
</alias>
</aliases>
<triggers>
<trigger
match="You have equilibrium."
name="girdling2"
send_to="12"
sequence="100"
keep_evaluating="y"
>
<send>
EnableTrigger("girdling3",true)
Send("sketch crescent")
EnableTrigger("girdling2",false)
</send>
</trigger>
<trigger
match="You have equilibrium."
name="girdling3"
send_to="12"
sequence="100"
keep_evaluating="y"
>
<send>
EnableTrigger("girdling4",true)
Send("sketch circle")
EnableTrigger("girdling3",false)
</send>
</trigger>
<trigger
match="You have equilibrium."
name="girdling4"
send_to="12"
sequence="100"
keep_evaluating="y"
>
<send>
EnableTrigger("girdling5",true)
Send("sketch star")
EnableTrigger("girdling4",false)
</send>
</trigger>
<trigger
match="You have equilibrium."
name="girdling5"
send_to="12"
sequence="100"
keep_evaluating="y"
>
<send>
EnableTrigger("girdling6",true)
Send("sketch pentacle")
EnableTrigger("girdling5",false)
</send>
</trigger>
<trigger
match="You have equilibrium."
name="girdling6"
send_to="12"
sequence="100"
keep_evaluating="y"
>
<send>
Send("dance girdling enemies")
EnableTrigger("girdling6",false)
</send>
</trigger>
</triggers>
See how that works. | Top |
|
Posted by
| Nick Gammon
Australia (23,057 posts) Bio
Forum Administrator |
Date
| Reply #2 on Mon 26 Sep 2011 06:54 AM (UTC) Amended on Mon 26 Sep 2011 06:59 AM (UTC) by Nick Gammon
|
Message
|
Andromache said:
I need to be able to do this
Send ("sketch diamond")
wait for equilbrium
Send ("sketch crescent")
wait for equilibrium
Send ("sketch circle")
wait for equilbrium
Send ("sketch star")
wait for equilbrium
Send ("sketch pentacle")
wait for equilibrium
Send ("dance girdling enemies")
See this page:
http://www.gammon.com.au/forum/?id=4957
You could do something like:
<aliases>
<alias
match="girdling"
enabled="y"
send_to="12"
sequence="100"
>
<send>
require "wait"
wait.make (function () --- coroutine below here
local TIMEOUT = 5 -- give up after 5 seconds
Send ("sketch diamond")
wait.match ("You have equilibrium.", TIMEOUT)
Send ("sketch crescent")
wait.match ("You have equilibrium.", TIMEOUT)
Send ("sketch circle")
wait.match ("You have equilibrium.", TIMEOUT)
Send ("sketch star")
wait.match ("You have equilibrium.", TIMEOUT)
Send ("sketch pentacle")
wait.match ("You have equilibrium.", TIMEOUT)
Send ("dance girdling enemies")
wait.match ("You have equilibrium.", TIMEOUT)
Note "Girdling complete!"
end) -- end of coroutine
</send>
</alias>
</aliases>
|
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.
|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
13,370 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top