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
  • Find What Attack Style is Selected


    Samuel91
     Share

    Recommended Posts

    Im trying to write code that

    1. Switches to attack style tab
    2. Uses some method to check which one of the attack style widgets (Attack, Strength, Defense) is selected

    I thought I could use getPlayerSettings().getConfig(43), but it falls apart when a staff is equipped. On a staff both the "defensive spell" and "normal spell" set getconfig(43) to 4.

    So is there a way to get the color of the widget or something like that? I was searching through the game debugger but didn't see anything.

     

     

    defenseSpell.pngnormalSpell.png

    Edited by Samuel91
    Link to comment
    Share on other sites

    I believe the config values are different for different weapons, but that's probably your best bet.

    You could also check the widgets yeah, I think there's a few things in there that change when you select them, but I'm not positive on that.

    You could also use color picker, if all else fails. PlayerSettings is a better choice, though, and probably more efficient.

    Link to comment
    Share on other sites

    As for other weapons, if you're struggling to differentiate between stances with the config values, you could probably always process the widgets based on the color and text present.

    Link to comment
    Share on other sites

    4 minutes ago, Pseudo said:

    As for other weapons, if you're struggling to differentiate between stances with the config values, you could probably always process the widgets based on the color and text present.

    how do you get the color of the widget?

    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.