iannat 0 Share 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? Link to comment Share on other sites More sharing options...
Calle 17 Share Posted March 8, 2022 yeah, that is just a node, meaning just partial of the script not the entire script Link to comment Share on other sites More sharing options...
camelCase 242 Share Posted March 8, 2022 this script is written using the DB2 api and is outdated, it will not work. Link to comment Share on other sites More sharing options...
iannat 0 Author Share Posted March 8, 2022 ok thx Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.