Skip to content

Commit

Permalink
Merge branch 'main' into feature/checks-and-improves
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored Feb 22, 2024
2 parents 16e1700 + ea5867a commit 8a62c60
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 552 deletions.
216 changes: 0 additions & 216 deletions data-canary/scripts/actions/other/potions.lua

This file was deleted.

12 changes: 3 additions & 9 deletions data-otservbr-global/npc/sandra.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ local function creatureSayCallback(npc, creature, type, message)

if table.contains({ "vial", "ticket", "bonus", "deposit" }, message) then
if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonBelt) < 1 then
npcHandler:say("You have " .. player:getStorageValue(38412) .. " credits. We have a special offer right now for depositing vials. Are you interested in hearing it?", npc, creature)
npcHandler:say("We have a special offer right now for depositing vials. Are you interested in hearing it?", npc, creature)
npcHandler:setTopic(playerId, 1)
elseif player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonBelt) >= 1 then
npcHandler:say("Would you like to get a lottery ticket instead of the deposit for your vials?", npc, creature)
Expand Down Expand Up @@ -119,14 +119,8 @@ local function creatureSayCallback(npc, creature, type, message)
player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests
npcHandler:setTopic(playerId, 0)
elseif npcHandler:getTopic(playerId) == 3 then
if player:getStorageValue(38412) >= 100 or player:removeItem(283, 100) or player:removeItem(284, 100) or player:removeItem(285, 100) then
npcHandler:say(
"Alright, thank you very much! Here is your lottery ticket, good luck. \
Would you like to deposit more vials that way?",
npc,
creature
)
player:setStorageValue(38412, player:getStorageValue(38412) - 100)
if player:removeItem(283, 100) or player:removeItem(284, 100) or player:removeItem(285, 100) then
npcHandler:say("Alright, thank you very much! Here is your lottery ticket, good luck. Would you like to deposit more vials that way?", npc, creature)
player:addItem(5957, 1)
npcHandler:setTopic(playerId, 0)
else
Expand Down
Loading

0 comments on commit 8a62c60

Please sign in to comment.