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
  • World hopping issue


    ump
     Share

    Recommended Posts

    Hey guys just switcher over to dreambot and learning the api, just wondering how can i check for total level worlds before world hopping? as in not hop to any world that requires a total level? 

     

    World f2pHop = getWorlds().getRandomWorld(w -> w != null && w.isF2P() && !w.isHighRisk());
    currently im just checking for it to be f2p and not high risk. but i dont see anything to check for it not being a total level required world.

    Link to comment
    Share on other sites

    
        public static boolean hopToRandomF2pWorld(AbstractScript ctx) {
            return ctx.getWorldHopper().hopWorld(ctx.getWorlds().getRandomWorld((w) -> w.isF2P() && w.isNormal() && ctx.getSkills().getTotalLevel() >= w.getMinimumLevel()));
        }
    
        public static boolean hopToRandomMembersWorld(AbstractScript ctx) {
            return ctx.getWorldHopper().hopWorld(ctx.getWorlds().getRandomWorld((w) -> !w.isF2P() && w.isNormal() && ctx.getSkills().getTotalLevel() >= w.getMinimumLevel()));
        }

     

    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.