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.

Handling misclicks.

Featured Replies

For example im running my banking method. i open bank and sleepunitl bank open.

How would u handle if it misclicks the bank and then it will skip the rest of my code that should run if bank is open?

 

I know probably a stupid question just wondering how other people handle stuff like this.

i guess everything runs on a loop and is if else statements? so if it misses something it comes back to it?

Edited by saintpaul1

3 hours ago, saintpaul1 said:

How would u handle if it misclicks the bank and then it will skip the rest of my code that should run if bank is open?

1 interaction per cycle of the loop, or you only add a isBankOpen check, if you're too lazy to actually plan out/redo a stable script

If you wrap the interactions correctly, you don't have to worry so much about this. The code loops all the time, and this is quick. If you are worried about the sleep timer being too long, then you could try this:

Use custom checks with timers/bools. The two checks you have to watchout for is if the player is moving and a bank booth / bank chest / grand exchange bank booth is visible (or if they are reachable -- up to you). Just reset a timer when those conditions are met separately from your bank interaction.

For the open bank ineraction, just sleep until the "open" bool = true, but don't add a long conditional sleep.

Here is a rough example (Im not gonna write in the specifics)

Define the isVisible variables first, then:

if ((isMoving && BankBoothisVisible) || (isMoving && BankChestisVisible) || (isMoving && GrandExchangeBoothisVisible)) {
    timer = System.currentTimeMillis();
}

For the next portion, just check for the timer and "open" bools, then do aconditional sleep until bool "open" comes back as true coupled with your open bank interaction. This sleep shouldnt be too long since you are already checking for whether the bot is moving and reseting a timer.

Edited by FushigiBot

  • Author
6 hours ago, Gunman said:

1 interaction per cycle of the loop, or you only add a isBankOpen check, if you're too lazy to actually plan out/redo a stable script

ah okay thank you!

 

4 hours ago, FushigiBot said:

If you wrap the interactions correctly, you don't have to worry so much about this. The code loops all the time, and this is quick. If you are worried about the sleep timer being too long, then you could try this:

Use custom checks with timers/bools. The two checks you have to watchout for is if the player is moving and a bank booth / bank chest / grand exchange bank booth is visible (or if they are reachable -- up to you). Just reset a timer when those conditions are met separately from your bank interaction.

For the open bank ineraction, just sleep until the "open" bool = true, but don't add a long conditional sleep.

Here is a rough example (Im not gonna write in the specifics)

Define the isVisible variables first, then:

if ((isMoving && BankBoothisVisible) || (isMoving && BankChestisVisible) || (isMoving && GrandExchangeBoothisVisible)) {
    timer = System.currentTimeMillis();
}

For the next portion, just check for the timer and "open" bools, then do aconditional sleep until bool "open" comes back as true coupled with your open bank interaction. This sleep shouldnt be too long since you are already checking for whether the bot is moving and reseting a timer.

okay that gives me some ideas, thank you very much.

  • Author
On 4/26/2023 at 2:43 AM, Gunman said:

1 interaction per cycle of the loop, or you only add a isBankOpen check, if you're too lazy to actually plan out/redo a stable script

Just to come back to this thread, since listening to what u said and only perfroming 1 interaction per cycle, my code is much better. Thank you.

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.