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.

Why do my scripts get stuck in a state after I add paint?

Featured Replies

Hey guys,

 

I've made a few scripts now for personal use and what not and eventually I'd quite like to be decent enough to share it around on the SDN, but I've noticed I have the same issue in virtually all of the scripts. They all work perfectly fine right up until the moment I add my paint to the script at which point it usually executes 4/5's properly and get's jammed in a state.

 

In this instance, my character cuts the logs fine, walks to the bank and gets stuck standing there in the WALK2BANK state constantly outputting "Walking to Bank" in the log. I just can't see my error and I'd absolutely love a second set of eyes.

Code removed, thank you to all for assistance. 

Any and all feedback is appreciated, both on my in general code and my issue. I'm headed off to bed now so I'll check responses tomorrow. I hugely appreciate everyone's help in advance. 

Edited by omni4life

It's you area class make sure you set it up correctly. If you want get the area. Grab all its tiles. Then display the area on the screen. That's how I would do it. Or do a simple log check if you area within the area.

Perhaps the walking distance threshhold is messing with you. There's a default distance threshhold in the localwalker (idr what it is exactly) at which it wont try walking to the destination if you're within that accepted distance (6 tiles for example)

 

To see if this is the problem, try manually lowering the distance threshhold.

Eg.

WalkingEvent wEvt = new WalkingEvent(bankPos);

wEvt.setMinDistanceThreshhold(0);

execute(wExt);

 

In any case, it's not related to your paint

Your script looks fine in general. The only thing is if you don't want to do so many skill calculations. You can use the experience tracker. It pretty much does all that except give you the start lvl nor the start exp.

  • Author

 

In any case, it's not related to your paint

You're right, silly error. the localWalker walked me to the tile exactly beside the right side of the bank chest which I hadn't included in my bankArea so when the the banking state was checking for my player to be in bank area, it was never executed! Thank's for everyones help!

 

 

Your script looks fine in general. The only thing is if you don't want to do so many skill calculations. You can use the experience tracker. It pretty much does all that except give you the start lvl nor the start exp.

I'll toy around with that one when I get home this evening :)! There are so many functions hidden away in the API I'm really struggling to know what to use and when. Thanks for the feedback!

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.