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
  • get exp from combat


    PrimoFernando

    Recommended Posts

    Hello,

     

    I would like to know how can i retrive the exp of a skill that is being trained without specifying it in the code, for example getSkillTracker().getGainedExperience(Skill.STRENGTH) take out the Skill.STRENGTH and put a method to detect which skill is being trained?

     

    thanks

    Link to comment
    Share on other sites

    Every loop of your code, determine which skill is being trained by difference of current xp and saved xp.

     

    Every time the xp increases, save it.

     

    Save the skill that increases so when no xp is gained, the script still knows which skill was previously increased.

    Link to comment
    Share on other sites

    Every loop of your code, determine which skill is being trained by difference of current xp and saved xp.

     

    Every time the xp increases, save it.

     

    Save the skill that increases so when no xp is gained, the script still knows which skill was previously increased.

     

    thanks, can you give an example for combat skills, please?

    Link to comment
    Share on other sites

    I'm not on my development computer, sorry :(

     

    If you're only doing combat, store HP, Attack, Strength and Defense in a structure. Each loop, retrieve the xp from the structure and check it against each skill. Whichever ones increased, those are the skills you're training.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.