mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-27 12:56:07 +02:00
The journal update msg shows even when completing quests now. Added Revenge on the Reavers, Till Death Do Us Part, Beryl Overboard, Have You Seen My Son, and Food for Thought.
This commit is contained in:
parent
96f9119cca
commit
f491c63b98
6 changed files with 663 additions and 2 deletions
108
Data/scripts/quests/etc/etc1l3.lua
Normal file
108
Data/scripts/quests/etc/etc1l3.lua
Normal file
|
@ -0,0 +1,108 @@
|
|||
require ("global")
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Revenge on the Reavers
|
||||
Code: Etc1l3
|
||||
Id: 110636
|
||||
Prereq: Level 45, Any DoW/DoM
|
||||
|
||||
]]
|
||||
|
||||
-- Sequence Numbers
|
||||
SEQ_000 = 0; -- Kill Reavers.
|
||||
SEQ_001 = 1; -- Talk to Chaunollet.
|
||||
|
||||
-- Actor Class Ids
|
||||
ENPC_CHAUNOLLET = 1000125;
|
||||
BNPC_REAVER_CLAWS = 2180301;
|
||||
BNPC_REAVER_FINS = 2180302;
|
||||
BNPC_REAVER_EYES = 2180303;
|
||||
|
||||
-- Quest Markers
|
||||
MRKR_REAVER_AREA = 11063601;
|
||||
MRKR_CHAUNOLLET = 11063602;
|
||||
|
||||
-- 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_CHAUNOLLET, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_000) then
|
||||
quest:SetENpc(ENPC_CHAUNOLLET);
|
||||
quest:SetENpc(BNPC_REAVER_EYES);
|
||||
quest:SetENpc(BNPC_REAVER_FINS);
|
||||
quest:SetENpc(BNPC_REAVER_CLAWS);
|
||||
elseif (sequence == SEQ_001) then
|
||||
quest:SetENpc(ENPC_CHAUNOLLET, QFLAG_REWARD);
|
||||
end
|
||||
end
|
||||
|
||||
function onTalk(player, quest, npc, eventName)
|
||||
local npcClassId = npc.GetActorClassId();
|
||||
local seq = quest:GetSequence();
|
||||
|
||||
-- Offer the quest
|
||||
if (npcClassId == ENPC_CHAUNOLLET and seq == SEQ_ACCEPT) then
|
||||
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventChaunolletStart");
|
||||
if (questAccepted == 1) then
|
||||
player:AcceptQuest(quest);
|
||||
end
|
||||
player:EndEvent();
|
||||
return;
|
||||
-- Quest Progress
|
||||
elseif (seq == SEQ_000) then
|
||||
if (npcClassId == ENPC_CHAUNOLLET) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000Chaunollet");
|
||||
end
|
||||
--Quest Complete
|
||||
elseif (seq == SEQ_001) then
|
||||
if (npcClassId == ENPC_CHAUNOLLET) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent010Chaunollet");
|
||||
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_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>
|
||||
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_REAVER_AREA;
|
||||
elseif (sequence == SEQ_001) then
|
||||
return MRKR_CHAUNOLLET;
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue