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

Duplicate map

guiismiti

Well-Known Member
Joined
May 19, 2014
Messages
313
Solutions
3
Reaction score
67
Hello,

Has anybody noticed that Venore and Yalahar maps (maybe more places) are duplicated / triplicated?

Has anybody solved this in a creative way, not manually?

ajxi4l.jpg
 
its a problem with the map you downloaded, not sure if it can be fixed easily in RME, but ingame you can write a function that goes through certain areas of the map and if a tile contains more than 1 item of same id, it removes all excess, then save the map
 
its a problem with the map you downloaded, not sure if it can be fixed easily in RME, but ingame you can write a function that goes through certain areas of the map and if a tile contains more than 1 item of same id, it removes all excess, then save the map

A few months ago I coded a function like this and it crashed my server.
I just coded a new one and it didn't crash it xD
It removed around 35k items in Venore and 6k in Yalahar, I'm not sure of how much the map will be shrinked.

But when I use /save, it won't save the map changes.
Also, it does not remove walls, only torches / adornments.
Is there a way to save it?

Code:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    if player:getAccountType() < ACCOUNT_TYPE_GOD then
        return false
    end

    local split = param:split(",")

    if split[6] == nil then
        player:sendCancelMessage("Insufficient parameters.")
        return false
    end

    local x = 0
    local y = 0
    local z = 0
    removecount = 0

    inittime = os.time()

    for x = split[1], split[4] do
        for y = split[2], split[5] do
            for z = split[3], split[6] do
                position = Position(x, y, z)
                tile = position:getTile()
           
                if tile then
                    items = tile:getItems()
               
                    if items then
                        for i = 1, #items - 1 do
                            for j = i + 1, #items do
                                if items[i]:getId() == items[j]:getId() then
                                    items[i]:remove()
                                    removecount = removecount + 1
                               
                                    print(removecount)
                                end
                            end
                        end
                    end
                end
            end
        end
    end

    endtime = os.time()
    print("In: " .. endtime - inittime)

    return true
end

Here is the output after the Yalahar area is cleaned.
xaw9c4.jpg
 
Last edited:
Back
Top