YinZ Posted June 8, 2014 Posted June 8, 2014 whenever i log out to use my custom world hopper, the script pauses, therefore wont hop. Is there a way to over ride this?
Swizzbeat Posted June 8, 2014 Posted June 8, 2014 import org.osbot.rs07.api.WorldHopper; import org.osbot.rs07.script.MethodProvider; import org.osbot.rs07.script.Script; import java.lang.reflect.Field; /** * Created with IntelliJ IDEA * User: Anthony * Date: 6/8/2014 */ public class ModifiedWorldHopper extends WorldHopper { private Script sI; public ModifiedWorldHopper(Script sI) { this.sI = sI; } public void setModifiedWorldHopper() throws IllegalAccessException { for (Field f : MethodProvider.class.getDeclaredFields()) { if (f.getType() == WorldHopper.class) { f.setAccessible(true); f.set(instance of method provider, this); } } } @Override public void hop(int world) { //your world hopping code } } Not sure how to get an instance of the MethodProvider class, but if you are able to this should work with setting your own instance. 1
YinZ Posted June 8, 2014 Author Posted June 8, 2014 import org.osbot.rs07.api.WorldHopper; import org.osbot.rs07.script.MethodProvider; import org.osbot.rs07.script.Script; import java.lang.reflect.Field; /** * Created with IntelliJ IDEA * User: Anthony * Date: 6/8/2014 */ public class ModifiedWorldHopper extends WorldHopper { private Script sI; public ModifiedWorldHopper(Script sI) { this.sI = sI; } public void setModifiedWorldHopper() throws IllegalAccessException { for (Field f : MethodProvider.class.getDeclaredFields()) { if (f.getType() == WorldHopper.class) { f.setAccessible(true); f.set(instance of method provider, this); } } } @Override public void hop(int world) { //your world hopping code } } Not sure how to get an instance of the MethodProvider class, but if you are able to this should work with setting your own instance. Thanks, Ill see what i can come up with!