7331337 Posted February 25, 2015 Share Posted February 25, 2015 (edited) 25 minute hacked together Pest Control Script for getting points. Don't hate on how bad it is, I know how bad it is so if you want a better one code it yourself or buy one. (You'll make a much better one if you add randomized pathing, style switching, pray toggling, etc which is why this really badly written one is public) This is what you can expect; - It to get enough damage done if you're a decent level 98% of the time - Not bugging out - So bot-like its a joke - A ban if you use suicide with this and don't manually do a few games every 40-50 runs... What you need to know; - It doesn't spend points - It's a horrible script (Go code your own it'll be better due to the fact this took me under 15 mins to write) That being said here you go; http://multiupload.biz/1ntoz15xlj0i/herpderpPestControl_MultiUpload.biz.jar.html Horrible code; import org.osbot.rs07.api.Interfaces; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.Message; import org.osbot.rs07.api.ui.Message.MessageType; import org.osbot.rs07.script.MethodProvider; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.util.Random; @ScriptManifest( author = "54b3ew5vw", info = "PestControl test herp derp", name = "PestControl Afker B", version = 0, logo = "") public class main extends Script { // Npc names String[] pestControlMonsters = {"Brawler","Defiler","Ravager","Shifter","Spinner","Torcher"}; boolean areWeInBoat, didWeArrive, didWeFinish = false; int okset = 0; String status = "Nothing"; //int[] pestControlStarter = {1,2,3,4}; //int[] pestControlMiddle = {10339,1630}; //int[] pestControlBoat1 = {2260,2643,2263,2638}; //int[] pestControlBoat2 = {2637,2647,2641,2642}; //int[] pestControlBoat3 = {2632,2654,2635,2649}; @Override public void onStart() { log("============================="); log("= Starting pest control bot ="); log("============================="); getBot().addMessageListener(this); } private enum State { BOATING, WAITING, MOVING, FINDINGTARGET, KILLING, CAMERAMOVE, MICROWAIT; }; private State getState() { NPC findEnemy = npcs.closest(pestControlMonsters); RS2Object findCauldron = objects.closest("Cauldron"); RS2Object findPlank = objects.closest("Gangplank"); //RS2Object findPlank = objects.closest(9999).getX; if(areWeInBoat == true && findCauldron != null && findPlank != null){ status = "Waiting"; return State.WAITING; } if(findCauldron == null && findPlank == null) { areWeInBoat = false; okset = objects.closest("Lander boat").getY() - myPlayer().getY(); //log (objects.objects.closest("Lander boat").getY()); //log (myPlayer().getY()); if(objects.closest("Lander boat").getY() - myPlayer().getY() < 10){ status = "Moving"; return State.MOVING; } } if (areWeInBoat == false && myPlayer().getY() < 3000 && findPlank != null){ status = "Entering boat"; return State.BOATING; } if (findEnemy != null && !myPlayer().isAnimating() && !myPlayer().isMoving() && !myPlayer().isUnderAttack() && myPlayer().getInteracting() == null){ status = "Finding Target"; return State.FINDINGTARGET; } if (myPlayer().isAnimating() || myPlayer().isUnderAttack() || myPlayer().isMoving() || myPlayer().getInteracting() != null){ status = "Killing"; return State.KILLING; } status = "MicroWaiting"; return State.MICROWAIT; } //@Override //public int onLoop() throws InterruptedException { // NPC findEnemy = npcs.closest(pestControlMonsters); // if (findEnemy != null){ // if (!myPlayer().isAnimating() && !myPlayer().isMoving() && !myPlayer().isUnderAttack() && myPlayer().getInteracting() == null){ // findEnemy.interact("Attack"); // sleep(random(1000, 5000)); // } // } // return random(100, 1000); //} public void onMessage(Message message) { if (message.getType() == MessageType.GAME) { try { if (message.getMessage().contains("You board the lander") || message.getMessage().contains("can't reach that!")) { areWeInBoat = true; } else { // Do nothing } } catch (Exception e) { e.printStackTrace(); } } } @Override public int onLoop() throws InterruptedException { switch (getState()) { case WAITING: sleep(random(300, 750)); //log ("Waiting"); break; case MICROWAIT: sleep(random(10, 100)); break; case BOATING: objects.closest("Gangplank").interact("Cross"); sleep(random(750, 1250)); //log ("Entering boat"); break; case MOVING: int newX = myPlayer().getX() + random(0, 18) - 9; int newY = myPlayer().getY() - random(15, 25); //Position baseObject = objects.closest(9999).getPosition(); //Position towerLeft = new Position((baseObject.getX() - 14), (baseObject.getY() + 14), 0); //Position towerRight = new Position((baseObject.getX() + 11), (baseObject.getY() + 14), 0); //Position towerTopLeft = new Position((baseObject.getX() - 11), (baseObject.getY() + 29), 0); //Position towerTopRight = new Position((baseObject.getX() + 8), (baseObject.getY() + 29), 0); //Position[] newLocation = {new Position(newX, newY, 0)}; if (map.canReach(new Position(newX, newY, 0)) && myPlayer().isMoving() == false){ log("Location; " + newX +"," + newY + ",0"); localWalker.map.walk(newX, newY); log("attempt click"); sleep(random(1000, 1750)); } else { sleep(random(100, 1000)); } break; case FINDINGTARGET: NPC findEnemy = npcs.closest(pestControlMonsters); NPC findPortal = npcs.closest("Portal"); if (findPortal != null && findPortal.isAttackable()){ findEnemy.interact("Attack"); sleep(random(300, 2500)); break; } if (findEnemy != null && findEnemy.isAttackable()){ findEnemy.interact("Attack"); sleep(random(300, 2500)); } else { sleep(random(350, 1250)); } //log("Finding target"); break; case KILLING: sleep(random(500, 3000)); //log("Killing"); break; } return random(200, 800); } @Override public void onExit() { log("YoloSwagAFk"); } @Override public void onPaint(Graphics2D g) { g.drawString("Status: " + status, 200, 328); g.drawString("y difference " + okset, 200, 300); } } Edited February 25, 2015 by 7331337 6 Link to comment Share on other sites More sharing options...
Shit Posted February 25, 2015 Share Posted February 25, 2015 oh man it cant be that bad Link to comment Share on other sites More sharing options...
aistucha Posted February 25, 2015 Share Posted February 25, 2015 I really check it out, because I dont believe that this is that bad ) Link to comment Share on other sites More sharing options...
Novak Posted February 25, 2015 Share Posted February 25, 2015 the jar is clean Link to comment Share on other sites More sharing options...
Yish Posted February 25, 2015 Share Posted February 25, 2015 Amazing Link to comment Share on other sites More sharing options...
Oliver Posted February 25, 2015 Share Posted February 25, 2015 Lol, I did not expect that. After using it for 5hours straight, I have to say that this is the best pest control script I have ever used before. Not sure what you have done but it is extreme fast and flawless. Sure it has no anti ban, world hopping or a paint, however, for my needs it is perfect. Thank you! 1 Link to comment Share on other sites More sharing options...
dslayer Posted March 11, 2015 Share Posted March 11, 2015 seems to be doing pretty well so far, you got some talent to script something so quick man. good job. thanks alot Link to comment Share on other sites More sharing options...
Roshe Posted April 1, 2015 Share Posted April 1, 2015 This is such a flawless script. Over 1k+ points and no ban, and zero problems. Beautiful. Link to comment Share on other sites More sharing options...
kjloveday Posted April 7, 2015 Share Posted April 7, 2015 (edited) Excellent Script, did it for around 5-6 hours and it's perfect, sometimes it stands still but it will eventually click a npc, Nice work! Edited April 8, 2015 by kjloveday Link to comment Share on other sites More sharing options...
trey029 Posted April 18, 2015 Share Posted April 18, 2015 88-95 range on a pure with this =D Link to comment Share on other sites More sharing options...
yomuju Posted April 21, 2015 Share Posted April 21, 2015 Just got a 2 day ban after using this. Was working fine, but you really do have to babysit it. I think the reason I got the ban was because I stupidly decided that I wanted to run two bots at the same time today, so I had one fishing and the other one doing pc. After about an hour of running I checked up to see that the pc bot had gotten the ban, yet strangely my fisher was still going fine. Anyways, it does what it is supposed to do. Nothing special, but gets the job done. If you're willing to check up on it every hour or two, you should get your void in no time. Link to comment Share on other sites More sharing options...
Hermitrage Posted April 23, 2015 Share Posted April 23, 2015 I like the honesty.. Link to comment Share on other sites More sharing options...
Edis Posted April 23, 2015 Share Posted April 23, 2015 well ive used this script 5 days now and its not as bad as u say at all lol. about 8-12hrs a day no bans using mirror client just wanted to tell you thanks, and nice job Link to comment Share on other sites More sharing options...
creationx Posted April 24, 2015 Share Posted April 24, 2015 Lol this guy suddenly takes out the competition. Thanks for the release my brother. Link to comment Share on other sites More sharing options...
Roshe Posted May 22, 2015 Share Posted May 22, 2015 SUCH A FUCKING BEAUTIFUL SCRIPT. Link to comment Share on other sites More sharing options...