If I add less stones it works, wtf? xd
script:
picture:
script:
Code:
local fromX=998 --start x
local toX=1003 --end x
local fromY=998 --start Y
local toY=1002 --end Y
local remove = 14000 --time until start
function onThink(cid, interval)
for x = fromX, toX do
for y = fromY, toY do
if isMonster(getTopCreature({x=x,y=y,z=7}).uid) then
doRemoveCreature(getTopCreature({x=x,y=y,z=7}).uid)
elseif isPlayer(getTopCreature({x=x,y=y,z=7}).uid) then
doCreatureSetStorage(getTopCreature({x=x,y=y,z=7}).uid, 30027, 2) ---kick out
end
end
end
function Check(parameter)
local fromX=998 --start x
local toX=1003 --end x
local fromY=998 --start Y
local toY=1002 --end Y
local itenz={1285, 3325}
local f = {
[1] = "Troll",
[2] = "Frost Troll",
}
monsters = 0
for y = fromY, toY do
for x = fromX, toX do
if isPlayer(getTopCreature({x=x,y=y,z=7}).uid)==FALSE then
if isMonster(getTopCreature({x=x,y=y,z=7}).uid)==FALSE then
if isInArray(itenz, getThingfromPos({x=x,y=y,z=7}).itemid)==FALSE then
if monsters ~= 20 then
doCreateMonster(f[math.random(2)], {x=x,y=y,z=7})
monsters = monsters + 1
end
end
end
end
end
end
return TRUE
end
local item = doCreateItem(2601, 1, {x=1003, y=1006, z=7})
doItemSetAttribute(item, 'uid',1008)
addEvent(doRemoveItem, remove, 1008, 1)
addEvent(Check, remove + 1, {})
return TRUE
end
picture:
Last edited: