Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local combat = createCombatObject()
- setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
- setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
- setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
- setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
- function onCastSpell(cid, var)
- local pid = getCreatureTarget(cid)
- if isCreature(pid) then
- pos = getThingPos(pid)
- doSendMagicEffect(pos, 40)
- if math.random(100) == 1 then
- doTargetCombatHealth(cid, pid, COMBAT_PHYSICALDAMAGE, -getCreatureHealth(pid), -getCreatureHealth(cid), 10)
- else
- doCombat(cid, combat, positionToVariant(pos))
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment