Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.scripts;
- import java.awt.*;
- import com.kbot2.handlers.eventSystem.eventListeners.PaintListener;
- import com.kbot2.handlers.eventSystem.eventListeners.ServerMessageListener;
- import com.kbot2.scriptable.Script;
- import com.kbot2.scriptable.methods.wrappers.Obj;
- public class iEssReceiver extends Script implements PaintListener, ServerMessageListener {
- boolean TRADE = false;
- int status = 0;
- Rectangle ACCEPT = new Rectangle (9, 442, 483, 13);
- Obj altar;
- public boolean active() {
- return true;
- }
- @Override
- public boolean onStart() {
- return true;
- }
- public void onServerMessage(String trade) {
- if (trade.contains(":tradereq:")) {
- TRADE = true;}
- }
- public int loop() {
- switch (status) {
- case 0: //checks
- log("status = 0");
- if (inventory.contains(1436)) {
- status = 1; }
- if (TRADE = true) {
- clickMouse(250, 448, 200, 5, true);
- TRADE = false;
- sleep(400, 600);
- status = 2; }
- return random(600, 1000);
- case 1: //craft runes
- log("status = 1");
- altar = getClosestObject(20, 2478);
- if (inventory.contains(1436)) {
- altar.doAction("Craft-rune"); }
- if (!inventory.contains(1436)) {
- status = 0; }
- return random(200, 300);
- case 2://trading
- log("status = 2");
- if (interfaces.interfaceExists(335, 16)) {
- inventory.atItem("Offer-X", 1437);
- sleep(1000, 1400);
- sendText("26", true);
- status = 3;}
- return random(200, 300);
- case 3://more trading
- log("status = 3");
- if (interfaces.interfaceExists(335, 16)) {
- interfaces.getInterface(335, 16).doAction("Accept");
- sleep(400, 600); }
- if (interfaces.interfaceExists(334, 20)) {
- interfaces.getInterface(334, 20).doAction("Accept");
- sleep(500, 800); }
- if (inventory.contains(1436)) {
- status = 0; }
- return random(200, 300);
- }
- return random(200, 300);
- }
- void clickMouse(int x, int y, int randx, int randy, boolean button) {
- mouse.moveMouse(x, y, randx, randy);
- sleep(100);
- mouse.clickMouse(button);
- }
- public String getName() {
- return "iEssReceiver";
- }
- public String getAuthor() {
- return "Ryan";
- }
- public String getDescription() {
- return "Takes the ess from accounts using iEssWalker and creates air runes";
- }
- public void onRepaint(Graphics w) {
- }
- }
Add Comment
Please, Sign In to add comment