ex-zmud user needs trigger conversion

Posted by Devlinx on Mon 28 Jul 2003 04:38 PM — 10 posts, 52,655 views.

#0
HI .. I just switched over to MUSHclient *hooray .. from using Zmud.

These are the triggers i used in old client. I need help to make them into mushclent triggers. I didnt make these i just copied it from someone else. All i has to do was to copy and paste it on the promp box.

autoquaff -
#TRIGGER {(%d)/%dhp} {#IF (%1 < 1000) {quaff ballad;#T- autoheal}} {autoheal}
#TRIGGER {A warm feeling fills your body.} {#T+ autoheal}

autohunt -
#ALIAS hunt {#T+ autohunt;huntmob=%1;hun @huntmob}
#TRIGGER {* is (%w) from here.} {#IF (%1 =~ {north|south|east|west|up|down}) {huntmobdirection=%1;%1;hun @huntmob}} {autohunt}
#TRIGGER {* is here~!} {huntstop} {autohunt}
#TRIGGER {* is closed~.$} {open @huntmobdirection} {autohunt}
#TRIGGER {The door is locked and you lack the key~.$} {huntstop;#say "Locked Door!"} {autohunt}
#TRIGGER {Magical wards around * bounce you back~.} {#T- autohunt} {autohunt}
#TRIGGER {No-one in this area by that name~.$} {huntstop;#say "Mob not in this area! Try another mob keyword?"} {autohunt}
#TRIGGER {You couldn~'t find a path to *} {huntstop;#say "Mob not in this part of town! Try hunting again after portals or in another part of the area"} {autohunt}
#TRIGGER {No way~! You are still fighting~!$} {huntstop;#say "Try hunting again when combat ends"} {autohunt}
#ALIAS huntstop {#T- autohunt;huntmob="";huntmobdirection=""}

disarm -
#TRIGGER {DISARMS you and sends your * flying~!} {get @weapon;wear @weapon} {rearm}
#TRIGGER {DISARMS you and you struggle not to drop your weapon~!} {wear @weapon} {rearm}
#ALIAS weapon {#var weapon}

autoheal -
#TRIGGER {(%d)/%dhp} {#IF (%1 < 1000) {cast 'heal';#T- autohealspell}} {autohealspell}
#TRIGGER {A warm feeling fills your body.} {#T+ autohealspell}
Australia Forum Administrator #1
The triggers and aliases below should behave the same way. I have shown the zMUD equivalents to aid others in converting similar ones. You will need to copy and paste between the lines (once for each group) and then go to the File menu -> Import -> Clipboard to import them.

autoquaff



<triggers>

<!-- 
zMUD trigger:

