August 8, 201510 yr s.getEquipment().equip(slot #,"Combat bracelet"); How would I interact with the bracelet (tele to monastery etc.)? EDIT: found this in api interactpublic 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 August 8, 201510 yr by Sinatra
August 8, 201510 yr Author 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)); }
August 8, 201510 yr 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 equipment is just like the inventory as they are both ItemContainers. so just get the item from a slot and interact with it Edited August 8, 201510 yr by Precise
August 8, 201510 yr Author which will break with an rs update equipment is just like the inventory as they are both ItemContainers. so just get the item from a slot and interact with it like ->: getEquipment().interact(EquipmentSlot.RING, "Castle Wars");
August 8, 201510 yr like ->: getEquipment().interact(EquipmentSlot.RING, "Castle Wars"); yes, or: getEquipment().interact("name of item here", "Castle Wars");
August 8, 201510 yr Author yes, or: getEquipment().interact("name of item here", "Castle Wars"); Thanks ;)
Create an account or sign in to comment