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.

Pick Item Up From Ground

Featured Replies

I am learning how to script with OSBot and am having a small problem. I am writing a hunter script that catches birds currently. The part of the script to lay a bird snare works, but the issue is picking up the snare. If the snare is caught, I am trying to Check the bird snare, and then lay the snare from the inventory. If the snare fails, dismantle it and then lay it. If the snare times out, dismantle it and then lay it. I can't quite find out a way to pick up the bird snare off of the ground. I have tried GameObject because the snare counts as a GameObject. I have tried to check the tile it is on, and then if it is valid, and then convert it to string, and then check if it contains "Check" for the snare option. Nothing I am writing has worked and i've tried loads of things. Anything that points me towards the right direction is appreciated. I think i'm just over thinking it.

EDIT: So I found out how to actually pick up the bird snare, but I don't know how to set the coordinate for the tile to place it at the exact tile every time. Any help with that? 

Edited by vexumy

If you want to place it in the same tile you took it from you can store the position before you pick it up like this

GroundItem groundItem;
Position itemPosition;
groundItem = getGroundItems().closest(e -> e != null && e.getName().contains("Bird snare"));
if(groundItem != null) {
    itemPosition = groundItem.getPosition();
    groundItem.interact("Take");
}

Or you can make an array of positions around your character when the script starts and check to see if there is a snare in them with RS2Object getPosition() on nearby snares. You would also want to track which snares were yours incase someone started laying traps in your positions.

Edited by Cloxygen

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.