Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.42 KB | None | 0 0
  1. import xobot.client.events.MessageEvent;
  2. import java.text.NumberFormat;
  3. import java.util.Locale;
  4. import java.awt.Color;
  5. import java.awt.Graphics;
  6. import xobot.script.wrappers.interactive.GameObject;
  7. import xobot.script.wrappers.interactive.GroundItem;
  8. import xobot.script.wrappers.interactive.Item;
  9. import xobot.script.wrappers.interactive.NPC;
  10. import xobot.script.wrappers.interactive.Player;
  11. import xobot.script.methods.NPCs;
  12. import xobot.script.methods.Bank;
  13. import xobot.script.methods.GameObjects;
  14. import xobot.script.methods.GroundItems;
  15. import xobot.script.methods.tabs.Inventory;
  16. import xobot.script.methods.tabs.Skills;
  17. import xobot.script.util.Filter;
  18. import xobot.script.util.Time;
  19. import xobot.script.methods.Players;
  20. import xobot.script.methods.Shop;
  21. import xobot.script.methods.Packets;
  22. import xobot.script.methods.Widgets;
  23. import xobot.script.methods.Walking;
  24. import xobot.script.util.Timer;
  25. import xobot.script.Manifest;
  26. import xobot.client.callback.listeners.MessageListener;
  27. import xobot.client.callback.listeners.PaintListener;
  28. import xobot.script.ActiveScript;
  29. import xobot.script.wrappers.Tile;
  30.  
  31. @Manifest(authors = { "Simmy" }, name = "Universal Skeleton Horrors", description = "Will Automatically Kill Skeleton Horrors!", version = 1.01)
  32. public class SimmysBoxes extends ActiveScript implements PaintListener, MessageListener{
  33.  
  34. private Timer timer;
  35. private static final Tile SafeSpot = new Tile(3313, 3671, 0);
  36. public static boolean Target = false;
  37. public static int Used = 0;
  38. public static int Won = 0;
  39. public static int Kills = 0;
  40.  
  41. private static final String[] STAFF = {
  42. "Daan",
  43. "Maurits",
  44. "Dupe Force 2",
  45. "Huzaa3",
  46. "Nickrock234",
  47. "Oldest Nite",
  48. "Mims7099",
  49. "Teh Pedobear",
  50. "Nolan",
  51. "Huzaa1",
  52. "Miranda Kerr",
  53. "Mike",
  54. "Eater",
  55. "Herrodragon",
  56. "Stefan",
  57. };
  58.  
  59. String status = "We Are Currently Starting The Script Up; Please Kick Back And Relax!";
  60. public boolean onStart() {
  61. this.timer = new Timer();
  62. return true;
  63. }
  64.  
  65. @Override
  66. public void MessageRecieved(MessageEvent message) {
  67. if (message.getMessage().contains("HORROR kill")) {
  68. Kills += 1;
  69. }
  70. if (message.getMessage().contains("next hit is")) {
  71. Target = true;
  72. }
  73. }
  74.  
  75.  
  76. @Override
  77. public void repaint(Graphics g) {
  78. int KPH = (int) (Kills * 3600000.0D / this.timer.getElapsed());
  79. g.setColor(Color.WHITE);
  80. g.drawString("Status: " + status, 15, 235);
  81. g.drawString("Runtime: " + timer.toElapsedString(), 15, 250);
  82. g.drawString("Skeleton Horror Kills: " + Kills, 15, 265);
  83. g.drawString("Skeleton Horror Kills(P/Hour): " + NumberFormat.getNumberInstance(Locale.US).format(KPH), 15, 280);
  84. g.drawString("Universal Skeleton Horrors by Simmy", 170, 30);
  85. }
  86.  
  87. @Override
  88. public int loop() {
  89. //Add Variables Here;
  90. NPC Horror = NPCs.getNearest(9176);
  91. GameObject Rock = GameObjects.getNearest(114455);
  92. GameObject Chest = GameObjects.getNearest(3193);
  93. Item Food = Inventory.getItem(391);
  94. Item Loots = Inventory.getItem(1543, 1544, 1545, 1546, 1547, 1548, 5973, 19064, 19778, 18834, 299, 12539, 15126, 537, 18786, 19784, 19780, 22401, 9594, 26776);
  95. GroundItem Loot = GroundItems.getNearest(1543, 1544, 1545, 1546, 1547, 1548, 5973, 19064, 19778, 18834, 299, 12539, 15126, 537, 18786, 19784, 19780, 22401, 9594, 26776);
  96.  
  97. if(Rock != null) {
  98. if(Target == false & Players.getAll(STAFF) != null) {
  99. if(Skills.CONSTITUTION.getCurrentLevel() < 79 | Loots != null & Loot == null) {
  100. if(Food == null | Loots != null) {
  101. status = "We Are Quickly Teleporting To The Bank Area!";
  102. Packets.sendAction(315, 6, -1, 26494);
  103. Time.sleep(() -> Chest != null, 6500);
  104. }
  105. if(Food != null & Loots == null) {
  106. status = "We Are Quickly Eating A Manta Ray!";
  107. Food.interact("Eat");
  108. Time.sleep(1500);
  109. }
  110. }
  111.  
  112. if(Loot != null) {
  113. status = "We Are Quickly Looting The Items Dropped From Skeleton Horror!";
  114. Loot.interact("Take");
  115. Time.sleep(1500);
  116. }
  117.  
  118. if(Loots == null & Loot == null) {
  119. if(SafeSpot.getDistance() > 0) {
  120. status = "We Are Walking To The Safe Spot For Skeleton Horror!";
  121. SafeSpot.walk();
  122. Time.sleep(1500);
  123. }
  124.  
  125. if(SafeSpot.getDistance() == 0 & Food != null) {
  126. if(Skills.CONSTITUTION.getCurrentLevel() > 80) {
  127. if(Horror == null & SafeSpot.getDistance() == 0) {
  128. status = "We Are Waiting For The Skeleton Horror To Respawn!";
  129. SafeSpot.walk();
  130. Time.sleep(() -> Horror != null, 3500);
  131. }
  132. if(Horror != null & Players.getMyPlayer().getAnimation() == -1) {
  133. status = "We Are Attempting To Attack The Skeleton Horror!";
  134. Horror.interact("Attack");
  135. Time.sleep(350);
  136. }
  137. if(Horror != null & Players.getMyPlayer().getAnimation() == 426) {
  138. status = "We Are Currently Attacking The Skeleton Horror!";
  139. Time.sleep(4000);
  140. }
  141. }
  142. }
  143. }
  144. }
  145. if(Target == true | Players.getAll() != null) {
  146. status = "We Are Teleporting Back To The Bank(Pkers Are Around!)";
  147. Packets.sendAction(315, 6, -1, 26494);
  148. Time.sleep(8500, 10000);
  149. Target = false;
  150. }
  151. }
  152.  
  153. if(Chest != null) {
  154. if(Inventory.isFull() | Food == null | Loots != null) {
  155. if(Widgets.getOpenInterface() == -1) {
  156. status = "We Are Opening The Bank Chest!";
  157. Chest.interact("Open");
  158. Time.sleep(() -> Widgets.getOpenInterface() == 5292, 3000);
  159. }
  160. if(Widgets.getOpenInterface() == 5292) {
  161. if(Loots != null) {
  162. status = "We Are Banking Some Of Your Loots!";
  163. Bank.depositAllExcept(8013, 391);
  164. Time.sleep(() -> Loots == null, 1500);
  165. }
  166. if(Inventory.getFreeSlots() <= 4) {
  167. status = "We Are Depositing Your Stuff Into The Bank!";
  168. Bank.depositAllExcept(554, 556, 563);
  169. Time.sleep(() -> Inventory.getFreeSlots() >= 14, 1500);
  170. }
  171. if(Food == null) {
  172. status = "We Are Withdrawing A Few Manta Rays For Safety Reasons!";
  173. Bank.withdraw(391, 10);
  174. Time.sleep(() -> Food != null, 1500);
  175. }
  176. }
  177. }
  178.  
  179. if(Horror == null & Rock == null & Food != null & Inventory.getFreeSlots() >= 14) {
  180. status = "We Are Teleporting Back To The Skeleton Horror!";
  181. Packets.sendAction(315, 5, -1, 26318);
  182. Time.sleep(() -> Rock != null, 6500);
  183. }
  184. }
  185. return 25;
  186. }
  187. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement