mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-24 13:47:46 +00:00
Adding the rest of the wld quests: Sanguine Studies, Secrets Unearthed, and Rustproof.
This commit is contained in:
parent
65ee91e49c
commit
4d424e57f9
3 changed files with 301 additions and 0 deletions
104
Data/scripts/quests/wld/wld0u2.lua
Normal file
104
Data/scripts/quests/wld/wld0u2.lua
Normal 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_AMOUNT = 8;
|
||||||
|
|
||||||
|
function onStart(player, quest)
|
||||||
|
quest:StartSequence(SEQ_000);
|
||||||
|
end
|
||||||
|
|
||||||
|
function onFinish(player, quest)
|
||||||
|
end
|
||||||
|
|
||||||
|
function onStateChange(player, quest, sequence)
|
||||||
|
if (sequence == SEQ_ACCEPT) then
|
||||||
|
quest:SetENpc(ENPC_PAPALA, QFLAG_PLATE);
|
||||||
|
elseif (sequence == SEQ_000) then
|
||||||
|
quest:SetENpc(ENPC_PAPALA);
|
||||||
|
quest:SetENpc(BNPC_AMALJAA_GRUNTS);
|
||||||
|
elseif (sequence == SEQ_001) then
|
||||||
|
quest:SetENpc(ENPC_PAPALA, QFLAG_REWARD);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function onTalk(player, quest, npc, eventName)
|
||||||
|
local npcClassId = npc.GetActorClassId();
|
||||||
|
local seq = quest:GetSequence();
|
||||||
|
|
||||||
|
-- Offer the quest
|
||||||
|
if (npcClassId == ENPC_PAPALA and seq == SEQ_ACCEPT) then
|
||||||
|
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventPapalaStart");
|
||||||
|
if (questAccepted == 1) then
|
||||||
|
player:AcceptQuest(quest);
|
||||||
|
end
|
||||||
|
player:EndEvent();
|
||||||
|
return;
|
||||||
|
-- Quest Progress
|
||||||
|
elseif (seq == SEQ_000) then
|
||||||
|
if (npcClassId == ENPC_PAPALA) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent000");
|
||||||
|
end
|
||||||
|
--Quest Complete
|
||||||
|
elseif (seq == SEQ_001) then
|
||||||
|
if (npcClassId == ENPC_PAPALA) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
|
||||||
|
player:CompleteQuest(quest);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
quest:UpdateENPCs();
|
||||||
|
player:EndEvent();
|
||||||
|
end
|
||||||
|
|
||||||
|
-- TODO FINISH THIS
|
||||||
|
function onKillBNpc(player, quest, bnpc)
|
||||||
|
if (bnpc == BNPC_AMALJAA_GRUNTS) then
|
||||||
|
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
|
||||||
|
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
|
||||||
|
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
|
93
Data/scripts/quests/wld/wld0u3.lua
Normal file
93
Data/scripts/quests/wld/wld0u3.lua
Normal 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
|
104
Data/scripts/quests/wld/wld0u4.lua
Normal file
104
Data/scripts/quests/wld/wld0u4.lua
Normal 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_AMOUNT = 8;
|
||||||
|
|
||||||
|
function onStart(player, quest)
|
||||||
|
quest:StartSequence(SEQ_000);
|
||||||
|
end
|
||||||
|
|
||||||
|
function onFinish(player, quest)
|
||||||
|
end
|
||||||
|
|
||||||
|
function onStateChange(player, quest, sequence)
|
||||||
|
if (sequence == SEQ_ACCEPT) then
|
||||||
|
quest:SetENpc(ENPC_PAPALA, QFLAG_PLATE);
|
||||||
|
elseif (sequence == SEQ_000) then
|
||||||
|
quest:SetENpc(ENPC_PAPALA);
|
||||||
|
quest:SetENpc(BNPC_AMALJAA_DRUDGES);
|
||||||
|
elseif (sequence == SEQ_001) then
|
||||||
|
quest:SetENpc(ENPC_PAPALA, QFLAG_REWARD);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function onTalk(player, quest, npc, eventName)
|
||||||
|
local npcClassId = npc.GetActorClassId();
|
||||||
|
local seq = quest:GetSequence();
|
||||||
|
|
||||||
|
-- Offer the quest
|
||||||
|
if (npcClassId == ENPC_PAPALA and seq == SEQ_ACCEPT) then
|
||||||
|
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventPAPALAStart");
|
||||||
|
if (questAccepted == 1) then
|
||||||
|
player:AcceptQuest(quest);
|
||||||
|
end
|
||||||
|
player:EndEvent();
|
||||||
|
return;
|
||||||
|
-- Quest Progress
|
||||||
|
elseif (seq == SEQ_000) then
|
||||||
|
if (npcClassId == ENPC_PAPALA) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1");
|
||||||
|
end
|
||||||
|
--Quest Complete
|
||||||
|
elseif (seq == SEQ_001) then
|
||||||
|
if (npcClassId == ENPC_PAPALA) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010");
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
|
||||||
|
player:CompleteQuest(quest);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
quest:UpdateENPCs();
|
||||||
|
player:EndEvent();
|
||||||
|
end
|
||||||
|
|
||||||
|
-- TODO FINISH THIS
|
||||||
|
function onKillBNpc(player, quest, bnpc)
|
||||||
|
if (bnpc == BNPC_AMALJAA_DRUDGES) then
|
||||||
|
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
|
||||||
|
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
|
||||||
|
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
|
Loading…
Add table
Reference in a new issue