Skip to content
Open
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
2 changes: 1 addition & 1 deletion scripts/globals/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ xi.quest.id =
BOY_AND_THE_BEAST = 24, -- + Converted
WRATH_OF_THE_GRIFFON = 25, -- + Converted
THE_LOST_BOOK = 26, -- + Converted
KNOT_QUITE_THERE = 27,
KNOT_QUITE_THERE = 27, -- + Converted
A_MANIFEST_PROBLEM = 28,
BEANS_AHOY = 29, -- +
BEAST_FROM_THE_EAST = 30,
Expand Down
125 changes: 125 additions & 0 deletions scripts/quests/crystalWar/Knot_Quite_There.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
-----------------------------------
-- Knot Quite There
-----------------------------------
-- !addquest 7 27
-- Door Acolyte Hostel : !pos 124.000 -3.000 222.215 94
-- Bulwark Gate : !pos -445 0 342 98
-- Door:House : !pos 148 0 27 80
-----------------------------------

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

quest.reward =
{
item = xi.item.PLATINUM_BEASTCOIN,
}

quest.sections =
{
-- Talk to the Door Acolyte Hostel in Windurst Waters [S].
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_AVAILABLE and
player:hasCompletedMission(xi.mission.log_id.WOTG, xi.mission.id.wotg.BACK_TO_THE_BEGINNING) and
player:hasCompletedQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.THE_TIGRESS_STRIKES)
end,

[xi.zone.WINDURST_WATERS_S] =
{
['Door_Acolyte_Hostel_down'] =
{
onTrigger = function(player, npc)
return quest:progressEvent(151)
end,
},

onEventFinish =
{
[151] = function(player, csid, option, npc)
if option == 1 then
quest:begin(player)
end
end,
},
},
},

-- Speak with the Bulwark Gate, trade a One Hundred Eight Knot Quipu,
-- enter Southern San d'Oria [S] from East Ronfaure [S], then check the door.
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED
end,

[xi.zone.SAUROMUGUE_CHAMPAIGN_S] =
{
['Bulwark_Gate'] =
{
onTrigger = function(player, npc)
if quest:getVar(player, 'Prog') == 0 then
return quest:progressEvent(105)
elseif quest:getVar(player, 'Prog') == 1 then
return quest:event(107)
elseif quest:getVar(player, 'Prog') == 2 then
return quest:event(108)
end
end,

onTrade = function(player, npc, trade)
if
quest:getVar(player, 'Prog') == 1 and
npcUtil.tradeHasExactly(trade, { xi.item.ONE_HUNDRED_EIGHT_KNOT_QUIPU })
then
return quest:progressEvent(106)
end
end,
},

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

[106] = function(player, csid, option, npc)
player:confirmTrade()
quest:setVar(player, 'Prog', 2)
end,
},
},

[xi.zone.SOUTHERN_SAN_DORIA_S] =
{
onZoneIn = function(player, prevZone)
if
prevZone == xi.zone.EAST_RONFAURE_S and
quest:getVar(player, 'Prog') == 2
then
return 62
end
end,

['_6eo'] =
{
onTrigger = function(player, npc)
if quest:getVar(player, 'Prog') == 3 then
return quest:progressEvent(63)
end
end,
},

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

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

return quest
23 changes: 0 additions & 23 deletions scripts/zones/Sauromugue_Champaign_[S]/npcs/Bulwark_Gate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,12 @@
local entity = {}

entity.onTrade = function(player, npc, trade)
if
player:getQuestStatus(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.KNOT_QUITE_THERE) == xi.questStatus.QUEST_ACCEPTED and
player:getCharVar('KnotQuiteThere') == 1
then
if
trade:hasItemQty(xi.item.ONE_HUNDRED_EIGHT_KNOT_QUIPU, 1) and
trade:getGil() == 0 and
trade:getItemCount() == 1
then
player:startEvent(106)
end
end
end

entity.onTrigger = function(player, npc)
if player:getQuestStatus(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.KNOT_QUITE_THERE) == xi.questStatus.QUEST_ACCEPTED then
if player:getCharVar('KnotQuiteThere') == 0 then
player:startEvent(105)
end
end
end

entity.onEventFinish = function(player, csid, option, npc)
if csid == 105 then
player:setCharVar('KnotQuiteThere', 1)
elseif csid == 106 then
player:tradeComplete()
player:setCharVar('KnotQuiteThere', 2)
end
end

return entity
12 changes: 0 additions & 12 deletions scripts/zones/Southern_San_dOria_[S]/Zone.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ zoneObject.onInitialize = function(zone)
end

zoneObject.onZoneIn = function(player, prevZone)
if prevZone == xi.zone.EAST_RONFAURE_S then
if
player:getQuestStatus(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.KNOT_QUITE_THERE) == xi.questStatus.QUEST_ACCEPTED and
player:getCharVar('KnotQuiteThere') == 2
then
return 62
end
end

return xi.moghouse.onMoghouseZoneEvent(player, prevZone)
end

Expand All @@ -31,9 +22,6 @@ zoneObject.onEventUpdate = function(player, csid, option, npc)
end

zoneObject.onEventFinish = function(player, csid, option, npc)
if csid == 62 then
player:setCharVar('KnotQuiteThere', 3)
end
end

return zoneObject
18 changes: 0 additions & 18 deletions scripts/zones/Southern_San_dOria_[S]/npcs/_6eo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,13 @@
-- !pos 148 0 27 80
-- Involved in Knot Quite There
-----------------------------------
local ID = zones[xi.zone.SOUTHERN_SAN_DORIA_S]
-----------------------------------
---@type TNpcEntity
local entity = {}

entity.onTrigger = function(player, npc)
if
player:getQuestStatus(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.KNOT_QUITE_THERE) == xi.questStatus.QUEST_ACCEPTED and
player:getCharVar('KnotQuiteThere') == 3
then
player:startEvent(63)
end
end

entity.onEventFinish = function(player, csid, option, npc)
if csid == 63 then
if player:getFreeSlotsCount() == 0 then
player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED, xi.item.PLATINUM_BEASTCOIN)
else
player:completeQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.KNOT_QUITE_THERE)
player:addItem(xi.item.PLATINUM_BEASTCOIN)
player:messageSpecial(ID.text.ITEM_OBTAINED, xi.item.PLATINUM_BEASTCOIN)
player:setCharVar('KnotQuiteThere', 0)
end
end
end

