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.  
  15. if(target ~= 0) then
  16.  
  17. ret = doTargetCombatHealth(cid, getCreatureTarget(cid), COMBAT_PHYSICALDAMAGE, -dmgMin, -dmgMax, 0)
  18. holy = doTargetCombatHealth(cid, playerTarget, COMBAT_HOLYDAMAGE, -holyMin, -holyMax, 0)
  19. doSendDistanceShoot(fromPos, targetPos, 23)
  20. end
  21. return ret, holy
  22. end
Add Comment
Please, Sign In to add comment