[Mudlet] isEnabled function

So, I didn't have internet and I was bored at some point so I started messing with my scripts. Because I didn't have internet, I couldn't check to see if there was a function to tell if a specific trigger was already active. isActive only gives a total of triggers with that specific name, which is sufficient for most cases, but I wanted it to be more specific or something. I'm not really sure what I was trying to accomplish at the time, but when I made it, I felt like a genius, so I want to share. This returns true or false depending on whether the number of active triggers changes when it enables a trigger, alias, or timer. 

Could probably be more elegant or something, but I'm not really in the business of elegance. I just want to share.

http://pastebin.com/i3DhCQ8x because I didn't want to export it. Just c/p into a script and if you can manage to find a use for it like I did, hooray.

I am retired and log into the forums maybe once every 2 months. It was a good 20 years, live your best lives, friends.

Comments

  • Don't enableTrigger and disableTrigger (and associated functions) also work on all triggers/aliases/keys of the given name? If so, I don't see how this is any more specific than isActive.
  • Eld said:
    Don't enableTrigger and disableTrigger (and associated functions) also work on all triggers/aliases/keys of the given name? If so, I don't see how this is any more specific than isActive.
    Pretty sure it does. Or at least, this is why I prepended the name of every trigger and trigger group with the tree of trigger groups above it, so I wouldn't have to worry about enabling/disabling more than I mean to.
    image
  • JonathinJonathin Retired in a hole.
    edited September 2013
     I'm not really sure what I was trying to accomplish at the time, but when I made it, I felt like a genius, so I want to share. 
    I'm not going to defend this simply because of the statement I made in the OP (also shown 1 line above this one). At this point, you're just supposed to smile and nod while backing away slowly because honestly, idgaf if it makes sense.
    I am retired and log into the forums maybe once every 2 months. It was a good 20 years, live your best lives, friends.
  • Jonathin said:
     I'm not really sure what I was trying to accomplish at the time, but when I made it, I felt like a genius, so I want to share. 
    I'm not going to defend this simply because of the statement I made in the OP (also shown 1 line above this one). At this point, you're just supposed to smile and nod while backing away slowly because honestly, idgaf if it makes sense.
    Didn't mean to call for defense, so much as I was curious if you knew something I didn't.
Sign In or Register to comment.