relaren2007-02-13 15:25:30
Basically, what this does is as follows. There is an alias for use called ONBAL. Whenever you use it, the values will be added to a neat little stringlist to be actioned on balance regain. Very simple, yet extremely handy.
Just off the top of my head as I am feeling lazy right now, any problems, you know what to do!
Enjoy!
EDIT: Forgot to mention, if the required action is more than a single word, stick it in brackets. (Parentheses for you over the water)
i.e.
CODE
#CLASS (General)
#VAR onbal ""
#VAR sync "%if( @balance = 1 AND @equilibrium = 1, 1, 0)"
#AL {onbal} {#additem onbal %-1}
#REGEX {^(\\d+)h, (\\d+)m, (\\d+)e, (\\d+)p, (\\d+)en, (\\d+)w (.*)$} {#if (%pos( e, %7)) {#var equilibrium 1} {#var equilibrium 0};#if (%pos( x, %7)) {#var balance 1} {#var balance 0}} "" "prompt|regex"
#TR {^You have recovered {equilibrium|balance on all limbs|balance on your left arm|balance on your right arm}.$} {#IF (@sync) {#FORALL @onbal {#exec %i};onbal=""} {}}
#CLASS 0
#VAR onbal ""
#VAR sync "%if( @balance = 1 AND @equilibrium = 1, 1, 0)"
#AL {onbal} {#additem onbal %-1}
#REGEX {^(\\d+)h, (\\d+)m, (\\d+)e, (\\d+)p, (\\d+)en, (\\d+)w (.*)$} {#if (%pos( e, %7)) {#var equilibrium 1} {#var equilibrium 0};#if (%pos( x, %7)) {#var balance 1} {#var balance 0}} "" "prompt|regex"
#TR {^You have recovered {equilibrium|balance on all limbs|balance on your left arm|balance on your right arm}.$} {#IF (@sync) {#FORALL @onbal {#exec %i};onbal=""} {}}
#CLASS 0
Just off the top of my head as I am feeling lazy right now, any problems, you know what to do!
Enjoy!
EDIT: Forgot to mention, if the required action is more than a single word, stick it in brackets. (Parentheses for you over the water)
i.e.
CODE
#TRIGGER {^You have slain} {onbal (get @tar)} "General"
Unknown2007-02-13 15:35:07
1. Use #FUNC for your sync function. That's what it's there for.
2. Use nocr|prompt for your trigger options (the regex is redundant with #REGEX).
3. You triggered on left/right arm balance, but you don't take them into account in your prompt trigger or sync function.
4. You could put parentheses just around the .* and use %1 instead of collecting six other things that aren't used.
Just some advice off the top of my head. Hope it helps.
CODE
#FUNC sync %if(@balance == 1 and @equilibrium == 1, 1, 0)
2. Use nocr|prompt for your trigger options (the regex is redundant with #REGEX).
3. You triggered on left/right arm balance, but you don't take them into account in your prompt trigger or sync function.
4. You could put parentheses just around the .* and use %1 instead of collecting six other things that aren't used.
Just some advice off the top of my head. Hope it helps.
relaren2007-02-13 15:39:44
Ahh, yes, forgot about that you track arm balance here. This is quickly converted from my Aetolian System (Where we have to track our own arm balances...Ouch. I am a monk too)
Appreciate the advice there, and yeah, I was aware the regex was redundant. I am just rather thorough. Updating shortly, thanks again.
Appreciate the advice there, and yeah, I was aware the regex was redundant. I am just rather thorough. Updating shortly, thanks again.