Use Item Infront
#85
Auto uses top item infront of the player.
macro(1000, "Auto Use Infront", function()
local dirs = { {0,-1}, {1,0}, {0,1}, {-1,0} }
local player = g_game.getLocalPlayer()
local pos = player:getPosition()
local dir = dirs[player:getDirection()+1]
pos.x = pos.x + dir[1]
pos.y = pos.y + dir[2]
local tile = g_map.getTile(pos)
if tile then
g_game.useWith(tile:getTopUseThing(), player)
end
end)
- remove | + add
21 Mar 2022