|
patrick Newbie
Joined: 06 Jul 2006 Posts: 8
|
Posted: Fri Aug 11, 2006 8:29 am
oninput trigger and autosipper |
i was just wondering if anyone could help me out with my autosipper it has been double sipping since i got it and i've made an oninput trigger to try and stop this with an alarm though it still hasn't fixed the problem can anyone see any problems in these codes that is causing this its the first alarm and oninput trigger i have tried but i'm sure the syntax is correct
#TRIGGER {H:(%n) M:(%n) ~<(*)~>} {#VAR health %1;#VAR mana %2;#IF %pos( b, %3) {#VAR balance 1} {#VAR balance 0};#IF %pos( e, %3) {#VAR equilibrium 1} {#VAR equilibrium 0};#IF %pos( p, %3) {#VAR prone 1} {#VAR prone 0};#IF (@asleep=0 & @blackout=0) {#IF (@sipping=0 & @anorexia=0) {#IF (@health<300) {drink health} {#IF (@mana<220) {drink mana}}}}}
#ONINPUT {^sip health|mana$} {#VAR sipping .5;#ALARM "sipping" +2;#IF (@sipping=".5");#VAR sipping 0}
well thats it if anyone can see a problem with either of those codes i would be thankful for any help |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Fri Aug 11, 2006 12:29 pm |
quick thought,
{^sip {health|mana}$}
Tho i could be wrong, don't think oninput handles more than command either. |
|
|
|
saet Apprentice
Joined: 12 Jun 2006 Posts: 106
|
Posted: Fri Aug 11, 2006 2:11 pm |
What's the point of an #ALARM with no argument and an #IF with no true/false statements. Am I misreading something here?
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Mon Aug 14, 2006 2:32 pm |
heh, i totally missed that.
Yeah, need that oninput part cleared up. |
|
|
|
Qiz Novice
Joined: 14 Aug 2006 Posts: 34 Location: Sweden
|
Posted: Mon Aug 14, 2006 9:58 pm Re: oninput trigger and autosipper |
patrick wrote: |
#ONINPUT {^sip health|mana$} {#VAR sipping .5;#ALARM "sipping" +2;#IF (@sipping=".5");#VAR sipping 0} |
I'm interested in knowing if that actually solves the problem as the last part of the above code should be evaluated as follows:
#ALARM "sipping" +2 // always create an alarm that does nothing
#IF (@sipping=".5") // always evaluate this expression and do nothing
#VAR sipping 0 // always set sipping to 0
Now, if the sipping variable set to 0 is supposed to stop sipping potions, this should allways happen! As such, I suspect the dual sipping "decision" occurs before ONINPUT has a chance to do anything at all.
An alternative is to disable the trigger straight away when it fires, then let it run through and eventually use the oninput to enable the trigger again. |
|
|
|
|
|