-
-
Save anonymous/48df1acb2e1de82f52d8e9877664efec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pw.botting.pepe; | |
import org.osbot.rs07.script.Script; | |
import java.util.function.Consumer; | |
import java.util.function.Predicate; | |
public class Example extends Script { | |
private static class A implements Task { | |
@Override | |
public boolean test(Script script) { | |
return false; | |
} | |
@Override | |
public void accept(Script script) { | |
} | |
} | |
private static class B implements Task { | |
@Override | |
public boolean test(Script script) { | |
return false; | |
} | |
@Override | |
public void accept(Script script) { | |
} | |
} | |
private final Task a = new A(); | |
private final Task b = new B(); | |
@Override | |
public int onLoop() throws InterruptedException { | |
Predicate<Script> predicate = a.and(b); | |
if(predicate.test(this)) { | |
Consumer<Script> combine = a.andThen(b); | |
combine.accept(this); | |
} | |
return 1000; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pw.botting.pepe; | |
import org.osbot.rs07.script.Script; | |
import java.util.function.Consumer; | |
import java.util.function.Predicate; | |
public interface Task extends Predicate<Script>, Consumer<Script> { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment