Parameter Posted January 12, 2014 Share Posted January 12, 2014 (edited) public static String getSelectedItem(final ClassLoader loader) throws Exception { final Field field = loader.loadClass("client").getDeclaredField("ia"); field.setAccessible(true); return (String) field.get(null); } public static int getSelectionState(final ClassLoader loader) throws Exception { final Field field = loader.loadClass("client").getDeclaredField("ib"); field.setAccessible(true); return field.getInt(null) * 1348970433; } public static boolean isSelected(final ClassLoader loader) throws Exception { return getSelectionState(loader) != 0; } How to use these? Let's say we want to do this in the onLoop method: public int onLoop() throws InterruptedException { final ClassLoader loader = bot.I() //Change bot.I() to whatever method returns a classloader at the moment if(isSelected(loader)) { final String selected = getSelectedItem(loader); } return 50; } Edited January 13, 2014 by Parameter 1 Link to comment Share on other sites More sharing options...
Soldtodie Posted January 12, 2014 Share Posted January 12, 2014 Nice! How you get the declared fields? Link to comment Share on other sites More sharing options...
Parameter Posted January 12, 2014 Author Share Posted January 12, 2014 Nice! How you get the declared fields? Searching through the client Link to comment Share on other sites More sharing options...
Pandemic Posted January 12, 2014 Share Posted January 12, 2014 Thanks Parameter looks great ;) Link to comment Share on other sites More sharing options...
Omoshu Posted January 12, 2014 Share Posted January 12, 2014 Why aren't these methods accessible through the standard API? Link to comment Share on other sites More sharing options...
While Posted January 13, 2014 Share Posted January 13, 2014 Why aren't these methods accessible through the standard API? The developers haven't hooked them. Link to comment Share on other sites More sharing options...