.:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

Discussion in 'Archives' started by MatthewGor123, Dec 1, 2008.

Thread Status:
Not open for further replies.
.:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.
  1. Unread #81 - Dec 24, 2008 at 1:57 PM
  2. wingereld
    Joined:
    Dec 18, 2008
    Posts:
    3
    Referrals:
    0
    Sythe Gold:
    0

    wingereld Newcomer

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Code:
    //Hope you enjoy the script i made.  Pretty simple and not 100% perfect but it works.
    //Credits go to Xhamolk and Last Man 3.  Of course also me, megaalgos.
    
    //Version 1.1 added deathWalk
    //Version 1.1 released
    //Version 1.2 fixed up door opener
    //Version 1.3 fixed the gate opener, and paint fixed by Xhamolk
    /*Version 1.4 fixed the chicken kill part for it to check if
    * my player is in combat and the chicken isnt in combat or
    * interacting with any other players.
    */
    //Version 1.5 added antiRandoms.
    import java.awt.*;
    import java.awt.event.KeyEvent;
    import java.util.*;
    
    
    import com.speljohan.rsbot.bot.Bot;
    import com.speljohan.rsbot.script.wrappers.*;
    import com.speljohan.rsbot.event.events.ServerMessageEvent;
    import com.speljohan.rsbot.event.listeners.PaintListener;
    import com.speljohan.rsbot.script.Script;
    import com.speljohan.rsbot.event.listeners.ServerMessageListener;
    
    
    public class KillChicken extends Script implements PaintListener,ServerMessageListener  {
    
        //Constructor
        public KillChicken(){
        }
            public double getVersion( ) {
                return( 1.5 );
            }
    
            public String getName( ) {
                return( "KillChicken" );
            }
    
            public String getAuthor( ) {
                return( "Megaalgos" );
            }
    
            public String getScriptCategory() {
                return( "Combat" );
            }
    
            public String getScriptDescription( ) {
                String html = "";
    
                html += "<html>\n";
                html += "<head>";
                html += "<style type=\"text/css\"> hr {color: white} p {margin-left: 21px} body {background-image: url(\"http://i263.photobucket.com/albums/ii140/megaalgos/ChickenNewRender-3.jpg\")}</style>";
                html += "<body>\n";
                html += "<h2>" + getName( ) + " v" + getVersion( ) + "</h2><br>\n";
                html += "Author: " + getAuthor( ) + "<br><br>\n";
                html += "--------------------------------------------------------------<b>Features:</b>This script works in lubridge above the sheep farm.  ";
                html += "______________________________________<input type=\"radio\" name=\"bone\" value=\"true\">Burry Bones?";
                html += "<input type=\"radio\" name=\"feather\" value=\"true\">Pick up Feathers?";
                html += "</center>\n";
    
                html += "</body>\n ";
                html += "</html\n";
                return( html );
            }
    
        //Ends
    
        //Fields
        public int bonesburried;
        public int FEATHER = 314;
        public int BoneID = 526;
        public int x = random(0, 750);
        public int y = random(0, 500);
        public int xx = random(710,554);
        public int yy = random(444,230);
        public int doorClosed =  36846;
        public int gateClosed = 36913;
        public int startattxp=0;
        public int startstrxp=0;
        public int startdefxp=0;
        public int curattxp=0;
        public int curstrxp=0;
        public int curdefxp=0;
        public int attxpgained=0;
        public int strxpgained=0;
        public int defxpgained=0;
        public int chickenskilled;
        public long startTime;
        public long lastCheck = 0;
        public boolean buryBones = false;
        public boolean pickFeathers = false;
        //Ends
    
        //Methods
        public RSTile[] deathWalk = new RSTile[] {
        new RSTile(3226, 3219), new RSTile(3234, 3219),
        new RSTile(3225, 3234), new RSTile(3222,3245),
        new RSTile(3216, 3258), new RSTile(3215, 3272),
        new RSTile(3204, 3278), new RSTile(3195, 3280),
        new RSTile(3189, 3281)};
        public RSTilePath deathWalkPath =
            new RSTilePath(
                    deathWalk,
                this)
            ;
        RSTile[] runaway = new RSTile[] {
                new RSTile(3189, 3286), new RSTile(3189, 3297),
        };
        RSTilePath runaway1 = new RSTilePath(runaway, this);
    
        public RSTilePath toChickens = new RSTilePath(deathWalk, this);
    
        public boolean killchicken() {
                RSNPC chicken = getNearestFreeNPCByName("Chicken");
            if ((chicken != null) && !chicken.isInCombat() && !chicken.isInteractingWithLocalPlayer() && !getMyPlayer().isInCombat()) {
                return atNPC(chicken, "Attack");
            }
            return false;
    }
        public boolean atFarm() {
            RSObject check = findObject(36882);
            if(check != null){
                return true;
            }else{
            return false;
            }
        }
    
        public int antiBan() {
            int gamble = random(1, 12);
                x = random(0, 750);
                y = random(0, 500);
            switch (gamble) {
            case 1:
                return random(500, 750);
            case 2:
                moveMouse(x,y);
                return random(500, 750);
            case 3:
                openTab(TAB_INVENTORY);
                return random(690, 400);
            case 4:
                if (getMyPlayer().isMoving()) {
                    return random(750, 1000);
                }
                break;
            case 5:
                moveMouse(x,y);
                lastCheck = System.currentTimeMillis();
                break;
            case 6:
                xx = random(710,554);
                yy = random(444,230);
                if (getCurrentTab() != TAB_STATS) {
                    openTab(TAB_STATS);
                }
                moveMouse (xx,yy);
                break;
            case 7:
                if (random(1, 8) == 2) {
                    int angle = getCameraAngle() + random(-90, 90);
                    if (angle < 0) {
                        angle = 0;
                    }
                    if (angle > 359) {
                        angle = 0;
                    }
                    setCameraRotation(angle);
                }
                break;
            }
    
            return random(500, 750);
        }
    
    public boolean rectangle(int x1, int x2, int y1, int y2) {
            RSNPC chicken = getNearestFreeNPCByName("Chicken");
    
            int posX = chicken.getLocation().getX();
            int posY = chicken.getLocation().getY();
            if(posX>=x1 && posX<=x2 && posY>=y1 && posY<=y2 ){
                return true;
            }else{
                return false;
            }
        }
    
    public boolean inBuilding(){
        if(rectangle(3184 , 3191 , 3271, 3274)){
            return true;
        }else{
            return false;
        }
    }
    
    
        public int turnCamera() {
            char[] LR = new char[] { KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT };
            char[] UD = new char[] { KeyEvent.VK_UP, KeyEvent.VK_LEFT };
            char[] LRUD = new char[] { KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT,
                            KeyEvent.VK_UP, KeyEvent.VK_RIGHT};
            int random2 = random(0,2);
            int random1 = random(0,2);
            int random4 = random(0,4);
    
            if(random(0,3) == 0) {
                Bot.getInputManager().pressKey(LR[random1]);
                try { Thread.sleep(random(100, 400)); } catch (Exception e) {}
                    Bot.getInputManager().pressKey(UD[random2]);
                try { Thread.sleep(random(300, 600)); } catch (Exception e) {}
                    Bot.getInputManager().releaseKey(UD[random2]);
                try { Thread.sleep(random(100, 400)); } catch (Exception e) {}
                    Bot.getInputManager().releaseKey(LR[random1]);
            } else {
                Bot.getInputManager().pressKey(LRUD[random4]);
                if(random4>1) {
                    try { Thread.sleep(random(300, 600)); } catch (Exception e) {}
                } else {
                    try { Thread.sleep(random(500, 900)); } catch (Exception e) {}
                }
                    Bot.getInputManager().releaseKey(LRUD[random4]);
            }
            return random(500, 800);
        }
        public boolean openDoor(){
            RSObject door = findObject(doorClosed);
            if (door !=null) {
            if (distanceTo(findObject(doorClosed)) <= 5) {
                atDoor(findObject(doorClosed), "South", "Open");
                wait (random(1000, 2000));
                return true;
                }
            }
            return false;
    }
        public boolean openGate(){
            RSObject gate = getObjectAt(3189,3279);
            if(gate != null){
                cameraDown();
                return atObject(gate,"Open");
        }
            return false;
    }
    
        public boolean spot(int x, int y)
        {
            int posX = getMyPlayer().getLocation().getX();
            int posY = getMyPlayer().getLocation().getY();
            if(posX == x && posY == y){
                return true;
            }else{
                return false;
            }
        }
    
        public boolean nearDoor(){
            if(spot(3189,3275)){
                return true;
            }else{
                return false;
            }
        }
            public void cameraDown() {
                char[] LR = new char[] { KeyEvent.VK_DOWN, KeyEvent.VK_RIGHT };
                char[] UD = new char[] { KeyEvent.VK_DOWN, KeyEvent.VK_LEFT };
                char[] LRUD = new char[] { KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT,
                                KeyEvent.VK_DOWN, KeyEvent.VK_RIGHT};
                int random2 = random(0,2);
                int random1 = random(0,2);
                int random4 = random(0,4);
    
                if(random(0,3) == 0) {
                    Bot.getInputManager().pressKey(LR[random1]);
                    try { Thread.sleep(random(100, 400)); } catch (Exception e) {}
                        Bot.getInputManager().pressKey(UD[random2]);
                    try { Thread.sleep(random(300, 600)); } catch (Exception e) {}
                        Bot.getInputManager().releaseKey(UD[random2]);
                    try { Thread.sleep(random(100, 400)); } catch (Exception e) {}
                        Bot.getInputManager().releaseKey(LR[random1]);
                } else {
                    Bot.getInputManager().pressKey(LRUD[random4]);
                    if(random4>1) {
                        try { Thread.sleep(random(300, 600)); } catch (Exception e) {}
                    } else {
                        try { Thread.sleep(random(500, 900)); } catch (Exception e) {}
                    }
                        Bot.getInputManager().releaseKey(LRUD[random4]);
                }
        }
            public int runAway() {
                try{
                runaway1.walkToEnd();
                wait(random(10000,20000));
                runaway1.walkToStart();
                }catch(Exception e){}
                return random(500, 1250);
    }
    
        public boolean pickUp() {
            for(int i=0; i<5; i++){
                if(buryBones) {
                    RSTile bone = getGroundItemByID(i, BoneID);
                    if(bone != null) {
                        return atTile(bone, "Take Bone");
                    }
                }
                if(pickFeathers) {
                    RSTile feather = getGroundItemByID(i, FEATHER);
                    if(feather != null) {
                        return atTile(feather, "Take Feather");
                    }
                }
            }
            return false;
        }
    
        public int buryBones() {
            if(inventoryContains(BoneID)){
                atInventoryItem(BoneID, "Bury");
                wait(random(2500,5000));
                bonesburried++;
            }
            return random(150,250);
        }
    
        //Ends
    
        //Inherited Methods
        public boolean onStart(Map<String, String> args) {
             Bot.getEventManager().addListener(PaintListener.class, this);
             Bot.getEventManager().addListener(ServerMessageListener.class, this);
            try {
            if (args.get("bone").equals("true")) {
                buryBones = true;
            }
            } catch (Exception e) {}
            try{
            if (args.get("feather").equals("true")) {
                pickFeathers = true;
            }
            } catch (Exception e) {}
            if(isLoggedIn()){
                try{
                    if(atFarm()){
                        toChickens.walkToEnd();
                    }
            } catch (Exception e){}
        }
            startTime = System.currentTimeMillis();
            return true ;
    }
    
        public void onRepaint(Graphics g){
            int xpgain;
            if( startattxp == 0 )
                startattxp = skills.getCurrentSkillExp(STAT_ATTACK);
            if( startstrxp == 0 )
                startstrxp = skills.getCurrentSkillExp(STAT_STRENGTH);
            if( startdefxp == 0 )
                startdefxp = skills.getCurrentSkillExp(STAT_DEFENSE);
    
            long runTime = System.currentTimeMillis() - startTime;
            long TotalSecs = runTime / 1000;
            long TotalMins = TotalSecs / 60;
            long TotalHours = TotalMins / 60;
            int seconds = (int) TotalSecs % 60;
            int minutes = (int) TotalMins % 60;
            int hours = (int) TotalHours % 60;
    
            StringBuilder b = new StringBuilder();
    
            if (hours < 10)        b.append('0');
            b.append(hours);
            b.append(':');
            if (minutes < 10)    b.append('0');
            b.append(minutes);
            b.append(':');
            if (seconds < 10)     b.append('0');
            b.append(seconds);
    
            if(isLoggedIn()){
                int x = 420;
                int y = 405;
                xpgain = (curattxp - startattxp)+(curstrxp - startstrxp)+(curdefxp - startdefxp);
                chickenskilled = (xpgain / 12);
                curattxp=skills.getCurrentSkillExp(STAT_ATTACK);
                curstrxp=skills.getCurrentSkillExp(STAT_STRENGTH);
                curdefxp=skills.getCurrentSkillExp(STAT_DEFENSE);
    
                g.setColor(Color.GREEN);
                g.drawString("Ran for: " + b.toString(), x, y += 20);
                g.drawString("Killed: " + chickenskilled + " chickens.",x, y += 15);
                g.drawString("Dropped " + bonesburried + " bones." , x,y  += 20);
            }
    
        }
        public void serverMessageRecieved(ServerMessageEvent arg0)
        {
           String serverString = arg0.getMessage();
            try{
           if (serverString.contains("Oh dear, you are dead!")){
               log("DeathWalk");
               deathWalkPath.walkToEnd();
                RSObject gate = getObjectAt(3189,3279);
                if(gate != null){
                    openGate();
                }
           }
           }catch(Exception e) {
            e.printStackTrace();
        }
    }
        public int loop( ) {
            try{
                RSObject gate = getObjectAt(3189,3279);
                RSObject door = findObject(doorClosed);
                door = getObjectAt(3189,3276);
                RSObject gateOpen = getObjectAt(3188,3280);
                RSObject doorPosition = getObjectAt(3189,3276);
                RSNPC Random = getNearestFreeNPCByName("Swarm","Shade","Zombie","Evil Chicken");
                setRun(true);
    
                if(Random != null){
                    return runAway();
                }
                if(getMyPlayer().isMoving() ) {
                    return random(500, 1000);
                }
                if(getMyPlayer().isInCombat()) {
                    return antiBan();
                }
                if(inBuilding()){
                    if ((door != null) && doorPosition != null){
                    openDoor();
                    }
                    killchicken();
                }
                if(nearDoor()) {
                    if(door != null) {
                    log("Player stuck and door close, open door");
                    openDoor();
                    }
                    return random(250, 550);
                }
                  if((gate != null) && gateOpen != null) {
                    openGate();
                    return random(100,500);
                  }
                if(inventoryContains(BoneID)) {
                    buryBones();
                    return random(250, 500);
                }
                if(pickUp()){
                    return random(250, 700);
                }
                if (getMyPlayer().getAnimation() == -1){
                    return killchicken() ? random(500,800):turnCamera();
                }
            } catch(Exception e) { }
            return random(500, 1250);
        }
    
        public void onFinish() {
            log("Killed: " + chickenskilled + " chickens.");
            Bot.getEventManager( ).removeListener(PaintListener.class, this);
            Bot.getEventManager( ).removeListener(ServerMessageListener.class, this);
        }
        //Ends
    
    }
     
  3. Unread #82 - Dec 27, 2008 at 9:47 PM
  4. hotducati900ss
    Joined:
    Dec 27, 2008
    Posts:
    1
    Referrals:
    0
    Sythe Gold:
    0

    hotducati900ss Newcomer

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    How do i add it to scripts? i needa know badly please
     
  5. Unread #83 - Dec 28, 2008 at 9:33 AM
  6. realfree
    Referrals:
    0

    realfree Guest

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Request NEEDED badly

    I am looking For an ALLANTIRANDOM script If you need help with this for scripts
    You can use nexus it has all the anti random scripts but they Arn't working with Rsbot and i hate to use nexus so i am requesting an allantirandom scirpt for Rsbot including School exam and so on
    Noob Way
    PLLLLLLLLLZZZZZZZZZZZZ i realy badly need
     
  7. Unread #84 - Dec 28, 2008 at 10:05 AM
  8. kornthebldgd
    Joined:
    Mar 19, 2006
    Posts:
    4
    Referrals:
    0
    Sythe Gold:
    0

    kornthebldgd Newcomer

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Thanks for all of these man.
     
  9. Unread #85 - Dec 28, 2008 at 11:41 PM
  10. Party_dude
    Joined:
    Sep 3, 2007
    Posts:
    231
    Referrals:
    0
    Sythe Gold:
    7

    Party_dude Active Member

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Anyone Have a working Barbarian Agility for me please...:noworry:
     
  11. Unread #86 - Dec 29, 2008 at 5:25 AM
  12. thesage
    Referrals:
    0

    thesage Guest

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Hi! , i was wondering if there were any scripts out there that just, cast spells to attack mobs, i tried some auto-fighter, but i couldnt figure out how to make them use magic (no defence just casting),

    it would be nice if it just attacks the dummy's with firebolt and firestrike etc,
    thnx in advance :)
     
  13. Unread #87 - Dec 29, 2008 at 11:15 AM
  14. Party_dude
    Joined:
    Sep 3, 2007
    Posts:
    231
    Referrals:
    0
    Sythe Gold:
    7

    Party_dude Active Member

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    I dont think anyone has made one yet but i just started using it so i dont know.
     
  15. Unread #88 - Dec 29, 2008 at 11:50 AM
  16. Dirtyhouse
    Joined:
    Nov 7, 2008
    Posts:
    143
    Referrals:
    0
    Sythe Gold:
    0

    Dirtyhouse Active Member

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Hi, I'm using Yew cutter from Linux_communist.
    but it says: 'This script is has no description.Please see the forums for information on how to use it.'
    and then it says : arguments

    What should i type there?
     
  17. Unread #89 - Dec 29, 2008 at 3:06 PM
  18. ihasrsbotscripts
    Joined:
    Dec 29, 2008
    Posts:
    6
    Referrals:
    0
    Sythe Gold:
    0

    ihasrsbotscripts Newcomer

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Script name:NeitiznotFlaxSpinnerSupreme.java
    Script author: zsleepz

    Code:
    // NeitiznotFlaxSpinnerSupreme v0.11 by zSleepz
    //        December 2008
    //
    // Proggy derived from pmiller624's pmCooker script (but currently broken)
    //
    // Instructions: Start in Neitiznot bank.  Put flax in second slot of first bank tab.
    //
    // Features:
    // v0.11
    // - Fixed null pointer exception on line 243
    //
    // v0.1
    // - Uses direct left-click to open spinning interface like a real player would, 
    //   with some atObject-style spinning for variabilitiy.
    // - Errant left-click action protection so you don't keep trying to 
    //   click on places/things that won't otherwise do anything.
    // - Stops automatically if unable to reach the bank or spinning wheel after several retries.
    // - Attempts to run away from combat
    // - Uses variable cursor and tile positions for moving to/from bank and for spinning
    // - Variable use of bank chests
    //
    // The general idea for arious stylistic elements such as proggy and startup screen 
    // originated from various other scripts.
    //
    
    import java.awt.*;
    import java.util.*;
    
    import com.speljohan.rsbot.bot.Bot;
    import com.speljohan.rsbot.script.Script;
    import com.speljohan.rsbot.script.Calculations;
    import com.speljohan.rsbot.script.Skills;
    import com.speljohan.rsbot.script.wrappers.*;
    import com.speljohan.rsbot.event.listeners.PaintListener;
    import com.speljohan.rsbot.event.listeners.ServerMessageListener;
    import com.speljohan.rsbot.event.events.ServerMessageEvent;
    
    //TODO: Proggy broken.  Add crafting experience tracking and strings spun
    
    public class NeitiznotFlaxSpinnerSupreme extends Script implements ServerMessageListener, PaintListener {
    
    // This script starts with the bank in Lletya.    
        public double getVersion() {
            return 0.11 ;
        }
    
        public String getScriptCategory() {
            return "Crafting";
        }
    
        public String getName() {
            return "NeitiznotFlaxSpinnerSupreme";
        }
    
        public String getAuthor() {
            return "zSleepz";
        }    
        
        public String getScriptDescription() {
            String html = ""
            + "<html>"
            + "<body>"
            + "<h2>" + getName() + " v" + getVersion() + "</h2><br>"
            + "<b>Author:</b> " + getAuthor() + "<br><br><br>"
            + "<b>Instructions:</b> Stand at the Lletya bank and start script.<br>"
            + "</body>\n"
            + "</html\n";
            return html;
        }
        public static final RSTile bankTile = new RSTile(2336, 3804);
        public static final RSTile spinnerTile = new RSTile(2354, 3794);       
        
        public RSTile toSpinnerIntermedTile = new RSTile(2348, 3802);
        public RSTile toBankIntermedTile = new RSTile(2341, 3804);
        
        public static final int   BankChests =  21301; 
        public static final int   FlaxID = 1779;    
        public static final int      BowStringID = 1777;    
        public static final int   SpinningWheelID = 21304; 
        public static final int   SPINNING_INTERFACE_ID = 459;
        public static final int   SPINNING_INTERFACE_BOWSTRING_ID = 17;
        
        public int itemsObtained = 0;
    
        // For proggy
        private int CraftSkillIndex;
        private static final Color titleBoxBG = new Color(245, 245, 220, 100);
        private static final Color titleBoxFG = new Color(139, 69, 14, 255);
        private static final Color statusBoxBG = new Color(162, 80, 45, 100);
        private static final Color statusBoxFG = new Color(245, 245, 220, 100);
        long hh = 0, mm = 0, ss = 0;
        long rawtime, startTime;
        int priorXP, xpGained, startXP;
        
        public boolean onStart(Map<String, String> args) {
            Bot.getEventManager().addListener(PaintListener.class, this);
            Bot.getEventManager().addListener(ServerMessageListener.class, this);
            itemsObtained = 0;        
            
            CraftSkillIndex = Skills.getStatIndex("Crafting");
            startXP = 0;
            priorXP = 0;
            
            return true;
        }
    
        public void onFinish() {
            Bot.getEventManager().removeListener(PaintListener.class, this);
            Bot.getEventManager().removeListener(ServerMessageListener.class, this);
        }
      
        final static int WELCOME_SCREEN_BUTTON_PLAY = 45;
        final static int WELCOME_SCREEN_ID = 378;
      
        public int loop() { // LOOP STARTS
            // Welcome anti-ban and break handler sometimes fail to log back in 
            // successfully.  Therefore, let's attempt to finish the process before
            // we start clicking away and get banned.  How ironic...
            if (RSInterface.getInterface(WELCOME_SCREEN_ID).isValid() && RSInterface.getInterface(WELCOME_SCREEN_ID).getChild(WELCOME_SCREEN_BUTTON_PLAY).getAbsoluteX() > 30) {
                log("Welcome screen still open...");
                return(random(100,350));
            }
            
            if (getMyPlayer().isInCombat()) { // If is in combat, runs away
                runAway();
                return random(500, 600);      
            }
    
            if (getMyPlayer().isMoving())  {
                wait(random(300,500));
                return random(200, 300);
            }
            
            // If animation in progress, then 10% of the time, select one of the tabs
            if (tileOnScreen(spinnerTile))  {
                for (int i = 0; i <= 10; i++) {
                    if (getMyPlayer().getAnimation() != -1) {
                        return random(800, 1000);
                    }
                    else  {
                        wait(random(600,800));
                    }
                }
            }
            
            
            // At this point whe should have the spinning interface open.
            if (RSInterface.getInterface(SPINNING_INTERFACE_ID).isValid()) {
                atInterface(SPINNING_INTERFACE_ID,
                        SPINNING_INTERFACE_BOWSTRING_ID, "all");
                
                wait(random(1300,1400));
            }
            
            // If inventory full, head back to bank.  Added further checking
            // to determine where along path to bank we are in order to
            // handle passing the gate properly.  Needed in case of 
            // break handler logouts.
            if (inventoryContains(FlaxID))  {
                // We must do the walking outside of the spinFlax() method.
                // Otherwise we get messed up in the spinnig interface.
                setRun(true);
                if(!tileOnScreen(spinnerTile))  {
                    walkTileMM(randomizeTile(toSpinnerIntermedTile,2,2));
                    waitUntilNotMoving();
                    if(!tileOnScreen(spinnerTile))  {
                        walkTileMM(randomizeTile(spinnerTile, 1, 1));
                        waitUntilNotMoving();
                    }
                }
    
                return spinFlax();
            }
            else { 
                return bank();
            }
        }
    
        public void serverMessageRecieved(ServerMessageEvent e) { //Searches for Messages in chatbox
    //        String message = e.getMessage();
        
        }
    
        public void runAway() { // Run away from a fight method
            log("In combat, running...");
            RSTile loc, go;
            setRun(true);
            loc = getMyPlayer().getLocation();
            go = new RSTile(loc.getX() + random(9, 12), loc.getY() + random(8, 10));
            walkTileMM(go);
            waitUntilNotMoving();
            
            wait(random(3000, 4000));
            
            walkTileMM(loc);
            while (getMyPlayer().isMoving()) {
                wait(random(1500, 2500));
            }
        }
    
        public int bank()  {
            setRun(true);
        
               // Get to the bank
            if(!tileOnScreen(bankTile))  {
                walkTileMM(randomizeTile(toBankIntermedTile,2,2));
                waitUntilNotMoving();
                
                if(!tileOnScreen(bankTile))  {
                    walkTileMM(randomizeTile(bankTile, 1, 1));
                    waitUntilNotMoving();
                }
            }
            
            // Select bank chest and open the bank interface
            setCameraAltitude(true);            
            RSObject BankChest = findObject(BankChests);
            atObject(BankChest, "Bank");
            wait(random(800,1000));
                    
            if (getInterface(INTERFACE_BANK).isValid()) {
                bank.depositAll();
                wait(random(600, 900));
              
                clickMouse(95, 107, 5, 5, false);
                wait(random(700, 900));
                atMenu("Withdraw-All");
                wait(random(900, 1100));
            }
    
            return random(330,780);        
        }
        
        public int spinFlax() { 
    
            // Locate the spinning wheel.
            RSObject wheel = findObject(SpinningWheelID);
            if (wheel == null)  {
                // The wheel isn't nearby, so we walk...again.
                walkTileMM(randomizeTile(toSpinnerIntermedTile,2,2));
                waitUntilNotMoving();
                return random(250,370);
            }
            else if (wheel != null)  {
                // Look to the wheel occassionally            
                if (random(1,10) > 8)  {
                    lookAt(wheel);
                }
            }
            
            // Mix up right-click "Spin" and left click spin action
            int r = random(1,100);
            
            // Do left click pick 80% of the time
            if(r<80)  {
                RSTile loc = wheel.getLocation();
                if (loc == null) return random(250,300);
                moveMouse(Calculations.tileToScreen(loc), 4, 4);
                wait(random(150,300));
                
                // Check if the primary action will be pick, if not
                // skip this time.  The camera angle would otherwise
                // have us trying to chop trees and such.
                if (getMenuIndex("Spin")!=0)  {
                    return random(150,350);
                }
                clickMouse(true);
            } 
            else {
                if(!atObject(wheel, "Spin"))  {
                    lookAt(wheel.getLocation());
                }
            }
        
            wait(random(800, 900));
            
            // At this point whe should have the spinning interface open.
            if (RSInterface.getInterface(SPINNING_INTERFACE_ID).isValid()) {
                atInterface(SPINNING_INTERFACE_ID,
                        SPINNING_INTERFACE_BOWSTRING_ID, "all");
                wait(random(800,900));
            }
    
            return (random(340, 520));
        }
        
        public void waitUntilNotMoving()  {
            wait(random(500,600));
            while (getMyPlayer().isMoving()) {
                wait(random(800, 990));
            }
        }
        
        public void lookAt(RSObject obj)  {
            lookAt(obj.getLocation());
        }
        
        public void lookAt(RSTile loc)  {
            int myX = getLocation().getX();
            int myY = getLocation().getY();        
            
            int objX = loc.getX();
            int objY = loc.getY();
            int dir = 0;
            
            // Player N of object
            if ((myY > objY) && (myX == objX)) dir = random(177,182); 
            
            // Player S of object
            if ((myY < objY) && (myX == objX)) dir = random(0,5);         
            
            // Player E of object
            if ((myX > objX) && (myY == objY)) dir = random(267, 272);
            
            // Player W of object
            if ((myX < objX) && (myY == objY)) dir = random(87, 92); 
            
            // If player NE of object
            if ((myX > objX) && (myY > objY)) dir = random(222, 227); 
            
            // If player NW of object
            if ((myX < objX) && (myY > objY)) dir = random(132, 137); 
            
            // If player SE of object
            if ((myX > objX) && (myY < objY)) dir = random(312, 317); 
            
            // If player SW of object
            if ((myX < objX) && (myY < objY)) dir = random(42, 47); 
            
            // Rotate camera to direction opposite of the
            // direction of the player relative to the object
            setCameraRotation(dir);        
        }
        
        public void onRepaint(Graphics g) {
            if (isLoggedIn()) {
    
                // Setup to display elapsed time.
                if (startTime == 0) {
                    startTime = System.currentTimeMillis();
                }
    
                rawtime = System.currentTimeMillis() - startTime;
                ss = rawtime / 1000;
                if (ss >= 60) {
                    mm = ss / 60;
                    ss -= mm * 60;
                }
                if (mm >= 60) {
                    hh = mm / 60;
                    mm -= hh * 60;
                }            
                
                if (startXP == 0)  {
                    startXP = skills.getCurrentSkillExp(CraftSkillIndex);
                    priorXP = 0;
                }
    
                // Exp Gained
                xpGained = skills.getCurrentSkillExp(CraftSkillIndex) - startXP;
                
                if (xpGained > priorXP)  {
                    itemsObtained++;
                }
                
                priorXP = xpGained;
                
                int boxX = 9;
                int boxY = 240;
                int textX = boxX+3;
                int textY = boxY;
                // Title box
                g.setColor(titleBoxBG);
                g.fillRoundRect(boxX, boxY, 140, 17, 15, 15) ;
                g.setColor(titleBoxFG);
                g.drawString("                 Status", boxX, textY += 15);
                
                //Stats Box
                g.setColor(statusBoxBG);
                g.fillRoundRect(boxX, boxY+=15, 140, 80, 15, 15) ;
                g.setColor(statusBoxFG);
                textY = boxY-3;
                g.drawString("Time running: " + hh + ":" + mm + ":" + ss, textX, textY += 15);
                g.drawString("Bow string count: " + itemsObtained, textX, textY+=15);
                g.drawString("Craft level: " + skills.getCurrentSkillLevel(CraftSkillIndex), textX, textY+=15);
                g.drawString("XP till next level: " + skills.getXPToNextLevel(CraftSkillIndex), textX, textY+=15);
                g.drawString("XP gained: " + xpGained, textX, textY+=15);
            }
        }
    }// SCRIPT END
    Script name: barbarianAgility.java
    Script author: unknown

    Code:
    import java.awt.*;
    import java.util.*;
    import java.awt.event.*;
    
    import com.speljohan.rsbot.script.*;
    import com.speljohan.rsbot.bot.*;
    import com.speljohan.rsbot.script.wrappers.*;
    import com.speljohan.rsbot.event.listeners.*;
    import com.speljohan.rsbot.event.events.*;
    import com.speljohan.rsbot.accessors.*;
    
    public class barbarianAgility extends Script implements ServerMessageListener, PaintListener {
    
    public int currentStep = 1;
    public int currentHeight = 0;
    public int fallCount = 0;
    public int whichWall = 1;
    public int lapCount = 0;
    public int randomInt = 0;
    public int isIdle = 0;
    public int hasNoFood = 0;
    public int currentHealth = 0;
    public int dangerousHP = 0;
    public int	whenToRun = random(40, 75);
    public int[] foodID = { 1895,1893,1891, 4293, 2142, 4291, 2140, 3228, 9980, 7223, 6297, 6293, 6295, 6299, 7521, 9988, 7228, 2878, 7568, 2343, 1861, 13433, 315, 325, 319, 3144, 347, 355, 333, 339, 351, 329, 3381, 361, 10136, 5003, 379, 365, 373, 7946, 385, 397, 391, 3369, 3371, 3373, 2309, 2325, 2333, 2327, 2331, 2323, 2335, 7178, 7180, 7188, 7190, 7198, 7200, 7208, 7210, 7218, 7220, 2003, 2011, 2289, 2291, 2293, 2295, 2297, 2299, 2301, 2303, 1891, 1893, 1895, 1897, 1899, 1901, 7072, 7062, 7078, 7064, 7084, 7082, 7066, 7068, 1942, 6701, 6703, 7054, 6705, 7056, 7060, 2130, 1985, 1993, 1989, 1978, 5763, 5765, 1913, 5747, 1905, 5739, 1909, 5743, 1907, 1911, 5745, 2955, 5749, 5751, 5753, 5755, 5757, 5759, 5761, 2084, 2034, 2048, 2036, 2217, 2213, 2205, 2209, 2054, 2040, 2080, 2277, 2225, 2255, 2221, 2253, 2219, 2281, 2227, 2223, 2191, 2233, 2092, 2032, 2074, 2030, 2281, 2235, 2064, 2028, 2187, 2185, 2229 }; //Has almost every food cookable in runescape, members and non!
    //credits to Bug5532 for the foodID's
    
        public String getName() { 
            return "barbarianAgility"; 
        }
    	 public String getScriptCategory() {
    		return "Agility";
    	}
        public double getVersion() {
            return 1.1; 
        }
    
        public String getAuthor() {
            return "Silentone"; 
        }
    	public boolean onStart(String[] args) {
    			currentStep = 1;
    			Bot.getEventManager().removeListener(ServerMessageListener.class, this);
    			Bot.getEventManager().removeListener(PaintListener.class, this);
    			Bot.getEventManager().addListener(ServerMessageListener.class, this);
    			Bot.getEventManager().addListener(PaintListener.class, this);
    			
    		return true;
        }
    	public RSTile[] toWalls = new RSTile[] {	new RSTile(2532,3549), 
    												new RSTile(2534,3553)};
    
    	public RSTile[] toLog = new RSTile[] {		new RSTile(2543,3553),
    												new RSTile(2546,3552),
    												new RSTile(2549,3550)};
    	public RSTile[] logFail = new RSTile[] {
    												new RSTile(2537,3547),
    
    												new RSTile(2549,3543),
    												new RSTile(2551,3545)};
    	public RSTile[] netFail = new RSTile[] {
    												new RSTile(2543,3553),
    												new RSTile(2540,3546)};
    	public int killBot() {
    		return -1;
    	}
    	public int loop() {
    		RSObject tempObject;
    		try {
    			if (skills.getCurrentSkillLevel(3) < dangerousHP )  {
    				if (getInventoryCount(foodID) == 0) {
    					log("..uhoh.. we have no food and hp is at a dangerous level");
    				return killBot();
    			}
    			for(int i = 0; i<foodID.length; i++) {
    			    if(getInventoryCount(foodID[i]) >= 1) {
    			        atInventoryItem(foodID[i], "Eat");
    			        return random(800, 1400);
    					}
    				}
    			}
    			if (getEnergy() >= whenToRun && !isRunning( ) ) {
    					setRun(true);
    					whenToRun = random(30, 70);
    				return random(500, 750);
    			}
    			doSomething();
    			if (getMyPlayer().isMoving()){
    				isIdle=0;
    			}			
    			dangerousHP = random(7,15);
    			currentHealth = skills.getCurrentSkillLevel(3);
    			if (!getMyPlayer().isMoving()) {
    				isIdle++;
    					if(isIdle > 20){
    						log("We've been idle too long.");
    						log("Stopping script to minimize bot suspicion");
    						stopAllScripts();
    					}
    			}	
    			if(getMyPlayer().isMoving())
    				return random(1000,1500);
    			if (currentStep == 1) {
    				tempObject = findObjectInRange(15,2294);
    				atObject(tempObject, "Walk-across");
    			}
    			if (currentStep == 2) {
    				tempObject = findObjectInRange(15,20211);
    				atObject(tempObject, "Climb-over");
    			}
    			if (currentStep == 3) {
    				tempObject = findObjectInRange(15,2302);
    				atObject(tempObject, "Walk-across");
    			}
    			if (currentStep == 4) {
    				tempObject = findObjectInRange(15,3205);
    				currentHeight = getPlane();
    					if(tempObject != null){
    						atObject(tempObject, "Climb-down");
    						currentHeight = getPlane();
    					}
    					if (currentHeight == 0){
    						currentStep = 5;
    					}
    			}
    			if (currentStep == 5) {
    					walkPathMM( randomizePath(toWalls, 2, 2), 20 );
    						if((distanceTo(new RSTile(2535, 3553)) >= 5)) {
    							currentStep = 6;
    					}
    			}
    			if (currentStep == 6) {
    				whichWall = 1;
    				atTile(new RSTile(2536,3553), "Climb-over");
    			}
    			if(currentStep == 7){
    				whichWall = 2;
    				atTile(new RSTile(2539,3553), "Climb-over");
    			}
    			if(currentStep == 8){
    				whichWall = 3;
    				atTile(new RSTile(2542,3553), "Climb-over");
    			}
    			if (currentStep == 9){
    				walkPathMM( randomizePath(toLog, 2, 2), 20 );
    					if((distanceTo(new RSTile(2551, 3546)) >= 3)) {
    						currentStep = 1;
    					}
    			}
    
    			if (currentStep == 01){
    				walkPathMM( randomizePath(logFail, 2, 2), 20 );
    					if((distanceTo(new RSTile(2551, 3546)) >= 3)) {
    						currentStep = 1;
    					}
    
    			}
    			if (currentStep == 02){
    				walkPathMM( randomizePath(netFail, 2, 2), 20 );
    					if((distanceTo(new RSTile(2541, 3546)) >= 2)) {
    						currentStep = 2;
    					}
    			}
    
    		} catch(Exception e) {}
    		return random(500,1200);
    	}
    
    	public void onFinish() {
    		try {
    			Bot.getEventManager().removeListener(ServerMessageListener.class, this);
    			Bot.getEventManager().removeListener(PaintListener.class, this);
    		} catch(Exception e) {}
        }
    
    	public void onRepaint(Graphics g) {
    		if(isLoggedIn()){
    					int x = 358;
    					int y = 358;
    					g.drawString("currentStep := " +currentStep, x, y += 15);
    					g.drawString("fallCount      := " +fallCount, x, y += 15);
    					g.drawString("lapCount      := " +lapCount, x, y += 15);
    					g.drawString("", x, y += 15);
    					if(isIdle >= 1){
    						g.drawString("idleCounter    := " +isIdle, x, y += 15);
    					} else {
    						g.drawString("", x, y += 15);
    					}
    
    
    
    		}
    	}
    
        public void serverMessageRecieved(ServerMessageEvent e) {
             String message = e.getMessage().toLowerCase();
    		 if(message.contains("safely to") && currentStep == 1) {
                currentStep=2;
             }
    		 if(message.contains("climb the") && currentStep == 2) {
                currentStep=3;
             }
    		 if(message.contains("skillfully") && currentStep == 3) {
    			 currentStep=4;
             }
    		 if(message.contains("low wall") && currentStep == 6 && whichWall == 1) {
    			 currentStep=7;
             }
    		 if(message.contains("low wall") && currentStep == 7 && whichWall == 2) {
    			 currentStep=8;
             }
    		 if(message.contains("low wall") && currentStep == 8 && whichWall == 3) {
    			 currentStep=9;
    			 whichWall=1;
    			 lapCount=+1;
             }
             if(message.contains("water bites") && currentStep == 1) {
                currentStep=01;
    			fallCount=+1;
             }
    		 if(message.contains("slip and fall") && currentStep == 3) {
                currentStep=02;
    			fallCount=+1;
             }
         }
    	 public RSObject findObjectInRange(int distanceTo, int id) {
            for(int i=0;i<=distanceTo;i++) {
                RSObject tempObject = findObject(i, id);
                if(tempObject != null)
                    return tempObject;
            }
                return null;
        }
    
    		public void moveCamera() {
        	char[] LR = new char[] {	KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT };
        	char[] UD = new char[] {	KeyEvent.VK_UP, KeyEvent.VK_DOWN };
        	char[] LRUD = new char[] {	KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT,
        								KeyEvent.VK_UP, KeyEvent.VK_DOWN };
        	int random2 = random(0,2);
        	int random1 = random(0,2);
        	int random4 = random(0,4);
        	
        	if(random(0,3) == 0) {
        		if(random(0,2) == 0) {
    	        	Bot.getInputManager().pressKey(LR[random1]);
    	        	try { Thread.sleep(random(100, 400)); } catch (Exception e) {}
    	        	Bot.getInputManager().pressKey(UD[random2]);
    	        	try { Thread.sleep(random(300, 600)); } catch (Exception e) {}
    	        	Bot.getInputManager().releaseKey(UD[random2]);
    	        	try { Thread.sleep(random(100, 400)); } catch (Exception e) {}
    	        	Bot.getInputManager().releaseKey(LR[random1]);
        		} else {
    	        	Bot.getInputManager().pressKey(UD[random2]);
    	        	try { Thread.sleep(random(100, 400)); } catch (Exception e) {}
    	        	Bot.getInputManager().pressKey(LR[random1]);
    	        	try { Thread.sleep(random(300, 600)); } catch (Exception e) {}
    	        	Bot.getInputManager().releaseKey(LR[random1]);
    	        	try { Thread.sleep(random(100, 400)); } catch (Exception e) {}
    	        	Bot.getInputManager().releaseKey(UD[random2]);    			
        		}
        	} else {
        		Bot.getInputManager().pressKey(LRUD[random4]);
        		if(random4>1) {
        			try { Thread.sleep(random(300, 600)); } catch (Exception e) {}
        		} else {
        			try { Thread.sleep(random(500, 900)); } catch (Exception e) {}
        		}
        		Bot.getInputManager().releaseKey(LRUD[random4]);
        	}
        }
    	public void myOpenTab(int tab) {
            if (tab == getCurrentTab()) {
                  return;}
            switch(tab) {
    			case TAB_ATTACK: input.holdKey((char) KeyEvent.VK_F1, random(300, 700)); break;
    			case TAB_STATS: input.holdKey((char) KeyEvent.VK_F2, random(300, 700)); break;
    			case TAB_QUESTS: input.holdKey((char) KeyEvent.VK_F3, random(300, 700)); break;
    			case TAB_INVENTORY: input.holdKey((char) KeyEvent.VK_F4, random(300, 700)); break;
    			case TAB_EQUIPMENT: input.holdKey((char) KeyEvent.VK_F5, random(300, 700)); break;
    			case TAB_PRAYER: input.holdKey((char) KeyEvent.VK_F6, random(300, 700)); break;
    			case TAB_MAGIC: input.holdKey((char) KeyEvent.VK_F7, random(300, 700)); break;
    			case TAB_FRIENDS: input.holdKey((char) KeyEvent.VK_F8, random(300, 700)); break;
            default: openTab(tab); break;
            }
    	}
    	public void doSomething() {
    			wait (random(1000, 2000));
    				randomInt = random(1, 12);
    			if ((randomInt == 1) || (randomInt == 2) || (randomInt == 3)) {
    				wait(random(2000, 2000));
    			}
    			if (randomInt == 4) {
    				openTab(random(0,12));
    			}
    			if (randomInt == 5) {
    				myOpenTab(TAB_STATS);
    				openTab(TAB_STATS);
    				wait( random(350,800));
    				moveMouse(random(556,648),random(230,281));
    				wait( random(550,1300));
    			}
    			if (randomInt == 6) {
    				myOpenTab(random(0,12));
    			}
    			if ((randomInt == 7) || (randomInt == 8) || (randomInt == 9)) {
    				int x = random(0, 750);
    				int y = random(0, 500);
    				moveMouse(0, 0, x, y);
    			}
    			if ((randomInt == 10) || (randomInt == 11) || (randomInt == 12)) {
    				moveCamera();
    		}
    	}
    
    
    }
     
  19. Unread #90 - Dec 29, 2008 at 4:14 PM
  20. Dirtyhouse
    Joined:
    Nov 7, 2008
    Posts:
    143
    Referrals:
    0
    Sythe Gold:
    0

    Dirtyhouse Active Member

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Requesting Falador Yew cutter + banker .

    thanks
     
  21. Unread #91 - Dec 29, 2008 at 8:38 PM
  22. pizzaboy093
    Referrals:
    0

    pizzaboy093 Guest

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Can someone please help me with PMcooker

    1)Why does pmcooker withdrawl and deposit item over and over?
    2)how do i find the item code to pu in the bot script?
     
  23. Unread #92 - Dec 30, 2008 at 2:17 AM
  24. Party_dude
    Joined:
    Sep 3, 2007
    Posts:
    231
    Referrals:
    0
    Sythe Gold:
    7

    Party_dude Active Member

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    ok im going to try the barbarian agility out.:D
     
  25. Unread #93 - Dec 30, 2008 at 3:59 AM
  26. liverpoolfan
    Joined:
    Nov 16, 2008
    Posts:
    205
    Referrals:
    1
    Sythe Gold:
    0

    liverpoolfan Active Member
    Banned

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    i need an agilty script. im lvl 60 agilty and need 70 maybe 99 depends how good it is
     
  27. Unread #94 - Dec 30, 2008 at 6:05 AM
  28. Dirtyhouse
    Joined:
    Nov 7, 2008
    Posts:
    143
    Referrals:
    0
    Sythe Gold:
    0

    Dirtyhouse Active Member

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    1) i don't know
    2) go to http://www.moparscape.org/ then click help and then items IDs
     
  29. Unread #95 - Dec 30, 2008 at 11:28 AM
  30. kenzik
    Joined:
    Feb 22, 2007
    Posts:
    120
    Referrals:
    0
    Sythe Gold:
    0

    kenzik Active Member
    Banned

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    This is best bot at the moment i think, i'm using it and using script called ProFisher .
     
  31. Unread #96 - Dec 30, 2008 at 12:37 PM
  32. ihasrsbotscripts
    Joined:
    Dec 29, 2008
    Posts:
    6
    Referrals:
    0
    Sythe Gold:
    0

    ihasrsbotscripts Newcomer

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Script name: MonkeyAgilityCourse.java
    Script author:unknown
    It does the ape atoll agility course (supposed to be more xp than the wilderness one).
    *note: i havent tested this one cause i don't have the agility lvl

    Code:
    import java.awt.*;
    import java.util.*;
    import java.awt.event.*;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.event.KeyEvent;
    import java.math.BigDecimal;
    
    import com.speljohan.rsbot.script.*;
    import com.speljohan.rsbot.bot.*;
    import com.speljohan.rsbot.script.wrappers.*;
    import com.speljohan.rsbot.event.listeners.*;
    import com.speljohan.rsbot.event.events.*;
    import com.speljohan.rsbot.accessors.*;
    import com.speljohan.rsbot.event.listeners.PaintListener;
    
    public class MonkeyAgilityCourse extends Script implements ServerMessageListener, PaintListener {
    public static final int[]         Food = new int[] { 333, 385, 379, 285, 373, 365, 7946, 361, 397, 391, 1963, 329 } ;
        int state = 0 ;
        long            startTime;
        Color WHITE = new Color(255, 255, 255, 100);
        Color GREEN = new Color(0, 50, 10, 255);
        Color RED = new Color(100, 0, 0, 255);
    
        boolean proggy=true;
    
    
        private int State = 0;
        private final RSTile[] ToRocks = {
            new RSTile (2770, 2747),
            new RSTile (2768, 2746),
            new RSTile (2772, 2735),
            new RSTile (2765, 2747),
            new RSTile (2763, 2748),
            new RSTile (2760, 2748),
            new RSTile (2765, 2760),
            new RSTile (2758, 2745),
            new RSTile (2755, 2742),
    };
        private final RSTile[] ToRope = {
            new RSTile (2742, 2741),
            new RSTile (2743, 2738),
            new RSTile (2747, 2734),
            new RSTile (2770, 2747),
            new RSTile (2751, 2731),
    };
    private final RSTilePath ToRocksPath = new RSTilePath(ToRocks, this);
    private final RSTilePath ToRopePath = new RSTilePath(ToRope, this);
    
    
    
    
    
    
    
    
    
    
        int step=1;    public boolean arePlayersWithin(int x1, int y1, int x2, int y2) {
            int Dist = 20;
            RSPlayer closest = null;
            int[] validPlayers = Bot.getClient().getPlayerIndexArray();
            Player[] players = Bot.getClient().getPlayerArray();
    
            for (int element : validPlayers) {
                if (players[element] == null) {
                    continue;
                }
                RSPlayer player = new RSPlayer(players[element]);
                try {
                    int x = player.getLocation().getX();
                    int y = player.getLocation().getY();
                    if(x>=x1 && y>=y1 && x<=x2 && y<=y2) {
                        return true;
                    }
                } catch (Exception e) {}
            }
    return false;
    }
        public void serverMessageRecieved(ServerMessageEvent e) {
             String message = e.getMessage().toLowerCase();
    
             if(message.contains("...and slide back down the slope.")) {
                state = 3;
             }
    
             if(message.contains("...something in the water bites you.")) {
                state = 1;
    }
             if(message.contains("Something in the water bites you...")) {
               state = 1;
    }
             if(message.contains("Whoops! You lose your grip and fall into the river.")) {
                state = 0;
    }
             if(message.contains("You slip andfall into the river.")) {
               state = 1;
    }
    
    
         }
    
        public void onRepaint(Graphics g) { //stole transparent box from ~alex~'s AlFlax
            // local objects:
            int    index = skills.getStatIndex("Agility");
            int exp = 0;
            int levels;
            long hours = 0, minutes = 0, seconds = 0;
            long time;
            long untilhour = 0, untilmin = 0, untilsec = 0;
            double temptime = 0;
    
            // Has start time been previously set?
            if ( startTime == 0 ) {
                startTime = System.currentTimeMillis( );
            }
    
            // Calculate hours, minutes and seconds.
            time = System.currentTimeMillis( ) - startTime;
            seconds = (time / 1000);
            if ( seconds >= 60 ) {
                minutes = (seconds / 60);
                seconds -= (minutes * 60);
            }
            if ( minutes >= 60 ) {
                hours = (minutes / 60);
                minutes -= (hours * 60);
            }
            if (isLoggedIn() && proggy==true) {
                int x = 18;
                int y = 169;
                g.setColor(WHITE);
                g.fill3DRect(14, 169, 210, 145, true);
                g.setColor(GREEN);
                g.drawString(getName()+" v" + getVersion(),x, y += 20);
                g.drawString("By: "+getAuthor(), x, y += 20);
                g.setColor(RED);
                g.drawString("Course Completed " + count + " times.", x, y += 20);
                g.setColor(GREEN);
                g.drawString("Gained "+(skills.getCurrentSkillExp(STAT_AGILITY)-startingXp)+"xp", x, y += 20);
                g.drawString("Gained "+(skills.getCurrentSkillLevel(STAT_AGILITY)-startingLevel)+" levels", x, y += 20);
                g.drawString(skills.getPercentToNextLevel(STAT_AGILITY)+"% to next lvl", x, y += 20);
                g.drawString("Time running: " + hours + "." + minutes + "." + seconds, x, y += 20);
            }
        }
        int count;
        int startingXp;
        int startingLevel;
        RSObject temp;
    
        public String getName() {  
            return "Monkey Agility Course";   
        }
    
        public double getVersion() {   
            return 1.0;       
        }
    
        public String getAuthor() { 
            return "ViXoR & Lordlord";   
        }
    
        public String getScriptCategory() {
            return "Agility";
        }
    
        public RSObject getNearestObjectById(int range, int id) {
            for(int i=0;i<=range;i++) {
                RSObject temp = findObject(i, id);
                if(temp != null)
                    return temp;
            }
                return null;
        }
    
        public boolean onStart(String[] args) {  
    
            proggy=true;
            count=0;
            startingXp=skills.getCurrentSkillExp(STAT_AGILITY);
            startingLevel=skills.getRealSkillLevel(STAT_AGILITY);
            step=1;
            Bot.getEventManager().addListener(ServerMessageListener.class, this);
    Bot.getEventManager().addListener(PaintListener.class, this);
            return true;   
        }
    
        public void onFinish() {
            Bot.getEventManager().removeListener(ServerMessageListener.class, this);
    Bot.getEventManager().removeListener(PaintListener.class, this);
            proggy=false;
        }
    
        public boolean Eat() {
        for(int i = 0; i<Food.length; i++) {
            if(getInventoryCount(Food[i]) >= 1) {
                atInventoryItem(Food[i], "Eat");
                return true;
            }
        }
        return false;
        }
    
        public int loop() {
    if(getMyPlayer().getAnimation() != -1) return random(1000, 2000);
    if(skills.getCurrentSkillLevel(3) <= 15) {
            log("Health is below 15. Eating food...");
            if(!Eat()) {
                wait ( random(10000, 12000) );
                logout();
                Bot.getScriptHandler().stopScript(this.ID);
            } else
                return random(800, 1200);
    }
    RSTile stoneTile = new RSTile(2755, 2742);
    if(canReach(stoneTile, false)) {
      if(distanceTo(stoneTile) <=1)
        state = 0;
      else
        walkTileMM(stoneTile);
    
    }else
    if(canReach(findObject(12570),false)){
    state = 1;
    }else
    if(distanceTo(new RSTile(2747,2741)) <= 1) {
    state = 3;
    }else
    if(distanceTo(new RSTile(2751,2731)) <= 1) {
    state = 4;
    }else
    if(getMyPlayer().getLocation().equals(new RSTile(2752,2730))) {
    walkTileMM(new RSTile(2751,2731));
    }
    
    try{
        switch(state){
        case 0:
    
    
       if (distanceTo(ToRocks[0]) < 6) ToRocksPath.walkToEnd();
                    setCameraRotation(75);
                    setCameraAltitude(true);
                    wait(random(500,1500));
        RSObject Stepping_Stone = getObjectAt(new RSTile(2754, 2742));
        if(Stepping_Stone != null){
        //    log("ID "+Stepping_Stone.getID()+"   X:"+Stepping_Stone.getLocation().getX()+"   Y:"+Stepping_Stone.getLocation().getY());
     if(atTile(new RSTile(2754, 2742), "Jump-to")) {
                log("Found Stepping Stone!");
                state++;
           return random(2500, 3000);
    }
    
        return random (500,1000);
    }
                log("Couldn't Find Stone");
    
                    ToRocksPath.walkToEnd();
                    return random(500,1000);
        case 1:
                    wait(random(2000,2500));
                    RSObject TropTree = findObject (12570);
                    if(TropTree != null){
                      if(atObject(TropTree, "Climb")) {
                            log("Tropical Tree Found!");
                        state++;
                        return random(2500, 3000);
                 }
                      return random(500, 1000);
                }
                log("Couldn't Find Tropical Tree");
                      return random(500, 1000);
        case 2:
                    wait(random(2000,2500));
                    setCameraRotation(240);
                    setCameraAltitude(true);
                    RSObject Monkeybars = findObject (12573);
                    if(Monkeybars != null){
                      if(atObject(Monkeybars, "Swing Across")) {
                            log("Monkeybars Found!");
                        state++;
                        return random(2500, 3000);
                 }
                      return random(500, 1000);
                }
                log("Couldn't Find Monkeybars");
                      return random(500, 1000);
        case 3:
                    setCameraRotation(260);
                input.pressKey((char) KeyEvent.VK_DOWN);
    wait(random(1000,1500));
    input.releaseKey((char) KeyEvent.VK_DOWN);
                    wait(random(2000,2500));
                    RSObject Slope = findObject (12576);
                    if(Slope != null){
                      if(atObject(Slope, "Climb-up")) {
                            log("Skull Slope Found!");
                        state++;
                        return random(2500, 3000);
                 }
                      return random(500, 1000);
                }
                log("Couldn't Find Skull Slope");
                      return random(500, 1000);
        case 4:
                    wait(random(2000,2500));
                    setCameraRotation(173);
                input.pressKey((char) KeyEvent.VK_UP);
    wait(random(1000,1500));
    input.releaseKey((char) KeyEvent.VK_UP);
           if (distanceTo(ToRope[0]) <= 1) ToRopePath.walkToEnd();
    Point Rope = Calculations.tileToScreen(new RSTile(2752, 2730), 40);
        moveMouse(Rope,3,3);
        if(getMenuItems().get(0).toLowerCase().contains("swing")) {
        clickMouse(true);
                          log("Rope Found!");
                        state++;
                        return random(2500, 3000);
                 }
                      return random(500, 1000);
        case 5:
                    RSObject TropTree1 = findObject (12618);
                    if(TropTree1 != null){
                      if(atObject(TropTree1, "Climb-down")) {
                            log("Tropical Tree Found!");
                        state = 0;
                        return random(2500, 3000);
                 }
                      return random(500, 1000);
                }
                log("Couldn't Find Tropical Tree");
                      return random(500, 1000);
    
        }
            }
        catch(Exception oo) {
         oo.printStackTrace();
        }
    
        return random(500,1000);
        }
    
    
        public String getScriptDescription() {
            return "<html>\n" +
                "<head></head>\n" +
                "<body>\n" +
                "<center>" +
                "<h2>" + getName() + "</h2>" +
                "</center>\n" +
                "<p>\n" +
                "<b>Author:</b> " + getAuthor() + "<p>\n" +
                "<b>Version:</b> " + getVersion() + "<p>\n" +
                "Start this script at the spot where you finish the lap." +
                "</body>\n" +
                "</html>";
        }
    
    
    
    
    
    
    
    
    }
     
  33. Unread #97 - Dec 30, 2008 at 4:14 PM
  34. alleyezonryan123
    Referrals:
    0

    alleyezonryan123 Guest

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    i need arguments for the hunter script please send me link for them thanks =]
     
  35. Unread #98 - Dec 31, 2008 at 2:22 PM
  36. liverpoolfan
    Joined:
    Nov 16, 2008
    Posts:
    205
    Referrals:
    1
    Sythe Gold:
    0

    liverpoolfan Active Member
    Banned

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    has any1 tryed



    i need to no if u works...
     
  37. Unread #99 - Dec 31, 2008 at 2:41 PM
  38. wtf omgre 1
    Joined:
    May 17, 2008
    Posts:
    32
    Referrals:
    0
    Sythe Gold:
    0

    wtf omgre 1 Member

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    rsbot ftwwwww:love: :love:
     
  39. Unread #100 - Jan 1, 2009 at 6:33 AM
  40. kanecrichton
    Joined:
    May 24, 2008
    Posts:
    167
    Referrals:
    0
    Sythe Gold:
    0

    kanecrichton Active Member

    .:[~]Official RSBot Scripts+Requests Sticky!{RSBot}[~]:.

    Aelin's pro miner need to be fixed up a bit. if you go to mining guild and such, it spends ages indentifying were it is. thanks:D :D :D and it can't find the ores :p
     
< Scammed by Thugs | cyber cry scammed me me 36 d stones >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site