if(getMagic().canCast(Spells.NormalSpells.CAMELOT_TELEPORT)){
if (new ConditionalSleep(3000, 100) {
@Override
public boolean condition() throws InterruptedException {
return getMagic().castSpell(Spells.NormalSpells.CAMELOT_TELEPORT);
}
}.sleep()) {
new ConditionalSleep(1500, 100) {
@Override
public boolean condition() throws InterruptedException {
return !myPlayer().isAnimating();
}
}.sleep();
}
}else{
log("Ran out of runes, logging off");
new ConditionalSleep(2000) {
@Override
public boolean condition() throws InterruptedException {
return !myPlayer().isAnimating(); // Wait for anim to finish so we can log off
}
}.sleep();
stop(true);
}
return random(500,1000);