TF prompt triggers

by Unknown

Back to Mechanic's Corner.

Unknown2011-09-23 20:46:24
Basically what I did was copied someone elses prompt catcher.
What i was wondering I have the lua patch installed as well.
Was how do I make simple things like auto stand and auto awake triggers based on my prompt?
This is what I have at the moment.
CODE
/def -q -mglob -h"PROMPT *-"  normalPromptHook = \\
    /parsePrompt %{*}

/def parsePrompt = \\
    /test regmatch( "(+)h, (+)m, (+)e, (+)p (e?)(l?)(r?)(x?)(k?)(d?)(b?)(p?)(@?)",  "%{*}" ) %;\\
    /set health=%{P1} %;\\
    /set mana=%{P2} %;\\
    /set ego=%{P3} %;\\
    /set power=%{P4} %;\\
    /if ( {P5} =~ "e" ) \\
        /set promptEquilibrium 1 %; \\
    /else \\
        /set promptEquilibrium 0 %; \\
; If unexpected eq loss (e.g. pookaed) start a regular timeout, but no prompt timeout.
        /if ( equilibrium ) \\
            /set equilibriumTime=$ %; \\
            /set equilibrium 0 %; \\
        /endif %; \\
    /endif %; \\
    /if ( {P6} =~ "l" ) /set promptLeftArmBalance 1 %; /else /set promptLeftArmBalance 0 %; /noPhysBalance %; /endif %; \\
    /if ( {P7} =~ "r" ) /set promptRightArmBalance 1 %; /else /set promptRightArmBalance 0 %; /noPhysBalance %; /endif %; \\
    /if ( {P8} =~ "x" ) /set promptBalance 1 %; /else /set promptBalance 0 %; /noPhysBalance %; /endif %; \\
    /if ( {P9} =~ "k" ) /set ateKafe 1 %; /else /set ateKafe 0 %; /endif %; \\
    /if ( {P10} =~ "d" ) /set deaf 1 %; /else /set deaf 0 %; /endif %; \\
    /if ( {P11} =~ "b" ) /set blind 1 %; /else /set blind 0 %; /endif %; \\
    /if ( {P12} =~ "p" ) \\
        /set justWentProne $ %; \\
        /set prone 1 %; \\
    /else \\
        /set justWentProne 0 %; \\
        /set prone 0 %; \\
    /endif