Besides any bugs that might appear in my coding, I made massive changes to the skills.xml so I'm expecting to be tidying it up for days as people post their problems. So now is the ideal time to retry setting up your skills just the way you want them to work. It's also a good time to post any skills that are missing that you want added.
I'll update the wiki in a few hours time.
Changes:
- Buff info is updated when the update() function is used and is updated for both player and target.
- Buff info stored in player.Buffs is now stored differently. Typically this wont affect users as they usually use the hasBuff and hasDebuff functions which still work the same for backward compatibility. The data is now stored like this
Code: Select all
player.Buffs[1].Name .Id .Count .TimeLeft .Level
- Debuffs are store with the buffs in player.Buffs as they are stored together in memory. So player.Debuffs is no longer used.
- Some skill options have been added and removed.
- 'buffname' is added and used when a skill applies a buff or debuff. It is used in conjunction with 'type' and 'target'. The skill wont be used if the buff is already applied. buffname is not necessary if the cooldown is longer than the buff duration. It can only be used in 'skills.xml'.
- 'reqbufftype' has been removed as it was no longer needed. The bot no longer distinguishes between buffs and debuffs.
- 'reqbuffcount' has been added to indicate the required stack number of the skill.
- 'nobuffname', 'nobufftarget' and 'nobuffcount' have been added and mean the opposite of 'reqbuff'. The skill is used only if the buff hasn't been applied. It can be used in conjunction with the 'reqbuff' options.
- all the 'reqbuff' and 'nobuff' options can now be used in profiles for better skill sequence control.
- all the buff names can accept the buff name or it's id. They can also accept a range of ids as in the case of skills that can be used a number of times. eg. "Light Seal" and "500137,500138,500139" are the same. I've extensively used ids in skills.xml so that it will work in any language. Obviously users would use names when using these options in their profiles. Note: don't use "Light Seal III" because the stack numbers on the end of the names are stripped.
- added pawn:getBuff(name, count) that returns the buff object if it exists.
- added second argument 'count' to hasBuff and hasDebuff.
- added Druids Natures Power to player.Nature and now the bot checks the 'nature' values in the skills database.
- MASSIVE update to skills.xml to add the buff values and remove all those unnecessary cooldowns. Took me way longer than the rest of the coding. Also made a few corrections and added a few skills.
- added possible fix for the character getting stuck when there is nothing there and it wobbling left and right. I need people who have this problem to test it as I never get this bug.
- bot now detects if a edit box in game has focus when trying to use the macro. If so it will press escape to release focus so it can continue botting.
- changed the default melee distance to 50 because 45 was causing problems with mobs that wanted to fight at a distance between 45 and 50.