Guest User

Untitled

a guest
Jun 22nd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. package com.scripts;
  2. import com.kbot2.scriptable.Script;
  3. import com.kbot2.scriptable.methods.wrappers.GroundItem;
  4. import com.kbot2.scriptable.methods.wrappers.Obj;
  5. import com.kbot2.scriptable.methods.wrappers.Tile;
  6. import com.kbot2.scriptable.methods.Calculations;
  7.  
  8.  
  9. public class PartyRoom2 extends Script {
  10. public Tile[] PartyToBank = new Tile[]{new Tile(3046,3376), new Tile(3046,3371), new Tile(3041,3368), new Tile(3036,3368), new Tile(3033,3364), new Tile(3030,3360), new Tile(3025,3357), new Tile(3020,3358), };
  11. public Tile[] BankToParty = walking.reversePath(PartyToBank);
  12. public Tile PartyTile = new Tile(3046,3077);
  13. public Tile BankTile = new Tile(3013,3356);
  14. int balloons[] = {115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 126, 127};
  15.  
  16. public boolean active() {
  17. return true;
  18. }
  19.  
  20.  
  21.  
  22. public int loop() {
  23. if(getMyPlayer().getLocation().distanceTo(PartyTile)>8)
  24. {
  25. walking.walkPath(walking.randomizePath(BankToParty,2,2));
  26. }
  27. if(walking.setRunning(false))
  28. {
  29. walking.setRunning(true);
  30. }
  31. if (inventory.isFull())
  32. {
  33. log("Spot To Guild");
  34. walking.walkPath(walking.randomizePath(PartyToBank,2,2));
  35. sleep(1000,2000);
  36. return 500;
  37.  
  38. if(getMyPlayer().getLocation().distanceTo(BankTile)>8)
  39. {
  40.  
  41. Obj booth = getClosestObject(5, 11758);
  42. sleep(300, 600);
  43. booth.doAction("Use-quickly");
  44. return random(400, 800);
  45. }
  46. sleep(200, 300);
  47. if (!bank.isOpen())
  48. {
  49. return 100;
  50. }
  51. while (inventory.getCount() > 1)
  52. {
  53. bank.depositInventory();
  54. sleep(500, 600);
  55. }
  56. bank.close();
  57. if (bank.isOpen())
  58. bank.close();
  59. return random(150, 300);
  60.  
  61. Obj balloon = getClosestObject(10, balloons);
  62. if(balloon != null) {
  63. balloon.doAction("Burst");
  64. return random(100, 200);
  65. }
  66. GroundItem[] loot = groundItems.getAllItems(12);
  67. for(int i = 0; i < loot.length; i++) {
  68. GroundItem item = loot[i];
  69. if(item != null) {
  70. if(Calculations.onScreen(item.getScreenPos()))
  71. item.doAction("Take");
  72. return random(100, 200);
  73. }
  74. }
  75. return random(100,200);
  76. }
  77. return random(100,200);
  78. }
  79. public String getName() {
  80. return "Party Room";
  81. }
  82.  
  83. public String getAuthor() {
  84. return "Blacksimon";
  85. }
  86.  
  87. public String getDescription() {
  88. return "Parties";
  89. }
  90.  
  91. }
Add Comment
Please, Sign In to add comment