@ScriptManifest(name = "GEWalker", author = "Your name", version = 1.0, info = "Script info", logo = "") //Helps the client understand and find the script we compile
public class Skeleton extends Script {
@Override
public void onStart() {
/**
* Excellent for starting timers (getExperienceTracker.startAll(); , Timer afkTimer = new Timer(180_000) //180_000 ms = 3 mins)
* Initiate variables here (Excluding NPC, RSObject, ....) [Uses: myVal = 99, currentXP = getSkills().getStatic(Skill.ATTACK)]
* & More
*/
}
@Override
public void onExit() {
/**
* Excellent for clearing listeners that we implement
* Logging end script info
* & More
*/
}
@Override
public int onLoop() {
Position[] positions = ...
WalkingEvent event = new WalkingEvent();
event.setPath(new LinkedList<Position>(Arrays.asList(positions)));
execute(event);
return 700; //Usually want to keep it over 600MS unless you need a fast loop. 1000MS = 1 second.
}
@Override
public void onPaint(Graphics2D g) {
}
}