Guest User

Untitled

a guest
Jul 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. public class AutoMiner extends Script {
  2.  
  3. int sleepAt = 90;
  4. int[] rockStart = new int[]{75, 544};
  5. int mineRadius = 20;
  6. int[] bankArea = new int[]{100, 512};
  7.  
  8. public AutoMiner(Extension e) {
  9. super(e);
  10. }
  11.  
  12. public void init(String params) {
  13. if(!params.equals(""))
  14. sleepAt = Integer.parseInt(params);
  15. }
  16.  
  17. public int main() {
  18. System.out.println(getInventoryCount() + " : inventory slots are used up ");
  19. int i = 0;
  20. if(getFatigue() > sleepAt) {
  21. useSleepingBag();
  22. return 1000;
  23. }
  24. if(isBanking()) {
  25. if(getInventoryCount() != 30) {
  26. deposit(141, 28);
  27. closeBank();
  28. return 4000;
  29. }else{
  30. }
  31. if(getInventoryCount() != 2) {
  32. closeBank();
  33. }
  34. return 4000;
  35.  
  36. }
  37. if(questOptionCount() != 0) {
  38. answer(0);
  39. return 4000;
  40. }
  41.  
  42. if(getInventoryCount() != 30) {
  43. int[] rock = getObjectById(new int[]{102, 103});
  44. if( rock[0] != -1 ) {
  45. atObject(rock[1], rock[2]);
  46. }
  47. return 1000;
  48. }
  49. if(getInventoryCount()!= 20) {
  50. walkTo(75, 532);
  51. }
  52.  
  53. if(distanceTo(bankArea[0], bankArea[1]) < 10) {
  54. int banker[] = getNpcById(95);
  55. if(banker[0] != -1)
  56. talkToNpc(banker[0]);
  57. return 3000;
  58. } else
  59. walkTo(bankArea[0], bankArea[1]);
  60.  
  61. return random(3000, 4000);
  62. }
  63. }
Add Comment
Please, Sign In to add comment