Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • OpensOurceFisher barb fisher.


    ikiddoi
     Share

    Recommended Posts

    This script gets you banned in less than 10minutes.

    Almost got banned because of this script :mellow: but yeah enjoy.

    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.methods.container.impl.Inventory;
    import org.dreambot.api.methods.container.impl.bank.Bank;
    import org.dreambot.api.methods.container.impl.bank.BankLocation;
    import org.dreambot.api.methods.interactive.NPCs;
    import org.dreambot.api.methods.map.Area;
    import org.dreambot.api.methods.map.Tile;
    import org.dreambot.api.methods.skills.Skill;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.Category;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.utilities.Timer;
    import org.dreambot.api.utilities.impl.Condition;
    import org.dreambot.api.wrappers.interactive.NPC;
    
    
    import java.awt.*;
    import java.util.Random;
    
    import static org.dreambot.api.methods.skills.Skill.values;
    
    @ScriptManifest(category = Category.FISHING, name = "IFishKiddoI", author = "IkiddoI", version = 1.7, description = "fishes fish at barb village gets you ez 99 fishing")
    public class Main extends AbstractScript{
    
        Timer t = new Timer();
        private State state;
        Area BANK_AREA = new Area(3090, 3499, 3099, 3488);
        private final Area LOOT_AREA = new Area(3100, 3422, 3109, 3434, 0);
        private final Tile lootTile = new Tile(3109,3432,0);
        Random rand = new Random();
        int  n = rand.nextInt(Integer.MAX_VALUE / 20)/5 + 50;
    
    
    
        private enum State {
            BANK, WALK_TO_BANK, WALK_TO_FISH, FISH
        }
    
        @Override
        public void onStart() {
                log("Welcome to your simple fisher by IkiddoI");
                log("if you experience any issues while running this script please report them to me on the forums, im gonna fix them");
                log("Enjoy the script, IFishKiddoI");
                log("cogito ergo sum!");
            }
    
        private State getState() {
            if (getInventory().isFull()) {
                if (BANK_AREA.contains(getLocalPlayer())) {
                    return State.BANK;
                } else {
                    return State.WALK_TO_BANK;
                }
            } else {
                if (LOOT_AREA.contains(getLocalPlayer())) {
                    return State.FISH;
                } else {
                    return State.WALK_TO_FISH;
                }
            }
        }
    
        @Override
        public int onLoop() {
            if (getLocalPlayer().isMoving()) {
                Tile dest = getClient().getDestination();
                if (dest != null && getLocalPlayer().getTile().distance(dest) > 5) {
                    return Calculations.random(100, 250);
                }
            }
            if (!getWalking().isRunEnabled() && getWalking().getRunEnergy() >= Calculations.random(50, 100)) {
                getWalking().toggleRun();
            }
    
            state = getState();
            switch (state) {
                case BANK: {
                    if (getBank().isOpen()) {
                        getBank().depositAllItems();
                        if(!getInventory().contains("Feather", "Fly fishing rod"));
                        getBank().withdraw("Fly fishing rod", 1);
                        sleep(800);
                        getBank().withdrawAll("Feather");
                        sleep(800);
                        sleepUntil(new Condition() {
                            public boolean verify() {
                             return getInventory().contains("Feather", "Fly fishing rod");
                            }
                        }, Calculations.random(900, 1200));
                    } else {
                        getBank().open();
                        sleepUntil(new Condition() {
                            public boolean verify() {
                                return getBank().isOpen();
                            }
                        }, Calculations.random(900, 1200));
                    }
                }
                break;
    
                case FISH: {//nog fixen
                    NPC fishingSpot = getNpcs().closest("Fishing spot");
                    if (fishingSpot != null && fishingSpot.isOnScreen())
                        fishingSpot.interact("Lure");
                    sleep(16000, 25000);
                    if (!getLocalPlayer().isInteracting(fishingSpot)) {
                        fishingSpot.interact("Lure");
                        if (getLocalPlayer().distance(fishingSpot) > 3) {
                            getWalking().walk(fishingSpot);
                        } else getCamera().rotateToEntity(getGameObjects().closest("spot"));
    
                    }
                }
                break;
    
                case WALK_TO_BANK:
                {
                    getWalking().walk(BankLocation.EDGEVILLE.getCenter());
                    Calculations.random(2400, 2800);
                    getBank().openClosest();
                    break;
                }
    
                case WALK_TO_FISH:
                    if (!LOOT_AREA.contains((getLocalPlayer()))){
                        getWalking().walk(lootTile);
                        Calculations.random(200, 400);
                    }
                    break;
            }
            return Calculations.random(200, 400);
    
        }
    
    
        @Override
        public void onExit() {
            log("Thanks for using my IBarbkiddofisherI feel free to use it again!") ;
        }
    
        public void onPaint(Graphics g) {
            g.drawString("Time ran: " + t.formatTime(), 8, 335);
        }
    
    
    }
    
    

    good luck  ;)  don't leech but learn from it. 

    Footage: 

    Edited by ikiddoi
    Link to comment
    Share on other sites

    If you aren't looking for feedback, ignore this comment. I didn't look over your code super closely, so this is definitely not an exhaustive list of everything that could be improved. If you want more feedback just let me know and I'll come back to take a closer look when I have a bit more time.

     

    One thing you could do to help with the ban rate is use conditional sleeps instead of arbitrary sleeps If you don't use conditional sleeps, at least use calculations.random instead of sleeping for the same exact amount of time between actions (like on lines 84 & 86).

     

    One other small thing that I noticed is where you're toggling run manually (line 74). You don't need to do this. The API will automatically toggle the run on.

     

    Nice job getting another script working! If you are enjoying writing scripts, then do not give up! Just keep writing scripts and asking for feedback and before too long you will have everything down and be writing awesome scripts. The best advice I could give you at this point is to keep posting the source to your scripts and ask the community for feedback on how you could improve. Getting insight/feedback from other programmers is definitely one of the best ways to grow. Best of luck with your scripts in the future!

    Edited by distraction
    Link to comment
    Share on other sites

    holy fuk line 107 kill me

    should have put some sleepuntils, i wanted to do something like if(player isnt animating fish animation re-click spot but yeah couldnt figure it out and this would look like less boty how would you have done it? maybe change that line of code so i can learn something from it

    If you aren't looking for feedback, ignore this comment. I didn't look over your code super closely, so this is definitely not an exhaustive list of everything that could be improved. If you want more feedback just let me know and I'll come back to take a closer look when I have a bit more time.

     

    One thing you could do to help with the ban rate is use conditional sleeps instead of arbitrary sleeps If you don't use conditional sleeps, at least use calculations.random instead of sleeping for the same exact amount of time between actions (like on lines 84 & 86).

     

    One other small thing that I noticed is where you're toggling run manually (line 74). You don't need to do this. The API will automatically toggle the run on.

     

    Nice job getting another script working! If you are enjoying writing scripts, then do not give up! Just keep writing scripts and asking for feedback and before too long you will have everything down and be writing awesome scripts. The best advice I could give you at this point is to keep posting the source to your scripts and ask the community for feedback on how you could improve. Getting insight/feedback from other programmers is definitely one of the best ways to grow. Best of luck with your scripts in the future!

    yeah im looking for feedback to, i made this script like 100% legit i only re-used code from my fishlooter which was from  nezz, and i asked nezz for help. I understand what a sleepuntil does but i dont realy understand where to use it. Some people told me that it checks the condition every 30ms but yeah feedback always good

    Edited by ikiddoi
    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.