Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package NoWinners;
- import java.awt.Graphics;
- import java.awt.Graphics2D;
- import org.rsbuddy.tabs.Inventory;
- import com.rsbuddy.event.listeners.PaintListener;
- import com.rsbuddy.script.ActiveScript;
- import com.rsbuddy.script.methods.Game;
- import com.rsbuddy.script.util.Random;
- public class random extends ActiveScript implements PaintListener{
- public int tokenID;
- public int tokensStart;
- public int tokensGained;
- public int currentTokens;
- public int tokensHr;
- public int runTime;
- @Override
- public int loop() {
- return Random.nextInt(10, 20);
- }
- @Override
- public boolean onStart() {
- if (Game.isLoggedIn()) {
- tokensStart = Inventory.getCount(tokenID);
- return true;
- } else {
- log("Please start the script logged in!");
- return false;
- }
- }
- @Override
- public void onRepaint(Graphics g1) {
- Graphics2D g = (Graphics2D)g1;
- currentTokens = Inventory.getCount(tokenID);
- tokensGained = currentTokens - tokensStart;
- tokensHr = tokensGained/runTime*60;
- }
- }
Add Comment
Please, Sign In to add comment