Dockid 9 Share 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. Link to comment Share on other sites More sharing options...
Hashtag 8692 Share 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); } Link to comment Share on other sites More sharing options...
Dockid 9 Author Share Posted May 22, 2020 Thanks implemented the changes and itt helped alot. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.