Anyone got a good RSBOT SCRIPT for auto attacking?

Discussion in 'RuneScape 3 Cheating' started by Anthrax666, Nov 24, 2008.

Anyone got a good RSBOT SCRIPT for auto attacking?
  1. Unread #1 - Nov 24, 2008 at 10:54 AM
  2. Anthrax666
    Joined:
    Nov 19, 2008
    Posts:
    353
    Referrals:
    0
    Sythe Gold:
    0

    Anthrax666 Forum Addict

    Anyone got a good RSBOT SCRIPT for auto attacking?

    It needs to be a script that fights low level monsters,

    IE: Chickens (good if it picks up feathers), cows , men , women , etc

    Need it to train my defense pure! :)


    Thanks

    Anthrax.
     
  3. Unread #2 - Nov 24, 2008 at 10:57 AM
  4. YoungMadness
    Joined:
    Nov 8, 2008
    Posts:
    118
    Referrals:
    0
    Sythe Gold:
    0

    YoungMadness Active Member

    Anyone got a good RSBOT SCRIPT for auto attacking?

    Do you got MSN?
     
  5. Unread #3 - Nov 24, 2008 at 11:22 AM
  6. d 7 x
    Joined:
    Jun 23, 2008
    Posts:
    1,794
    Referrals:
    0
    Sythe Gold:
    0

    d 7 x Guru
    Banned

    Anyone got a good RSBOT SCRIPT for auto attacking?

    You could try fight caves overnight... But you would'nt get much done.

    Sorry, but that's all I could think of.
     
  7. Unread #4 - Nov 24, 2008 at 11:23 AM
  8. I B0t 4 Phun
    Joined:
    Nov 18, 2008
    Posts:
    181
    Referrals:
    0
    Sythe Gold:
    0

    I B0t 4 Phun Active Member
    Banned

    Anyone got a good RSBOT SCRIPT for auto attacking?

    Yes ...
     
  9. Unread #5 - Nov 24, 2008 at 12:02 PM
  10. Anthrax666
    Joined:
    Nov 19, 2008
    Posts:
    353
    Referrals:
    0
    Sythe Gold:
    0

    Anthrax666 Forum Addict

    Anyone got a good RSBOT SCRIPT for auto attacking?

  11. Unread #6 - Nov 24, 2008 at 12:19 PM
  12. qpwoeiruty
    Joined:
    Jul 22, 2008
    Posts:
    1,839
    Referrals:
    1
    Sythe Gold:
    0

    qpwoeiruty Guru

    Anyone got a good RSBOT SCRIPT for auto attacking?

    Lumbridge goblin killa

    PHP:
    import java.awt.*;
    import java.util.*;
    import java.util.List;
    import com.speljohan.rsbot.bot.Bot;
    import com.speljohan.rsbot.script.*;
    import com.speljohan.rsbot.script.wrappers.*;

    import java.awt.*;

    public class 
    RuskisGoblin extends Script {
        
        
        private final 
    int KILLGOBLIN 0;
        private final 
    int DEATHWALK 1;
        private final 
    int WALKBACK 2;
        private final 
    int KILLSCRIPT 3;    
        
    int ActionState 0;
        
        public 
    RSTile[] deathWalkPathArr = {
            new 
    RSTile(32343219),
            new 
    RSTile(32373225),
            new 
    RSTile(32523225),
            new 
    RSTile(32613233)
        };
        
        
    int goblinAreaX[] = new int[]{3266,3250,3243,3264,3267};
        
    int goblinAreaY[] = new int[]{3218,3225,3258,3254,3227};
        
    Polygon goblinArea = new Polygon(goblinAreaXgoblinAreaY5);
        
        
    int deathAreaX[] = new int[]{3229,3226,3217,3217,3226};
        
    int deathAreaY[] = new int[]{3219,3209,3210,3229,3228};
        
    Polygon deathArea = new Polygon(deathAreaXdeathAreaY5);
        
        public 
    double getVersion() {
                return 
    1.0;
            }
            
            public 
    String getName() {
                    return 
    "RuskisGoblin";
            }
        
            public 
    String getAuthor() {
                    return 
    "Ruski";
            }
        
            public 
    String getScriptCategory() {
                    return 
    "Ruski/Combat";
            }
            
            public 
    boolean onStart(Map<StringStringargs) {            
                
                return 
    true;
            }
            
            public 
    void onFinish() {
            
            }
            
            public 
    void selectActionState() {            
                if(
    playerInArea(goblinArea)) {
                    
    ActionState KILLGOBLIN;
                }
                
                if(
    playerInArea(deathArea)) {
                    
    ActionState DEATHWALK;
                }           
                
                if(!
    playerInArea(goblinArea) && distanceToArea(goblinAreaXgoblinAreaY) > 15 && distanceToArea(goblinAreaXgoblinAreaY) < 150) {
                    
    ActionState WALKBACK;                
                }
                
                if(
    distanceToArea(goblinAreaXgoblinAreaY) > 200 && distanceToArea(deathAreaXdeathAreaY) > 200) {
                    
    log("we are lost, stopping script");
                    
    ActionState KILLSCRIPT;
                }
            }       
            
            public 
    int loop() {
                
    selectActionState();               
                
    checkLastFight();
                
    runControl();
                switch(
    ActionState) {
                    case 
    KILLGOBLIN:                   
                        if(
    getMyPlayer().getInteracting() != null && getMyPlayer().isMoving()) {                        
                            return 
    random(200400);                        
                        }                  
                                             
                          
    RSNPC goblin getNearestFreeNPCByName("Goblin");
                          
                          if(
    goblin != null) {
                              if(
    goblin.getInteracting() != null) {
                                  return 
    random(100200);
                              }
                              if(!
    canReach(goblinfalse)) {
                                  return 
    random(300500);
                              }
                              if(
    getMyPlayer().getInteracting() == null) { 
                                  
    clickNPC(goblin"attack");            
                              }                
                              return 
    random(17002500);
                          }
                        
                        return 
    random(100200);
                        
                    case 
    DEATHWALK:
                        
    log("walking back from death");                                   
                        
    walkAlongPath(deathWalkPathArr);
                        return 
    random(100500);
                    
                    case 
    WALKBACK:
                        
    log("walking back to goblin area");
                        
    walkAlongPath(generatePath(32593235));                    
                    return 
    random(100600);            
                                            
                    case 
    KILLSCRIPT:
                        
    stopAllScripts();
                        return 
    random(100200);
                }
                
                return 
    random(200800);
            }
            
            
    /** ---------------------- METHODOLOGY ------------------------- **/
            
            
    long lastFightTime System.currentTimeMillis();        
            public 
    void checkLastFight() {
                if(
    getMyPlayer().isInCombat()) {            
                    
    lastFightTime System.currentTimeMillis();
                }
                
                if(
    System.currentTimeMillis() - lastFightTime 30000) {
                    
    log("no fights for over 30secs, walking to goblins");
                    
    lastFightTime System.currentTimeMillis();
                    
    ActionState WALKBACK;
                }
            }
            
            
            
    /********************************\
        * Boolean playerInArea( Polygon )  
        * Returns true/false if player is in area
        * by Ruski
        \********************************/
        
    public boolean playerInArea(Polygon area) {
            return 
    area.contains(new Point(getMyPlayer().getLocation().getX(), getMyPlayer().getLocation().getY()));
        }
        

        
    /********************************\
        * Integer distanceToArea( int[], int[] )  
        * Returns the distance to nearest point in area
        * by Ruski
        \********************************/
        
    public int distanceToArea(int x[], int y[]) {
            
    int lastDist 9999999;
            
            if(
    x.length <= || y.length <= 0) {
                return -
    1;
            }    
                
            for(
    int a 0x.lengtha++) {
                
    int curDist distanceTo(new RSTile(x[a], y[a]));
                if(
    curDist lastDist) {
                    
    lastDist curDist;
                }
            }
            
            return 
    lastDist;
        }
        
        
    /********************************\
        * Function waitTilStopped( ) 
        * Waits untill player is stopped running    
        \********************************/
        
    public void waitTilStopped() {
            while (
    true && isLoggedIn()) {
                if (!
    getMyPlayer().isMoving()) {
                    break;
                }
                
    wait(random(100200));
            }
        }
        
        
    /********************************\
        * Function runControl( ) 
        * Turns run on if energy is more than 20
        * by Ruski
        \********************************/
        
    public void runControl() {
            if (!
    isRunning() && getEnergy() > 20) {
                
    setRun(true);
            }
        }
        
        
    /********************************\
        * Boolean generatePath( int, int ) 
        * Creates a path to tile coords
        * by aftermath
        \********************************/
        
    public RSTile[] generatePath(int destinationXint destinationY) {
                
    int startX getMyPlayer().getLocation().getX();
                
    int startY getMyPlayer().getLocation().getY();
                
    double dxdy;
                
    ArrayList<RSTile> list = new ArrayList<RSTile>();
                
                list.
    add(new RSTile(startXstartY));
                while(
    Math.hypot(destinationY startYdestinationX startX) > 8) {
                    
    dx destinationX startX;
                    
    dy destinationY startY;
                    
    int gamble random(14,17);
                    
                    while(
    Math.hypot(dxdy) > gamble) {
                        
    dx *= .95;
                        
    dy *= .95;
                    }
                    
                    
    startX += (int) dx;
                    
    startY += (int) dy;
                    list.
    add(new RSTile(startXstartY));
                }
                list.
    add(new RSTile(destinationXdestinationY));
                return list.
    toArray(new RSTile[list.size()]);
            
            }    
        
        
    /********************************\
        * Boolean walkAlongPath( RSTile[] ) 
        * Walks/joins the path and finishes it
        * by Ruski
        \********************************/
        
    public void walkAlongPath(RSTile[] path) {
                
    int index 0;
            for (
    int i 1path.lengthi++) {
                if (
    distanceTo(path[i]) < distanceTo(path[index])) {
                    
    index i;
                }
            }
            for (
    int i indexpath.lengthi++) {
                    
    runControl();
                    
    walkTileMM(new RSTile(path[i].getX() + random(-22), path[i].getY() + random(-22)));
                    
    wait(random(300550));
                    
    waitTilStopped();
            }
        }    
        
        
    /********************************\
        * Boolean rotateCameraTo( Point ) 
        * Rotates camera to the screen location    
        * by Ruski
        \********************************/
        
    public boolean rotateCameraTo(Point p) {
            if(
    == null) {
                return 
    false;
            }
            
    int currentAngle getCameraAngle();
            
            
    int curAltitude Bot.getClient().getCamPosZ();
            
            if(
    curAltitude 40)  { 
                
    setCameraAltitude(random(2040)); 
            }
            
            if(
    p.getX() > 1000 || p.getX() < -1000 || p.getY() > 800 || p.getY() < -800) {
                return 
    false;
            }        
            
            if(
    p.getX() > 400) {
                if(
    p.getY() < 168) {
                    
    setCameraRotation(currentAngle 45);
                    return 
    true
                }
                if(
    p.getY() >= 168) {
                    
    setCameraRotation(currentAngle 135);
                    return 
    true
                }
            }    
            
            if(
    p.getX() < 100) {
                if(
    p.getY() < 168) {
                    
    setCameraRotation(currentAngle 45);
                    return 
    true
                }
                if(
    p.getY() >= 168) {
                    
    setCameraRotation(currentAngle 125);
                    return 
    true
                }
            }
            
            if(
    p.getX() > 90 && p.getX() < 410) {            
                if(
    p.getY() > 325) {
                    
    setCameraRotation(currentAngle 180);
                    return 
    true
                } 
                if(
    p.getY() < 10) {
                    
    setCameraAltitude(curAltitude random(15));
                    return 
    true;
                }
            }
            return 
    false;        
        }
        
        
    /********************************\
        * Boolean clickNPC( RSNPC, String ) 
        * Modified mouse click for faster performance
        * by Ruski
        \********************************/    
        
    private boolean clickNPC(RSNPC npcString action) {
            if (
    npc == null) {
                return 
    false;
            }
            
    RSTile tile npc.getLocation();
            if (!
    tile.isValid()) {
                return 
    false;
            }

            try {
                
    Point screenLoc npc.getScreenLocation();
                if (
    distanceTo(tile) > || !pointOnScreen(screenLoc)) {
                    
    turnToTile(tile);
                }
                if (
    distanceTo(tile) > 20) {
                    
    walkTileMM(tile);
                    return 
    false;
                }
                for (
    int i 012i++) {
                    
    screenLoc npc.getScreenLocation();
                    if (!
    npc.isValid() || !pointOnScreen(screenLoc)) {
                        return 
    false;
                    }
                    
    moveMouse(screenLoc55);
                    if (
    getMenuItems().get(0).toLowerCase().contains(npc.getName().toLowerCase())) {
                        break;
                    }
                    if (
    getMouseLocation().equals(screenLoc)) {
                        break;
                    }
                }
                List<
    StringmenuItems getMenuItems();
                if (
    menuItems.isEmpty()) {
                    return 
    false;
                }
                for (
    int a 0menuItems.size(); a++) {
                    if (
    menuItems.get(a).toLowerCase().contains(npc.getName().toLowerCase())) {
                        if (
    menuItems.get(0).toLowerCase().contains(action.toLowerCase())) {
                            
    clickMouse(true);
                            return 
    true;
                        } else {
                            
    clickMouse(false);
                            return 
    atMenu(action);
                        }
                    }
                }
            } catch (
    Exception e) {
                
    System.out.print("clickNPC(RSNPC, String) error: " e);
                return 
    false;
            }
            return 
    false;
        }
            
    }
     
  13. Unread #7 - Nov 24, 2008 at 5:57 PM
  14. dedmantalk
    Referrals:
    0

    dedmantalk Guest

    Anyone got a good RSBOT SCRIPT for auto attacking?

    go on rsbot.org
     
< Minimizable Bots? | Runescape No trade limit returning? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site