Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public int onLoop() throws InterruptedException {
- if(players.myPlayer().isAnimating()){
- log("animating");
- if(random(1,30) == 1){
- if(random(1,2) == 1){
- log("backspace");
- getKeyboard().pressKey(8);
- getKeyboard().releaseKey(8);
- }else{
- log("random letter");
- Random r = new Random();
- char c = (char)(r.nextInt(26) + 'a');
- new TypeStringEvent(Character.toString(c), false);
- }
- }
- }else{
- log("not animating");
- if(random(1,5) == 1){
- new ConditionalSleep(30000) {
- @Override
- public boolean condition() {
- return objects.closest("Pump") != null;
- }
- }.sleep();
- RS2Object pump = objects.closest("Pump");
- if(pump == null){
- log("null");
- return 200;
- }else{
- log("operate");
- pump.interact("Operate");
- }
- }else{
- return 1000;
- }
- }
- return 4000;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement