Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.71 KB | None | 0 0
  1. import java.awt.*;
  2. import java.util.*;
  3. import java.io.IOException;
  4. import org.rsbot.event.listeners.*;
  5. import org.rsbot.script.Script;
  6. import org.rsbot.script.ScriptManifest;
  7. import org.rsbot.script.methods.*;
  8. import org.rsbot.script.wrappers.*;
  9. import org.rsbot.script.util.Timer;
  10.  
  11. @ScriptManifest (authors = "WarLord Burn (Kieren Boal)", name = "Clan Chat Destroyer", description = "Spam phrase in notes. Clans to spam in ignore list.", version = 3.0)
  12.  
  13. public class CCDestroyer extends Script implements PaintListener{
  14.  
  15. String List[] = {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""};
  16. String Clans[] = {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""};
  17. String toSay, Status;
  18.  
  19. int Length, ClanLength, ClanCurr, ListNum, ListCurr, Added, AddHr, Spammed, SpamHr, ClansVisited, ClanHr, waitTimer, iSleep;
  20.  
  21. long startTime;
  22.  
  23. public boolean onStart() {
  24. Status="Starting up!";
  25. game.openTab(Game.TAB_NOTES);
  26. toSay=interfaces.getComponent(34,9).getComponents()[0].getText();
  27. log.severe("Spamming: "+toSay);
  28. mouse.click(564,488, true);
  29. mouse.click(725,457, true);
  30. ClanLength=interfaces.getComponent(551,1).getComponents().length;
  31. ClanLength=ClanLength/2;
  32. ListNum=-2;
  33. for (int i=0; i<ClanLength; i++){
  34. ListNum+=2;
  35. Clans[ListCurr]=interfaces.getComponent(551,1).getComponents()[ListNum].getText();
  36. ListCurr++;
  37. }
  38. log.severe("Spamming: "+ClanLength+" clans!");
  39. game.openTab(Game.Tab.FRIENDS_CHAT);
  40. mouse.click(557,454, true);
  41. startTime = System.currentTimeMillis();
  42. return true;
  43. }
  44.  
  45. public void onFinish() {
  46. log.severe("--WarLord Burn's Clan Chat Destroyer 3.0--");
  47. log("Spammed "+Spammed+" players at "+SpamHr+" players an hour.");
  48. log("Added "+Added+" players at "+AddHr+" players an hour.");
  49. log("Visited "+ClansVisited+" clans at "+ClanHr+" clans an hour.");
  50. env.saveScreenshot(true);
  51. }
  52.  
  53. public int loop() {
  54. Status="Joining...";
  55. mouse.setSpeed(-1);
  56. keyboard.sendTextInstant(Clans[ClanCurr],true);
  57. ClanCurr++;
  58. ClansVisited++;
  59. if (ClanCurr>=ClanLength) {ClanCurr=0;}
  60. keyboard.sendTextInstant(Clans[ClanCurr],true);
  61. waitTimer=0;
  62. while (interfaces.getComponent(589,9).getComponents().length==0) {
  63. sleep(10);
  64. waitTimer++;
  65. if (waitTimer>1000) {
  66. mouse.click(595,445,true);
  67. ClanCurr++;
  68. ClansVisited++;
  69. if (ClanCurr>=ClanLength) {ClanCurr=0;}
  70. keyboard.sendTextInstant(Clans[ClanCurr],true);
  71. waitTimer=0;
  72. log.severe("Clan Chat was full... FailSafe();");
  73. }
  74. }
  75. Status="Joined "+Clans[ClanCurr]+"!";
  76. Length=interfaces.getComponent(589,9).getComponents().length;
  77. Length=Length/3;
  78. ListCurr=0;
  79. ListNum=-3;
  80. for (int i=0; i<Length; i++){
  81. ListNum+=3;
  82. int TextureCheck=ListNum+2;
  83. if (interfaces.getComponent(589,9).getComponents()[TextureCheck].getBackgroundColor()==- 1) {
  84. if (interfaces.getComponent(589,9).getComponents()[ListNum].getText().contains(" mod ")) {log.severe("Found a JaGeX Mod: "+interfaces.getComponent(589,9).getComponents()[ListNum].getText().replaceAll(" ","")+"!");}
  85. List[ListCurr]=interfaces.getComponent(589,9).getComponents()[ListNum].getText(). replaceAll(" ","");} else {
  86. if (interfaces.getComponent(589,9).getComponents()[ListNum].getText().contains(" mod ")) {log.severe("Found a JaGeX Mod: "+interfaces.getComponent(589,9).getComponents()[ListNum].getText().replaceAll(" ","")+"!");}
  87. log("Didn't add ranked player "+interfaces.getComponent(589,9).getComponents()[ListNum].getText().replaceAll(" ","")+".");}
  88. ListCurr++;
  89. }
  90. mouse.click(true);
  91. mouse.click(564,488, true);
  92. mouse.move(559,459);
  93. for (int i=0; i<Length; i++){
  94. mouse.click(true);
  95. keyboard.sendTextInstant(List[i],true);
  96. Status="Adding player "+List[i]+"!";
  97. Added++;
  98. sleep(2);
  99. }
  100. iSleep=Length*75;
  101. Status="Waiting "+(iSleep/1000)+" second(s)...";
  102. sleep(iSleep);
  103. while (interfaces.getComponent(550,2).getComponents().length>3) {
  104. mouse.move(560,240);
  105. if (!interfaces.getComponent(550,2).getComponents()[2].getText().contains(" Off")) {
  106. Status="Spamming!";
  107. mouse.click(true);
  108. keyboard.sendTextInstant(toSay,true);
  109. Spammed++;
  110. sleep(250);
  111. }
  112. mouse.click(false);
  113. Status="Deleteing!";
  114. mouse.move(560,300);
  115. mouse.click(true);
  116. }
  117. game.openTab(game.TAB_FRIENDS_CHAT);
  118. return 1;
  119. }
  120.  
  121. public void onRepaint(Graphics g) {
  122. long millis = System.currentTimeMillis() - startTime;
  123. long hours = millis / (1000 * 60 * 60);
  124. millis -= hours * (1000 * 60 * 60);
  125. long minutes = millis / (1000 * 60);
  126. millis -= minutes * (1000 * 60);
  127. long seconds = millis / 1000;
  128.  
  129. g.setColor(new Color(0,255,0));
  130. Point M = mouse.getLocation();
  131. g.fillRect(M.x-10,M.y-2,20,4);
  132. g.fillRect(M.x-2,M.y-10,4,20);
  133. g.setColor(new Color(0,0,0));
  134. g.fillRect(7,459,506,14);
  135. g.setColor(new Color(203,186,153));
  136. g.fillRect(7,345,506,115);
  137.  
  138. AddHr = (int) ((Added * 3600000D) / (System.currentTimeMillis() - startTime));
  139. SpamHr = (int) ((Spammed * 3600000D) / (System.currentTimeMillis() - startTime));
  140. ClanHr = (int) ((ClansVisited * 3600000D) / (System.currentTimeMillis() - startTime));
  141. g.setColor(new Color(0,0,0));
  142. g.drawString("WarLord Burn's Clan Chat Destroyer v3.0 - Time running: "+hours+":"+minutes+":"+seconds,12,360);
  143. g.drawString("Spammed "+Spammed+" players, Spamming "+SpamHr+" players an hour.", 12, 400);
  144. g.drawString("Added "+Added+" players, Adding "+AddHr+" players an hour.", 12, 420);
  145. g.drawString("Visited "+ClansVisited+" clans, Visiting "+ClanHr+" clans an hour.", 12, 440);
  146. g.setColor(new Color(255,255,255));
  147. g.drawString("Status: "+Status, 8, 471);
  148. }
  149. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement