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

Uncover/Show Minimap

pink_panther

Excellent OT User
Joined
Sep 10, 2016
Messages
1,171
Solutions
13
Reaction score
613
Location
Kazordoon
Is there a way to download all the minimap files to "show" the minimap, without having to walk around everywhere in game to cache the data?


Edit:

In the meantime, I've written this horrible horrible script, which I've added as a talkaction command.

It just teleports your player to every sqm on the map to "discover" the map.

TFS addEvent hardcoded a 100ms delay, but can be reduced/removed if you build the solution yourself, which I've done.

Lua:
local startx = 31872
local starty = 31488
local startz = 1

local endx = 33407
local endy = 33023
local endz = 15

local gotox = startx
local gotoy = starty
local gotoz = startz

local inc = 14

local function LoopFunction()
    local plr = Player("GM Panther") -- Put your players name here.
    local delay = 1
  
    if gotox > endx and gotoy > endy then
        if gotoz == endz then
            plr:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Finished")
            gotox = startx
            gotoy = starty
            gotoz = startz
            return
        else
        plr:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Next floor" .. gotoz)
        gotox = startx
        gotoy = starty
        gotoz = gotoz + 1
        end
    end
      
    if gotox > endx then
    gotox = startx
    gotoy = gotoy + inc
    plr:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Dropdown to " .. gotoy)
    end


    local position = {x = gotox, y = gotoy, z = gotoz}
    -- plr:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Trying " .. gotox .. "," .. gotoy .. "," .. gotoz)
    local tile = Tile(position)
    if tile then 
        plr:teleportTo(position)
        delay = 25
    else 
        -- Find a tile near by this position
        for i = -7,7 do 
            for j = -7,7 do 
                position = {x = gotox+i, y = gotoy+j, z = gotoz}
                tile = Tile(position)
                    if tile then 
                        plr:teleportTo(position)
                        delay = 25
                        gotox = gotox + inc
                        addEvent(LoopFunction, delay)
                        return
                    end
            end    
        end        
    end
    
  
    gotox = gotox + inc
    addEvent(LoopFunction, delay)
end

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

    LoopFunction()
end
 
Last edited:
Back
Top