mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-20 11:47:48 +00:00
Fixed up Food for Thought (emotes work now) and Have You Seen my Son (bnpc works).
This commit is contained in:
parent
4d2c80a8ee
commit
a1bb84e80d
2 changed files with 31 additions and 23 deletions
|
@ -32,6 +32,7 @@ MRKR_BOMB_AREA = 11064003;
|
|||
COUNTER_QUESTITEM = 0;
|
||||
|
||||
-- Quest Details
|
||||
OBJECTIVE_ITEMID = 11000151;
|
||||
OBJECTIVE_AMOUNT = 8;
|
||||
|
||||
function onStart(player, quest)
|
||||
|
@ -46,12 +47,12 @@ function onStateChange(player, quest, sequence)
|
|||
quest:SetENpc(ENPC_IMANIA, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_000) then
|
||||
quest:SetENpc(ENPC_IMANIA);
|
||||
quest:SetENpc(ENPC_YUYUBESU, QFLAG_REWARD);
|
||||
quest:SetENpc(ENPC_YUYUBESU, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_001) then
|
||||
quest:SetENpc(ENPC_YUYUBESU);
|
||||
quest:SetENpc(BNPC_BOMB_EMBER);
|
||||
elseif (sequence == SEQ_002) then
|
||||
quest:SetENpc(ENPC_YUYUBESU, QFLAG_REWARD);
|
||||
quest:SetENpc(ENPC_YUYUBESU, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_003) then
|
||||
quest:SetENpc(ENPC_YUYUBESU);
|
||||
quest:SetENpc(ENPC_HILDIE, QFLAG_REWARD);
|
||||
|
@ -81,11 +82,11 @@ function onTalk(player, quest, npc, eventName)
|
|||
--Quest Complete
|
||||
elseif (seq == SEQ_001) then
|
||||
if (npcClassId == ENPC_YUYUBESU) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuFree");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuFree", 0, OBJECTIVE_AMOUNT);
|
||||
end
|
||||
elseif (seq == SEQ_002) then
|
||||
if (npcClassId == ENPC_YUYUBESU) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuAfter");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuAfter", 0, OBJECTIVE_AMOUNT);
|
||||
quest:StartSequence(SEQ_003);
|
||||
end
|
||||
elseif (seq == SEQ_003) then
|
||||
|
@ -106,7 +107,7 @@ end
|
|||
function onKillBNpc(player, quest, bnpc)
|
||||
if (bnpc == BNPC_BOMB_EMBER) then
|
||||
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
|
||||
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <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_002);
|
||||
|
|
|
@ -17,7 +17,7 @@ SEQ_001 = 1; -- Return to Dympna.
|
|||
|
||||
-- Actor Class Ids
|
||||
DYMPNA = 1000331;
|
||||
AERGWNYT = 1000347;
|
||||
AERGWYNT = 1000347;
|
||||
FERDILLAIX = 1000344;
|
||||
BUBUROON = 1000219;
|
||||
RBAHARRA = 1000340;
|
||||
|
@ -25,14 +25,14 @@ FUFUNA = 1000345;
|
|||
|
||||
-- Quest Markers
|
||||
MRKR_DYMPNA = 11064101;
|
||||
MRKR_AERGWNYT = 11064102;
|
||||
MRKR_AERGWYNT = 11064102;
|
||||
MRKR_FERDILLAIX = 11064103;
|
||||
MRKR_BUBUROON = 11064104;
|
||||
MRKR_RBAHARRA = 11064105;
|
||||
MRKR_FUFUNA = 11064106;
|
||||
|
||||
-- Quest Flags
|
||||
FLAG_TALKED_AERGWNYT = 0;
|
||||
FLAG_TALKED_AERGWYNT = 0;
|
||||
FLAG_TALKED_FERDILLAIX = 1;
|
||||
FLAG_TALKED_BUBUROON = 2;
|
||||
FLAG_TALKED_RBAHARRA = 3;
|
||||
|
@ -50,17 +50,17 @@ end
|
|||
|
||||
function onStateChange(player, quest, sequence)
|
||||
if (sequence == SEQ_ACCEPT) then
|
||||
quest:SetENpc(DYMPNA, QFLAG_NORM);
|
||||
quest:SetENpc(DYMPNA, QFLAG_PLATE);
|
||||
end
|
||||
|
||||
local data = quest:GetData();
|
||||
if (sequence == SEQ_000) then
|
||||
quest:SetENpc(DYMPNA);
|
||||
quest:SetENpc(AERGWNYT, (not data:GetFlag(FLAG_TALKED_AERGWNYT) and QFLAG_NORM or QFLAG_NONE));
|
||||
quest:SetENpc(FERDILLAIX, (not data:GetFlag(FLAG_TALKED_FERDILLAIX) and QFLAG_NORM or QFLAG_NONE));
|
||||
quest:SetENpc(BUBUROON, (not data:GetFlag(FLAG_TALKED_BUBUROON) and QFLAG_NORM or QFLAG_NONE));
|
||||
quest:SetENpc(RBAHARRA, (not data:GetFlag(FLAG_TALKED_RBAHARRA) and QFLAG_NORM or QFLAG_NONE));
|
||||
quest:SetENpc(FUFUNA, (not data:GetFlag(FLAG_TALKED_FUFUNA) and QFLAG_NORM or QFLAG_NONE));
|
||||
quest:SetENpc(AERGWYNT, (not data:GetFlag(FLAG_TALKED_AERGWYNT) and QFLAG_PLATE or QFLAG_NONE), true, false, true);
|
||||
quest:SetENpc(FERDILLAIX, (not data:GetFlag(FLAG_TALKED_FERDILLAIX) and QFLAG_PLATE or QFLAG_NONE), true, false, true);
|
||||
quest:SetENpc(BUBUROON, (not data:GetFlag(FLAG_TALKED_BUBUROON) and QFLAG_PLATE or QFLAG_NONE), true, false, true);
|
||||
quest:SetENpc(RBAHARRA, (not data:GetFlag(FLAG_TALKED_RBAHARRA) and QFLAG_PLATE or QFLAG_NONE), true, false, true);
|
||||
quest:SetENpc(FUFUNA, (not data:GetFlag(FLAG_TALKED_FUFUNA) and QFLAG_PLATE or QFLAG_NONE), true, false, true);
|
||||
elseif (sequence == SEQ_001) then
|
||||
quest:SetENpc(DYMPNA, QFLAG_REWARD);
|
||||
end
|
||||
|
@ -85,8 +85,8 @@ function onTalk(player, quest, npc, eventName)
|
|||
if (seq == SEQ_000) then
|
||||
if (npcClassId == DYMPNA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventOffersAfter");
|
||||
elseif (npcClassId == AERGWNYT) then
|
||||
if (not data:GetFlag(FLAG_TALKED_AERGWNYT)) then
|
||||
elseif (npcClassId == AERGWYNT) then
|
||||
if (not data:GetFlag(FLAG_TALKED_AERGWYNT)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventAergwyntSpeak");
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventAergwyntAfter");
|
||||
|
@ -133,12 +133,19 @@ function onEmote(player, quest, npc, eventName)
|
|||
local seq = quest:GetSequence();
|
||||
local data = quest:GetData();
|
||||
local incCounter = false;
|
||||
|
||||
|
||||
-- Play the emote
|
||||
if (eventName == "emoteDefault1") then -- Psych
|
||||
player:DoEmote(npc.Id, 30, 21291);
|
||||
end
|
||||
wait(2.5);
|
||||
|
||||
-- Handle the result
|
||||
if (seq == SEQ_000 and eventName == "emoteDefault1") then
|
||||
if (npcClassId == AERGWNYT) then
|
||||
if (not data:GetFlag(FLAG_TALKED_AERGWNYT)) then
|
||||
if (npcClassId == AERGWYNT) then
|
||||
if (not data:GetFlag(FLAG_TALKED_AERGWYNT)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventAergwynt");
|
||||
data:SetFlag(FLAG_TALKED_AERGWNYT);
|
||||
data:SetFlag(FLAG_TALKED_AERGWYNT);
|
||||
incCounter = true;
|
||||
end
|
||||
elseif (npcClassId == FERDILLAIX) then
|
||||
|
@ -175,7 +182,7 @@ function onEmote(player, quest, npc, eventName)
|
|||
|
||||
if (seq000_checkCondition(data)) then -- All informants spoken to
|
||||
attentionMessage(player, 25225, quest.GetQuestId()); -- objectives complete!
|
||||
quest:UpdateENPCs(); -- Band-aid for a QFLAG_NORM issue
|
||||
quest:UpdateENPCs(); -- Band-aid for a QFLAG_PLATE issue
|
||||
quest:StartSequence(SEQ_001);
|
||||
end
|
||||
end
|
||||
|
@ -187,7 +194,7 @@ end
|
|||
|
||||
-- Check if all informants are talked to
|
||||
function seq000_checkCondition(data)
|
||||
return (data:GetFlag(FLAG_TALKED_AERGWNYT) and
|
||||
return (data:GetFlag(FLAG_TALKED_AERGWYNT) and
|
||||
data:GetFlag(FLAG_TALKED_FERDILLAIX) and
|
||||
data:GetFlag(FLAG_TALKED_BUBUROON) and
|
||||
data:GetFlag(FLAG_TALKED_RBAHARRA) and
|
||||
|
@ -200,7 +207,7 @@ function getJournalMapMarkerList(player, quest)
|
|||
local possibleMarkers = {};
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
if (not data:GetFlag(FLAG_TALKED_AERGWNYT)) then table.insert(possibleMarkers, MRKR_AERGWNYT); end
|
||||
if (not data:GetFlag(FLAG_TALKED_AERGWYNT)) then table.insert(possibleMarkers, MRKR_AERGWYNT); end
|
||||
if (not data:GetFlag(FLAG_TALKED_FERDILLAIX)) then table.insert(possibleMarkers, MRKR_FERDILLAIX); end
|
||||
if (not data:GetFlag(FLAG_TALKED_BUBUROON)) then table.insert(possibleMarkers, MRKR_BUBUROON); end
|
||||
if (not data:GetFlag(FLAG_TALKED_RBAHARRA)) then table.insert(possibleMarkers, MRKR_RBAHARRA); end
|
||||
|
|
Loading…
Add table
Reference in a new issue