archive 0 Posted March 7, 2017 I made a script to smelt ore in Al Kharid. Banks fine, and interacts with the furnace nicely, but not sure what to do for the loop to wait so it does not spam click the furnace... I tried using... sleepWhile(() -> getLocalPlayer().getAnimation() != -1, 40000); - problem with this is the players animation changes from -1 to animated after it smelts 1 bar sleepWhile(() -> getInventory().contains("Copper Ore", "Tin Ore"), 40000); -this gets the job done waiting for all ore to get gone, but if you level up the bot sits there till the delay ends I do handle the level up dialog, but it never gets called because its sleeping. Any help would be appreciated with this problem.
Kvothe 6 Posted March 7, 2017 Try sleepUntil(()->) multiple sleepUntils switch between -1 and smelt animation you can probably come up with some better logic to run the script if you think about it track the count of the ore/bar also dont sleep for 40 seconds... lets the loop reaccess your smelt function if it finds ores and is not smetling
Dreamlicker 750 Posted March 7, 2017 I would just sleepUntil you have no ores or you're in a dialogue (level up)
archive 0 Author Posted March 7, 2017 I would just sleepUntil you have no ores or you're in a dialogue (level up) thanks works, i was looking for another way, and was blind to using an or. =p.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.