local raidBossInformation = {
{
dayToSpawn = "Monday",
position = Position(27, 38, 14),
monsterName = "Boss Madareth",
respawnTime = 1, -- hours
messageOnSpawn = "Boss Madareth is now ... Go kill Him.",
messageOnDeath = "Boss Madareth has been defeated, the Boss will reveal himself in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Sunday",
position = Position(37, 98, 15),
monsterName = "Boss Dipthrah",
respawnTime = 1, -- hours
messageOnSpawn = "Boss Dipthrah is now ... Go kill Him.",
messageOnDeath = "Boss Dipthrah has been defeated, the Boss will reveal himself in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Monday",
position = Position(7742, 85, 7),
monsterName = "Fire Stone",
respawnTime = 4, -- hours
messageOnSpawn = "Fire Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Fire Stone has been defeated, the Stone will reveal himself in Raids in 4 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Monday",
position = Position(7716, 81, 7),
monsterName = "Metin Stone",
respawnTime = 1, -- hours
messageOnSpawn = "Metin Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Metin Stone has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Monday",
position = Position(7713, 47, 7),
monsterName = "The Looting Boss",
respawnTime = 2, -- hours
messageOnSpawn = "The Looting Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "The Looting Boss has been defeated, the Stone will reveal himself in Raids in 2 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Monday",
position = Position(7736, 40, 7),
monsterName = "horrorcore",
respawnTime = 1, -- hours
messageOnSpawn = "Horrorcore Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Horrorcore Boss has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Monday",
position = Position(7745, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Monday",
position = Position(7753, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Tuesday",
position = Position(7742, 85, 7),
monsterName = "Icy Stone",
respawnTime = 4, -- hours
messageOnSpawn = "Icy Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Icy Stone has been defeated, the Stone will reveal himself in Raids in 4 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Tuesday",
position = Position(7716, 81, 7),
monsterName = "Metin Stone",
respawnTime = 1, -- hours
messageOnSpawn = "Metin Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Metin Stone has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Tuesday",
position = Position(7713, 47, 7),
monsterName = "The Looting Boss",
respawnTime = 2, -- hours
messageOnSpawn = "The Looting Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "The Looting Boss has been defeated, the Stone will reveal himself in Raids in 2 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Tuesday",
position = Position(7736, 40, 7),
monsterName = "horrorcore",
respawnTime = 1, -- hours
messageOnSpawn = "Horrorcore Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Horrorcore Boss has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Tuesday",
position = Position(7745, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Tuesday",
position = Position(7753, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Wednesday",
position = Position(7742, 85, 7),
monsterName = "Earth Stone",
respawnTime = 4, -- hours
messageOnSpawn = "Earth Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Earth Stone has been defeated, the Stone will reveal himself in Raids in 4 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Wednesday",
position = Position(7716, 81, 7),
monsterName = "Metin Stone",
respawnTime = 1, -- hours
messageOnSpawn = "Metin Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Metin Stone has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Wednesday",
position = Position(7713, 47, 7),
monsterName = "The Looting Boss",
respawnTime = 2, -- hours
messageOnSpawn = "The Looting Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "The Looting Boss has been defeated, the Stone will reveal himself in Raids in 2 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Wednesday",
position = Position(7736, 40, 7),
monsterName = "horrorcore",
respawnTime = 1, -- hours
messageOnSpawn = "Horrorcore Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Horrorcore Boss has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Wednesday",
position = Position(7745, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Wednesday",
position = Position(7753, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Thursday",
position = Position(7742, 85, 7),
monsterName = "Wind Stone",
respawnTime = 4, -- hours
messageOnSpawn = "Wind Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Wind Stone has been defeated, the Stone will reveal himself in Raids in 4 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Thursday",
position = Position(7716, 81, 7),
monsterName = "Metin Stone",
respawnTime = 1, -- hours
messageOnSpawn = "Metin Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Metin Stone has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Thursday",
position = Position(7713, 47, 7),
monsterName = "The Looting Boss",
respawnTime = 2, -- hours
messageOnSpawn = "The Looting Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "The Looting Boss has been defeated, the Stone will reveal himself in Raids in 2 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Thursday",
position = Position(7736, 40, 7),
monsterName = "horrorcore",
respawnTime = 1, -- hours
messageOnSpawn = "Horrorcore Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Horrorcore Boss has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Thursday",
position = Position(7745, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Thursday",
position = Position(7753, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Friday",
position = Position(7742, 85, 7),
monsterName = "Fire Stone",
respawnTime = 4, -- hours
messageOnSpawn = "Fire Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Fire Stone has been defeated, the Stone will reveal himself in Raids in 4 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Friday",
position = Position(7716, 81, 7),
monsterName = "Metin Stone",
respawnTime = 1, -- hours
messageOnSpawn = "Metin Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Metin Stone has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Friday",
position = Position(7713, 47, 7),
monsterName = "The Looting Boss",
respawnTime = 2, -- hours
messageOnSpawn = "The Looting Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "The Looting Boss has been defeated, the Stone will reveal himself in Raids in 2 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Friday",
position = Position(7736, 40, 7),
monsterName = "horrorcore",
respawnTime = 1, -- hours
messageOnSpawn = "Horrorcore Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Horrorcore Boss has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Friday",
position = Position(7745, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Friday",
position = Position(7753, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Saturday",
position = Position(7742, 85, 7),
monsterName = "Earth Stone",
respawnTime = 4, -- hours
messageOnSpawn = "Earth Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Earth Stone has been defeated, the Stone will reveal himself in Raids in 4 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Saturday",
position = Position(7716, 81, 7),
monsterName = "Metin Stone",
respawnTime = 1, -- hours
messageOnSpawn = "Metin Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Metin Stone has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Saturday",
position = Position(7713, 47, 7),
monsterName = "The Looting Boss",
respawnTime = 2, -- hours
messageOnSpawn = "The Looting Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "The Looting Boss has been defeated, the Stone will reveal himself in Raids in 2 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Saturday",
position = Position(7736, 40, 7),
monsterName = "horrorcore",
respawnTime = 1, -- hours
messageOnSpawn = "Horrorcore Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Horrorcore Boss has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Saturday",
position = Position(7745, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Saturday",
position = Position(7753, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
------ Pits of Inferno
{
dayToSpawn = "Sunday",
position = Position(7742, 85, 7),
monsterName = "Metin of Darkness",
respawnTime = 4, -- hours
messageOnSpawn = "Metin of Darkness is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Metin of Darkness has been defeated, the Stone will reveal himself in Raids in 4 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Sunday",
position = Position(7716, 81, 7),
monsterName = "Metin Stone",
respawnTime = 1, -- hours
messageOnSpawn = "Metin Stone is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Metin Stone has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Sunday",
position = Position(7713, 47, 7),
monsterName = "The Looting Boss",
respawnTime = 2, -- hours
messageOnSpawn = "The Looting Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "The Looting Boss has been defeated, the Stone will reveal himself in Raids in 2 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Sunday",
position = Position(7736, 40, 7),
monsterName = "horrorcore",
respawnTime = 1, -- hours
messageOnSpawn = "Horrorcore Boss is now in Raids Teleport... Go kill Him.",
messageOnDeath = "Horrorcore Boss has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Sunday",
position = Position(7745, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
{
dayToSpawn = "Sunday",
position = Position(7753, 36, 7),
monsterName = "baiak pancada",
respawnTime = 1, -- hours
messageOnSpawn = "StongExp is now in Raids Teleport... Go kill Him.",
messageOnDeath = "StongExp has been defeated, the Stone will reveal himself in Raids in 1 hours check time say !boss.",
creatureId = 0, -- don't touch
lastKilledTime = 0 -- don't touch
},
}
local day -- don't touch
local function respawnBoss(index)
local spawn = raidBossInformation[index]
local monster = Game.createMonster(spawn.monsterName, spawn.position, false, true)
if monster then
spawn.creatureId = monster:getId()
monster:setMasterPosition(spawn.position)
monster:registerEvent("raidBossDeath1")
Game.broadcastMessage(spawn.messageOnSpawn, MESSAGE_EVENT_ADVANCE)
else
print("Failed to respawn index: " .. index .. " -> " .. spawn.monsterName .. "")
end
end
local globalevent = GlobalEvent("raidBosses1")
function globalevent.onStartup()
day = os.date('%A')
for index, spawn in pairs(raidBossInformation) do
if spawn.dayToSpawn == day or spawn.dayToSpawn == "Any" then
local monster = Game.createMonster(spawn.monsterName, spawn.position, false, true)
if monster then
spawn.creatureId = monster:getId()
monster:setMasterPosition(spawn.position)
monster:registerEvent("raidBossDeath1")
else
print("Failed to spawn index: " .. index .. " -> " .. spawn.monsterName .. "")
end
end
end
return true
end
globalevent:register()
local creatureevent = CreatureEvent("raidBossDeath1")
function creatureevent.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
local bossId = creature:getId()
for i = 1, #raidBossInformation do
if raidBossInformation[i].creatureId == bossId then
raidBossInformation[i].creatureId = 0
raidBossInformation[i].lastKilledTime = os.time()
Game.broadcastMessage(raidBossInformation[i].messageOnDeath, MESSAGE_EVENT_ADVANCE)
addEvent(respawnBoss, 1000 * 60 * 60 * raidBossInformation[i].respawnTime, i)
return true
end
end
print("Something went wrong in raidBossDeath script.")
return true
end
creatureevent:register()
local talk = TalkAction("/boss", "!boss")
function talk.onSay(player, words, param)
local text = ""
for i = 1, #raidBossInformation do
if text ~= "" then
text = text .. "\n"
end
text = text .. raidBossInformation[i].monsterName
text = text .. " " .. (raidBossInformation[i].dayToSpawn == "Any" and " [" .. day .. "]" or " [" .. raidBossInformation[i].dayToSpawn .. "]") .. "\n "
if raidBossInformation[i].creatureId == 0 then
if raidBossInformation[i].lastKilledTime == 0 then
text = text .. "Unavailable"
else
text = text .. "Dead -> respawning in " .. os.date("!%Hh %Mm %Ss", (raidBossInformation[i].lastKilledTime + (60 * 60 * raidBossInformation[i].respawnTime)) - os.time())
end
else
text = text .. "Alive"
end
end
player:showTextDialog(1953, text, false)
return false
end
talk:separator(" ")
talk:register()