TTB1 0 Posted July 31, 2020 private State getState() { GameObject Competitive = getGameObjects().closest("Competitive"); if (Competitive != null) return State.NOTSTARTED; return State.STARTED; // add a lowhp } @Override public int onLoop() { switch (getState()) { case STARTED: // pray dumbass break; case LOWHP: // fucking eat kid break; case NOTSTARTED: GameObject Competitive = getGameObjects().closest("Competitive"); Competitive.interact("Pass-Through"); break; } Pay no attention to the comments, just a todo list How do i make it so that it just clicks the competitive barrier once instead of spamming it? i would assume that it would be adding something like wait until (case STARTED) but i have no idea. i also need to know how to activate quick prayers, which will be way easier than the above
Cystic 39 Posted July 31, 2020 5 minutes ago, TTB1 said: How do i make it so that it just clicks the competitive barrier once instead of spamming it? i would assume that it would be adding something like wait until (case STARTED) but i have no idea. Use a conditional sleep, you'd put your case started for the condition, and then a sleep timer to wait in case the condition is never met. It'll either sleep until the condition is met or the sleep timer is met. sleepUntil(() -> condition, sleeptimer); Here's one that I use for when I'm walking. sleepUntil(() -> Walking.shouldWalk(10), 3600); So I sleep until either I'm 10 tiles away from the point I'm walking to or until the 3600 has passed.
TTB1 0 Author Posted July 31, 2020 43 minutes ago, Cystic said: Use a conditional sleep, you'd put your case started for the condition, and then a sleep timer to wait in case the condition is never met. It'll either sleep until the condition is met or the sleep timer is met. sleepUntil(() -> condition, sleeptimer); Here's one that I use for when I'm walking. sleepUntil(() -> Walking.shouldWalk(10), 3600); So I sleep until either I'm 10 tiles away from the point I'm walking to or until the 3600 has passed. so i did this sleepUntil((!getInventory().isEmpty())); but i get an error saying The method sleepUntil(Condition, long) in the type MethodProvider is not applicable for the arguments (boolean)
Cystic 39 Posted July 31, 2020 4 minutes ago, TTB1 said: so i did this sleepUntil((!getInventory().isEmpty())); but i get an error saying The method sleepUntil(Condition, long) in the type MethodProvider is not applicable for the arguments (boolean) You need sleepUntil(() -> !getInventory().isEmpty(), 3600);
TTB1 0 Author Posted July 31, 2020 3 minutes ago, Cystic said: You need sleepUntil(() -> !getInventory().isEmpty(), 3600); my god, thank you so much. i've been going at this for hours
TTB1 0 Author Posted July 31, 2020 Just now, TTB1 said: my god, thank you so much. i've been going at this for hours nevermind lol now i get the error Syntax error on tokens, Expression expected instead
Recommended Posts
Archived
This topic is now archived and is closed to further replies.