Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fighter

Featured Replies

mDZdCJM.png

 

 

fights anything

eats any food

paint exp and time tracker

 

 

if you want something added let me know

 

downloads

https://www.mediafire.com/?8p9byab9r1o3lap

 

progry

g2I1qNT.png

 

HEgosBm.png

 

8yee8Pg.png

 

 

Source codes

/**
 * Created by TFW on 04/14/2016.
 */
@ScriptManifest(author = "TFW", info = "Fights anything", name = "TFW Fighter", version = 0.196, logo = "http://i.imgur.com/mDZdCJM.png")
public class Fighter extends Script {
    LinkedList<MousePathPoint> mousePath = new LinkedList<MousePathPoint>();
    private FighterGUI gui;
    private int r = 255;
    private int g = 0;
    private int b = 0;
    public String toAttack;
    public boolean eatFood;
    private long startTime;
    private NPC getNpcWhere;
    private Position startTile;

    @Override
    public void onStart() throws InterruptedException {
        this.startTile = myPlayer().getPosition();
        getExperienceTracker().startAll();
        startTime = System.currentTimeMillis();
        this.gui = new FighterGUI();
        gui.setVisible(true);
        while (gui.isVisible()){
            sleep(200);
        }
        this.toAttack = gui.getToAttack();
        this.eatFood = gui.isDoFood();
        log("NPC: " + toAttack);
        log("Eat Food: " + "[" + eatFood + "]");
        log("Starting Point: [" + startTile + "]");
        log("======================================================================");
        log("Welcome to [" + getName() + "] " + "by " + getAuthor() + ". You are currently running Version " + getVersion() + ".");
        log("======================================================================");
    }

    @Override
    public int onLoop() throws InterruptedException {
        getNpcWhere = getNpcs().closest(true, npc -> npc.getName().toLowerCase().equals(toAttack) && npc.isAttackable() && npc.getHealthPercent() > 0 && getMap().canReach(npc));

        if (myPlayer().getInteracting() == null && getNpcWhere != null && startTile.isOnMiniMap(getBot())){
            if (getNpcWhere.getPosition().distance(myPosition()) <= 7){
                InteractionEvent attackNpc = new InteractionEvent(getNpcWhere, "Attack"); //call interaction event
                attackNpc.setWalkTo(false); //turn off walking
                attackNpc.setOperateCamera(true); //enable camera
                execute(attackNpc);
                new ConditionalSleep(6000, 600) {
                    @Override
                    public boolean condition() throws InterruptedException {
                        return myPlayer().getInteracting() != null;
                    }
                }.sleep();
                getMouse().moveSlightly(random(500));
            } else {
                WalkingEvent walkToNpc = new WalkingEvent(getNpcWhere.getPosition()); //call the walking event
                walkToNpc.setBreakCondition(new Condition() {
                    @Override
                    public boolean evaluate() {
                        return getNpcWhere.getPosition().distance(myPosition()) <= 4;
                    }
                });
                execute(walkToNpc);
                log("Walking to " + getNpcWhere.getName() + " @ " + getNpcWhere.getPosition());
            }
        }

        if (myPlayer().getInteracting() != null && getCombat().isFighting() && !lowHealth()){
            new ConditionalSleep(20000, 600) {
                @Override
                public boolean condition() throws InterruptedException {
                    return myPlayer().getInteracting() == null || lowHealth();
                }
            }.sleep();
        }

        if (eatFood && lowHealth()){
            if (gotFood()){
                for (Item i : getInventory().getItems()) {
                    if (i != null && i.hasAction("Eat")) {
                        if (!getTabs().getOpen().equals(Tab.INVENTORY)) getTabs().open(Tab.INVENTORY);
                        i.interact("Eat");
                        new ConditionalSleep(3000, random(600, 1200)) {
                            @Override
                            public boolean condition() throws InterruptedException {
                                return myPlayer().getAnimation() == 829;
                            }
                        }.sleep();
                        break;
                    }
                }
            } else {
                //stop no food
                stop(false);
            }
        }

        return random(600, 900);
    }

