• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

summon spell

foxkbt

Member
Joined
Sep 29, 2009
Messages
290
Reaction score
7
Location
Salvador
well

I need a spell to summon a 5 demons

in thats positions

{1, 0, 1}
{0, 2, 0}
{1, 0, 1}
{0, 1, 0}

thanks
 
Code:
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
Protip: It won't work unless you change this in demon.xml:
Code:
		<flag convinceable="[B][COLOR="Red"]1[/COLOR][/B]"/>
 
Back
Top