Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

INodeRouteFinder caused memory leak:(

Featured Replies

import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.api.webwalk.INodeRouteFinder;
import org.osbot.rs07.event.WebWalkEvent;
import org.osbot.rs07.script.MethodProvider;
import org.osbot.rs07.utility.Condition;



public class Runtoblurite extends Task {
	public void WebWalkCustom(Position p){
		INodeRouteFinder nrf = INodeRouteFinder.createAdvanced();
		 WebWalkEvent e = new WebWalkEvent(nrf, p);
		 e.setBreakCondition(new Condition() {
		            @Override
		            public boolean evaluate() {
		            	boolean flag = false;
		            	if(api.getSkills().getDynamic(Skill.HITPOINTS) <= api.getSkills().getStatic(Skill.HITPOINTS)*.7&& !(api.myPlayer().getPosition() == new Position(3059,9565,0))){
		            		flag = true;
		            	}
		                return flag; //stops when true
		        }
		            });
		        api.execute(e);
		}
	public Runtoblurite(MethodProvider api) {
		super(api);
	}

	@Override
	public boolean canProcess() {
		boolean flag = false;
        if(api.settings.getConfigs().get(122) == 6 && this.api.getSkills().getDynamic(Skill.MINING)>= 10 && !api.inventory.contains("Portrait")&& !api.inventory.contains("Blurite ore")&&!api.inventory.contains("Blurite sword")){
        	flag = true;
        }
		return flag;
	}

	@Override
	public void process() {
		   api.log("Running to mine");
		   WebWalkCustom(new Position(3059,9565,0));
			   	
	}
}

Hey there INodeRouteFinder caused a memory leak for me and used up all my heap space

This

INodeRouteFinder.createAdvanced();

only ever do it once in a script. Like in your onStart

Edited by Isolate

The issue is that you are creating the inoderoutefinder every time you walk.

 

You need to make one only onStart() once. Then maybe add it to your class that contains your variables

public class test extends Script{
    INodeRouteFinder nrf;
    
    public void onStart(){
        nrf = INodeRouteFinder.createAdvanced();
    }
} 
  • Author

This

INodeRouteFinder.createAdvanced();

only ever do it once in a script. Like in your onStart

thanks mate

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.