Baneczek
うさちゃん
Hello guys. I wrote a really simple script that executes animation (custom) on creature when i attack it. It works, but not as i wanted it to work. It executes the animation when i click on the creature even if i don't hit it and am away from the creature. I want it to execute the animation only when i hit the creature.
Here is the script:
EDIT: I tried with onAttack function, but then it continues the animation again and again, even from away.
Here is the script:
Code:
function onCombat(cid,target)
local pos = getCreaturePosition(target)
if getPlayerVocation(cid) == 4 then
doSendMagicEffect(pos,151)
end
return true
end
EDIT: I tried with onAttack function, but then it continues the animation again and again, even from away.