- import com.sharpf.scripting.model.State;
- import com.sharpf.scripting.rs.RSScript;
- import com.sharpf.scripting.model.Paintable;
- /**
- * @author _WorldTour
- */
- private int[] oakIDs = new int[] { 1281,3037,8462,8463,8464,8465,8466,8467 };
- public class WillowsPro extends RSScript implements paintable {
- public int oaksBanked = 0;
- public int oakXp = 37.5;
- public int xpGained = oaksBanked * oakXp;
- public int xpPerHour = (xpgained / ( (hours * 60) + minutes ))*60;
- public long startTime = System.currentTimeMillis();
- public long millis = System.currentTimeMillis() - startTime;
- public long hours = millis / (1000 * 60 * 60);
- public long minutes = millis / (1000 * 60);
- public long seconds = millis / 1000;
- private String debugState;
- @Override
- public void paint(Graphics g) {
- g.setColor(Color.black);
- g.drawString(WorldTour's OakPro', 60, 100);
- g.setColor(Color.red)
- g.drawString("Run time: " + hours + ":" + minutes + ":" + seconds, 40, 125);
- g.drawString("Oaks Banked" + oaksBanked, 40, 150);
- g.drawString("Xp Gained" + xpGained, 40, 175);
- g.drawString("Xp Per Hour" + xpPerHour, 40, 200);
- g.setColor(Color.black)
- g.drawString("State" + debugState, 40, 250);
- }
- @Override
- public void onStart() {
- startTime = System.currentTimeMillis();
- }
- @Override
- public void onStateChanged(State state) {
- if(state == State.IDLE) {
- debugState = "Chopping Oaks";
- interactWithObject("Chop",oakIDs);
- }
- }
- @Override
- public void onInventoryFull() {
- debugState = "Banking";
- interactWithObject("Use-quickly", 2213);
- interactWithItem("Deposit-All", 1521);
- closeBank();
- }
- }