OTClient Code
These are codes that I have posted on various forums/discord.
Get Position from Shift-Click Look #1
onTextMessage(function(mode, text)
if mode == 20 then
if not modules.game_interface.gameMapPanel.mousePos then return end
local tile = modules.game_interface.gameMapPanel:getTile(modules.game_interface.gameMapPanel.mousePos)
if tile then
local loc = tile:getPosition()
error("Position: " .. loc.x.. ", "..loc.y..", "..loc.z)
if not modules.game_textmessage then return end
modules.game_textmessage.displayMessage(16, "position: " .. loc.x.. ", "..loc.y..", "..loc.z)
end
end
end)
Look messages are generated server side, but the message for look is mode 20, so you can listen for mode 20 textmessages and then just get the position from the tile under your cursor.

01/01/2021