Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main;
- import org.dreambot.api.methods.Calculations;
- import org.dreambot.api.script.AbstractScript;
- import org.dreambot.api.script.ScriptManifest;
- import org.dreambot.api.script.Category;
- import org.dreambot.api.wrappers.interactive.GameObject;
- import org.dreambot.api.wrappers.interactive.NPC;
- @ScriptManifest(author = "OsrsBot69", name = "SimpleWoadBuyer", description = "Give account cash, and go to the farmer - will buy woad leaves until out of money.", version = 1.0, category = Category.MONEYMAKING)
- public class Main extends AbstractScript {
- private int state;
- private int coins;
- private String gardener;
- public void onStart() {
- log("Starting Script");
- state = 0;
- }
- public void onExit(){
- log("Exit Script");
- }
- @Override
- public int onLoop() {
- if (state == 0) {
- buyLeaf();
- } else if (state == 1) {
- bank();
- } else {
- }
- return Calculations.random(500, 1000);
- }
- private void buyLeaf() {
- if (getInventory().contains("Coins")) {
- log("Talk");
- } else {
- state = 1;
- log("Banking");
- }
- }
- private void bank() {
- if (!getInventory().contains(coins)){
- log("Bank");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement