public TP(String name){
this.willowtree = Objects.requireNonNull(willowtree);
}
remove this
private static enum State {
Varrock, Gnome, Lumby, Falador, Taverly, Done;
public String toString() {
String s = name().toLowerCase().replaceAll("_", " ");
return s.substring(0, 1).toUpperCase().concat(s.substring(1, s.length()));
}
}
remove the static modifier. enums are static by nature
int check = new Integer(0);
just do int check = 0, and put it inside of the getState() loop. not outside.
Entity willow = closestObjectForName(WILLOW_TREE);
put that in onLoop(). also this is just gonna return a null. i still dont get why you're using this
objects.closest("Tree stump").interact("Dig");
objects.closest("Dead tree").interact("Dig");
getCamera().toEntity(spirit);
objects.closest("Spirit tree").interact("Travel");
all of those need null checks
private Entity closestObjectForName(String WILLOW_TREE) {
// TODO Auto-generated method stub
return willow;//FIX THIS FUCKING NULL
}
just implement this
private boolean open(Tab magic) {
// TODO Auto-generated method stub
return true;
}
what is this? just use the api method
private void castSpell(MagicSpell spell) {
// TODO Auto-generated method stub
NormalSpells vartele = Spells.NormalSpells.VARROCK_TELEPORT;
}
api method...
public final boolean toEntity(Entity willow) {
return false;
}
?????????????????????????????
it's ironic that you have lengthy explanations for what's right in your script, but no explanation for methods that do nothing (???)
These are all of the generic issues - i havent looked at the script logic at all yet
you might want to try an easier script as your first... i did a simple nature chest script that was incredibly difficult for me at the time, for example, last august, and recently, i've been able to do scripts like wintertodt, multiple progressive levelers, agility pyramid, etc that all work fantastically. take yourself 1 step at a time m8. you're trying to fly an airplane before you've even gotten your learner's permit