Mudlet help - Toggling a set of triggers with an alias
Posted: Tue Oct 24, 2017 4:32 am
Hey guys, I've been experimenting with incredibly basic Lua code recently. I can't seem to get a really basic alias to work, could someone help guide me through this?
I have a trigger named "mine tin" that fires when it matches "Looking about the area, you realize that nearly everywhere you look is covered in mineral veins! You will have to clear them away before you can mine for more."
I want to set an alias "toggle tin" that'll send the command enableTrigger("mine tin") if it detects the trigger is off, or disableTrigger("mine tin") if it detects the trigger is on so I can alt tab less and just stay on the main window. Is it possible for one alias to do both of these things, or do I have to have two separate aliases? Can I have one alias flip the trigger on and off, or do I need to create two aliases, one for turning it on, one for turning it off?
Thanks!
I have a trigger named "mine tin" that fires when it matches "Looking about the area, you realize that nearly everywhere you look is covered in mineral veins! You will have to clear them away before you can mine for more."
I want to set an alias "toggle tin" that'll send the command enableTrigger("mine tin") if it detects the trigger is off, or disableTrigger("mine tin") if it detects the trigger is on so I can alt tab less and just stay on the main window. Is it possible for one alias to do both of these things, or do I have to have two separate aliases? Can I have one alias flip the trigger on and off, or do I need to create two aliases, one for turning it on, one for turning it off?
Thanks!