Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Skill tracker issues


    Dockid
     Share

    Recommended Posts

    g.drawString("Experience:" + + getSkillTracker().getGainedExperience(Skill.FISHING)+getSkillTracker().getGainedExperiencePerHour(Skill.FISHING) ,9, 430);

     

    Skill tracker gained xp and gained xp per hour is just showing 0? anyone know how to fix this because skilltracker is working as the line of code below is working correctly

    g.drawString("Fishing level: " + getSkillTracker().getStartLevel(Skill.FISHING), 9, 400);
    Link to comment
    Share on other sites

    2 hours ago, Dockid said:

    + +

    You have two plus signs in the line with nothing between them. This will cause an error, but I'm surprised you never saw this. What IDE are you using?

    Link to comment
    Share on other sites

    Yeah I spotted that straight after posting, that wasnt the issue though. Using IntelliJ. X/P hour basically shows for a split second everytime I fish then resets to 0 quite confusing.

    Link to comment
    Share on other sites

    1 hour ago, Dockid said:

    Yeah I spotted that straight after posting, that wasnt the issue though. Using IntelliJ. X/P hour basically shows for a split second everytime I fish then resets to 0 quite confusing.

    Add this to your onStart:

    getSkillTracker().start(Skill.FISHING);

    Then proceed to add this to your paint with the correct coordinates:

    g.drawString("XP Gained(P/H): " + getSkillTracker().getGainedExperience(Skill.FISHING) + "(" + getSkillTracker().getGainedExperiencePerHour(Skill.FISHING) + ")", 0, 0);
    Edited by AsBakedAsCake
    Link to comment
    Share on other sites

    2 hours ago, AsBakedAsCake said:

    Add this to your onStart:

    getSkillTracker().start(Skill.FISHING);

    Then proceed to add this to your paint with the correct coordinates:

    g.drawString("XP Gained(P/H): " + getSkillTracker().getGainedExperience(Skill.FISHING) + "(" + getSkillTracker().getGainedExperiencePerHour(Skill.FISHING) + ")", 0, 0);

    Yeah when I tried that line of code, i would catch a lobster and for a brief second xp gained would show as 90 and xp/hr quickly shows before both instantly reset to zero

    Link to comment
    Share on other sites

    44 minutes ago, Dockid said:

    Yeah when I tried that line of code, i would catch a lobster and for a brief second xp gained would show as 90 and xp/hr quickly shows before both instantly reset to zero

    It's a problem with something else in your script then because it works perfect in mine. 🤷‍♂️

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.