enemy scanning script

Posted by Tarrant on Thu 27 Feb 2003 02:23 AM — 2 posts, 12,478 views.

#0
i play on a race war mud and if i scan someone
from the opposite side i want to make my group aware
of it by sending a group say

i found a script to do it on a webpage but its for Zmud
will someone convert this to work in mushclient?

-----------------------------------------------
Example Output:
You quickly scan the area.
Variable Scan_Targets removed.
A Gnome who is close by to your east.
A Gnome who is close by to your east.
A Grey Elf who is close by to your east.
A Grey Elf who is close by to your east.
A snake who is close by to your west.
gsay WARNING!!! 2_Gnome|2_Grey Elf in scan!!
< 85h/85H 143v/145V Pos: standing >
You tell your group 'WARNING!!! 2_Gnome|2_Grey Elf in scan!!'
----------------------------------------------


Alarms:

Pattern:
10

Commands:
scan

Class:
Scanner

-----------------------------------------------

Triggers:
Pattern:
^You quickly scan the area.

Commands:
#UNVAR Scan_Targets
#UNVAR Evil_Report
#T+ Autoscan

Class:
AutoScan_Prep

===
Pattern:
^{A |An }({@Enemy_Race})*who is *to your {north.|south.|east.|west|above.|below.}

Commands:
#VAR scan_temp %1
#VAR Scan_Targets %additem( @scan_temp, @Scan_Targets)

Class:
AutoScan

===
Pattern:
^$

Commands:
#if (%numitems(@Scan_Targets)>0) {gsay %countlist( @scan_targets) in scan!!} {#SAY -=-=-= Clear scan =-=-=-}
#T- AutoScan
#if (%numitems( @Scan_Targets)>0) { #LOOPDB %countlist( @Scan_Targets) {#VAR Evil_Report %additem( %val %key, @Evil_Report)}} {#SAY -=-=-=-=-=-= Clear scan}
gr
#T- Autoscan

Class:
AutoScan

=======================================

ALIAS

Name:
er

Value:
#if (%numitems( @Evil_Report)>0) {gcc WARNING!!! @Evil_Report in scan!!}

Name:
gr

Value:
#if (%numitems( @Evil_Report)>0) {gsay WARNING!!! @Evil_Report in scan!!}

=======================================

VARIABLES

Name:
Enemy_Race

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

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

Class:

Australia Forum Administrator #1
I'll get you started. This trigger will match on one of the scan lines. You would need to make it call a small script that added one to a counter for each type of enemy.


<triggers>
  <trigger
   custom_colour="2"
   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"
   send_to="2"
   sequence="100"
  >
  <send>Counted a %2</send>
  </trigger>
</triggers>