local t = {
{"Demon", x = -1, y = -1},
{"Demon", x = 1, y = -1},
{"Demon", x = -1, y = 1},
{"Demon", y = 2},
{"Demon", x = -1, y = 1}
}
function onCastSpell(cid, var)
local summoncount, pos = getCreatureSummons(cid), getThingPos(cid)
if #summoncount < 2 then
for i = 1, #t - #summoncount do
doConvinceCreature(cid, doSummonCreature(t[i][1], {x = pos.x + (t[i].x or 0), y = pos.y + (t[i].y or 0), z = pos.z}))
end
return true
end
doPlayerSendCancel(cid, "You cannot summon more monsters.")
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end