- //error pic http://i918.photobucket.com/albums/ad28/Alfansor/rsboterror.jpg
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.methods.Skills;
- import org.rsbot.script.util.Timer;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.wrappers.RSNPC;
- import org.rsbot.event.events.ServerMessageEvent;
- import org.rsbot.event.listeners.*;
- import java.awt.*;
- @ScriptManifest(authors = "Alfansor", name = "Alfies TeaStealer", version = 0.1, description = "Just go to the tea stall beside Varrock East bank and start the script.")
- public class AlfiesTeaStealer extends Script {
- int stallID = 635 ;
- Thread abThread;
- public boolean onStart() {
- log("Welcome to Alfies Tea Stealer");
- abThread = new Thread(new antiBan());
- abThread.start();
- return true;
- }
- private void Steal() {
- RSObject stall = objects.getNearest(stallID);
- if(getMyPlayer().getAnimation() == -1)
- stall.doAction("Steal");
- }
- public void dropTea() {
- if (inventory.isFull()) {
- dropTea();
- } else if (!inventory.isFull()) {
- Steal();
- }
- }
- public int loop() {
- if (inventory.isFull()) {
- dropTea();
- } else if (!inventory.isFull()) {
- Steal();
- }
- return random(650, 1250);
- }
- class antiBan extends Thread {
- public void run() {
- while (abThread !=null) {
- try {
- int state = random(0, 8);
- switch (state) {
- case 1:
- int currTab = game.getCurrentTab();
- game.openTab(random(0, 5));
- Thread.sleep(random(1000, 4000));
- game.openTab(currTab);
- break;
- case 2:
- camera.setAngle(random(0, 360));
- break;
- case 3:
- camera.setPitch(random(0, 100));
- break;
- case 4:
- mouse.moveSlightly();
- Thread.sleep(random(850, 1150));
- mouse.moveSlightly();
- break;
- }
- Thread.sleep(5000);
- } catch (InterruptedException e) {
- log
- .severe("Alfies Tea Stealer's antiban has encountered an error. Error:"
- + e);
- }
- }
- }
- }
- }