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.

GF Buyer! | OSBOT's first girlfriend buyer!

Featured Replies

Just give this Diamond rings and watch how many girlfriends you can get!

Bot spams "Buying gf" and waits for a trade.

 

I told you @Juggles , I'd come up with a good meme to compete with your bot reporting bot. 

 

import java.awt.event.KeyEvent;

import org.osbot.rs07.api.map.constants.Banks;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.ConditionalSleep;

@ScriptManifest(author = "Malcolm", info = "Buys GF", name = "BF Buyer", version = 1.0, logo = "")
public class Main extends Script {

    long tradeTime;

    public int onLoop() throws InterruptedException {
        if (getInventory().contains("Diamond ring")) {
            if (!Banks.GRAND_EXCHANGE.contains(myPlayer())) {
                getWalking().webWalk(Banks.GRAND_EXCHANGE.getRandomPosition());
            } else {
                if (!getTrade().isCurrentlyTrading()) {
                    typeStringInstant("cyan: Buying gf!");
                    sleep(random(3000, 4000));
                    if (getTrade().getRequestListener() != null) {
                        if (getTrade().getLastRequestingPlayer() != null) {
                            if (getTrade().getLastRequestingPlayer().interact("Trade with")) {
                                tradeTime = System.currentTimeMillis();
                                new ConditionalSleep(10000) {
                                    @Override
                                    public boolean condition() throws InterruptedException {
                                        return getTrade().isCurrentlyTrading();
                                    }
                                }.sleep();
                            }
                        }
                    }
                } else {
                    if (getWidgets().getTrade().isFirstInterfaceOpen()) {
                        if (System.currentTimeMillis() > (tradeTime + 30000)) {
                            if (getTrade().declineTrade()) {
                                new ConditionalSleep(10000) {
                                    @Override
                                    public boolean condition() throws InterruptedException {
                                        return !getTrade().isCurrentlyTrading();
                                    }
                                }.sleep();
                            }
                        } else {
                            long dringAmount = getInventory().getAmount("Diamond ring");
                            if (getTrade().offer("Diamond ring", 1)) {
                                new ConditionalSleep(40000) {
                                    @Override
                                    public boolean condition() throws InterruptedException {
                                        return dringAmount != getInventory().getAmount("Diamong ring");
                                    }
                                }.sleep();
                                if (getTrade().acceptTrade()) {
                                    new ConditionalSleep(40000) {
                                        @Override
                                        public boolean condition() throws InterruptedException {
                                            return getTrade().isSecondInterfaceOpen();
                                        }
                                    }.sleep();
                                }
                            }
                        }
                    } else if (getTrade().isSecondInterfaceOpen()) {
                        if (getTrade().didOtherAcceptTrade()) {
                            mouse.move(220, 300);
                            sleep(random(300, 600));
                            mouse.click(false);
                            new ConditionalSleep(40000) {
                                @Override
                                public boolean condition() throws InterruptedException {
                                    return !getTrade().isSecondInterfaceOpen();
                                }
                            }.sleep();
                            typeStringInstant("cyan: We are now married! Love you!");
                        }
                    }
                }
            }
        } else {
            log("No more rings! Stopping script");
            stop();
        }

        return 1000;

    }

    private void typeStringInstant(String output) {

        for (int i = 0; i < output.length(); i++) {

            char c = output.charAt(i);
            int code = KeyEvent.getExtendedKeyCodeForChar(c);
            getBot().getKeyEventHandler().generateBotKeyEvent(400, System.currentTimeMillis(), 0, code, c);
        }

        getBot().getKeyEventHandler().generateBotKeyEvent(401, System.currentTimeMillis(), 0, 10, '\u0000');
        getBot().getKeyEventHandler().generateBotKeyEvent(402, System.currentTimeMillis(), 0, 10, '\u0000');
    }

}

NOTE: at the time of writing there was an issue with the API and it did not wan't to accept the second screen.

This section:

                            mouse.move(220, 300);
                            sleep(random(300, 600));
                            mouse.click(false);

Should be:

if (getTrade().acceptTrade()) {

 

 

 

I don't think this is the first one actually.

3 hours ago, Malcolm said:

Profit? Girls are a cash sink.


???

 

Couldn't agree more. Nice work mate and thanks for the open source :)

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.