Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fishing;
- import org.powerbot.script.rt4.ClientContext;
- import org.powerbot.script.rt4.Magic;
- import java.util.concurrent.Callable;
- import org.powerbot.script.rt4.Magic.Spell;
- /**
- * Created by Jayden on 4/29/2015.
- */
- public class CastSpell extends Task<ClientContext> {
- Spell spell;
- public CastSpell (ClientContext ctx,Spell spell) {
- super(ctx);
- this.spell = spell;
- }
- public static class Runes {
- public static final int FIRE = 554;
- public static final int WATER = 555;
- public static final int EARTH = 557;
- public static final int LAW = 563;
- public static final int BODY = 559;
- public static final int AIR = 556;
- public static final int DEATH = 560;
- }
- public boolean activate () {
- Callable<Boolean> whatRunes;
- switch (spell) {
- case Spell.VARROCK_TELEPORT:
- whatRunes = new Callable<Boolean>() {
- @Override
- public Boolean call() throws Exception {
- return ctx.inventory.id(new int[] {Runes.FIRE, Runes.LAW}).count() > 0 && ctx.inventory.id(Runes.AIR).count() > 2;
- }
- };
- break;
- case default:
- return true;
- break;
- }
- return cond.call() &&
- }
- public void execute () {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement