Page 1 of 1

Set Zoom Level on All Areas

Posted: Tue Jul 09, 2024 11:56 am
by Zooka
Mudlet's mapper automatically remembers the zoom level for each different area, but alas, there is no way to set the zoom level for all your areas at once.

Here's a script that does just that.

Code: Select all

function setMapZoomAllAreas(zoom)

  if not zoom or not tonumber(zoom) then 
    echo("Require zoom level as a number. Lower is closer.") 
    return
  end
    
  echo(f"Setting map zoom level to {zoom} on;\n")

  for k,v in spairs(getAreaTableSwap()) do
    echo(f"   [{k}] {v}\n")
    setMapZoom(zoom, k)
  end

end
Copy the function into a new script.
On the command line issue

Code: Select all

lua setMapZoomAllAreas(50)
50 being the zoom level, it will set all areas in your map to the same level. Lower numbers are closer (more zoomed in), e.g. 10 is closer than 50.