Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int onLoop()throws InterruptedException{
- Inventory inven = getInventory();
- Player player = myPlayer();
- Bank bank = getBank();
- if ((settings.getRunEnergy() > 30) && (!settings.isRunning())) {
- settings.setRunning(true);
- }
- if (!inven.isFull()){
- Entity gate = objects.closest(GATE, 7160);
- if (gate != null) {
- if (gate.exists() && gate.isVisible() && (!player.isAnimating())) {
- gate.interact("Open");
- sleep(random(1000, 2000));
- map.walk(PICK_AREA);
- }
- }
- if (PICK_AREA.contains(player)){
- Entity po = objects.closest(PICK_AREA, POTATO);
- if (po != null) {
- if (po.exists() && po.isVisible() && (!player.isAnimating())) {
- po.interact("Pick");
- sleep(random(1000, 2000));
- }else{
- camera.toEntity(po);
- }
- }else{
- walkPath(path1);
- }
- }
- } else if (this.BANK_AREA.contains(player)){
- Entity bankbooth = objects.closest(BANK_BOOTH_ID);
- Entity gate = objects.closest(GATE, 7160);
- if (gate != null) {
- if (gate.exists() && gate.isVisible() && (!player.isAnimating())) {
- gate.interact("Open");
- sleep(random(1000, 2000));
- map.walk(BANK_AREA);
- }else{
- camera.toEntity(gate);
- }
- }
- if (!bank.isOpen() && bankbooth != null) {
- if (bankbooth.isVisible())
- {
- bankbooth.interact("Bank");
- sleep(random(2000, 4000));
- }{
- camera.toEntity(bankbooth);
- }
- }
- }else{
- walkPath(path2);
- }
- return random(300, 400);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement