From 4d424e57f9c66468ba7af74147e36383c8706ad1 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Tue, 29 Mar 2022 21:19:35 -0400 Subject: [PATCH 01/12] Adding the rest of the wld quests: Sanguine Studies, Secrets Unearthed, and Rustproof. --- Data/scripts/quests/wld/wld0u2.lua | 104 +++++++++++++++++++++++++++++ Data/scripts/quests/wld/wld0u3.lua | 93 ++++++++++++++++++++++++++ Data/scripts/quests/wld/wld0u4.lua | 104 +++++++++++++++++++++++++++++ 3 files changed, 301 insertions(+) create mode 100644 Data/scripts/quests/wld/wld0u2.lua create mode 100644 Data/scripts/quests/wld/wld0u3.lua create mode 100644 Data/scripts/quests/wld/wld0u4.lua diff --git a/Data/scripts/quests/wld/wld0u2.lua b/Data/scripts/quests/wld/wld0u2.lua new file mode 100644 index 00000000..445dd148 --- /dev/null +++ b/Data/scripts/quests/wld/wld0u2.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: Sanguine Studies +Code: Wld0u2 +Id: 110754 +Prereq: Level 27, Any Class + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Amal'jaa Grunts +SEQ_001 = 1; -- Talk to Papala. + +-- Actor Class Ids +ENPC_PAPALA = 1001316; +BNPC_AMALJAA_GRUNTS = 2106537; + +-- Quest Markers +MRKR_PAPALA = 11130101; +MRKR_AMALJAA_GRUNTS = 11130102; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_AMOUNT = 8; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_PAPALA, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_PAPALA); + quest:SetENpc(BNPC_AMALJAA_GRUNTS); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_PAPALA, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_PAPALA and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventPapalaStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_PAPALA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000"); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_PAPALA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +-- TODO FINISH THIS +function onKillBNpc(player, quest, bnpc) + if (bnpc == BNPC_AMALJAA_GRUNTS) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_AMALJAA_GRUNTS; + elseif (sequence == SEQ_001) then + return MRKR_PAPALA; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/wld/wld0u3.lua b/Data/scripts/quests/wld/wld0u3.lua new file mode 100644 index 00000000..030c6fe9 --- /dev/null +++ b/Data/scripts/quests/wld/wld0u3.lua @@ -0,0 +1,93 @@ +require ("global") + +--[[ + +Quest Script + +Name: Secrets Unearthed +Code: Wld0u3 +Id: 110756 +Prereq: Level 17, Any Class + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Talk to Mumukiya. +SEQ_001 = 1; -- Talk to Abelard. + +-- Actor Class Ids +MUMUKIYA = 1001165; +ABELARD = 1001596; + +-- Quest Markers +MRKR_ABELARD = 11130201; +MRKR_MUMUKIYA = 11130202; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(MUMUKIYA, QFLAG_PLATE); + end + + if (sequence == SEQ_000) then + quest:SetENpc(MUMUKIYA); + quest:SetENpc(ABELARD, QFLAG_PLATE); + elseif (sequence == SEQ_001) then + quest:SetENpc(ABELARD); + quest:SetENpc(MUMUKIYA, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == MUMUKIYA and not player:HasQuest(quest)) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventMUMUKIYAStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + end + + -- Quest Progress + if (seq == SEQ_000) then + if (npcClassId == MUMUKIYA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_000"); + elseif (npcClassId == ABELARD) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_010"); + quest:StartSequence(SEQ_001); + end + elseif (seq == SEQ_001) then + --Quest Complete + if (npcClassId == MUMUKIYA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_020"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + elseif (npcClassId == ABELARD) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_1"); + quest:StartSequence(SEQ_001); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_ABELARD; + elseif (sequence == SEQ_001) then + return MRKR_MUMUKIYA; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/wld/wld0u4.lua b/Data/scripts/quests/wld/wld0u4.lua new file mode 100644 index 00000000..dd77783c --- /dev/null +++ b/Data/scripts/quests/wld/wld0u4.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: Sanguine Studies +Code: Wld0u4 +Id: 1107546 +Prereq: Level 28, Any Class, Sanguine Studies completed. + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Amal'jaa Drudges +SEQ_001 = 1; -- Talk to Papala. + +-- Actor Class Ids +ENPC_PAPALA = 1001316; +BNPC_AMALJAA_DRUDGES = 2106542; + +-- Quest Markers +MRKR_AMALJAA_DRUDGES = 11130301; +MRKR_PAPALA = 11130302; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_AMOUNT = 8; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_PAPALA, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_PAPALA); + quest:SetENpc(BNPC_AMALJAA_DRUDGES); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_PAPALA, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_PAPALA and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventPAPALAStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_PAPALA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1"); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_PAPALA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +-- TODO FINISH THIS +function onKillBNpc(player, quest, bnpc) + if (bnpc == BNPC_AMALJAA_DRUDGES) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_AMALJAA_DRUDGES; + elseif (sequence == SEQ_001) then + return MRKR_PAPALA; + end +end \ No newline at end of file From c2169576c2873a7fb9ffbf8deb8708e7529101f4 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Tue, 29 Mar 2022 22:00:18 -0400 Subject: [PATCH 02/12] Fixed Til Death Do Us Part and Beryl Overboard so that the proper attention msgs appear. Also added missing params to the funcs defining the objective quantity. --- Data/scripts/quests/etc/etc1l5.lua | 8 ++++---- Data/scripts/quests/etc/etc1l6.lua | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Data/scripts/quests/etc/etc1l5.lua b/Data/scripts/quests/etc/etc1l5.lua index 46e69825..94810b0c 100644 --- a/Data/scripts/quests/etc/etc1l5.lua +++ b/Data/scripts/quests/etc/etc1l5.lua @@ -27,6 +27,7 @@ MRKR_HLAHONO = 11063802; COUNTER_QUESTITEM = 0; -- Quest Details +OBJECTIVE_ITEMID = 11000149; OBJECTIVE_AMOUNT = 8; function onStart(player, quest) @@ -53,7 +54,7 @@ function onTalk(player, quest, npc, eventName) -- Offer the quest if (npcClassId == ENPC_HLAHONO and seq == SEQ_ACCEPT) then - local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventLahonoStart"); + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventLahonoStart", 0, OBJECTIVE_AMOUNT); if (questAccepted == 1) then player:AcceptQuest(quest); end @@ -62,7 +63,7 @@ function onTalk(player, quest, npc, eventName) -- Quest Progress elseif (seq == SEQ_000) then if (npcClassId == ENPC_HLAHONO) then - callClientFunction(player, "delegateEvent", player, quest, "processEventFree"); + callClientFunction(player, "delegateEvent", player, quest, "processEventFree", 0, OBJECTIVE_AMOUNT); end --Quest Complete elseif (seq == SEQ_001) then @@ -77,11 +78,10 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_MUSK_ROSELING) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); diff --git a/Data/scripts/quests/etc/etc1l6.lua b/Data/scripts/quests/etc/etc1l6.lua index ce29c0cc..5f1211cf 100644 --- a/Data/scripts/quests/etc/etc1l6.lua +++ b/Data/scripts/quests/etc/etc1l6.lua @@ -27,6 +27,7 @@ MRKR_NANAPIRI = 11063902; COUNTER_QUESTITEM = 0; -- Quest Details +OBJECTIVE_ITEMID = 11000150; OBJECTIVE_AMOUNT = 8; function onStart(player, quest) @@ -53,7 +54,7 @@ function onTalk(player, quest, npc, eventName) -- Offer the quest if (npcClassId == ENPC_NANAPIRI and seq == SEQ_ACCEPT) then - local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventNanapiriStart"); + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventNanapiriStart", OBJECTIVE_AMOUNT); if (questAccepted == 1) then player:AcceptQuest(quest); end @@ -62,7 +63,7 @@ function onTalk(player, quest, npc, eventName) -- Quest Progress elseif (seq == SEQ_000) then if (npcClassId == ENPC_NANAPIRI) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2"); + callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2", OBJECTIVE_AMOUNT); end --Quest Complete elseif (seq == SEQ_001) then @@ -77,11 +78,10 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_BERYL_CRAB) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); From 4d2c80a8ee75ca4eaf4fff1f047a8cae5a2d77ea Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Tue, 29 Mar 2022 22:01:03 -0400 Subject: [PATCH 03/12] testbnpckill was missing it's extension --- Data/scripts/commands/gm/{testbnpckill => testbnpckill.lua} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Data/scripts/commands/gm/{testbnpckill => testbnpckill.lua} (100%) diff --git a/Data/scripts/commands/gm/testbnpckill b/Data/scripts/commands/gm/testbnpckill.lua similarity index 100% rename from Data/scripts/commands/gm/testbnpckill rename to Data/scripts/commands/gm/testbnpckill.lua From a1bb84e80dadcfea21ca463c370bec7ba4a64b6c Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Tue, 29 Mar 2022 22:57:02 -0400 Subject: [PATCH 04/12] Fixed up Food for Thought (emotes work now) and Have You Seen my Son (bnpc works). --- Data/scripts/quests/etc/etc1l7.lua | 11 ++++---- Data/scripts/quests/etc/etc1l8.lua | 43 +++++++++++++++++------------- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/Data/scripts/quests/etc/etc1l7.lua b/Data/scripts/quests/etc/etc1l7.lua index 1679a1e8..158ba267 100644 --- a/Data/scripts/quests/etc/etc1l7.lua +++ b/Data/scripts/quests/etc/etc1l7.lua @@ -32,6 +32,7 @@ MRKR_BOMB_AREA = 11064003; COUNTER_QUESTITEM = 0; -- Quest Details +OBJECTIVE_ITEMID = 11000151; OBJECTIVE_AMOUNT = 8; function onStart(player, quest) @@ -46,12 +47,12 @@ function onStateChange(player, quest, sequence) quest:SetENpc(ENPC_IMANIA, QFLAG_PLATE); elseif (sequence == SEQ_000) then quest:SetENpc(ENPC_IMANIA); - quest:SetENpc(ENPC_YUYUBESU, QFLAG_REWARD); + quest:SetENpc(ENPC_YUYUBESU, QFLAG_PLATE); elseif (sequence == SEQ_001) then quest:SetENpc(ENPC_YUYUBESU); quest:SetENpc(BNPC_BOMB_EMBER); elseif (sequence == SEQ_002) then - quest:SetENpc(ENPC_YUYUBESU, QFLAG_REWARD); + quest:SetENpc(ENPC_YUYUBESU, QFLAG_PLATE); elseif (sequence == SEQ_003) then quest:SetENpc(ENPC_YUYUBESU); quest:SetENpc(ENPC_HILDIE, QFLAG_REWARD); @@ -81,11 +82,11 @@ function onTalk(player, quest, npc, eventName) --Quest Complete elseif (seq == SEQ_001) then if (npcClassId == ENPC_YUYUBESU) then - callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuFree"); + callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuFree", 0, OBJECTIVE_AMOUNT); end elseif (seq == SEQ_002) then if (npcClassId == ENPC_YUYUBESU) then - callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuAfter"); + callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuAfter", 0, OBJECTIVE_AMOUNT); quest:StartSequence(SEQ_003); end elseif (seq == SEQ_003) then @@ -106,7 +107,7 @@ end function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_BOMB_EMBER) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_002); diff --git a/Data/scripts/quests/etc/etc1l8.lua b/Data/scripts/quests/etc/etc1l8.lua index 3bf7d57c..f6978629 100644 --- a/Data/scripts/quests/etc/etc1l8.lua +++ b/Data/scripts/quests/etc/etc1l8.lua @@ -17,7 +17,7 @@ SEQ_001 = 1; -- Return to Dympna. -- Actor Class Ids DYMPNA = 1000331; -AERGWNYT = 1000347; +AERGWYNT = 1000347; FERDILLAIX = 1000344; BUBUROON = 1000219; RBAHARRA = 1000340; @@ -25,14 +25,14 @@ FUFUNA = 1000345; -- Quest Markers MRKR_DYMPNA = 11064101; -MRKR_AERGWNYT = 11064102; +MRKR_AERGWYNT = 11064102; MRKR_FERDILLAIX = 11064103; MRKR_BUBUROON = 11064104; MRKR_RBAHARRA = 11064105; MRKR_FUFUNA = 11064106; -- Quest Flags -FLAG_TALKED_AERGWNYT = 0; +FLAG_TALKED_AERGWYNT = 0; FLAG_TALKED_FERDILLAIX = 1; FLAG_TALKED_BUBUROON = 2; FLAG_TALKED_RBAHARRA = 3; @@ -50,17 +50,17 @@ end function onStateChange(player, quest, sequence) if (sequence == SEQ_ACCEPT) then - quest:SetENpc(DYMPNA, QFLAG_NORM); + quest:SetENpc(DYMPNA, QFLAG_PLATE); end local data = quest:GetData(); if (sequence == SEQ_000) then quest:SetENpc(DYMPNA); - quest:SetENpc(AERGWNYT, (not data:GetFlag(FLAG_TALKED_AERGWNYT) and QFLAG_NORM or QFLAG_NONE)); - quest:SetENpc(FERDILLAIX, (not data:GetFlag(FLAG_TALKED_FERDILLAIX) and QFLAG_NORM or QFLAG_NONE)); - quest:SetENpc(BUBUROON, (not data:GetFlag(FLAG_TALKED_BUBUROON) and QFLAG_NORM or QFLAG_NONE)); - quest:SetENpc(RBAHARRA, (not data:GetFlag(FLAG_TALKED_RBAHARRA) and QFLAG_NORM or QFLAG_NONE)); - quest:SetENpc(FUFUNA, (not data:GetFlag(FLAG_TALKED_FUFUNA) and QFLAG_NORM or QFLAG_NONE)); + quest:SetENpc(AERGWYNT, (not data:GetFlag(FLAG_TALKED_AERGWYNT) and QFLAG_PLATE or QFLAG_NONE), true, false, true); + quest:SetENpc(FERDILLAIX, (not data:GetFlag(FLAG_TALKED_FERDILLAIX) and QFLAG_PLATE or QFLAG_NONE), true, false, true); + quest:SetENpc(BUBUROON, (not data:GetFlag(FLAG_TALKED_BUBUROON) and QFLAG_PLATE or QFLAG_NONE), true, false, true); + quest:SetENpc(RBAHARRA, (not data:GetFlag(FLAG_TALKED_RBAHARRA) and QFLAG_PLATE or QFLAG_NONE), true, false, true); + quest:SetENpc(FUFUNA, (not data:GetFlag(FLAG_TALKED_FUFUNA) and QFLAG_PLATE or QFLAG_NONE), true, false, true); elseif (sequence == SEQ_001) then quest:SetENpc(DYMPNA, QFLAG_REWARD); end @@ -85,8 +85,8 @@ function onTalk(player, quest, npc, eventName) if (seq == SEQ_000) then if (npcClassId == DYMPNA) then callClientFunction(player, "delegateEvent", player, quest, "processEventOffersAfter"); - elseif (npcClassId == AERGWNYT) then - if (not data:GetFlag(FLAG_TALKED_AERGWNYT)) then + elseif (npcClassId == AERGWYNT) then + if (not data:GetFlag(FLAG_TALKED_AERGWYNT)) then callClientFunction(player, "delegateEvent", player, quest, "processEventAergwyntSpeak"); else callClientFunction(player, "delegateEvent", player, quest, "processEventAergwyntAfter"); @@ -133,12 +133,19 @@ function onEmote(player, quest, npc, eventName) local seq = quest:GetSequence(); local data = quest:GetData(); local incCounter = false; - + + -- Play the emote + if (eventName == "emoteDefault1") then -- Psych + player:DoEmote(npc.Id, 30, 21291); + end + wait(2.5); + + -- Handle the result if (seq == SEQ_000 and eventName == "emoteDefault1") then - if (npcClassId == AERGWNYT) then - if (not data:GetFlag(FLAG_TALKED_AERGWNYT)) then + if (npcClassId == AERGWYNT) then + if (not data:GetFlag(FLAG_TALKED_AERGWYNT)) then callClientFunction(player, "delegateEvent", player, quest, "processEventAergwynt"); - data:SetFlag(FLAG_TALKED_AERGWNYT); + data:SetFlag(FLAG_TALKED_AERGWYNT); incCounter = true; end elseif (npcClassId == FERDILLAIX) then @@ -175,7 +182,7 @@ function onEmote(player, quest, npc, eventName) if (seq000_checkCondition(data)) then -- All informants spoken to attentionMessage(player, 25225, quest.GetQuestId()); -- objectives complete! - quest:UpdateENPCs(); -- Band-aid for a QFLAG_NORM issue + quest:UpdateENPCs(); -- Band-aid for a QFLAG_PLATE issue quest:StartSequence(SEQ_001); end end @@ -187,7 +194,7 @@ end -- Check if all informants are talked to function seq000_checkCondition(data) - return (data:GetFlag(FLAG_TALKED_AERGWNYT) and + return (data:GetFlag(FLAG_TALKED_AERGWYNT) and data:GetFlag(FLAG_TALKED_FERDILLAIX) and data:GetFlag(FLAG_TALKED_BUBUROON) and data:GetFlag(FLAG_TALKED_RBAHARRA) and @@ -200,7 +207,7 @@ function getJournalMapMarkerList(player, quest) local possibleMarkers = {}; if (sequence == SEQ_000) then - if (not data:GetFlag(FLAG_TALKED_AERGWNYT)) then table.insert(possibleMarkers, MRKR_AERGWNYT); end + if (not data:GetFlag(FLAG_TALKED_AERGWYNT)) then table.insert(possibleMarkers, MRKR_AERGWYNT); end if (not data:GetFlag(FLAG_TALKED_FERDILLAIX)) then table.insert(possibleMarkers, MRKR_FERDILLAIX); end if (not data:GetFlag(FLAG_TALKED_BUBUROON)) then table.insert(possibleMarkers, MRKR_BUBUROON); end if (not data:GetFlag(FLAG_TALKED_RBAHARRA)) then table.insert(possibleMarkers, MRKR_RBAHARRA); end From f6ff56299f50d531491529a4e0c1fb25e3d80ef0 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Tue, 29 Mar 2022 23:56:08 -0400 Subject: [PATCH 05/12] Fixed up some more quests! --- Data/scripts/quests/etc/etc1g5.lua | 17 +++++++++-------- Data/scripts/quests/etc/etc1l0.lua | 20 ++++++++++---------- Data/scripts/quests/etc/etc1l1.lua | 15 +++++++-------- Data/scripts/quests/etc/etc1l3.lua | 8 ++++---- Data/scripts/quests/etc/etc1u1.lua | 20 ++++++++++---------- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/Data/scripts/quests/etc/etc1g5.lua b/Data/scripts/quests/etc/etc1g5.lua index 3a3bba1e..eb435c4f 100644 --- a/Data/scripts/quests/etc/etc1g5.lua +++ b/Data/scripts/quests/etc/etc1g5.lua @@ -24,10 +24,11 @@ MRKR_BRISTLETAIL_AREA = 11065901; MRKR_BELI = 11065902; -- Counters -COUNTER_MARMOTHIDE = 0; +COUNTER_QUESTITEM = 0; -- Quest Details -OBJECTIVE_MARMOTHIDE = 8; +OBJECTIVE_ITEMID = 11000144; +OBJECTIVE_AMOUNT = 8; function onStart(player, quest) quest:StartSequence(SEQ_000); @@ -53,7 +54,7 @@ function onTalk(player, quest, npc, eventName) -- Offer the quest if (npcClassId == ENPC_BELI and seq == SEQ_ACCEPT) then - local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventLahonoStart"); + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventLahonoStart", 0, OBJECTIVE_AMOUNT); if (questAccepted == 1) then player:AcceptQuest(quest); end @@ -62,7 +63,7 @@ function onTalk(player, quest, npc, eventName) -- Quest Progress elseif (seq == SEQ_000) then if (npcClassId == ENPC_BELI) then - callClientFunction(player, "delegateEvent", player, quest, "processEventFree"); + callClientFunction(player, "delegateEvent", player, quest, "processEventFree", 0, OBJECTIVE_AMOUNT); end --Quest Complete elseif (seq == SEQ_001) then @@ -80,9 +81,9 @@ end -- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_BRISTLETAIL_MARMOT) then - local counterAmount = quest:GetData():IncCounter(COUNTER_MARMOTHIDE); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain - if (counterAmount >= OBJECTIVE_MARMOTHIDE) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); end @@ -90,7 +91,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_MARMOTHIDE); + return quest:GetData():GetCounter(COUNTER_QUESTITEM); end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/etc/etc1l0.lua b/Data/scripts/quests/etc/etc1l0.lua index f65d550a..85fd53c4 100644 --- a/Data/scripts/quests/etc/etc1l0.lua +++ b/Data/scripts/quests/etc/etc1l0.lua @@ -24,10 +24,11 @@ MRKR_JELLIES_AREA = 11063301; MRKR_HALDBERK = 11063302; -- Counters -COUNTER_RINGS = 0; +COUNTER_QUESTITEM = 0; -- Quest Details -OBJECTIVE_RINGS = 8; +OBJECTIVE_ITEMID = 11000147; +OBJECTIVE_AMOUNT = 8; function onStart(player, quest) quest:StartSequence(SEQ_000); @@ -53,7 +54,7 @@ function onTalk(player, quest, npc, eventName) -- Offer the quest if (npcClassId == ENPC_HALDBERK and seq == SEQ_ACCEPT) then - local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventHaldberkStart"); + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventHaldberkStart", OBJECTIVE_AMOUNT); if (questAccepted == 1) then player:AcceptQuest(quest); end @@ -62,12 +63,12 @@ function onTalk(player, quest, npc, eventName) -- Quest Progress elseif (seq == SEQ_000) then if (npcClassId == ENPC_HALDBERK) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000"); + callClientFunction(player, "delegateEvent", player, quest, "processEvent000", 0, OBJECTIVE_AMOUNT); end --Quest Complete elseif (seq == SEQ_001) then if (npcClassId == ENPC_HALDBERK) then - callClientFunction(player, "delegateEvent", player, quest, "Etc1l0.processEvent010"); + callClientFunction(player, "delegateEvent", player, quest, "processEvent010", 2); callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); player:CompleteQuest(quest); end @@ -77,12 +78,11 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_JETSAM_JELLIES) then - local counterAmount = quest:GetData():IncCounter(COUNTER_RINGS); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain - if (counterAmount >= OBJECTIVE_RINGS) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); end @@ -90,7 +90,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_RINGS); + return quest:GetData():GetCounter(COUNTER_QUESTITEM); end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/etc/etc1l1.lua b/Data/scripts/quests/etc/etc1l1.lua index 4a9cbe04..7347f7f1 100644 --- a/Data/scripts/quests/etc/etc1l1.lua +++ b/Data/scripts/quests/etc/etc1l1.lua @@ -27,7 +27,7 @@ MRKR_HIHINE = 11063402; COUNTER_KILLS = 0; -- Quest Details -OBJECTIVE_KILLS = 8; +OBJECTIVE_AMOUNT = 8; function onStart(player, quest) quest:StartSequence(SEQ_000); @@ -53,7 +53,7 @@ function onTalk(player, quest, npc, eventName) -- Offer the quest if (npcClassId == ENPC_HIHINE and seq == SEQ_ACCEPT) then - local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventHihineStart"); + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventHihineStart", OBJECTIVE_AMOUNT); if (questAccepted == 1) then player:AcceptQuest(quest); end @@ -62,7 +62,7 @@ function onTalk(player, quest, npc, eventName) -- Quest Progress elseif (seq == SEQ_000) then if (npcClassId == ENPC_HIHINE) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2"); + callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2", OBJECTIVE_AMOUNT); end --Quest Complete elseif (seq == SEQ_001) then @@ -77,12 +77,11 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_TOLL_PUK) then - local counterAmount = quest:GetData():IncCounter(COUNTER_SLUMBERNUT); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain - if (counterAmount >= OBJECTIVE_SLUMBERNUT) then + local counterAmount = quest:GetData():IncCounter(COUNTER_KILLS); + attentionMessage(player, 25241, counterAmount); -- You have defeated X enemies. + if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); end @@ -90,7 +89,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_SLUMBERNUT); + return quest:GetData():GetCounter(COUNTER_KILLS); end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/etc/etc1l3.lua b/Data/scripts/quests/etc/etc1l3.lua index a6f58c8e..acfb21db 100644 --- a/Data/scripts/quests/etc/etc1l3.lua +++ b/Data/scripts/quests/etc/etc1l3.lua @@ -29,6 +29,7 @@ MRKR_CHAUNOLLET = 11063602; COUNTER_QUESTITEM = 0; -- Quest Details +OBJECTIVE_ITEMID = 11000148; OBJECTIVE_AMOUNT = 8; function onStart(player, quest) @@ -57,7 +58,7 @@ function onTalk(player, quest, npc, eventName) -- Offer the quest if (npcClassId == ENPC_CHAUNOLLET and seq == SEQ_ACCEPT) then - local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventChaunolletStart"); + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventChaunolletStart", OBJECTIVE_AMOUNT); if (questAccepted == 1) then player:AcceptQuest(quest); end @@ -66,7 +67,7 @@ function onTalk(player, quest, npc, eventName) -- Quest Progress elseif (seq == SEQ_000) then if (npcClassId == ENPC_CHAUNOLLET) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000Chaunollet"); + callClientFunction(player, "delegateEvent", player, quest, "processEvent000Chaunollet", OBJECTIVE_AMOUNT); end --Quest Complete elseif (seq == SEQ_001) then @@ -81,11 +82,10 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_REAVER_EYES or bnpc == BNPC_REAVER_FINS or bnpc == BNPC_REAVER_CLAWS) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); diff --git a/Data/scripts/quests/etc/etc1u1.lua b/Data/scripts/quests/etc/etc1u1.lua index d5c13804..ef3fb404 100644 --- a/Data/scripts/quests/etc/etc1u1.lua +++ b/Data/scripts/quests/etc/etc1u1.lua @@ -24,10 +24,11 @@ MRKR_NUTGRABBER_AREA = 11067601; MRKR_KUKUSI = 11067602; -- Counters -COUNTER_SLUMBERNUT = 0; +COUNTER_QUESTITEM = 0; -- Quest Details -OBJECTIVE_SLUMBERNUT = 8; +OBJECTIVE_ITEMID = 11000154; +OBJECTIVE_AMOUNT = 8; function onStart(player, quest) quest:StartSequence(SEQ_000); @@ -53,7 +54,7 @@ function onTalk(player, quest, npc, eventName) -- Offer the quest if (npcClassId == ENPC_KUKUSI and seq == SEQ_ACCEPT) then - local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventKukusiStart"); + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventKukusiStart", 0, OBJECTIVE_AMOUNT); if (questAccepted == 1) then player:AcceptQuest(quest); end @@ -62,12 +63,12 @@ function onTalk(player, quest, npc, eventName) -- Quest Progress elseif (seq == SEQ_000) then if (npcClassId == ENPC_KUKUSI) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000_2"); + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_3", 0, OBJECTIVE_AMOUNT); end --Quest Complete elseif (seq == SEQ_001) then if (npcClassId == ENPC_KUKUSI) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000_3"); + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_2", 1); callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); player:CompleteQuest(quest); end @@ -77,12 +78,11 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_NUTGRABBER_MARMOT) then - local counterAmount = quest:GetData():IncCounter(COUNTER_SLUMBERNUT); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain - if (counterAmount >= OBJECTIVE_SLUMBERNUT) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); end @@ -90,7 +90,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_SLUMBERNUT); + return quest:GetData():GetCounter(COUNTER_QUESTITEM); end function getJournalMapMarkerList(player, quest) From e53e54b4bf1efeaf1221eb87f3a8f25e671e17bc Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Wed, 30 Mar 2022 00:17:59 -0400 Subject: [PATCH 06/12] Fixed more quests --- Data/scripts/quests/wld/wld0g1.lua | 15 +++++++++------ Data/scripts/quests/wld/wld0g3.lua | 22 +++++++++++----------- Data/scripts/quests/wld/wld0g4.lua | 14 +++++++------- Data/scripts/quests/wld/wld0u2.lua | 6 +++--- Data/scripts/quests/wld/wld0u4.lua | 10 +++++----- 5 files changed, 35 insertions(+), 32 deletions(-) diff --git a/Data/scripts/quests/wld/wld0g1.lua b/Data/scripts/quests/wld/wld0g1.lua index c04081af..d5cd5d42 100644 --- a/Data/scripts/quests/wld/wld0g1.lua +++ b/Data/scripts/quests/wld/wld0g1.lua @@ -24,7 +24,11 @@ MRKR_MARCETTE = 11120001; MRKR_SPRIGGAN_AREA = 11120002; -- Counters -COUNTER_TEETH = 0; +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000164; +OBJECTIVE_AMOUNT = 4; function onStart(player, quest) quest:StartSequence(SEQ_000); @@ -74,12 +78,11 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_SABLETOOTH_SPRIGGAN) then - local counterAmount = quest:GetData():IncCounter(COUNTER_TEETH); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You have passed on word of the rite. (... of 5) - if (counterAmount >= 4) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); end @@ -87,7 +90,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_TEETH); + return quest:GetData():GetCounter(COUNTER_QUESTITEM); end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/wld/wld0g3.lua b/Data/scripts/quests/wld/wld0g3.lua index e7577ccb..a2b6f165 100644 --- a/Data/scripts/quests/wld/wld0g3.lua +++ b/Data/scripts/quests/wld/wld0g3.lua @@ -16,18 +16,19 @@ SEQ_000 = 0; -- Kill Oilbugs. SEQ_001 = 1; -- Talk to Eugenaire. -- Actor Class Ids -ENPC_EUGENAIRE = 1001190; -BNPC_OILBUG = 2103910; +ENPC_EUGENAIRE = 1001190; +BNPC_OILBUG = 2103910; -- Quest Markers -MRKR_EUGENAIRE = 11120201; -MRKR_OILBUG_AREA = 11120202; +MRKR_EUGENAIRE = 11120201; +MRKR_OILBUG_AREA = 11120202; -- Counters -COUNTER_OIL = 0; +COUNTER_QUESTITEM = 0; -- Quest Details -OBJECTIVE_OIL = 8; +OBJECTIVE_ITEMID = 11000302; +OBJECTIVE_AMOUNT = 8; function onStart(player, quest) quest:StartSequence(SEQ_000); @@ -77,12 +78,11 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_OILBUG) then - local counterAmount = quest:GetData():IncCounter(COUNTER_OIL); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain - if (counterAmount >= OBJECTIVE_OIL) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); end @@ -90,7 +90,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_OIL); + return quest:GetData():GetCounter(COUNTER_QUESTITEM); end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/wld/wld0g4.lua b/Data/scripts/quests/wld/wld0g4.lua index ddf27916..a6c87c95 100644 --- a/Data/scripts/quests/wld/wld0g4.lua +++ b/Data/scripts/quests/wld/wld0g4.lua @@ -24,10 +24,11 @@ MRKR_MARCETTE = 11120302; MRKR_FUNGUAR_AREA = 11120301; -- Counters -COUNTER_SPORESAC = 0; +COUNTER_QUESTITEM = 0; -- Quest Details -OBJECTIVE_SPORESAC = 8; +OBJECTIVE_ITEMID = 11000301; +OBJECTIVE_AMOUNT = 8; function onStart(player, quest) quest:StartSequence(SEQ_000); @@ -77,12 +78,11 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_MATURE_FUNGUAR) then - local counterAmount = quest:GetData():IncCounter(COUNTER_SPORESAC); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain - if (counterAmount >= OBJECTIVE_SPORESAC) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); end @@ -90,7 +90,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_SPORESAC); + return quest:GetData():GetCounter(COUNTER_QUESTITEM); end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/wld/wld0u2.lua b/Data/scripts/quests/wld/wld0u2.lua index 445dd148..4fbd3b1d 100644 --- a/Data/scripts/quests/wld/wld0u2.lua +++ b/Data/scripts/quests/wld/wld0u2.lua @@ -27,7 +27,8 @@ MRKR_AMALJAA_GRUNTS = 11130102; COUNTER_QUESTITEM = 0; -- Quest Details -OBJECTIVE_AMOUNT = 8; +OBJECTIVE_ITEMID = 11000173; +OBJECTIVE_AMOUNT = 3; function onStart(player, quest) quest:StartSequence(SEQ_000); @@ -77,11 +78,10 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_AMALJAA_GRUNTS) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); diff --git a/Data/scripts/quests/wld/wld0u4.lua b/Data/scripts/quests/wld/wld0u4.lua index dd77783c..52d8d5c1 100644 --- a/Data/scripts/quests/wld/wld0u4.lua +++ b/Data/scripts/quests/wld/wld0u4.lua @@ -27,7 +27,8 @@ MRKR_PAPALA = 11130302; COUNTER_QUESTITEM = 0; -- Quest Details -OBJECTIVE_AMOUNT = 8; +OBJECTIVE_ITEMID = 11000303; +OBJECTIVE_AMOUNT = 6; function onStart(player, quest) quest:StartSequence(SEQ_000); @@ -53,7 +54,7 @@ function onTalk(player, quest, npc, eventName) -- Offer the quest if (npcClassId == ENPC_PAPALA and seq == SEQ_ACCEPT) then - local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventPAPALAStart"); + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventPAPALAStart", OBJECTIVE_AMOUNT); if (questAccepted == 1) then player:AcceptQuest(quest); end @@ -62,7 +63,7 @@ function onTalk(player, quest, npc, eventName) -- Quest Progress elseif (seq == SEQ_000) then if (npcClassId == ENPC_PAPALA) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1"); + callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1", OBJECTIVE_AMOUNT); end --Quest Complete elseif (seq == SEQ_001) then @@ -77,11 +78,10 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) if (bnpc == BNPC_AMALJAA_DRUDGES) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); From 938cca02989a6fc234070b900873edb9ea10fe63 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Wed, 30 Mar 2022 00:59:56 -0400 Subject: [PATCH 07/12] Added An Inconvenient Dodo and Besmitten and Besmirched. --- Data/scripts/quests/etc/etc1u5.lua | 103 ++++++++++++++++++++++++++++ Data/scripts/quests/etc/etc1u6.lua | 104 +++++++++++++++++++++++++++++ 2 files changed, 207 insertions(+) create mode 100644 Data/scripts/quests/etc/etc1u5.lua create mode 100644 Data/scripts/quests/etc/etc1u6.lua diff --git a/Data/scripts/quests/etc/etc1u5.lua b/Data/scripts/quests/etc/etc1u5.lua new file mode 100644 index 00000000..e6ef821c --- /dev/null +++ b/Data/scripts/quests/etc/etc1u5.lua @@ -0,0 +1,103 @@ +require ("global") + +--[[ + +Quest Script + +Name: An Inconvenient Dodo +Code: Etc1u5 +Id: 110680 +Prereq: Level 15, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Stuffed Dodos. +SEQ_001 = 1; -- Talk to U'Bokhn. + +-- Actor Class Ids +ENPC_UBOKHN = 1000668; +BNPC_STUFFED_DODO = 2102009; + +-- Quest Markers +MRKR_DODO_AREA = 11068001; +MRKR_UBOKHN = 11068002; + +-- Counters +COUNTER_KILLS = 0; + +-- Quest Details +OBJECTIVE_AMOUNT = 8; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_UBOKHN, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_UBOKHN); + quest:SetENpc(BNPC_STUFFED_DODO); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_UBOKHN, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_UBOKHN and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventUbokhnStart", 0, OBJECTIVE_AMOUNT); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_UBOKHN) then + callClientFunction(player, "delegateEvent", player, quest, "processEventUbokhnAfterOffer", 5, OBJECTIVE_AMOUNT); -- Need to send 5 or it shows a placeholder. + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_UBOKHN) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010", 5); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (bnpc == BNPC_STUFFED_DODO) then + local counterAmount = quest:GetData():IncCounter(COUNTER_KILLS); + attentionMessage(player, 25241, counterAmount); -- You have defeated X enemies. + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_KILLS); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_DODO_AREA; + elseif (sequence == SEQ_001) then + return MRKR_UBOKHN; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc1u6.lua b/Data/scripts/quests/etc/etc1u6.lua new file mode 100644 index 00000000..b23f5807 --- /dev/null +++ b/Data/scripts/quests/etc/etc1u6.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: Besmitten and Besmirched +Code: Etc1u6 +Id: 110681 +Prereq: Level 15, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Moiling Moles. +SEQ_001 = 1; -- Talk to Mohtfryd. + +-- Actor Class Ids +ENPC_MOHTFRYD = 1001170; +BNPC_MOILING_MOLE = 2105717; + +-- Quest Markers +MRKR_MOLE_AREA = 11068102; +MRKR_MOHTFRYD = 11068103; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000157; +OBJECTIVE_AMOUNT = 8; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_MOHTFRYD, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_MOHTFRYD); + quest:SetENpc(BNPC_MOILING_MOLE); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_MOHTFRYD, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_MOHTFRYD and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventMohtfrydStart", 0, OBJECTIVE_AMOUNT); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_MOHTFRYD) then + callClientFunction(player, "delegateEvent", player, quest, "processEventFree", 0, OBJECTIVE_AMOUNT); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_MOHTFRYD) then + callClientFunction(player, "delegateEvent", player, quest, "processEventAfter", 0); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (bnpc == BNPC_MOILING_MOLE) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_KILLS); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_MOLE_AREA; + elseif (sequence == SEQ_001) then + return MRKR_MOHTFRYD; + end +end \ No newline at end of file From 6bbe272d4829d5ecfaa787d86b377e2f70b8a934 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sat, 2 Apr 2022 11:52:32 -0400 Subject: [PATCH 08/12] Added a buttload of side quests. This should mean all talky quests and 'kill x things' quests are done. Also updated the attention messages as they were using the wrong one for getting items or killing mobs. Fixed some journal issues on various quests as well. --- Data/scripts/quests/dft/DftFst.lua | 290 ++++++++++++++++------------- Data/scripts/quests/etc/etc1g2.lua | 125 +++++++++++++ Data/scripts/quests/etc/etc1g4.lua | 104 +++++++++++ Data/scripts/quests/etc/etc1g5.lua | 7 +- Data/scripts/quests/etc/etc1g6.lua | 135 ++++++++++++++ Data/scripts/quests/etc/etc1g8.lua | 120 ++++++++++++ Data/scripts/quests/etc/etc1g9.lua | 104 +++++++++++ Data/scripts/quests/etc/etc1l0.lua | 10 +- Data/scripts/quests/etc/etc1l1.lua | 8 +- Data/scripts/quests/etc/etc1l5.lua | 4 +- Data/scripts/quests/etc/etc1l6.lua | 4 +- Data/scripts/quests/etc/etc1l7.lua | 9 +- Data/scripts/quests/etc/etc1l8.lua | 5 +- Data/scripts/quests/etc/etc1u0.lua | 104 +++++++++++ Data/scripts/quests/etc/etc1u1.lua | 6 +- Data/scripts/quests/etc/etc1u2.lua | 98 ++++++++++ Data/scripts/quests/etc/etc1u4.lua | 126 +++++++++++++ Data/scripts/quests/etc/etc1u5.lua | 6 +- Data/scripts/quests/etc/etc1u6.lua | 6 +- Data/scripts/quests/etc/etc2g0.lua | 122 ++++++++++++ Data/scripts/quests/etc/etc2g1.lua | 104 +++++++++++ Data/scripts/quests/etc/etc2g2.lua | 104 +++++++++++ Data/scripts/quests/etc/etc2i0.lua | 99 ++++++++++ Data/scripts/quests/etc/etc2i1.lua | 104 +++++++++++ Data/scripts/quests/etc/etc2l0.lua | 99 ++++++++++ Data/scripts/quests/etc/etc2l3.lua | 110 +++++++++++ Data/scripts/quests/etc/etc2u1.lua | 104 +++++++++++ Data/scripts/quests/etc/etc2u2.lua | 104 +++++++++++ Data/scripts/quests/etc/etc3u9.lua | 104 +++++++++++ Data/scripts/quests/wld/wld0g1.lua | 4 +- Data/scripts/quests/wld/wld0g3.lua | 4 +- Data/scripts/quests/wld/wld0g4.lua | 4 +- Data/scripts/quests/wld/wld0u1.lua | 8 +- Data/scripts/quests/wld/wld0u2.lua | 4 +- Data/scripts/quests/wld/wld0u4.lua | 4 +- 35 files changed, 2171 insertions(+), 182 deletions(-) create mode 100644 Data/scripts/quests/etc/etc1g2.lua create mode 100644 Data/scripts/quests/etc/etc1g4.lua create mode 100644 Data/scripts/quests/etc/etc1g6.lua create mode 100644 Data/scripts/quests/etc/etc1g8.lua create mode 100644 Data/scripts/quests/etc/etc1g9.lua create mode 100644 Data/scripts/quests/etc/etc1u0.lua create mode 100644 Data/scripts/quests/etc/etc1u2.lua create mode 100644 Data/scripts/quests/etc/etc1u4.lua create mode 100644 Data/scripts/quests/etc/etc2g0.lua create mode 100644 Data/scripts/quests/etc/etc2g1.lua create mode 100644 Data/scripts/quests/etc/etc2g2.lua create mode 100644 Data/scripts/quests/etc/etc2i0.lua create mode 100644 Data/scripts/quests/etc/etc2i1.lua create mode 100644 Data/scripts/quests/etc/etc2l0.lua create mode 100644 Data/scripts/quests/etc/etc2l3.lua create mode 100644 Data/scripts/quests/etc/etc2u1.lua create mode 100644 Data/scripts/quests/etc/etc2u2.lua create mode 100644 Data/scripts/quests/etc/etc3u9.lua diff --git a/Data/scripts/quests/dft/DftFst.lua b/Data/scripts/quests/dft/DftFst.lua index 8880442a..429128ca 100644 --- a/Data/scripts/quests/dft/DftFst.lua +++ b/Data/scripts/quests/dft/DftFst.lua @@ -4,9 +4,9 @@ require ("global") Quest Script -Name: Small Talk -Code: DftFst -Id: 110542 +Name: Small Talk +Code: DftFst +Id: 110542 Contains all default lines for talkable npcs in the Forest Region (aka Black Shroud). * NOTE: This quest is active for all players at all times. @@ -19,13 +19,21 @@ local defaultTalkFst = { [1000068] = "defaultTalkWithKain_001", -- Kain (Gridania: LTW Guild) [1000069] = "defaultTalkWithJolline_001", -- Jolline (Gridania: LNC Guild) [1000071] = "defaultTalkWithBertennant_001", -- Bertennant (Gridania: Blue Badger Gate) + [1000072] = "defaultTalkWithMitainie_001", -- <<>> Mitainie (Gridania: White Wolf Gate) [1000074] = "defaultTalkWithOnguen_001", -- Onguen (Gridania: BTN Guild) [1000230] = "defaultTalkWithMiounne_001", -- Miounne (Gridania: Adv. Guild) [1000231] = "defaultTalkWithHereward_001", -- Hereward (Gridania: LTW Guild) + [1000234] = "defaultTalkWithSolieine_001", -- <<>> Soileine [function typo] (Gridania: CNJ Guild) Has Parley actor id: 1700030 [1000236] = "defaultTalkWithOpyltyl_001", -- Opyltyl (Gridania: BTN Guild) + [1000238] = "defaultTalkWithPowle_001", -- <<>> Powle (Gridania: Acorn Orchard) - Has many actorclass IDs, this is the first one. + [1000239] = "defaultTalkWithSansa_001", -- <<>> Sansa (Gridania: Acorn Orchard) [1000242] = "defaultTalkWithWillelda_001", -- Willelda (Gridania: LNC Guild) defaultTalkWithWillelda_002 - After signing up to the guild? [1000243] = "defaultTalkWithBurchard_001", -- Burchard (Gridania: LNC Guild) [1000326] = "defaultTalkWithCicely_001", -- Cicely (Gridania: BTN Guild) + [1000409] = "defaultTalkWithNicoliaux_001", -- <<>> Nicoliaux (Gridania: Acorn Orchard) [has multiple map markers, one might be regular idle location?] + [1000410] = "defaultTalkWithAunillie_001", -- <<>> Aunillie (Gridania: Acorn Orchard) + [1000411] = "defaultTalkWithElyn_001", -- <<>> Elyn (Gridania: Acorn Orchard) + [1000412] = "defaultTalkWithRyd_001", -- <<>> Ryd (Gridania: Acorn Orchard) [1000427] = "defaultTalkWithAnene_001", -- Anene (Gridania: Adv. Guild) defaultTalkWithAnene_002 / 003 (PGL informant) [1000428] = "defaultTalkWithSylbyrt_001", -- Sylbyrt (Gridania: Adv. Guild) defaultTalkWithSylbyrt_002 / 003 (MRD informant) [1000429] = "defaultTalkWithHongavunga_001", -- Honga Vunga (Gridania: Adv. Guild) defaultTalkWithHongavunga_002 / 003 (WVR informant) @@ -33,19 +41,21 @@ local defaultTalkFst = { [1000431] = "defaultTalkWithLtandhaa_001", -- L'tandhaa (Gridania: Adv. Guild) defaultTalkWithLtandhaa_002 / 003 (ALC informant) [1000432] = "defaultTalkWithPofufu_001", -- Pofufu (Gridania: Adv. Guild) defaultTalkWithPofufu_002 / 003 (MIN informant) [1000433] = "defaultTalkWithDrividot_001", -- Drividot (Gridania: Adv. Guild) defaultTalkWithDrividot_002 / 003 (FSH informant) - [1000435] = "defaultTalkWithBasewin_001", -- Basewin (Gridania: Adv. Guild) defaultTalkWithBasewin_002 / 003 (BSM informant) + [1000434] = "defaultTalkWithOdilie_001", -- Odilie (Gridania: Adv. Guild) defaultTalkWithOdilie_002 / 003 (CUL informant) + [1000435] = "defaultTalkWithBasewin_001", -- Basewin (Gridania: Adv. Guild) defaultTalkWithBasewin_002 / 003 (BSM informant) [1000436] = "defaultTalkWithSeikfrae_001", -- Seikfrae (Gridania: Adv. Guild) defaultTalkWithSeikfrae_002 / 003 (GLD informant) [1000437] = "defaultTalkWithEdasshym_001", -- E'dasshym (Gridania: Adv. Guild) defaultTalkWithEdasshym_002 / 003 (THM informant) - --[1000456] = "", -- Tierney (Gridania: Adv. Guild) Guildleve NPC - Will not fire, not PplStd. - --[1000457] = "", -- Gontrant (Gridania: Adv. Guild) Guildleve NPC - Will not fire, not PplStd. - [1000458] = "defaultTalkWithInn_Desk", -- V'korolon (Gridania: Adv. Guild) - defaultTalkWithVkorolon_001 - Pre-Inn unlocked dialog - --[1000459] = "", -- Gallia (Gridania: LTW Guild) Guildmark NPC - Will not fire, not PplStd. - --[1000461] = "", -- Kipopo (Gridania: BTN Guild) Guildmark NPC - Will not fire, not PplStd. - --[1000462] = "", -- Clarembald (Gridania: LNC Guild) Guildmark NPC - Will not fire, not PplStd. + [1000458] = "defaultTalkWithVkorolon_001", -- V'korolon (Gridania: Adv. Guild) - Inn NPC. defaultTalkWithInn_Desk used when Inn unlocked + --[1000460] = "defaultTalkWithHetzkin_001", -- Hetzkin (Gridania: CNJ Guild) Guildmark NPC - Will not fire, not PplStd. [1000463] = "defaultTalkWithNonolato_001", -- Nonolato (Gridania: ARC Guild) - --[1000464] = "", -- Cassandra (Gridania: ARC Guild) Guildmark NPC - Will not fire, not PplStd. [1000465] = "defaultTalkWithAnaidjaa_001", -- A'naidjaa (Gridania: CRP Guild) - --[1000466] = "", -- Frances (Gridania: CRP Guild) Guildmark NPC - Will not fire, not PplStd. + [1000504] = "defaultTalkWithTelent_001", -- <<>> Telent (Gridania: CNJ Guild) - Has map marker, but whole-numbered. + [1000509] = "defaultTalkWithKinborow_001", -- <<>> Kinborow (Gridania: CNJ Guild) + [1000510] = "defaultTalkWithZerig_001", -- <<>> Zerig (Gridania: CNJ Guild) - Has map marker, but whole-numbered. + [1000511] = "defaultTalkWithConcessa_001", -- <<>> Concessa (Gridania: CNJ Guild) + [1000512] = "defaultTalkWithMaroile_001", -- <<>> Maroile (Gridania: CNJ Guild) + [1000513] = "defaultTalkWithGugula_001", -- <<>> Gugula (Gridania: CNJ Guild) + [1000556] = "defaultTalkWithWybir_001", -- <<>> Wybir (South Shroud: Quarrymill) [1000565] = "defaultTalkWithCeinguled_001", -- Ceinguled (Gridania: LNC Guild) [1000566] = "defaultTalkWithFrancis_001", -- Francis (Gridania: LNC Guild) arg1=1, npc recognizes you're in the LNC guild [1000567] = "defaultTalkWithDhemdaeg_001", -- Dhemdaeg (Gridania: LNC Guild) @@ -61,172 +71,138 @@ local defaultTalkFst = { [1000627] = "defaultTalkWithAerstsyn_001", -- Aerstsyn (Gridania: LNC Guild) [1000629] = "defaultTalkWithEburhart_001", -- Eburhart (Gridania: BTN Guild) [1000630] = "defaultTalkWithNoes_001", -- Noes (Gridania: Apkallus Falls) + [1000669] = "defaultTalkWithJajajbygo_001", -- <<>> Jajajbygo (Central Shroud: Camp Benchbranch) If Arg1 = 20 (SpecialEventWork correlation?), extra dialog about Atomos + [1000670] = "defaultTalkWithPepeli_001", -- <<>> Pepeli (Central Shroud: Camp Benchbranch) If Arg1 = 20 (SpecialEventWork correlation?), extra dialog about 7U Era starting [1000671] = "defaultTalkWithMiraudont_001", -- Miraudont (North Shroud: Camp Emerald Moss) arg1=true - Mentions Atomos [1000681] = "defaultTalkWithNuala_001", -- Nuala (Gridania: LNC Guild) [1000701] = "defaultTalkWithZuzupoja_001", -- Zuzupoja (Gridania: CRP Guild) - [1000821] = "defaultTalkWithNellaure_001", -- Nellaure (Gridania: CRP Guild) + [1000737] = "defaultTalkWithBiddy_001", -- <<>> Biddy (Gridania: CNJ Guild) - Has map marker, but whole-numbered. + [1000821] = "defaultTalkWithNellaure_001", -- Nellaure (Gridania: CRP Guild) [1000822] = "defaultTalkWithCaplan_001", -- Caplan (Gridania: CRP Guild) [1000823] = "defaultTalkWithUlmhylt_001", -- Ulmhylt (Gridania: CRP Guild) [1000829] = "defaultTalkWithOdhinek_001", -- O'dhinek (Gridania: ARC Guild) [1000830] = "defaultTalkWithGeorjeaux_001", -- Georjeaux (Gridania: ARC Guild) defaultTalkWithGeorjeaux_002 - Dialog when you're part of the guild? [1000831] = "defaultTalkWithAlaire_001", -- Alaire (Gridania: ARC Guild) [1000832] = "defaultTalkWithMianne_001", -- Mianne (Gridania: ARC Guild) + [1000837] = "defaultTalkWithRdjongo_001", -- <<>> R'djongo (Gridania: Stillglade Fane) + [1000839] = "defaultTalkWithKhujazhwan_001", -- <<>> Khuja Zhwan (Gridania: Stillglade Fane) [1000951] = "defaultTalkWithLonsygg_001", -- Lonsygg (Gridania: Blue Badger Gate) + [1000978] = "defaultTalkWithGylbart_001", -- <<>> Gylbart (South Shroud: Quarrymill) + [1001071] = "defaultTalkWithTnbulea_001", -- <<>> T'nbulea (Gridania: CNJ Guild) + [1001072] = "defaultTalkWithFoforyo_001", -- <<>> Foforyo (Gridania: CNJ Guild) [1001077] = "defaultTalkWithBeli_001", -- Beli (Gridania: LTW Guild) [1001078] = "defaultTalkWithMaddeline_001", -- Maddeline (Gridania: LTW Guild) [1001079] = "defaultTalkWithDyrstbrod_001", -- Dyrstbrod (Gridania: LTW Guild) [1001080] = "defaultTalkWithTatagoi_001", -- Tatagoi (Gridania: LTW Guild) - [1001081] = "defaultTalkWithKhumamoshroca_001", -- Khuma Moshroca (Gridania: LTW Guild) + [1001081] = "defaultTalkWithKhumamoshroca_001", -- Khuma Moshroca (Gridania: LTW Guild) [1001082] = "defaultTalkWithLuilda_001", -- Luilda (Gridania: LTW Guild) [1001101] = "defaultTalkWithVnabyano_001", -- V'nabyano (Gridania: BTN Guild) [1001102] = "defaultTalkWithSandre_001", -- Sandre (Gridania: BTN Guild) - [1001103] = "defaultTalkWithMestonnaux_001", -- Mestonnaux (Gridania: BTN Guild) + [1001103] = "defaultTalkWithMestonnaux_001", -- Mestonnaux (Gridania: BTN Guild) + [1001150] = "defaultTalkWithBloisirant_001", -- <<>> Bloisirant (South Shroud: Silent Arbor) Instance queue NPC for Toto-Rak - Will not fire, not PplStd. + [1001151] = "defaultTalkWithBidelia_001", -- <<>> Bidelia - Entry Denier Guard? + [1001152] = "defaultTalkWithDadaneja_001", -- <<>> Dadaneja - Entry Denier Guard (West Shroud) - Guards fst_f0_dun06 + [1001153] = "defaultTalkWithRimomo_001", -- <<>> Rimomo - Entry Denier Guard (North Shroud: 25,7) - Guards fst_f0_dun05 [1001175] = "defaultTalkWithChloe_001", -- Chloe (Gridania: ARC Guild) - --[1001183] = "", -- Emoni (Gridania: Adv. Guild) Linkshell NPC - Will not fire, not PplStd. - --[1001184] = "", -- Gyles (Gridania: Adv. Guild) Retainer NPC - Will not fire, not PplStd. [1001188] = "defaultTalkWithGuildleveClientG_001", -- Maisenta (Gridania) [1001189] = "defaultTalkWithGuildleveClientG_002", -- Pukiki (Gridania) - [1001396] = "defaultTalkWithLefwyne_001", -- Lefwyne (Gridania: Shaded Bower) - [1001430] = "defaultTalkWithKinnison_001", -- Kinnison - Two args (nil errors client). If either >= 0, dialog mentions you've met Kan-E-Senna. Position inaccurate? + [1001190] = "defaultTalkWithGuildleveClientG_003", -- <<>> Eugenaire (Gridania: White Wolf Gate) + [1001294] = "defaultTalkWithIolaine_001", -- <<>> Iolaine - Entry Denier Guard (West Shroud) - Also guards fst_f0_dun06 + [1001338] = "defaultTalkWithLivith_001", -- <<>> Livith (North Shroud: Hyrstmill) + [1001339] = "defaultTalkWithProscen_001", -- <<>> Proscen (North Shroud: Hyrstmill) + [1001340] = "defaultTalkWithTanguistl_001", -- <<>> Tanguistl (North Shroud: Hyrstmill) + [1001341] = "defaultTalkWithComoere_001", -- <<>> Comoere (North Shroud: Hyrstmill) [dialog doesn't match wiki, but matching dialog isn't called in any function] + [1001342] = "defaultTalkWithLougblaet_001", -- <<>> Lougblaet (North Shroud: Hyrstmill) + [1001343] = "defaultTalkWithFamushidumushi_001", -- <<>> Famushi Dumushi (North Shroud: Hyrstmill) + [1001344] = "defaultTalkWithDrystan_001", -- <<>> Drystan (North Shroud: Hyrstmill) + [1001345] = "defaultTalkWithEadbert_001", -- <<>> Eadbert (North Shroud: Hyrstmill) + [1001346] = "defaultTalkWithKeketo_001", -- <<>> Keketo (South Shroud: Quarrymill) + [1001347] = "defaultTalkWithRadianttear_001", -- <<>> Radiant Tear (South Shroud: Quarrymill) + [1001348] = "defaultTalkWithMyles_001", -- <<>> Myles (South Shroud: Quarrymill) + [1001349] = "defaultTalkWithNathaniel_001", -- <<>> Nathaniel (South Shroud: Quarrymill) + [1001350] = "defaultTalkWithEvrardoux_001", -- <<>> Evrardoux (South Shroud: Quarrymill) + [1001351] = "defaultTalkWithTsehpanipahr_001", -- <<>> Tseh Panipahr (South Shroud: Quarrymill) + [1001352] = "defaultTalkWithEthelinda_001", -- <<>> Ethelinda (South Shroud: Quarrymill) + [1001353] = "defaultTalkWithHedheue_001", -- <<>> Hedheue (South Shroud: Quarrymill) + [1001396] = "defaultTalkWithLefwyne_001", -- Lefwyne (Gridania: Shaded Bower) + [1001430] = "defaultTalkWithKinnison_001", -- Kinnison (Gridania: Stillglade Fane) Two args (nil errors client). If either >= 0, mentions you've met Kan-E-Senna (joined a GC). Position inaccurate. [1001431] = "defaultTalkWithGenna_001", -- Genna (Gridania: Mih Khetto's Amphitheatre) [1001432] = "defaultTalkWithMathye_001", -- Mathye (Gridania: Blue Badger Gate) [1001433] = "defaultTalkWithUlta_001", -- Ulta (Gridania: Blue Badger Gate) - [1000434] = "defaultTalkWithOdilie_001", -- Odilie (Gridania: Adv. Guild) defaultTalkWithOdilie_002 / 003 (CUL informant) + [1001434] = "defaultTalkWithNicia_001", -- <<>> Nicia (Gridania: White Wolf Gate) + [1001435] = "defaultTalkWithBlandie_001", -- <<>> Blandie (Gridania: White Wolf Gate) [1001436] = "defaultTalkWithOwyne_001", -- Owyne (Gridania: Aetheryte Plaza) - [1001437] = "defaultTalkWithSybell_001", -- Sybell (Gridania: Aetheryte Plaza) + [1001437] = "defaultTalkWithSybell_001", -- Sybell (Gridania: Aetheryte Plaza) [1001459] = "defaultTalkWithFlavielle_001", -- Flavielle (Gridania: Adv. Guild) defaultTalkWithFlavielle_002 / 003 (ARM informant) [1001469] = "downTownTalk", -- Eldid (Gridania: Wards Entrance) + [1001470] = "defaultTalkWithYlessa_001", -- Ylessa + [1001570] = "defaultTalkWithRayao_001", -- <<>> Raya-O-Senna (North Shroud: Emerald Moss) WHM Job NPC, defaultTalkWithRayao_002 + [1001571] = "defaultTalkWithAruhnsenna_001", -- <<>> A-Ruhn-Senna (Inside Toto-Rak instance) [1001582] = "defaultTalkWithSwaenhylt_001", -- Swaenhylt (Gridania) [1001583] = "defaultTalkWithMarcette_001", -- Marcette (Gridania: The Knot) - [1001470] = "defaultTalkWithYlessa_001", -- Ylessa + [1001610] = "defaultTalkWithChamberliaux_001", -- <<>> Chamberliaux (South Shroud: Buscarron's Fold) + [1001611] = "defaultTalkWithFraemhar_001", -- <<>> Fraemhar (East Shroud: Hawthorne Hut) + [1001612] = "defaultTalkWithLora_001", -- <<>> Lora (East Shroud: Hawthorne Hut) + [1001613] = "defaultTalkWithXbhowaqi_001", -- <<>> X'bhowaqi (South Shroud: Buscarron's Fold) + [1001614] = "defaultTalkWithWawaramu_001", -- <<>> Wawaramu (South Shroud: Buscarron's Fold) + [1001615] = "defaultTalkWithArnott_001", -- <<>> Arnott (East Shroud: Hawthorne Hut) + [1001620] = "talkIdayCap", -- <<>> Serpent Lieutenant Marette (Gridania: The Knot) - Foundation Day 2011 - OLD EVENT NPC: Replaced by 2012 version + [1001621] = "talkIday1", -- <<>> Serpent Sergeant Frilaix (Gridania: The Knot) - Foundation Day 2011 - OLD EVENT NPC: Replaced by 2012 version + [1001622] = "talkIday2", -- <<>> Serpent Private Tristelle (Gridania: The Knot) - Foundation Day 2011 - OLD EVENT NPC: Replaced by 2012 version + [1001628] = "defaultTalkWithAilith_001", -- <<>> Ailith (South Shroud: Quarrymill) + [1001636] = "defaultTalkWithLhomujuuk_001", -- <<>> Lho Mujuuk (South Shroud: Silent Arbor) - Hangs outside Toto-Rak entrance + [1001637] = "defaultTalkWithSholnoralno_001", -- <<>> Sholno Ralno (South Shroud: Silent Arbor) - Hangs outside Toto-Rak entrance + [1001638] = "defaultTalkWithTuatkk_001", -- <<>> Tuatkk (South Shroud: Silent Arbor) - Hangs outside Toto-Rak entrance + [1001642] = "defaultTalkWithRonanKognan_001", -- <<>> Ronan Kognan (Gridania: 5,5) - Has a variety of functions, listed under onTalk() [1001706] = "defaultTalkWithMemama_001", -- Memama (Gridania: Adv. Guild) [1001707] = "defaultTalkWithPfarahr_001", -- Pfarahr (Gridania: Adv. Guild) [1001708] = "defaultTalkWithBeaudonet_001", -- Beaudonet (Gridania: Adv. Guild) [1001709] = "defaultTalkWithFryswyde_001", -- Fryswyde (Gridania: Adv. Guild) [1001710] = "defaultTalkWithWillielmus_001", -- Willielmus (Gridania: Adv. Guild) + [1001711] = "defaultTalkWithQZamqo_001", -- <<>> Q'zamqo (Gridania: Airship Landing) [1001806] = "defaultTalkEnie_001", -- Enie (Gridania: BTN Guild) + [1001835] = "defaultTalkWithVorsaile_001", -- <<>> Serpent Commander Heuloix (North Shroud: Emerald Moss) + [1001836] = "defaultTalkWithPukwapika_001", -- <<>> Pukwa Pika (West Shroud: Turning Leaf) - Involved in "A Feast of Fools", Thornmarch fight + [1001837] = "defaultTalkWithPurumoogle_001", -- <<>> Frightened Moogle (West Shroud: Turning Leaf) - Hangs out beside Pukwa Pika + [1001838] = "defaultTalkWithPirimoogle_001", -- <<>> Fretful Moogle (West Shroud: Turning Leaf) - Hangs out beside Pukwa Pika + [1001936] = "defaultTalkWithPukno_001", -- <<>> Pukno Poki - defaultTalkWithPukno_002 - Used after unlocking BRD? + [1001937] = "defaultTalkWithMoogleA_001", -- <<>> Pukni Pakk (North Shroud: Emerald Moss) - Hangs with WHM Job NPC - defaultTalkWithMoogleA_002 - Post-WHM dialog? + [1001938] = "defaultTalkWithMppgleB_001", -- <<>> Kupcha Kupa (North Shroud: Emerald Moss) - Hangs with WHM Job NPC - defaultTalkWithMppgleB_002 - Post-WHM dialog? [1001951] = "defaultTalkWithAnselm_001", -- Anselm (Gridania: Adv. Guild) - --[1002090] = "", -- Serpent Private Hodder (Gridania: Adv. Guild) - Will not fire, not PplStd. - --[1002091] = "", -- Serpent Private Daurement (Gridania: Adv. Guild) - Will not fire, not PplStd. + [1001957] = "defaultTalkWithPukumoogle_001", -- <<>> Plush Moogle (West Shroud: Crimson Bark) + --[1002090] = "defaultTalkWithStewart_001", -- Serpent Private Hodder (Gridania: Adv. Guild) defaultTalkWithStewart_002 (Post-Raid dialog?) - Will not fire, not PplStd. + --[1002091] = "defaultTalkWithTrisselle_001", -- Serpent Private Daurement (Gridania: Adv. Guild) defaultTalkWithTrisselle_002 (No idea for context) - Will not fire, not PplStd. [1002106] = "processEventELNAURE", -- Serpent Lieutenant Marette (Gridania: The Knot) - Foundation Day 2012 - Spl000 staticactor [1002107] = "processEventARISMONT", -- Serpent Sergeant Frilaix (Gridania: The Knot) - Foundation Day 2012 - Spl000 staticactor [1002108] = "processEventMERLIE", -- Serpent Private Tristelle (Gridania: The Knot) - Foundation Day 2012 - Spl000 staticactor - --[1060022] = "", -- Louisoix (Gridania: Apkallus Falls) - Will not fire, not PplStd. + [1060039] = "defaultTalkWithJehantel_001", -- <<>> Jehantel (South Shroud: Tranquil Paths) BRD Job NPC - defaultTalkWithJehantel_002 + [1060043] = "defaultTalkWithLegendBsm_001", -- <<>> Gerolt (East Shroud: Hawthorne Hut) - Arg1 controls which line of dialog he plays, otherwise nothing shows + --[1060022] = "defaultTalkLouisoix_001", -- Louisoix (Gridania: Apkallus Falls) - Will not fire, not PplStd. + [1200121] = "bookTalk", -- <<>> Dusty Tomes (Gridania: CNJ Guild) - Will not fire since it isn't PplStd. Identical dialog regardless. [1500055] = "defaultTalkWithLionnellais_001", -- Lionnellais (Gridania: Adv. Guild) - Will not fire, not PplStd. Pre-airship dialog? [1500056] = "defaultTalkWithHida_001", -- Hida (Gridania: Adv. Guild) - Will not fire, not PplStd. Pre-airship dialog? - --[1500061] = "", -- Fruhdhem (Gridania) Chocobo Taxi - Will not fire, not PplStd. + [1500060] = "defaultTalkWithHonoroit_001", -- <<>> Honoroit (Central Shroud) - Hangs around (-200, 5, -810), has an untargetable chocobo carriage behind + --[1500061] = "defaultTalkWithFhrudhem_001", -- Fruhdhem [function typo] (Gridania) Chocobo Taxi - Will not fire, not PplStd. [1500127] = "tribeTalk", -- Prosperlain (Gridania) - --[1500294] = "", -- Gagaroon (Gridania: Rosewood Stalls) Black Market - Will not fire, not PplStd. [1700001] = "defaultTalkWithPenelope_001", -- Penelope (Gridania: Adv. Guild) - [1700038] = "defaultTalkWithAUBRENARD_100", -- Aubrenard (Gridania: Shaded Bower) + [1700038] = "defaultTalkWithAUBRENARD_100" -- Aubrenard (Gridania: Shaded Bower) + } --[[ TO:DO - Map the remainder of these -defaultTalkWithStewart_001 -- Hodder line according to old script? -defaultTalkWithPowle_001 -defaultTalkWithSansa_001 -defaultTalkWithNicoliaux_001 -defaultTalkWithAunillie_001 -defaultTalkWithElyn_001 -defaultTalkWithRyd_001 -defaultTalkWithSolieine_001 -defaultTalkWithHetzkin_001 -defaultTalkWithTelent_001 -defaultTalkWithKhujazhwan_001 -defaultTalkWithZerig_001 -defaultTalkWithYonariumnari_001 -defaultTalkWithGugula_001 -defaultTalkWithRdjongo_001 -defaultTalkWithAstrelle_001 -defaultTalkWithBiddy_001 -defaultTalkWithConcessa_001 -defaultTalkWithMaroile_001 -defaultTalkWithKinborow_001 -defaultTalkWithTnbulea_001 -defaultTalkWithFoforyo_001 -defaultTalkWithFhrudhem_001 -defaultTalkWithMitainie_001 -defaultTalkWithNicia_001 -defaultTalkWithBlandie_001 -defaultTalkWithLivith_001 -defaultTalkWithProscen_001 -defaultTalkWithTanguistl_001 -defaultTalkWithComoere_001 -defaultTalkWithLougblaet_001 -defaultTalkWithFamushidumushi_001 -defaultTalkWithDrystan_001 -defaultTalkWithEadbert_001 -defaultTalkWithWybir_001 -defaultTalkWithKeketo_001 -defaultTalkWithRadianttear_001 -defaultTalkWithMyles_001 -defaultTalkWithNathaniel_001 -defaultTalkWithEvrardoux_001 -defaultTalkWithTsehpanipahr_001 -defaultTalkWithEthelinda_001 -defaultTalkWithHedheue_001 -defaultTalkWithJajajbygo_001 arg1 arg2 -defaultTalkWithPepeli_001 arg1 -defaultTalkWithBidelia_001 -defaultTalkWithRimomo_001 -defaultTalkWithDadaneja_001 -defaultTalkWithIolaine_001 -defaultTalkWithBloisirant_001 -defaultTalkWithGylbart_001 -defaultTalkWithHonoroit_001 -defaultTalkWithGuildleveClientG_003 -defQuest1g0_Bush -defQuest1g1_Bush -defaultTalkWithChamberliaux_001 -defaultTalkWithFraemhar_001 -defaultTalkWithXbhowaqi_001 -defaultTalkWithLora_001 -defaultTalkWithWawaramu_001 -defaultTalkWithArnott_001 -defaultTalkWithLhomujuuk_001 -defaultTalkWithSholnoralno_001 -defaultTalkWithTuatkk_001 -defaultTalkWithAruhnsenna_001 -defaultTalkWithMoogle010_001 -defaultTalkWithMoogle002_001 -defaultTalkWithAilith_001 -defaultTalkWithQZamqo_001 -defaultTalkLouisoix_001 -defaultTalkWithRonanKognan_001 -defaultTalkWithRonanKognan_002 arg1 arg2 -defaultTalkWithRonanKognan_Hint_00 arg1 -defaultTalkWithRonanKognan_Hint_01 arg1 -defaultTalkWithRonanKognan_Hint_02 arg1 -defaultTalkWithRonanKognan_Hint_03 arg1 -defaultTalkWithRonanKognan_Hint_04 arg1 -defaultTalkWithVorsaile_001 arg1 +defaultTalkWithAstrelle_001 -- "Astrelle" actor/name exists (1000736), but function calls blank dialog. Unused? Perhaps Quest-only actor? +defQuest1g0_Bush -- Empty function, unused? Perhaps Quest-only actor? +defQuest1g1_Bush -- Empty function, unused? Perhaps Quest-only actor? + + +defaultTalkWithYonariumnari_001 -- "Yonari Umnari" actor/name exists (1000838), but cannot find existence of the npc or dialog on the internet. +defaultTalkWithMoogle010_001 -- No idea what moogles these are tied too. +defaultTalkWithMoogle002_001 + + defaultTalkCaravanChocoboGri_001 -bookTalk -talkIdayCap -talkIday1 -talkIday2 -defaultTalkWithPukwapika_001 -defaultTalkWithPurumoogle_001 -defaultTalkWithPirimoogle_001 -defaultTalkWithPukumoogle_001 -defaultTalkWithJehantel_001 -defaultTalkWithJehantel_002 -defaultTalkWithPukno_001 -defaultTalkWithPukno_002 -defaultTalkWithRayao_001 -defaultTalkWithRayao_002 -defaultTalkWithMoogleA_001 -defaultTalkWithMoogleA_002 -defaultTalkWithMppgleB_001 -defaultTalkWithMppgleB_002 -defaultTalkWithStewart_001 -defaultTalkWithStewart_002 -defaultTalkWithTrisselle_001 -defaultTalkWithTrisselle_002 -defaultTalkWithInn_Desk defaultTalkWithInn_ExitDoor defaultTalkWithExit01 -defaultTalkWithLegendBsm_001 arg1 defaultTalkWithMarketNpc defaultTalkWithHamletGuardGri_001 --]] @@ -235,26 +211,72 @@ defaultTalkWithHamletGuardGri_001 function onTalk(player, quest, npc, eventName) local npcId = npc:GetActorClassId(); - local clientFunc = defaultTalkFst[npcId]; + local clientFunc = defaultTalkFst[npcId]; if (npcId == 1000430) then -- Nonco Menanco callClientFunction(player, "delegateEvent", player, quest, clientFunc, 21); + elseif (npcId == 1000458) then -- V'korolon (Inn NPC) + if (player:IsQuestCompleted(110828)) then -- "Waste Not Want Not" completed. + defaultTalkWithInn(player, quest, "defaultTalkWithInn_Desk"); + else + callClientFunction(player, "delegateEvent", player, quest, clientFunc); + end + elseif (npcId == 1000669) then -- Jajajbygo + callClientFunction(player, "delegateEvent", player, quest, clientFunc, 20); + elseif (npcId == 1000670) then -- Pepeli + callClientFunction(player, "delegateEvent", player, quest, clientFunc, 20); elseif (npcId == 1001430) then -- Kinnison callClientFunction(player, "delegateEvent", player, quest, clientFunc, -1,-1); + elseif (npcId == 1001642) then -- Ronan Kognan + callClientFunction(player, "delegateEvent", player, quest, clientFunc) -- Called if no deaspected crystals on player? + --[[ + defaultTalkWithRonanKognan_002(bool1, bool2) -- Called if any deaspected crystals on player? bool1=Has enough deaspected for buying helmet bool2=already has helmet dialog + defaultTalkWithRonanKognan_Hint_00 -- Lore dialog likely called in order as you make transactions with the npc? + defaultTalkWithRonanKognan_Hint_01 + defaultTalkWithRonanKognan_Hint_02 + defaultTalkWithRonanKognan_Hint_03 + defaultTalkWithRonanKognan_Hint_04 + --]] + elseif (npcId == 1001936) then -- Pukno Poki + callClientFunction(player, "delegateEvent", player, quest, clientFunc); --defaultTalkWithPukno_002 -- Used after unlocking BRD? + elseif (npcId == 1060039) then -- Jehantel + callClientFunction(player, "delegateEvent", player, quest, clientFunc); --defaultTalkWithJehantel_002 -- Post-BRD unlock? + elseif (npcId == 1060043) then -- Gerolt + callClientFunction(player, "delegateEvent", player, quest, clientFunc, 1); elseif ((npcId >= 1002106) and (npcId <= 1002108)) then -- Foundation Day 2012 NPCs talkWithSpecial(player, npcId, clientFunc) else - callClientFunction(player, "delegateEvent", player, quest, clientFunc); + callClientFunction(player, "delegateEvent", player, quest, clientFunc); end - player:EndEvent(); + player:EndEvent(); end function IsQuestENPC(player, quest, npc) - return defaultTalkFst[npc:GetActorClassId()] ~= nil; + return defaultTalkFst[npc:GetActorClassId()] ~= nil; end + +function defaultTalkWithInn(player, quest, clientFunc) + local choice = callClientFunction(player, "delegateEvent", player, quest, clientFunc); + + if (choice == 1) then + GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 160.048, 0, 154.263, 0); + elseif (choice == 2) then + if (player:GetHomePointInn() ~= 2) then + player:SetHomePointInn(2); + player:SendGameMessage(GetWorldMaster(), 60019, 0x20, 2075); --Secondary homepoint set to the Roost + else + player:SendGameMessage(GetWorldMaster(), 51140, 0x20); --This inn is already your Secondary Homepoint + end + end +end + + + + + function talkWithSpecial(player, npcId, clientFunc) local splQuest = GetStaticActor("Spl000"); local magickedPrism = 0; diff --git a/Data/scripts/quests/etc/etc1g2.lua b/Data/scripts/quests/etc/etc1g2.lua new file mode 100644 index 00000000..25e8466b --- /dev/null +++ b/Data/scripts/quests/etc/etc1g2.lua @@ -0,0 +1,125 @@ +require ("global") + +--[[ + +Quest Script + +Name: A Well-Balanced Diet +Code: Etc1g2 +Id: 110656 +Prereq: Level 25, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Talk to Mestonnaux. +SEQ_001 = 1; -- Kill Popoto-optos. +SEQ_002 = 2; -- Talk to V'nabyano. + +-- Actor Class Ids +ENPC_VNABYANO = 1001101; +ENPC_MESTONNAUX = 1001103; +BNPC_POPOTO_OPTO = 2100509; + +-- Quest Markers +MRKR_MESTONNAUX = 11065601; +MRKR_OPTO_AREA = 11065602; +MRKR_VNABYANO = 11065604; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000142; +OBJECTIVE_AMOUNT = 8; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_VNABYANO, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_MESTONNAUX, QFLAG_PLATE); + quest:SetENpc(ENPC_VNABYANO); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_MESTONNAUX); + quest:SetENpc(ENPC_VNABYANO); + quest:SetENpc(BNPC_POPOTO_OPTO); + elseif (sequence == SEQ_002) then + quest:SetENpc(ENPC_VNABYANO, QFLAG_REWARD); + quest:SetENpc(ENPC_MESTONNAUX); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_VNABYANO and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventV_NabyanoStart", 1, OBJECTIVE_AMOUNT); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_MESTONNAUX) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent00", 0); + quest:StartSequence(SEQ_001); + elseif (npcClassId == ENPC_VNABYANO) then + callClientFunction(player, "delegateEvent", player, quest, "processEventV_NabyanoStart00"); + end + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_MESTONNAUX) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005", 0); + elseif (npcClassId == ENPC_VNABYANO) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005_1"); + end + --Quest Complete + elseif (seq == SEQ_002) then + if (npcClassId == ENPC_VNABYANO) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent05_3"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + elseif (npcClassId == ENPC_MESTONNAUX) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2"); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_001 and bnpc == BNPC_POPOTO_OPTO) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_002); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM), 0, 0, 0, OBJECTIVE_AMOUNT; +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_MESTONNAUX; + elseif (sequence == SEQ_001) then + return MRKR_OPTO_AREA; + elseif (sequence == SEQ_002) then + return MRKR_VNABYANO; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc1g4.lua b/Data/scripts/quests/etc/etc1g4.lua new file mode 100644 index 00000000..ce030c9b --- /dev/null +++ b/Data/scripts/quests/etc/etc1g4.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: The Penultimate Prank +Code: Etc1g4 +Id: 110658 +Prereq: Level 30, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Aurora Anglers. +SEQ_001 = 1; -- Talk to Nicoliaux. + +-- Actor Class Ids +ENPC_NICOLIAUX = 1000409; +BNPC_AURORA_ANGLER = 2104508; + +-- Quest Markers +MRKR_ANGLER_AREA = 11065801; +MRKR_NICOLIAUX = 11065802; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000143; +OBJECTIVE_AMOUNT = 8; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_NICOLIAUX, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_NICOLIAUX); + quest:SetENpc(BNPC_MUSK_ANGLER); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_NICOLIAUX, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_NICOLIAUX and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventNicoliauxStart", 0, OBJECTIVE_AMOUNT); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_NICOLIAUX) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010", 0, OBJECTIVE_AMOUNT); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_NICOLIAUX) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent020"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_AURORA_ANGLER) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM), 0, 0, 0, OBJECTIVE_AMOUNT; +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_ANGLER_AREA; + elseif (sequence == SEQ_001) then + return MRKR_NICOLIAUX; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc1g5.lua b/Data/scripts/quests/etc/etc1g5.lua index eb435c4f..5bc48b15 100644 --- a/Data/scripts/quests/etc/etc1g5.lua +++ b/Data/scripts/quests/etc/etc1g5.lua @@ -78,11 +78,10 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_BRISTLETAIL_MARMOT) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_BRISTLETAIL_MARMOT) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); @@ -91,7 +90,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_QUESTITEM); + return quest:GetData():GetCounter(COUNTER_QUESTITEM), 0, 0, 0, OBJECTIVE_AMOUNT; end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/etc/etc1g6.lua b/Data/scripts/quests/etc/etc1g6.lua new file mode 100644 index 00000000..80058818 --- /dev/null +++ b/Data/scripts/quests/etc/etc1g6.lua @@ -0,0 +1,135 @@ +require ("global") + +--[[ + +Quest Script + +Name: The Ultimate Prank +Code: Etc1g6 +Id: 110660 +Prereq: Level 35, Any DoW/DoM, Etc1g4 complete + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Talk to Sylbyrt. +SEQ_001 = 1; -- Kill Wandering Wights. +SEQ_002 = 2; -- Talk to Sylbyrt. +SEQ_003 = 3; -- Talk to Nicoliaux. + +-- Actor Class Ids +ENPC_SYLBYRT = 1000428; +ENPC_NICOLIAUX = 1000409; +BNPC_WANDERING_WIGHT = 2101908; + +-- Quest Markers +MRKR_WIGHT_AREA = 11066001; +MRKR_SYLBYRT = 11066002; +MRKR_NICOLIAUX = 11066004; + +-- Counters +COUNTER_QUESTITEM = 0; +COUNTER_QUESTITEM2 = 1; + +-- Quest Details +ITEM_CEDAR_MARIONETTE = 11000146; +OBJECTIVE_ITEMID = 11000145; +OBJECTIVE_AMOUNT = 3; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_NICOLIAUX, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_SYLBYRT, QFLAG_PLATE); + quest:SetENpc(ENPC_NICOLIAUX); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_SYLBYRT); + quest:SetENpc(BNPC_WANDERING_WIGHT); + elseif (sequence == SEQ_002) then + quest:SetENpc(ENPC_SYLBYRT, QFLAG_PLATE); + elseif (sequence == SEQ_003) then + quest:SetENpc(ENPC_SYLBYRT); + quest:SetENpc(ENPC_NICOLIAUX, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_NICOLIAUX and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventNicoliauxStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_SYLBYRT) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000", 2, OBJECTIVE_AMOUNT); + quest:StartSequence(SEQ_001); + elseif (npcClassId == ENPC_NICOLIAUX) then + callClientFunction(player, "delegateEvent", player, quest, "followEvent000"); + end + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_SYLBYRT) then + callClientFunction(player, "delegateEvent", player, quest, "followEvent010", 2, OBJECTIVE_AMOUNT); + end + elseif (seq == SEQ_002) then + if (npcClassId == ENPC_SYLBYRT) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010", 2, OBJECTIVE_AMOUNT); + quest:GetData():IncCounter(COUNTER_QUESTITEM2); + quest:StartSequence(SEQ_003); + end + --Quest Complete + elseif (seq == SEQ_003) then + if (npcClassId == ENPC_NICOLIAUX) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent020"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + elseif (npcClassId == ENPC_SYLBYRT) then + callClientFunction(player, "delegateEvent", player, quest, "followEvent020"); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_001 and bnpc == BNPC_WANDERING_WIGHT) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_002); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM), quest:GetData():GetCounter(COUNTER_QUESTITEM2), 0, 0, OBJECTIVE_AMOUNT; +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_SYLBYRT; + elseif (sequence == SEQ_001) then + return MRKR_WIGHT_AREA; + elseif (sequence == SEQ_002) then + return MRKR_SYLBYRT; + elseif (sequence == SEQ_003) then + return MRKR_NICOLIAUX; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc1g8.lua b/Data/scripts/quests/etc/etc1g8.lua new file mode 100644 index 00000000..a1ed8928 --- /dev/null +++ b/Data/scripts/quests/etc/etc1g8.lua @@ -0,0 +1,120 @@ +require ("global") + +--[[ + +Quest Script + +Name: Say it with Wolf Tails +Code: Etc1g8 +Id: 110662 +Prereq: Level 30, Any DoW/DoM, Etc1l7 complete + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Gnawing Gnats. +SEQ_001 = 1; -- Talk to Francis. +SEQ_002 = 2; -- Talk to Imania. + +-- Actor Class Ids +ENPC_FRANCIS = 1000566; +ENPC_IMANIA = 1001567; +BNPC_GNAWING_GNATS = 2100609; + +-- Quest Markers +MRKR_FRANCIS = 11066201; +MRKR_IMANIA = 11066202; +MRKR_GNAT_AREA = 11066203; + +-- Counters +COUNTER_KILLS = 0; + +-- Quest Details +QUESTITEM_WOLFTAIL = 11000152; +OBJECTIVE_AMOUNT = 8; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_FRANCIS, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_FRANCIS); + quest:SetENpc(BNPC_GNAWING_GNATS); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_FRANCIS, QFLAG_PLATE); + elseif (sequence == SEQ_002) then + quest:SetENpc(ENPC_IMANIA, QFLAG_REWARD); + quest:SetENpc(ENPC_FRANCIS); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_FRANCIS and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventFrancisStart1g8", OBJECTIVE_AMOUNT); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_FRANCIS) then + callClientFunction(player, "delegateEvent", player, quest, "processEventFrancisFree", 0, OBJECTIVE_AMOUNT); + end + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_FRANCIS) then + callClientFunction(player, "delegateEvent", player, quest, "processEventFrancisAfter", 0, OBJECTIVE_AMOUNT); + attentionMessage(player, 25246, QUESTITEM_WOLFTAIL, 1); -- You obtain + quest:StartSequence(SEQ_002); + end + --Quest Complete + elseif (seq == SEQ_002) then + if (npcClassId == ENPC_IMANIA) then + callClientFunction(player, "delegateEvent", player, quest, "processEventImania"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + elseif (npcClassId == ENPC_FRANCIS) then + callClientFunction(player, "delegateEvent", player, quest, "processEventFrancisAfterFree", 0, OBJECTIVE_AMOUNT); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_GNAWING_GNATS) then + local counterAmount = quest:GetData():IncCounter(COUNTER_KILLS); + attentionMessage(player, 50041, 3100611, counterAmount, OBJECTIVE_AMOUNT); -- The has been defeated. (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetSequence() == SEQ_002 and 1 or 0, 0, 0, 0, OBJECTIVE_AMOUNT; +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_GNAT_AREA; + elseif (sequence == SEQ_001) then + return MRKR_FRANCIS; + elseif (sequence == SEQ_002) then + return MRKR_IMANIA; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc1g9.lua b/Data/scripts/quests/etc/etc1g9.lua new file mode 100644 index 00000000..2a23c4dd --- /dev/null +++ b/Data/scripts/quests/etc/etc1g9.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: Embarrassing Excerpts +Code: Etc1g9 +Id: 110663 +Prereq: Level 30, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Opo Opos. +SEQ_001 = 1; -- Talk to Lonsygg. + +-- Actor Class Ids +ENPC_LONSYGG = 1000951; +BNPC_OPO_OPO = 2100503; + +-- Quest Markers +MRKR_OPO_OPO_AREA = 11066301; +MRKR_LONSYGG = 11066302; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000160; +OBJECTIVE_AMOUNT = 5; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_LONSYGG, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_LONSYGG); + quest:SetENpc(BNPC_OPO_OPO); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_LONSYGG, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_LONSYGG and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventLonsyggStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_LONSYGG) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2"); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_LONSYGG) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_OPO_OPO) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_OPO_OPO_AREA; + elseif (sequence == SEQ_001) then + return MRKR_LONSYGG; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc1l0.lua b/Data/scripts/quests/etc/etc1l0.lua index 85fd53c4..d96041fd 100644 --- a/Data/scripts/quests/etc/etc1l0.lua +++ b/Data/scripts/quests/etc/etc1l0.lua @@ -12,8 +12,8 @@ Prereq: Level 20, Any Class ]] -- Sequence Numbers -SEQ_000 = 0; -- Kill Toll Puks. -SEQ_001 = 1; -- Talk to HALDBERK. +SEQ_000 = 0; -- Kill Jetsam Jellies. +SEQ_001 = 1; -- Talk to Haldberk. -- Actor Class Ids ENPC_HALDBERK = 1000160; @@ -79,9 +79,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_JETSAM_JELLIES) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_JETSAM_JELLIES) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); @@ -90,7 +90,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_QUESTITEM); + return 0, quest:GetData():GetCounter(COUNTER_QUESTITEM); end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/etc/etc1l1.lua b/Data/scripts/quests/etc/etc1l1.lua index 7347f7f1..d2ff15a6 100644 --- a/Data/scripts/quests/etc/etc1l1.lua +++ b/Data/scripts/quests/etc/etc1l1.lua @@ -78,9 +78,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_TOLL_PUK) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_TOLL_PUK) then local counterAmount = quest:GetData():IncCounter(COUNTER_KILLS); - attentionMessage(player, 25241, counterAmount); -- You have defeated X enemies. + attentionMessage(player, 50041, 3100116, counterAmount, OBJECTIVE_AMOUNT); -- The has been defeated. (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); @@ -88,10 +88,6 @@ function onKillBNpc(player, quest, bnpc) end end -function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_KILLS); -end - function getJournalMapMarkerList(player, quest) local sequence = quest:getSequence(); diff --git a/Data/scripts/quests/etc/etc1l5.lua b/Data/scripts/quests/etc/etc1l5.lua index 94810b0c..3f84111d 100644 --- a/Data/scripts/quests/etc/etc1l5.lua +++ b/Data/scripts/quests/etc/etc1l5.lua @@ -79,9 +79,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_MUSK_ROSELING) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_MUSK_ROSELING) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); diff --git a/Data/scripts/quests/etc/etc1l6.lua b/Data/scripts/quests/etc/etc1l6.lua index 5f1211cf..8f51d8a4 100644 --- a/Data/scripts/quests/etc/etc1l6.lua +++ b/Data/scripts/quests/etc/etc1l6.lua @@ -79,9 +79,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_BERYL_CRAB) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_BERYL_CRAB) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); diff --git a/Data/scripts/quests/etc/etc1l7.lua b/Data/scripts/quests/etc/etc1l7.lua index 158ba267..a31755f5 100644 --- a/Data/scripts/quests/etc/etc1l7.lua +++ b/Data/scripts/quests/etc/etc1l7.lua @@ -76,7 +76,7 @@ function onTalk(player, quest, npc, eventName) if (npcClassId == ENPC_IMANIA) then callClientFunction(player, "delegateEvent", player, quest, "processEventImaniaFree"); elseif (npcClassId == ENPC_YUYUBESU) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000"); + callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuStart", 0, OBJECTIVE_AMOUNT); quest:StartSequence(SEQ_001); end --Quest Complete @@ -103,11 +103,10 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end --- TODO FINISH THIS function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_BOMB_EMBER) then + if (quest:GetSequence() == SEQ_001 and bnpc == BNPC_BOMB_EMBER) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_002); @@ -116,7 +115,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_QUESTITEM); + return quest:GetData():GetCounter(COUNTER_QUESTITEM), 0, 0, 0, OBJECTIVE_AMOUNT; end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/etc/etc1l8.lua b/Data/scripts/quests/etc/etc1l8.lua index f6978629..94929869 100644 --- a/Data/scripts/quests/etc/etc1l8.lua +++ b/Data/scripts/quests/etc/etc1l8.lua @@ -128,12 +128,15 @@ function onTalk(player, quest, npc, eventName) player:EndEvent(); end -function onEmote(player, quest, npc, eventName) +functison onEmote(player, quest, npc, eventName) + print("TESSSSSSSSSSSSSSSSSSSSSST2"); local npcClassId = npc.GetActorClassId(); local seq = quest:GetSequence(); local data = quest:GetData(); local incCounter = false; + print("TESSSSSSSSSSSSSSSSSSSSSST"); + -- Play the emote if (eventName == "emoteDefault1") then -- Psych player:DoEmote(npc.Id, 30, 21291); diff --git a/Data/scripts/quests/etc/etc1u0.lua b/Data/scripts/quests/etc/etc1u0.lua new file mode 100644 index 00000000..39ed37f2 --- /dev/null +++ b/Data/scripts/quests/etc/etc1u0.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: A Knock in the Night +Code: Etc1u0 +Id: 110675 +Prereq: Level 35, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Cursed Eyes. +SEQ_001 = 1; -- Talk to Eleanor. + +-- Actor Class Ids +ENPC_ELEANOR = 1001565; +BNPC_CURSED_EYES = 2101711; + +-- Quest Markers +MRKR_EYES_AREA = 11067501; +MRKR_ELEANOR = 11067502; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000153; +OBJECTIVE_AMOUNT = 8; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_ELEANOR, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_ELEANOR); + quest:SetENpc(BNPC_CURSED_EYES); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_ELEANOR, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_ELEANOR and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventEleanorStart", OBJECTIVE_AMOUNT); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_ELEANOR) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000", OBJECTIVE_AMOUNT); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_ELEANOR) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_CURSED_EYES) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM), 0, 0, 0, OBJECTIVE_AMOUNT; +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_EYES_AREA; + elseif (sequence == SEQ_001) then + return MRKR_ELEANOR; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc1u1.lua b/Data/scripts/quests/etc/etc1u1.lua index ef3fb404..436495e4 100644 --- a/Data/scripts/quests/etc/etc1u1.lua +++ b/Data/scripts/quests/etc/etc1u1.lua @@ -79,9 +79,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_NUTGRABBER_MARMOT) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_NUTGRABBER_MARMOT) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); @@ -90,7 +90,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_QUESTITEM); + return quest:GetData():GetCounter(COUNTER_QUESTITEM), 0, 0, 0, OBJECTIVE_AMOUNT; end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/etc/etc1u2.lua b/Data/scripts/quests/etc/etc1u2.lua new file mode 100644 index 00000000..73d37ff9 --- /dev/null +++ b/Data/scripts/quests/etc/etc1u2.lua @@ -0,0 +1,98 @@ +require ("global") + +--[[ + +Quest Script + +Name: Dressed to Be Killed +Code: 110677 +Id: 110638 +Prereq: Level 45, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Dapper Cadaver. +SEQ_001 = 1; -- Talk to Tutubuki. + +-- Actor Class Ids +ENPC_TUTUBUKI = 1001141; +BNPC_DAPPER_CADAVER = 2101816; + +-- Quest Markers +MRKR_CADAVER_AREA = 11067701; +MRKR_TUTUBUKI = 11067702; + +-- Quest Details +OBJECTIVE_ITEMID = 11000155; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_TUTUBUKI, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_TUTUBUKI); + quest:SetENpc(BNPC_DAPPER_CADAVER); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_TUTUBUKI, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_TUTUBUKI and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventTutubukiStart", 0, OBJECTIVE_AMOUNT); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_TUTUBUKI) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_2", 0, OBJECTIVE_AMOUNT); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_TUTUBUKI) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (bnpc == BNPC_DAPPER_CADAVER) then + player:SendGameMessage(GetWorldMaster(), 50041, 0x20, 3101818, 1, 1); -- The has been defeated. (X of Y) + player:SendGameMessage(GetWorldMaster(), 25246, 0x20, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_CADAVER_AREA; + elseif (sequence == SEQ_001) then + return MRKR_TUTUBUKI; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc1u4.lua b/Data/scripts/quests/etc/etc1u4.lua new file mode 100644 index 00000000..f72accfd --- /dev/null +++ b/Data/scripts/quests/etc/etc1u4.lua @@ -0,0 +1,126 @@ +require ("global") + +--[[ + +Quest Script + +Name: The Customer Comes First +Code: Etc1u4 +Id: 110679 +Prereq: Level 30, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Stormcry monsters. +SEQ_001 = 1; -- Talk to Cahernaut. +SEQ_002 = 2; -- Talk to Cahernaut. + +-- Actor Class Ids +ENPC_CAHERNAUT = 1000915; +ENPC_HALDBERK = 1000160; +BNPC_STORMCRY_QUARTERMASTER = 2180210; +BNPC_STORMCRY_BOATSWAIN = 2180211; +BNPC_STORMCRY_POWDER_MONKEY = 2180212; + +-- Quest Markers +MRKR_HALDBERK = 11067901; +MRKR_STORMCRY = 11067902; +MRKR_HALDBERK2 = 11067903; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000156; +OBJECTIVE_AMOUNT = 8; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_CAHERNAUT, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_HALDBERK, QFLAG_PLATE); + quest:SetENpc(ENPC_CAHERNAUT); + elseif (sequence == SEQ_001) then + quest:SetENpc(BNPC_STORMCRY_QUARTERMASTER); + quest:SetENpc(BNPC_STORMCRY_BOATSWAIN); + quest:SetENpc(BNPC_STORMCRY_POWDER_MONKEY); + quest:SetENpc(ENPC_HALDBERK); + quest:SetENpc(ENPC_CAHERNAUT); + elseif (sequence == SEQ_002) then + quest:SetENpc(ENPC_HALDBERK, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_CAHERNAUT and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventCahernautStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_CAHERNAUT) then + callClientFunction(player, "delegateEvent", player, quest, "processEventCahernautFollow"); + elseif (npcClassId == ENPC_HALDBERK) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005_1", OBJECTIVE_AMOUNT); + quest:StartSequence(SEQ_001); + end + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_HALDBERK) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005_1Follow"); + elseif (npcClassId == ENPC_CAHERNAUT) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005Cahernaut"); + end + --Quest Complete + elseif (seq == SEQ_002) then + if (npcClassId == ENPC_HALDBERK) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010_1"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_001 and (bnpc == BNPC_STORMCRY_BOATSWAIN or bnpc == BNPC_STORMCRY_POWDER_MONKEY or bnpc == BNPC_STORMCRY_QUARTERMASTER)) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_002); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_HALDBERK; + elseif (sequence == SEQ_001) then + return MRKR_STORMCRY; + elseif (sequence == SEQ_002) then + return MRKR_HALDBERK2; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc1u5.lua b/Data/scripts/quests/etc/etc1u5.lua index e6ef821c..703547fd 100644 --- a/Data/scripts/quests/etc/etc1u5.lua +++ b/Data/scripts/quests/etc/etc1u5.lua @@ -78,9 +78,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_STUFFED_DODO) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_STUFFED_DODO) then local counterAmount = quest:GetData():IncCounter(COUNTER_KILLS); - attentionMessage(player, 25241, counterAmount); -- You have defeated X enemies. + attentionMessage(player, 50041, 3102011, counterAmount, OBJECTIVE_AMOUNT); -- The has been defeated. (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); @@ -89,7 +89,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_KILLS); + return quest:GetData():GetCounter(COUNTER_KILLS), 0, 0, 0, OBJECTIVE_AMOUNT; end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/etc/etc1u6.lua b/Data/scripts/quests/etc/etc1u6.lua index b23f5807..52f7bf9e 100644 --- a/Data/scripts/quests/etc/etc1u6.lua +++ b/Data/scripts/quests/etc/etc1u6.lua @@ -79,9 +79,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_MOILING_MOLE) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_MOILING_MOLE) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); @@ -90,7 +90,7 @@ function onKillBNpc(player, quest, bnpc) end function getJournalInformation(player, quest) - return quest:GetData():GetCounter(COUNTER_KILLS); + return quest:GetData():GetCounter(COUNTER_QUESTITEM), 0, 0, 0, OBJECTIVE_AMOUNT; end function getJournalMapMarkerList(player, quest) diff --git a/Data/scripts/quests/etc/etc2g0.lua b/Data/scripts/quests/etc/etc2g0.lua new file mode 100644 index 00000000..b13900fa --- /dev/null +++ b/Data/scripts/quests/etc/etc2g0.lua @@ -0,0 +1,122 @@ +require ("global") + +--[[ + +Quest Script + +Name: A Forbidden Love +Code: Etc2g0 +Id: 110664 +Prereq: Level 30, Any DoW/DoM, Etc1g9 completed + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Mirror Roselets. +SEQ_001 = 1; -- Talk to Lonsygg. +SEQ_002 = 2; -- Talk to Ethelinda. + +-- Actor Class Ids +ENPC_ETHELINDA = 1001352; +ENPC_LONSYGG = 1000951; +BNPC_MIRROR_ROSELET = 2102708; + +-- Quest Markers +MRKR_ROSELET_AREA = 11066401; +MRKR_LONSYGG = 11066402; +MRKR_ETHELINDA = 11066403; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000161; +OBJECTIVE_AMOUNT = 3; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_ETHELINDA, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_ETHELINDA); + quest:SetENpc(BNPC_MIRROR_ROSELET); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_LONSYGG, QFLAG_PLATE); + quest:SetENpc(ENPC_ETHELINDA); + elseif (sequence == SEQ_002) then + quest:SetENpc(ENPC_ETHELINDA, QFLAG_PLATE); + quest:SetENpc(ENPC_LONSYGG); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_ETHELINDA and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventEthelindaStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_ETHELINDA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_2"); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_LONSYGG) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000"); + quest:StartSequence(SEQ_002); + elseif (npcClassId == ENPC_ETHELINDA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_2"); + end + elseif (seq == SEQ_002) then + if (npcClassId == ENPC_ETHELINDA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + elseif (npcClassId == ENPC_LONSYGG) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2"); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_MIRROR_ROSELET) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_ROSELET_AREA; + elseif (sequence == SEQ_001) then + return MRKR_LONSYGG; + elseif (sequence == SEQ_002) then + return MRKR_ETHELINDA; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc2g1.lua b/Data/scripts/quests/etc/etc2g1.lua new file mode 100644 index 00000000..2af5c206 --- /dev/null +++ b/Data/scripts/quests/etc/etc2g1.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: Last Respects +Code: Etc1g1 +Id: 110665 +Prereq: Level 40, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Lemurs. +SEQ_001 = 1; -- Talk to Eadbert. + +-- Actor Class Ids +ENPC_EADBERT = 1001345; +BNPC_LEMURS = 2100512; + +-- Quest Markers +MRKR_LEMUR_AREA = 11066501; +MRKR_EADBERT = 11066502; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000162; +OBJECTIVE_AMOUNT = 4; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_EADBERT, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_EADBERT); + quest:SetENpc(BNPC_LEMURS); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_EADBERT, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_EADBERT and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventEadbertStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_EADBERT) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000"); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_EADBERT) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_LEMURS) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_LEMUR_AREA; + elseif (sequence == SEQ_001) then + return MRKR_EADBERT; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc2g2.lua b/Data/scripts/quests/etc/etc2g2.lua new file mode 100644 index 00000000..8fa4383f --- /dev/null +++ b/Data/scripts/quests/etc/etc2g2.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: Stone Deaf +Code: Etc2g2 +Id: 110666 +Prereq: Level 18, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Canopy Galagos. +SEQ_001 = 1; -- Talk to Kinborow. + +-- Actor Class Ids +ENPC_KINBOROW = 1000509; +BNPC_CANOPY_GALAGOS = 2100502; + +-- Quest Markers +MRKR_GALAGOS_AREA = 11066602; +MRKR_KINBOROW = 11066601; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000163; +OBJECTIVE_AMOUNT = 5; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_KINBOROW, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_KINBOROW); + quest:SetENpc(BNPC_CANOPY_GALAGOS); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_KINBOROW, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_KINBOROW and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_KINBOROW) then + callClientFunction(player, "delegateEvent", player, quest, "processEventFree"); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_KINBOROW) then + callClientFunction(player, "delegateEvent", player, quest, "processEventClear"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_CANOPY_GALAGOS) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_GALAGOS_AREA; + elseif (sequence == SEQ_001) then + return MRKR_KINBOROW; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc2i0.lua b/Data/scripts/quests/etc/etc2i0.lua new file mode 100644 index 00000000..13686ac6 --- /dev/null +++ b/Data/scripts/quests/etc/etc2i0.lua @@ -0,0 +1,99 @@ +require ("global") + +--[[ + +Quest Script + +Name: Counting Sheep +Code: Etc2i0 +Id: 110706 +Prereq: Level 25, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Dreadwolves. +SEQ_001 = 1; -- Talk to Patrick. + +-- Actor Class Ids +ENPC_PATRICK = 1001358; +BNPC_DREADWOLVES = 2101403; + +-- Quest Markers +MRKR_WOLF_AREA = 11101901; +MRKR_PATRICK = 11101902; + +-- Counters +COUNTER_KILLS = 0; + +-- Quest Details +OBJECTIVE_AMOUNT = 4; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_PATRICK, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_PATRICK); + quest:SetENpc(BNPC_DREADWOLVES); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_PATRICK, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_PATRICK and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventPatrickStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_PATRICK) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000"); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_PATRICK) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_DREADWOLVES) then + local counterAmount = quest:GetData():IncCounter(COUNTER_KILLS); + attentionMessage(player, 50041, 3101403, counterAmount, OBJECTIVE_AMOUNT); -- The has been defeated. (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_WOLF_AREA; + elseif (sequence == SEQ_001) then + return MRKR_PATRICK; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc2i1.lua b/Data/scripts/quests/etc/etc2i1.lua new file mode 100644 index 00000000..26cc6b23 --- /dev/null +++ b/Data/scripts/quests/etc/etc2i1.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: A Hypocritical Oath +Code: Etc2i1 +Id: 110707 +Prereq: Level 25, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Antelope Does. +SEQ_001 = 1; -- Talk to Arscelin. + +-- Actor Class Ids +ENPC_ARSCELIN = 1001574; +BNPC_ANTELOPE_DOES = 2100314; + +-- Quest Markers +MRKR_ARSCELIN = 11102001; +MRKR_ANTELOPE_AREA = 11102002; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000177; +OBJECTIVE_AMOUNT = 5 + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_ARSCELIN, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_ARSCELIN); + quest:SetENpc(BNPC_ANTELOPE_DOES); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_ARSCELIN, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_ARSCELIN and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventArscelinStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_ARSCELIN) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000"); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_ARSCELIN) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_ANTELOPE_DOES) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_ANTELOPE_AREA; + elseif (sequence == SEQ_001) then + return MRKR_ARSCELIN; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc2l0.lua b/Data/scripts/quests/etc/etc2l0.lua new file mode 100644 index 00000000..b84822f2 --- /dev/null +++ b/Data/scripts/quests/etc/etc2l0.lua @@ -0,0 +1,99 @@ +require ("global") + +--[[ + +Quest Script + +Name: Fishing for Answers +Code: Etc2l0 +Id: 110643 +Prereq: Level 25, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Giant Crab. +SEQ_001 = 1; -- Talk to Robairlain. + +-- Actor Class Ids +ENPC_ROBAIRLAIN = 1000050; +BNPC_GIANT_CRAB = 2107601; + +-- Quest Markers +MRKR_CRAB_AREA = 11064301; +MRKR_ROBAIRLAIN = 11064302; + +-- Counters +COUNTER_KILLS = 0; + +-- Quest Details +OBJECTIVE_AMOUNT = 5; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_ROBAIRLAIN, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_ROBAIRLAIN); + quest:SetENpc(BNPC_GIANT_CRAB); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_ROBAIRLAIN, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_ROBAIRLAIN and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventEadbertStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_ROBAIRLAIN) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000"); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_ROBAIRLAIN) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent005"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_GIANT_CRAB) then + local counterAmount = quest:GetData():IncCounter(COUNTER_KILLS); + attentionMessage(player, 50041, 3107601, counterAmount, OBJECTIVE_AMOUNT); -- The has been defeated. (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_CRAB_AREA; + elseif (sequence == SEQ_001) then + return MRKR_ROBAIRLAIN; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc2l3.lua b/Data/scripts/quests/etc/etc2l3.lua new file mode 100644 index 00000000..1a27703f --- /dev/null +++ b/Data/scripts/quests/etc/etc2l3.lua @@ -0,0 +1,110 @@ +require ("global") + +--[[ + +Quest Script + +Name: A Misty Past +Code: Etc2l3 +Id: 110646 +Prereq: Level 17, Any Class + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Talk to the ??? in Shposhae. +SEQ_005 = 5; -- Talk to F'ongho and think about what NM you saw. +SEQ_010 = 10; -- Talk to F'ongho and tell her what it was. + +-- Actor Class Ids +QUEST_OBJECTIVE = 1000359; +FONGHO = 1000367; + +-- Quest Markers +MRKR_OBJECTIVE = 11064601; +MRKR_FONGHO = 11064602; + +-- Quest Misc +RING_ITEMID = 11000228; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(FONGHO, QFLAG_PLATE); + end + + if (sequence == SEQ_000) then + quest:SetENpc(FONGHO); + quest:SetENpc(QUEST_OBJECTIVE, QFLAG_MAP); + elseif (sequence == SEQ_005) then + quest:SetENpc(QUEST_OBJECTIVE); + quest:SetENpc(FONGHO, QFLAG_PLATE); + elseif (sequence == SEQ_010) then + quest:SetENpc(FONGHO, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == FONGHO and not player:HasQuest(quest)) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventFONGHOStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + end + + -- Quest Progress + if (seq == SEQ_000) then + if (npcClassId == FONGHO) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_000"); + elseif (npcClassId == QUEST_OBJECTIVE) then + attentionMessage(player, 25246, RING_ITEMID, 1); -- You obtain + quest:StartSequence(SEQ_005); + end + elseif (seq == SEQ_005) then + if (npcClassId == FONGHO) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_015"); + quest:StartSequence(SEQ_010); + end + elseif (seq == SEQ_010) then + --Quest Complete + if (npcClassId == FONGHO) then + local monsterChoice = callClientFunction(player, "delegateEvent", player, quest, "processEvent_020"); + + if (monsterChoice == 1) then + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function getJournalInformation(player, quest) + return quest:GetSequence() > SEQ_000 and 1 or 0; +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_OBJECTIVE; + elseif (sequence == SEQ_005) then + return MRKR_FONGHO; + elseif (sequence == SEQ_010) then + return MRKR_FONGHO; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc2u1.lua b/Data/scripts/quests/etc/etc2u1.lua new file mode 100644 index 00000000..fe37d201 --- /dev/null +++ b/Data/scripts/quests/etc/etc2u1.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: Freedom Isn't Free +Code: Etc2u1 +Id: 110686 +Prereq: Level 32, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Amalj'aa Strikers. +SEQ_001 = 1; -- Talk to Halstein. + +-- Actor Class Ids +ENPC_HALSTEIN = 1001007; +BNPC_AMALJAA_STRIKER = 2106541; + +-- Quest Markers +MRKR_AMALJAA_AREA = 11068602; +MRKR_HALSTEIN = 11068601; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000201; +OBJECTIVE_AMOUNT = 6; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_HALSTEIN, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_HALSTEIN); + quest:SetENpc(BNPC_AMALJAA_STRIKER); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_HALSTEIN, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_HALSTEIN and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_HALSTEIN) then + callClientFunction(player, "delegateEvent", player, quest, "processEventFree"); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_HALSTEIN) then + callClientFunction(player, "delegateEvent", player, quest, "processEventClear"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_AMALJAA_STRIKER) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_AMALJAA_AREA; + elseif (sequence == SEQ_001) then + return MRKR_HALSTEIN; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc2u2.lua b/Data/scripts/quests/etc/etc2u2.lua new file mode 100644 index 00000000..09bfd0a7 --- /dev/null +++ b/Data/scripts/quests/etc/etc2u2.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: Ore for an Ore +Code: Etc2u2 +Id: 110687 +Prereq: Level 28, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill Iron Coblyns. +SEQ_005 = 5; -- Talk to Pahja Zhwan. + +-- Actor Class Ids +ENPC_PAHJA_ZHWAN = 1001840; +BNPC_IRON_COBLYN = 2102105; + +-- Quest Markers +MRKR_COBLYN_AREA = 11068701; +MRKR_PAHJA_ZHWAN = 11068702; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000226; +OBJECTIVE_AMOUNT = 10; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_PAHJA_ZHWAN, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_PAHJA_ZHWAN); + quest:SetENpc(BNPC_IRON_COBLYN); + elseif (sequence == SEQ_005) then + quest:SetENpc(ENPC_PAHJA_ZHWAN, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_PAHJA_ZHWAN and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventPAHJAZHWANStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_PAHJA_ZHWAN) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000"); + end + --Quest Complete + elseif (seq == SEQ_005) then + if (npcClassId == ENPC_PAHJA_ZHWAN) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_IRON_COBLYN) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_005); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_COBLYN_AREA; + elseif (sequence == SEQ_005) then + return MRKR_PAHJA_ZHWAN; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc3u9.lua b/Data/scripts/quests/etc/etc3u9.lua new file mode 100644 index 00000000..79804a3b --- /dev/null +++ b/Data/scripts/quests/etc/etc3u9.lua @@ -0,0 +1,104 @@ +require ("global") + +--[[ + +Quest Script + +Name: Monster of Maw Most Massive +Code: Etc3u9 +Id: 110734 +Prereq: Level 45, Any DoW/DoM + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Kill ?? ?? ??. +SEQ_001 = 1; -- Talk to Dural Tharal. + +-- Actor Class Ids +ENPC_DURAL_THARAL = 1002101; +BNPC_MUSK_ROSELING = 2102717; + +-- Quest Markers +MRKR_ROSELING_AREA = 11063801; +MRKR_DURAL_THARAL = 11063802; + +-- Counters +COUNTER_QUESTITEM = 0; + +-- Quest Details +OBJECTIVE_ITEMID = 11000149; +OBJECTIVE_AMOUNT = 8; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(ENPC_DURAL_THARAL, QFLAG_PLATE); + elseif (sequence == SEQ_000) then + quest:SetENpc(ENPC_DURAL_THARAL); + quest:SetENpc(BNPC_MUSK_ROSELING); + elseif (sequence == SEQ_001) then + quest:SetENpc(ENPC_DURAL_THARAL, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == ENPC_DURAL_THARAL and seq == SEQ_ACCEPT) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventStart", 0, OBJECTIVE_AMOUNT); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + -- Quest Progress + elseif (seq == SEQ_000) then + if (npcClassId == ENPC_DURAL_THARAL) then + callClientFunction(player, "delegateEvent", player, quest, "processEventFree", 0, OBJECTIVE_AMOUNT); + end + --Quest Complete + elseif (seq == SEQ_001) then + if (npcClassId == ENPC_DURAL_THARAL) then + callClientFunction(player, "delegateEvent", player, quest, "processEventClear"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function onKillBNpc(player, quest, bnpc) + if (bnpc == BNPC_MUSK_ROSELING) then + local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) + if (counterAmount >= OBJECTIVE_AMOUNT) then + attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! + quest:StartSequence(SEQ_001); + end + end +end + +function getJournalInformation(player, quest) + return quest:GetData():GetCounter(COUNTER_QUESTITEM); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_ROSELING_AREA; + elseif (sequence == SEQ_001) then + return MRKR_DURAL_THARAL; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/wld/wld0g1.lua b/Data/scripts/quests/wld/wld0g1.lua index d5cd5d42..b6871cf1 100644 --- a/Data/scripts/quests/wld/wld0g1.lua +++ b/Data/scripts/quests/wld/wld0g1.lua @@ -79,9 +79,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_SABLETOOTH_SPRIGGAN) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_SABLETOOTH_SPRIGGAN) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); diff --git a/Data/scripts/quests/wld/wld0g3.lua b/Data/scripts/quests/wld/wld0g3.lua index a2b6f165..11aa2f4e 100644 --- a/Data/scripts/quests/wld/wld0g3.lua +++ b/Data/scripts/quests/wld/wld0g3.lua @@ -79,9 +79,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_OILBUG) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_OILBUG) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); diff --git a/Data/scripts/quests/wld/wld0g4.lua b/Data/scripts/quests/wld/wld0g4.lua index a6c87c95..59c789bb 100644 --- a/Data/scripts/quests/wld/wld0g4.lua +++ b/Data/scripts/quests/wld/wld0g4.lua @@ -79,9 +79,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_MATURE_FUNGUAR) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_MATURE_FUNGUAR) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); diff --git a/Data/scripts/quests/wld/wld0u1.lua b/Data/scripts/quests/wld/wld0u1.lua index 9e78fbfb..f90836d3 100644 --- a/Data/scripts/quests/wld/wld0u1.lua +++ b/Data/scripts/quests/wld/wld0u1.lua @@ -36,7 +36,7 @@ function onStateChange(player, quest, sequence) end if (sequence == SEQ_000) then - quest:SetENpc(MRKR_TYAGO_MOUI); + quest:SetENpc(TYAGO_MOUI); quest:SetENpc(LYNGWAEK, QFLAG_PLATE); elseif (sequence == SEQ_001) then quest:SetENpc(LYNGWAEK); @@ -49,7 +49,7 @@ function onTalk(player, quest, npc, eventName) local seq = quest:GetSequence(); -- Offer the quest - if (npcClassId == MRKR_TYAGO_MOUI and seq == SEQ_ACCEPT) then + if (npcClassId == TYAGO_MOUI and seq == SEQ_ACCEPT) then local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventTyagomouiStart"); if (questAccepted == 1) then player:AcceptQuest(quest); @@ -60,7 +60,7 @@ function onTalk(player, quest, npc, eventName) -- Quest Progress if (seq == SEQ_000) then - if (npcClassId == MRKR_TYAGO_MOUI) then + if (npcClassId == TYAGO_MOUI) then callClientFunction(player, "delegateEvent", player, quest, "followEvent005"); elseif (npcClassId == LYNGWAEK) then callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); @@ -68,7 +68,7 @@ function onTalk(player, quest, npc, eventName) end elseif (seq == SEQ_001) then --Quest Complete - if (npcClassId == MRKR_TYAGO_MOUI) then + if (npcClassId == TYAGO_MOUI) then callClientFunction(player, "delegateEvent", player, quest, "processEvent020"); callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); player:CompleteQuest(quest); diff --git a/Data/scripts/quests/wld/wld0u2.lua b/Data/scripts/quests/wld/wld0u2.lua index 4fbd3b1d..6fd0e815 100644 --- a/Data/scripts/quests/wld/wld0u2.lua +++ b/Data/scripts/quests/wld/wld0u2.lua @@ -79,9 +79,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_AMALJAA_GRUNTS) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_AMALJAA_GRUNTS) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); diff --git a/Data/scripts/quests/wld/wld0u4.lua b/Data/scripts/quests/wld/wld0u4.lua index 52d8d5c1..c50caa56 100644 --- a/Data/scripts/quests/wld/wld0u4.lua +++ b/Data/scripts/quests/wld/wld0u4.lua @@ -79,9 +79,9 @@ function onTalk(player, quest, npc, eventName) end function onKillBNpc(player, quest, bnpc) - if (bnpc == BNPC_AMALJAA_DRUDGES) then + if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_AMALJAA_DRUDGES) then local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM); - attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain + attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain (X of Y) if (counterAmount >= OBJECTIVE_AMOUNT) then attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete! quest:StartSequence(SEQ_001); From a6ee42094c5dd66371813a8fe51f6a9f417e340e Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sat, 2 Apr 2022 12:26:18 -0400 Subject: [PATCH 09/12] Finished 'What a Pirate Wants' (lol what a Pirate Needs, what a Pirate, whatever keeps rum in my arms and I'm thanking you for giving it to me.) --- Data/scripts/quests/etc/etc3l3.lua | 101 +++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 Data/scripts/quests/etc/etc3l3.lua diff --git a/Data/scripts/quests/etc/etc3l3.lua b/Data/scripts/quests/etc/etc3l3.lua new file mode 100644 index 00000000..be164158 --- /dev/null +++ b/Data/scripts/quests/etc/etc3l3.lua @@ -0,0 +1,101 @@ +require ("global") + +--[[ + +Quest Script + +Name: What a Pirate Wants +Code: Etc3l3 +Id: 110746 +Prereq: Level 15, Any Class + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Talk to Tefh Moshroca. +SEQ_001 = 1; -- Talk to Hasthwab. + +-- Actor Class Ids +BADERON = 1000137; +TEFH_MOSHROCA = 1000131; +HASTHWAB = 1001064; + +-- Quest Markers +MRKR_MOSHROCA = 11070301; +MRKR_HATHWAB = 11070302; + +-- Quest Misc +RUM_ITEMID = 11000207; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(BADERON, QFLAG_PLATE); + end + + if (sequence == SEQ_000) then + quest:SetENpc(TEFH_MOSHROCA, QFLAG_PLATE); + quest:SetENpc(BADERON); + elseif (sequence == SEQ_001) then + quest:SetENpc(HASTHWAB, QFLAG_REWARD); + quest:SetENpc(TEFH_MOSHROCA); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == BADERON and not player:HasQuest(quest)) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventBADERONStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + end + + -- Quest Progress + if (seq == SEQ_000) then + if (npcClassId == TEFH_MOSHROCA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_005"); + player:SendGameMessage(GetWorldMaster(), 25117, 0x20, RUM_ITEMID); -- You obtain a bottle of Radz-at-Han Reserve. + quest:StartSequence(SEQ_001); + elseif (npcClassId == BADERON) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_000"); + end + elseif (seq == SEQ_001) then + --Quest Complete + if (npcClassId == HASTHWAB) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + elseif (npcClassId == TEFH_MOSHROCA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_01"); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function getJournalInformation(player, quest) + return quest:GetSequence() == SEQ_001 and 1 or 0; +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_MOSHROCA; + elseif (sequence == SEQ_001) then + return MRKR_HATHWAB; + end +end \ No newline at end of file From 159242068d33bda888b733053c3f9d9fa5dfa098 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sat, 2 Apr 2022 12:45:53 -0400 Subject: [PATCH 10/12] =?UTF-8?q?Added=20Call=20of=20Booty=20(=20=CD=A1?= =?UTF-8?q?=C2=B0=20=CD=9C=CA=96=20=CD=A1=C2=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/scripts/quests/etc/etc303.lua | 74 ++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Data/scripts/quests/etc/etc303.lua diff --git a/Data/scripts/quests/etc/etc303.lua b/Data/scripts/quests/etc/etc303.lua new file mode 100644 index 00000000..6f619d3b --- /dev/null +++ b/Data/scripts/quests/etc/etc303.lua @@ -0,0 +1,74 @@ +require ("global") + +--[[ + +Quest Script + +Name: Call of Booty +Code: Etc303 +Id: 110810 +Prereq: Level 15, Any Class. Etc3l3, Etc3g3, or Etc3u3 completed. + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Talk to F'ongho. + +-- Actor Class Ids +HASTHWAB = 1001064; +FONGHO = 1000367; + +-- Quest Markers +MRKR_FONGHO = 11213201; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(HASTHWAB, QFLAG_PLATE); + end + + if (sequence == SEQ_000) then + quest:SetENpc(FONGHO, QFLAG_PLATE); + quest:SetENpc(HASTHWAB); + elseif (sequence == SEQ_001) then + quest:SetENpc(FONGHO, QFLAG_REWARD); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == HASTHWAB and not player:HasQuest(quest)) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventHASTHWABStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + end + + if (seq == SEQ_000) then + if (npcClassId == FONGHO) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_005"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + elseif (npcClassId == HASTHWAB) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_000"); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function getJournalMapMarkerList(player, quest) + return MRKR_FONGHO; +end \ No newline at end of file From 514610f0061b6546fac6e5f60cd70306a284c28f Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sat, 2 Apr 2022 12:47:19 -0400 Subject: [PATCH 11/12] Minor fix to Call of Booty. --- Data/scripts/quests/etc/etc303.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Data/scripts/quests/etc/etc303.lua b/Data/scripts/quests/etc/etc303.lua index 6f619d3b..4c01b876 100644 --- a/Data/scripts/quests/etc/etc303.lua +++ b/Data/scripts/quests/etc/etc303.lua @@ -34,10 +34,8 @@ function onStateChange(player, quest, sequence) end if (sequence == SEQ_000) then - quest:SetENpc(FONGHO, QFLAG_PLATE); - quest:SetENpc(HASTHWAB); - elseif (sequence == SEQ_001) then quest:SetENpc(FONGHO, QFLAG_REWARD); + quest:SetENpc(HASTHWAB); end end From a5a039ce3d2c54751548f43b8f9fb096e51e91f0 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sat, 2 Apr 2022 13:34:32 -0400 Subject: [PATCH 12/12] Added the other two Shposhae quests; A Slippery Stone and Cutthroat Prices. Also modified the PopFlyingShip script to move the quest along. --- .../chara/npc/populace/PopulaceFlyingShip.lua | 44 ++++++++ Data/scripts/quests/etc/etc3g3.lua | 101 ++++++++++++++++++ Data/scripts/quests/etc/etc3u3.lua | 101 ++++++++++++++++++ 3 files changed, 246 insertions(+) create mode 100644 Data/scripts/quests/etc/etc3g3.lua create mode 100644 Data/scripts/quests/etc/etc3u3.lua diff --git a/Data/scripts/base/chara/npc/populace/PopulaceFlyingShip.lua b/Data/scripts/base/chara/npc/populace/PopulaceFlyingShip.lua index 47361518..8c6560d8 100644 --- a/Data/scripts/base/chara/npc/populace/PopulaceFlyingShip.lua +++ b/Data/scripts/base/chara/npc/populace/PopulaceFlyingShip.lua @@ -18,7 +18,51 @@ end function onEventStarted(player, npc, triggerName) + -- Special case for A Slippery Stone and Cutthroat Prices + if (player:HasQuest(110737) == true) then + require ("quests/etc/etc3g3"); + local quest = player:GetQuest("Etc3g3"); + if (quest:GetSequence() == SEQ_000) then + local choice = callClientFunction(player, "delegateEvent", player, quest, "processEvent_005"); + if (choice == 1) then + quest:StartSequence(SEQ_001); + addPlayerToAirship(player, 2); + end + player:EndEvent(); + return; + end + elseif (player:HasQuest(110728) == true) then + require ("quests/etc/etc3u3"); + local quest = player:GetQuest("Etc3u3"); + if (quest:GetSequence() == SEQ_000) then + local choice = callClientFunction(player, "delegateEvent", player, quest, "processEvent_005"); + if (choice == 1) then + quest:StartSequence(SEQ_001); + addPlayerToAirship(player, 3); + end + player:EndEvent(); + return; + end + end + + -- Otherwise normal operation callClientFunction(player, "eventIn", player, false, nil, 5); player:EndEvent(); +end + +function addPlayerToAirship(player, city) + if (city == 1) then + -- Limsa Airship + GetWorldManager():WarpToPosition(player, -764.519, -3.146, 384.154, 1.575); + --GetWorldManager():AddPlayerToShipList(player, 2); + elseif (city == 2) then + -- Gridania Airship + GetWorldManager():WarpToPosition(player, 54.47, -7, -1198.54, -0.02); + --GetWorldManager():AddPlayerToShipList(player, 3); + elseif (city == 3) then + -- Ul'dah Airship + GetWorldManager():WarpToPosition(player, -126.580, 271.2, 156.435, -1.35); + --GetWorldManager():AddPlayerToShipList(player, 4); + end end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc3g3.lua b/Data/scripts/quests/etc/etc3g3.lua new file mode 100644 index 00000000..f61431b9 --- /dev/null +++ b/Data/scripts/quests/etc/etc3g3.lua @@ -0,0 +1,101 @@ +require ("global") + +--[[ + +Quest Script + +Name: A Slippery Stone +Code: Etc3g3 +Id: 110737 +Prereq: Level 15, Any Class + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Talk to Lionnellais. +SEQ_001 = 1; -- Talk to Hasthwab. + +-- Actor Class Ids +MIOUNNE = 1000230; +LIONNELLAIS = 1500055; +HASTHWAB = 1001064; + +-- Quest Markers +MRKR_LIONNELLAIS = 11080301; +MRKR_HATHWAB = 11080302; + +-- Quest Misc +AIRSHIP_PASS_ITEMID = 11000208; + +function onStart(player, quest) + player:SendGameMessage(GetWorldMaster(), 25117, 0x20, AIRSHIP_PASS_ITEMID); -- You obtain a Airship Pass (GRD-LMS). + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(MIOUNNE, QFLAG_PLATE); + end + + if (sequence == SEQ_000) then + quest:SetENpc(LIONNELLAIS, QFLAG_PLATE); + quest:SetENpc(MIOUNNE); + elseif (sequence == SEQ_001) then + quest:SetENpc(HASTHWAB, QFLAG_REWARD); + quest:SetENpc(LIONNELLAIS); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == MIOUNNE and not player:HasQuest(quest)) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventMIOUNNEStart"); + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + end + + -- Quest Progress + if (seq == SEQ_000) then + if (npcClassId == LIONNELLAIS) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_005"); + quest:StartSequence(SEQ_001); + elseif (npcClassId == MIOUNNE) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_000"); + end + elseif (seq == SEQ_001) then + --Quest Complete + if (npcClassId == HASTHWAB) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + elseif (npcClassId == LIONNELLAIS) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_01"); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function getJournalInformation(player, quest) + return quest:GetSequence() == SEQ_000 and 1 or 0; +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_LIONNELLAIS; + elseif (sequence == SEQ_001) then + return MRKR_HATHWAB; + end +end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc3u3.lua b/Data/scripts/quests/etc/etc3u3.lua new file mode 100644 index 00000000..f098fdc0 --- /dev/null +++ b/Data/scripts/quests/etc/etc3u3.lua @@ -0,0 +1,101 @@ +require ("global") + +--[[ + +Quest Script + +Name: Cutthroat Prices +Code: Etc3u3 +Id: 110728 +Prereq: Level 15, Any Class + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Talk to Stangyth. +SEQ_001 = 1; -- Talk to Hasthwab. + +-- Actor Class Ids +MOMODI = 1000841; +STANGYTH = 1500208; +HASTHWAB = 1001064; + +-- Quest Markers +MRKR_STANGYTH = 11090301; +MRKR_HATHWAB = 11090302; + +-- Quest Misc +AIRSHIP_PASS_ITEMID = 11000209; + +function onStart(player, quest) + player:SendGameMessage(GetWorldMaster(), 25117, 0x20, AIRSHIP_PASS_ITEMID); -- You obtain a Airship Pass (ULD-LMS). + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onStateChange(player, quest, sequence) + if (sequence == SEQ_ACCEPT) then + quest:SetENpc(MOMODI, QFLAG_PLATE); + end + + if (sequence == SEQ_000) then + quest:SetENpc(STANGYTH, QFLAG_PLATE); + quest:SetENpc(MOMODI); + elseif (sequence == SEQ_001) then + quest:SetENpc(HASTHWAB, QFLAG_REWARD); + quest:SetENpc(STANGYTH); + end +end + +function onTalk(player, quest, npc, eventName) + local npcClassId = npc.GetActorClassId(); + local seq = quest:GetSequence(); + + -- Offer the quest + if (npcClassId == MOMODI and not player:HasQuest(quest)) then + local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventMIOUNNEStart"); -- Not a typo, SE's error copy/pasting tsk tsk. + if (questAccepted == 1) then + player:AcceptQuest(quest); + end + player:EndEvent(); + return; + end + + -- Quest Progress + if (seq == SEQ_000) then + if (npcClassId == STANGYTH) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_005"); + quest:StartSequence(SEQ_001); + elseif (npcClassId == MOMODI) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_000"); + end + elseif (seq == SEQ_001) then + --Quest Complete + if (npcClassId == HASTHWAB) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_010"); + callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest); + elseif (npcClassId == STANGYTH) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_01"); + end + end + + quest:UpdateENPCs(); + player:EndEvent(); +end + +function getJournalInformation(player, quest) + return quest:GetSequence() == SEQ_000 and 1 or 0; +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MRKR_STANGYTH; + elseif (sequence == SEQ_001) then + return MRKR_HATHWAB; + end +end \ No newline at end of file