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


    ump

    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

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.