Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.osbot.rs07.api.ui.RS2Widget;
- import org.osbot.rs07.script.Script;
- import org.osbot.rs07.script.ScriptManifest;
- import java.util.Arrays;
- import java.util.List;
- @ScriptManifest(author = "Malcolm", info = "", name = "Wildyattacker number two", version = 1.0, logo = "")
- public class wildyskip extends Script {
- private boolean clickedSkip = false;
- private String[] array = {"adriatric511"};
- public int onLoop() throws InterruptedException {
- if (!getCombat().isFighting()) {
- getTarget();
- } else {
- // fight();
- }
- return 1500;
- }
- public void getTarget() throws InterruptedException {
- if (getWidgets().matchingTextColour(90, 16777215) != null && !clickedSkip) {
- if (!getWidgets().matchingTextColour(90, 16777215).isEmpty()) {
- RS2Widget targetWidget = getWidgets().matchingTextColour(90, 16777215).get(0);
- for (int i = 0; i < array.length; i++) {
- if (!targetWidget.getMessage().contains(array[i])
- && !targetWidget.getMessage().contentEquals("None")) {
- if (getWidgets().containingActions(90, "Abandon target") != null) {
- if (!getWidgets().containingActions(90, "Abandon target").isEmpty()) {
- RS2Widget skipWidget = getWidgets().containingActions(90, "Abandon target").get(0);
- if (skipWidget.interact("Abandon target")) {
- clickedSkip = true;
- }
- }
- }
- } else {
- // attack Target
- }
- }
- }
- } else if (clickedSkip) {
- if (getDialogues().isPendingContinuation()) {
- if (getDialogues().clickContinue()) {
- sleep(2000);
- // Sleep until you have a new target
- }
- } else {
- getKeyboard().typeString("1", false);
- sleep(2000);
- // Sleep until you have a new target
- clickedSkip = false;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement