Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onUseWeapon(cid, var)
- local target = variantToNumber(var)
- local lvl = getPlayerLevel(cid)
- local skillType = SKILL_DISTANCE
- local skill = getPlayerSkillLevel(cid, skillType)
- local dmgMax = (lvl * 0.5) + (skill * 4.0)
- local dmgMin = dmgMax / 1.5
- local holyMax = lvl
- local holyMin = (lvl / 2)
- local playerTarget = getCreatureTarget(cid)
- if(target ~= 0) then
- ret = doTargetCombatHealth(cid, getCreatureTarget(cid), COMBAT_PHYSICALDAMAGE, -dmgMin, -dmgMax, 0)
- holy = doTargetCombatHealth(cid, playerTarget, COMBAT_HOLYDAMAGE, -holyMin, -holyMax, 0)
- doSendDistanceShoot(fromPos, targetPos, 23)
- end
- return ret, holy
- end
Add Comment
Please, Sign In to add comment