Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.util.*;
- import java.io.IOException;
- import org.rsbot.event.listeners.*;
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.methods.*;
- import org.rsbot.script.wrappers.*;
- import org.rsbot.script.util.Timer;
- @ScriptManifest (authors = "WarLord Burn (Kieren Boal)", name = "Clan Chat Destroyer", description = "Spam phrase in notes. Clans to spam in ignore list.", version = 3.0)
- public class CCDestroyer extends Script implements PaintListener{
- String List[] = {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""};
- String Clans[] = {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""};
- String toSay, Status;
- int Length, ClanLength, ClanCurr, ListNum, ListCurr, Added, AddHr, Spammed, SpamHr, ClansVisited, ClanHr, waitTimer, iSleep;
- long startTime;
- public boolean onStart() {
- Status="Starting up!";
- game.openTab(Game.TAB_NOTES);
- toSay=interfaces.getComponent(34,9).getComponents()[0].getText();
- log.severe("Spamming: "+toSay);
- mouse.click(564,488, true);
- mouse.click(725,457, true);
- ClanLength=interfaces.getComponent(551,1).getComponents().length;
- ClanLength=ClanLength/2;
- ListNum=-2;
- for (int i=0; i<ClanLength; i++){
- ListNum+=2;
- Clans[ListCurr]=interfaces.getComponent(551,1).getComponents()[ListNum].getText();
- ListCurr++;
- }
- log.severe("Spamming: "+ClanLength+" clans!");
- game.openTab(Game.Tab.FRIENDS_CHAT);
- mouse.click(557,454, true);
- startTime = System.currentTimeMillis();
- return true;
- }
- public void onFinish() {
- log.severe("--WarLord Burn's Clan Chat Destroyer 3.0--");
- log("Spammed "+Spammed+" players at "+SpamHr+" players an hour.");
- log("Added "+Added+" players at "+AddHr+" players an hour.");
- log("Visited "+ClansVisited+" clans at "+ClanHr+" clans an hour.");
- env.saveScreenshot(true);
- }
- public int loop() {
- Status="Joining...";
- mouse.setSpeed(-1);
- keyboard.sendTextInstant(Clans[ClanCurr],true);
- ClanCurr++;
- ClansVisited++;
- if (ClanCurr>=ClanLength) {ClanCurr=0;}
- keyboard.sendTextInstant(Clans[ClanCurr],true);
- waitTimer=0;
- while (interfaces.getComponent(589,9).getComponents().length==0) {
- sleep(10);
- waitTimer++;
- if (waitTimer>1000) {
- mouse.click(595,445,true);
- ClanCurr++;
- ClansVisited++;
- if (ClanCurr>=ClanLength) {ClanCurr=0;}
- keyboard.sendTextInstant(Clans[ClanCurr],true);
- waitTimer=0;
- log.severe("Clan Chat was full... FailSafe();");
- }
- }
- Status="Joined "+Clans[ClanCurr]+"!";
- Length=interfaces.getComponent(589,9).getComponents().length;
- Length=Length/3;
- ListCurr=0;
- ListNum=-3;
- for (int i=0; i<Length; i++){
- ListNum+=3;
- int TextureCheck=ListNum+2;
- if (interfaces.getComponent(589,9).getComponents()[TextureCheck].getBackgroundColor()==- 1) {
- if (interfaces.getComponent(589,9).getComponents()[ListNum].getText().contains(" mod ")) {log.severe("Found a JaGeX Mod: "+interfaces.getComponent(589,9).getComponents()[ListNum].getText().replaceAll(" ","")+"!");}
- List[ListCurr]=interfaces.getComponent(589,9).getComponents()[ListNum].getText(). replaceAll(" ","");} else {
- if (interfaces.getComponent(589,9).getComponents()[ListNum].getText().contains(" mod ")) {log.severe("Found a JaGeX Mod: "+interfaces.getComponent(589,9).getComponents()[ListNum].getText().replaceAll(" ","")+"!");}
- log("Didn't add ranked player "+interfaces.getComponent(589,9).getComponents()[ListNum].getText().replaceAll(" ","")+".");}
- ListCurr++;
- }
- mouse.click(true);
- mouse.click(564,488, true);
- mouse.move(559,459);
- for (int i=0; i<Length; i++){
- mouse.click(true);
- keyboard.sendTextInstant(List[i],true);
- Status="Adding player "+List[i]+"!";
- Added++;
- sleep(2);
- }
- iSleep=Length*75;
- Status="Waiting "+(iSleep/1000)+" second(s)...";
- sleep(iSleep);
- while (interfaces.getComponent(550,2).getComponents().length>3) {
- mouse.move(560,240);
- if (!interfaces.getComponent(550,2).getComponents()[2].getText().contains(" Off")) {
- Status="Spamming!";
- mouse.click(true);
- keyboard.sendTextInstant(toSay,true);
- Spammed++;
- sleep(250);
- }
- mouse.click(false);
- Status="Deleteing!";
- mouse.move(560,300);
- mouse.click(true);
- }
- game.openTab(game.TAB_FRIENDS_CHAT);
- return 1;
- }
- public void onRepaint(Graphics g) {
- long millis = System.currentTimeMillis() - startTime;
- long hours = millis / (1000 * 60 * 60);
- millis -= hours * (1000 * 60 * 60);
- long minutes = millis / (1000 * 60);
- millis -= minutes * (1000 * 60);
- long seconds = millis / 1000;
- g.setColor(new Color(0,255,0));
- Point M = mouse.getLocation();
- g.fillRect(M.x-10,M.y-2,20,4);
- g.fillRect(M.x-2,M.y-10,4,20);
- g.setColor(new Color(0,0,0));
- g.fillRect(7,459,506,14);
- g.setColor(new Color(203,186,153));
- g.fillRect(7,345,506,115);
- AddHr = (int) ((Added * 3600000D) / (System.currentTimeMillis() - startTime));
- SpamHr = (int) ((Spammed * 3600000D) / (System.currentTimeMillis() - startTime));
- ClanHr = (int) ((ClansVisited * 3600000D) / (System.currentTimeMillis() - startTime));
- g.setColor(new Color(0,0,0));
- g.drawString("WarLord Burn's Clan Chat Destroyer v3.0 - Time running: "+hours+":"+minutes+":"+seconds,12,360);
- g.drawString("Spammed "+Spammed+" players, Spamming "+SpamHr+" players an hour.", 12, 400);
- g.drawString("Added "+Added+" players, Adding "+AddHr+" players an hour.", 12, 420);
- g.drawString("Visited "+ClansVisited+" clans, Visiting "+ClanHr+" clans an hour.", 12, 440);
- g.setColor(new Color(255,255,255));
- g.drawString("Status: "+Status, 8, 471);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement