milbradt
New Member
- Joined
- Dec 25, 2011
- Messages
- 177
- Solutions
- 1
- Reaction score
- 4
Code:
function onCastSpell(cid, var)
local summons = getCreatureSummons(cid)
if #summons > 0 then
for _, pid in pairs(summons) do
if getCreatureName(pid) == "Demon" then
return doCombat(cid, combat, var)
end
end
doPlayerSendCancel(cid, "You need to summon a Demon to use this spell.")
else
doPlayerSendCancel(cid, "You don't have any summons, you need to summon a Demon to use this spell.")
end
end
Does not work if I have summoned more monsters...
Ex: My summons = Fire Elemental + Demon + Fire Devil
Script return ELSE.. =\