Eu fiz algo aqui, se tiver monstros ele vai remover e adicionar novos, quando eles entrarem na quest vai ser setado uma global storage evitando que mais gente possa entrar, e quando sair vai setar um novo valor para outros times passarem.
\mods\Annihilator.xml
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Annihilator" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
<config name="annihilator_config"><![CDATA[
config = {
level = 0,
storage = 36478,
exit = {x = 1019, y = 1035, z = 7},
posI = {
{x = 1023, y = 1035, z = 7},
{x = 1022, y = 1035, z = 7},
{x = 1021, y = 1035, z = 7},
{x = 1020, y = 1035, z = 7},
},
posF = {
{x = 1024, y = 1039, z = 7},
{x = 1023, y = 1039, z = 7},
{x = 1022, y = 1039, z = 7},
{x = 1021, y = 1039, z = 7},
},
monster = {
{name = "Rat", pos = {x = 1024, y = 1037, z = 7}},
{name = "Rat", pos = {x = 1023, y = 1037, z = 7}},
{name = "Rat", pos = {x = 1022, y = 1037, z = 7}},
{name = "Rat", pos = {x = 1021, y = 1037, z = 7}},
{name = "Rat", pos = {x = 1024, y = 1041, z = 7}},
{name = "Rat", pos = {x = 1023, y = 1041, z = 7}},
{name = "Rat", pos = {x = 1022, y = 1041, z = 7}},
{name = "Rat", pos = {x = 1021, y = 1041, z = 7}},
},
}
]]></config>
<action actionid="9874" event="script"><![CDATA[
function onUse(cid, item, fromPosition, itemEx, toPosition)
domodlib('annihilator_config')
local table = {}
if (getStorage(config.storage) == -1) then
doSetStorage(config.storage, 0)
for i = 1, #config.posI do
table[i] = getTopCreature(config.posI[i]).uid
if table[i] == 0 or not isPlayer(table[i]) then
return doPlayerSendCancel(cid, "You need "..#config.posI.." players for this quest.")
elseif getPlayerLevel(table[i]) < config.level then
return doPlayerSendCancel(cid, "All players need to have level "..config.level.." or higher.")
end
end
for y = 1, #config.posF do
doTeleportThing(table[y], config.posF[y])
doSendMagicEffect(config.posI[y], CONST_ME_POFF)
doSendMagicEffect(config.posF[y], CONST_ME_TELEPORT)
end
for m = 1, #config.monster do
local t = getTopCreature(config.monster[m].pos).uid
if (t > 0) then
doRemoveCreature(t)
end
doCreateMonster(config.monster[m].name, config.monster[m].pos)
end
else
doPlayerSendCancel(cid, "There is already a team in the quest room.")
end
end
]]></action>
<movevent type="StepIn" actionid="9875" event="script"><![CDATA[
function onStepIn(cid, item, position, fromPosition)
domodlib('annihilator_config')
doSetStorage(config.storage, -1)
doTeleportThing(cid, config.exit)
end
]]></movevent>
</mod>