I've tried to add this and my hit does not change even though I'm using hitDiff = blahblahblah; Anyone know how to either fix that or just remove the hit altogether so I can add a getHitManager().addHit(AttackingOn, misc.random(cbowhit), 1); without the original hit? Here is my code so far:
Code:
if(playerEquipment[playerWeapon] == 837 && playerEquipment[playerArrows] == 881){
int cbowhit = maxRangeHit()*2;
if(playerEquipment[playerWeapon] == 837 && playerEquipment[playerArrows] == 881){
hitDiff = misc.random(cbowhit);
if(AttackingOn2 != null){
EnemyX = PlayerHandler.players[AttackingOn].absX;
EnemyY = PlayerHandler.players[AttackingOn].absY;
}
hitDiff = misc.random(cbowhit);
int offsetX = (absY - EnemyY) * -1;
int offsetY = (absX - EnemyX) * -1;
CreateProjectile(absY, absX, offsetY, offsetX, 50, 95, 26, 43, 31, AttackingOn+1);
stillgfx(346, AttackingOn2.absY, AttackingOn2.absX);
sM("Your bolt rips through your enemy's defence!");
//getHitManager().addHit(AttackingOn, misc.random(cbowhit), 1);
}
hitDiff = misc.random(cbowhit);
}
P.S. I know it's not neat so don't comment on that