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.

Keeping track of my loot values :)

Featured Replies

                    if (itemToPickUp.interact("Take")) {
                            lootValue = lootValue + itemValues.get(itemToPickUp.getName());
                            Sleep.sleepUntil(() -> !itemToPickUp.exists() , 5000); 
                            log(lootValue);

As you can see after i click take on the grounditem i add the value of the item to my lootvalue integer. The problem is if it clicks the item more than once it will add the value of the item twice. I cant check if the item is in my inventory to add the value because i am using a looting bag.

I could add a longer sleep timer to make sure my player reaches the loot before clicking it again but someitmes my player is frozen.

Any ideas guys? thanks :)

 

edit: also another question while iv got you guys, i sleep until !item.exists but that doesnt correctly if there is multiple of the same item on the ground.

Edited by shaba123

I personally make a hash of inventory before looting and after looting, and if the two values are different then it means you picked up an item, ofc this doesn't apply to looting bag so you may want to check if grounditem disappeared (still can be looted by someone else tho) so it's never 100% accurate :feels: 

I would definitely give this one a read though, it's an inventory listener that keeps track of items gained: 

 

On 6/2/2023 at 7:14 AM, shaba123 said:

edit: also another question while iv got you guys, i sleep until !item.exists but that doesnt correctly if there is multiple of the same item on the ground.

You will probably have to make your own exist method. And best way to track loot for looting bag would be when you bank update it, otherwise check for inventory changes then update etc

  • Author
19 hours ago, Czar said:

I personally make a hash of inventory before looting and after looting, and if the two values are different then it means you picked up an item, ofc this doesn't apply to looting bag so you may want to check if grounditem disappeared (still can be looted by someone else tho) so it's never 100% accurate :feels: 

I would definitely give this one a read though, it's an inventory listener that keeps track of items gained: 

 

 

12 hours ago, Gunman said:

You will probably have to make your own exist method. And best way to track loot for looting bag would be when you bank update it, otherwise check for inventory changes then update etc

Thank you !

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.