Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
935 B
2
Indexable
Never
package TestScript.Tasks;

import TestScript.RezzCW;
import org.powbot.api.Condition;
import org.powbot.api.Random;
import org.powbot.api.rt4.*;
import org.powbot.mobile.script.ScriptManager;
import utils.Task;

public class speciala extends Task {
    RezzCW main;

    public speciala(RezzCW main) {
        super();
        super.name = "specialattack";
        this.main = main;
    }

    @Override
    public boolean activate() {
        return main.danger.contains(Players.local()) && Player.getNil().healthBarVisible();
    }

    @Override
    public void execute() {
        if (Combat.specialPercentage() >= 50) {
            Combat.specialAttack(true);
        } else {
            if (Combat.specialPercentage() == 50) {
                Combat.specialAttack(true);
                System.out.println("using second special");
            } else {
                Combat.specialAttack(false);
            }
        }
    }
}