vexumy Posted February 16, 2019 Share Posted February 16, 2019 (edited) 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 February 16, 2019 by vexumy Quote Link to comment Share on other sites More sharing options...
Cloxygen Posted February 21, 2019 Share Posted February 21, 2019 (edited) 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 February 22, 2019 by Cloxygen Quote Link to comment Share on other sites More sharing options...