Jump to content

YinZ

Trade With Caution
  • Posts

    841
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by YinZ

  1. 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!

×
×
  • Create New...