return entity
1 change: 1 addition & 0 deletions scripts/zones/Windurst_Waters_[S]/DefaultActions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ return {
['Churacoco'] = { event = 434 },
['Corbrere'] = { event = 414 },
['Dallus-Mallus'] = { event = 323 },
['Door_Acolyte_Hostel_down'] = { text = ID.text.DOOR_ACOLYTE_HOSTEL_LOCKED },
['Eih_Lhogotan'] = { event = 407 },
['Ekki-Mokki'] = { event = 409 },
['Emhi_Tchaoryo'] = { event = 307 },
Expand Down
2 changes: 1 addition & 1 deletion scripts/zones/Windurst_Waters_[S]/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ zones[xi.zone.WINDURST_WATERS_S] =
HOMEPOINT_SET = 10886, -- Home point set!
YASSI_POSSI_DIALOG = 10906, -- Swifty-wifty and safey-wafey parcel delivery! Is there something you need to send?
EZURAROMAZURA_SHOP_DIALOG = 10907, -- A potent spelly-well or two can be the key to survival in this time of war. But can you mastaru my magic, or will it master you?
DOOR_ACOLYTE_HOSTEL_LOCKED = 11349, -- The door appears to be locked...
DOOR_ACOLYTE_HOSTEL_LOCKED = 11350, -- The door appears to be locked...
MIKHE_ARYOHCHA_DIALOG = 12486, -- Do you like the headpiece? I made it from my firrrst victim. I wear it to let everrryone know what happens when they cross Mikhe Aryohcha!
LUTETE_DIALOG = 12488, -- <Yaaawn>... Mastering these Near Eastern magics can be quite taxing. If I had a choice, I'd rather be back in bed, relaxing...
CAMPAIGN_RESULTS_TALLIED = 12574, -- Campaign results tallied.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ entity.onTrigger = function(player, npc)
player:hasKeyItem(xi.ki.SMALL_STARFRUIT)
then
player:startEvent(129)
elseif
player:getQuestStatus(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.THE_TIGRESS_STRIKES) == xi.questStatus.QUEST_COMPLETED and
player:getQuestStatus(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.KNOT_QUITE_THERE) == xi.questStatus.QUEST_AVAILABLE and
player:hasCompletedMission(xi.mission.log_id.WOTG, xi.mission.id.wotg.BACK_TO_THE_BEGINNING)
then
player:startEvent(151)
elseif player:getQuestStatus(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.KNOT_QUITE_THERE) == xi.questStatus.QUEST_ACCEPTED then
player:startEvent(152)
else
player:messageSpecial(ID.text.DOOR_ACOLYTE_HOSTEL_LOCKED)
end
end

Expand All @@ -33,8 +23,6 @@ entity.onEventFinish = function(player, csid, option, npc)
player:messageSpecial(ID.text.ITEM_OBTAINED, 4144)
player:delKeyItem(xi.ki.SMALL_STARFRUIT)
player:completeQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.THE_TIGRESS_STIRS)
elseif csid == 151 then
player:addQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.KNOT_QUITE_THERE)
end
end

Expand Down
Loading