Skip to content

Commit

Permalink
Fix issues identified from TQuest definition
Browse files Browse the repository at this point in the history
  • Loading branch information
claywar committed Sep 2, 2024
1 parent 8ee48ac commit 86c7380
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions scripts/quests/ahtUrhgan/Olduum.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ local keyItems =
xi.ki.ELECTROLOCOMOTIVE,
}

quest.hasKeyItem = function(player)
for i, v in pairs(keyItems) do
local hasQuestKeyItem = function(player)
for _, v in pairs(keyItems) do
if player:hasKeyItem(v) then
return true
end
Expand Down Expand Up @@ -68,7 +68,7 @@ quest.sections =
['Dkhaaya'] =
{
onTrigger = function(player, npc)
if quest.hasKeyItem(player) then
if hasQuestKeyItem(player) then
return quest:progressEvent(6)
else
return quest:event(5)
Expand All @@ -94,7 +94,7 @@ quest.sections =
onTrade = function(player, npc, trade)
if
not player:hasItem(xi.item.OLDUUM_RING) and
not quest.hasKeyItem(player) and
not hasQuestKeyItem(player) and
npcUtil.tradeHasExactly(trade, xi.item.PICKAXE)
then
if math.random(1, 10) > 5 then
Expand Down Expand Up @@ -135,7 +135,7 @@ quest.sections =
['Dkhaaya'] =
{
onTrigger = function(player, npc)
if quest.hasKeyItem(player) then
if hasQuestKeyItem(player) then
return quest:progressEvent(8)
elseif
player:hasItem(xi.item.OLDUUM_RING) or
Expand Down Expand Up @@ -202,7 +202,7 @@ quest.sections =
onTrade = function(player, npc, trade)
if
not player:hasItem(xi.item.OLDUUM_RING) and
not quest.hasKeyItem(player) and
not hasQuestKeyItem(player) and
npcUtil.tradeHasExactly(trade, xi.item.PICKAXE)
then
if math.random(1, 10) > 5 then
Expand Down
2 changes: 1 addition & 1 deletion scripts/quests/otherAreas/RQ4_His_Name_is_Valgeir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ quest.sections =
if
player:hasKeyItem(xi.ki.ARAGONEU_PIZZA) and -- No free ride after delivering Pizza.
player:getZPos() > 38.5 and -- Pos check.
quest:setVar(player, 'Prog') == 0 -- Hasn't taken the free ride.
quest:getVar(player, 'Prog') == 0 -- Hasn't taken the free ride.
then
return quest:progressEvent(230) -- Free ride. 1 time only. Non-Mandatory step.
end
Expand Down
2 changes: 1 addition & 1 deletion scripts/quests/windurst/Overnight_Delivery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ quest.sections =
[346] = function(player, csid, option, npc)
player:delQuest(quest.areaId, quest.questId)
player:delKeyItem(xi.ki.SMALL_BAG)
quest:setVar('dueDate', 0)
quest:setVar(player, 'dueDate', 0)
quest:setVar(player, 'Prog', 256)
end,

Expand Down

0 comments on commit 86c7380

Please sign in to comment.