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.

Warriors Guild Auto Shotpu

Featured Replies

First real script iv made for OSBot, pretty simple. Fill your inventory with super energy pots and stand in shotput circle. Run the script and it will autoplay the shotput minigame untill you run out of super energy pots. Good for quick amounts of tokens for getting defenders.

 

 

import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

import java.awt.*;

@ScriptManifest(name = "ShotPutter", author = "Kanye", version = 1.0, info = "", logo = "")
public class main extends Script {
    private State currentState = State.selectBalls;
    private int currentHealth = -1;

    @Override
    public void onStart() {
        // Code here will execute before the loop is started

    }

    @Override
    public void onExit() {
        // Code here will execute after the script ends

    }

    @SuppressWarnings("unused")
    private State getState() {
        if (currentState == State.drinkPotion) {

        }
        return State.drinkPotion;
    }

    private enum State {
        selectBalls, selectThrow, throwing, drinkPotion;
    }

    private State lastState;
    private int waitCount = 0;
    private int newHealth = -1;

    @Override
    public int onLoop() throws InterruptedException {
        if (lastState != currentState) {
            log(currentState.toString());
        }
        lastState = currentState;
        if (currentState == State.selectBalls) {
            if (dialogues.inDialogue() == true) {
                currentState = State.selectThrow;
            } else {
                Entity ballPile = objects.closest(15665);
                if (waitCount == 0 || waitCount >= 30) {
                    ballPile.interact("Throw");
                    waitCount = 0;
                }
                waitCount++;
            }
        } else if (currentState == State.selectThrow) {
            currentHealth = getSkills().getDynamic(Skill.HITPOINTS);
            log(currentHealth);
            sleep(random(600, 1200));
            if (dialogues.inDialogue() == true) {
                dialogues.selectOption(1);
                currentState = State.throwing;
            }
        } else if (currentState == State.throwing) {
            if (newHealth == -1) {
                newHealth = getSkills().getDynamic(Skill.HITPOINTS);
                if (newHealth > currentHealth) {
                    currentHealth--;
                    log("Current health - 1!!!!!!");
                }

            }
            newHealth = getSkills().getDynamic(Skill.HITPOINTS);
            log(newHealth);
            if (newHealth < currentHealth) {
                currentState = State.drinkPotion;
            }
            myPlayer().getHealth();
            sleep(random(600, 1200));
            if (dialogues.inDialogue() == true
                    && currentState == State.throwing) {
                dialogues.clickContinue();
                currentState = State.drinkPotion;
            }
        } else if (currentState == State.drinkPotion && !dialogues.inDialogue()) {
            newHealth = -1;
            sleep(random(100, 300));
            if (inventory.contains(3022))
                inventory.getItem(3022).interact("Drink");
            else if (inventory.contains(3020))
                inventory.getItem(3020).interact("Drink");
            else if (inventory.contains(3018))
                inventory.getItem(3018).interact("Drink");
            else if (inventory.contains(3016))
                inventory.getItem(3016).interact("Drink");
            else
                stop(true);
            sleep(random(100, 300));
            currentState = State.selectBalls;

        }

        return random(100, 300); // The amount of time in milliseconds before
                                    // the loop starts
        // over
    }

    @Override
    public void onPaint(Graphics2D g) {
        // This is where you will put your code for paint(s)

    }

}

 

Oh i remember doing this years ago when i went for my first rune defender :D. Whats the Points p/hr rate on this?

  • Author

I have no pictures maybe il update post with one later. It has no progress report overlay or anything. I literally made this in an hour or two. It works fucking all good though.


I've also tried to make it not seem like a bot really. I'd think itd be pretty safe.

 

If people are interested il make a graphic for it with points and hour, with banking etc. But only if people actually care cuz its effort.

Edited by KanyeWest69

Change the potion to what potion you are using and remove the 'sA.' because it is in your main class. Makes checking/Drinking potions cleaner :)

 public void drinkPotion() throws InterruptedException {
        if (invContainsPotion()) {
            if (sA.getInventory().interactWithNameThatContains(
                    "Drink", "Overload")) {
            }
        }
    }

    public boolean invContainsPotion() {
        for (int i = 0; i <= 4; i++) {
            if (sA.getInventory().contains("Overload (" + i + ")")) {
                return true;
            }
        }
        return false;
    }
  • Author

 

Change the potion to what potion you are using and remove the 'sA.' because it is in your main class. Makes checking/Drinking potions cleaner smile.png

 

 

True dat. Also made script that jst drinks prayer pots and overloads for nmz. Theres quite a bunch of things I could do nicer tbh. Just made these for something to do and to see if people are interested.

True dat. Also made script that jst drinks prayer pots and overloads for nmz. Theres quite a bunch of things I could do nicer tbh. Just made these for something to do and to see if people are interested.

 

aha fair enough

  • 2 weeks later...

how do you use this script i've got a mac and have no idea but would love to use it?

  • 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.