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


    Samuel91

    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

    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

    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.