View difference between Paste ID: 8YcGFwCM and 7JbmBgk1
SHOW: | | - or go back to the newest paste.
1
import com.mythicscape.batclient.interfaces.*;
2
import java.util.regex.*;
3
import java.util.ArrayList;
4
import java.text.*;
5
import java.awt.font.TextAttribute;
6
7
SCRIPT_NAME = "destroyer";
8
9
Color light_weight = new Color(255,255,255);
10
Color light_blue = new Color(0,0,255);
11
Color light_green = new Color(0,255,0);
12
Color light_cyan = new Color(0,255,255);
13
Color light_red = new Color(255,0,0);
14-
Color light_magenta = new Color(255,0,255);
14+
Color light_magenta = new Color(225,0,255);
15
Color light_yellow = new Color(255,255,0);
16
Color blue = new Color(0,0,127);
17
Color white = new Color(195,195,195);
18
Color green = new Color(0,127,0);
19
Color cyan = new Color(0,127,127);
20
Color red = new Color(127,0,0);
21
Color magenta = new Color(127,0,127);
22
Color yellow = new Color(127,127,0);
23
Color black = new Color(0,0,0);
24
25
// Change here the colours for regmons and aggrmons if you are using a different ansi setting
26
// ansi list
27
Color regmons = light_green;
28
Color aggrmons = light_red;
29
//
30
31
Pattern p_danger;
32
ParsedResult pr;
33
34
void bootup()
35
{
36
   ArrayList l = new ArrayList();
37
   l.add(new ParsedAttribute(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD, 9,22));
38
   l.add(new ParsedAttribute(TextAttribute.FOREGROUND, new Color(0xFFFFFF),9,22));
39
   l.add(new ParsedAttribute(TextAttribute.BACKGROUND, new Color(0x800080),9,22));
40
   pr = new ParsedResult("         >>>DANGER<<<<\n",l);
41
42
   p_danger = Pattern.compile("^(" +
43
   "a big mummy is bashing around with his sword \\(undead\\)" +
44
//   "|Mortis stands here behind the desk \\(almost undead\\)" +  // mostly harmless, just for testing
45
   "|a gray beholder is floating here \\(evil\\)" +
46
   "|a green beholder is floating here \\(nasty\\)" +
47
   "|Warl Su, the jailed samurai" +
48
   "|Edward Amberley, the family priest" +
49
   "|Grandmother Elizabeth Amberley" +
50
   "|Gilljam, elite soldier and universal beauty" +
51
   "|Aviel, commander of the imperial elite forces" +
52
   "|Erik Fzurrp-Fjongabolos, the Auctioneer" +
53
   "|Doc the Bank Robber" +
54
   "|Greedy the Bank Robber" +
55
   "|Lefty the Bank Robber" +
56
   "|Netrunner the Bank Robber" +
57
   "|Righty the Bank Robber" +
58
   "|Sleazy the Bank Robber" +
59
   "|Smelly the Bank Robber" +
60
   "|Sneezy the Bank Robber" +
61
   "|Sarah Greenpond the old widow" +
62
   "|Walith Kediralath, trying to hide in the shadows" +
63
   "|an infernal knight vowed to guard the vault \\(undead\\)" +
64
   "|a dark shade of a corrupted paladin \\(undead\\)" +
65
   "|a pile of gold coins nudges closer" +
66
   "|Elven chef preparing dinner" +
67
   "|Rudolf the smith" +
68
   "|Petrus the very quiet Donaru librarian" +
69
   "|This is the hillgiant's wife,she is drawing water from the well" +
70
   "|There is a very old man with shiny white oozing eyes" +
71
   "|The queen is pacing around, looking for something to do" +
72
   "|Dark Knight is grinning here" +
73
   "|Odo, the brave hunter" +
74
   "|Kizarwexius the moondragon sways above you, smoke rising from her nostrils and acid dripping from her fangs" +
75
   "|Dag Dag Schwingenator, ruler of Magerathia" +
76
   "|Melcross, the deadly demon leader" +
77
   "|Zeltjin the head warlock of Tiamat" +
78
   "|Pelitar the old retired village wizard" +
79
   "|Julius, the king of the castle" +
80
   "|\\(smoke demon\\)" +
81
   "|Molly, Despana's little bundle of joy" +
82
   "|Pedro, Despana's pride and joy" +
83
   "|Icalia, the ice demon" +
84
   "|Alena, the acquisitionist" +
85
   "|A small impish demon" +
86
   "|Ditianna, the bride of Tomtor" +
87
   "|Reddist the lord of Reavers" +
88
   "|The Master Sorcerer of the Temple of Sarku is meditating here." +
89
   "|the wight of Dentirion \\(evil\\) (undead)" +
90
   "|a spherical floating beast with one gigantic eye is gazing at you" +
91
   "|an ethereal being is silently hovering in the air" +
92
   "|the captain of a ship" +
93
   "|The High Priestess of the temple" +
94
   "|An urvile loremaster is preparing to crush the resistance" +
95
   "|Elder Petron has rallied some defenders" +
96
   "|a nasty looking witch" +
97
   "|The boatman of the River Styx" +
98
   "|A Gray Slaad-Lord is hopping around here \\(undead\\)" +
99
   "|A HUGE lizardman torturer is here, attacking YOU!" +
100
   "|A man wearing a white coat sits behind a desk" +
101
   "|A middle-aged nurse stands here waiting for you" +
102
   "|A young, fresh out of school medic stands here" +
103
   "|A old comfortable looking woman is looking at you" +
104
   "|A old lecherous doctor, reminds you of someone from old Vienna" +
105
   "|Lacramobo the rentkeeper leans against a desk looking bored" +
106
   "|Morden the Shadowman" +
107
   "|Galigord the slightly overweight rentkeeper is on his break" +
108
   "|The Master of the Arena, a humanoid giving off a black aura" +
109
   "|The Demilich Ogaitnas Iuqnarf" +
110
   "|An ancient lich stares at you with hatred \\(undead\\)" +
111
   "|Krystanimyth, the Dreaded Dracolich, the Ever Dragon" +
112
   "|the supreme urvile loremaster rests in his cave" +
113
   "|Bzata, the psionlic \\(undead\\)" +
114
   "|Tulanic, the gatelic \\(undead\\)" +
115
   "|Urutmatium, the darklich \\(undead\\)" +
116
   "|Treumaturan, the deathlich \\(undead\\)" +
117
   "|An old-looking hermit" +
118
   "|The high Lord Despana" +
119
   "|Gotryt the mighty lich king stands here \\(undead\\)" +
120
   "|Zifnab's Gigantic Dragon" +
121
   "|Chesire the rentkeeper is purring silently here" +
122
   "|The Beholder, the Warden, 'Grrzzaaah' of Prison complex" +
123
   "|A large sperical beholder hovers here" +
124
   "|Killusia, the mistress of pain and misery" +
125
   "|A handsome ghostly humanoid is hovering over here \\(undead\\)" +
126
   "|A beautiful ghostly humanoid hovers over here. \\(undead\\)" +
127
   "|The Zhentorian Captain is planning here" +
128
   "|a shy leopard-furred catfolk walks by very slowly" +
129
   "|A robed drow is standing here calmly" +
130
   "|Ceche the neuter Gatekeeper of the mansion" +
131
   "|an orc in ceremonial garb stands here" +
132
   "|Puff of fiery smoke" +
133
   "|A Cloak Enshrouded Figure Blocks the Stairway" +
134
   "|Skeleton guard clad in heavy armour" +
135
   "|A pitfiend grinning wickedly at your misery" +
136
   "|A pitfiend-king is lolling and wobbling raunchily here at your misery" +
137
   "|fire elemental" +
138
   "|The Lizardman Captain is here, attacking YOU" +
139
   "|Axidia, Master of undeads" +
140
   "|A minion of Axidia tries to steal your soul \\(undead\\)" +
141
   "|a dark figure of a knight enveloped by darkness \\(undead\\)" +
142
   "|a Mob" +
143
   "|Alena, the acquisitionist" +
144
   "|A small orc is hiding in the shadows, trying to steal something" +
145
   "|A meanie guenon digging the bones" +
146
   "|Liezeb the druid" +
147
   "|Ninja's \\(various colours\\)" + // possible broken
148
   "|Reverend B'zarre, former highpriest of the Twilight \\(undead\\)" +
149
   "|Trilloch Haz-gon the grey Elf" +
150
   "|A jumper from the sphere of time" +
151
   "|Rogue" +
152
   "|Baaz Draconian" +
153
   ")");
154
}
155
156
157
158
public ParsedResult trigger() {
159
String line = argument.getStrippedText();
160
if(line.length() == 0) return argument;
161
line = line.substring(0,line.length()-1);
162
163
ArrayList attrs = argument.getAttributes();
164
   if(!line.startsWith("'") && (attrs.get(0).getValue().equals(regmons) || attrs.get(0).getValue().equals(aggrmons)))
165
   {
166
   Matcher m_danger = p_danger.matcher(line);
167
   if(m_danger.find()) {
168
   clientGUI.printAttributedStringToWindow("Generic",pr,false);
169
   }
170
   }
171
return argument;
172
}