How to put a kill switch into a trigger so I can enable and disable it quickly.

Posted by Ivellios on Tue 13 Apr 2010 02:05 AM — 2 posts, 13,761 views.

#0
I talked to a person but he only knows how to code it in cmud, this is the example he sent me.

#REGEX {^The lilting melody of a rousing song swells briefly around \w+$} {
#IF (@killswitch) {hum yoth @target @queue} {#SAY Revelation swell!}}

Basically the idea is that I can have an alias to switch the killswitch variable number. if it is one, I do yoth at my target, if it is 0, I echo something to the output to let me know revelation , this, "The lilting melody of a rousing song swells briefly around " ticked. I'm a real novice when it comes to this. I just got started with MUD's in general so I'm still stumbling along. If someone could help me out, and tell me what to do, because, I have no clue, I'd be very appreciative.
USA #1
This is probably a decent translation:


<trigger
 enabled="y"
 match="^The lilting melody of a rousing song swells briefly around \w+$"
 regexp="y"
 sequence="100"
 send_to="12"
 expand_variables="y"
>
<send>
  if GetVariable("killswitch") == "1" then
    Send("hum yoth @target @queue")
  else
    Send("say Revelation swell!")
  end -- if
</send>
</trigger>


Hope that helps.

-Daniel