    @Override
    public void onExit() {
        long runTime = System.currentTimeMillis() - startTime;
        log("======================================================================");
        log("Thank you for using [" + getName() + "] " + "by" + " [" + getAuthor() + "].");
        log("======================================================================");
        log("Time Ran: " + formatTime(runTime));
    }

    @Override
    public void onPaint(Graphics2D gfx) {
        long runTime = System.currentTimeMillis() - startTime;
        gfx.drawString("Runtime: "+formatTime(runTime), 15, 40);
        gfx.drawString("Attack: " + getExperienceTracker().getGainedXP(Skill.ATTACK), 15, 65);
        gfx.drawString("Strength: " + getExperienceTracker().getGainedXP(Skill.STRENGTH), 15, 80);
        gfx.drawString("Defence: " + getExperienceTracker().getGainedXP(Skill.DEFENCE), 15, 95);
        gfx.drawString("Range: " + getExperienceTracker().getGainedXP(Skill.RANGED), 15, 110);
        gfx.drawString("Magic: " + getExperienceTracker().getGainedXP(Skill.MAGIC), 15, 125);

        while (!mousePath.isEmpty() && mousePath.peek().isUp())
            mousePath.remove();
        Point clientCursor = mouse.getPosition();
        MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, 500);
        if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp))
            mousePath.add(mpp);
        MousePathPoint lastPoint = null;
        for (MousePathPoint a : mousePath) {
            if (lastPoint != null) {
                gfx.setColor(nextColor());
                gfx.drawLine(a.x, a.y, lastPoint.x, lastPoint.y);
            }
            lastPoint = a;
        }

        gfx.drawLine(clientCursor.x - 4, clientCursor.y, clientCursor.x + 4, clientCursor.y);
        gfx.drawLine(clientCursor.x, clientCursor.y - 4, clientCursor.x, clientCursor.y + 4);
    }

    /**
     * Methods
     */

    /** PAINT SHIT
     *
     */

    public void nextRGB() {
        if ( r == 255 && g < 255 && b == 0 )
        {
            g++;
        }
        if ( g == 255 && r > 0 && b == 0 )
        {
            r--;
        }
        if ( g == 255 && b < 255 && r == 0 )
        {
            b++;
        }
        if ( b == 255 && g > 0 && r == 0 )
        {
            g--;
        }
        if ( b == 255 && r < 255 && g == 0 )
        {
            r++;
        }
        if ( r == 255 && b > 0 && g == 0 )
        {
            b--;
        }
    }

    public Color nextColor() {
        nextRGB();
        return makeColor();
    }

    public Color makeColor() {
        return new Color(r, g, b);
    }


    public String formatTime(long ms){

        long s = ms / 1000, m = s / 60, h = m / 60;
        s %= 60; m %= 60; h %= 24;
        return String.format("%02d:%02d:%02d", h, m, s);
    }

    public boolean lowHealth(){
        return getSkills().getDynamic(Skill.HITPOINTS) <= (getSkills().getStatic(Skill.HITPOINTS) * 0.50);
    }

    public boolean gotFood() {
        return getInventory().contains(getEdible().getName());
    }

    public Item getEdible() {
        return getInventory().getItem(item -> item != null && item.hasAction("Eat"));
    }


}


Edited by TFW

  • Author

i litteraly have one like that for myself lol laugh.png thought about releasing it as a jar, since i only really use it for slayer because my obby tank is sooooo slow with slayer (1 atk)

 

 

 

df68bc247c.png

 

Nice happy.png . I let it auto find food in the inventory tongue.png & just make user type in a name smile.png

Edited by TFW

i litteraly have one like that for myself lol laugh.png thought about releasing it as a jar, since i only really use it for slayer because my obby tank is sooooo slow with slayer (1 atk)

 

 

Name in img

  • Author

Might try this 1.

 

Let me know if you find any problems. I ran it for 2 hours just fine

  • Author

will this get me banned

Yes. x10 as fast

  • 1 month later...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.