• 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!

Sloved

LUA:
local config = {
	monsters = {
		['Demon'] = {}
		}
	}

function onUse(cid, item, fromPosition, itemEx, topos)
local summons = getCreatureSummons(cid)
for _, summoned in ipairs(summons) do
if config.monsters[getCreatureName(summoned)] then
doRemoveCreature(summoned)
return true
end
end
if(getTilePzInfo(getCreaturePosition(cid)) == true) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't summon in pz.")
	return true
end
if table.maxn(getCreatureSummons(cid)) <= 0 then -- ändra till max antalet summons
doSummonMonster(cid, "Demon")
doRemoveItem(item.uid, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You already have a summon.")
end
return true
end
haven't tried it, shouldn't give any errors

edit: fixed now
 
Last edited:
Back
Top