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

trade.acceptTrade() clicking wrong button?

Featured Replies

Hey guys :) I've noticed this can happen sometimes, usually after account is running for a longer time when calling:

trade.acceptTrade();

Instead of accepting the trade, it clicks on decline button instead, not even clicking but just hover it and returns true despite.

Any ideas what could be the cause of this?

Thanks!

Never happened to me tbh.  Though the main cause I would say is lag. 

if (trade.isFirstInterfaceOpen() {
// DO Trade
trade.acceptTrade();
} else if (trade.isSecondInterfaceOpen()) {
trade.acceptTrade();
}

Using more or less this structure

  • Author

Most likely yeah, doesn't happen always but just sometimes. I'm running about 35+ clients.

Hmm, I'm using conditional loop, but since it returns true even if it doesn't behave correctly its kinda useless :/

 

new ConditionalLoop(getBot(), 3)
{
    @Override
    public boolean condition()
    {
        return !trade.acceptTrade();
    }
}.start();
private void acceptTrades() {
		if (trade.isFirstInterfaceOpen() && trade.didOtherAcceptTrade()) {
			log("Accepting first trade");
			gpmade = gpmade + Math.toIntExact(trade.getTheirOffers().getAmount("Coins"));
			trade.acceptTrade();
			new ConditionalSleep(10000) {

				@Override
				public boolean condition() throws InterruptedException {
					return trade.isSecondInterfaceOpen();
				}
			}.sleep();
		} else if (trade.isSecondInterfaceOpen()) {
			log("Accepting second trade");
			trade.acceptTrade();
			new ConditionalSleep(10000) {

				@Override
				public boolean condition() throws InterruptedException {
					return !trade.isCurrentlyTrading();
				}
			}.sleep();
		}
	}

Thats mine, works everytime i dont run 35+ clients but i have tested it on 10 running for a few days and not one problem

  • Author
4 minutes ago, whipz said:

private void acceptTrades() {
		if (trade.isFirstInterfaceOpen() && trade.didOtherAcceptTrade()) {
			log("Accepting first trade");
			gpmade = gpmade + Math.toIntExact(trade.getTheirOffers().getAmount("Coins"));
			trade.acceptTrade();
			new ConditionalSleep(10000) {

				@Override
				public boolean condition() throws InterruptedException {
					return trade.isSecondInterfaceOpen();
				}
			}.sleep();
		} else if (trade.isSecondInterfaceOpen()) {
			log("Accepting second trade");
			trade.acceptTrade();
			new ConditionalSleep(10000) {

				@Override
				public boolean condition() throws InterruptedException {
					return !trade.isCurrentlyTrading();
				}
			}.sleep();
		}
	}

Thats mine, works everytime i dont run 35+ clients but i have tested it on 10 running for a few days and not one problem

Hey, I had something similar prior running so many clients and worked just perfectly, the issue occured only when running as much... I made it with conditional sleeps and loops now and seems to be working so far :D 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.