diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua index 05e436339b9..f46efa303a8 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua @@ -38,7 +38,7 @@ monster.flags = { hostile = true, convinceable = false, pushable = false, - rewardBoss = true, + rewardBoss = false, illusionable = false, canPushItems = true, canPushCreatures = true, diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua index 15adaa5ef7f..f3539476809 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua @@ -38,7 +38,7 @@ monster.flags = { hostile = true, convinceable = false, pushable = false, - rewardBoss = true, + rewardBoss = false, illusionable = false, canPushItems = true, canPushCreatures = true, diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/thorn_knight_lever.lua b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/thorn_knight_lever.lua index 2a7811d3423..c62514fbaf3 100644 --- a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/thorn_knight_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/thorn_knight_lever.lua @@ -68,7 +68,7 @@ function forgottenKnowledgeThorn.onUse(player, item, fromPosition, target, toPos return true end lever:teleportPlayers() - lever:setCooldownAllPlayers(config.bossName, os.time() + config.timeToFightAgain * 3600) + lever:setCooldownAllPlayers("The Enraged Thorn Knight", os.time() + config.timeToFightAgain * 3600) addEvent(function() local old_players = lever:getInfoPositions() spec:clearCreaturesCache() diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_guardian_lever.lua b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_guardian_lever.lua index f4d42e52c45..832e42e2c6c 100644 --- a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_guardian_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_guardian_lever.lua @@ -14,12 +14,6 @@ local config = { { bossPosition = Position(32975, 31664, 13), bossName = "The Freezing Time Guardian" }, { bossPosition = Position(32980, 31664, 13), bossName = "The Blazing Time Guardian" }, }, - monsters = { - { cosmic = "cosmic energy prism a invu", pos = Position(32801, 32827, 14) }, - { cosmic = "cosmic energy prism b invu", pos = Position(32798, 32827, 14) }, - { cosmic = "cosmic energy prism c invu", pos = Position(32803, 32826, 14) }, - { cosmic = "cosmic energy prism d invu", pos = Position(32796, 32826, 14) }, - }, specPos = { from = Position(32967, 31654, 13), to = Position(32989, 31677, 14), diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/lloyd_preparedeath.lua b/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/lloyd_preparedeath.lua index 6296763be81..e00624aa53d 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/lloyd_preparedeath.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/lloyd_preparedeath.lua @@ -9,15 +9,19 @@ local function revertLloyd(prismId) local lloydTile = Tile(Position(32799, 32826, 14)) if lloydTile then local lloyd = lloydTile:getTopCreature() - lloyd:teleportTo(Position(32799, 32829, 14)) - lloyd:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + if lloyd then + lloyd:teleportTo(Position(32799, 32829, 14)) + lloyd:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + end end local tile = Tile(monsters[prismId].pos) if tile then - local creature = tile:getTopCreature() - if creature then - creature:remove() + local creatures = tile:getCreatures() + for _, creature in ipairs(creatures) do + if creature:isMonster() then + creature:remove() + end end Game.createMonster(monsters[prismId].cosmicInvu, Position(monsters[prismId].pos), true, true) end @@ -25,11 +29,6 @@ end local lloydPrepareDeath = CreatureEvent("LloydPrepareDeath") function lloydPrepareDeath.onPrepareDeath(creature, lastHitKiller, mostDamageKiller) - local targetMonster = creature:getMonster() - if not creature or not targetMonster then - return true - end - local prismCount = 1 for m = 1, #monsters do local cosmic = Tile(Position(monsters[m].pos)):getTopCreature() diff --git a/data-otservbr-global/scripts/creaturescripts/quests/killing_in_the_name_of/monster_kill.lua b/data-otservbr-global/scripts/creaturescripts/quests/killing_in_the_name_of/monster_kill.lua index 01b1648c25b..b2ba681d251 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/killing_in_the_name_of/monster_kill.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/killing_in_the_name_of/monster_kill.lua @@ -83,7 +83,6 @@ deathEvent:register() local serverstartup = GlobalEvent("KillingInTheNameOfMonsterDeathStartup") function serverstartup.onStartup() - logger.info("[KillingInTheNameOfMonsterDeathStartup] registering monsters") local monsters = Set({}, { insensitive = true }) for _, task in pairs(tasks.GrizzlyAdams) do monsters = monsters:union(task.creatures) diff --git a/data/scripts/reward_chest/boss_death.lua b/data/scripts/reward_chest/boss_death.lua index f3a80909c8f..1a979e945ab 100644 --- a/data/scripts/reward_chest/boss_death.lua +++ b/data/scripts/reward_chest/boss_death.lua @@ -14,7 +14,7 @@ function bossDeath.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUn -- Make sure it is a boss if monsterType and monsterType:isRewardBoss() then if not corpse.isContainer or not corpse:isContainer() then - if corpse.getId() then + if corpse.getId then logger.warn("[bossDeath.onDeath] Corpse (id: {}, name: {}) for reward boss {} is not a container.", corpse:getId(), corpse:getName(), creature:getName()) else logger.warn("[bossDeath.onDeath] Error to get corpseId from boss: {}", creature:getName())