Advertisement
Guest User

ding

a guest
May 21st, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. import org.osbot.rs07.api.model.Entity;
  2. import org.osbot.rs07.script.Script;
  3. import org.osbot.rs07.script.ScriptManifest;
  4.  
  5. @ScriptManifest(name = "vFisher", author = "Vliegvuur", version = 1.0, info = "An efficient fisher lol", logo = "")
  6. public class vFisher extends Script {
  7.  
  8. public int fishingSpot = 1542;
  9. public int[] fishingGear = { 11323, 314 };
  10. public int[] fishToDrop = { 11328, 11330, 11332 };
  11.  
  12. public int[] fishingTiles = { 2499, 3507 };
  13.  
  14. public String useRod = "Use-rod Fishing Spot";
  15.  
  16. @Override
  17. public int onLoop() throws InterruptedException {
  18. doFish();
  19. dropFish();
  20. return 100;
  21. }
  22.  
  23. public boolean isAtSpot() {
  24. if (myPlayer().getPosition().equals(fishingTiles)) {
  25. return true;
  26. } else {
  27. return false;
  28. }
  29. }
  30.  
  31. public void dropFish() {
  32. if (inventory.isFull()) {
  33. inventory.dropAllExcept(fishingGear);
  34. }
  35.  
  36. }
  37.  
  38. public void doFish() {
  39. Entity spot = getNpcs().closest(fishingSpot);
  40. if (myPlayer().getPosition().equals(isAtSpot())) {
  41.  
  42. if (spot != null && spot.isVisible()) {
  43. if (!myPlayer().isAnimating()) {
  44. spot.interact(useRod);
  45. }
  46.  
  47. } else { // if the spot isn't visible and null
  48. camera.toEntity(spot);
  49.  
  50. }
  51.  
  52. } else { // player isn't at the fishing spot
  53. walking.walk(spot);
  54.  
  55. }
  56.  
  57. }
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement