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.

how would you trade between two bots

Featured Replies

By passing me some gp and you will be able to trade between two bots handsfree

You implement muling between them or just trading.

 

Crazy that no-one helped, just a lot of name calling. I've never done this but I'd imagine that instead of interacting with npc "attack" you'd interact with player "trade" and then use widgets. If I had code example I'd share. 

I stopped scripting when osbot robbed my little bro. 

This is by no means perfect and it isn't even tested. Wrote it in 5 minutes to give you an idea of a simple flow. I don't recommend copy/pasting it as I left some stuff out that makes it pretty susceptible to luring. 

int trade(String target, String itemExpected, int amountExpected, String toSend, int amountToSend, boolean send) {
        if(!trade.isCurrentlyTrading()) { // Accepting the trade via chatbox will be in the listener...
            if(send) {
                Player player = players.closest(target);
                if (player != null) {
                    if (player.interact("Trade with")) {
                        sleepWhile(new Condition() {
                            @Override
                            public boolean evaluate() {
                                return !trade.isCurrentlyTrading();
                            }
                        }, 30000); // Waits for a max of 30 seconds
                        return 100;
                    }
                }
            }
        } else {
            if(trade.isFirstInterfaceOpen()) {
                if(!trade.getOurOffers().contains(toSend)) {
                    trade.offer(toSend, amountToSend);
                } else if(trade.getOurOffers().getItem(toSend).getAmount() != amountToSend) {
                    if(trade.getOurOffers().contains(toSend)) {
                        trade.removeAll(toSend);
                    } else {
                        trade.offer(toSend, amountToSend);
                    }
                } else if(trade.getTheirOffers().contains(itemExpected) && trade.getTheirOffers().getItem(itemExpected).getAmount() >= amountExpected) {
                    trade.acceptTrade();
                }
            } else if(trade.isSecondInterfaceOpen()) {
                //Check their stuff just in case
                if(trade.getTheirOffers().contains(itemExpected) && trade.getTheirOffers().getItem(itemExpected).getAmount() >= amountExpected) {
                    trade.acceptTrade();
                }
            }
        }
        return 1000;
    }

    //Usage
    trade("Bot123321", "Coins", 5000000, "Cowhide", 342, true); //Do this for the bot that will SEND the trade
    trade(null, "Cowhide", 342, "Coins", 5000000, false); // This is prone to people abusing it, but you can figure out why...

    @Override
    public void onMessage(Message g) throws InterruptedException {
        if(g.getType().equals(Message.MessageType.RECEIVE_TRADE)) {
            mouse.click(0,0,false); //this is for the bot receiving the trade. you COULD probably just have them trade each other if you want to make it easier (Also, figure out the x,y yourself)
        }
    }

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.