Reid Posted March 2, 2014 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
Reid Posted March 2, 2014 Author Posted March 2, 2014 dont forget world 86 thx didn't know it was 86 too :p
Swizzbeat Posted March 2, 2014 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?
Reid Posted March 2, 2014 Author 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
Dog_ Posted March 2, 2014 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.
Reid Posted March 2, 2014 Author 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
fish1328 Posted March 2, 2014 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
Dog_ Posted March 2, 2014 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
Dog_ Posted March 3, 2014 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