Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
1.8K
Position onLook #1
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.
643b | 12 lines.
 --[[
  Script made by Lee (Discord: l33_) - www.trainorcreations.com
  If you want to support my work, feel free to donate at https://trainorcreations.com/donate
  PS. Stop ripping off my work and selling it as your own.
 ]]--
onTextMessage(function(mode, text)
    if mode == 20 and text:find("You see") 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) -- remove this if you don't want it showing on bot
            if not modules.game_textmessage then return end
            modules.game_textmessage.displayMessage(16, "position: " .. loc.x.. ", "..loc.y..", "..loc.z)
        end
    end
end)

01 Jan 2020
Ads