|
| 1 | +----------------------------------- |
| 2 | +-- Knot Quite There |
| 3 | +----------------------------------- |
| 4 | +-- !addquest 7 27 |
| 5 | +-- Door Acolyte Hostel : !pos 124.000 -3.000 222.215 94 |
| 6 | +-- Bulwark Gate : !pos -445 0 342 98 |
| 7 | +-- Door:House : !pos 148 0 27 80 |
| 8 | +----------------------------------- |
| 9 | + |
| 10 | +local quest = Quest:new(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.KNOT_QUITE_THERE) |
| 11 | + |
| 12 | +quest.reward = |
| 13 | +{ |
| 14 | + item = xi.item.PLATINUM_BEASTCOIN, |
| 15 | +} |
| 16 | + |
| 17 | +quest.sections = |
| 18 | +{ |
| 19 | + -- Talk to the Door Acolyte Hostel in Windurst Waters [S]. |
| 20 | + { |
| 21 | + check = function(player, status, vars) |
| 22 | + return status == xi.questStatus.QUEST_AVAILABLE and |
| 23 | + player:hasCompletedMission(xi.mission.log_id.WOTG, xi.mission.id.wotg.BACK_TO_THE_BEGINNING) and |
| 24 | + player:hasCompletedQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.THE_TIGRESS_STRIKES) |
| 25 | + end, |
| 26 | + |
| 27 | + [xi.zone.WINDURST_WATERS_S] = |
| 28 | + { |
| 29 | + ['Door_Acolyte_Hostel_down'] = |
| 30 | + { |
| 31 | + onTrigger = function(player, npc) |
| 32 | + return quest:progressEvent(151) |
| 33 | + end, |
| 34 | + }, |
| 35 | + |
| 36 | + onEventFinish = |
| 37 | + { |
| 38 | + [151] = function(player, csid, option, npc) |
| 39 | + if option == 1 then |
| 40 | + quest:begin(player) |
| 41 | + end |
| 42 | + end, |
| 43 | + }, |
| 44 | + }, |
| 45 | + }, |
| 46 | + |
| 47 | + -- Speak with the Bulwark Gate, trade a One Hundred Eight Knot Quipu, |
| 48 | + -- enter Southern San d'Oria [S] from East Ronfaure [S], then check the door. |
| 49 | + { |
| 50 | + check = function(player, status, vars) |
| 51 | + return status == xi.questStatus.QUEST_ACCEPTED |
| 52 | + end, |
| 53 | + |
| 54 | + [xi.zone.SAUROMUGUE_CHAMPAIGN_S] = |
| 55 | + { |
| 56 | + ['Bulwark_Gate'] = |
| 57 | + { |
| 58 | + onTrigger = function(player, npc) |
| 59 | + if quest:getVar(player, 'Prog') == 0 then |
| 60 | + return quest:progressEvent(105) |
| 61 | + elseif quest:getVar(player, 'Prog') == 1 then |
| 62 | + return quest:event(107) |
| 63 | + elseif quest:getVar(player, 'Prog') == 2 then |
| 64 | + return quest:event(108) |
| 65 | + end |
| 66 | + end, |
| 67 | + |
| 68 | + onTrade = function(player, npc, trade) |
| 69 | + if |
| 70 | + quest:getVar(player, 'Prog') == 1 and |
| 71 | + npcUtil.tradeHasExactly(trade, { xi.item.ONE_HUNDRED_EIGHT_KNOT_QUIPU }) |
| 72 | + then |
| 73 | + return quest:progressEvent(106) |
| 74 | + end |
| 75 | + end, |
| 76 | + }, |
| 77 | + |
| 78 | + onEventFinish = |
| 79 | + { |
| 80 | + [105] = function(player, csid, option, npc) |
| 81 | + quest:setVar(player, 'Prog', 1) |
| 82 | + end, |
| 83 | + |
| 84 | + [106] = function(player, csid, option, npc) |
| 85 | + player:confirmTrade() |
| 86 | + quest:setVar(player, 'Prog', 2) |
| 87 | + end, |
| 88 | + }, |
| 89 | + }, |
| 90 | + |
| 91 | + [xi.zone.SOUTHERN_SAN_DORIA_S] = |
| 92 | + { |
| 93 | + onZoneIn = function(player, prevZone) |
| 94 | + if |
| 95 | + prevZone == xi.zone.EAST_RONFAURE_S and |
| 96 | + quest:getVar(player, 'Prog') == 2 |
| 97 | + then |
| 98 | + return 62 |
| 99 | + end |
| 100 | + end, |
| 101 | + |
| 102 | + ['_6eo'] = |
| 103 | + { |
| 104 | + onTrigger = function(player, npc) |
| 105 | + if quest:getVar(player, 'Prog') == 3 then |
| 106 | + return quest:progressEvent(63) |
| 107 | + end |
| 108 | + end, |
| 109 | + }, |
| 110 | + |
| 111 | + onEventFinish = |
| 112 | + { |
| 113 | + [62] = function(player, csid, option, npc) |
| 114 | + quest:setVar(player, 'Prog', 3) |
| 115 | + end, |
| 116 | + |
| 117 | + [63] = function(player, csid, option, npc) |
| 118 | + quest:complete(player) |
| 119 | + end, |
| 120 | + }, |
| 121 | + }, |
| 122 | + }, |
| 123 | +} |
| 124 | + |
| 125 | +return quest |
0 commit comments