Guest User

Untitled

a guest
May 22nd, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. function onUseWeapon(cid, var)
  2. local target = variantToNumber(var)
  3. local lvl = getPlayerLevel(cid)
  4. local skillType = SKILL_DISTANCE
  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, getCreatureTarget(cid), COMBAT_PHYSICALDAMAGE, -dmgMin, -dmgMax, 0)
  17. holy = doTargetCombatHealth(cid, playerTarget, COMBAT_HOLYDAMAGE, -holyMin, -holyMax, 0)
  18. doSendDistanceShoot(fromPos, targetPos, 23)
  19. end
  20. return ret, holy
  21. end
Add Comment
Please, Sign In to add comment