Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. import java.util.Arrays;
  2. import org.dreambot.api.methods.Calculations;
  3. import org.dreambot.api.methods.container.impl.bank.BankLocation;
  4. import org.dreambot.api.methods.container.impl.bank.BankTab;
  5. import org.dreambot.api.methods.container.impl.bank.BankType;
  6. import org.dreambot.api.script.AbstractScript;
  7. import org.dreambot.api.script.ScriptManifest;
  8. import org.dreambot.api.script.Category;
  9. import org.dreambot.api.wrappers.interactive.Entity;
  10. import org.dreambot.api.wrappers.interactive.GameObject;
  11.  
  12. @ScriptManifest(author = "You", name = "BankBOT", version = 0.4, description = "Bank bot test", category = Category.MONEYMAKING)
  13. public class bankBOT extends AbstractScript {
  14. public static final int BUCKET = 1925;
  15. public static final int BUCKET_NOTE = 1926;
  16. public static final int BUCKET_WATER = 1229;
  17. public static final int BUCKET_WATER_NOTE = 1230;
  18.  
  19.  
  20.  
  21.  
  22. public void onStart() {
  23. log("Starting script...");
  24. }
  25.  
  26. public void onExit() {
  27.  
  28. }
  29.  
  30. @Override
  31. public int onLoop() {
  32.  
  33. GameObject bankChest = getGameObjects().closest("Bank chest");
  34. GameObject fountain = getGameObjects().closest("Fountain");
  35.  
  36. //Walks there
  37. getWalking().walk(getBank().getClosestBank(BankType.CHEST));
  38.  
  39. if (getBank().isOpen() && getInventory().isFull())
  40. {
  41. log("Bank is open");
  42. while(getInventory().isFull())
  43. {
  44. bankChest.interact();
  45. getBank().depositAllExcept(1926);
  46. if (getInventory().isEmpty())
  47. {
  48. break;
  49. }
  50. }
  51. sleep(1000);
  52. log("Depot!");
  53. sleep(2500);
  54.  
  55. }
  56. else if (getInventory().isEmpty())
  57. {
  58. log("Inventory is empty");
  59. getWalking().walk(getBank().getClosestBank(BankType.CHEST));
  60. sleep(1500);
  61. bankChest.interact();
  62. log("Withdraw");
  63. while(getInventory().isEmpty())
  64. {
  65. getBank().withdrawAll(BUCKET);
  66. if (getInventory().isFull())
  67. {
  68. break;
  69. }
  70. }
  71.  
  72. sleep(1000);
  73. log("Moving to fountain...");
  74. getWalking().walk(fountain);
  75. sleep(2500);
  76. log("fountian interaction");
  77. fountain.interact();
  78. }
  79. else {
  80. log("Bank not open");
  81. bankChest.interact();
  82. log("Opening bank!");
  83. sleep(1000);
  84. }
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93. return Calculations.random(500, 600);
  94. }
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement