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 ➜ VBscript ➜ enemy scanning script

enemy scanning script

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


Posted by Tarrant   (20 posts)  Bio
Date Thu 27 Feb 2003 02:23 AM (UTC)
Message
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:

Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 04 Mar 2003 12:59 AM (UTC)
Message
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>


- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


12,305 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.