Skip to content

Commit

Permalink
Marlin Trophy Quest
Browse files Browse the repository at this point in the history
  • Loading branch information
htc16 committed Jul 9, 2024
1 parent 6b3f378 commit 4d864e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@ Storage = {
AddonHatCloak = 40806,
AddonWandTimer = 40807,
},
MarlinTrophy = {},
MarlinTrophy = 40808,
Meriana = {},
NoblemanOutfits = {},
ObsidianKnife = {},
Expand Down
11 changes: 7 additions & 4 deletions data-otservbr-global/npc/pemaret.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,17 @@ local function creatureSayCallback(npc, creature, type, message)
end

if MsgContains(message, "marlin") then
if player:getItemCount(901) > 0 then
npcHandler:say("WOW! You have a marlin!! I could make a nice decoration for your wall from it. May I have it?", npc, creature)
npcHandler:setTopic(playerId, 1)
if player:getStorageValue(Storage.Quest.U7_8.MarlinTrophy) < 1 then
if player:getItemCount(901) > 0 then
npcHandler:say("WOW! You have a marlin!! I could make a nice decoration for your wall from it. May I have it?", npc, creature)
npcHandler:setTopic(playerId, 1)
end
end
elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then
elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U7_8.MarlinTrophy) < 1 then
if player:removeItem(901, 1) then
npcHandler:say("Yeah! Now let's see... <fumble fumble> There you go, I hope you like it!", npc, creature)
player:addItem(902, 1)
player:setStorageValue(Storage.Quest.U7_8.MarlinTrophy, 1)
else
npcHandler:say("You don't have the fish.", npc, creature)
end
Expand Down

0 comments on commit 4d864e1

Please sign in to comment.