Fixed up Food for Thought (emotes work now) and Have You Seen my Son (bnpc works).

This commit is contained in:
Filip Maj 2022-03-29 22:57:02 -04:00
parent 4d2c80a8ee
commit a1bb84e80d
2 changed files with 31 additions and 23 deletions

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