Hi, I am new to MushClient. I am also new to scripting. I am taking time to learn Lua on my own so I am just in the basics now.
Anyway what I am trying to do is create an alias that will toggle a trigger group from enabled to disabled or visa versa.
Here what I have so far. I created an alias called moneyrun and a variable called MoneyRun. I initially set the variable to 1.
The alias is set to send to script. In the send box:
EnableTriggerGroup ("Money Run", GetVariable("MoneyRun"))
if GetVariable("MoneyRun") == 1
then SetVariable("MoneyRun", "0");print("Money Run Enabled") else SetVariable("MoneyRun", "1");print("Money Run Disabled") end
When I initiate the alias, if the variable is set to 0, it will enable the group. When I do it again, it does not disable like it should. What am I doing wrong here? I appreciate any feedback.
Anyway what I am trying to do is create an alias that will toggle a trigger group from enabled to disabled or visa versa.
Here what I have so far. I created an alias called moneyrun and a variable called MoneyRun. I initially set the variable to 1.
The alias is set to send to script. In the send box:
EnableTriggerGroup ("Money Run", GetVariable("MoneyRun"))
if GetVariable("MoneyRun") == 1
then SetVariable("MoneyRun", "0");print("Money Run Enabled") else SetVariable("MoneyRun", "1");print("Money Run Disabled") end
When I initiate the alias, if the variable is set to 0, it will enable the group. When I do it again, it does not disable like it should. What am I doing wrong here? I appreciate any feedback.