Set Zoom Level on All Areas

Share your scripts and packages with other Mudlet users.
Post Reply
Zooka
Posts: 13
Joined: Thu May 04, 2023 11:44 pm

Set Zoom Level on All Areas

Post 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.

Post Reply