mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-24 13:47:46 +00:00
Added An Inconvenient Dodo and Besmitten and Besmirched.
This commit is contained in:
parent
e53e54b4bf
commit
938cca0298
2 changed files with 207 additions and 0 deletions
103
Data/scripts/quests/etc/etc1u5.lua
Normal file
103
Data/scripts/quests/etc/etc1u5.lua
Normal 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 (bnpc == BNPC_STUFFED_DODO) then
|
||||
local counterAmount = quest:GetData():IncCounter(COUNTER_KILLS);
|
||||
attentionMessage(player, 25241, counterAmount); -- You have defeated X enemies.
|
||||
if (counterAmount >= OBJECTIVE_AMOUNT) then
|
||||
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
|
||||
quest:StartSequence(SEQ_001);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function getJournalInformation(player, quest)
|
||||
return quest:GetData():GetCounter(COUNTER_KILLS);
|
||||
end
|
||||
|
||||
function getJournalMapMarkerList(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
return MRKR_DODO_AREA;
|
||||
elseif (sequence == SEQ_001) then
|
||||
return MRKR_UBOKHN;
|
||||
end
|
||||
end
|
104
Data/scripts/quests/etc/etc1u6.lua
Normal file
104
Data/scripts/quests/etc/etc1u6.lua
Normal 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 (bnpc == BNPC_MOILING_MOLE) then
|
||||
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
|
||||
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);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function getJournalInformation(player, quest)
|
||||
return quest:GetData():GetCounter(COUNTER_KILLS);
|
||||
end
|
||||
|
||||
function getJournalMapMarkerList(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
return MRKR_MOLE_AREA;
|
||||
elseif (sequence == SEQ_001) then
|
||||
return MRKR_MOHTFRYD;
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue