Guest User

Feather Collector - OSBOT

a guest
Aug 1st, 2017
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. import org.osbot.rs07.api.model.Entity;
  2. import org.osbot.rs07.api.model.Player;
  3. import org.osbot.rs07.script.Script;
  4. import org.osbot.rs07.script.ScriptManifest;
  5.  
  6. import java.awt.*;
  7.  
  8. @ScriptManifest(author = "Flewis", info = "Collects feathers", name = "Feather Collector", version = 0.1, logo = "")
  9. public class main extends Script {
  10.  
  11.     @Override
  12.     public void onStart() {
  13.         log("Feather Collector By Flewis");
  14.     }
  15.    
  16.     @Override
  17.     public int onLoop() throws InterruptedException {
  18.        
  19.         Entity feather = getGroundItems().closest("Feather");
  20.         Player player = myPlayer();
  21.        
  22.         if (!player.isAnimating()) {
  23.             if (feather != null) {
  24.                 feather.interact("Take");
  25.                 sleep(random(600, 1000));
  26.             } else {
  27.                 log("There are no feathers to be collected in this area at this time!");
  28.             }
  29.         }
  30.             return random(400, 1000);
  31.     }
  32.  
  33.     @Override
  34.     public void onExit() {
  35.         log("Thank you for running Feather Collector <3");
  36.     }
  37.  
  38.     @Override
  39.     public void onPaint(Graphics2D g) {
  40.  
  41.     }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment