Advertisement
Guest User

Xp Gained - Pug Tutorials

a guest
Aug 29th, 2014
576
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.87 KB | None | 0 0
  1. import java.awt.Graphics2D;
  2. import org.osbot.rs07.api.ui.Skill;
  3. import org.osbot.rs07.script.Script;
  4. import org.osbot.rs07.script.ScriptManifest;
  5.  
  6.  
  7. @ScriptManifest(name="ExampleScript", author="author", info="1.0", logo="", version=1.0D)
  8. public final class paintScript
  9.   extends Script
  10. {
  11.  
  12.     // PAINT VARIABLE DECLARATIONS
  13.     private int beginningXp;
  14.     private int currentXp;
  15.     private int xpGained;
  16.    
  17.     // ONSTART() METHOD
  18.     public final void onStart()
  19.     {
  20.         beginningXp = skills.getExperience(Skill.RUNECRAFTING);
  21.     }
  22.    
  23.     // ONLOOP() METHOD
  24.     @Override
  25.     public int onLoop() throws InterruptedException
  26.     {
  27.        
  28.         return 123;
  29.     }
  30.    
  31.     // ONPAINT() METHOD
  32.     public void onPaint(Graphics2D g)
  33.       {
  34.         Graphics2D gr = g;
  35.         currentXp = skills.getExperience(Skill.RUNECRAFTING);
  36.         xpGained = currentXp - beginningXp;
  37.         g.drawString("" + xpGained, 1, 1);
  38.       }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement