Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package scripts.GSpinner;
- import java.awt.Point;
- import java.io.File;
- import java.io.FileNotFoundException;
- import java.util.Scanner;
- import org.tribot.api.General;
- import org.tribot.api.Timing;
- import org.tribot.api.input.Keyboard;
- import org.tribot.api.input.Mouse;
- import org.tribot.api2007.Banking;
- import org.tribot.api2007.Camera;
- import org.tribot.api2007.ChooseOption;
- import org.tribot.api2007.Game;
- import org.tribot.api2007.GameTab;
- import org.tribot.api2007.GameTab.TABS;
- import org.tribot.api2007.Interfaces;
- import org.tribot.api2007.Inventory;
- import org.tribot.api2007.Login;
- import org.tribot.api2007.Magic;
- import org.tribot.api2007.Objects;
- import org.tribot.api2007.Options;
- import org.tribot.api2007.Player;
- import org.tribot.api2007.Players;
- import org.tribot.api2007.Skills;
- import org.tribot.api2007.Skills.SKILLS;
- import org.tribot.api2007.Walking;
- import org.tribot.api2007.types.RSItem;
- import org.tribot.api2007.types.RSObject;
- import org.tribot.api2007.types.RSPlayer;
- import org.tribot.api2007.types.RSTile;
- import org.tribot.script.Script;
- import org.tribot.script.ScriptManifest;
- import org.tribot.script.interfaces.Ending;
- import org.tribot.script.interfaces.MessageListening07;
- import org.tribot.util.Util;
- @ScriptManifest(authors = { "Genka" }, category = "Crafting", name = "GSpinner")
- public class GSpinner extends Script implements Ending, MessageListening07 {
- static final RSTile BANKTILE = new RSTile(3208, 3218);
- static final RSTile DOORTILE = new RSTile(3207, 3214);
- static final RSTile STAIRTILE = new RSTile(3205, 3208);
- static final RSTile WHEELTILE = new RSTile(3209, 3212);
- static final int NEEDLE = 1733;
- static final int THREAD = 1734;
- static final int LEATHER = 1741;
- static final int FLAX = 1779;
- static final int BOWSTRING = 1777;
- static final int NOTEDBOWSTRING = 1778;
- public boolean alive = true;
- long animationtime = System.currentTimeMillis();
- long antibantime = System.currentTimeMillis();
- int nextantiban = 60000;
- long lastprint = System.currentTimeMillis();
- long lastsaid = System.currentTimeMillis();
- int startxp = 0;
- int botworld = 0;
- int muleworld = 0;
- String mulename = "null";
- String state = "Spin";
- String filelocation = Util.getWorkingDirectory() + "\\GSpinner\\lines.txt";
- File file = new File(filelocation);
- @Override
- public void run() {
- setRandomSolverState(RANDOM_SOLVERS.COMBATRANDOM, false);
- while(Game.getGameState() != 30){
- sleep(10);
- }
- Camera.setCameraAngle(100);
- Camera.setCameraRotation(0);
- Mouse.setSpeed(General.random(140,150));
- startxp = Skills.getXP(SKILLS.CRAFTING);
- while(alive){
- if(Player.getPosition().distanceTo(BANKTILE) > 25){
- Magic.selectSpell("Lumbridge Home Teleport");
- long t = System.currentTimeMillis();
- while(Player.getPosition().distanceTo(BANKTILE) > 25 && Timing.timeFromMark(t) < 20000){
- sleep(10);
- }
- } else {
- if(state.equals("Spin")){
- if(Game.getGameState() != 30){
- sleep(10);
- } else {
- if(!Game.isRunOn() && Game.getRunEnergy() > 50){
- Options.setRunOn(true);
- }
- if(Skills.getActualLevel(SKILLS.CRAFTING) < 10){
- oneToTen();
- deathWalk();
- } else {
- spinLoop();
- }
- if(Timing.timeFromMark(lastprint) > 1800000){
- double multiplier = getRunningTime() / 3600000D;
- int strHour = (int) (((Skills.getXP(SKILLS.CRAFTING) - startxp) / 15) / multiplier) ;
- println("Runtime: " + Timing.msToString(getRunningTime()) + " Bowstrings made: " + ((Skills.getXP(SKILLS.CRAFTING) - startxp) / 15) + "(" + strHour + "/HR)");
- lastprint = System.currentTimeMillis();
- }
- }
- } else if (state.equals("Trademule")){
- handleMule();
- }
- }
- sleep(10, 50);
- }
- }
- private void spinLoop(){
- if(Timing.timeFromMark(animationtime) < 3000){
- antiBan();
- } else {
- if(Player.getRSPlayer().isInCombat()){
- toBank();
- } else {
- bank();
- toWheel();
- spin();
- toBank();
- deathWalk();
- }
- }
- }
- private void deathWalk(){
- if(Player.getPosition().distanceTo(BANKTILE) < 25 && Player.getPosition().getPlane() == 0){
- if(!Player.isMoving() && Player.getPosition().distanceTo(STAIRTILE) > 3){
- Walking.blindWalkTo(STAIRTILE);
- } else if (Player.getPosition().distanceTo(STAIRTILE) <= 3){
- RSObject[] stairs = Objects.find(5, "Staircase");
- if(stairs.length > 0){
- if(stairs[0] != null){
- clickObject(stairs[0], "Climb-up", 3, 3);
- long t = System.currentTimeMillis();
- while(Player.getPosition().getPlane() == 0 && Timing.timeFromMark(t) < 5000){
- sleep(10);
- }
- }
- }
- }
- }
- }
- private void handleMule(){
- while(state.equals("Trademule")){
- if(muleworld != getWorld()){
- setLoginBotState(false);
- Hopping.hop(muleworld);
- setLoginBotState(true);
- } else {
- if(Player.getPosition().getPlane() == 1){
- if(Player.getPosition().getX() > 3207){
- if(openDoor()){
- if(Player.getPosition().distanceTo(STAIRTILE) > 2 && !Player.isMoving()){
- Walking.clickTileMM(randomTile(STAIRTILE), 1);
- sleep(500, 1600);
- Mouse.moveBox(168, 317, 346, 227);
- }
- } else if (!openDoor()){
- RSObject[] door = Objects.getAt(DOORTILE);
- if(door.length > 0){
- door[0].click("Open");
- long t = System.currentTimeMillis();
- while(!openDoor() && Timing.timeFromMark(t) < 2000){
- sleep(10);
- }
- }
- }
- } else if (Player.getPosition().distanceTo(STAIRTILE) <= 2){
- RSObject[] stairs = Objects.getAt(STAIRTILE);
- if(stairs.length > 0){
- if(clickObject(stairs[0], "Climb-up", 2, 2)){
- long t = System.currentTimeMillis();
- while(Player.getPosition().getPlane() == 1 && Timing.timeFromMark(t) < 3000){
- sleep(10);
- }
- }
- }
- }
- } else if (Player.getPosition().getPlane() == 2){
- RSObject[] bankbooth = Objects.find(20, "Bank booth");
- if (bankbooth.length > 0){
- if(Player.getPosition().distanceTo(BANKTILE) > 2 && !Player.isMoving()){
- Walking.clickTileMM(randomTile(BANKTILE), 1);
- sleep(300);
- } else {
- if(Inventory.find(NOTEDBOWSTRING).length > 0 || isTradeScreenOpen() || isSecondTradeScreenOpen()){
- if(Banking.isBankScreenOpen()){
- Banking.close();
- } else {
- RSPlayer[] mule = Players.find(mulename);
- if(mule.length > 0){
- if(!isTradeScreenOpen() && !isSecondTradeScreenOpen()){
- if(GameTab.getOpen() != TABS.INVENTORY){
- GameTab.open(TABS.INVENTORY);
- } else if(clickPlayer(mule[0], "Trade with " + mulename)){
- long t = System.currentTimeMillis();
- while(!isTradeScreenOpen() && Timing.timeFromMark(t) < 5000){
- sleep(10);
- }
- }
- } else if (isTradeScreenOpen()){
- RSItem[] nstring = Inventory.find(NOTEDBOWSTRING);
- if(nstring.length > 0){
- nstring[0].click("Offer-All");
- long t = System.currentTimeMillis();
- while(Inventory.find(NOTEDBOWSTRING).length > 0 && Timing.timeFromMark(t) < 4000){
- sleep(10);
- }
- } else {
- if(Interfaces.get(335, 50) != null){
- if(Interfaces.get(335, 50).getChild(0).getComponentItem() == 1780){
- if(!Interfaces.get(335, 56).getText().contains("Waiting for other player...")){
- Interfaces.get(335, 17).click("Accept");
- }
- }
- }
- }
- } else if (isSecondTradeScreenOpen()){
- if(Interfaces.get(334, 20) != null){
- if(!Interfaces.get(334, 33).getText().contains("Waiting for other player...")){
- Interfaces.get(334, 20).click("Accept");
- }
- }
- }
- } else {
- state = "Wait";
- setLoginBotState(false);
- if(getWorld() != botworld){
- Hopping.hop(botworld);
- }
- state = "Spin";
- setLoginBotState(true);
- }
- }
- } else if (Inventory.find(NOTEDBOWSTRING).length == 0 && !isTradeScreenOpen() && !isSecondTradeScreenOpen()){
- if(!Banking.isBankScreenOpen()){
- if(bankbooth.length > 0){
- if(clickObject(bankbooth[0], "Bank", 3, 3)){
- long t = System.currentTimeMillis();
- while(!Banking.isBankScreenOpen() && Timing.timeFromMark(t) < 3000){
- sleep(10);
- }
- }
- }
- } else if(Banking.isBankScreenOpen()) {
- Banking.depositAllExcept(NOTEDBOWSTRING);
- if (Interfaces.get(12, 18) != null){
- Interfaces.get(12, 18).click("Note");
- }
- Banking.withdraw(0, BOWSTRING);
- long t = System.currentTimeMillis();
- while(Inventory.find(NOTEDBOWSTRING).length == 0 && Timing.timeFromMark(t) < 3000){
- sleep(10);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- private boolean isTradeScreenOpen(){
- return Interfaces.get(335) != null;
- }
- private boolean isSecondTradeScreenOpen(){
- return Interfaces.get(334) != null;
- }
- private int getWorld(){
- String world = "" + Game.getCurrentWorld();
- return Integer.parseInt(world.substring(1));
- }
- private int getMuleWorld(){
- if(!GameTab.getOpen().equals(TABS.FRIENDS)){
- GameTab.open(TABS.FRIENDS);
- }
- if(Interfaces.get(550, 1).getChild(1) != null && !Interfaces.get(550, 1).getChild(1).getText().equals("Offline")){
- int length = Interfaces.get(550, 1).getChild(1).getText().length();
- return Integer.parseInt(Interfaces.get(550, 1).getChild(1).getText().substring(length -2));
- }
- return 0;
- }
- private String getMuleName(){
- if(!GameTab.getOpen().equals(TABS.FRIENDS)){
- GameTab.open(TABS.FRIENDS);
- }
- if(Interfaces.get(550, 1).getChild(1) != null){
- return Interfaces.get(550, 1).getChild(0).getText();
- }
- return null;
- }
- private void bank(){
- if((Inventory.find(FLAX).length == 0 && Player.getPosition().distanceTo(BANKTILE) < 3 && Player.getPosition().getPlane() == 2) || Player.getRSPlayer().isInCombat()){
- if(!Banking.isBankScreenOpen() && !Player.isMoving()){
- RSObject[] bankbooth = Objects.findNearest(10, "Bank booth");
- if(bankbooth.length > 0){
- if(clickObject(bankbooth[0], "Bank", 3, 3)){
- long t = System.currentTimeMillis();
- while(!Banking.isBankScreenOpen() && Timing.timeFromMark(t) < 3000){
- sleep(10);
- }
- }
- }
- } else if(Banking.isBankScreenOpen()){
- if(Inventory.getAll().length > 0){
- Banking.depositAll();
- } else {
- if(Banking.find(FLAX).length > 0){
- Banking.withdraw(0, FLAX);
- } else {
- if(state.equals("Spin")){
- int tries = 0;
- while(Banking.find(FLAX).length == 0 && tries < 50){
- tries++;
- if(tries > 40){
- setLoginBotState(false);
- while(Game.getGameState() == 30){
- Login.logout();
- }
- alive = false;
- }
- }
- }
- }
- long t = System.currentTimeMillis();
- while(Inventory.find(FLAX).length == 0 && Timing.timeFromMark(t) < 2000){
- sleep(10);
- }
- sleep(10,25);
- }
- }
- }
- }
- private void antiBan(){
- if(Timing.timeFromMark(antibantime) > nextantiban){
- antibantime = System.currentTimeMillis();
- nextantiban = General.random(60000, 300000);
- int key = General.random(1, 5);
- try{
- switch (key){
- case 1:
- if(GameTab.getOpen() != GameTab.TABS.STATS){
- GameTab.open(TABS.STATS);
- }
- sleep(10, 100);
- Mouse.moveBox(613, 333, 667, 355);
- sleep(1000,3500);
- GameTab.open(TABS.INVENTORY);
- break;
- case 2:
- Mouse.move((int)Mouse.getPos().getX() + General.random(-150, 150), (int)Mouse.getPos().getY() + General.random(-150, 150));
- break;
- case 3:
- RSPlayer[] players = Players.getAll();
- if(players.length > 0){
- for (RSPlayer i : players){
- if(i != null && i.isOnScreen()){
- if(i.getModel() != null && i.getModel().getCentrePoint() != null){
- Mouse.click(i.getModel().getCentrePoint(), 3);
- } else {
- Mouse.click(Player.getRSPlayer().getModel().getCentrePoint(), 3);
- }
- sleep(1000, 2000);
- Mouse.move((int)Mouse.getPos().getX() + General.random(15, 25),(int) Mouse.getPos().getY() + General.random(-60, -80));
- break;
- }
- }
- }
- break;
- case 4:
- RSObject[] all = Objects.getAll(6);
- for (int i = 0; i < 50 ; i++){
- int random = General.random(0, all.length -1);
- if(all != null && all.length >= random && all[random] != null && all[random].getDefinition() != null){
- Camera.turnToTile(new RSTile(all[random].getPosition().getX() + General.random(-1, 1), all[random].getPosition().getY() + General.random(-1, 1)));
- sleep(500, 5000);
- Camera.setCameraAngle(100);
- Camera.setCameraRotation(0);
- break;
- }
- }
- break;
- case 5:
- int randomint = General.random(1, 3000);
- try {
- Scanner scanner = new Scanner(file);
- for(int i = 0; i <= randomint; i++) {
- String line = scanner.nextLine();
- if(i == randomint && !line.equals("")){
- Keyboard.typeSend("/" + line);
- }
- }
- scanner.close();
- } catch (FileNotFoundException e) {
- println("fle lines.txt was not found");
- }
- break;
- }
- } catch (NullPointerException e){
- }
- }
- }
- private boolean clickObject(RSObject object, String option, int randomx, int randomy){
- try{
- if(object != null && object.isOnScreen() && object.getModel() != null){
- Point x = object.getModel().getCentrePoint();
- int x1 = (int) x.getX() + General.random(randomx, -randomx);
- int x2 = (int) x.getY() + General.random(randomy, -randomy);
- int tries = 0;
- while((int)Mouse.getPos().getX() != x1 && (int)Mouse.getPos().getY() != x2 && tries < 30) {
- Mouse.move(x1, x2);
- tries++;
- }
- Mouse.click(x1, x2, 3);
- if(ChooseOption.isOpen()){
- if(ChooseOption.isOptionValid(option)){
- ChooseOption.select(option);
- return true;
- } else {
- Mouse.move((int)Mouse.getPos().getX() + General.random(15, 25),(int) Mouse.getPos().getY() + General.random(-60, -80));
- }
- }
- }
- } catch (NullPointerException e){
- System.out.print("Your computer sux, recovered from nullpointer");
- }
- return false;
- }
- private boolean clickPlayer(RSPlayer object, String option){
- try{
- if(object != null && object.isOnScreen() && object.getModel() != null){
- Point x = object.getModel().getCentrePoint();
- int x1 = (int) x.getX();
- int x2 = (int) x.getY();
- int tries = 0;
- while((int)Mouse.getPos().getX() != x1 && (int)Mouse.getPos().getY() != x2 && tries < 30) {
- Mouse.move(x1, x2);
- tries++;
- }
- Mouse.click(x1, x2, 3);
- if(ChooseOption.isOpen()){
- if(ChooseOption.isOptionValid(option)){
- ChooseOption.select(option);
- return true;
- } else {
- Mouse.move((int)Mouse.getPos().getX() + General.random(15, 25),(int) Mouse.getPos().getY() + General.random(-60, -80));
- }
- }
- }
- } catch (NullPointerException e){
- System.out.print("Your computer sux, recovered from nullpointer");
- }
- return false;
- }
- private void toWheel(){
- if(Inventory.find(FLAX).length > 0 && Player.getPosition().getPlane() == 2){
- if(Player.getPosition().distanceTo(STAIRTILE) > 2 && !Player.isMoving()){
- Walking.clickTileMM(randomTile(STAIRTILE), 1);
- sleep(500, 1600);
- Mouse.moveBox(168, 317, 346, 227);
- } else if (Player.getPosition().distanceTo(STAIRTILE) <= 2){
- RSObject[] stairs = Objects.getAt(STAIRTILE);
- if(stairs.length > 0){
- if(stairs[0] != null && stairs[0].isOnScreen()){
- sleep(200);
- if(clickObject(stairs[0], "Climb-down", 2, 7)){
- long t = System.currentTimeMillis();
- while(Player.getPosition().getPlane() == 2 && Timing.timeFromMark(t) < 3000){
- sleep(10);
- }
- sleep(200,500);
- }
- }
- }
- }
- } else if (Inventory.find(FLAX).length > 0 && Player.getPosition().getPlane() == 1){
- if(Player.getPosition().getX() < 3208){
- if(openDoor() && !Player.isMoving()){
- RSObject[] wheel = Objects.getAt(WHEELTILE);
- if(wheel.length > 0){
- if(wheel[0] != null){
- if(clickObject(wheel[0], "Spin", 2, 2)){
- long t = System.currentTimeMillis();
- while(!Player.isMoving() && Timing.timeFromMark(t) < 3000){
- sleep(10);
- }
- }
- }
- }
- } else if (!openDoor()){
- if(Player.getPosition().distanceTo(DOORTILE) > 2){
- Walking.walkScreenPath(Walking.generateStraightScreenPath(new RSTile(3207, 3214)));
- sleep(1000);
- } else {
- RSObject[] door = Objects.getAt(DOORTILE);
- if(door.length > 0 && !Player.isMoving()){
- if(clickObject(door[0], "Open", 1, 1)){
- long t = System.currentTimeMillis();
- while(!openDoor() && Timing.timeFromMark(t) < 2000){
- sleep(10);
- }
- }
- }
- }
- }
- }
- }
- }
- private void spin(){
- if(Player.getAnimation() == 894){
- animationtime = System.currentTimeMillis();
- } else if (Player.getPosition().distanceTo(WHEELTILE) > 1 && Inventory.find(FLAX).length > 1 && Player.getPosition().getX() > 3207 && !Player.isMoving() && Player.getPosition().getPlane() == 1){
- Walking.clickTileMS(new RSTile(3209, 3213), "Walk here");
- sleep(200);
- } else if(Player.getPosition().distanceTo(WHEELTILE) < 2 && Inventory.find(FLAX).length > 0 && Timing.timeFromMark(animationtime) > 5000){
- if((Interfaces.get(459,91) == null || Interfaces.get(459, 91).getParentID() == -1) && Interfaces.get(548, 117).isHidden()){
- RSObject[] wheel = Objects.getAt(WHEELTILE);
- if(wheel.length > 0 && !Player.isMoving()){
- if(wheel[0] != null){
- if(clickObject(wheel[0], "Spin", 3, 10)){
- long t = System.currentTimeMillis();
- while((Interfaces.get(459, 91) == null || Interfaces.get(459, 91).getParentID() != -1) && Timing.timeFromMark(t) < 2000){
- sleep(10);
- }
- }
- }
- }
- } else if (Interfaces.get(459, 91) != null && Interfaces.get(459).isValid() && Interfaces.get(459, 91).getParentID() != -1){
- Interfaces.get(459,91).click("Make X");
- long t = System.currentTimeMillis();
- while(Interfaces.get(548, 117).isHidden() && Timing.timeFromMark(t) < 2000){
- sleep(10);
- }
- } else if (!Interfaces.get(548, 117).isHidden()){
- Keyboard.typeSend("" + randomInt(General.random(1, 50)));
- sleep(500);
- }
- }
- }
- private int randomInt(int key){
- switch (key){
- case 1:
- return 77;
- case 2:
- return 88;
- case 3:
- return 78;
- case 4:
- return 89;
- case 5:
- return 98;
- case 6:
- return 87;
- default:
- return 99;
- }
- }
- private void toBank(){
- if(Inventory.find(FLAX).length == 0 || Player.getRSPlayer().isInCombat()){
- if(Player.getPosition().getPlane() == 1){
- if(Player.getPosition().getX() > 3207){
- if(openDoor()){
- if(Player.getPosition().distanceTo(STAIRTILE) > 2 && !Player.isMoving()){
- Walking.clickTileMM(randomTile(STAIRTILE), 1);
- sleep(500, 1600);
- Mouse.moveBox(168, 317, 346, 227);
- }
- } else if (!openDoor()){
- RSObject[] door = Objects.getAt(DOORTILE);
- if(door.length > 0){
- door[0].click("Open");
- long t = System.currentTimeMillis();
- while(!openDoor() && Timing.timeFromMark(t) < 2000){
- sleep(10);
- }
- }
- }
- } else if (Player.getPosition().distanceTo(STAIRTILE) <= 2){
- RSObject[] stairs = Objects.getAt(STAIRTILE);
- if(stairs.length > 0){
- if(clickObject(stairs[0], "Climb-up", 2, 2)){
- long t = System.currentTimeMillis();
- while(Player.getPosition().getPlane() == 1 && Timing.timeFromMark(t) < 3000){
- sleep(10);
- }
- }
- }
- }
- } else if (Player.getPosition().getPlane() == 2){
- RSObject[] bankbooth = Objects.find(20, "Bank booth");
- if (bankbooth.length > 0){
- if(Player.getPosition().distanceTo(BANKTILE) > 2 && !Player.isMoving()){
- Walking.clickTileMM(randomTile(BANKTILE), 1);
- sleep(300);
- }
- }
- }
- }
- }
- private boolean openDoor(){
- RSObject[] door = Objects.getAt(DOORTILE);
- if(door.length > 0){
- return false;
- }
- return true;
- }
- private void oneToTen(){
- if(Player.getPosition().distanceTo(BANKTILE) <= 5 && Player.getPosition().getPlane() == 2){
- if(Inventory.find(NEEDLE).length == 0 || Inventory.find(THREAD).length == 0 || Inventory.find(LEATHER).length == 0){
- if(!Banking.isBankScreenOpen()){
- Banking.openBank();
- } else {
- Banking.depositAllExcept(NEEDLE, THREAD, LEATHER);
- if(Inventory.find(NEEDLE).length == 0){
- Banking.withdraw(1, NEEDLE);
- }
- if(Inventory.find(THREAD).length == 0){
- Banking.withdraw(0, THREAD);
- }
- if(Inventory.find(LEATHER).length == 0){
- Banking.withdraw(0, LEATHER);
- long t = System.currentTimeMillis();
- while(Inventory.find(LEATHER).length == 0 && Timing.timeFromMark(t) < 2000){
- sleep(10,40);
- }
- }
- }
- } else {
- if(Banking.isBankScreenOpen()){
- Banking.close();
- } else {
- if(Player.getAnimation() == 1249){
- animationtime = System.currentTimeMillis();
- }
- if(Interfaces.get(154, 108) == null && Timing.timeFromMark(animationtime) > 3000){
- RSItem[] needle = Inventory.find(NEEDLE);
- if(needle.length > 0){
- needle[0].click("Use Needle");
- RSItem[] leather = Inventory.find(LEATHER);
- if(leather.length > 0){
- leather[0].click("Use Needle");
- sleep(600,800);
- }
- }
- } else if(Interfaces.get(154, 108) != null) {
- Interfaces.get(154, 108).click("Make All");
- sleep(800, 1200);
- }
- }
- }
- }
- }
- private RSTile randomTile(RSTile torand){
- int x = torand.getX();
- int y = torand.getY();
- return new RSTile(x + General.random(-1, 1), y + General.random(-1, 1));
- }
- @Override
- public void onEnd() {
- double multiplier = getRunningTime() / 3600000D;
- int strHour = (int) (((Skills.getXP(SKILLS.CRAFTING) - startxp) / 15) / multiplier) ;
- println("Script ended. Runtime: " + Timing.msToString(getRunningTime()) + " Bowstrings made: " + ((Skills.getXP(SKILLS.CRAFTING) - startxp) / 15) + "(" + strHour + "/HR)");
- }
- @Override
- public void clanMessageReceived(String arg0, String arg1) {
- if(arg1.equals("Bs")){
- state = "Wait";
- if(Banking.isBankScreenOpen()){
- Banking.close();
- }
- mulename = getMuleName();
- muleworld = getMuleWorld();
- botworld = getWorld();
- state = "Trademule";
- }
- }
- @Override
- public void personalMessageReceived(String arg0, String arg1) {
- }
- @Override
- public void playerMessageReceived(String arg0, String arg1) {
- }
- @Override
- public void serverMessageReceived(String arg0) {
- if (arg0.contains("Accepted trade")){
- state = "Wait";
- setLoginBotState(false);
- if(getWorld() != botworld){
- Hopping.hop(botworld);
- }
- state = "Spin";
- setLoginBotState(true);
- }
- }
- @Override
- public void tradeRequestReceived(String arg0) {
- }
- @Override
- public void duelRequestReceived(String arg0, String arg1) {
- // TODO Auto-generated method stub
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement