scanning trigger

Posted by Tarrant on Sun 04 Aug 2002 04:50 AM — 5 posts, 17,868 views.

#0
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?
Australia Forum Administrator #1
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>
#2
where do i put that?
Australia Forum Administrator #3
  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.
#4
and thanks once again