Guest User

Untitled

a guest
May 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. function onUseWeapon(cid, var)
  2. local target = variantToNumber(var)
  3. local lvl = getPlayerLevel(cid)
  4. local skillType = SKILL_SWORD
  5. local skill = getPlayerSkillLevel(cid, skillType)
  6.  
  7. local dmgMax = (lvl * 0.5) + (skill * 4.0)
  8. local dmgMin = dmgMax / 1.5
  9. local holyMax = lvl
  10. local holyMin = (lvl / 2)
  11.  
  12. local playerTarget = getCreatureTarget(cid)
  13.  
  14. if(target ~= 0) then
  15.  
  16. ret = doTargetCombatHealth(cid, playerTarget, COMBAT_PHYSICALDAMAGE, -dmgMin, -dmgMax, 0)
  17. holy = doTargetCombatHealth(cid, playerTarget, COMBAT_HOLYDAMAGE, -holyMin, -holyMax, 0)
  18. end
  19. return ret, holy
  20. end
Add Comment
Please, Sign In to add comment