Guest User

Untitled

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