[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Tips and tricks
. . -> [Subject]  ex-zmud user needs trigger conversion
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

ex-zmud user needs trigger conversion

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Devlinx   (3 posts)  [Biography] bio
Date Mon 28 Jul 2003 04:38 PM (UTC)
Message
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}
[Go to top] top

Posted by Nick Gammon   Australia  (21,493 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 28 Jul 2003 11:43 PM (UTC)

Amended on Tue 29 Jul 2003 09:12 PM (UTC) by Nick Gammon

Message
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>



- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Devlinx   (3 posts)  [Biography] bio
Date Reply #2 on Tue 29 Jul 2003 12:19 PM (UTC)
Message
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
[Go to top] top

Posted by Nick Gammon   Australia  (21,493 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Tue 29 Jul 2003 09:13 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Devlinx   (3 posts)  [Biography] bio
Date Reply #4 on Wed 30 Jul 2003 04:03 PM (UTC)
Message
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
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #5 on Wed 30 Jul 2003 08:02 PM (UTC)
Message
Hurray for word of mouth advertising!

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Confused22   (1 post)  [Biography] bio
Date Reply #6 on Sat 09 Apr 2005 06:34 PM (UTC)
Message
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...
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #7 on Sat 09 Apr 2005 10:11 PM (UTC)
Message
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).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #8 on Sun 10 Apr 2005 03:08 AM (UTC)
Message
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.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Nick Gammon   Australia  (21,493 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Sun 10 Apr 2005 06:15 AM (UTC)
Message
See Pasting Triggers which describes the general idea.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


16,138 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]