Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.util.*;
- import java.util.List;
- import java.util.logging.Level;
- import javax.accessibility.*;
- import javax.swing.*;
- import org.rsbot.bot.Bot;
- import org.rsbot.script.*;
- import org.rsbot.script.wrappers.*;
- import org.rsbot.util.ScreenshotUtil;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.event.listeners.ServerMessageListener;
- import org.rsbot.event.events.ServerMessageEvent;
- @ScriptManifest(authors = {"Slaven"}, category = "Thieving", name = "STealer", version = 1.00, description = "<html><head></head><body>All settings are in the GUI. Start in Varrock East bank.</body></html\n")
- public class STealer extends Script implements ServerMessageListener, PaintListener {
- public int EXP_GAINED = 0;
- public int levelsGained = 0;
- public int TEA_ID = 1978;
- public int TEA_EXP = 16;
- public int stealingAnimation = 832;
- public int BANK_ID = 11402;
- RSTile[] toStall = {new RSTile(3265, 3419), new RSTile(3268, 3410)};
- public RSObject bankBooth = (RSObject) findObject(BANK_ID);
- public long startTime = System.currentTimeMillis();
- private String status = "";
- private final ScriptManifest properties = getClass().getAnnotation(ScriptManifest.class);
- public boolean onStart(Map<String, String> args) {
- return true;
- }
- int teaStolen = 0;
- public int loop() {
- if(getMyPlayer().getAnimation() != -1) {
- return random(300,700);
- }
- RSObject teaStall = findObject(635);
- if (teaStall != null) {
- RSTile stallTile = teaStall.getLocation();
- if (atTile(stallTile, "Steal")) {
- teaStolen++;
- }
- }
- return random(150, 350);
- }
- public void serverMessageRecieved(final ServerMessageEvent m) {
- if (m.getMessage().contains("You've just")) {
- levelsGained++;
- }
- }
- public void onRepaint(Graphics g) {
- if (!isLoggedIn() || isLoginScreen()) {
- return;
- }
- }
- public void onFinish() {
- }
- }
Add Comment
Please, Sign In to add comment