Question about MUSHClient

How do I make an alias to toggle the enabled/disabled state of a trigger or group of triggers? For example, have on alias, huntON, to enable all my triggers grouped under hunting, and a second alias, huntOFF, to disable them. Or could I just make one alias to do both?
The drone, the whistle, the thundrous sound;
It seared their eyes, it shook the ground.
One hundred thousand voices lift,
While ashes like dirty snowfall drift.

The clouds of purple glowing gas,
The tiny sun is rising fast.
Your star...
Is on the rise.

Comments

  • TarkentonTarkenton Traitor Bear
    edited April 2014
    First off, come to the dark side and use Mudlet.  We have cookies :D

    With my obligatory come2Mudlet comment out of the way, I think something like this would work.  As a warning, I don't use mushclient.  However, something along the lines of

    Alias text  box: ^hunt(ON|OFF)$
    in the box:
    if %1 == "ON" then 
    EnableGroup("hunting", true)
    Note("Hunting triggers enabled!")
    elseif %1 == "OFF" then 
    DisableGroup("hunting", false)
    Note("Hunting triggers disabled!")
    end -- if

    On the right, set the send to to Script

    http://www.mushclient.com/scripts/function.php?name=EnableGroup for reading up on the function.
    image
  • edited April 2014

    Easiest way to go about this, if you only want one alias to do it! Of course, you can play around with it. Whatever you want the alias to be, just change the different instances of 'hunt', the spots where it says 'hunting' however, are going to be the variable it makes to toggle it properly



    <aliases>
      <alias
       match="hunt"
       enabled="y"
       expand_variables="y"
       variable="hunting"
       send_to="12"
       ignore_case="y"
       sequence="100"
      >
      <send>
    if hunting == "true" then
    SetVariable("hunting","false")
    hunting = "false"
    EnableTriggerGroup ("<TRIGGER GROUP NAME>", false)  -- enable the group
    ColourNote("red", "black", "Hunting triggers off!")
    else
    SetVariable("hunting","true")
    hunting = "true"
    EnableTriggerGroup ("<TRIGGER GROUP NAME>", true)  -- disable the group
    ColourNote("green","black", "Hunting triggers on!")
    end--if</send>
      </alias>
    </aliases>


  • Thanks! Now for a bit more complicated question, how would I go about replacing the ColourNote lines with an emote command instead? So when I toggle hunting on, it would emote something like:

    Erythrykos holds out his cupped palm and conjures a small mote of cosmic fire as he prepares to go hunting.

    And for hunting off:

    Erythrykos shakes his hand, extinguishing the last of the cosmic fire lingering there, signifying that this hunt is over.
    The drone, the whistle, the thundrous sound;
    It seared their eyes, it shook the ground.
    One hundred thousand voices lift,
    While ashes like dirty snowfall drift.

    The clouds of purple glowing gas,
    The tiny sun is rising fast.
    Your star...
    Is on the rise.
  • One particular note about mush, you might need to do "%1" == "on" if Aiyana's doesn't do it.

    On emoting, you'd just want to trade out the Note for a Send("emote whatever")
Sign In or Register to comment.