Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. package fishing;
  2.  
  3. import org.powerbot.script.rt4.ClientContext;
  4. import org.powerbot.script.rt4.Magic;
  5.  
  6. import java.util.concurrent.Callable;
  7. import org.powerbot.script.rt4.Magic.Spell;
  8.  
  9. /**
  10. * Created by Jayden on 4/29/2015.
  11. */
  12. public class CastSpell extends Task<ClientContext> {
  13. Spell spell;
  14. public CastSpell (ClientContext ctx,Spell spell) {
  15. super(ctx);
  16. this.spell = spell;
  17. }
  18. public static class Runes {
  19. public static final int FIRE = 554;
  20. public static final int WATER = 555;
  21. public static final int EARTH = 557;
  22. public static final int LAW = 563;
  23. public static final int BODY = 559;
  24. public static final int AIR = 556;
  25. public static final int DEATH = 560;
  26.  
  27. }
  28. public boolean activate () {
  29. Callable<Boolean> whatRunes;
  30. switch (spell) {
  31. case Spell.VARROCK_TELEPORT:
  32. whatRunes = new Callable<Boolean>() {
  33. @Override
  34. public Boolean call() throws Exception {
  35. return ctx.inventory.id(new int[] {Runes.FIRE, Runes.LAW}).count() > 0 && ctx.inventory.id(Runes.AIR).count() > 2;
  36. }
  37. };
  38. break;
  39. case default:
  40. return true;
  41. break;
  42. }
  43. return cond.call() &&
  44. }
  45. public void execute () {
  46.  
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement