Skip to content

Commit

Permalink
refactor: move potions to core and improvement for npc sandra (#2292)
Browse files Browse the repository at this point in the history
  • Loading branch information
omarcopires authored Feb 21, 2024
1 parent 1182710 commit 21b4cfa
Show file tree
Hide file tree
Showing 5 changed files with 143 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 21b4cfa

Please sign in to comment.