• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

[TFS 1.3] Small Boss Room

Delete any item might be difficult cause it could delete the items that were placed in map editor, however if you want to remove specific item, like a corpse type, or certain item id, then you can use something like that

Lua:
            iterateArea(
                function(position)
                    local tile = Tile(position)
                    if not tile then
                        return
                    end
                    local items = tile:getItems()

                    if items then
                        for i = 1, #items do
                            local checkitem = items[i]
                            if checkitem:getId() == 18472 then
                                local item = items[i]
                                item:remove()
                            end
                        end
                    end
                end,
                Position(config.bossarea.fromPos.x, config.bossarea.fromPos.y, config.bossarea.fromPos.z),
                Position(config.bossarea.toPos.x, config.bossarea.toPos.y, config.bossarea.toPos.z)
            )
I'd add this somewhere after stopEvent(config.kickEventId)
Actually you're right! I need to clean a corpse. Got this error from the merge. Also fixed bossarea for bossArea.
1718017658953.png
Thanks for the reply! Regards :)
 
Actually you're right! I need to clean a corpse. Got this error from the merge. Also fixed bossarea for bossArea.
View attachment 85420
Thanks for the reply! Regards :)
Damn, sorry, you need also this

Lua:
function iterateArea(func, from, to)
    for z = from.z, to.z do
        for y = from.y, to.y do
            for x = from.x, to.x do
                func(Position(x, y, z))
            end
        end
    end
end

in global.lua
 
Back
Top