1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resource [RS3] Getting the current world

Discussion in 'Tutorials & Resources' started by Hazard, May 23, 2015.

  1. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    408
    Likes Received:
    84
    Not tested that much so if you find any exceptions let me know.

    This basically gets the current world from the Friends list.

    Code (Javascript):
    1.  
    2. public int getCurrentWorld() {
    3.         String world = Interfaces.getAt(550, 53).getText();
    4.         if(world != null) {
    5.             return Integer.parseInt(world.replaceAll("[\\D]", ""));
    6.         }
    7.         return 0;
    8.     }
     
  2. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    We now have a method for this in the Worlds class
     
    Hazard likes this.

Share This Page

Loading...