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

Lua Too much corpses, debug on clean.

Hernest

New Member
Joined
Jul 26, 2010
Messages
152
Reaction score
3
Location
poland
Hello,
I created hunting arena and I have small problem with it.
There are too much corpses on one tile and players get debug on clean when there are too much corpses.

I am not sure how can I solve it, maybe quckier corpse decaying in selected area is possible?
 
Tried this:
Code:
function onAddItem(moveItem, tileItem, position, cid)
    if not isInArray({8303, 8300, 8305, 9468, 10570}, moveItem.itemid) then
        doRemoveItem(moveItem.uid)
    end
end

But i want to do it after x seconds, so i tried;
Code:
function onAddItem(moveItem, tileItem, position, cid)
    if not isInArray({8303, 8300, 8305, 9468, 10570}, moveItem.itemid) then
        addEvent(doRemoveItem, 1000 * 30, moveItem.uid)
    end
end
Nothing happend.
 
So it is an arena where you fight monsters? And there are so many monsters dieing that the floor debugs players when it is cleaned.

You have a few options. What I would do personally, is just make Arena Monsters that have no corpses, or turn to ash when they die and the ash disappears quickly.

You could also make it clean the arena between each wave of monsters, but it would be easier to just not have the corpses created in the first place.
 
Well you could just do

Code:
local arenaTopLeft = {x=1000,y=1000,z=7} --Top left corner of arena
for a = 0, 20 do -- Width of Arena
  arenaTopLeft.x = arenaTopLeft.x + a 
   for b = 0, 20 do -- Height of Arena
       arenaTopLeft.y = arenaTopLeft.y + b
       doCleanTile(arenaTopLeft) -- Cleans items from tile
   end
 end
 
Code:
local timeToUse = 1.1
        local lastTime1 = 0 -- nie ruszac
        local arenaTopLeft = {x=1009,y=989,z=7} --lewy gorny rog arenki
            function onSay(cid, words, param)
            local osTime = os.time()
            local mos = monsterarena1
            --local wavecount1 = 0
            local pozycja1 = {x=1009, y=993, z=7, stackpos = STACKPOS_TOP_CREATURE}
            local pozycja2 = {x=1008, y=994, z=7, stackpos = STACKPOS_TOP_CREATURE}
            if(lastTime1 <= osTime) then
                if (getPlayerStorageValue(cid, 156661) >= 0) then
                    --if wavecount1 == 3 then
                        for a = 0, 10 do -- szerokosc
                            arenaTopLeft.x = arenaTopLeft.x + a 
                                for b = 0, 10 do -- wysokosc
                                    arenaTopLeft.y = arenaTopLeft.y + b
                                    doCleanTile(arenaTopLeft) -- czysci
                                    local wavecount1 = 0
                                    doCreatureSay(cid, "Cleaned!", TALKTYPE_ORANGE_1)
                                end
                        end
                    --end
                    doCreatureSay(cid, mos, TALKTYPE_ORANGE_1)
                        doSummonCreature(mos, pozycja1)
                        doSummonCreature(mos, pozycja2)
                        --local wavecount1 = wavecount1 + 1
                        lastTime1 = osTime + timeToUse
                else
                    doCreatureSay(cid, "You are not inside hunting arena!", TALKTYPE_ORANGE_1)
                end
            end
    return true 
end
Code:
[21/01/2015 10:58:48] [Error - TalkAction Interface] 
[21/01/2015 10:58:48] buffer:onSay
[21/01/2015 10:58:48] Description: 
[21/01/2015 10:58:48] (luaDoCleanTile) Tile not found
 
Code:
    local area, position = getArea({x = 1009, y = 989, z = 7}, 10, 10)
    for i = 1, #area do
        position = area[i]
        doCleanTile(position)
    end
 

Similar threads

Back
Top