Firebomb behind distance
#112
This shoots firebomb behind the player x amount of squares.
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)
- remove | + add
23 Jul 2023