Guest User

Untitled

a guest
Jun 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. package com.scripts;
  2.  
  3. import com.kbot2.scriptable.Script;
  4. import com.kbot2.scriptable.*;
  5. import com.kbot2.scriptable.methods.*;
  6. import com.kbot2.scriptable.methods.data.*;
  7. import com.kbot2.scriptable.methods.wrappers.*;
  8. import com.kbot2.scriptable.methods.wrappers.Obj;
  9. import com.kbot2.scriptable.methods.wrappers.Tile;
  10.  
  11. public class EdgeWillowRaper extends Script {
  12.  
  13. int willowID = 1308;
  14. int[] hatchetIDs = {1351, 1357, 1361, 6739, 1349, 1355, 1359, 1353}; //stole them from ownage nub. Dont be mad :)
  15. int woodcuttingAnimation = 867;
  16. int bankBoothID = 26972;
  17.  
  18. Obj bankBooth;
  19. Obj w;
  20.  
  21. Tile[] toWillows = new Tile[]{new Tile(3094,3491), new Tile(3090,3488), new Tile(3094,3485), new Tile(3099,3486), new Tile(3103,3490), new Tile(3107,3493), new Tile(3112,3495), };
  22. Tile[] toBank = walking.reversePath(toWillows);
  23.  
  24. public final Tile willowTile = new Tile(3115,3497);
  25.  
  26.  
  27. public void onStop(){
  28. log("Thank you for using Loled Edgeville willow raper");
  29. return;
  30. }
  31.  
  32. public String getName() {
  33. return "DwuTrees";
  34. }
  35. public String getAuthor() {
  36. return "Dwu";
  37. }
  38.  
  39. public String getDescription() {
  40. return "Chops you normal trees at Draynor";
  41. }
  42.  
  43.  
  44. public boolean onStart() {
  45. log("Thank you for using loled Edgeville willow raper");
  46. log("It will have bugs, but I will do my best to fix them");
  47. log("This is my first script :_)");
  48. return true;
  49. }
  50.  
  51.  
  52.  
  53.  
  54. public void OpenBank(){
  55. while(!bank.isOpen()){
  56. bankBooth = getClosestObject(9, bankBoothID);
  57. if(bankBooth !=null) {
  58. bankBooth.doAction("Use-quickly");
  59. sleep(1000,1200);
  60. }
  61. }
  62. }
  63.  
  64.  
  65. public void Chop() {
  66. while(getMyPlayer().getAnimation() == -1) {
  67. if(w ==null){
  68. sleep(200,500);
  69. }
  70. if(w !=null){
  71. w.doAction("Chop Down");
  72. sleep(500,800);
  73. }
  74. }
  75.  
  76. }
  77.  
  78.  
  79.  
  80.  
  81. public void deposit(){
  82. while(bank.isOpen() && inventory.isFull()){
  83. bank.depositAllExcept(hatchetIDs);
  84. sleep(300,500);
  85. }
  86. }
  87.  
  88.  
  89.  
  90.  
  91.  
  92. public int loop() {
  93. if(inventory.isFull()){
  94. walking.walkPath(toBank);
  95. OpenBank();
  96. deposit();
  97. }
  98. if(!inventory.isFull()){
  99. if (getMyPlayer().getLocation().distanceTo(willowTile) >6){
  100. walking.walkPath(toWillows);
  101. }
  102. Chop();
  103. return 500;
  104.  
  105. return random(300, 500);
  106. }
  107. return random(150, 750);
  108. }
  109. }
Add Comment
Please, Sign In to add comment