function doRemoveCreatureSummon(cid, name)
if isCreature(cid) and type(name) == "string" then
for _, sid in ipairs(getCreatureSummons(cid)) do
if getCreatureName(sid):lower() == name:lower() then
return doRemoveCreature(sid)
end
end
end
end
function onCastSpell(cid, var)
if getPlayerItemCount(cid, 11416) >= 1 then
if isCreature(cid) and type(name) == "wolf" then
doPlayerRemoveItem(cid, 11416)
return doCombat(cid, combat, var)
for _, sid in ipairs(getCreatureSummons(cid)) do
if getCreatureName(sid):lower() == name:lower() then
return doRemoveCreature(sid)
end
end
else
doPlayerSendCancel(cid, "voce nao tem monstro invocado pa transmutar.")
end
end
function doRemoveCreatureSummon(cid, name)
if isCreature(cid) and type(name) == "string" then
for _, sid in ipairs(getCreatureSummons(cid)) do
if getCreatureName(sid):lower() == name:lower() then
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
return doRemoveCreature(sid)
end
end
end
end
function onCastSpell(cid, var)
if getPlayerItemCount(cid, 11416) > 0 and doRemoveCreatureSummon(cid, "Wolf") then
doPlayerRemoveItem(cid, 11416, 1)
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Você não tem monstro invocado pa transmutar.")
end
end