Famous Scripts
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Scripts for RSBot made by Famous
 
HomePortalLatest imagesRegisterLog in
New scripts being created everyday! Go to GameKiller.net!

 

 Unicow Killer Need Help Fixing. Great Money.

Go down 
AuthorMessage
R3AP3R117




Posts : 1
Join date : 2011-02-08

Unicow Killer Need Help Fixing. Great Money. Empty
PostSubject: Unicow Killer Need Help Fixing. Great Money.   Unicow Killer Need Help Fixing. Great Money. EmptyTue Feb 08, 2011 6:37 pm

I found this old script and i am new to scripting so i cant fix the script so here it is please repost the script if you fix it.

Save as: SimpleGoldFarming.java

Code:
import org.rsbot.script.methods.Skills;
import org.rsbot.script.wrappers.RSGroundItem;
import org.rsbot.script.wrappers.RSNPC;
import org.rsbot.script.Script;
import org.rsbot.script.ScriptManifest;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSTile;
 
import java.awt.event.KeyEvent;
import java.util.Map;
 
@ScriptManifest(authors = { "Trinity466" }, category = "Other", name = "SimpleGoldFarming", version = 1.4, description = "<html><head>"
        + "</head><body>"
                + "<center>"
                + "<b><font size=\"6\" color=\"Green\">"
                + "Trinity's"
                + "<br></br>"
                + "Unicow Killer"
                + "</font></b>"
                + "<font size=\"5\">"
                + "<br></br>"
                + "<br></br>"
                + "V1.0"
                + "<br></br>"
                + "<br></br>"
                + "<i><font size=\"4\" color=\"black\">Gets limitless unicorn horns for you.</font></i>"
                + "<br></br>"
                + "<br></br>"
                + "<br></br>"
                + "Start in East Ardougne bank with equipment you will be using and cowhides, monkfish, and at least ONE unicorn horn visible in bank."
                + "<br></br>" + "</body></html>"
        )
 
public class SimpleGoldFarming extends Script {
 
        SimpleGoldFarmingAntiBan antiban;
        Thread t;
        RSObject door; //21814
        RSObject trapdoor; //21944
        RSObject ladder; //17974
        RSObject spiritFountain; //21893
        RSNPC unicow;
        RSNPC banker; //494, 495
        RSTile [] bankToDoor = {new RSTile(2655, 3283),
                        new RSTile(2652, 3283), new RSTile(2648, 3283),
                        new RSTile(2644, 3283), new RSTile(2642, 3280),
                        new RSTile(2640, 3276), new RSTile(2640, 3272),
                        new RSTile(2640, 3269), new RSTile(2640, 3265),
                        new RSTile(2639, 3261), new RSTile(2637, 3257),
                        new RSTile(2637, 3253), new RSTile(2637, 3249),
                        new RSTile(2638, 3246), new RSTile(2640, 3241),
                        new RSTile(2641, 3238), new RSTile(2642, 3234),
                        new RSTile(2643, 3231), new RSTile(2647, 3227),
                        new RSTile(2649, 3225)};
        RSTile [] doorToTrapdoor = {new RSTile(2649, 3224),
                        new RSTile(2650, 3221), new RSTile(2651, 3218),
                        new RSTile(2650, 3215), new RSTile(2647, 3214)};
        RSTile[] ladderToSpiritFountain = {new RSTile(3038, 4376),
                        new RSTile(3038, 4378), new RSTile(3037, 4382),
                        new RSTile(3035, 4385), new RSTile(3035, 4389),
                        new RSTile(3033, 4392), new RSTile(3031, 4394),
                        new RSTile(3031, 4397), new RSTile(3029, 4400),
                        new RSTile(3026, 4403), new RSTile(3023, 4406),
                        new RSTile(3019, 4409)};
        RSTile [] spiritFountainToLadder = walking.reversePath(ladderToSpiritFountain);
        RSTile [] trapdoorToDoor = walking.reversePath(doorToTrapdoor);
        RSTile [] doorToBank = walking.reversePath(bankToDoor);
        RSTile enteringDoorTile = new RSTile(2649, 3225);
        RSTile trapdoorTile = new RSTile(2647, 3214);
        RSTile spiritFountainTile = new RSTile(3019, 4409);
        RSTile ladderTile = new RSTile(3038, 4376);
        RSTile exitingDoorTile = new RSTile(2649, 3224);
        RSTile bankTile = new RSTile(2655,3283);
        int monkfish = 7946;
        int unicornHorn = 237;
        int cowhide = 1739;
        int hpToEat = random(40,50);
        final int health = skills.getCurrentLevel(Skills.CONSTITUTION);
 
