Dockid 9 Posted May 21, 2020 Hi, Im currently running my script and it seems to work well but in certain areas it just doesn't function as I would like it. Two examples: When teleporting with my ROD it will spam click the teleport option until I am out of the area. When looting from a drop it will spam the 'Take' option until it is successful. How can i rewrite these areas of my script so that it will take its time when interacting with items.
Hashtag 9065 Posted May 21, 2020 Use sleepUntil to wait until a condition is met. I usually do the following. if (getEquipment().interact(EquipmentSlot.RING.getSlot(), "Castle Wars")) { final Tile teledFrom = getLocalPlayer().getTile(); sleepUntil(() -> teledFrom.distance() > 10, 5000); }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.