|
questron Newbie
Joined: 05 Mar 2003 Posts: 2 Location: United Kingdom
|
Posted: Wed Mar 05, 2003 11:40 am
relfex healing |
this is my first request I have a trigger to automatically sip health or mana when a threshold is hit. At the moment it works well BUT it sips twice (the second does not effect)
Here are the elements of the set
Variable Name: healbalance
Value: 1
Trigger pattern: You may drink another health or mana elixir.
Value : Healbalance=1
Trigger Pattern : %1h, %2m (*)-
Value:
#if @healbalance=1 {#if %1<1400 {
sip health
healbalance=0
}}
#if @healbalance=1 {#if %2<300 {
sip health
healbalance=0
}}
Any reasons for the dupoble sip i would be gratefull.
Regards
Questron
(this is used in achaea) |
|
|
|
icemanvko Beginner
Joined: 05 Mar 2003 Posts: 19 Location: USA
|
Posted: Wed Mar 05, 2003 3:45 pm |
I'm by no means a Zmud Scripting expert, but it looks like you might want to change the %1 and %2 to @hp and @sp variables, because then could put them in a status bar and see that they are getting populated correctly.
I think the correct syntax would be
&d{hp}h, &d{sp}m
the create the hp and sp vars.
Then the reason it sips twice is because you don't have an or statement. Not sure the syntax for or, but if your %1 and %2 variables aren't being filled, then they would bothe be < than the values you put in your if statements and thus they would both trigger you to sip health.
your logic statement should be
if healbalance = 1 then if (@hp<1400) or (@sp<300) then sip health, healbalance =0 endif
Not sure how to convert that into zmud script. but you should be able to figure it out. |
|
|
|
questron Newbie
Joined: 05 Mar 2003 Posts: 2 Location: United Kingdom
|
Posted: Thu Mar 06, 2003 9:36 am |
Thnaks for this but i've been told that its soemthing to do with inherited things. Anyone with any ides please lets me know.
Regards
Questron |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Thu Mar 06, 2003 12:25 pm |
Trigger Pattern : (%n)h, (%n)m (*)-
Value:
#if (@healbalance=1) {#if (%1<1400) {
sip health
healbalance=0
} {}}
#if (@healbalance=1) {#if (%2<300) {
sip health
healbalance=0
} {}}
umm...these are some changes that i would add and see if it works...if it does, i guess post back.
-=Realms of the Forgotten=-
rotf.net:5000 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Mar 11, 2003 12:20 am |
Check the trigger options (Options tab in the editor window). Under "Trigger on" (right side of options) make sure you have Newline unchecked and Prompt checked. Change the order of actions so that you set the variable, @healbalance, to zero before sipping. Use the %n or %d wildcards in your pattern rather than %1 and %2, so the trigger doesn't fire on things like:
You see a lot of trash, whoever lives here must be a junk-collector.
(%1 = "You see a lot of tras", %2 = "whoever lives here ", and %3 = "ust be a junk")
Trigger Pattern : (%n)h, (%n)m (*)-
Value:
#if (@healbalance=1) {#if (%1<1400) {
healbalance=0
sip health
}}
#if @healbalance=1 {#if %2<300 {
healbalance=0
sip mana
}}
LightBulb
Advanced Member |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue Mar 11, 2003 1:26 am |
Can you sip twice or only once? Currenly it is possible to spam 2 sips if
both mana and health is low. If you can not sip twice then prioritzing health
Trigger Pattern : (%n)h, (%n)m (*)-
Value:
#if (@healbalance=1) {
#if (%1<1400) {
healbalance=0
sip health
} {
#if (%2<300) {
healbalance=0
sip mana
}
Ton Diening |
|
|
|
|
|