Jump to content

Loot GroundItem?


Recommended Posts

Posted
item.interact("Take");

If you want to actually find a GroundItem then you could try

GroundItem item = groundItems.closest(new Filter<GroundItem>() {
    @Override
    public boolean match(GroundItem item) {
        return item.getName().equals(ITEMNAME);
    }
});
if (item != null) {
    item.interact("Take");
}
  • Like 1
Posted

http://osbot.org/api/org/osbot/rs07/api/model/GroundItem.html

I'm sure that from there you'll be able to figure it out :)

I found that but still don't understand how to implement it. Was getting some errors. Can I get a sample of a looting method?

item.interact("Take");
If you want to actually find a GroundItem then you could try
GroundItem item = groundItems.closest(new Filter<GroundItem>() {    @Override    public boolean match(GroundItem item) {        return item.getName().equals(ITEMNAME);    }});if (item != null) {    item.interact("Take");}
Wow was so close, will try this after I get home from class tomorrow. Thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...