Resource [RS3] Getting the current world

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

  1. 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. We now have a method for this in the Worlds class
     
    Hazard likes this.

Share This Page

Loading...