Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
roncli
Wanderer


Joined: 07 Sep 2002
Posts: 63
Location: USA

PostPosted: Wed Aug 11, 2004 11:01 am   

Achaea - Highlight City Enemies
 
Class: CityEnemies

Purpose: This script will highlight, in red, names of some or all of your city's enemies. This works for any city, as long as you are a citizen of that city.

Usage:
CITYENEMIES <x> - Begin highlighting city enemies. <x> is optional and represents the first one or more characters of a person's name.
HIDEENEMIES - Turns off city enemy highlighting
SHOWENEMIES - Resumes city enemy highlighting

Code:

#CLASS {CityEnemies}
#ALIAS SHOWENEMIES {#T+ {CityEnemies/HighlightEnemies}}
#ALIAS HIDEENEMIES {#T- {CityEnemies/HighlightEnemies}}
#TRIGGER {Enemies of the City of (%w):} {#delclass CityEnemies/HighlightEnemies;#T+ {CityEnemies/DetectEnemies}}
#CLASS 0

#CLASS {CityEnemies|DetectEnemies}
#TRIGGER {(%w)} {#if (%1 = "Total") {#t- {CityEnemies/DetectEnemies}} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies}}}
#TRIGGER {(%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%10%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%10%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%10%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%10%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%10%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%11%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w)} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%10%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%11%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {, (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%10%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%11%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#TRIGGER {(%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w), (%w),} {#trigger {%q%1%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%2%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%3%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%4%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%5%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%6%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%7%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%8%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%9%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%10%q} {#cw 12} {CityEnemies/HighlightEnemies};#trigger {%q%11%q} {#cw 12} {CityEnemies/HighlightEnemies}}
#CLASS 0

#t- {CityEnemies|DetectEnemies}
_________________
-roncli
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Sat Dec 31, 2005 1:10 pm   
 
Here's the script I came up with, and it works well for me. It's a bit slow because of the regex parsing of each line, but it doesn't create dozens of triggers and you can use the list of enemy names in other ways, if you like.

Code:
#CLASS {City|Enemies}
#VAR CityName {}
#VAR CityEnemies {}
#ALIAS readlog {#if (%lower(%1) == %lower(@City/CityName)) {#t+ log_ce;#t+ log_unce;#alarm +2 {#t- log_ce;#t- log_unce}};~readlog %-1}
#ALIAS ce {#if (!%null(%1)) {#t- ce_capture;#alarm "ceduh" +1 {#t+ ce_capture}};~cityenemies %1}
#TRIGGER "ce_capture" {Enemies of the City of} {#var CityEnemies {}} "" {line=2}
#COND {^(*)$} {#if (%regex(%1, "\d")) {#state ce_capture 0;#var CityEnemies {%subregex(@CityEnemies, "[^\w]+", "|")}} {#var CityEnemies {%concat( @CityEnemies, "%1")};#state ce_capture 1}}
#TRIGGER "log_ce" {declared (%w) to be a formal enemy.} {#additem CityEnemies %1} "" {disable}
#TRIGGER "log_unce" {declared that (%w) is no longer an enemy} {#delitem CityEnemies %1} "" {disable}
#REGEX {\b(?:@CityEnemies)\b} {#cw antiquewhite,firebrick} "" {case}
#CLASS 0

#ALARM +1 {#PROMPT City/CityName "What city do you live in?";#var CityName {%proper(@CityName)} _nodef {City}}

#SHOW {}
#SHOW {** City Enemies, version 1.10}
#SHOW {** Thank you for downloading this custom script, developed by Larkin.}
#SHOW {** http://my.win.psu.edu/jkd10/custom.html}
#SHOW {}
#SHOW {Features:}
#SHOW { - With a simple alias, create a list of all city enemies. Using your list, highlight enemy names for faster targetting.}
#SHOW { - Trigger for highlighting enemy names included.}
#SHOW { - Updated easily through reading the city logs, without the need for re-synchronizing the entire list.}
#SHOW {}
#SHOW {Usage:}
#SHOW { ce - Use this alias to synchronize your list of city enemies (Warning: this will be slow, with the parsing of names, but is only necessary to do once in a long while).}
#SHOW {}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net