Jump to content

Checking Equipment && equip


Chris

Recommended Posts

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
Link to comment
Share on other sites

 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));
        }
Link to comment
Share on other sites

 

 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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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