        public boolean onStart(final Map<String, String> args){
                antiban = new SimpleGoldFarmingAntiBan();
                t = new Thread(antiban);
                return true;
        }
 
        public void onFinish(){
                antiban.stopThread = true;
                return;
        }
 
 
        public boolean waitUntilIdle(){
                sleep(random(500,1000));
                if(getMyPlayer().isMoving()){
                        sleep(random(50,200));
                }
                return getMyPlayer().isIdle();
        }
 
        public boolean walkToDoor(){
                door = objects.getNearest(21814);
                waitUntilIdle();
                if (calc.distanceTo(enteringDoorTile) > 8) {
                        if (calc.distanceTo(walking.getDestination()) < random(5, 12)
                        || calc.distanceTo(walking.getDestination()) > 40) {
                if (!walking.walkPathMM(bankToDoor)) {
                        walking.walkTileMM(walking.nextTile(bankToDoor));
                }
                        }
        }waitUntilIdle();
        door.doAction("Open");
                return true;
        }
 
        public boolean walkToTrapdoor(){
                trapdoor = objects.getNearest(21944);
                waitUntilIdle();
                if (calc.distanceTo(trapdoorTile) > 8) {
                        if (calc.distanceTo(walking.getDestination()) < random(5, 12)
                        || calc.distanceTo(walking.getDestination()) > 40) {
                if (!walking.walkPathMM(doorToTrapdoor)) {
                        walking.walkTileMM(walking.nextTile(doorToTrapdoor));
                }
                        }
        }waitUntilIdle();
        trapdoor.doAction("Climb-down");
                return true;
        }
 
        public boolean walkToSpiritFountain(){
                waitUntilIdle();
                if (calc.distanceTo(spiritFountainTile) > 8) {
                        if (calc.distanceTo(walking.getDestination()) < random(5, 12)
                            || calc.distanceTo(walking.getDestination()) > 40) {
                    if (!walking.walkPathMM(ladderToSpiritFountain)) {
                            walking.walkTileMM(walking.nextTile(ladderToSpiritFountain));
                    }
                        }
                }
                return true;
        }
 
        public void useItemsOnSpiritFountain(){
                waitUntilIdle();
                spiritFountain = objects.getNearest(21893);
                inventory.getItem(cowhide).doAction("Use");
                spiritFountain.doAction("Use");
                inventory.getItem(unicornHorn).doAction("Use");
                spiritFountain.doAction("Use");
                spiritFountain.doAction("Activate");
                sleep(random(500,1000));
                interfaces.clickContinue();
                return;
        }
 
        public void fightUnicow(){
                final RSGroundItem unicornHorn = groundItems.getNearest(237);
                waitUntilIdle();
                if (unicornHorn != null) {
                        camera.turnToTile(unicornHorn.getLocation());
                        unicornHorn.doAction("Take");
                }
                unicow = npcs.getNearest("Unicow");
                unicow.doAction("Attack");
                if(getMyPlayer().isInCombat()){
                        sleep(random(1000,1500));
                }
                return;
        }
 
        public boolean walkToLadder(){
                ladder = objects.getNearest(17974);
                waitUntilIdle();
                if (calc.distanceTo(ladderTile) > 8) {
                        if (calc.distanceTo(walking.getDestination()) < random(5, 12)
                            || calc.distanceTo(walking.getDestination()) > 40) {
                    if (!walking.walkPathMM(spiritFountainToLadder)) {
                            walking.walkTileMM(walking.nextTile(spiritFountainToLadder));
                    }
                        }
                }waitUntilIdle();
                ladder.doAction("Climb-up");
                return true;
        }
 
        public boolean walkToDoor2(){
                door = objects.getNearest(21814);
                waitUntilIdle();
                if (calc.distanceTo(exitingDoorTile) > 8) {
                        if (calc.distanceTo(walking.getDestination()) < random(5, 12)
                            || calc.distanceTo(walking.getDestination()) > 40) {
                    if (!walking.walkPathMM(trapdoorToDoor)) {
                            walking.walkTileMM(walking.nextTile((trapdoorToDoor)));
                    }
                        }
                }waitUntilIdle();
                door.doAction("Open");
                return true;
        }
 
