investmentideas Posted March 25, 2019 Share Posted March 25, 2019 Hi all, i have written something very simple that attempts to skip a target if its not one of them listed in an array. I am trying to build the script but it does not show in the osbot client even when I refresh, is there something wrong with the coding that wont let me test it?? import org.osbot.rs07.api.filter.Filter; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.utility.ConditionalSleep; import java.util.Arrays; import java.util.List; public class wildyskiptargets extends Script { private final List<String> attackerBots = Arrays.asList("", "", ""); private final List<String> attackedBots = Arrays.asList("", "", "", ""); @Override public int onLoop() throws InterruptedException { RS2Widget target = getWidgets().singleFilter(90, w -> w != null && w.isVisible() && w.getMessage().equals(attackerBots)); RS2Widget skipTarget = getWidgets().singleFilter(90, w -> w!= null & w.isVisible() && w.getInteractActions().length > 0); if (target != null && target.isVisible()){ log("Target has been assigned"); if (skipTarget.interact("Abandon target")){ log("Skipping Target"); new ConditionalSleep(5000, 1000) { @Override public boolean condition() throws InterruptedException { return getDialogues().isPendingContinuation(); } }.sleep(); } } return 2500; } Quote Link to comment Share on other sites More sharing options...
Chris Posted March 25, 2019 Share Posted March 25, 2019 you are missing a script manifest above the classname do @ScriptManifest and import 1 1 Quote Link to comment Share on other sites More sharing options...
investmentideas Posted March 25, 2019 Author Share Posted March 25, 2019 that is so simple and so stupid of me, thank you! 1 Quote Link to comment Share on other sites More sharing options...