Resource [RS3] Getting the current world

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

  1. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    394
    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

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

Share This Page

Loading...