Advertisement
Guest User

Untitled

a guest
Aug 17th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. package BasicWoodcutter;
  2.  
  3.  
  4. import org.dreambot.api.script.AbstractScript;
  5. import org.dreambot.api.script.Category;
  6. import org.dreambot.api.script.ScriptManifest;
  7. import org.dreambot.api.wrappers.interactive.NPC;
  8.  
  9.  
  10.  
  11. @ScriptManifest(category = Category.FISHING, name = "Basic Fishing", author = "unbound", version = 1.0)
  12. public class MainClass extends AbstractScript {
  13.  
  14. @Override
  15. public void onStart() {
  16. log("Welcome");
  17.  
  18. }
  19.  
  20. @Override
  21. public int onLoop() {
  22. NPC fishingSpot = getNpcs().closest("Fishing spot");
  23. if (!getInventory().isFull() && fishingSpot.interact("Net")) {
  24. int countFish = getInventory().count("Raw Shrimps");
  25. sleepUntil(() -> getInventory().count("Raw Shrimps") > countFish, 8000);
  26. }
  27.  
  28. if (getInventory().isFull()) {
  29. getInventory().dropAllExcept("Small fishing net");
  30. sleep(6000);
  31. getMouse().click();
  32. }
  33.  
  34. return 1000;
  35. }
  36.  
  37. @Override
  38. public void onExit() {
  39.  
  40. }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement