iannat 0 Posted March 8, 2022 import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.container.impl.equipment.EquipmentSlot; import org.dreambot.api.methods.tabs.Tab; import org.dreambot.api.script.AbstractScript; public class CrystalChest extends Node { public CrystalChest(AbstractScript as) { super(as); } @Override public boolean activate() throws InterruptedException { return Values.CRYSTAL_CHEST.contains(as.getLocalPlayer().getTile()); } @Override public void execute() throws InterruptedException { as.log("At crystal chest."); if (as.getCamera().getYaw() < 1500 || as.getCamera().getYaw() > 1800) { as.getCamera().rotateToYaw(Calculations.random(1500, 1800)); } // if we have rings at the chest, open them if (as.getInventory().contains(Values.CRYSTAL_KEY) && !as.getInventory().isFull()) { as.log("opening chest"); //interact with chest if (as.getInventory().isItemSelected()) { as.getInventory().deselect(); } as.sleep(500); as.getInventory().get(Values.CRYSTAL_KEY).useOn(as.getGameObjects().closest("Closed chest")); as.sleep(Calculations.random(1000, 1500)); } else { //teleport to castle wars as.getTabs().openWithMouse(Tab.EQUIPMENT); as.getEquipment().interact(EquipmentSlot.RING, "Castle Wars"); as.sleepUntil(() -> Values.CASTLE_WARS.contains(as.getLocalPlayer().getTile()), 3000); } } } can somone tell me whats wrong?
Calle 17 Posted March 8, 2022 yeah, that is just a node, meaning just partial of the script not the entire script
camelCase 304 Posted March 8, 2022 this script is written using the DB2 api and is outdated, it will not work.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.