mousbros Posted March 3, 2020 Share Posted March 3, 2020 I searched in the API but I cant find it. I wanna create that my script swtiches attackstyle at a certain level. Like attack is <10 switch to defence, defence is <10 switch to strength. thank you in advance Quote Link to comment Share on other sites More sharing options...
Naked Posted March 3, 2020 Share Posted March 3, 2020 You have to click the widget, there isn't an api method. Look at the configs when you change attack styles manually, and that should help 1 Quote Link to comment Share on other sites More sharing options...
iJabba Posted March 4, 2020 Share Posted March 4, 2020 Don't quote me on this, but from what I've seen in the api, you'll first need to get the configs for the attack style. i believe this is '43' and values range from 0 upwards, 0 being attack, then you need to get the widget id's for the given style you want to switch and write a piece of code for it. int currentAttackStyle = getConfigs().get(43); if (currentAttackStyle == 0 && getSkills().getDynamic(Skill.ATTACK) > 10) { // current attack style is 'attack' and our player has an attack level higher then 10 // this is where you now want to perform widget interactions to change the given attack style to one of your choice. } Should be enough information here for you to accomplish what you need, I'd also advise you taking a look at: it's a very helpful resource. Quote Link to comment Share on other sites More sharing options...