Skip to content

Instantly share code, notes, and snippets.

Created March 19, 2018 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f8d3c7cadcbc9245d4f63e4cba7186af to your computer and use it in GitHub Desktop.
Save anonymous/f8d3c7cadcbc9245d4f63e4cba7186af to your computer and use it in GitHub Desktop.
import org.dreambot.api.methods.Calculations;
import org.dreambot.api.methods.map.Area;
import org.dreambot.api.script.AbstractScript;
import org.dreambot.api.script.Category;
import org.dreambot.api.script.ScriptManifest;
import org.dreambot.api.utilities.impl.Condition;
import org.dreambot.api.wrappers.items.GroundItem;
@ScriptManifest(
category = Category.MONEYMAKING,
name = "Booter",
author = "LemonCamel",
version = 1.0D
)
public class BootStealer extends AbstractScript {
public int onLoop() {
Area bootArea = new Area(3302, 3187, 3302, 3191, 0);
Area bankArea = new Area(3269, 3165, 3270, 3169, 0);
GroundItem boots = (GroundItem)this.getGroundItems().closest(new Integer[]{Integer.valueOf(1061)});
if(!this.getInventory().isFull() && bootArea.contains(this.getLocalPlayer()) && boots.exists()) {
boots.interact();
} else if(this.getInventory().isFull() && !bankArea.contains(this.getLocalPlayer())) {
this.getWalking().walk(bankArea.getRandomTile());
sleep(Calculations.random(500, 1500));
} else if(bankArea.contains(this.getLocalPlayer()) && this.getInventory().isFull()) {
this.getBank().open();
sleepUntil(() -> {
return this.getBank().isOpen();
}, (long)Calculations.random(1000, 2000));
this.getBank().depositAllItems();
sleepUntil(() -> {
return this.getInventory().isEmpty();
}, (long)Calculations.random(1000, 2000));
this.getBank().close();
} else if(!this.getInventory().isFull() && !bootArea.contains(this.getLocalPlayer())) {
this.getWalking().walk(bootArea.getRandomTile());
sleep(Calculations.random(500, 1200));
}
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment