highlighting script

Post Reply
Posts: 13
Joined: Sat Jul 03, 2010 9:01 pm

highlighting script

Post by vint »

would there be a way to create a script where it highlights all your personal allies blue, your target red, and your enemies orange? i've seen alot of scripts going around where they highlight your cities, and i am just looking for help on how to do this as simply as i could, as i can't code for beans.

Posts: 52
Joined: Sun Sep 12, 2010 1:50 am

Re: highlighting script

Post by Lucky24 »

Simplest way to do it would be to create a trigger that matches each text you want colored, check the "highlight" checkbox, and the "match all" (if you want to match multiple occurrences in one line).

You can use the match type default of "substring" and simply type in each phrase exactly, or you could check out the great regular expressions tutorial to match different strings in one go.

Posts: 186
Joined: Sun Nov 14, 2010 5:57 am

Re: highlighting script

Post by Yetzederixx »

Going about it that way you'd have to create a pattern for everyone and hope it stays static. You really need to use the database and tables to bounce your generic pattern off of and highlight based off that. I have a set, but they're pretty complicated. If I get some time tomorrow I'll try and post how they work, what they work off, and the output generated. Hopefully you'll be able to use it, but it's bed time for me right now.

If you could post how you go about getting a list of enemies it might help me simplify things alot, to the point I could just code it for you and post it, also where you would need it highlighted (what situations, etc).

For instance, this is my current enemy list:

Code: Select all

[51 Enc] [ Slayers ]         Anithone     Lord             (Recruiter)
[51 Tra] [ Black Robes ]     Evary        Archmagus        (Recruiter)
[51 Asn] [ Chaos ]           Enduriel     Corrupted       
[51 War] [ Slayers ]         Sivle        Slayer          
[51 Tra] [ Red Robes ]       Carthus      Archmagus        (Recruiter)
[51 Dru] [ Bloodlust ]       Faxxor       Underlord        (Recruiter)
And the output from the mud I use to highlight from:

Code: Select all

Players near you:
Kylanthys                       Deep Within The Forest
Faxxor                          Deep Within The Forest
And what my code translates that to be (colors):
Players near you:
[SH]Kylanthys Deep Within The Forest
(WAR)[BL]Faxxor Deep Within The Forest

Output aligned properly:

Code: Select all

Players near you:
     [SH]Kylanthys                       Deep Within The Forest
(WAR)[BL]Faxxor                          Deep Within The Forest

Post Reply