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.
729
Firebomb behind distance #112
This shoots firebomb behind the player x amount of squares.
File: firebomb_behind.lua | 711b | 23 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.
 ]]--
local squaresDistance = 4
local fbRune = 3192  -- id fire bomb
local delayTime = 10000 -- delay

local dirs = {
  [0] = {x = 0, y = squaresDistance},
  [1] = {x = -squaresDistance, y = 0},
  [2] = {x = 0, y = -squaresDistance},
  [3] = {x = squaresDistance, y = 0}
}

macro(1000, "Fire Bomb", function()
  local playerPos = pos()
  local playerDir = player:getDirection()
  local fbTile
  if playerDir and dirs[playerDir] then
    local targetPos = {x = playerPos.x + dirs[playerDir].x, y = playerPos.y + dirs[playerDir].y, z = playerPos.z}
    fbTile = g_map.getTile(targetPos)
    if not fbTile then return end
    useWith(fbRune, fbTile:getTopUseThing())
    delay(delayTime)
  end
end)

23 Jul 2023
Ads