JS3 Posted August 15, 2018 Share Posted August 15, 2018 import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; @ScriptManifest(name = "HiAlch", version = 1, author = "J$", logo = "", info = "") public class Main extends Script { @Override public void onStart() throws InterruptedException { getExperienceTracker().start(Skill.MAGIC); } @Override public int onLoop() throws InterruptedException { if (canAlch()) { clickAlch(); } else { stop(); log("Out of supplies or dead"); } return 700; } public boolean canAlch() { return getEquipment().isWieldingWeaponThatContains("staff") && getInventory().contains("Nature rune", "Yew longbow (u)"); } public void clickAlch() { RS2Widget[] alchPic = getWidgets().getWidgets(218, 35); int rX = random(705, 717); int rY = random(331, 338); if (getTabs().magic.open()) { getMouse().click(rX, rY, false); getMouse().click(rX, rY, false); new ConditionalSleep(2000, 500) { @Override public boolean condition() throws InterruptedException { return alchPic != null; } }.sleep(); } } @Override public void onPaint(Graphics2D paint) { int mXp = getExperienceTracker().getGainedXP(Skill.MAGIC); super.onPaint(paint); paint.drawString("Magic XP: " + mXp, 387, 328); } } I was working on an Agility Alcher and decided to make this while bank standing. If you can use it, sweet, if it's bad, sorry. Quote Link to comment Share on other sites More sharing options...