diff --git a/Data/scripts/quests/etc/etc5g0.lua b/Data/scripts/quests/etc/etc5g0.lua index 4d3588a5..5ab4d179 100644 --- a/Data/scripts/quests/etc/etc5g0.lua +++ b/Data/scripts/quests/etc/etc5g0.lua @@ -13,8 +13,8 @@ Notes: Rewards 200 gil ]] -- Sequence Numbers -SEQ_000 = 0; -- Talk to Pfarahr -SEQ_001 = 1; -- Return to V'korolon +SEQ_000 = 0; -- Talk to Pfarahr. +SEQ_001 = 1; -- Return to V'korolon. -- Actor Class Ids VKOROLON = 1000458; @@ -54,23 +54,25 @@ function onTalk(player, quest, npc) local classId = npc:GetActorClassId(); if (sequence == SEQ_ACCEPT) then - callClientFunction(player, "delegateEvent", player, quest, "processEventVKOROLONStart"); - end - - if (sequence == SEQ_000) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventVKOROLONStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + elseif (sequence == SEQ_000) then if (classId == VKOROLON) then callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1"); elseif (classId == PFARAHR) then callClientFunction(player, "delegateEvent", player, quest, "processEvent_010"); quest:StartSequence(SEQ_001); - quest:DoComplete(); -- Need ref since it feels out of place. Just placing it here since original script had it. end elseif (sequence == SEQ_001) then if (classId == VKOROLON) then callClientFunction(player, "delegateEvent", player, quest, "processEvent_020"); - --callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1); -- Reward window, shouldn't be handled by quest script - player:CompleteQuest(quest:GetQuestId()); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1) + player:CompleteQuest(quest); elseif (classId == PFARAHR) then callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_1"); end @@ -79,27 +81,21 @@ function onTalk(player, quest, npc) quest:UpdateENPCs(); end - function getJournalInformation(player, quest) - local sequence = quest:getSequence(); - + local sequence = quest:getSequence(); if (sequence == SEQ_000) then return ITEM_WELL_WORN_BAG; end end - function getJournalMapMarkerList(player, quest) local sequence = quest:getSequence(); - local possibleMarkers = {}; if (sequence == SEQ_000) then - table.insert(possibleMarkers, MRKR_PFARAHR); + return MRKR_PFARAHR; elseif (sequence == SEQ_001) then - table.insert(possibleMarkers, MRKR_VKOROLON); - end - - return unpack(possibleMarkers) + return MRKR_VKOROLON; + end end