Samuel91 6 Share Posted November 11, 2018 Im trying to write code that Switches to attack style tab 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. Link to comment Share on other sites More sharing options...
Nuclear Nezz 2055 Share Posted November 11, 2018 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 More sharing options...
Samuel91 6 Author Share Posted November 11, 2018 ahhh apparently config 439 changes from 0 to 256 whenever I change from the defensive spell to the normal spell. Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted November 11, 2018 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 More sharing options...
Samuel91 6 Author Share Posted November 11, 2018 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 More sharing options...
Pseudo 179 Share Posted November 11, 2018 39 minutes ago, Samuel91 said: how do you get the color of the widget? I don't know offhand, but I'd imagine you'll find your answer here: https://dreambot.org/javadocs/org/dreambot/api/wrappers/widgets/WidgetChild.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.