Abysm 3 Posted February 20, 2018 Any suggestions regarding my coding? This is simple money making method in f2p, dont know the exact rates but used to be 40-60k/hr Download link: http://www.mediafire.com/file/n55u2tx6b558vhs/WoadLeaf.jar Source: package org.dreambot.abysm; 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.Timer; import org.dreambot.api.wrappers.interactive.NPC; import java.awt.*; @ScriptManifest(author = "Abysm", category = Category.MONEYMAKING, description = "Buys woad leaf for profit", name = "Abysm's woad leaf", version = 1.0) public class Main extends AbstractScript{ private Area WOAD_AREA = new Area(3031, 3383, 3022, 3375); private Timer timer = new Timer(); private String status; public enum State { BUY, STOP, WALK } private State getState() { if (getInventory().contains("Coins") && WOAD_AREA.contains(getLocalPlayer())) { status = "Buying woad leaves"; return State.BUY; } else if (!WOAD_AREA.contains(getLocalPlayer())) { status = "Walking to the area"; return State.WALK; } status = "Stopping script"; log("No coins in inventory, logging off..."); return State.STOP; } @Override public void onPaint(Graphics g) { g.drawString("Time ran: " + timer.formatTime(), 30, 285); g.drawString("Status: " + status, 30, 310); } @Override public int onLoop() { switch (getState()) { case BUY: NPC woadseller = getNpcs().closest("Wyson the gardener"); if (!getDialogues().inDialogue()) { woadseller.interact("Talk-to"); } else if (getDialogues().inDialogue()) { if (getDialogues().chooseOption("Yes please, I need woad leaves.")) { sleep(200, 300); } else if (getDialogues().chooseOption("How about 20 coins?")) { sleep(200, 300); } else { getDialogues().continueDialogue(); } } break; case STOP: getTabs().logout(); stop(); break; case WALK: getWalking().walk(WOAD_AREA.getRandomTile()); break; } return Calculations.random(500, 900); } }
Abysm 3 Author Posted February 20, 2018 40-50k/h in theory but theres close to 0 demand yeah, I guess you can use them only to make blue dye. Just trying to learn scripting
B Rabbit 0 Posted January 12, 2019 Been working perfectly for me... try deleting your jagexcache and making sure you have the correct Java downloaded
rockanton 0 Posted July 31, 2021 Doesn't work with DreamBot 3, could you recompile it please? Tnx! Quote [ERROR] This script needs to be compiled against the latest DreamBot 3 build:: java.lang.IncompatibleClassChangeError: Expecting non-static method org.dreambot.api.methods.container.impl.Inventory.contains(Ljava/lang/String;)Z at org.dreambot.abysm.Main.getState(Main.java:26) at org.dreambot.abysm.Main.onLoop(Main.java:46) at org.dreambot.api.script.AbstractScript.run(AbstractScript.java) at java.lang.Thread.run(Unknown Source)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.