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
  • getLoginUtility().changeWorld() issue


    ryan75195

    Recommended Posts

    do {
        int i = Integer.parseInt(String.valueOf(getWorlds().getRandomWorld(x -> x != null && !x.isF2P() && !x.isDeadmanMode() && x.isHighRisk() && !x.isLastManStanding() && x.isMembers() && !x.isTournamentWorld())).substring(1));
        log("World: " + i);
        getLoginUtility().changeWorld(i);
        sleep(500);
    }
    while (getLoginUtility().isWorldScreenOpen() && Stopped == false);

    I have this snippet of code here that is supposed to change the world at login screen to the value x defined in int i. the log displays the correct value of i, however getLoginUtility().changeWorld(i); does not seem to be working for some reason. would appreciate any help, thanks.

     

     

    Link to comment
    Share on other sites

    1. ah i didn’t see world.getID ill use that instead.

    2. the getLoginUtility().changeWorld(i) method will not select world i. the log will display a valid world, however the cursor will hover over a completely different world then just remain there. also getRandomWorld() will always chose world 365.

    Link to comment
    Share on other sites

    when an integer is manually entered the cursor will hover above the specified world and again will not select it and will just remain there until script is stopped.in this picture the specified world was 313.

    Screenshot from 2018-04-25 19-59-28.png

    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.