• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Script mechanic boss Faceless Bane to make available?

Azerty

Active Member
Joined
Apr 15, 2022
Messages
321
Solutions
4
Reaction score
34
Good morning, does anyone have a script for the Faceless Bane boss mechanic to make available?
 
Solution
It still doesn't work, the boss remains immortal when passing through the tiles and the tiles are not resetting
I probably missed something easy in the logic, I'll setup a quick test now and fix it
Post automatically merged:

This is working perfectly fine for me! Also keep in mind that this script is not configured to have multiple bosses, so only ever have one boss on the map.
Lua:
local config = {
    activatedDuration = 60 --how many seconds for mortality (can be attacked)
    tileActionId = 15434,
    tiles = {
        {pos = Position(32304, 31955, 7)},
        {pos = Position(32305, 31955, 7)},
        {pos = Position(32306, 31955, 7)},
        {pos = Position(32307, 31955, 7)},
        {pos = Position(32308, 31955, 7)},
        {pos =...
Good morning, does anyone have a script for the Faceless Bane boss mechanic to make available?
From a brief look, something like this will work, but I just wrote it so its untested.

Make sure your tiles have an action ID of 5000, or whatever you set as tileActionId in the config.
Also make sure you register "facelessBaneHealthChange" and "facelessBaneDeath" in the bosses monster file as events.

Also, I am unsure if the boss is naturally spawned on the map, or if its scripted to spawn in (like a normal boss area). You will need to reset the arena and the variables if the player dies etc...
Lua:
local config = {
    tileActionId = 5000,
    tiles = {
        {pos = Position(500, 500, 7)},
        {pos = Position(501, 500, 7)},
        {pos = Position(502, 500, 7)},
        {pos = Position(503, 500, 7)},
        {pos = Position(504, 500, 7)},
        {pos = Position(505, 500, 7)},
        {pos = Position(506, 500, 7)},
        {pos = Position(507, 500, 7)},
        {pos = Position(508, 500, 7)},
        {pos = Position(509, 500, 7)},
        {pos = Position(510, 500, 7)},
        {pos = Position(511, 500, 7)},
        {pos = Position(512, 500, 7)}
    }
}

local activatedUntil = 0

function resetTiles()
    for _, tile in ipairs(config.tiles) do
        tile.walked = false
    end
end

local moveevent = MoveEvent()
function moveevent.onStepIn(creature, item, position, fromPosition)

    local now = os.time()
    if now < activatedUntil then
        return true
    end

    local tilesWalked = 0
    for _, tile in ipairs(config.tiles) do
        if tile.pos == position then
            tile.walked = true
        end
    
        if tile.walked then
            tilesWalked = tilesWalked + 1
        end
    end
 
    if tilesWalked == 13 then
        activatedUntil = now + 60
        resetTiles()
    end
    return true
end
moveevent:aid(config.tileActionId)
moveevent:register()

local facelessBaneHealthChange = CreatureEvent("facelessBaneHealthChange")
function facelessBaneHealthChange.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
    local now = os.time()
    if now > activatedUntil then
        return 0, primaryType, 0, secondaryType
    end
    return primaryDamage, primaryType, secondaryDamage, secondaryType
end
facelessBaneHealthChange:register()

local facelessBaneDeath = CreatureEvent("facelessBaneDeath")
function facelessBaneDeath.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
    activatedUntil = 0
    resetTiles()
    return true
end
facelessBaneDeath:register()
 
Last edited:
From a brief look, something like this will work, but I just wrote it so its untested.

Make sure your tiles have an action ID of 5000, or whatever you set as tileActionId in the config.
Also make sure you register "facelessBaneHealthChange" and "facelessBaneDeath" in the bosses monster file as events.

Also, I am unsure if the boss is naturally spawned on the map, or if its scripted to spawn in (like a normal boss area). You may want to reset the arena and the variables if so.
Lua:
local config = {
    tileActionId = 5000
    tiles = {
        {pos = Position(500, 500, 7)},
        {pos = Position(501, 500, 7)},
        {pos = Position(502, 500, 7)},
        {pos = Position(503, 500, 7)},
        {pos = Position(504, 500, 7)},
        {pos = Position(505, 500, 7)},
        {pos = Position(506, 500, 7)},
        {pos = Position(507, 500, 7)},
        {pos = Position(508, 500, 7)},
        {pos = Position(509, 500, 7)},
        {pos = Position(510, 500, 7)},
        {pos = Position(511, 500, 7)},
        {pos = Position(512, 500, 7)}
    }
}

local activatedUntil = 0

function resetTiles()
    for _, tile in ipairs(config.tiles) do
        tile.walked = false
    end
end

local moveevent = MoveEvent()
function moveevent.onStepIn(creature, item, position, fromPosition)

    local now = os.time()
    if now < activatedUntil then
        return true
    end

    local tilesWalked = 0
    for _, tile in ipairs(config.tiles) do
        if tile.pos == position then
            tile.walked = true
        end
      
        if tile.walked then
            tilesWalked = tilesWalked + 1
        end
    end
  
    if tilesWalked == 13 then
        activateUntil = now + 60
        resetTiles()
    end
    return true
end
moveevent:aid(config.tileActionId)
moveevent:register()

local facelessBaneHealthChange = CreatureEvent("facelessBaneHealthChange")
function facelessBaneHealthChange.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
    local now = os.time()
    if now > activatedUntil then
        return 0, primaryType, 0, secondaryType
    end
    return primaryDamage, primaryType, secondaryDamage, secondaryType
end
facelessBaneHealthChange:register()

local facelessBaneDeath = CreatureEvent("facelessBaneDeath")
function facelessBaneDeath.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
    activatedUntil = 0
    resetTiles()
    return true
end
facelessBaneDeath:register()
Thanks bro, I tested it here and it seems that the monster is always immortal and the tiles are not resetting
 
Thanks bro, I tested it here and it seems that the monster is always immortal and the tiles are not resetting
There was a typo on line 48. I've updated the above code...
...or change it yourself to:
Lua:
activatedUntil = now + 60

If it still doesn't work, I will test it myself and get it working.
 
There was a typo on line 48. I've updated the above code...
...or change it yourself to:
Lua:
activatedUntil = now + 60

If it still doesn't work, I will test it myself and get it working.
It still doesn't work, the boss remains immortal when passing through the tiles and the tiles are not resetting
 
It still doesn't work, the boss remains immortal when passing through the tiles and the tiles are not resetting
I probably missed something easy in the logic, I'll setup a quick test now and fix it
Post automatically merged:

This is working perfectly fine for me! Also keep in mind that this script is not configured to have multiple bosses, so only ever have one boss on the map.
Lua:
local config = {
    activatedDuration = 60 --how many seconds for mortality (can be attacked)
    tileActionId = 15434,
    tiles = {
        {pos = Position(32304, 31955, 7)},
        {pos = Position(32305, 31955, 7)},
        {pos = Position(32306, 31955, 7)},
        {pos = Position(32307, 31955, 7)},
        {pos = Position(32308, 31955, 7)},
        {pos = Position(32309, 31955, 7)},
        {pos = Position(32310, 31955, 7)},
        {pos = Position(32311, 31955, 7)},
        {pos = Position(32312, 31955, 7)},
        {pos = Position(32313, 31955, 7)},
        {pos = Position(32314, 31955, 7)},
        {pos = Position(32315, 31955, 7)},
        {pos = Position(32316, 31955, 7)}
    }
}

local activatedUntil = 0

function resetTiles()
    for _, tile in ipairs(config.tiles) do
        tile.walked = false
    end
end

local moveevent = MoveEvent()
function moveevent.onStepIn(creature, item, position, fromPosition)

    local now = os.time()
    if now < activatedUntil then
        return true
    end

    local tilesWalked = 0
    for _, tile in ipairs(config.tiles) do
        if tile.pos == position then
            tile.walked = true
        end
     
        if tile.walked then
            tilesWalked = tilesWalked + 1
        end
    end
 
    if tilesWalked == 13 then
        activatedUntil = now + config.activatedDuration
        resetTiles()
    end
    return true
end
moveevent:aid(config.tileActionId)
moveevent:register()

local facelessBaneHealthChange = CreatureEvent("facelessBaneHealthChange")
function facelessBaneHealthChange.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
    local now = os.time()
    if now > activatedUntil then
        return 0, primaryType, 0, secondaryType
    end
    return primaryDamage, primaryType, secondaryDamage, secondaryType
end
facelessBaneHealthChange:register()

local facelessBaneDeath = CreatureEvent("facelessBaneDeath")
function facelessBaneDeath.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
    activatedUntil = 0
    resetTiles()
    return true
end
facelessBaneDeath:register()
 
Last edited:
Solution
I probably missed something easy in the logic, I'll setup a quick test now and fix it
Post automatically merged:

This is working perfectly fine for me! Also keep in mind that this script is not configured to have multiple bosses, so only ever have one boss on the map.
Lua:
local config = {
    tileActionId = 15434,
    tiles = {
        {pos = Position(32304, 31955, 7)},
        {pos = Position(32305, 31955, 7)},
        {pos = Position(32306, 31955, 7)},
        {pos = Position(32307, 31955, 7)},
        {pos = Position(32308, 31955, 7)},
        {pos = Position(32309, 31955, 7)},
        {pos = Position(32310, 31955, 7)},
        {pos = Position(32311, 31955, 7)},
        {pos = Position(32312, 31955, 7)},
        {pos = Position(32313, 31955, 7)},
        {pos = Position(32314, 31955, 7)},
        {pos = Position(32315, 31955, 7)},
        {pos = Position(32316, 31955, 7)}
    }
}

local activatedUntil = 0

function resetTiles()
    for _, tile in ipairs(config.tiles) do
        tile.walked = false
    end
end

local moveevent = MoveEvent()
function moveevent.onStepIn(creature, item, position, fromPosition)

    local now = os.time()
    if now < activatedUntil then
        return true
    end

    local tilesWalked = 0
    for _, tile in ipairs(config.tiles) do
        if tile.pos == position then
            tile.walked = true
        end
     
        if tile.walked then
            tilesWalked = tilesWalked + 1
        end
    end
 
    if tilesWalked == 13 then
        activatedUntil = now + 60
        resetTiles()
    end
    return true
end
moveevent:aid(config.tileActionId)
moveevent:register()

local facelessBaneHealthChange = CreatureEvent("facelessBaneHealthChange")
function facelessBaneHealthChange.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
    local now = os.time()
    if now > activatedUntil then
        return 0, primaryType, 0, secondaryType
    end
    return primaryDamage, primaryType, secondaryDamage, secondaryType
end
facelessBaneHealthChange:register()

local facelessBaneDeath = CreatureEvent("facelessBaneDeath")
function facelessBaneDeath.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
    activatedUntil = 0
    resetTiles()
    return true
end
facelessBaneDeath:register()
Perfect bro, thxxx
 
i dont get it at all this script the idea of it,, can someone explain this idea to me ?
Just watch the video.... the boss is immortal at the start. You have to walk on all 13 tiles which then allows you attack the boss for 60 seconds. After 60 seconds, the boss becomes immortal again.
 
Just watch the video.... the boss is immortal at the start. You have to walk on all 13 tiles which then allows you attack the boss for 60 seconds. After 60 seconds, the boss becomes immortal again.
i did watch it, tho i wasnt realizing what happening... Hmmm , okey, thats pretty nice idea that can be used in nice ways, thanks for explaining
 
Back
Top