Reid Posted March 2, 2014 Share Posted March 2, 2014 public static final int getCurrentWorld(final ClassLoader loader) throws Exception { final Field field = loader.loadClass("client").getDeclaredField("z"); if (!field.isAccessible()) field.setAccessible(true); return field.getInt(null) * -2588411; } Usage: getCurrentWorld(bot.D()); currently using this to check if im in world 85 then i hop if i am Link to comment Share on other sites More sharing options...
Undecided Posted March 2, 2014 Share Posted March 2, 2014 dont forget world 86 :p Link to comment Share on other sites More sharing options...
Reid Posted March 2, 2014 Author Share Posted March 2, 2014 dont forget world 86 thx didn't know it was 86 too :p Link to comment Share on other sites More sharing options...
Swizzbeat Posted March 2, 2014 Share Posted March 2, 2014 It could just be that I'm stupid, but due to OSBot's obfuscation wouldn't you have to edit this every client update? Link to comment Share on other sites More sharing options...
Reid Posted March 2, 2014 Author Share Posted March 2, 2014 It could just be that I'm stupid, but due to OSBot's obfuscation wouldn't you have to edit this every client update? ye Link to comment Share on other sites More sharing options...
Bhombdabs Posted March 2, 2014 Share Posted March 2, 2014 ye sounds fun Link to comment Share on other sites More sharing options...
Dog_ Posted March 2, 2014 Share Posted March 2, 2014 It could just be that I'm stupid, but due to OSBot's obfuscation wouldn't you have to edit this every client update?I wrote this for OP, and yes you're correct. It would also need to be updated everytime there's a RuneScape client update, but I'm fine with fixing it. Link to comment Share on other sites More sharing options...
Reid Posted March 2, 2014 Author Share Posted March 2, 2014 I wrote this for OP, and yes you're correct. It would also need to be updated everytime there's a RuneScape client update, but I'm fine with fixing it. wat no dog_ wrote it Link to comment Share on other sites More sharing options...
fish1328 Posted March 2, 2014 Share Posted March 2, 2014 You could just make your own small updater and implement it into your script. Grabbing them fields is pretty easy as the class "client" has a fixed name and doesn't change throughout revisions; you'd just have to hunt a pattern down with either ASM or regex =) I've done it before so it can't be that hard haha Link to comment Share on other sites More sharing options...
Dog_ Posted March 2, 2014 Share Posted March 2, 2014 wat no dog_ wrote itthat's meYou could just make your own small updater and implement it into your script. Grabbing them fields is pretty easy as the class "client" has a fixed name and doesn't change throughout revisions; you'd just have to hunt a pattern down with either ASM or regex =) I've done it before so it can't be that hard hahaI have my own updater but it's really a waste of time implementing it into a script lol Link to comment Share on other sites More sharing options...
Dog_ Posted March 3, 2014 Share Posted March 3, 2014 (edited) Aaaaand I wasted my time. I just noticed that current world is already there I don't even api Edited March 4, 2014 by Ryuzaki 1 Link to comment Share on other sites More sharing options...
Ande Posted March 4, 2014 Share Posted March 4, 2014 client.getCurrentWorld() works too. Link to comment Share on other sites More sharing options...