Page 1 of 1

Mudlet help - Toggling a set of triggers with an alias

Posted: Tue Oct 24, 2017 4:32 am
by Lun
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!

Re: Mudlet help - Toggling a set of triggers with an alias

Posted: Tue Oct 24, 2017 6:29 pm
by Dakhal
What client do you use? This is the first step.

Re: Mudlet help - Toggling a set of triggers with an alias

Posted: Wed Oct 25, 2017 12:26 am
by Hakon
Probably Mudlet, since it's in the topic "Mudlet help..."

Re: Mudlet help - Toggling a set of triggers with an alias

Posted: Wed Oct 25, 2017 12:32 am
by Dakhal
Yeah.. I noticed that after a bit. I had just got home from work and wasn't paying much attention.

Already chatted with 'em about it, but I'm sure that more help is always welcome.

Re: Mudlet help - Toggling a set of triggers with an alias

Posted: Wed Oct 25, 2017 5:09 am
by Lun
Right, so to sum it up better I have a set of triggers that I manually toggle. I still intend to manually toggle them, but I want to do it from the main window rather than via a graphical GUI. I know I can set an ALIAS to enable a trigger, and an alias to disable a trigger. Mostly I want to figure out how I can do it with one alias. It doesn't seem possible, so here's my current set up.


I have 7 triggers set up to respond to 7 different ore veins that all match the same line.
I now have 14 aliases set up to toggle each trigger, one for on state, one for off state.


Is there a way I can drop that down to 7 aliases for 7 triggers? Does this explanation work better?