By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!Nah, this is expensive:On RS3 it'll return -1 if the skill object isn't loaded, ie logged out. On OSRS they just use int[]'s so I can't do the same style of check because they're always populated. Adding an isLoggedIn check to ever call in that is too expensive imo.
public class RMSkills implements Skills.Tracker.Provider {
@Override
public int getCurrentLevel(com.skelware.bot.data.Skill skill) {
if (!RuneScape.isLoggedIn()) {
return -1;
}
return convert(skill).getCurrentLevel();
}
@Override
public int getCurrentExperience(com.skelware.bot.data.Skill skill) {
if (!RuneScape.isLoggedIn()) {
return -1;
}
return convert(skill).getExperience();
}
private Skill convert(com.skelware.bot.data.Skill skill) {
return Skill.values()[skill.getGameIndex()];
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.