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.

Script stacking somehow

Featured Replies

I have a script and it works perfectly fine to begin with, but eventually after its been running for a bit it will start to execute things twice. I can tell it's doing that because the log() messages I have placed throughout the script output twice instead of once. As well as that, it will start to execute tasks poorly and begin to misclick/take longer. 

E.g I have it so it opens packs of items and it works fine, but once this stacking occurs it will click randomly all over the place and misses half the items. 

I'm not sure how this is occuring or how to fix it. Seems like it's executing the script twice. Even if I stop the script and restart it, it can carry over. The most reliable fix has been to shut off the whole client and start again

This is not a sleep error, I have sleeps everywhere. Note, this only occurs after some time has passed it does not occur for the first hour or so that I'm using the script

Edited by ding777

  • Author

Not at this moment, I'm wondering if this has occurred for anyone else or if anyone knows any fixes just from reading what I've put.

My script does a lot of things, there would be too much code to paste in the first place.

It basically sets up accounts, then does a specific thing when they are setup all into one script. Does tutorial, levels up, etc

Edited by ding777

I'm not sure if you have created threads but that's one way of the program 'carrying on' once you've stopped the bot.

Don't think you can get much help without posting some source. In any case, I can only imagine the your source is a bit of a mess if you can't debug it yourself.

  • Author

I'm not running threads. There should be no reason it begins to run the script twice, while it's already running. Everything works perfectly fine with no delay to begin with, so that's what is frustrating about this problem.

  • Author

I'm under the impression no one's script has ever stacked like this before, since no one seems to know what's going on

I actually noticed this problem too but only after pausing the script and resuming again.

This can happen if you have really long executing loops, the script executor will assume its hung then start a new instance. Most likely its due to the design of your script.

5 hours ago, ding777 said:

I'm under the impression no one's script has ever stacked like this before, since no one seems to know what's going on

 

4 hours ago, Lemons said:

This can happen if you have really long executing loops, the script executor will assume its hung then start a new instance. Most likely its due to the design of your script.

This is most likely your problem, as I’ve experienced it as well. If there are loops, try to get a fail safe in place to make sure you exit the loop.

Until you show us your code, there's not really much we can do to help troubleshoot the problem.

But I'm guessing you've got a loop in a loop.

  • You're looping through all the packs of item in your inventory and interacting with each one.
  • As time progresses - and maybe Low CPU mode is set - the bot's time to run logic and execute actions are kind of crossing each other.
  • Your bot shoots off an event to open a bunch of items that are no longer present, because at the moment that logic check was performed, it was true.
  • Loops being loops, they don't care for logic and simply does what it's tasked to do before the main script loop can start anew.
  • You're not performing checks inside your loop to ensure items that were valid are still valid before interacting with them.

Show us some damn code.

Edited by liverare

I've had unexpected behaviour in the past when running the same script on multiple tabs in the same client.

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.