        public boolean walkToBank(){
                waitUntilIdle();
                if (calc.distanceTo(bankTile) > 8) {
                        if (calc.distanceTo(walking.getDestination()) < random(5, 12)
                                        || calc.distanceTo(walking.getDestination()) > 40) {
                                if (!walking.walkPathMM(doorToBank)) {
                                        walking.walkTileMM(walking.nextTile(doorToBank));
                    }
                        }
                }
                return true;
        }
 
        public boolean depositAndWithdraw(){
                waitUntilIdle();
                if(!bank.open()){
                        bank.open();
                }
                if(bank.isOpen()){
                        sleep(random(300,1000));
                bank.depositAll();
                bank.withdraw(monkfish, 5);
                bank.withdraw(cowhide, 13);
                bank.withdraw(unicornHorn, 1);
                bank.close();
                }
                return true;
        }
 
        @Override
        public int loop() {
                if (!t.isAlive()) {
                t.start();
                log("AntiBan initialized!");
        }
                if(game.getEnergy() > 50){
                        walking.setRun(true);
                }if(health < hpToEat){
                        if(inventory.containsOneOf(monkfish)){
                                inventory.getItem(monkfish).doAction("Eat");
                        }else if(!inventory.containsOneOf(monkfish) && health < 30
                                        && getMyPlayer().isInCombat()){
                                walkToLadder();
                                sleep(200000);
                                walkToDoor2();
                                sleep(200000);
                                walkToBank();
                                sleep(200000);
                                stopScript();
                        }
                }depositAndWithdraw();
                if(!inventory.isFull()){
                        walkToDoor();
                        sleep(200000);
                        walkToTrapdoor();
                        sleep(200000);
                        walkToSpiritFountain();
                        sleep(200000);
                        for(int i=0; i<13; i++){
                                useItemsOnSpiritFountain();
                                fightUnicow();
                        }
                }if(inventory.isFull()){
                        walkToLadder();
                        sleep(200000);
                        walkToDoor2();
                        sleep(200000);
                        walkToBank();
                        sleep(200000);
                        depositAndWithdraw();
                }
                return random(100,300);
        }
 
        private class SimpleGoldFarmingAntiBan implements Runnable {
        public boolean stopThread;
 
        public void run() {
                while (!stopThread) {
                        try {
                                if (random(0, 15) == 0) {
                                        final char[] LR = new char[] { KeyEvent.VK_LEFT,
                                                        KeyEvent.VK_RIGHT };
                                        final char[] UD = new char[] { KeyEvent.VK_DOWN,
                                                        KeyEvent.VK_UP };
                                        final char[] LRUD = new char[] { KeyEvent.VK_LEFT,
                                                        KeyEvent.VK_RIGHT, KeyEvent.VK_UP,
                                                        KeyEvent.VK_UP };
                                        final int random2 = random(0, 2);
                                        final int random1 = random(0, 2);
                                        final int random4 = random(0, 4);
 
                                        if (random(0, 3) == 0) {
                                                keyboard.pressKey(LR[random1]);
                                                Thread.sleep(random(100, 400));
                                                keyboard.pressKey(UD[random2]);
                                                Thread.sleep(random(300, 600));
                                                keyboard.releaseKey(UD[random2]);
                                                Thread.sleep(random(100, 400));
                                                keyboard.releaseKey(LR[random1]);
                                        } else {
                                                keyboard.pressKey(LRUD[random4]);
                                                if (random4 > 1) {
                                                        Thread.sleep(random(300, 600));
                                                } else {
                                                        Thread.sleep(random(500, 900));
                                                }
                                                keyboard.releaseKey(LRUD[random4]);
                                        }
                                } else {
                                        Thread.sleep(random(200, 2000));
                                }
                        } catch (final Exception e) {
                                e.printStackTrace();
                        }
                }
        }
}
 
}
Back to top Go down
 
Unicow Killer Need Help Fixing. Great Money.
Back to top 
Page 1 of 1
 Similar topics
-
» Fixing JDK Not found error.
» Goat Killer
» Varrock Guard Killer

Permissions in this forum:You cannot reply to topics in this forum
Famous Scripts :: Requests :: Requests-
Jump to: