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.

Picking Up Items

Featured Replies

Hey guys, I'm currently working on my first ever script and I've run into a roadblock.

I would like to know how to pick up items on the ground, and then the next closest, until my inventory is filled.

For example:

If I was making a script that sat at cows and picked up Cowhides. I would like to know how to pick that cowhide up and the next closest one, until 28.

But I don't want the raw meat or bones!!

Thanks

When the API (located on the top banner) is seemingly fixed, look over it. It has documentation on how each method within the API works, along with the required parameters. You could also import it into your IDE if you so wished, but that's a little extreme for your situation. But right now that's all I have to to suggest to you before I pass out on my bed. 

 

-Night all.

Edited by Brainfree

  • Author

When the API (located on the top banner) is seemingly fixed, look over it. It has documentation on how each method within the API works, along with the required parameters. You could also import it into your IDE if you so wished, but that's a little extreme for your situation. But right now that's all I have to to suggest to you before I pass out on my bed. 

 

-Night all.

Believe me, I looked it over. For a solid 2 hours, couldn't get it to work.

Please note, I started scripting today, so I don't know a lot !

Believe me, I looked it over. For a solid 2 hours, couldn't get it to work.

Please note, I started scripting today, so I don't know a lot !

 

Look over scripts on the forms, it's how I first started out. Even if it's honest Copy and Pasting, if it works, it works. But I'm sure you're more for the knowledge, so I would suggest studying multiple implementations of your desired methods, and see how there used, and how they are structured into any given script.

Edited by Brainfree

  • Author

Look over scripts on the forms, it's how I first started out. Even if it's honest Copy and Pasting, if it works, it works. But I'm sure you're more for the knowledge, so I would suggest studying multiple implementations of your desired methods, and see how there used, and structured into any given script.

I'll be glad to check again, but is there any scripts that pick up items.

I'll go look, I think we may have a chicken killer... Let me check!!!

Haven't tested it yet but this might work

 

 

 

closestGroundItem(ID).interact("Take") 

GroundItem cowhide = closestGroundItem(cowhideID);If(cowhide.exists()){  selectOption(cowhide, cowhide.getMouseDestination(), "Take");}

Put this inside a method, i typed this on my ipad so errors are possible

  • Author

Haven't tested it yet but this might work

 

 

 

closestGroundItem(ID).interact("Take") 

 

Okay, so I used what you typed out here, with some if's however, and the only thing I'm noticing is that:

It'll actually walk by like 6+ of the items, to go pick up one that is definitely further away than the 6+ it walks over XD

 

So that really is slowing down the process, not to mention the amount of miss-clicks on the item is a killer too -___-

 

Is there any way to make it not miss-click the item, I mean....

Here is my code:

 

if(!client.getInventory().isFull()){            log("Picking Item.")            closestGroundItem(item).getPosition()            if(client.getMyPlayer().getPosition().distance(closestGroundItem(item).getPosition()) < 2){                closestGroundItem(item).interact("Take")            }else{            walk(closestGroundItem(item).getPosition())            return 1000            }        }        if(client.getInventory().isFull()){            log("Are you serious.")            state = State.TODOOR            return 1000        }

I replaced the actual item with "item" so no one makes the script ^_^

Edited by Speakmore

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.