|
MyMiasma Wanderer
Joined: 26 Oct 2012 Posts: 56
|
Posted: Mon Apr 25, 2016 5:02 am
Healing alias help (newb) |
I am at a healer. This is what it looks like when I heal(donate):
You donate 100 coins to the orphans.
Suddenly, a beam of light falls on you, soothing your soul.
** HP: 208/214 SP: 59/214
HP is at 97.196261682243 of max
SP is at 27.5700934579439 of max
** HP: 196/214 SP: 59/214
HP is at 91.588785046729 of max
SP is at 27.5700934579439 of max
0% 0% 0% 0% r
You donate 100 coins to the orphans.
Suddenly, a beam of light falls on you, soothing your soul.
** HP: 196/214 SP: 85/214
HP is at 91.588785046729 of max
SP is at 39.7196261682243 of max
** HP: 183/214 SP: 85/214
HP is at 85.5140186915888 of max
SP is at 39.7196261682243 of max
0% 0% 0% 0% r
You donate 100 coins to the orphans.
Suddenly, a beam of light falls on you, soothing your soul.
** HP: 183/214 SP: 110/214
HP is at 85.5140186915888 of max
SP is at 51.4018691588785 of max
** HP: 171/214 SP: 110/214
HP is at 79.9065420560748 of max
SP is at 51.4018691588785 of max
-----
Now this both heals and brings my HP and SP closer together.
I want some sort of alias/trigger that will allow me to keep donating
until my HP and SP are both above 95%. I have tried and I
keep ending up in a positive feedback loop.
hpPerc=%eval((%float(%1)/%2)*100)
spPerc=%eval((%float(%3)/%4)*100)
#SAY {HP is at @hpPerc of max}
#SAY {SP is at @spPerc of max} |
|
_________________ It is better to die on your feet than to live on your knees. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Mon Apr 25, 2016 1:30 pm |
#IF ((@hpPerc<95) OR (@spPerc<95)) {donate}
Add that to your current trigger |
|
_________________ Discord: Shalimarwildcat |
|
|
|
MyMiasma Wanderer
Joined: 26 Oct 2012 Posts: 56
|
Posted: Wed Apr 27, 2016 1:05 am Problem |
Since my prompt triggers twice with each heal I end up way over donating..
0% 0% 0% 0% donate 100
You donate 100 coins to the orphans.
Suddenly, a beam of light falls on you, soothing your soul.
** HP: 193/214 SP: 109/214
HP is at 90.1869158878505 of max
SP is at 50.9345794392523 of max
donate 100
** HP: 180/214 SP: 109/214
HP is at 84.1121495327103 of max
SP is at 50.9345794392523 of max
donate 100
0% 0% 0% 0% You donate 100 coins to the orphans.
Suddenly, a beam of light falls on you, soothing your soul.
** HP: 180/214 SP: 134/214
HP is at 84.1121495327103 of max
SP is at 62.6168224299065 of max
donate 100
** HP: 168/214 SP: 134/214
HP is at 78.5046728971963 of max
SP is at 62.6168224299065 of max
donate 100
i'm basically double donating.. |
|
_________________ It is better to die on your feet than to live on your knees. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Apr 27, 2016 4:49 am |
Use a multi-state trigger. Put this in the command line, confirm the details, and then remove your old trigger.
Code: |
#TRIGGER "healTrig" {^Suddenly, a beam of light falls on you, soothing your soul.$} {}
#COND {^~*~* HP: (%d)/(%d) SP: (%d)/(%d)$} {
hpPerc=%eval(%1*100/%2)
spPerc=%eval(%3*100/%4)
#SAY {HP is at @hpPerc of max}
#SAY {SP is at @spPerc of max}
#IF ((@hpPerc<95) OR (@spPerc<95)) {donate 100}
} |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Wed Apr 27, 2016 10:23 pm |
Don't even need the #SAYs anymore, unless you like seeing it.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
MyMiasma Wanderer
Joined: 26 Oct 2012 Posts: 56
|
Posted: Thu Apr 28, 2016 1:00 am Thanks |
It didnt work when I tried to enter it on the command line, but when I entered it manually in
package editor it went through. :) perfect.. thank you both |
|
_________________ It is better to die on your feet than to live on your knees. |
|
|
|
MyMiasma Wanderer
Joined: 26 Oct 2012 Posts: 56
|
Posted: Thu Apr 28, 2016 1:10 am |
Would I need to do anything differently on zmud? Im still in transition and I wont be done rewriting all
my settings for months, so I'll be on Zmud often while I transition |
|
_________________ It is better to die on your feet than to live on your knees. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Apr 28, 2016 6:41 am |
It should work just fine on zMud as well.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|