#TRIGGER {(%d)/%dhp} 
{#IF (%1 < 1000) {quaff ballad;#T- autoheal}} 
{autoheal}

-->

  <trigger
   enabled="y"
   group="autoheal"
   match="(\d+)/(\d+)hp"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>if %1 &lt; 1000 then
 Send "quaff ballad"
 EnableTriggerGroup "autoheal", vbFalse
end if
</send>
  </trigger>

<!-- 
zMUD trigger:

#TRIGGER {A warm feeling fills your body.} 
{#T+ autoheal}

-->

  <trigger
   enabled="y"
   keep_evaluating="y"
   match="A warm feeling fills your body\."
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>EnableTriggerGroup "autoheal", vbTrue</send>
  </trigger>
</triggers>




autohunt



<aliases>

<!-- 
zMUD alias:

#ALIAS hunt {#T+ autohunt;huntmob=%1;hun @huntmob}

-->

  <alias
   match="hunt *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>EnableTriggerGroup "autohunt", vbTrue
SetVariable "huntmob", "%1"
Send "hun %1"
</send>
  </alias>

<!-- 
zMUD alias:

#ALIAS huntstop 
{#T- autohunt;huntmob="";huntmobdirection=""}

-->

  <alias
   match="huntstop"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>EnableTriggerGroup "autohunt", vbFalse
SetVariable "huntmob", ""
Note "Hunt stopped."
SetVariable "huntmobdirection", ""</send>
  </alias>
</aliases>

<triggers>

<!-- 
zMUD trigger:

#TRIGGER {* is closed~.$} 
{open @huntmobdirection} {autohunt}

-->

  <trigger
   expand_variables="y"
   group="autohunt"
   match="* is closed."
   sequence="100"
  >
  <send>open @huntmobdirection
</send>
  </trigger>

<!-- 
zMUD trigger:

#TRIGGER {* is here~!} 
{huntstop} {autohunt}

-->

  <trigger
   custom_colour="2"
   group="autohunt"
   match="* is here!"
   send_to="10"
   sequence="100"
  >
  <send>huntstop</send>
  </trigger>

<!-- 
zMUD trigger:

#TRIGGER {* is (%w) from here.} 
{#IF (%1 =~ {north|south|east|west|up|down}) {huntmobdirection=%1;%1;hun @huntmob}} 
{autohunt}

-->

  <trigger
   group="autohunt"
   match=".* is (north|south|east|west|up|down) from here\."
   expand_variables="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>SetVariable "huntmobdirection", "%1"
Send "%1"
Send "hun @huntmob"
</send>
  </trigger>

<!-- 
zMUD trigger:

#TRIGGER {Magical wards around * bounce you back~.} 
{#T- autohunt} {autohunt}

-->

  <trigger
   custom_colour="2"
   group="autohunt"
   match="Magical wards around * bounce you back."
   send_to="10"
   sequence="100"
  >
  <send>huntstop</send>
  </trigger>

<!-- 
zMUD trigger:

#TRIGGER {No way~! You are still fighting~!$} 
{huntstop;#say "Try hunting again when combat ends"} 
{autohunt}

-->

  <trigger
   custom_colour="2"
   group="autohunt"
   match="No way! You are still fighting!"
   send_to="12"
   sequence="100"
  >
  <send>Note "Try hunting again when combat ends"
world.Execute "huntstop"</send>
  </trigger>

<!-- 
zMUD trigger:

#TRIGGER {No-one in this area by that name~.$} 
{huntstop;#say "Mob not in this area! Try another mob keyword?"} 
{autohunt}

-->

  <trigger
   custom_colour="2"
   group="autohunt"
   match="No-one in this area by that name."
   send_to="12"
   sequence="100"
  >
  <send>Note "Mob not in this area! Try another mob keyword?"
world.Execute "huntstop"</send>
  </trigger>

<!-- 
zMUD trigger:

#TRIGGER {The door is locked and you lack the key~.$} 
{huntstop;#say "Locked Door!"} {autohunt}

-->

  <trigger
   custom_colour="2"
   group="autohunt"
   match="The door is locked and you lack the key."
   send_to="12"
   sequence="100"
  >
  <send>Note "Locked Door!"
world.Execute "huntstop"</send>
  </trigger>


<!-- 
zMUD trigger:

#TRIGGER {You couldn~'t find a path to *} 
{huntstop;#say "Mob not in this part of town! 
Try hunting again after portals or in another part of the area"} {autohunt}

-->

  <trigger
   custom_colour="2"
   group="autohunt"
   match="You couldn't find a path to *"
   send_to="12"
   sequence="100"
  >
  <send>Note "Mob not in this part of town! " _
  &amp; "Try hunting again after portals or in another part of the area"
world.Execute "huntstop"</send>
  </trigger>
</triggers>



disarm



<aliases>


<!-- 
zMUD alias:

#ALIAS weapon {#var weapon}

-->

  <alias
   match="weapon *"
   enabled="y"
   variable="weapon"
   send_to="9"
   sequence="100"
  >
  <send>%1</send>
  </alias>
</aliases>

<!-- 
zMUD trigger:

#TRIGGER {DISARMS you and sends your * flying~!} 
{get @weapon;wear @weapon} {rearm}

-->

<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   expand_variables="y"
   group="rearm"
   match="DISARMS you and sends your .* flying\!"
   regexp="y"
   sequence="100"
  >
  <send>get @weapon
wear @weapon</send>
  </trigger>

<!-- 
zMUD trigger:

#TRIGGER {DISARMS you and you struggle not to drop your weapon~!} 
{wear @weapon} {rearm}

-->

  <trigger
   custom_colour="2"
   enabled="y"
   expand_variables="y"
   group="rearm"
   match="DISARMS you and you struggle not to drop your weapon\!"
   regexp="y"
   sequence="100"
  >
  <send>wear @weapon</send>
  </trigger>
</triggers>




autoheal



<triggers>

<!-- 
zMUD trigger:

#TRIGGER {(%d)/%dhp} 
{#IF (%1 < 1000) {cast 'heal';#T- autohealspell}} 
{autohealspell}

-->

  <trigger
   enabled="y"
   group="autohealspell"
   match="(\d+)/(\d+)hp"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>if %1 &lt; 1000 then
 Send "cast 'heal'"
 EnableTriggerGroup "autohealspell", vbFalse
end if
</send>
  </trigger>

<!-- 
zMUD trigger:

#TRIGGER {A warm feeling fills your body.} {#T+ autohealspell}

-->

  <trigger
   enabled="y"
   keep_evaluating="y"
   match="A warm feeling fills your body\."
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>EnableTriggerGroup "autohealspell", vbTrue</send>
  </trigger>
</triggers>


Amended on Tue 29 Jul 2003 09:12 PM by Nick Gammon
#2
Thanks alot Nick. Those work real good. Although on the autohunt, this is what it does :

1584/1584hp 1403 1846 | 31939 2265xp 0tell -1000 | The Temple Square NESWU 10tc |
hun duck
The duck is south from here.
south
hun @huntmob

On the trigerr, whatever i was hunting, it always send "hun @huntmob" and not the mob name
Australia Forum Administrator #3
I changed it slightly after testing it, sorry. The trigger needs another line in it:


expand_variables="y"

I have added that in the posting above.

For you, just edit that trigger in the trigger configuration and check the "expand variables" box.
#4
You're a life-saver .... now there are a few MUSHclient users on aardwolfmud.org .. i shared the wealth ... and some of them were z-users
USA #5
Hurray for word of mouth advertising!
#6
Well I am thrilled to have have found this. I've been looking everwhere for Mush stuff for Aard. My question though *yes I am very dumb* is now how to a paste this? I am not sure which items to paste where, and how to title the aliases so on and so on. Or am I supposed to copy all of this and paste it somewhere else? I'm confused...
USA #7
Things are (usually) in a XML type format. Individual triggers are within a <trigger></trigger> block, while a group (including a group of one) is within a <triggers></triggers> block (same for alias/aliases, timer/timers, and variable/variables)

You copy the WHOLE group of the item to the clipboard (<triggers> to </triggers>) and then click 'paste' in the configuration window for that type (the one that lists ALL of that type in a grid) and then you'll paste all of the (whatevers) into it.

The other option is to copy multiple types (which again could be a single type) and import the XML (via either the importXML function and a variable, or through the file > import and doing it that way).
Greece #8
Hmm... These seem parsable enough... Perhaps I could write a sed (python?) script to do the conversion automatically, I'll try when I have time.
Australia Forum Administrator #9
See Pasting Triggers which describes the general idea.