Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Graphics2D;
- import java.text.DecimalFormat;
- import org.osbot.rs07.script.Script;
- import org.osbot.rs07.script.ScriptManifest;
- @ScriptManifest(name="ExampleScript", author="author", info="1.0", logo="", version=1.0D)
- public final class paintScript
- extends Script
- {
- // PAINT VARIABLE DECLARATIONS
- private int costOfItem;
- private int itemsMade;
- private double gpGained;
- private double totalGpGained;
- // ONSTART() METHOD
- public final void onStart()
- {
- costOfItem = 500;
- }
- // ONLOOP() METHOD
- @Override
- public int onLoop() throws InterruptedException
- {
- itemsMade += 1;
- return 123;
- }
- // ONPAINT() METHOD
- public void onPaint(Graphics2D g)
- {
- Graphics2D gr = g;
- gpGained = itemsMade - costOfItem;
- totalGpGained = gpGained / 1000;
- DecimalFormat df = new DecimalFormat("#");
- g.drawString("" + df.format(totalGpGained) + " k", 295, 417);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement