ralke
(҂ ͠❛ ෴ ͡❛)ᕤ
Hi! I have the following configuration for my bosses, they raid on startUp and if they die, a creaturescript sends an addEvent with time, that defines in how much time the boss will spawn again.
here's the globalevent that spawns the monster onStartUp
and the creatureescript, if creature dies
The thing I need now, is a boss checker. This can be a talkaction, where you say !bosscheck and it should throw a list of avaible bosses on the map. Not sure which way is the best to achieve this:
a) Verify on the whole map if there's a creature with name "Ferumbras". Also do it for multiple monsters (Ghazbaran, Orshabaal, etc.).
b) Set a globalstorage on the globalevent and creaturescript, add it when the boss spawns, and remove it when the boss dies. Then call the storage via talkaction.
Both methods are actually suggestions, if u know any other better method please do it, I only need to achieve the boss checking. My actual boss list is Ghazbaran (Fridays and Saturdays), Orshabaal (Sundays and Mondays), and Ferumbras (Thursdays). If it also have the possibility of sending how much time is left to spawn, if the boss is killed, would be really amazing.
.
In advance, thanks a lot!
Regards
here's the globalevent that spawns the monster onStartUp
Lua:
local config = {
['Thursday'] = {
position = Position(1418, 1016, 4),
monsterName = "Ferumbras",
}
}
function onStartup()
local spawn = config[os.date('%A')]
if spawn then
local monster = Game.createMonster(spawn.monsterName, spawn.position, false, true)
if monster then
monster:setMasterPosition(spawn.position)
addEvent(Game.broadcastMessage, 10000, "The seals on old cidatel are glowing. Ferumbras has returned once more, stop him before its too late.", MESSAGE_EVENT_ADVANCE)
end
end
return true
end
and the creatureescript, if creature dies
Lua:
local function onRespawn(name, position)
local monster = Game.createMonster(name, position, false, true)
if monster then
position:sendMagicEffect(CONST_ME_TELEPORT)
end
end
function onDeath(monster, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified)
addEvent(onRespawn, 360 * 60 * 1000, monster:getName(), monster:getPosition())
addEvent(Game.broadcastMessage, 1000, "Ferumbras has been defeated, the mage master will reveal himself in the Citadel in 6 hours.", MESSAGE_EVENT_ADVANCE)
return true
end
The thing I need now, is a boss checker. This can be a talkaction, where you say !bosscheck and it should throw a list of avaible bosses on the map. Not sure which way is the best to achieve this:
a) Verify on the whole map if there's a creature with name "Ferumbras". Also do it for multiple monsters (Ghazbaran, Orshabaal, etc.).
b) Set a globalstorage on the globalevent and creaturescript, add it when the boss spawns, and remove it when the boss dies. Then call the storage via talkaction.
Both methods are actually suggestions, if u know any other better method please do it, I only need to achieve the boss checking. My actual boss list is Ghazbaran (Fridays and Saturdays), Orshabaal (Sundays and Mondays), and Ferumbras (Thursdays). If it also have the possibility of sending how much time is left to spawn, if the boss is killed, would be really amazing.
.
In advance, thanks a lot!
Regards