- Joined
- Aug 23, 2015
- Messages
- 1,970
- Thread Author
- #1
Gamemode: OSRS
Repeatability: 100%
Responsible code:
In main class:
In class to walk:
I haven't tested from wilderness -> not wildy. Also, adding a delay between steps just makes the bot wait before hopping back and forth over ditch, it's not a spam click issue.
Repeatability: 100%
Responsible code:
In main class:
Code:
private WebPath savedPath;
public void setPath(WebPath p) {
savedPath = p;
}
public WebPath getPath(){
return savedPath;
}
In class to walk:
Code:
if (bot.getPath() == null) {
System.out.println("Building a new path");
buildWebPath(COORD IN WILDERNESS);
} else {
System.out.println("Traversing the path ");
bot.getPath().step();
}
public WebPath buildWebPath(Coordinate dest){
WebPath newPath = Traversal.getDefaultWeb().getPathBuilder().buildTo(dest);
if(newPath != null){
bot.setPath(newPath);
return newPath;
} else {
System.out.println("Web Path generated to destination" +dest+ "was null. Returning null in buildWebPath method of ClassName");
return null;
}
}
I haven't tested from wilderness -> not wildy. Also, adding a delay between steps just makes the bot wait before hopping back and forth over ditch, it's not a spam click issue.