Skip to content

Commit

Permalink
The Pits of Inferno Quest
Browse files Browse the repository at this point in the history
  • Loading branch information
htc16 committed Jul 15, 2024
1 parent ab6a85c commit 68e1ae0
Show file tree
Hide file tree
Showing 41 changed files with 699 additions and 124 deletions.
56 changes: 31 additions & 25 deletions data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1221,20 +1221,6 @@ Storage = {
WitchHouseQuest = 51770,
SimonTheBeggarsFavoriteStaff = 51771,
},
PitsOfInferno = {
-- Reserved storage from 52000 - 52019
ShortcutHubDoor = 52000,
ShortcutLeverDoor = 52001,
Pumin = 52002,
WeaponReward = 52003,
ThroneInfernatil = 52004,
ThroneTafariel = 52005,
ThroneVerminor = 52006,
ThroneApocalypse = 52007,
ThroneBazir = 52008,
ThroneAshfalor = 52009,
ThronePumin = 52010,
},
HorestisTomb = {
-- Reserved storage from 52020 - 52029
JarFloor1 = 52020,
Expand Down Expand Up @@ -1493,6 +1479,7 @@ Storage = {
ID3600 = 3600,
ID3620 = 3620,
ID3666 = 3666,
ID3700 = 3700,
ID3702 = 3702,
ID3800 = 3800,
ID3801 = 3801,
Expand Down Expand Up @@ -2036,22 +2023,41 @@ Storage = {
LeverBrotherhood2 = 41005,
LeverBrotherhood3 = 41006,
TicTac = 41007,
Reward = 41008,
BPLongSword = 41009,
ChestBook = 41010,
ChestsWine = 41011,
Chests3SmallDiamond = 41012,
BPLongSword = 41008,
ChestBook = 41009,
ChestsWine = 41010,
Chests3SmallDiamond = 41011,
},
NightmareOutfits = {
Outfits = 41013,
Door = 41014,
KnightwatchTowerDoor = 41015,
Outfits = 41012,
Door = 41013,
KnightwatchTowerDoor = 41014,
},
BrotherhoodOutfits = {
Outfits = 41016,
Door = 41017,
Outfits = 41015,
Door = 41016,
},
ThePitsOfInferno = {
ShortcutHubDoor = 41017,
ShortcutLeverDoor = 41018,
Pumin = 41019,
ThroneInfernatil = 41020,
ThroneTafariel = 41021,
ThroneVerminor = 41022,
ThroneApocalypse = 41023,
ThroneBazir = 41024,
ThroneAshfalor = 41025,
ThronePumin = 41026,
ChestTible = 41027,
CorpseBook = 41028,
CorpsePirateBP = 41029,
RewardChestBP = 41030,
RewardChestPlatinumCoins = 41031,
RewardChestFrozenStarlight = 41032,
RewardChestStuffed = 41033,
RewardChestSoftBoots = 41034,
RewardChestStaffAvengerArbalest = 41035,
},
ThePitsOfInferno = {},
},
U8_0 = { -- update 8.0 - Reserved Storages 41151 - 41350
BarbarianArena = {},
Expand Down
16 changes: 8 additions & 8 deletions data-otservbr-global/npc/a_dead_bureaucrat1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ local function creatureSayCallback(npc, creature, type, message)
local vocationBaseId = vocation:getBaseId()

if MsgContains(message, "pumin") then
if npcHandler:getTopic(playerId) == 0 and player:getStorageValue(Storage.PitsOfInferno.ThronePumin) < 1 then
if npcHandler:getTopic(playerId) == 0 and player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) < 1 then
npcHandler:say("Sure, where else. Everyone likes to meet my master, he is a great demon, isn't he? Your name is ...?", npc, creature)
npcHandler:setTopic(playerId, 1)
elseif npcHandler:getTopic(playerId) == 3 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 1)
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 1)
npcHandler:say("How very interesting. I need to tell that to my master immediately. Please go to my colleagues and ask for Form 356. You will need it in order to proceed.", npc, creature)
npcHandler:setTopic(playerId, 0)
end
Expand All @@ -97,26 +97,26 @@ local function creatureSayCallback(npc, creature, type, message)
npcHandler:setTopic(playerId, 3)
end
elseif MsgContains(message, "411") then
if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 3 then
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 3 then
npcHandler:say("Form 411? You need Form 287 to get that! Do you have it?", npc, creature)
npcHandler:setTopic(playerId, 4)
elseif player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 5 then
elseif player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 5 then
npcHandler:say("Form 411? You need Form 287 to get that! Do you have it?", npc, creature)
npcHandler:setTopic(playerId, 5)
end
elseif MsgContains(message, "no") then
if npcHandler:getTopic(playerId) == 4 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 4)
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 4)
npcHandler:say("Oh, what a pity. Go see one of my colleagues. I give you the permission to get Form 287. Bye!", npc, creature)
end
elseif MsgContains(message, "yes") then
if npcHandler:getTopic(playerId) == 5 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 6)
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 6)
npcHandler:say("Great. Here you are. Form 411. Come back anytime you want to talk. Bye.", npc, creature)
end
elseif MsgContains(message, "356") then
if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 8 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 9)
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 8 then
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 9)
npcHandler:say("INCREDIBLE, you did it!! Have fun at Pumin's Domain!", npc, creature)
end
end
Expand Down
4 changes: 2 additions & 2 deletions data-otservbr-global/npc/a_dead_bureaucrat2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ local function creatureSayCallback(npc, creature, type, message)

