Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Inventory Equip

Joined
Dec 21, 2015
Messages
4
How can I exit an interface that pops up? The bot I wrote is working but there's a few little things I need to add. I've gone with making the bot use the escape button which will hopefully work. Thanks in advance :)

So many questions.. how do I use Inventory.equip();? It's' asking for "sprites" or something? I don't drink soda.
I'm trying to equip Bronze Arrows
 
Joined
Dec 10, 2014
Messages
3,332
Huh, I never knew there was an equip method, I usually just query for the SpriteItem and interact with it.

If it's asking for a SpriteItem, that's what the results from the Inventory Queries are, like how the Npc Queries hold Npcs and GameObject queries hold GameObjects.

So:
Code:
SpriteItem item = Inventory.newQuery().names("NAME OF ITEM").results().first();
if (item != null)
    Inventory.equip(item);

Copied/pasted from our conversation, just in case anyone else needed to know the answer.
 
Top