1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-20 11:47:48 +00:00

Merge remote-tracking branch 'origin/ioncannon/quest_system' into Jorge/quest_system

This commit is contained in:
CuriousJorge 2022-04-03 01:14:13 -04:00
commit 01d05b5cee
42 changed files with 3024 additions and 119 deletions

View file

@ -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

View file

@ -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 <item> (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

View file

@ -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 <item> (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

View file

@ -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
@ -77,12 +78,11 @@ function onTalk(player, quest, npc, eventName)
player:EndEvent();
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 <item>
if (counterAmount >= OBJECTIVE_MARMOTHIDE) then
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_BRISTLETAIL_MARMOT) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (X of Y)
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_MARMOTHIDE);
return quest:GetData():GetCounter(COUNTER_QUESTITEM), 0, 0, 0, OBJECTIVE_AMOUNT;
end
function getJournalMapMarkerList(player, quest)

View file

@ -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 <item> (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

View file

@ -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 <item>
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 <dispName> 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

View file

@ -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 <item> (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

View file

@ -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;
@ -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 <item>
if (counterAmount >= OBJECTIVE_RINGS) then
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_JETSAM_JELLIES) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (X of Y)
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 0, quest:GetData():GetCounter(COUNTER_QUESTITEM);
end
function getJournalMapMarkerList(player, quest)

View file

@ -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,22 +77,17 @@ 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 <item>
if (counterAmount >= OBJECTIVE_SLUMBERNUT) then
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_TOLL_PUK) then
local counterAmount = quest:GetData():IncCounter(COUNTER_KILLS);
attentionMessage(player, 50041, 3100116, counterAmount, OBJECTIVE_AMOUNT); -- The <dispName> 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:GetData():GetCounter(COUNTER_SLUMBERNUT);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();

View file

@ -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 <item>
attentionMessage(player, 25246, OBJECTIVE_ITEMID, 1); -- You obtain <item>
if (counterAmount >= OBJECTIVE_AMOUNT) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);

View file

@ -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
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_MUSK_ROSELING) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (X of Y)
if (counterAmount >= OBJECTIVE_AMOUNT) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);

View file

@ -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
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_BERYL_CRAB) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (X of Y)
if (counterAmount >= OBJECTIVE_AMOUNT) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);

View file

@ -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);
@ -75,17 +76,17 @@ 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
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
@ -102,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, 51062, 0, counterAmount, 4); -- You obtain <item>
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (X of Y)
if (counterAmount >= OBJECTIVE_AMOUNT) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_002);
@ -115,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)

View file

@ -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");
@ -128,17 +128,27 @@ 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);
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 +185,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 +197,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 +210,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

View file

@ -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 <item> (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

View file

@ -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 <item>
if (counterAmount >= OBJECTIVE_SLUMBERNUT) then
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_NUTGRABBER_MARMOT) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (X of Y)
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), 0, 0, 0, OBJECTIVE_AMOUNT;
end
function getJournalMapMarkerList(player, quest)

View file

@ -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 <dispName> has been defeated. (X of Y)
player:SendGameMessage(GetWorldMaster(), 25246, 0x20, OBJECTIVE_ITEMID, 1); -- You obtain <item>
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

View file

@ -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 <item> (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

View file

@ -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 (quest:GetSequence() == SEQ_000 and bnpc == BNPC_STUFFED_DODO) then
local counterAmount = quest:GetData():IncCounter(COUNTER_KILLS);
attentionMessage(player, 50041, 3102011, counterAmount, OBJECTIVE_AMOUNT); -- The <dispName> 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:GetData():GetCounter(COUNTER_KILLS), 0, 0, 0, OBJECTIVE_AMOUNT;
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

View file

@ -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 (quest:GetSequence() == SEQ_000 and bnpc == BNPC_MOILING_MOLE) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (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_MOLE_AREA;
elseif (sequence == SEQ_001) then
return MRKR_MOHTFRYD;
end
end

View file

@ -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 <item> (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

View file

@ -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 <item> (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

View file

@ -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 <item> (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

View file

@ -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 <dispName> 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

View file

@ -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 <item> (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

View file

@ -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 <dispName> 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

View file

@ -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 <item>
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

View file

@ -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 <item> (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

View file

@ -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 <item> (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

View file

@ -0,0 +1,72 @@
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_REWARD);
quest:SetENpc(HASTHWAB);
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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 <item> (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

View file

@ -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
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_SABLETOOTH_SPRIGGAN) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (X of Y)
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)

View file

@ -24,10 +24,11 @@ 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 <item>
if (counterAmount >= OBJECTIVE_OIL) then
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_OILBUG) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (X of Y)
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)

View file

@ -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 <item>
if (counterAmount >= OBJECTIVE_SPORESAC) then
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_MATURE_FUNGUAR) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (X of Y)
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)

View file

@ -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);

View file

@ -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_ITEMID = 11000173;
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_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
function onKillBNpc(player, quest, bnpc)
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_AMALJAA_GRUNTS) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (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_GRUNTS;
elseif (sequence == SEQ_001) then
return MRKR_PAPALA;
end
end

View file

@ -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

View file

@ -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_ITEMID = 11000303;
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_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", OBJECTIVE_AMOUNT);
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", OBJECTIVE_AMOUNT);
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
function onKillBNpc(player, quest, bnpc)
if (quest:GetSequence() == SEQ_000 and bnpc == BNPC_AMALJAA_DRUDGES) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 25226, OBJECTIVE_ITEMID, 1, counterAmount, OBJECTIVE_AMOUNT); -- You obtain <item> (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_DRUDGES;
elseif (sequence == SEQ_001) then
return MRKR_PAPALA;
end
end