Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ scanning trigger

scanning trigger

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


Posted by Tarrant   (20 posts)  Bio
Date Sun 04 Aug 2002 04:50 AM (UTC)
Message
i play on a PK mud and if i scan some enemies i want to tell my guild. guild chat is by the command "gcc"

my enemies show up like such if i scan them:
A Barbarian who is close by to your west.
A Gnome who is close by to your west.

and different messages for how many rooms away they are, but it all follows the pattern:

(A|An) <enemy race> * who is * to your (north.|south.|east.|west|above.|below.)



and all the valid enemy races are:

Minotaur|Centaur|Barbarian|Thri-kreen|Gnome|Halfling|Mountain Dwarf|Human|Grey Elf|Half-Elf


basically when i scan any of them i want to automatically say

You tell your guild 'Minotaur | Centaur | Barbarian'

i think to do this i would have to have some sort of enemy race variable that gets written to when i scan them then gcc the variable, i don't really know how to script, any help?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 04 Aug 2002 05:00 AM (UTC)
Message
You don't need a script, I shouldn't think. This should do it:


<triggers>
  <trigger
   custom_colour="1"
   enabled="y"
   match="^(A|An) (Minotaur|Centaur|Barbarian|Thri-kreen|Gnome|Halfling|Mountain Dwarf|Human|Grey Elf|Half-Elf) who is (.*?) to your (north|south|east|west|above|below)\.$"
   regexp="y"
   sequence="100"
  >
  <send>gcc %2</send>
  </trigger>
</triggers>

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Tarrant   (20 posts)  Bio
Date Reply #2 on Sun 04 Aug 2002 05:12 AM (UTC)
Message
where do i put that?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 04 Aug 2002 05:15 AM (UTC)
Message

  1. Copy the stuff from <triggers> onwards to the clipboard.
  2. Go to the File Menu -> Import
  3. Click on "clipboard"


This will import that trigger.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Tarrant   (20 posts)  Bio
Date Reply #4 on Sun 04 Aug 2002 05:17 AM (UTC)
Message
and thanks once again
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.


13,505 views.

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

Go to topic:           Search the forum


[Go to top] top

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