Jump to content

Checking Equipment && equip


Recommended Posts

Posted (edited)
s.getEquipment().equip(slot #,"Combat bracelet");

How would I interact with the bracelet (tele to monastery etc.)?

 

EDIT: found this in api

 

interact
public boolean interact(int slot,                        java.lang.String... actions)
Interacts with the slot specified.
Overrides: interact in class ItemContainer Parameters: slot - The slot to interact with. actions - The action to interact with. Returns: True if the bot interacted with the specified slot successfully.    

how would this be used correctly?

 

Edited by Sinatra
Posted

 ended up interacting with widgets lol.

RS2Widget equipmentTab = s.widgets.get(548,47);
        RS2Widget teleRing = s.widgets.get(387,15);
        if (equipmentTab != null && equipmentTab.isVisible()){
            equipmentTab.interact("Worn Equipment");
            s.sleep(s.random(4000));
        }
        if (teleRing != null && teleRing.isVisible()){
            teleRing.interact("Castle Wars");
            s.sleep(s.random(4000));
        }
Posted (edited)

 

 ended up interacting with widgets lol.

RS2Widget equipmentTab = s.widgets.get(548,47);
        RS2Widget teleRing = s.widgets.get(387,15);
        if (equipmentTab != null && equipmentTab.isVisible()){
            equipmentTab.interact("Worn Equipment");
            s.sleep(s.random(4000));
        }
        if (teleRing != null && teleRing.isVisible()){
            teleRing.interact("Castle Wars");
            s.sleep(s.random(4000));
        }

 

which will break with an rs update :s

 

equipment is just like the inventory as they are both ItemContainers.

 

so just get the item from a slot and interact with it :)

Edited by Precise

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...