I am having this problem, and I think it has to do with variable scope. Inside of my script I have a variable such that:
And I have a trigger such that:
Now, the trigger does not make the change to the script file and I was not sure why. A friend suggested it looks liek a variable scope issue, and suggested I convet all of my variables to mush-client variables, to be handled by mush, and not inside my script. I am ok with that idea, but it does not fix the issue at hand.
Is there a way to change my script variables from inside of mush client, that would be effecient over the long run? Someone suggested storing all of my variables in a Lua table, and useing triggers to call functions to change the table values to true or false. I am not sure how I would do that, or if it would indeed be speed effecient in the long run.
Also, if I need variables to have a third state, like true/false/foo or 0/1/2 ... when using the mush client variables with Lua as my language, can the variables be 0,1,2 instead of true/false?
Thanks for the help!
wings = falseAnd I have a trigger such that:
<trigger
enabled="y"
group="defs"
match="^Angelic wings sprout out of your back\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>wings = true</send>
</trigger>
Now, the trigger does not make the change to the script file and I was not sure why. A friend suggested it looks liek a variable scope issue, and suggested I convet all of my variables to mush-client variables, to be handled by mush, and not inside my script. I am ok with that idea, but it does not fix the issue at hand.
Is there a way to change my script variables from inside of mush client, that would be effecient over the long run? Someone suggested storing all of my variables in a Lua table, and useing triggers to call functions to change the table values to true or false. I am not sure how I would do that, or if it would indeed be speed effecient in the long run.
Also, if I need variables to have a third state, like true/false/foo or 0/1/2 ... when using the mush client variables with Lua as my language, can the variables be 0,1,2 instead of true/false?
Thanks for the help!