Shows coords given in table format {x,y} (then it will appear on $posz) or {x,y,z} as tiles on screen. Script is based on Raphael's Show Waypoints HUD. This HUD can be helpful during aoe actions debugging.
Configuration
Edit the tileColor, tiles variables after init block to specify color and tiles.
Code
init start
-- local SCRIPT_VERSION = '1.0.0'
local xOffset, yOffset, worldWidth, worldHeight, x, y, z, topLeftTilePos,
botRightTilePos, width, height, text, label
local waypointRect = {}
function gettilepos(x, y, z)
local tile = getobjectarea(x, y, z)
if tile == nil then
local xDiff, yDiff = x - $posx, y - $posy
if math.abs($posx - x) <= 7 then
tile = getobjectarea(x, $posy, $posz)
xDiff = 0
elseif math.abs($posy - y) <= 5 then
tile = getobjectarea($posx, y, $posz)
yDiff = 0
else
tile = getobjectarea($posx, $posy, $posz)
end
-- Some strange stuff happens when you go from 0 to -1, so I'm
-- adding this as a precaution.
if tile ~= nil then
local width, height = $worldwin.width, $worldwin.height
if waypointRect.width > 0 and waypointRect.height > 0 then
setfillstyle('color', (tileColor or 0) + (math.floor(2.55*50)*16777216))
drawroundrect(
waypointRect.left,
waypointRect.top,
waypointRect.width,
waypointRect.height,
10, 10
)
end
end
end
end