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.

Code not listening to meh.

Featured Replies

ok so 

i

  if (x != null && !myPlayer().isMoving()) {
                            log("Walking to x!");
                            map.walk(x);
                            sleep(random(250, 350));
                    }

clicks once whilst idol then the moment i start moving spams the hell out of the mini map biggrin.png

and also 

if (!myPlayer().isAnimating()) {
    //Do something that causes it to animate
    //sleep
}

keeps spamming on doing the 

//Do something that causes it to animate

//no sleep

during animation.

 

this is all in main loop.

 

 

Edited by Isolate

  • Author

That weird biggrin.png

 

Are you using latest version of osbot to start with?

Mind putting the whole class in here?

 

Khaleesi

Found the problem anyways.

Its just in the walking method itself, it appears to not return or move on until it reaches its destination.

so once started it does go back to the top check it just loops the step method inside that method :/.

Fixed it by alter a custom walking method to what i needed :D

 

and naa I'd prefer people not to rip apart my code only based on the fact i might not follow conventions :P

 

Found the problem anyways.

Its just in the walking method itself, it appears to not return or move on until it reaches its destination.

so once started it does go back to the top check it just loops the step method inside that method :/.

Fixed it by alter a custom walking method to what i needed biggrin.png

 

and naa I'd prefer people not to rip apart my code only based on the fact i might not follow conventions tongue.png

 

 

Its always good to follow conventions and let people give you tips and feedback on how your code is structured. Use scripting as a learning curve (trust me it can be a huge one if you let it) not only as something to just do your work for you in RS.

Of course the first one spam clicks. You are telling your script to walk to x no matter what. If you added a check in there saying to only walk to x if your not already at x, then it would work. As for the second one, I'm guessing it's something with the code in the statement. Since you never post your code we can't help. ^_^

  • Author

Its always good to follow conventions and let people give you tips and feedback on how your code is structured. Use scripting as a learning curve (trust me it can be a huge one if you let it) not only as something to just do your work for you in RS.

I use conventions in class and sometimes i brush over a script and put them all in place i need to post but if everything runs well

i wont bother, its just another thing to take up time.

 

Of course the first one spam clicks. You are telling your script to walk to x no matter what. If you added a check in there saying to only walk to x if your not already at x, then it would work. As for the second one, I'm guessing it's something with the code in the statement. Since you never post your code we can't help. happy.png

as stated the problem has been found.

yes in my code there are other checks around the bit i posted 

but the whole time the walk method starts walking to the point

it spams the spot, when it gets there the script continues as should

its just that the osbot api has no check for if moving in its walking function that seems to be in play causing any check i do for walking to be nulled

I use conventions in class and sometimes i brush over a script and put them all in place i need to post but if everything runs well

i wont bother, its just another thing to take up time.

as stated the problem has been found.

yes in my code there are other checks around the bit i posted

but the whole time the walk method starts walking to the point

it spams the spot, when it gets there the script continues as should

its just that the osbot api has no check for if moving in its walking function that seems to be in play causing any check i do for walking to be nulled

You can add a check. There is a method to get your current minimap destination. For example, only click the next tile of you are < 4 tiles from the current destination. I made my own walker and used something like this in it.

  • Author

You can add a check. There is a method to get your current minimap destination. For example, only click the next tile of you are < 4 tiles from the current destination. I made my own walker and used something like this in it.

 

 

Found the problem anyways.

Its just in the walking method itself, it appears to not return or move on until it reaches its destination.

so once started it does go back to the top check it just loops the step method inside that method :/.

Fixed it by alter a custom walking method to what i needed biggrin.png

 

 

Guest
This topic is now closed to further replies.

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.