Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: full 20 years a cook quest #2669

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
06e18ef
feat: 20 Years a Cook quest
phacUFPE May 27, 2024
56aff83
Merge branch 'main' into phacUFPE/20-years-a-cook-quest
phacUFPE May 27, 2024
4aa16d4
Lua code format - (Stylua)
github-actions[bot] May 27, 2024
6500fc9
Merge branch 'phacUFPE/20-years-a-cook-quest' of https://github.com/o…
phacUFPE May 28, 2024
52606fe
feat: the rest of ratha mechanics
phacUFPE May 30, 2024
c708ddc
Lua code format - (Stylua)
github-actions[bot] May 30, 2024
28485bd
feat: complete the rest of ratha mechanics
phacUFPE May 30, 2024
4aec8ee
Merge branch 'phacUFPE/20-years-a-cook-quest' of https://github.com/o…
phacUFPE May 30, 2024
c872caf
Lua code format - (Stylua)
github-actions[bot] May 30, 2024
ecc40a1
feat: draccoon herald outfits
phacUFPE May 31, 2024
91b99d6
feat: outfit items and valuables
phacUFPE May 31, 2024
d1f4e02
Code format - (Clang-format)
github-actions[bot] May 31, 2024
80f4d4d
feat: add missing effects
phacUFPE Jun 1, 2024
3f6e7b3
refactor: the rest of ratha
phacUFPE Jun 1, 2024
84192ec
fix: updated the rest of ratha time to defeat to 10 minutes
phacUFPE Jun 1, 2024
64968b5
refactor/feat: refactor the rest of ratha and added fryclosp mechanics
phacUFPE Jun 2, 2024
4863077
Lua code format - (Stylua)
github-actions[bot] Jun 2, 2024
e8b4302
refactor: renamed catapult update method
phacUFPE Jun 2, 2024
5275719
fix: quest bugs
phacUFPE Jun 6, 2024
791e113
feat: The Draccon transcripts
phacUFPE Jun 6, 2024
a9157f8
Lua code format - (Stylua)
github-actions[bot] Jun 6, 2024
a162188
Merge branch 'main' into phacUFPE/20-years-a-cook-quest
phacUFPE Jul 10, 2024
e634c7d
Merge branch 'main' into phacUFPE/20-years-a-cook-quest
phacUFPE Sep 18, 2024
b6f08e2
fix: update monster walkto to new listdir structure
phacUFPE Sep 18, 2024
d858d22
feat: add quest npc and monster spawns
phacUFPE Sep 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions data-otservbr-global/lib/core/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6551,5 +6551,92 @@ if not Quests then
},
},
},
[49] = {
name = "20 Years a Cook",
startStorageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
startStorageValue = 1,
missions = {
[1] = {
name = "The lair of the Draccoon",
storageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
missionId = 10451,
startValue = 1,
endValue = 2,
description = "Find the Draccoon in his lair. The secret entrance is supposed to be found somewhere in the Venorean dumpster area.",
},
[2] = {
name = "An old friend",
storageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
missionId = 10452,
startValue = 2,
endValue = 3,
description = "Look for an old friend of the Draccoon. The Draccoon assumes his friend still lives in an appartment in the upper levels of Kazordoon.",
},
[3] = {
name = "Sad news",
storageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
missionId = 10453,
startValue = 3,
endValue = 4,
description = "Ratha, the Draccoon's old friend has met his ultimely demise. Travel to the Draccoon's lair to inform about Ratha's fate",
},
[4] = {
name = "Ghost hunt",
storageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
missionId = 10454,
startValue = 4,
endValue = 5,
description = "Meet the ally of the Draccoon in Ratha's quarters in Kazordoon and extract Ratha's spirit.",
},
[5] = {
name = "Ghost hunt",
storageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
missionId = 10455,
startValue = 5,
endValue = 6,
description = "Travel to the Draccoon's lair to learn how to proceed.",
},
[6] = {
name = "The potion",
storageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
missionId = 10456,
startValue = 6,
endValue = 7,
description = "Drink a 'potion of spirit of talking' in the Draccoon's lair.",
},
[7] = {
name = "The potion",
storageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
missionId = 10457,
startValue = 7,
endValue = 8,
description = "You accidentally drunk Ratha. Better talk to the Draccoon about it.",
},
[8] = {
name = "Revenge best served fried!",
storageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
missionId = 10458,
startValue = 8,
endValue = 9,
description = "Travel to the house of the Fryclops and find a way to remove him from the picture. The Draccoon's allies will provide a secret access from somewhere in the south of the Ghostlands.",
},
[9] = {
name = "An eye for an eye",
storageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
missionId = 10459,
startValue = 9,
endValue = 10,
description = "You triumphed over the Fryclops.\nTalk to the Draccoon about your success.",
},
[10] = {
name = "In charge",
storageId = Storage.Quest.U13_30.TwentyYearsACook.QuestLine,
missionId = 10460,
startValue = 10,
endValue = 11,
description = "Travel to Edron to find the Draccoon's ally. Steal charged crystals from some demons to power up the Fryclop's machine.",
},
},
},
}
end
15 changes: 15 additions & 0 deletions data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2717,6 +2717,21 @@ Storage = {
},
},
},
U13_30 = { -- update 13.30 - Reserved Storages 47952 - 48002
TwentyYearsACook = {
QuestLine = 47952,
TheRestOfRathaDoor = 47953,
FlaskBox = 47954,
AxeBox = 47955,
GhostDusterDamage = 47956,
RathaConditionsApplied = 47957,
DraccoonOutfits = {
Outfit = 47998,
Outfit = 47999,
Outfit = 48000,
},
},
},
},
-- Reserved storage from 63951 - 63999
ThaisExhibition = {
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/lib/quests/quest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dofile(DATA_DIRECTORY .. "/lib/quests/the_queen_of_the_banshees.lua")
dofile(DATA_DIRECTORY .. "/lib/quests/soul_war.lua")
dofile(DATA_DIRECTORY .. "/lib/quests/their_masters_voice.lua")
dofile(DATA_DIRECTORY .. "/lib/quests/the_primal_ordeal.lua")
dofile(DATA_DIRECTORY .. "/lib/quests/twenty_years_a_cook_quest.lua")
70 changes: 70 additions & 0 deletions data-otservbr-global/lib/quests/twenty_years_a_cook_quest.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
TwentyYearsACookQuest = {
TheRestOfRatha = {
MissionZone = Zone("mission.the-rest-of-ratha"),
BossZone = Zone("boss.the-rest-of-ratha"),
PositionsToTeleport = {
Position(33309, 31393, 15),
Position(33324, 31396, 15),
Position(33323, 31405, 15),
Position(33312, 31402, 15),
Position(33317, 31393, 15),
},
Items = {
EmptySpiritFlask = 44527,
FullSpiritFlask = 44528,
PotionRack = 44597,
GhostItem = 44598,
Harp = 44599,
HarpCooldown = 44600,
},
LeverUID = 62133,
FlaskBoxUID = 62134,
TimeToDefeat = 10 * 60, -- 10 minutes
},
Fryclops = {
BossZone = Zone("boss.fryclops"),
Items = {
AxeBox = 44562,
Axe = 44525,
CatapultRope = 44410,
},
LeverUID = 62135,
TimeToDefeat = 10 * 60, -- 10 minutes
MeleePoints = 5,
BeamPoints = 10,
Exit = Position(32299, 31698, 8),
Catapult = {
FryclopsPosition = Position(32349, 31595, 6),
RopePosition = Position(32348, 31595, 6),
CatapultUpdateMap = {
[Position(32349, 31595, 6)] = { on = 0, off = 44411 },
[Position(32348, 31595, 6)] = { on = 44419, off = 44410 },
[Position(32350, 31595, 6)] = { on = 44420, off = 44412 },
[Position(32351, 31595, 5)] = { on = 44426, off = 0 },
[Position(32351, 31595, 6)] = { on = 44421, off = 44413 },
},
UpdateCatapult = function(on)
for position, status in pairs(TwentyYearsACookQuest.Fryclops.Catapult.CatapultUpdateMap) do
local tile = Tile(position)
local updated = false
if tile then
local item = tile:getItemById(on and status.off or status.on)
if item then
item:remove()
end
else
Game.createTile(position)
end
if (on and status.on ~= 0) or (not on and status.off ~= 0) then
Game.createItem(on and status.on or status.off, 1, position)
end
end
end,
},
},
}

-- Initializing zones
TwentyYearsACookQuest.TheRestOfRatha.MissionZone:addArea({ x = 33303, y = 31425, z = 15 }, { x = 33327, y = 31445, z = 15 })
TwentyYearsACookQuest.TheRestOfRatha.BossZone:addArea({ x = 33303, y = 31388, z = 15 }, { x = 33327, y = 31408, z = 15 })
TwentyYearsACookQuest.Fryclops.BossZone:addArea({ x = 32340, y = 31587, z = 6 }, { x = 32368, y = 31611, z = 6 })
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
local monsterName = "Fryclops"
local mType = Game.createMonsterType(monsterName)
local monster = {}

monster.description = monsterName
monster.experience = 0
monster.outfit = {
lookType = 1700,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0,
}

monster.events = {}

monster.health = 100
monster.maxHealth = 100
monster.race = "blood"
monster.corpse = 0
monster.speed = 95
monster.manaCost = 0

monster.changeTarget = {
interval = 4000,
chance = 10,
}

monster.strategiesTarget = {
random = 100,
}

monster.flags = {
summonable = false,
attackable = false,
hostile = true,
convinceable = false,
pushable = false,
rewardBoss = false,
illusionable = false,
canPushItems = false,
canPushCreatures = false,
staticAttackChance = 90,
targetDistance = 1,
runHealth = 0,
healthHidden = false,
isBlockable = false,
canWalkOnEnergy = true,
canWalkOnFire = true,
canWalkOnPoison = true,
}

monster.light = {
level = 0,
color = 0,
}

monster.summon = {}

monster.voices = {}

monster.loot = {}

monster.attacks = {
{ name = "fryclops melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = 0, effect = CONST_ME_EXPLOSIONAREA, range = 1 },
{ name = "fryclops beam", interval = 2000, chance = 100, minDamage = 0, maxDamage = 0 },
}

monster.defenses = {}

monster.elements = {
{ type = COMBAT_PHYSICALDAMAGE, percent = 100 },
{ type = COMBAT_ENERGYDAMAGE, percent = 100 },
{ type = COMBAT_EARTHDAMAGE, percent = 100 },
{ type = COMBAT_FIREDAMAGE, percent = 100 },
{ type = COMBAT_LIFEDRAIN, percent = 100 },
{ type = COMBAT_MANADRAIN, percent = 100 },
{ type = COMBAT_DROWNDAMAGE, percent = 100 },
{ type = COMBAT_ICEDAMAGE, percent = 100 },
{ type = COMBAT_HOLYDAMAGE, percent = 100 },
{ type = COMBAT_DEATHDAMAGE, percent = 100 },
}

monster.immunities = {
{ type = "paralyze", condition = true },
{ type = "outfit", condition = true },
{ type = "invisible", condition = true },
{ type = "bleed", condition = true },
}

mType.onThink = function(monster, interval) end

mType:register(monster)
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
local monsterName = "Ghost Duster"
local mType = Game.createMonsterType(monsterName)
local monster = {}

monster.description = monsterName
monster.experience = 0
monster.outfit = {
lookTypeEx = 40574,
}

monster.events = {
"GhostDusterAttack",
}

monster.health = 100000000
monster.maxHealth = 100000000
monster.race = "energy"
monster.corpse = 0
monster.speed = 20
monster.manaCost = 0

monster.changeTarget = {
interval = 0,
chance = 0,
}

monster.strategiesTarget = {
nearest = 0,
random = 0,
}

monster.flags = {
canWalk = false,
canTarget = false,
summonable = false,
attackable = true,
hostile = false,
convinceable = false,
pushable = true,
rewardBoss = false,
illusionable = false,
canPushItems = false,
canPushCreatures = false,
staticAttackChance = 0,
targetDistance = 0,
runHealth = 0,
healthHidden = false,
isBlockable = false,
canWalkOnEnergy = false,
canWalkOnFire = false,
canWalkOnPoison = false,
}

monster.light = {
level = 0,
color = 0,
}

monster.summon = {}

monster.voices = {}

monster.loot = {}

monster.attacks = {}

monster.defenses = {
{ name = "combat", type = COMBAT_HEALING, chance = 100, interval = 2000, minDamage = 100000000, maxDamage = 100000000, effect = CONST_ME_NONE },
}

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 = true },
{ type = "outfit", condition = true },
{ type = "invisible", condition = true },
{ type = "bleed", condition = true },
}

mType.onThink = function(monster, interval) end

mType:register(monster)
Loading
Loading