if MsgContains(message, "287") then
local player = Player(creature)
if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 4 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 5)
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 4 then
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 5)
npcHandler:say("Sure, you can get it from me. Here you are. Bye", npc, creature)
end
end
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/npc/a_dead_bureaucrat3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ local function creatureSayCallback(npc, creature, type, message)
local vocation = Vocation(player:getVocation():getBase():getId())

if MsgContains(message, "pumin") then
if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 2 then
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 2 then
npcHandler:say("Tell me if you liked it when you come back. What is your name?", npc, creature)
npcHandler:setTopic(playerId, 1)
end
Expand All @@ -85,11 +85,11 @@ local function creatureSayCallback(npc, creature, type, message)
end
elseif MsgContains(message, "145") then
if npcHandler:getTopic(playerId) == 3 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 3)
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 3)
npcHandler:say("That's right, you can get Form 145 from me. However, I need Form 411 first. Come back when you have it.", npc, creature)
npcHandler:setTopic(playerId, 0)
elseif player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 6 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 7)
elseif player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 6 then
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 7)
npcHandler:say("Well done! You have form 411!! Here is Form 145. Have fun with it.", npc, creature)
end
end
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/npc/a_dead_bureaucrat4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ local function creatureSayCallback(npc, creature, type, message)
local vocationBaseId = vocation:getBaseId()

if MsgContains(message, "pumin") then
if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) < 1 then
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 1 then
npcHandler:say("I'm not sure if you know what you are doing but anyway. Your name is?", npc, creature)
npcHandler:setTopic(playerId, 1)
end
Expand All @@ -94,11 +94,11 @@ local function creatureSayCallback(npc, creature, type, message)
end
elseif MsgContains(message, "356") then
if npcHandler:getTopic(playerId) == 3 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 2)
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 2)
npcHandler:say("Sorry, you need Form 145 to get Form 356. Come back when you have it", npc, creature)
npcHandler:setTopic(playerId, 0)
elseif player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 7 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 8)
elseif player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 7 then
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 8)
npcHandler:say("You are better than I thought! Congratulations, here you are: Form 356!", npc, creature)
end
end
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/a_ghostly_sage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ npcType.onCloseChannel = function(npc, creature)
npcHandler:onCloseChannel(npc, creature)
end

local travelNode = keywordHandler:addKeyword({ "teleport" }, StdModule.say, { npcHandler = npcHandler, text = "You will now be travelled out of here. Are you sure that you want to face that teleport?" })
local travelNode = keywordHandler:addKeyword({ "help" }, StdModule.say, { npcHandler = npcHandler, text = "You will now be travelled out of here. Are you sure that you want to face that teleport?" })
travelNode:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, destination = Position(32834, 32275, 9) })
travelNode:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, reset = true, text = "Then stay here in these ghostly halls." })

