 |
drazzen Beginner
Joined: 13 Dec 2002 Posts: 12
|
Posted: Fri Dec 13, 2002 5:54 pm
Need help with a trigger |
I am using zMUD 5.55 and am trying to determine why my auto vial drinker will not work. Here is how the prompt looks:
H:1116 M:2200
This is what I have in the trigger:
Pattern : H:(%d) M:(%d)
Commands:
#if (%1 < 2000 AND @dh=1) {dh=0 drink health}
#if (%2 < 2000 AND @dh=1) {dh=0 drink mana}
Alias for this is:
Name: dh
Command: #if (@dh=0) {} {drink health dh=0}
and
Name: dm
Command: #if (@dh=1) {drink mana}
Can anyone tell me why this keeps looping and what I am doing wrong here.
All I need is for it to drink a vial when my health is below 2100 and between each drink wait for the message :
You may drink another health or mana elixir.
I also need it set so that healing my health takes priority over my mana.
If anyone can help with this it would be great. Thanks. |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Dec 13, 2002 6:44 pm |
You can prioritize by nesting the #IFs. You seem to have left out the command separator in the action portion of your #IF commands. You also need another trigger to set the variable back to 1 when you receive the "you can drink" message.
Triggers
Pattern: H:(%d) M:(%d)
Commands: #IF ((%1 < 2000) AND (@dh = 1)) {dh = 0;drink health} {#IF ((%2 < 2000) AND (@dh = 1)) {dh = 0;drink mana}}
Options: Newline=OFF, Prompt=ON
Pattern: You can drink another health or mana elixir
Commands: dh = 1
Aliases
Name: dh
Commands: #IF (@dh = 1) {dh = 0;drink health}
Name: dm
Commands: #IF (@dh = 1) {dh = 0;drink mana}
LightBulb
Senior Member |
|
|
 |
drazzen Beginner
Joined: 13 Dec 2002 Posts: 12
|
Posted: Fri Dec 13, 2002 8:50 pm |
Its still crashing when I use what you have shown me.
I can't figure this out. |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Dec 13, 2002 9:00 pm |
Ah, it's because you use the varname = value method instead of #VAR varname value, and you gave your variable the same name as an alias. Therefore, whenever you try to change the value of @dh, you call the alias instead.
Triggers
Pattern: H:(%d) M:(%d)
Commands: #IF ((%1 < 2000) AND (@dh = 1)) {#VAR dh 0;drink health} {#IF ((%2 < 2000) AND (@dh = 1)) {#VAR dh 0;drink mana}}
Options: Newline=OFF, Prompt=ON
Pattern: You can drink another health or mana elixir
Commands: #VAR dh 1
Aliases
Name: dh
Commands: #IF (@dh = 1) {#VAR dh 0;drink health}
Name: dm
Commands: #IF (@dh = 1) {#VAR dh 0;drink mana}
LightBulb
Senior Member |
|
|
 |
drazzen Beginner
Joined: 13 Dec 2002 Posts: 12
|
Posted: Fri Dec 13, 2002 9:30 pm |
I set everything like you said and still not working. I wonder if something else is causeing the problem.
|
|
|
 |
drazzen Beginner
Joined: 13 Dec 2002 Posts: 12
|
Posted: Fri Dec 13, 2002 9:59 pm |
Ok its working...I loaded the default settings to clear all triggers and just did this. Seems there is something else in my other set screwing things up.
Thanks again. |
|
|
 |
|
|