Hey guys! In need of some assistance here.
So I am trying to make the Dragon Hunter Lance special attack scale, based off of the special attack percentage the player has at the time. It seems to just skip the first set entirely, and just go to the bottom piece of code. Not taking into account the special attack percentage the player has.
Special ExecuteCode:case 24668://Dragon hunter lance spec
if (player.getCombatDefinitions().getSpecialAttackPercentage() == 100) {
player.animate(new Animation(10502));
delayNormalHit(weaponId, attackStyle,
getMeleeHit(player, getRandomMaxHit(player, weaponId, attackStyle, false, true, 1.85, true)));
break;
} else
if (player.getCombatDefinitions().getSpecialAttackPercentage() <= 99) {
player.animate(new Animation(10502));
delayNormalHit(weaponId, attackStyle,
getMeleeHit(player, getRandomMaxHit(player, weaponId, attackStyle, false, true, 1.65, true)));
break;
}
break;
GifCode:public static boolean specialExecute(Player player) {
int weaponId = player.getEquipment().getWeaponId();
player.getCombatDefinitions().switchUsingSpecialAttack();
int specAmt = getSpecialAmmount(weaponId);
if (specAmt == 0) {
player.getPackets()
.sendGameMessage("This weapon has no special Attack, if you still see special bar please relogin.");
return false;
}
if (player.getCombatDefinitions().getSpecialAttackPercentage() > 0 && weaponId == 24668) {
player.getCombatDefinitions().setSpecialAttack(0);
return true;
}
if (player.getCombatDefinitions().hasRingOfVigour())
specAmt *= 0.9;
if (player.getCombatDefinitions().hasRingOfVigourImbued())
specAmt *= 0.75;
if (player.getInventory().containsItem(773, 1))
specAmt *= 0.0;
if (player.getCombatDefinitions().getSpecialAttackPercentage() < specAmt) {
player.getPackets().sendGameMessage("You don't have enough power left.");
player.getCombatDefinitions().desecreaseSpecialAttack(0);
return false;
}
player.getCombatDefinitions().desecreaseSpecialAttack(specAmt);
return true;
}
[Only registered and activated users can see links. Click Here To Register...]
Can anyone point me in the right direction?
