ump 1 Share Posted August 3, 2020 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 More sharing options...
holic 231 Share Posted August 3, 2020 I do believe world.getMinimumLevel() is what you're looking for, returns 0 if there isn't a required level. Link to comment Share on other sites More sharing options...
TheCloakdOne 389 Share Posted August 3, 2020 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.