Mudlet help - Toggling a set of triggers with an alias

Discussion of different MUD clients, plugins, etc. as well as technical help.
Post Reply
Lun
CLOK Patron
Posts: 656
Joined: Wed Jun 06, 2012 5:10 pm

Mudlet help - Toggling a set of triggers with an alias

Post 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!
Dakhal
Member
Posts: 257
Joined: Tue Dec 16, 2014 6:40 pm

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

Post by Dakhal »

What client do you use? This is the first step.
Love me or hate me, both are in my favor. If you love me, I'll always be in your heart. If you hate me, I'll always be in your mind.
I lead a Life of Sin.
User avatar
Hakon
Member
Posts: 50
Joined: Fri Jul 03, 2015 10:29 am

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

Post by Hakon »

Probably Mudlet, since it's in the topic "Mudlet help..."
Dakhal
Member
Posts: 257
Joined: Tue Dec 16, 2014 6:40 pm

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

Post 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.
Love me or hate me, both are in my favor. If you love me, I'll always be in your heart. If you hate me, I'll always be in your mind.
I lead a Life of Sin.
Lun
CLOK Patron
Posts: 656
Joined: Wed Jun 06, 2012 5:10 pm

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

Post 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?
Post Reply

Return to “Technical Stuff”