YinZ Posted June 8, 2014 Share 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? Link to comment Share on other sites More sharing options...
Swizzbeat Posted June 8, 2014 Share 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 Link to comment Share on other sites More sharing options...
YinZ Posted June 8, 2014 Author Share 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! Link to comment Share on other sites More sharing options...