Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions scripts/quests/crystalWar/Burden_of_Suspicion.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
-----------------------------------
-- Burden of Suspicion
-----------------------------------
-- !addquest 7 20
-- Gentle Tiger : !pos -203 -9 0 87
-- Engelhart : !pos -79 -4 -123 87
-- Sarcophagus : !pos 346 -32 -125 175
-----------------------------------

local quest = Quest:new(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.BURDEN_OF_SUSPICION)

quest.reward =
{
title = xi.title.ASSISTANT_DETECTIVE,
}

quest.sections =
{
-- Talk to Gentle Tiger in Bastok Markets (S)
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_AVAILABLE and
player:hasCompletedQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.LIGHT_IN_THE_DARKNESS)
end,

[xi.zone.BASTOK_MARKETS_S] =
{
['Gentle_Tiger'] =
{
onTrigger = function(player, npc)
if
not quest:getMustZone(player) and
quest:getVar(player, 'Timer') <= VanadielUniqueDay()
then
return quest:progressEvent(30)
end
end,
},

onEventFinish =
{
[30] = function(player, csid, option, npc)
quest:begin(player)
player:delKeyItem(xi.ki.WARNING_LETTER)
end,
},
},
},

-- Continue the investigation in Bastok Markets (S) and The Eldieme Necropolis [S]
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED
end,

[xi.zone.BASTOK_MARKETS_S] =
{
['Gentle_Tiger'] =
{
onTrigger = function(player, npc)
local questProgress = quest:getVar(player, 'Prog')

if questProgress == 1 then
return quest:event(28) -- Retail accurate, but odd.
elseif questProgress == 2 then
return quest:progressEvent(34)
else
return quest:event(31)
end
end,
},

['Engelhart'] =
{
onTrigger = function(player, npc)
local questProgress = quest:getVar(player, 'Prog')

if questProgress == 0 then
return quest:progressEvent(32)
elseif questProgress == 2 then
return quest:event(36)
else
return quest:event(33)
end
Comment thread
Xaver-DaRed marked this conversation as resolved.
end,
},

onEventFinish =
{
[32] = function(player, csid, option, npc)
quest:setVar(player, 'Prog', 1)
end,

[34] = function(player, csid, option, npc)
quest:complete(player)
end,
},
},

[xi.zone.THE_ELDIEME_NECROPOLIS_S] =
{
['Sarcophagus'] =
{
onTrigger = function(player, npc)
if quest:getVar(player, 'Prog') == 1 then
return quest:progressEvent(17)
end
end,
Comment thread
Xaver-DaRed marked this conversation as resolved.
},

onEventFinish =
{
[17] = function(player, csid, option, npc)
quest:setVar(player, 'Prog', 2)
end,
},
},
},
}

return quest
5 changes: 4 additions & 1 deletion scripts/quests/crystalWar/Light_in_the_Darkness.lua
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ quest.sections =
onEventFinish =
{
[27] = function(player, csid, option, npc)
quest:complete(player)
if quest:complete(player) then
xi.quest.setVar(player, xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.BURDEN_OF_SUSPICION, 'Timer', VanadielUniqueDay() + 1)
xi.quest.setMustZone(player, xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.BURDEN_OF_SUSPICION)
end
end,
},
},
Expand Down
Loading