Expand Down
21 changes: 18 additions & 3 deletions data-otservbr-global/npc/oldrak.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ npcConfig.outfit = {
npcConfig.flags = {
floorchange = false,
}
npcConfig.shop = {
{ itemName = "holy tible", clientId = 2836 },
}

-- On buy npc shop message
npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost)
Expand Down Expand Up @@ -176,6 +173,24 @@ local function creatureSayCallback(npc, creature, type, message)
npcHandler:say("Yenny, known as the Gentle, was one of the most powerful wielders of magic in ancient times. She was known throughout the world for her mercy and kindness.", npc, creature)
npcHandler:setTopic(playerId, 0)
end

if (MsgContains(message, "holy") or MsgContains(message, "tible")) then
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ChestTible) == 1 then
npcHandler:say("Would you like to buy a The Holy Tible for 1000 gold?", npc, creature)
npcHandler:setTopic(playerId, 3)
else
npcHandler:say("You need to complete the quest for the book first before you can buy The Holy Tible.", npc, creature)
end
elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 3 then
if player:removeMoney(1000) then
player:addItem(2836, 1)
npcHandler:say("Here is your The Holy Tible.", npc, creature)
else
npcHandler:say("You do not have enough money.", npc, creature)
end
npcHandler:setTopic(playerId, 0)
end

return true
end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
local specialQuests = {
-- {x = 32752, y = 32343, z = 14}
[52167] = Storage.Quest.U7_9.DreamersChallenge.Reward,
-- {x = 32806, y = 32230, z = 11}
[52003] = Storage.PitsOfInferno.WeaponReward,
-- {x = 32311, y = 32211, z = 8}
[51400] = Storage.ThievesGuild.Reward,
[51324] = Storage.WrathoftheEmperor.MainReward,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
local throneStorages = {
Storage.PitsOfInferno.ThroneInfernatil,
Storage.PitsOfInferno.ThroneTafariel,
Storage.PitsOfInferno.ThroneVerminor,
Storage.PitsOfInferno.ThroneApocalypse,
Storage.PitsOfInferno.ThroneBazir,
Storage.PitsOfInferno.ThroneAshfalor,
Storage.PitsOfInferno.ThronePumin,
Storage.Quest.U7_9.ThePitsOfInferno.ThroneInfernatil,
Storage.Quest.U7_9.ThePitsOfInferno.ThroneTafariel,
Storage.Quest.U7_9.ThePitsOfInferno.ThroneVerminor,
Storage.Quest.U7_9.ThePitsOfInferno.ThroneApocalypse,
Storage.Quest.U7_9.ThePitsOfInferno.ThroneBazir,
Storage.Quest.U7_9.ThePitsOfInferno.ThroneAshfalor,
Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin,
}

local function hasTouchedOneThrone(player)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
local setting = {
[2090] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneInfernatil, value = 1 },
[2091] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneTafariel, value = 1 },
[2092] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneVerminor, value = 1 },
[2093] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneApocalypse, value = 1 },
[2094] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneBazir, value = 1 },
[2095] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneAshfalor, value = 1 },
[2096] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, value = 10 },
}

local checkThrone = MoveEvent()

function checkThrone.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end

local thrones = setting[item.uid]
if not thrones then
return true
end

if player:getStorageValue(thrones.storage) ~= thrones.value then
player:teleportTo(fromPosition, true)
player:say("You've not absorbed energy from this throne.", TALKTYPE_MONSTER_SAY)
end
return true
end

checkThrone:type("stepin")

for index, value in pairs(setting) do
checkThrone:uid(index)
end

checkThrone:register()
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function puminTeleport.onStepIn(creature, item, position, fromPosition)
return true
end

if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) < 50 then
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) >= 9 then
player:teleportTo(Position(32786, 32308, 15))
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local setting = {
[8816] = Storage.PitsOfInferno.ShortcutHubDoor,
[8817] = Storage.PitsOfInferno.ShortcutLeverDoor,
[8816] = Storage.Quest.U7_9.ThePitsOfInferno.ShortcutHubDoor,
[8817] = Storage.Quest.U7_9.ThePitsOfInferno.ShortcutLeverDoor,
}

local shortcuts = MoveEvent()
Expand Down
Loading

0 comments on commit 68e1ae0

Please sign in to comment.