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.

Smithing sleep not working

Featured Replies

2 minutes ago, kadiem said:

didn't get you, what do you mean?

A conditional sleep basically sleeps until either the timeout expires or your condition returns as true. If you have your condition as your player not animating, it'll return true instantly as there's a slight delay. You want it to sleep up until your player is animating.

  • Author

So how do i type the code you just confused me, because as i understand the the condition is if the player is animating the bot will sleep and i wrote player.isAnimating() so why the bot still working?

Edited by kadiem

11 minutes ago, kadiem said:

So how do i type the code you just confused me, because as i understand the the condition is if the player is animating the bot will sleep and i wrote player.isAnimating() so why the bot still working?

Probably because you've written it wrong. Just use myPlayer()

  • Author

removed the !, still not working

if(furnacearea.contains(player)){
                    //Make rings
                    Goldbar.interact("Use");
                    furnace.interact("Use");
                    sleep(random(1000,1500));
                    getWidgets().get(446,8).interact("Make-X");
                    sleep(1000);
                    getKeyboard().typeString(NumGB, true);
                    new ConditionalSleep(random(3000, 5000)) {
                        public boolean condition() throws InterruptedException {
                          return myPlayer().isAnimating();
                        }
                      }.sleep();

                }

1 hour ago, kadiem said:

i made player as an entity

Player player = myPlayer();    

player is outdated almost immediately unless you're reassigning it on each loop.

  • Author
Just now, Eliot said:

player is outdated almost immediately unless you're reassigning it on each loop.

ok but i used myPlayer() insted of player in the conditionalsleep 

Edited by kadiem

1 minute ago, kadiem said:

ok but i used myPlayer() insted of player in the conditionalsleep 

Use it everywhere.

  • Author
Just now, Eliot said:

Use it everywhere.

forget about the rest the problem is the conditionalsleep is not working.

1 minute ago, kadiem said:

forget about the rest the problem is the conditionalsleep is not working.

:???: 

28 minutes ago, kadiem said:

ok i changed player to myPlayer() no difference still.

I'm pretty sure it's the way you've ordered your logic or written it rather than the conditional sleep. Can you paste the full code into hastebin.com or in a spoiler here please and I'll take a quick look.

5 minutes ago, HeyImJamie said:

You're not making correct API calls anywhere... getInventory(), getObjects(), getBank() 

Nothing wrong with using the inventory variable instead of the getInventory() method (which just returns inventory)

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.