Xagul
deathzot.net
- Joined
- Jun 30, 2008
- Messages
- 1,294
- Solutions
- 3
- Reaction score
- 1,037
I am trying to make a script so players that are attacked by another player that is over double their level only take 50% damage. Ive been able to get most of it working however I cant seem to get this last part working (for some reason it just does not remove health)
Basically what I was thinking with this script is that it would remove health based on the total dmg done divided by 2 (50%) then it would return false making the actual hit not register resulting in 50% dmg reduction to players half your level. This does not do damage at all however! I also tried reversing "attacker, cid" to "cid, attacker" just to see what would happen and it hits the attacker back for 50% damage.
Code:
if type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS then
doTargetCombatHealth(attacker, cid, COMBAT_PHYSICALDAMAGE, -value / 2, -value / 2, CONST_ME_NONE)
return false
end
Basically what I was thinking with this script is that it would remove health based on the total dmg done divided by 2 (50%) then it would return false making the actual hit not register resulting in 50% dmg reduction to players half your level. This does not do damage at all however! I also tried reversing "attacker, cid" to "cid, attacker" just to see what would happen and it hits the attacker back for 50% damage.