I want to switch a character's gear with an alias based on the current state of the gear setup. The best/easiest way I can think of doing this (with my non-coder skills), is have a permanent variable that gets checked to see what the current gear state is, and then checked to see what it should change to. But: I'm trying to figure out how to do it without having a permanent variable set up in the character's profile, mainly because adding extra permanent variables to every character starts getting tedious since they each have their own profile.
So far, I have:
I need to have that "switch" variable set up and checkmarked in Mudlet for the above to work. The my_weapon variable is just for separate disarm triggers. Is there a way to have the above create a temporary "switch" variable that persists until I close the character profile? Or is there just a better way to go about this kind of thing? Thanks!
Code: Select all
if switch == "normal" then sendAll("all the commands to switch gear") my_weapon = "new weapon state" switch = "new gear state" elseif switch == "new gear state" then sendAll("all the commands to switch gear back to normal state") my_weapon = "normal weapon" switch = "normal" end