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.
Use Item Infront #85
Auto uses top item infront of the player.
385b | 13 lines.
  Script made by Lee (Discord: l33_) -
  If you want to support my work, feel free to donate at
  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)

21 Mar 2022