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

    Posted

    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

    Posted

    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.

    Posted

    ahhh apparently config 439 changes from 0 to 256  whenever I change from the defensive spell to the normal spell.

    Posted

    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.

    Posted
    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?

    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.