Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 24th, 2012  |  syntax: None  |  size: 1.21 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import org.rsbot.script.Script;
  2. import org.rsbot.script.ScriptManifest;
  3. import org.rsbot.script.wrappers.RSNPC;
  4.  
  5. @ScriptManifest(authors = { "PowerFishDraynor" }, keywords = "Fishing", name = "PowerFishDraynor", version = 1, description = "PFD")
  6. public class PowerFishDraynore extends Script {
  7.  
  8.     private int fishingRod = 307, Bait = 313, FishSpot = 327;
  9.  
  10.     public int loop() {
  11.         if (inventory.getCount() == 28) {
  12.             inventory.dropAllExcept(fishingRod, Bait);
  13.             return random(2700, 4100);
  14.         }
  15.  
  16.         if (inventory.getCount() < 28 && getMyPlayer().getAnimation() != 622
  17.                 && inventory.containsOneOf(fishingRod)
  18.                 && inventory.containsOneOf(Bait)) {
  19.             RSNPC Spot = npcs.getNearest(FishSpot);
  20.             if (Spot != null && Spot.getLocation() != null) {
  21.                 if (calc.distanceTo(Spot) > 3
  22.                         || !calc.tileOnScreen(Spot.getLocation())) {
  23.                     walking.walkTo(Spot.getLocation());
  24.                     return random(1000, 2500);
  25.                 }
  26.                 Spot.doAction("Bait");
  27.                 return random(2500, 5000);
  28.             }
  29.         }
  30.         return random(4500, 7200);
  31.     }
  32.  
  33. }