December 26, 20232 yr Somebody asked for it and it only supports attack at the moment. Opens inventory, clicks on "Lamp" then clicks on Attack and then Confirm: Attack Checks again if there are any lamps, if not then it stops. The plan is to make it support every single lamp ingame and stats. I guess this is just version 1.0 and we move on the other day. import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.api.ui.RS2Widget; @ScriptManifest(name = "Lamp", author = "Bjotorsflav", version = 1.0, info = "", logo = "") public class Lamp extends Script { @Override public int onLoop() throws InterruptedException { // Check if "Lamp" is in the inventory Item lamp = getInventory().getItem("Lamp"); if (lamp != null) { // Interact with the "Lamp" by clicking "Rub" lamp.interact("Rub"); // Sleep for a short duration to allow the interaction to occur sleep(random(500, 800)); // Click on the first widget with coordinates (240, 2, 4) RS2Widget widget1 = getWidgets().get(240, 2, 4); if (widget1 != null) { widget1.interact(); } // Sleep for a short duration to allow the interaction to occur sleep(random(500, 800)); // Click on the second widget with coordinates (240, 26, 0) RS2Widget widget2 = getWidgets().get(240, 26, 0); if (widget2 != null) { widget2.interact(); } } else { // If "Lamp" is not in the inventory, stop the script stop(); } return 500; // Sleep for 500 milliseconds before running the script again } }
December 26, 20232 yr Nice Just a small addition, if you wanna choose the skill, try this one: getWidgets().containingActions(240, "Slayer").get(0).interact(); Can swap slayer for any other skill, and runecrafting should be runecraft
Create an account or sign in to comment