Skip to content

Commit

Permalink
To Blind the Enemy Quest - Tibia Tales
Browse files Browse the repository at this point in the history
  • Loading branch information
htc16 committed Jul 24, 2024
1 parent fb9f31d commit e397fc9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,13 @@ Storage = {
MedusaOil = 51531,
Questline = 51532,
},
ToBlindTheEnemy = {
Questline = 41398,
DwarvenShield = 41399,
MorningStar = 41400,
BP1 = 41401,
BP2 = 41402,
},
},
TheShatteredIsles = {
-- Reserved storage from 51540 - 51589
Expand Down Expand Up @@ -2071,13 +2078,6 @@ Storage = {
Mission06 = 41396,
Mission07 = 41397,
},
ToBlindTheEnemy = {
Questline = 41398,
DwarvenShield = 41399,
MorningStar = 41400,
BP1 = 41401,
BP2 = 41402,
},
ToOutfoxAFox = {},
TowerDefence = {},
Waterfall = {},
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/npc/eroth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ local function creatureSayCallback(npc, creature, type, message)
-- Check if the message contains "mission"
if MsgContains(message, "mission") then
-- Check if player is starting the quest
if player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline) < 1 then
if player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) < 1 then
npcHandler:say("Have you ever heard of Elvenbane? It is the castle west of Ab'Dendriel which is inhabited by villains from all over the continent. Any support in this war is welcome. Are you willing to help?", npc, creature)
npcHandler:setTopic(playerId, 1)
-- Check if player has completed certain objectives
elseif player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline) == 2 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.DwarvenShield) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.MorningStar) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.BP1) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.BP2) == 1 then
elseif player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) == 2 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.DwarvenShield) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.MorningStar) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.BP1) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.BP2) == 1 then
npcHandler:say("I heard the blow! The reflection must have caused a overcharge of magical energy leading to the contraction and the implosion. Just like I hoped! Please take this as a reward. Thank you very much.", npc, creature)
player:addItem(3082, 1)
player:addItem(3035, 10)
player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 3)
player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 3)
npcHandler:setTopic(playerId, 0)
end
-- Check if the player has accepted the mission
Expand All @@ -76,7 +76,7 @@ local function creatureSayCallback(npc, creature, type, message)
"We don't really know how to destroy it but we suppose it may work if you reflect the invisible power of the ball. The beam should be adjusted to Ab'Dendriel. Take this mirror and give it a try. Good luck.",
}, npc, creature)
player:addItem(3463, 1)
player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 1)
player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 1)
npcHandler:setTopic(playerId, 0)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ local function revertItem(position, itemId)
end

function mirror.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline) == 1 then
if player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) == 1 then
if target:getActionId() == 4001 and target.itemid == 132 then
local itemToRemove = Tile(toPosition):getItemById(132)
if itemToRemove then
itemToRemove:remove()
toPosition:sendMagicEffect(CONST_ME_MAGIC_POWDER)
player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 2)
player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 2)
player:say("KABOOM !!", TALKTYPE_MONSTER_SAY, false, player, toPosition)
addEvent(revertItem, 60 * 1000, toPosition, 132)
item:remove(1)
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/startup/tables/chest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1305,30 +1305,30 @@ ChestUnique = {
itemPos = { x = 32591, y = 31647, z = 3 },
reward = { { 3425, 1 } },
weight = 55.00,
storage = Storage.Quest.U8_1.ToBlindTheEnemy.DwarvenShield,
storage = Storage.TibiaTales.ToBlindTheEnemy.DwarvenShield,
},
[6181] = {
itemId = 2472,
itemPos = { x = 32590, y = 31647, z = 3 },
reward = { { 3282, 1 } },
weight = 54.00,
storage = Storage.Quest.U8_1.ToBlindTheEnemy.MorningStar,
storage = Storage.TibiaTales.ToBlindTheEnemy.MorningStar,
},
[6182] = {
itemId = 2434,
itemPos = { x = 32588, y = 31645, z = 3 },
container = 2853,
reward = { { 237, 1 }, { 3147, 1 }, { 3059, 1 } },
weight = 31.00,
storage = Storage.Quest.U8_1.ToBlindTheEnemy.BP1,
storage = Storage.TibiaTales.ToBlindTheEnemy.BP1,
},
[6183] = {
itemId = 2434,
itemPos = { x = 32588, y = 31644, z = 3 },
container = 2853,
reward = { { 3028, 2 }, { 3031, 100 } },
weight = 18.20,
storage = Storage.Quest.U8_1.ToBlindTheEnemy.BP2,
storage = Storage.TibiaTales.ToBlindTheEnemy.BP2,
},
-- Reward of others scrips files (varied rewards)
-- The First dragon Quest
Expand Down

0 comments on commit e397fc9

Please sign in to comment.