Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

[Mudlet] isEnabled function

JonathinJonathin Grand Rapids, MIMember Posts: 3,323 @@ - Legendary Achaean
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.


My site will remain up, but will not be maintained. The repository will continue to have scripts added to it if I decide to play another game. Maybe I'll see you around in Starmourn!
Tutorials and scripts  The Repository

Comments

  • EldEld Member Posts: 3,946 @@ - Legendary Achaean
    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.
  • JacenJacen Member Posts: 2,305 @@ - Legendary Achaean
    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 Grand Rapids, MIMember Posts: 3,323 @@ - Legendary Achaean
    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.

    My site will remain up, but will not be maintained. The repository will continue to have scripts added to it if I decide to play another game. Maybe I'll see you around in Starmourn!
    Tutorials and scripts  The Repository

    Eld
  • EldEld Member Posts: 3,946 @@ - Legendary Achaean
    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 to Comment.