TTB1 0 Share Posted July 31, 2020 I have the line sleepUntil(() -> !getInventory().isEmpty(), 3600); But I get an error saying Syntax error on token(s), misplaced construct(s) Also, completely unrelated, is there a way to toggle quick prayers? Any help is appreciated. Link to comment Share on other sites More sharing options...
Stoned 52 Share Posted July 31, 2020 That sleepUntil should work, it looks correct to me and my IDE doesn't flag anything up. Have you definitely added the client.jar? You can toggle quick prayers using: getPrayer().toggleQuickPrayer(boolean true/false); Link to comment Share on other sites More sharing options...
TTB1 0 Author Share Posted July 31, 2020 8 hours ago, StonedFarmer said: That sleepUntil should work, it looks correct to me and my IDE doesn't flag anything up. Have you definitely added the client.jar? You can toggle quick prayers using: getPrayer().toggleQuickPrayer(boolean true/false); is there also a way to check if quick prayers are toggled? Link to comment Share on other sites More sharing options...
Stoned 52 Share Posted July 31, 2020 1 minute ago, TTB1 said: is there also a way to check if quick prayers are toggled? Yep, you can use getPrayer().isQuickPrayerActive(), which will return true/false Link to comment Share on other sites More sharing options...
TTB1 0 Author Share Posted July 31, 2020 1 minute ago, StonedFarmer said: Yep, you can use getPrayer().isQuickPrayerActive(), which will return true/false how would i use that in this situation? if (Competitive != null && getPrayer().isQuickPrayerActive()) return State.NOTSTARTED; return State.STARTED; I want it to be so that it returns the state notstarted when it's false and started when its true Link to comment Share on other sites More sharing options...
Stoned 52 Share Posted July 31, 2020 1 minute ago, TTB1 said: how would i use that in this situation? if (Competitive != null && getPrayer().isQuickPrayerActive()) return State.NOTSTARTED; return State.STARTED; I want it to be so that it returns the state notstarted when it's false and started when its true You would do something like: if(Competitive != null) { if(getPrayer().isQuickPrayerActive()){ return State.STARTED; } else { return State.NOTSTARTED; } } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.