Jump to content

Switching attack style


Recommended Posts

Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...