• 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!

Raid with script

peteralto

Member
Joined
Nov 1, 2020
Messages
93
Solutions
1
Reaction score
19
How could I block this wall of energy so that it only pass when the Ferumbras raid is running?

1648426440652.png
 
Solution
E
Lua:
local ev = EventCallback

function ev.onSpawn(monster, position, startup, artificial)
    if monster:getName() == "Ferumbras" then
        Game.setStorageValue(key, value)
    end

    return true
end

ev:register(1)

but that will only work if you are using newest tfs with callback events
onStepIn Script.

Check for a globalStorage when raid is triggered.. or check ferumbrus location using getSpectators
 
onStepIn Script.

Check for a globalStorage when raid is triggered.. or check ferumbrus location using getSpectators
But how could I create a global storage when the raid starts? Everything is via XML, I don't know how to tell a LUA script that a raid is active.
 
But how could I create a global storage when the raid starts? Everything is via XML, I don't know how to tell a LUA script that a raid is active.
If it's the only ferumbrus that spawns / dies, then you can create a onSpawn function for ferumbrus, that changes the globalStorage, and an onDeath function that turns it back to -1.

Or use the second option of getSpectators
 
If it's the only ferumbrus that spawns / dies, then you can create a onSpawn function for ferumbrus, that changes the globalStorage, and an onDeath function that turns it back to -1.

Or use the second option of getSpectators
Do you have an example of a script to run when there is the spawn of a monster?
 
Lua:
local ev = EventCallback

function ev.onSpawn(monster, position, startup, artificial)
    if monster:getName() == "Ferumbras" then
        Game.setStorageValue(key, value)
    end

    return true
end

ev:register(1)

but that will only work if you are using newest tfs with callback events
 
Solution
Back
Top