something like
local monster = "Demon"
... if getCreatureName(cid) == monster then
then perform a spell
Please, help
local monster = "Demon"
... if getCreatureName(cid) == monster then
then perform a spell
Code:
function onCastSpell(cid, var)
local summons = getCreatureSummons(cid)--wrong, need name monster
if #summons > 0 then-- wrong, need name monster
for _, pid in pairs(summons) do
var.pos = getCreaturePosition(pid)
doCombat(cid, combat, var)
end
return true
end
return doPlayerSendCancel(cid, "You dont have any summon.")
end