Guest User

Untitled

a guest
Nov 19th, 2015
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. package woodcutter;
  2.  
  3. import java.awt.Graphics;
  4.  
  5. import org.osbot.rs07.api.Inventory;
  6. import org.osbot.rs07.api.model.Entity;
  7. import org.osbot.rs07.script.Script;
  8. import org.osbot.rs07.script.ScriptManifest;
  9.  
  10. @ScriptManifest(author = "Em0re", info = "WoodCuts Logs at G.E", logo = "", name = "WoodCutter", version = 0.1)
  11. public class Woodcutter extends Script {
  12.  
  13. // code used at start.
  14. public void onStart() {
  15.  
  16. }
  17.  
  18. // Code to be excuted at the end
  19. public void onExit() {
  20.  
  21. }
  22.  
  23. // code in loop
  24. public int onLoop() throws InterruptedException {
  25.  
  26. Inventory inven = getInventory();
  27.  
  28. if (!inven.isFull()) {
  29. // chop
  30.  
  31. Entity yew = getObjects().closest("Yew");
  32.  
  33. if (yew != null) {
  34. if (yew.isVisible()) {
  35. log("Yew is visible");
  36. if (!myPlayer().isAnimating()) {
  37. if (!myPlayer().isMoving()) {
  38. yew.interact("Chop down");
  39. }
  40. }
  41. } else {
  42. getCamera().toEntity(yew);
  43. log("camera moving to yew");
  44. }
  45.  
  46. }
  47. } else {
  48.  
  49. }
  50.  
  51. return 50;
  52.  
  53. }
  54.  
  55. // Paint
  56. public void onPaint(Graphics g) {
  57.  
  58. }
  59.  
  60. }
Advertisement
Add Comment
Please, Sign In to add comment