Guest User

Untitled

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