Skip 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.

Opening all feather packs - Need help

Featured Replies

I know there are tons of scripts like feather buying already, but I usually like to make my own scripts to improve my programming skills/get more used to the API.

What my script is supposed to do:

- Buy feather pack only if there is over 95 packs in the shop; (working)

- Open all the packs in the inventory when the inventory is full; (need help)

 

To open the packs, I'm checking if the inventory is full. If it its, it'll open the packs, but once one pack is open, the inventory is not full anymore, so it'll buy more packs until the inventory is full again.

I also tried checking if my inventory had over 'x' packs, but that's not working either, because it's pretty much the same logic above. Let's say it'll open packs once my inventory contains  25 or more (>=25) packs. Once one pack is open, the inventory will contain 24 packs and it will buy more packs, not opening the remaining.

 

How could I fix this? What kind of condition should I check? Should I make my own void method to open 'x' packs? If so, how to do it?

Thanks in advance.

 

 

 

Edited by Ragboys is back

10 minutes ago, Ragboys is back said:

I know there are tons of scripts like feather buying already, but I usually like to make my own scripts to improve my programming skills/get more used to the API.

What my script is supposed to do:

- Buy feather pack only if there is over 95 packs in the shop; (working)

- Open all the packs in the inventory when the inventory is full; (need help)

 

To open the packs, I'm checking if the inventory is full. If it its, it'll open the packs, but once one pack is open, the inventory is not full anymore, so it'll buy more packs until the inventory is full again.

I also tried checking if my inventory had over 'x' packs, but that's not working either, because it's pretty much the same logic above. Let's say it'll open packs once my inventory contains  25 or more (>=25) packs. Once one pack is open, the inventory will contain 24 packs and it will buy more packs, not opening the remaining.

 

How could I fix this? What kind of condition should I check? Should I make my own void method to open 'x' packs? If so, how to do it?

Thanks in advance.

 

 

 

you pathing to bank when invent is full?

change the state to opening feather packs once inventory is full, only exit this state if there are no more feather packs to open.

53 minutes ago, Juggles said:

Sleep condition until out of feather packs 

this and use System.exit(0) if it breaks out of the sleep and there's still packs unopened.

Once you open a feather pack, yes the condition is no longer true that inventory is full, however you are still inside the code block. The code block will execute everything inside of it (that should be executed), it wont just exit because the condition changed.  If you have it written so that it opens everything (example: iterate through all items and open), then you wouldn't be facing this problem.

 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.