[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]  General
. . -> [Subject]  Trigger Question
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Trigger Question

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


Posted by SWLR Deesk   USA  (3 posts)  [Biography] bio
Date Tue 14 Nov 2006 04:22 AM (UTC)
Message
Hi everyone, I'm new to MUSHclient and I'm figuring stuff out slowly but surely.

I'd like to make a trigger that searches for a certain string within a line. Specifically, every time a mob does damage to me, I want MUSHclient to input "punch" to the World.

Any ideas?

-SWLR Deesk
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #1 on Tue 14 Nov 2006 12:13 PM (UTC)
Message
You can use wildcards for that.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by SWLR Deesk   USA  (3 posts)  [Biography] bio
Date Reply #2 on Tue 14 Nov 2006 06:20 PM (UTC)

Amended on Tue 14 Nov 2006 06:36 PM (UTC) by SWLR Deesk

Message
Could you be more specific?

The actual line that I want to trigger the event would look like this:

Spartan barely scratches you. Spartan does 7 points of damage.

I basically want it so anyone attacking me, doing any amount of damage will trigger it.

-SWLR Deesk
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #3 on Tue 14 Nov 2006 07:13 PM (UTC)
Message
There should be a helpfile for wildcards. Here's an example:
*does * points of damage.


There is a better way to do that, of course.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Tue 14 Nov 2006 07:49 PM (UTC)
Message
Here is an example.


<triggers>
  <trigger
   enabled="y"
   match="* does * points of damage."
   sequence="100"
  >
  <send>punch</send>
  </trigger>
</triggers>



- Nick Gammon

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

Posted by Malek   USA  (27 posts)  [Biography] bio
Date Reply #5 on Wed 15 Nov 2006 10:45 PM (UTC)
Message
This is how I would do it. So no matter how hard they hit you, it will fire on any hit.

<triggers>
<trigger
enabled="y"
match="^(.*?) (.*?) you\. (.*?) does (.*?) points of damage\.$"
regexp="y"
sequence="100"
>
<send>punch %1</send>
</trigger>
</triggers>

Tod ist gweiss, Lebens est nicht.
[Go to top] top

Posted by SWLR Deesk   USA  (3 posts)  [Biography] bio
Date Reply #6 on Thu 16 Nov 2006 02:40 AM (UTC)
Message
Thanks for your help guys!

-SWLR Deesk
[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.


3,957 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]