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
  • API needs some fixes.


    ArmyofDragons

    Recommended Posts

    EDIT: Accidentally posted this thread TOO early. Please give me time to write it before replying.

     

    I decided to make this thread to address some issues that I seem worthy to have attention in the API -- I will constantly update it as I am working on my AIO scripts.

     

    Here are my suggestions:

     

    • Allow the option to log into F2P worlds only -- there is only options for random worlds and choosing from a long list of Worlds in the "Manage Settings" tab. This reduces the hassle of manually going on bots and changing their world to join, and makes everyone happy. This would benefit people who want to bot starter accounts on F2P immediately for combat stats, etc.
    • When using the Walking.walk(Tile tile) method, it sometimes only moves forward towards the wanted tile on the minimap, and then stops. It is not a big deal, as you can just repeat the #walk method call. This happens sometimes.
    • Deprecate/replace the "getHealthPercent() method" for player to get the player's percentage of health at ALL times. Why? Because it only returns the Player's health percentage when the Player is in combat. This can cause a lot of issues with people's scripts if they do not know what the method does. And besides, why is it even a thing? What I use right now it / what I suggest changing it to (or to a more primitive calculation (calculated in decimal and rounded to an Integer) -- as long as it is not only updating when the player is in combat): Use the Combat class getPlayerHealthPercentage() -- the Player class' getHealthPercent() method relies on gamepack hooks.

     

     

    • --
    • --
    • --
    • --
    • --
    Link to comment
    Share on other sites

    Guess I'll just update my answers as you update your thread, because immediately your first point is already bothering me a lot.

    Player.getHealth is based on hooks in the gamepack, these hooks are only available *while in combat* blame RS when they updated the health bar information.

    Not to mention not every player is *your* player, so using skills in the Player class is not possible.

    If you wish to get *your* health whenever, you can use the combat class.

    Link to comment
    Share on other sites

    Guess I'll just update my answers as you update your thread, because immediately your first point is already bothering me a lot.

    Player.getHealth is based on hooks in the gamepack, these hooks are only available *while in combat* blame RS when they updated the health bar information.

    Not to mention not every player is *your* player, so using skills in the Player class is not possible.

    If you wish to get *your* health whenever, you can use the combat class.

     

    Haha no problem.

     

    That's odd that they would have that. I just thought it was a weird thing to see available in the Player class. Absolutely had no idea the Player class was consisted of (some) gamepack hooks like the getHealhPercentage(). The API is a bit ambiguous (unclear) in regards to what classes represent what in that aspect (because I never thought of the Combat class -- I did a suicide run of a combat script I wrote without the use of it and it worked fine). The thing that bothers me is that the API doesn't have documentation of the classes (i.e. Player / Combat class) to help script developers know if, for example, the Player class uses hooks in the gamepack that may not work as they intended.

     

    I have no intention of making it look like I am shitting on the API, I like it a lot. I also appreciate your replies and how quick they are -- kudos to you lol.

     

    You replied a bit before I edited my OP -- I have two other suggestions that I have added on. Would be great to see what you think.

    Link to comment
    Share on other sites

    1. You can use quickstart and give the client a world to log into. I was also pretty sure there was an option for f2p only in the settings, but really if you have a specific world you want to log in to, you should either set that in the settings or set it in quickstart. (quickstart param is -world 3xx)

    2. walk only clicks once, always. it's not a method that walks you the whole way there, that's way too much control for way too long. This puts more control in the scripter's hands on how to actually handle the walking and when.

    Link to comment
    Share on other sites

    Guess I'll just update my answers as you update your thread, because immediately your first point is already bothering me a lot.

    Player.getHealth is based on hooks in the gamepack, these hooks are only available *while in combat* blame RS when they updated the health bar information.

    Not to mention not every player is *your* player, so using skills in the Player class is not possible.

    If you wish to get *your* health whenever, you can use the combat class.

    Wouldn't the best way to get current health be something like 

    getSkills().getBoostedLevels(Skill.HITPOINTS)
    

    ?

    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.