Advertisement
Guest User

Untitled

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