Advertisement
Guest User

Untitled

a guest
Apr 16th, 2017
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. import org.dreambot.api.script.AbstractScript;
  2. import org.dreambot.api.wrappers.interactive.GameObject;
  3. import org.dreambot.api.script.Category;
  4. import org.dreambot.api.script.ScriptManifest;
  5. import org.dreambot.api.methods.Calculations;
  6. import org.dreambot.api.methods.map.Area;
  7.  
  8. @ScriptManifest(category = Category.MONEYMAKING, name = "Shafter", author = "LemonCamel", version = 1)
  9. public class ShaftMaker extends AbstractScript {
  10.  
  11. public Area treeArea = new Area(3219, 3310, 3223, 3300,0);
  12. public Area fletchArea = new Area(3224,3303, 3226, 3308, 0);
  13.  
  14. public int onLoop(){
  15. GameObject willow = getGameObjects().closest("Willow");
  16. if (treeArea.contains(getLocalPlayer()) && (getLocalPlayer().getAnimation() != 2846) && !getInventory().isFull() && (getLocalPlayer().getAnimation() != 1248)){
  17. getCamera().mouseRotateToEntity(willow);
  18. sleep(Calculations.random(100, 300));
  19. willow.interact("Chop down");
  20. sleepUntil(() -> !getLocalPlayer().isAnimating(), 1000000);
  21. }
  22. if (!treeArea.contains(getLocalPlayer())){
  23. getWalking().walk(treeArea.getRandomTile());
  24. }
  25. if (getInventory().isFull()){
  26. sleep(Calculations.random(5000,8000));
  27. getInventory().get(946).useOn(1519);
  28. sleep(Calculations.random(500,1000));
  29. if (getWidgets().getWidget(305).getChild(9) !=null){
  30. sleep(Calculations.random(300, 700));
  31. getWidgets().getWidget(305).getChild(9).interact("Make X");
  32. sleep(Calculations.random(1000,2000));
  33. getKeyboard().type(28);
  34. sleepUntil(() -> !getLocalPlayer().isAnimating(), 1000000);
  35.  
  36.  
  37.  
  38. sleepUntil(()->getInventory().count(52) == 0,1000);}
  39.  
  40. }
  41. if (getInventory().count(52)>= 1080 && getInventory().count(1519)== 0){
  42. getWalking().walk(fletchArea.getRandomTile());
  43. sleepUntil(()->getLocalPlayer().isStandingStill(), 1000);
  44. getInventory().get(314).useOn(52);
  45. sleep(Calculations.random(1000, 3000));
  46. }
  47.  
  48. if (getWidgets().getWidget(582).getChild(5) !=null && fletchArea.contains(getLocalPlayer())){
  49. sleep(Calculations.random(1000, 2000));
  50. getWidgets().getWidget(582).getChild(5).interact("Make 10 sets");
  51. sleepUntil(()->getInventory().count(52)== 0, 10000);
  52. }
  53.  
  54. return 0;
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement