rockseller
Lua & .NET Programmer
I'm using spells as talkactions, i have the following talkaction:
This can actually kill player and monsters, if is a player, will get a Frag, but if it is a monster, it won't get experience.
Any ideas? Maybe using return doCombat with no parameters?
Thanks in advance.
Code:
function onSay(cid, words, param, channel)
playerVocation = getPlayerVocation(cid)
RequiredVocation = 2
TargetCid = getCreatureTarget(cid)
if playerVocation ~= RequiredVocation then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Wrong Vocation")
return true
end
if TargetCid == 0 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Attack someone")
return true
end
HealthToRemove = 500
--Remove Health
doCreatureAddHealth(TargetCid, -HealthToRemove)
return true
end
This can actually kill player and monsters, if is a player, will get a Frag, but if it is a monster, it won't get experience.
Any ideas? Maybe using return doCombat with no parameters?
Thanks in advance.