Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 10th, 2012  |  syntax: None  |  size: 1.79 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import com.sharpf.scripting.model.State;
  2. import com.sharpf.scripting.rs.RSScript;
  3. import com.sharpf.scripting.model.Paintable;
  4.  
  5. /**
  6.  * @author _WorldTour
  7.  */
  8.  
  9. private int[] oakIDs = new int[] { 1281,3037,8462,8463,8464,8465,8466,8467 };
  10.  
  11. public class WillowsPro extends RSScript implements paintable {
  12.  
  13.   public int oaksBanked = 0;
  14.   public int oakXp = 37.5;
  15.   public int xpGained = oaksBanked * oakXp;
  16.   public int xpPerHour = (xpgained / ( (hours * 60) + minutes ))*60;  
  17.  
  18.   public long startTime = System.currentTimeMillis();
  19.   public long millis = System.currentTimeMillis() - startTime;
  20.   public long hours = millis / (1000 * 60 * 60);
  21.   public long minutes = millis / (1000 * 60);
  22.   public long seconds = millis / 1000;
  23.  
  24.   private String debugState;
  25.  
  26.  
  27.   @Override
  28.     public void paint(Graphics g) {
  29.         g.setColor(Color.black);
  30.         g.drawString(WorldTour's OakPro', 60, 100);
  31.         g.setColor(Color.red)
  32.         g.drawString("Run time: " + hours + ":" + minutes + ":" + seconds, 40, 125);
  33.         g.drawString("Oaks Banked" + oaksBanked, 40, 150);
  34.         g.drawString("Xp Gained" + xpGained, 40, 175);
  35.         g.drawString("Xp Per Hour" + xpPerHour, 40, 200);
  36.         g.setColor(Color.black)
  37.         g.drawString("State" + debugState, 40, 250);
  38.  
  39.     }
  40.  
  41.   @Override
  42.     public void onStart() {
  43.         startTime = System.currentTimeMillis();
  44.     }
  45.  
  46.   @Override
  47.     public void onStateChanged(State state) {
  48.         if(state == State.IDLE) {
  49.             debugState = "Chopping Oaks";
  50.             interactWithObject("Chop",oakIDs);
  51.  
  52.         }
  53.     }
  54.  
  55.   @Override
  56.     public void onInventoryFull() {
  57.         debugState = "Banking";
  58.         interactWithObject("Use-quickly", 2213);
  59.         interactWithItem("Deposit-All", 1521);
  60.         closeBank();
  61.     }
  62. }