From c2766ace509fc91224ae74ea84c88d1422b63820 Mon Sep 17 00:00:00 2001 From: Elson Costa Date: Thu, 22 Feb 2024 09:57:01 -0300 Subject: [PATCH] added and fixed some bosses and npcs. --- .../monster/bosses/elvira_hammerthrust.lua | 109 ++++++++++++++++++ .../monster/bosses/jesse_the_wicked.lua | 16 +-- .../monster/bosses/mornenion.lua | 108 +++++++++++++++++ .../monster/bosses/robby_the_reckless.lua | 16 +-- .../ferumbras_ascendant/bosses/mazoran.lua | 2 +- .../quests/the_inquisition/annihilon.lua | 2 +- .../quests/the_inquisition/golgordan.lua | 2 +- .../quests/the_inquisition/hellgorak.lua | 2 +- .../quests/the_inquisition/madareth.lua | 2 +- .../quests/the_inquisition/the_count.lua | 2 +- .../quests/the_inquisition/ungreez.lua | 2 +- .../quests/the_inquisition/zugurosh.lua | 2 +- data-otservbr-global/npc/hawkhurst.lua | 8 +- data-otservbr-global/npc/hawkhurst_ingol.lua | 8 +- data-otservbr-global/npc/tonar.lua | 77 +++++++++++++ data-otservbr-global/npc/tonar_oskayaat.lua | 77 +++++++++++++ 16 files changed, 395 insertions(+), 40 deletions(-) create mode 100644 data-otservbr-global/monster/bosses/elvira_hammerthrust.lua create mode 100644 data-otservbr-global/monster/bosses/mornenion.lua create mode 100644 data-otservbr-global/npc/tonar.lua create mode 100644 data-otservbr-global/npc/tonar_oskayaat.lua diff --git a/data-otservbr-global/monster/bosses/elvira_hammerthrust.lua b/data-otservbr-global/monster/bosses/elvira_hammerthrust.lua new file mode 100644 index 00000000000..72d497ae312 --- /dev/null +++ b/data-otservbr-global/monster/bosses/elvira_hammerthrust.lua @@ -0,0 +1,109 @@ +local mType = Game.createMonsterType("Elvira Hammerthrust") +local monster = {} + +monster.description = "Elvira Hammerthrust" +monster.experience = 165 +monster.outfit = { + lookType = 70, + lookHead = 0, + lookBody = 0, + lookLegs = 0, + lookFeet = 0, + lookAddons = 0, + lookMount = 0, +} + +monster.bosstiary = { + bossRaceId = 766, + bossRace = RARITY_NEMESIS, +} + +monster.health = 245 +monster.maxHealth = 245 +monster.race = "blood" +monster.corpse = 6013 +monster.speed = 103 +monster.manaCost = 0 + +monster.changeTarget = { + interval = 4000, + chance = 10, +} + +monster.strategiesTarget = { + nearest = 70, + damage = 20, + random = 10, +} + +monster.flags = { + summonable = false, + attackable = true, + hostile = true, + convinceable = false, + pushable = false, + rewardBoss = false, + illusionable = true, + canPushItems = true, + canPushCreatures = true, + staticAttackChance = 90, + targetDistance = 1, + runHealth = 0, + healthHidden = false, + isBlockable = false, + canWalkOnEnergy = false, + canWalkOnFire = false, + canWalkOnPoison = false, +} + +monster.light = { + level = 0, + color = 0, +} + +monster.voices = { + interval = 5000, + chance = 10, + { text = "Didn't think a dwarf girl could be so pretty and strong at the same time, did you?", yell = false }, + { text = "Hail no one except for me!", yell = false }, + { text = "You won't get this bag, I worked hard for this!", yell = false }, + { text = "Keep your hands off!", yell = false }, + { text = "How did you find us?!", yell = false }, +} + +monster.loot = { + { name = "bag with stolen gold", chance = 100000 }, + { name = "platinum coin", chance = 75000, maxCount = 100 }, +} + +monster.attacks = { + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -140 }, +} + +monster.defenses = { + defense = 30, + armor = 15, + mitigation = 1.02, +} + +monster.elements = { + { type = COMBAT_PHYSICALDAMAGE, percent = 20 }, + { type = COMBAT_ENERGYDAMAGE, percent = 0 }, + { type = COMBAT_EARTHDAMAGE, percent = 20 }, + { type = COMBAT_FIREDAMAGE, percent = -5 }, + { type = COMBAT_LIFEDRAIN, percent = 0 }, + { type = COMBAT_MANADRAIN, percent = 0 }, + { type = COMBAT_DROWNDAMAGE, percent = 0 }, + { type = COMBAT_ICEDAMAGE, percent = 0 }, + { type = COMBAT_HOLYDAMAGE, percent = 0 }, + { type = COMBAT_DEATHDAMAGE, percent = -5 }, +} + +monster.immunities = { + { type = "paralyze", condition = false }, + { type = "outfit", condition = false }, + { type = "invisible", condition = true }, + { type = "bleed", condition = false }, +} + +mType:register(monster) diff --git a/data-otservbr-global/monster/bosses/jesse_the_wicked.lua b/data-otservbr-global/monster/bosses/jesse_the_wicked.lua index e4052189eaf..2d5091241d5 100644 --- a/data-otservbr-global/monster/bosses/jesse_the_wicked.lua +++ b/data-otservbr-global/monster/bosses/jesse_the_wicked.lua @@ -43,7 +43,7 @@ monster.flags = { hostile = true, convinceable = false, pushable = false, - rewardBoss = true, + rewardBoss = false, illusionable = false, canPushItems = true, canPushCreatures = false, @@ -107,18 +107,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType.onThink = function(monster, interval) end - -mType.onAppear = function(monster, creature) - if monster:getType():isRewardBoss() then - monster:setReward(true) - end -end - -mType.onDisappear = function(monster, creature) end - -mType.onMove = function(monster, creature, fromPosition, toPosition) end - -mType.onSay = function(monster, creature, type, message) end - mType:register(monster) diff --git a/data-otservbr-global/monster/bosses/mornenion.lua b/data-otservbr-global/monster/bosses/mornenion.lua new file mode 100644 index 00000000000..3cc1167b3f6 --- /dev/null +++ b/data-otservbr-global/monster/bosses/mornenion.lua @@ -0,0 +1,108 @@ +local mType = Game.createMonsterType("Mornenion") +local monster = {} + +monster.description = "Mornenion" +monster.experience = 115 +monster.outfit = { + lookType = 64, + lookHead = 0, + lookBody = 0, + lookLegs = 0, + lookFeet = 0, + lookAddons = 0, + lookMount = 0, +} + +monster.bosstiary = { + bossRaceId = 765, + bossRace = RARITY_NEMESIS, +} + +monster.health = 190 +monster.maxHealth = 190 +monster.race = "blood" +monster.corpse = 6012 +monster.speed = 110 +monster.manaCost = 0 + +monster.changeTarget = { + interval = 4000, + chance = 10, +} + +monster.strategiesTarget = { + nearest = 100, +} + +monster.flags = { + summonable = false, + attackable = true, + hostile = true, + convinceable = false, + pushable = false, + rewardBoss = false, + illusionable = false, + canPushItems = true, + canPushCreatures = false, + staticAttackChance = 90, + targetDistance = 4, + runHealth = 0, + healthHidden = false, + isBlockable = false, + canWalkOnEnergy = true, + canWalkOnFire = true, + canWalkOnPoison = true, +} + +monster.light = { + level = 0, + color = 0, +} + +monster.voices = { + interval = 5000, + chance = 10, + { text = "Come on, you don't really need this. Just let me go.", yell = false }, + { text = "Let us leave safely and maybe we'll give you a few coins.", yell = false }, + { text = "That cowardish dwarven bank keeper ran when he saw the three of us.", yell = false }, + { text = "You humans have enough to spare. We live in poverty.", yell = false }, +} + +monster.loot = { + { name = "bag with stolen gold", chance = 100000 }, + { name = "platinum coin", chance = 75000, maxCount = 100 }, +} + +monster.attacks = { + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -30 }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -80, range = 7, shootEffect = CONST_ANI_ARROW, target = false }, +} + +monster.defenses = { + defense = 10, + armor = 7, + mitigation = 0.46, + { name = "combat", interval = 5000, chance = 7, type = COMBAT_HEALING, minDamage = 25, maxDamage = 35, effect = CONST_ME_MAGIC_BLUE, target = false }, +} + +monster.elements = { + { type = COMBAT_PHYSICALDAMAGE, percent = 0 }, + { type = COMBAT_ENERGYDAMAGE, percent = 0 }, + { type = COMBAT_EARTHDAMAGE, percent = 0 }, + { type = COMBAT_FIREDAMAGE, percent = 0 }, + { type = COMBAT_LIFEDRAIN, percent = 0 }, + { type = COMBAT_MANADRAIN, percent = 0 }, + { type = COMBAT_DROWNDAMAGE, percent = 0 }, + { type = COMBAT_ICEDAMAGE, percent = 0 }, + { type = COMBAT_HOLYDAMAGE, percent = 0 }, + { type = COMBAT_DEATHDAMAGE, percent = 0 }, +} + +monster.immunities = { + { type = "paralyze", condition = false }, + { type = "outfit", condition = false }, + { type = "invisible", condition = true }, + { type = "bleed", condition = false }, +} + +mType:register(monster) diff --git a/data-otservbr-global/monster/bosses/robby_the_reckless.lua b/data-otservbr-global/monster/bosses/robby_the_reckless.lua index 0eb6fd3d4c3..bc1053c1f2c 100644 --- a/data-otservbr-global/monster/bosses/robby_the_reckless.lua +++ b/data-otservbr-global/monster/bosses/robby_the_reckless.lua @@ -43,7 +43,7 @@ monster.flags = { hostile = true, convinceable = false, pushable = false, - rewardBoss = true, + rewardBoss = false, illusionable = false, canPushItems = true, canPushCreatures = false, @@ -106,18 +106,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType.onThink = function(monster, interval) end - -mType.onAppear = function(monster, creature) - if monster:getType():isRewardBoss() then - monster:setReward(true) - end -end - -mType.onDisappear = function(monster, creature) end - -mType.onMove = function(monster, creature, fromPosition, toPosition) end - -mType.onSay = function(monster, creature, type, message) end - mType:register(monster) diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua index 1a25d435223..9bc02481292 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua @@ -47,7 +47,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/the_inquisition/annihilon.lua b/data-otservbr-global/monster/quests/the_inquisition/annihilon.lua index 26013b74ece..ab090635985 100644 --- a/data-otservbr-global/monster/quests/the_inquisition/annihilon.lua +++ b/data-otservbr-global/monster/quests/the_inquisition/annihilon.lua @@ -47,7 +47,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/the_inquisition/golgordan.lua b/data-otservbr-global/monster/quests/the_inquisition/golgordan.lua index 59a74148ed6..0b1f03bbb04 100644 --- a/data-otservbr-global/monster/quests/the_inquisition/golgordan.lua +++ b/data-otservbr-global/monster/quests/the_inquisition/golgordan.lua @@ -47,7 +47,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/the_inquisition/hellgorak.lua b/data-otservbr-global/monster/quests/the_inquisition/hellgorak.lua index 79209cb8560..000f46156f5 100644 --- a/data-otservbr-global/monster/quests/the_inquisition/hellgorak.lua +++ b/data-otservbr-global/monster/quests/the_inquisition/hellgorak.lua @@ -47,7 +47,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/the_inquisition/madareth.lua b/data-otservbr-global/monster/quests/the_inquisition/madareth.lua index 66caf4329f5..91201479504 100644 --- a/data-otservbr-global/monster/quests/the_inquisition/madareth.lua +++ b/data-otservbr-global/monster/quests/the_inquisition/madareth.lua @@ -47,7 +47,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/the_inquisition/the_count.lua b/data-otservbr-global/monster/quests/the_inquisition/the_count.lua index 61433ce02b8..48951c81379 100644 --- a/data-otservbr-global/monster/quests/the_inquisition/the_count.lua +++ b/data-otservbr-global/monster/quests/the_inquisition/the_count.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/the_inquisition/ungreez.lua b/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua index f2308c8c9a3..ee7a79647d5 100644 --- a/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua +++ b/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua @@ -42,7 +42,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/the_inquisition/zugurosh.lua b/data-otservbr-global/monster/quests/the_inquisition/zugurosh.lua index fedf47e5fe1..990d93c1324 100644 --- a/data-otservbr-global/monster/quests/the_inquisition/zugurosh.lua +++ b/data-otservbr-global/monster/quests/the_inquisition/zugurosh.lua @@ -47,7 +47,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/npc/hawkhurst.lua b/data-otservbr-global/npc/hawkhurst.lua index c94b7bf0c39..cac78d2e8c1 100644 --- a/data-otservbr-global/npc/hawkhurst.lua +++ b/data-otservbr-global/npc/hawkhurst.lua @@ -23,6 +23,12 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "There's a storm brewing." }, +} + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -52,7 +58,7 @@ end -- Travel local travelKeyword = keywordHandler:addKeyword({ "passage" }, StdModule.say, { npcHandler = npcHandler, text = "Ye' want a passage to the blasted isle, right? {Yes} or {no}?" }) -travelKeyword:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, cost = 400, destination = Position(33710, 32602, 6) }) +travelKeyword:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, cost = 400, text = "All Hand Hoy!", destination = Position(33710, 32602, 6) }) travelKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "We would like to serve you some time.", reset = true }) npcHandler:setMessage(MESSAGE_GREET, "Ahoy, matey! Lookin' for a {passage}, eh.") diff --git a/data-otservbr-global/npc/hawkhurst_ingol.lua b/data-otservbr-global/npc/hawkhurst_ingol.lua index 4f67ceafb51..155edef40c8 100644 --- a/data-otservbr-global/npc/hawkhurst_ingol.lua +++ b/data-otservbr-global/npc/hawkhurst_ingol.lua @@ -23,6 +23,12 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "There's a storm brewing." }, +} + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -52,7 +58,7 @@ end -- Travel local travelKeyword = keywordHandler:addKeyword({ "passage" }, StdModule.say, { npcHandler = npcHandler, text = "Ye' want a passage back to cormaya? {Yes} or {no}." }) -travelKeyword:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, cost = 400, destination = Position(33356, 31983, 7) }) +travelKeyword:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, cost = 400, text = "All Hand Hoy!", destination = Position(33356, 31983, 7) }) travelKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "We would like to serve you some time.", reset = true }) npcHandler:setMessage(MESSAGE_GREET, "Ahoy, matey! Lookin' for a {passage}, eh.") diff --git a/data-otservbr-global/npc/tonar.lua b/data-otservbr-global/npc/tonar.lua new file mode 100644 index 00000000000..e13595e411f --- /dev/null +++ b/data-otservbr-global/npc/tonar.lua @@ -0,0 +1,77 @@ +local internalNpcName = "Tonar" +local npcType = Game.createNpcType(internalNpcName) +local npcConfig = {} + +npcConfig.name = internalNpcName +npcConfig.description = internalNpcName + +npcConfig.health = 100 +npcConfig.maxHealth = npcConfig.health +npcConfig.walkInterval = 2000 +npcConfig.walkRadius = 2 + +npcConfig.outfit = { + lookType = 146, + lookHead = 0, + lookBody = 66, + lookLegs = 124, + lookFeet = 0, + lookAddons = 2, +} + +npcConfig.flags = { + floorchange = false, +} + +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "What a beautiful day for a little boat trip." }, +} + +local keywordHandler = KeywordHandler:new() +local npcHandler = NpcHandler:new(keywordHandler) + +npcType.onThink = function(npc, interval) + npcHandler:onThink(npc, interval) +end + +npcType.onAppear = function(npc, creature) + npcHandler:onAppear(npc, creature) +end + +npcType.onDisappear = function(npc, creature) + npcHandler:onDisappear(npc, creature) +end + +npcType.onMove = function(npc, creature, fromPosition, toPosition) + npcHandler:onMove(npc, creature, fromPosition, toPosition) +end + +npcType.onSay = function(npc, creature, type, message) + npcHandler:onSay(npc, creature, type, message) +end + +npcType.onCloseChannel = function(npc, creature) + npcHandler:onCloseChannel(npc, creature) +end + +-- Travel +local function addTravelKeyword(keyword, text, cost, destination, action, condition) + if condition then + keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = "You are not ready yet." }, condition) + end + + local travelKeyword = keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = text, cost = cost, discount = "postman" }) + travelKeyword:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, text = "Alright, off we go!", cost = cost, discount = "postman", destination = destination }, nil, action) + travelKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "We would like to serve you some time.", reset = true }) +end + +addTravelKeyword("passage", "A passage to Oskayaat? Shall we cast off?", 0, Position(33070, 32916, 7)) + +npcHandler:setMessage(MESSAGE_GREET, "Welcome, Sir.") + +npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) + +-- npcType registering the npcConfig table +npcType:register(npcConfig) diff --git a/data-otservbr-global/npc/tonar_oskayaat.lua b/data-otservbr-global/npc/tonar_oskayaat.lua new file mode 100644 index 00000000000..50073bb5818 --- /dev/null +++ b/data-otservbr-global/npc/tonar_oskayaat.lua @@ -0,0 +1,77 @@ +local internalNpcName = "Tonar" +local npcType = Game.createNpcType("Tonar Oskayaat") +local npcConfig = {} + +npcConfig.name = internalNpcName +npcConfig.description = internalNpcName + +npcConfig.health = 100 +npcConfig.maxHealth = npcConfig.health +npcConfig.walkInterval = 2000 +npcConfig.walkRadius = 2 + +npcConfig.outfit = { + lookType = 146, + lookHead = 0, + lookBody = 66, + lookLegs = 124, + lookFeet = 0, + lookAddons = 2, +} + +npcConfig.flags = { + floorchange = false, +} + +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "I don't feel safe here ... I hope we can return to Ankrahmun soon." }, +} + +local keywordHandler = KeywordHandler:new() +local npcHandler = NpcHandler:new(keywordHandler) + +npcType.onThink = function(npc, interval) + npcHandler:onThink(npc, interval) +end + +npcType.onAppear = function(npc, creature) + npcHandler:onAppear(npc, creature) +end + +npcType.onDisappear = function(npc, creature) + npcHandler:onDisappear(npc, creature) +end + +npcType.onMove = function(npc, creature, fromPosition, toPosition) + npcHandler:onMove(npc, creature, fromPosition, toPosition) +end + +npcType.onSay = function(npc, creature, type, message) + npcHandler:onSay(npc, creature, type, message) +end + +npcType.onCloseChannel = function(npc, creature) + npcHandler:onCloseChannel(npc, creature) +end + +-- Travel +local function addTravelKeyword(keyword, text, cost, destination, action, condition) + if condition then + keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = "You are not ready yet." }, condition) + end + + local travelKeyword = keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = text, cost = cost, discount = "postman" }) + travelKeyword:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, text = "Alright, off we go!", cost = cost, discount = "postman", destination = destination }, nil, action) + travelKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "We would like to serve you some time.", reset = true }) +end + +addTravelKeyword("passage", "A passage to Ankrahmun? Shall we cast off?", 0, Position(33182, 32883, 7)) + +npcHandler:setMessage(MESSAGE_GREET, "Welcome back, Sir.") + +npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) + +-- npcType registering the npcConfig table +npcType:register(npcConfig)