mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 06:24:38 +02:00
Merge remote-tracking branch 'origin/ioncannon/quest_system' into Jorge/quest_system
# Conflicts: # Data/scripts/commands/EmoteStandardCommand.lua # Data/scripts/quests/man/man0g0.lua # Data/scripts/quests/man/man0g1.lua # Data/scripts/quests/man/man0u0.lua Resolved using Theirs.
This commit is contained in:
commit
02fe9e070d
182 changed files with 3871 additions and 1332 deletions
|
@ -10,49 +10,27 @@ Id: 110005
|
|||
Prereq: None (Given on chara creation)
|
||||
Notes:
|
||||
|
||||
|
||||
Using PrivateAreaMasterPast Type 1
|
||||
]]
|
||||
|
||||
--[[
|
||||
SEQS
|
||||
[@IF($E4($E8(1),0),
|
||||
[@SHEET(xtx/journalxtxFst,177,1)]
|
||||
,)]
|
||||
[@IF($E4($E8(1),5),
|
||||
[@SHEET(xtx/journalxtxFst,178,1)]
|
||||
,)]
|
||||
[@IF($E4($E8(1),10),
|
||||
[@SHEET(xtx/journalxtxFst,179,1)]
|
||||
,)]
|
||||
|
||||
|
||||
qItem
|
||||
[@IF($E0($E8(1),10),
|
||||
[@SHEET(xtx/itemName,11000088,5)][@CR]
|
||||
,)]
|
||||
--]]
|
||||
|
||||
|
||||
|
||||
-- Sequence Numbers
|
||||
SEQ_000 = 0; -- Intro with Yda & Papalymo
|
||||
SEQ_005 = 5; -- Combat tutorial
|
||||
SEQ_010 = 10; -- Gridania section
|
||||
|
||||
-- Actor Class Ids
|
||||
YDA = 1000009;
|
||||
PAPALYMO = 1000010;
|
||||
YDA = 1000009;
|
||||
PAPALYMO = 1000010;
|
||||
|
||||
FARRIMOND = 1000017;
|
||||
CECILIA = 1000683;
|
||||
SWETHYNA = 1000680;
|
||||
TKEBBE = 1000876;
|
||||
LONSYGG = 1000951;
|
||||
GUILD_ENTRANCE = 1099046;
|
||||
BLOCKER1 = 1099047;
|
||||
FARRIMOND = 1000017;
|
||||
CECILIA = 1000683;
|
||||
SWETHYNA = 1000680;
|
||||
TKEBBE = 1000876;
|
||||
LONSYGG = 1000951;
|
||||
PUSH_ADV_GUILD = 1099046;
|
||||
BLOCKER1 = 1099047;
|
||||
|
||||
-- Non-interactive NPCs
|
||||
|
||||
GUILD_ANENE = 1000427;
|
||||
GUILD_SYLBERT = 1000428; -- No source
|
||||
GUILD_HONGA_VUNGA = 1000429;
|
||||
|
@ -70,27 +48,18 @@ GUILD_EMONI = 1001183;
|
|||
GUILD_GYLES = 1001184;
|
||||
GUILD_PENELOPE = 1700001; -- No source
|
||||
|
||||
|
||||
|
||||
|
||||
-- PrivateAreaMasterPast 1
|
||||
|
||||
-- Quest Markers
|
||||
MRKR_LONSYGG = 11000501; -- Obsolete. Pre-1.19 location for this npc
|
||||
MRKR_YDA = 11000502;
|
||||
MRKR_PAPALYMO = 11000503;
|
||||
MRKR_GUILD = 11000504;
|
||||
MRKR_LONSYGG = 11000501; -- Obsolete. Pre-1.19 location for this npc
|
||||
MRKR_YDA = 11000502;
|
||||
MRKR_PAPALYMO = 11000503;
|
||||
MRKR_GUILD = 11000504;
|
||||
|
||||
-- Quest Flags
|
||||
FLAG_SEQ000_MINITUT0 = 0; -- Talked to YDA
|
||||
FLAG_SEQ000_MINITUT1 = 1; -- Talked to PAPALYMO
|
||||
FLAG_SEQ000_MINITUT2 = 2; -- Talked to YDA again
|
||||
|
||||
FLAG_SEQ000_MINITUT0 = 0; -- Talked to Yda.
|
||||
FLAG_SEQ000_MINITUT1 = 1; -- Talked to Papalymo.
|
||||
FLAG_SEQ000_MINITUT2 = 2; -- Talked to Yda again.
|
||||
FLAG_SEQ010_TKEBBE = 0; -- Talked to T'kebbe (optional)
|
||||
|
||||
|
||||
|
||||
|
||||
--[[
|
||||
processEvent000_0
|
||||
processEvent000_1
|
||||
|
@ -122,9 +91,6 @@ processTtrBtl004
|
|||
processInformDialogAsQuest
|
||||
--]]
|
||||
|
||||
|
||||
|
||||
|
||||
function onStart(player, quest)
|
||||
quest:StartSequence(SEQ_000);
|
||||
end
|
||||
|
@ -133,7 +99,6 @@ function onFinish(player, quest)
|
|||
end
|
||||
|
||||
function onStateChange(player, quest, sequence)
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
-- Setup states incase we loaded in.
|
||||
local data = quest:GetData();
|
||||
|
@ -172,7 +137,6 @@ function onStateChange(player, quest, sequence)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
function onTalk(player, quest, npc)
|
||||
local sequence = quest:getSequence();
|
||||
local classId = npc:GetActorClassId();
|
||||
|
@ -185,8 +149,6 @@ function onTalk(player, quest, npc)
|
|||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
|
||||
|
||||
function onPush(player, quest, npc)
|
||||
local sequence = quest:getSequence();
|
||||
local classId = npc:GetActorClassId();
|
||||
|
@ -263,7 +225,6 @@ function seq010_onTalk(player, quest, npc, classId)
|
|||
player:EndEvent();
|
||||
end
|
||||
|
||||
|
||||
function getJournalMapMarkerList(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
local possibleMarkers = {};
|
||||
|
@ -286,9 +247,6 @@ function getJournalMapMarkerList(player, quest)
|
|||
return unpack(possibleMarkers)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
function doContentArea(player, quest, npc)
|
||||
quest:GetData():ClearData();
|
||||
quest:StartSequence(SEQ_005);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require("global");
|
||||
|
||||
require("tutorial");
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
@ -17,6 +17,7 @@ Notes:
|
|||
|
||||
-- Sequence Numbers
|
||||
SEQ_000 = 0;
|
||||
SEQ_003 = 3;
|
||||
|
||||
|
||||
-- Actor Class Ids
|
||||
|
@ -28,7 +29,8 @@ MOROSE_MERCHANT = 1001058;
|
|||
NARROW_EYED_ADVENTURER = 1001059;
|
||||
BEAMING_ADVENTURER = 1001062;
|
||||
WELL_BUNDLED_ADVENTURER = 1001060;
|
||||
UNCONCERNED_PASSERBY = 1001648; -- I don't think this was used?
|
||||
UNCONCERNED_PASSERBY = 1001648;
|
||||
--BLOCKER = ;
|
||||
|
||||
-- Quest Markers
|
||||
MRKR_MIOUNNE = 11000601;
|
||||
|
@ -77,11 +79,11 @@ function onTalk(player, quest, npc)
|
|||
local sequence = quest:getSequence();
|
||||
local classId = npc:GetActorClassId();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
--if (sequence == SEQ_000) then
|
||||
seq000_onTalk(player, quest, npc, classId);
|
||||
elseif (sequence == SEQ_005) then
|
||||
seq005_onTalk(player, quest, npc, classId);
|
||||
end
|
||||
-- elseif (sequence == SEQ_005) then
|
||||
-- seq005_onTalk(player, quest, npc, classId);
|
||||
-- end
|
||||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
|
@ -100,21 +102,49 @@ end
|
|||
|
||||
|
||||
function onNotice(player, quest, target)
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_1"); -- Describes what an Instance is
|
||||
player:EndEvent();
|
||||
quest:UpdateENPCs();
|
||||
player:SendMessage(0x20, "", "Test");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventTu_001");
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
|
||||
-- Copy-pasted from man0l1 for now, fix later
|
||||
function onNpcLS(player, quest, npcLSId)
|
||||
local sequence = quest:getSequence();
|
||||
|
||||
if (npcLSId == 1) then
|
||||
player:SetNpcLS(1, 1);
|
||||
player:SendGameMessageLocalizedDisplayName(quest, 330, 39, 1300018, nil);
|
||||
showTutorialSuccessWidget(player, 9080);
|
||||
wait(3);
|
||||
closeTutorialWidget(player);
|
||||
endTutorialMode(player);
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function seq000_onTalk(player, quest, npc, classId)
|
||||
|
||||
if (classId == MOMODI) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
|
||||
if (classId == MIOUNNE) then
|
||||
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent100_1");
|
||||
player:EndEvent();
|
||||
quest:StartSequence(SEQ_005);
|
||||
GetWorldManager():DoZoneChange(player, 175, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation);
|
||||
return;
|
||||
quest:StartSequence(SEQ_003);
|
||||
|
||||
|
||||
local director = GetWorldManager():GetArea(155):CreateDirector("AfterQuestWarpDirector", false);
|
||||
director:StartDirector(true);
|
||||
player:AddDirector(director);
|
||||
--player:SetLoginDirector(director);
|
||||
player:KickEvent(director, "noticeEvent", true);
|
||||
|
||||
quest:UpdateENPCs();
|
||||
--GetWorldManager():WarpToPublicArea(player);
|
||||
GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation);
|
||||
|
||||
elseif (classId == BEAMING_ADVENTURER) then
|
||||
callClientFunction (player, "delegateEvent", player, quest, "processEvent100_6");
|
||||
elseif (classId == AMIABLE_ADVENTURER) then
|
||||
|
@ -126,16 +156,11 @@ function seq000_onTalk(player, quest, npc, classId)
|
|||
elseif (classId == UNCONCERNED_PASSERBY) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml001"); --"processEvent100_9");
|
||||
elseif (classId == VKOROLON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "defaultTalkWithVkorolon_001");
|
||||
callClientFunction(player, "delegateEvent", player, GetStaticActor("DftWil"), "defaultTalkWithVkorolon_001");
|
||||
elseif (classId == WELL_BUNDLED_ADVENTURER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent100_4");
|
||||
elseif (classId == WISPILY_WHISKERED_WOODWORKER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent100_8");
|
||||
elseif (classId == MIOUNNE) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent110");
|
||||
player:EndEvent();
|
||||
quest:StartSequence(SEQ_005);
|
||||
GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation);
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
|
|
|
@ -26,13 +26,14 @@ SEQ_055 = 55; -- Search lighthouse for corpse
|
|||
SEQ_060 = 60; -- Talk to Sisipu
|
||||
SEQ_065 = 65; -- Return to FSH Guild
|
||||
SEQ_070 = 70; -- Contact Baderon on LS
|
||||
SEQ_075 = 75; -- Go to the ARM and BSM Guilds.
|
||||
SEQ_075 = 75; -- Go to the ARM and BSM Guilds. Talk to Bodenolf.
|
||||
SEQ_080 = 80; -- Speak with H'naanza
|
||||
SEQ_085 = 85; -- Speak with Bodenolf
|
||||
SEQ_090 = 90; -- Contact Baderon on LS
|
||||
SEQ_092 = 92; -- Return to Baderon.
|
||||
|
||||
-- Actor Class Ids
|
||||
-- Echo in Adv Guild
|
||||
YSHTOLA = 1000001;
|
||||
CRAPULOUS_ADVENTURER = 1000075;
|
||||
DUPLICITOUS_TRADER = 1000076;
|
||||
|
@ -46,13 +47,16 @@ COCKAHOOP_COCKSWAIN = 1001643;
|
|||
SENTENIOUS_SELLSWORD = 1001649;
|
||||
SOLICITOUS_SELLSWORD = 1001650;
|
||||
|
||||
-- Sequence 003
|
||||
BEARDEDROCK_AETHERYTE = 1280002;
|
||||
|
||||
-- Sequence 007
|
||||
CHARLYS = 1000138;
|
||||
ISANDOREL = 1000152;
|
||||
MERLZIRN = 1000472;
|
||||
MSK_TRIGGER = 1090001;
|
||||
|
||||
-- Echo in Mrd Guild
|
||||
NERVOUS_BARRACUDA = 1000096;
|
||||
INTIMIDATING_BARRACUDA = 1000097;
|
||||
OVEREAGER_BARRACUDA = 1000107;
|
||||
|
@ -65,12 +69,36 @@ ADVENTURER2 = 1000870;
|
|||
ADVENTURER3 = 1000871;
|
||||
ECHO_EXIT_TRIGGER = 1090003;
|
||||
|
||||
-- Fsh Guild
|
||||
NNMULIKA = 1000153;
|
||||
SISIPU_EMOTE = 1000155;
|
||||
ZEPHYR_TRIGGER = 1090004;
|
||||
|
||||
-- Sequence 055, 060, 065
|
||||
SISIPU = 1000156;
|
||||
WINDWORN_CORPSE = 1000091;
|
||||
GLASSYEYED_CORPSE = 1000092;
|
||||
FEARSTRICKEN_CORPSE = 1000378;
|
||||
FSH_TRIGGER = 1090006;
|
||||
|
||||
-- Echo in the Bsm Guild
|
||||
TATTOOED_PIRATE = 1000111;
|
||||
IOFA = 1000135;
|
||||
BODENOLF = 1000144;
|
||||
HNAANZA = 1000145;
|
||||
MIMIDOA = 1000176;
|
||||
JOELLAUT = 1000163;
|
||||
WERNER = 1000247;
|
||||
HIHINE = 1000267;
|
||||
TRINNE = 1000268;
|
||||
ECHO_EXIT_TRIGGER2 = 1090001;
|
||||
|
||||
-- Quest Markers
|
||||
MRKR_HOB = 11000202;
|
||||
|
||||
-- Quest Data
|
||||
CNTR_SEQ7_CUL = 1;
|
||||
CNTR_SEQ7_MRD = 2;
|
||||
CNTR_SEQ40_FSH = 3;
|
||||
|
||||
function onStart(player, quest)
|
||||
quest:StartSequence(SEQ_000);
|
||||
|
@ -140,6 +168,48 @@ function onStateChange(player, quest, sequence)
|
|||
if (subseqCUL == 1 and subseqMRD == 4) then
|
||||
player:SetNpcLS(1, 1);
|
||||
end
|
||||
elseif (sequence == SEQ_035) then
|
||||
quest:SetENpc(NNMULIKA, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_040) then
|
||||
quest:SetENpc(SISIPU_EMOTE, QFLAG_PLATE, true, false, true);
|
||||
quest:SetENpc(NNMULIKA);
|
||||
elseif (sequence == SEQ_048) then
|
||||
quest:SetENpc(BADERON);
|
||||
quest:SetENpc(ZEPHYR_TRIGGER, QFLAG_MAP, false, true);
|
||||
quest:SetENpc(NNMULIKA);
|
||||
elseif (sequence == SEQ_055) then
|
||||
quest:SetENpc(WINDWORN_CORPSE, QFLAG_PLATE);
|
||||
quest:SetENpc(GLASSYEYED_CORPSE);
|
||||
quest:SetENpc(FEARSTRICKEN_CORPSE);
|
||||
quest:SetENpc(SISIPU);
|
||||
elseif (sequence == SEQ_060) then
|
||||
quest:SetENpc(SISIPU, QFLAG_PLATE);
|
||||
quest:SetENpc(WINDWORN_CORPSE);
|
||||
quest:SetENpc(GLASSYEYED_CORPSE);
|
||||
quest:SetENpc(FEARSTRICKEN_CORPSE);
|
||||
elseif (sequence == SEQ_065) then
|
||||
quest:SetENpc(FSH_TRIGGER, QFLAG_MAP, false, true);
|
||||
elseif (sequence == SEQ_075) then
|
||||
quest:SetENpc(BODENOLF, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_080) then
|
||||
quest:SetENpc(HNAANZA, QFLAG_PLATE);
|
||||
quest:SetENpc(TATTOOED_PIRATE);
|
||||
quest:SetENpc(IOFA);
|
||||
quest:SetENpc(BODENOLF);
|
||||
quest:SetENpc(MIMIDOA);
|
||||
quest:SetENpc(JOELLAUT);
|
||||
quest:SetENpc(WERNER);
|
||||
quest:SetENpc(HIHINE);
|
||||
quest:SetENpc(TRINNE);
|
||||
elseif (sequence == SEQ_085) then
|
||||
quest:SetENpc(HNAANZA);
|
||||
quest:SetENpc(TATTOOED_PIRATE);
|
||||
quest:SetENpc(WERNER);
|
||||
quest:SetENpc(HIHINE);
|
||||
quest:SetENpc(TRINNE);
|
||||
quest:SetENpc(ECHO_EXIT_TRIGGER2, QFLAG_MAP, false, true);
|
||||
elseif (sequence == SEQ_092) then
|
||||
quest:SetENpc(BADERON, QFLAG_REWARD);
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -158,25 +228,124 @@ function onTalk(player, quest, npc)
|
|||
elseif (sequence == SEQ_005) then
|
||||
if (classId == BADERON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent026");
|
||||
quest:StartSequence(SEQ_006);
|
||||
player:EndEvent();
|
||||
quest:StartSequence(SEQ_006);
|
||||
end
|
||||
elseif (sequence == SEQ_006) then
|
||||
if (classId == BADERON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent027");
|
||||
quest:StartSequence(SEQ_007);
|
||||
player:EndEvent();
|
||||
player:SendGameMessage(GetWorldMaster(), 25117, 0x20, 11000125); -- You obtain Baderon's Recommendation
|
||||
quest:StartSequence(SEQ_007);
|
||||
end
|
||||
elseif (sequence == SEQ_007) then
|
||||
seq007_onTalk(player, quest, npc, classId);
|
||||
elseif (sequence == SEQ_035) then
|
||||
if (classId == NNMULIKA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent600");
|
||||
quest:StartSequence(SEQ_040);
|
||||
player:EndEvent();
|
||||
GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 5);
|
||||
end
|
||||
elseif (sequence == SEQ_040) then
|
||||
if (classId == SISIPU_EMOTE) then
|
||||
local emoteTestStep = quest:GetData():GetCounter(CNTR_SEQ40_FSH);
|
||||
if (emoteTestStep == 0 or emoteTestStep == 1) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_1");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
if (emoteTestStep == 0) then
|
||||
quest:GetData():IncCounter(CNTR_SEQ40_FSH);
|
||||
end
|
||||
elseif (emoteTestStep == 2) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_2");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
elseif (emoteTestStep == 3) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_3");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
elseif (emoteTestStep == 4) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_4");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
elseif (emoteTestStep == 5) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_5");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
elseif (emoteTestStep == 6) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_6");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
end
|
||||
elseif (classId == NNMULIKA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent600_2");
|
||||
end
|
||||
player:EndEvent();
|
||||
elseif (sequence == SEQ_048) then
|
||||
if (classId == BADERON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent602_3");
|
||||
elseif (classId == NNMULIKA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent602_2");
|
||||
end
|
||||
player:EndEvent();
|
||||
elseif (sequence == SEQ_055 or sequence == SEQ_060) then
|
||||
if (classId == SISIPU) then
|
||||
if (sequence == SEQ_060) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent615");
|
||||
quest:StartSequence(SEQ_065);
|
||||
player:EndEvent();
|
||||
GetWorldManager():WarpToPublicArea(player, -42.0, 37.678, 155.694, -1.25);
|
||||
return;
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent605_2");
|
||||
end
|
||||
elseif (classId == WINDWORN_CORPSE) then
|
||||
if (sequence == SEQ_055) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent610");
|
||||
quest:StartSequence(SEQ_060);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent610_2");
|
||||
end
|
||||
elseif (classId == FEARSTRICKEN_CORPSE) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent610_2");
|
||||
elseif (classId == GLASSYEYED_CORPSE) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent610_2");
|
||||
end
|
||||
player:EndEvent();
|
||||
elseif (sequence == SEQ_070) then
|
||||
if (classId == BADERON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent615_2");
|
||||
end
|
||||
player:EndEvent();
|
||||
elseif (sequence == SEQ_075) then
|
||||
if (classId == BODENOLF) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent630");
|
||||
player:EndEvent();
|
||||
quest:StartSequence(SEQ_080);
|
||||
GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 4, -504.985, 42.490, 433.712, 2.35);
|
||||
end
|
||||
elseif (sequence == SEQ_080) then
|
||||
if (classId == HNAANZA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent632");
|
||||
player:EndEvent();
|
||||
quest:StartSequence(SEQ_085);
|
||||
else
|
||||
seq080_085_onTalk(player, quest, npc, classId);
|
||||
end
|
||||
elseif (sequence == SEQ_085) then
|
||||
if (classId == HNAANZA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent632_2");
|
||||
else
|
||||
seq080_085_onTalk(player, quest, npc, classId);
|
||||
end
|
||||
elseif (sequence == SEQ_092) then
|
||||
if (classId == BADERON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventComplete");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 300, 1, 1, 2);
|
||||
player:EndEvent();
|
||||
player:CompleteQuest(quest);
|
||||
return;
|
||||
end
|
||||
end
|
||||
|
||||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
|
||||
-- !warp 133 -459.619873 40.0005722 196.370377 PrivateAreaMasterPast 2
|
||||
|
||||
function seq000_onTalk(player, quest, npc, classId)
|
||||
if (classId == CRAPULOUS_ADVENTURER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_2");
|
||||
|
@ -279,6 +448,27 @@ function seq007_onTalk(player, quest, npc, classId)
|
|||
player:EndEvent();
|
||||
end
|
||||
|
||||
function seq080_085_onTalk(player, quest, npc, classId)
|
||||
if (classId == IOFA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_2");
|
||||
elseif (classId == TRINNE) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_3");
|
||||
elseif (classId == HIHINE) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_4");
|
||||
elseif (classId == MIMIDOA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_5");
|
||||
elseif (classId == WERNER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_6");
|
||||
elseif (classId == TATTOOED_PIRATE) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_7");
|
||||
elseif (classId == JOELLAUT) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_8");
|
||||
elseif (classId == BODENOLF) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_9");
|
||||
end
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function onPush(player, quest, npc)
|
||||
local data = quest:GetData();
|
||||
local sequence = quest:getSequence();
|
||||
|
@ -298,9 +488,140 @@ function onPush(player, quest, npc)
|
|||
quest:UpdateENPCs();
|
||||
GetWorldManager():WarpToPublicArea(player);
|
||||
end
|
||||
elseif (sequence == SEQ_048) then
|
||||
if (classId == ZEPHYR_TRIGGER) then
|
||||
local result = callClientFunction(player, "delegateEvent", player, quest, "contentsJoinAskInBasaClass");
|
||||
if (result == 1) then
|
||||
-- DO ESCORT DUTY HERE
|
||||
-- startMan0l1Content(player, quest);
|
||||
-- For now just skip the sequence
|
||||
quest:StartSequence(SEQ_050);
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent605");
|
||||
player:EndEvent();
|
||||
quest:StartSequence(SEQ_055);
|
||||
GetWorldManager():DoZoneChange(player, 128, "PrivateAreaMasterPast", 2, 15, 137.44, 60.33, 1322.0, -1.60);
|
||||
return;
|
||||
end
|
||||
player:EndEvent();
|
||||
end
|
||||
elseif (sequence == SEQ_065) then
|
||||
if (classId == FSH_TRIGGER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent620");
|
||||
-- Give 3000 gil
|
||||
player:EndEvent();
|
||||
quest:StartSequence(SEQ_075);
|
||||
end
|
||||
elseif (sequence == SEQ_085) then
|
||||
if (classId == ECHO_EXIT_TRIGGER2) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent635");
|
||||
player:EndEvent();
|
||||
quest:UpdateENPCs();
|
||||
GetWorldManager():WarpToPublicArea(player);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function onEmote(player, quest, npc, eventName)
|
||||
local data = quest:GetData();
|
||||
local sequence = quest:getSequence();
|
||||
local classId = npc:GetActorClassId();
|
||||
|
||||
-- Play the emote
|
||||
if (eventName == "emoteDefault1") then -- Bow
|
||||
player:DoEmote(npc.Id, 5, 21041);
|
||||
elseif (eventName == "emoteDefault2") then -- Clap
|
||||
player:DoEmote(npc.Id, 7, 21061);
|
||||
elseif (eventName == "emoteDefault3") then -- Congratulate
|
||||
player:DoEmote(npc.Id, 29, 21281);
|
||||
elseif (eventName == "emoteDefault4") then -- Poke
|
||||
player:DoEmote(npc.Id, 28, 21271);
|
||||
elseif (eventName == "emoteDefault5") then -- Joy
|
||||
player:DoEmote(npc.Id, 18, 21171);
|
||||
elseif (eventName == "emoteDefault6") then -- Wave
|
||||
player:DoEmote(npc.Id, 16, 21151);
|
||||
end
|
||||
wait(2.5);
|
||||
|
||||
-- Handle the result
|
||||
if (sequence == SEQ_040) then
|
||||
if (classId == SISIPU_EMOTE) then
|
||||
local emoteTestStep = data:GetCounter(CNTR_SEQ40_FSH);
|
||||
-- Bow
|
||||
if (emoteTestStep == 1) then
|
||||
if (eventName == "emoteDefault1") then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_7");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_2");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
data:IncCounter(CNTR_SEQ40_FSH);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_1");
|
||||
end
|
||||
-- Clap
|
||||
elseif (emoteTestStep == 2) then
|
||||
if (eventName == "emoteDefault2") then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_7");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_3");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
data:IncCounter(CNTR_SEQ40_FSH);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_2");
|
||||
end
|
||||
-- Congratulate
|
||||
elseif (emoteTestStep == 3) then
|
||||
if (eventName == "emoteDefault3") then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_7");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_4");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
data:IncCounter(CNTR_SEQ40_FSH);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_3");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
end
|
||||
-- Poke
|
||||
elseif (emoteTestStep == 4) then
|
||||
if (eventName == "emoteDefault4") then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_7");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_5");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
data:IncCounter(CNTR_SEQ40_FSH);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_4");
|
||||
end
|
||||
-- Joy
|
||||
elseif (emoteTestStep == 5) then
|
||||
if (eventName == "emoteDefault5") then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_7");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_6");
|
||||
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
|
||||
data:IncCounter(CNTR_SEQ40_FSH);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_5");
|
||||
end
|
||||
-- Wave
|
||||
elseif (emoteTestStep == 6) then
|
||||
if (eventName == "emoteDefault6") then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent602");
|
||||
player:EndEvent();
|
||||
GetWorldManager():WarpToPublicArea(player);
|
||||
quest:StartSequence(SEQ_048);
|
||||
return;
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_6");
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
function onNotice(player, quest, target)
|
||||
local sequence = quest:getSequence();
|
||||
|
||||
|
@ -315,9 +636,8 @@ function onNpcLS(player, quest, npcLSId)
|
|||
local sequence = quest:getSequence();
|
||||
|
||||
if (npcLSId == 1) then
|
||||
player:SetNpcLS(1, 1);
|
||||
|
||||
if (sequence == SEQ_003) then
|
||||
player:SetNpcLS(1, 1);
|
||||
if (sequence == SEQ_003) then
|
||||
player:SendGameMessageLocalizedDisplayName(quest, 298, 39, 1000015, nil);
|
||||
endTutorialMode(player);
|
||||
elseif (sequence == SEQ_007) then
|
||||
|
@ -325,15 +645,39 @@ function onNpcLS(player, quest, npcLSId)
|
|||
player:SendGameMessageLocalizedDisplayName(quest, 81, 39, 1000015, nil);
|
||||
player:SendGameMessageLocalizedDisplayName(quest, 82, 39, 1000015, nil);
|
||||
quest:StartSequence(SEQ_035);
|
||||
elseif (sequence == SEQ_070) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent625");
|
||||
player:EndEvent();
|
||||
quest:StartSequence(SEQ_075);
|
||||
elseif (sequence == SEQ_090) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent637");
|
||||
player:EndEvent();
|
||||
quest:StartSequence(SEQ_092);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function startMan0l1Content(player, quest)
|
||||
quest:StartSequence(SEQ_050);
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent604");
|
||||
player:EndEvent();
|
||||
|
||||
local contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "Man0l101", "SimpleContent30002", "Quest/QuestDirectorMan0l101");
|
||||
|
||||
if (contentArea == nil) then
|
||||
return;
|
||||
end
|
||||
|
||||
local director = contentArea:GetContentDirector();
|
||||
player:AddDirector(director);
|
||||
director:StartDirector(true);
|
||||
GetWorldManager():DoZoneChangeContent(player, contentArea, -63.25, 33.15, 164.51, 0.8, 16);
|
||||
end
|
||||
|
||||
function getJournalInformation(player, quest)
|
||||
return 0, quest:GetData():GetCounter(CNTR_SEQ7_CUL) * 5, quest:GetData():GetCounter(CNTR_SEQ7_MRD) * 5;
|
||||
end
|
||||
|
||||
|
||||
function getJournalMapMarkerList(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
|
||||
|
|
|
@ -104,11 +104,15 @@ function onFinish(player, quest)
|
|||
end
|
||||
|
||||
function onStateChange(player, quest, sequence)
|
||||
local data = quest:GetData();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
-- Setup states incase we loaded in.
|
||||
<<<<<<< HEAD
|
||||
local data = quest:GetData();
|
||||
|
||||
=======
|
||||
>>>>>>> origin/ioncannon/quest_system
|
||||
local asciliaCanPush = not data:GetFlag(FLAG_SEQ000_MINITUT0);
|
||||
local asciliaFlag = data:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE;
|
||||
local fretfulfarmhandFlag = data:GetFlag(FLAG_SEQ000_MINITUT2) and QFLAG_NONE or QFLAG_PLATE;
|
||||
|
@ -137,7 +141,10 @@ function onStateChange(player, quest, sequence)
|
|||
quest:SetENpc(OPENING_STOPER_ULDAH, QFLAG_NONE, false, false, true);
|
||||
|
||||
elseif (sequence == SEQ_010) then
|
||||
<<<<<<< HEAD
|
||||
local data = quest:GetData();
|
||||
=======
|
||||
>>>>>>> origin/ioncannon/quest_system
|
||||
local yayatokiFlag = data:GetFlag(FLAG_SEQ010_TALK0) and QFLAG_NONE or QFLAG_PLATE;
|
||||
local uldahopeningexitFlag = QFLAG_MAP;
|
||||
quest:SetENpc(KEEN_EYED_MERCHANT);
|
||||
|
@ -166,10 +173,14 @@ function onTalk(player, quest, npc)
|
|||
end
|
||||
|
||||
function onPush(player, quest, npc)
|
||||
|
||||
local sequence = quest:getSequence();
|
||||
local classId = npc:GetActorClassId();
|
||||
<<<<<<< HEAD
|
||||
local data = quest:GetData();
|
||||
=======
|
||||
local data = quest:GetData();
|
||||
|
||||
>>>>>>> origin/ioncannon/quest_system
|
||||
if (sequence == SEQ_000) then
|
||||
if (classId == ASCILIA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal002");
|
||||
|
@ -211,6 +222,7 @@ function onNotice(player, quest, target)
|
|||
end
|
||||
|
||||
function seq000_onTalk(player, quest, npc, classId)
|
||||
<<<<<<< HEAD
|
||||
local data = quest:GetData();
|
||||
if (classId == ASCILIA) then
|
||||
|
||||
|
@ -220,6 +232,17 @@ function seq000_onTalk(player, quest, npc, classId)
|
|||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini001");
|
||||
data:SetFlag(FLAG_SEQ000_MINITUT1); -- Ascilia has now been talked to.
|
||||
=======
|
||||
local data = quest:GetData();
|
||||
|
||||
if (classId == ASCILIA) then
|
||||
if (not data:GetFlag(FLAG_SEQ000_MINITUT0)) then -- If Talk tutorial
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal003");
|
||||
quest:GetData():SetFlag(FLAG_SEQ000_MINITUT0); -- Used to disable her PushEvent / Allow for her next TalkEvent
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini001");
|
||||
quest:GetData():SetFlag(FLAG_SEQ000_MINITUT1); -- Ascilia has now been talked to.
|
||||
>>>>>>> origin/ioncannon/quest_system
|
||||
end
|
||||
|
||||
elseif (classId == FRETFUL_FARMHAND) then
|
||||
|
@ -260,7 +283,10 @@ function seq000_onTalk(player, quest, npc, classId)
|
|||
end
|
||||
|
||||
function seq010_onTalk(player, quest, npc, classId)
|
||||
<<<<<<< HEAD
|
||||
local data = quest:GetData();
|
||||
=======
|
||||
>>>>>>> origin/ioncannon/quest_system
|
||||
if (classId == KEEN_EYED_MERCHANT) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2");
|
||||
elseif (classId == HIGH_SPIRITED_FELLOW) then
|
||||
|
@ -276,9 +302,15 @@ function seq010_onTalk(player, quest, npc, classId)
|
|||
elseif (classId == FULL_LIPPED_FILLE) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEtc002");
|
||||
elseif (classId == YAYATOKI) then
|
||||
<<<<<<< HEAD
|
||||
if (not data:GetFlag(FLAG_SEQ010_TALK0)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8");
|
||||
data:SetFlag(FLAG_SEQ010_TALK0);
|
||||
=======
|
||||
if (not quest:GetData():GetFlag(FLAG_SEQ010_TALK0)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8");
|
||||
quest:GetData():SetFlag(FLAG_SEQ010_TALK0);
|
||||
>>>>>>> origin/ioncannon/quest_system
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8");
|
||||
end
|
||||
|
@ -289,11 +321,15 @@ end
|
|||
|
||||
function getJournalMapMarkerList(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
local data = quest:GetData();
|
||||
local possibleMarkers = {};
|
||||
local data = quest:GetData();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
>>>>>>> origin/ioncannon/quest_system
|
||||
if (data:GetFlag(FLAG_SEQ000_MINITUT0)) then
|
||||
if (not data:GetFlag(FLAG_SEQ000_MINITUT1)) then table.insert(possibleMarkers, MRKR_ASCILIA); end
|
||||
if (not data:GetFlag(FLAG_SEQ000_MINITUT2)) then table.insert(possibleMarkers, MRKR_FRETFUL_FARMHAND); end
|
||||
|
@ -313,7 +349,11 @@ end
|
|||
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
function doExitTrigger(player, quest, npc)
|
||||
=======
|
||||
function doExitTrigger(player, quest, npc)
|
||||
>>>>>>> origin/ioncannon/quest_system
|
||||
quest:GetData():ClearData();
|
||||
quest:StartSequence(SEQ_005);
|
||||
contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0u01", "SimpleContent30079", "Quest/QuestDirectorMan0u001");
|
||||
|
|
|
@ -59,8 +59,6 @@ Phase:
|
|||
|
||||
--]]
|
||||
|
||||
|
||||
|
||||
-- Sequence Numbers
|
||||
SEQ_000 = 0; -- Ul'dah Adventurer's Guild
|
||||
SEQ_005 = 5; -- Run to Camp Black Brush & Attune
|
||||
|
@ -83,7 +81,6 @@ SEQ_100 = 100;
|
|||
SEQ_105 = 105;
|
||||
SEQ_110 = 110;
|
||||
|
||||
|
||||
-- Actor Class Ids
|
||||
OVERCOMPETITIVE_ADVENTURER = 1000807;
|
||||
MOMODI = 1000841;
|
||||
|
@ -93,8 +90,6 @@ GREEDY_MERCHANT = 1000937;
|
|||
LIONHEARTED_ADVENTURER = 1000938;
|
||||
SPRY_SALESMAN = 1000939;
|
||||
|
||||
|
||||
|
||||
UPBEAT_ADVENTURER = 1000940;
|
||||
SEEMINGLY_CALM_ADVENTURER = 1000941;
|
||||
UNKNOWN1 = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue