Skip to content

Commit

Permalink
Glooth Engineer Outfits Quest
Browse files Browse the repository at this point in the history
  • Loading branch information
htc16 committed Sep 11, 2024
1 parent 01bc03b commit 8764b2a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
5 changes: 4 additions & 1 deletion data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2450,7 +2450,10 @@ Storage = {
Reward05GlothAndBelongings = 44574,
Reward10GlothAndBelongings = 44575,
},
GloothEngineerOutfits = {},
GloothEngineerOutfits = {
Addon1 = 44576,
Addon2 = 44577,
},
Oramond = {},
Rathleton = {},
},
Expand Down
30 changes: 26 additions & 4 deletions data-otservbr-global/npc/ezebeth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message)
end
elseif MsgContains(message, "assistance") then
if npcHandler:getTopic(playerId) == 1 then
npcHandler:say(" It's nothing really important, so no one has yet found the time to look it up. It concerns the towns beggars that have started to behave {strange} lately.", npc, creature)
npcHandler:say("It's nothing really important, so no one has yet found the time to look it up. It concerns the town's beggars that have started to behave {strange} lately.", npc, creature)
npcHandler:setTopic(playerId, 2)
end
elseif MsgContains(message, "strange") then
Expand All @@ -80,20 +80,42 @@ local function creatureSayCallback(npc, creature, type, message)
elseif MsgContains(message, "outfit") then
if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission18) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Outfit) < 1 then
npcHandler:say("Nice work, take your outfit.", npc, creature)
doPlayerAddOutfit(610, 1)
doPlayerAddOutfit(618, 1)
player:addOutfit(610, 0)
player:addOutfit(618, 0)
player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Outfit, 1)
npcHandler:setTopic(playerId, 0)
else
npcHandler:say("You already have the outfit.", npc, creature)
npcHandler:setTopic(playerId, 0)
end
elseif MsgContains(message, "addon") then
if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Outfit) == 1 then
if player:getStorageValue(Storage.Oramond.VotingPoints) >= 6 and player:getStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon2) < 1 then
npcHandler:say("Receive the second addon.", npc, creature)
player:addOutfit(610, 2)
player:addOutfit(618, 2)
player:setStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon2, 1)
npcHandler:setTopic(playerId, 0)
elseif player:getStorageValue(Storage.Oramond.VotingPoints) >= 3 and player:getStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon1) < 1 then
npcHandler:say("Receive the first addon.", npc, creature)
player:addOutfit(610, 1)
player:addOutfit(618, 1)
player:setStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon1, 1)
npcHandler:setTopic(playerId, 0)
else
npcHandler:say({
"We provide addons to people dedicated to our city. So the first addon is granted to someone who has voted for each of the available shortcuts and each dungeon at least once. ...",
"The second addon is granted to someone who has voted for each bossfight at least once.",
}, npc, creature)
npcHandler:setTopic(playerId, 0)
end
end
end

return true
end

npcHandler:setMessage(MESSAGE_GREET, "Hello! I guess you are here for a {mission}.")

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
Expand Down

0 comments on commit 8764b2a

Please sign in to comment.