Use Item Infront
#85
Auto uses top item infront of the player.
--[[
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.
]]--
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)
21 Mar 2022