|
croman Newbie
Joined: 17 May 2002 Posts: 7
|
Posted: Wed Jun 19, 2002 1:01 am
Help with a trigger please |
I have setup a alias called Healon that when used will create a action (used to heal myself faster)
I have another alias called Healoff that I use to remove the first action.
However, I would like to have this done automatically when my HPs are full. How can I go about doing this?
my prompt looks like
[3523/3523 HP]
Any help is appreciated.. thanks (need help setting up any variable and triggers I would need)
Thanks |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Wed Jun 19, 2002 1:14 am |
#TRIGGER {~[(%d)~/(%d) HP~]} {#IF (%1 < %2) {healon} {healoff}} {nocr|prompt|notrig}
Try that.
Special characters need to have a ~ in front of them.
View->Preferences->Special Characters has the list.
Trigger pattern %d is used to capture a number.
Brackets are used to capture stuff so you can refer to them.
ie (%d) is %1 and the second bracketed thing (%d) is %2
Prompted things should have trigger options:
[ ] Newline
[X] Prompt
[ ] Trigger on Trigger
Ton Diening
Providing untested answers that tend to be
more complicated than others. |
|
|
|
croman Newbie
Joined: 17 May 2002 Posts: 7
|
Posted: Wed Jun 19, 2002 2:17 am |
Thanks, I will try some of that out!
Btw, I do not understand everything from {healon} {healoff} to the end.. however I do not think that I need that much.. it was just the prompt variable part that I needed help with
Thanks! |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Jun 19, 2002 12:24 pm |
Yes, you do need it. {nocr|prompt|notrig} are trigger options that let you specify special behavior for that trigger. Each option is separated by a pipe (|) and each has its use. The nocr tells zMUD to not check to see if this trigger matches at the end of a line (when zMUD receives a newline character). The prompt options tells zMUD to check this trigger for matches when it receives a buffer of text (basically, a prompt). Finally, the notrig options tells zMUD to not check any trigger for matches agaisnt any output that this trigger produces. You need specially the prompt option because otherwise, zMUD will wait for a newline to come before checking your trigger for matches and you'll end up having the trigger fire not when the prompt is displayed, but when you enter a command or some other output is sent from the MUD after the prompt.
Kjata |
|
|
|
|
|