mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 14:04:41 +02:00
Merge branch 'Jorge/quest_system' into ioncannon/quest_system
This commit is contained in:
commit
cfe6ef2e5e
50 changed files with 1554 additions and 684 deletions
|
@ -1,8 +1,331 @@
|
|||
--Quest Flags
|
||||
MAN0U0_FLAG_TUTORIAL1_DONE = 0;
|
||||
MAN0U0_FLAG_TUTORIAL2_DONE = 1;
|
||||
MAN0U0_FLAG_TUTORIAL3_DONE = 2;
|
||||
require("global");
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Flowers for All
|
||||
Code: Man0u0
|
||||
Id: 110009
|
||||
Prereq: None (Given on chara creation)
|
||||
Notes: RURURAJI scripting handled via PopulaceChocoboLender.lua
|
||||
TO-DO: Sequence 000 - Crowd NPCs.
|
||||
Sequence 010 - Adv. Guild NPCs
|
||||
|
||||
|
||||
https://www.youtube.com/watch?v=XXGrSFrfYo4
|
||||
|
||||
]]
|
||||
|
||||
-- Sequence Numbers
|
||||
SEQ_000 = 0; -- On the Merchant Strip in Ul'dah; contains the basic tutorial.
|
||||
SEQ_005 = 5; -- Combat on the Sapphire Avenue Exchange
|
||||
SEQ_010 = 10; -- Back on the Merchant Strip in Ul'dah
|
||||
|
||||
-- Actor Class Ids
|
||||
ASCILIA = 1000042;
|
||||
WARBURTON = 1000186;
|
||||
RURURAJI = 1000840;
|
||||
BIG_BELLIED_BARKER = 1001490;
|
||||
FRETFUL_FARMHAND = 1001491;
|
||||
DEBAUCHED_DEMONESS = 1001492;
|
||||
DAPPER_DAN = 1001493;
|
||||
LOUTISH_LAD = 1001494;
|
||||
GIL_DIGGING_MISTRESS = 1001495;
|
||||
TWITTERING_TOMBOY = 1001496;
|
||||
STOCKY_STRANGER = 1001644;
|
||||
EXIT_TRIGGER = 1090372;
|
||||
OPENING_STOPER_ULDAH = 1090373;
|
||||
|
||||
|
||||
|
||||
KEEN_EYED_MERCHANT = 1000401;
|
||||
--MUMPISH_MIQOTE = 1000992; -- Unused on this client version. Calls processEvent020_6
|
||||
HIGH_SPIRITED_FELLOW = 1001042;
|
||||
DISREPUTABLE_MIDLANDER = 1001044;
|
||||
LONG_LEGGED_LADY = 1001112;
|
||||
LARGE_LUNGED_LABORER = 1001645;
|
||||
TOOTH_GRINDING_TRAVELER = 1001646;
|
||||
FULL_LIPPED_FILLE = 1001647;
|
||||
YAYATOKI = 1500129;
|
||||
|
||||
BLOCKER = 1090372;
|
||||
ULDAH_OPENING_EXIT = 1099046;
|
||||
|
||||
-- Non-interactive NPCs
|
||||
CROWD_HYUR_M = 1001114;
|
||||
CROWD_HYUR_F = 1001115;
|
||||
CROWD_ELEZEN_M = 1001116;
|
||||
CROWD_ELEZEN_F = 1001117;
|
||||
CROWD_LALAFELL_M = 1001118;
|
||||
CROWD_LALAFELL_F = 1001119;
|
||||
CROWD_MIQOTE = 1001120;
|
||||
CROWD_ROEGADYN = 1001121;
|
||||
GUILD_KIORA = 1000780;
|
||||
GUILD_OPONDHAO = 1000781;
|
||||
GUILD_BERTRAM = 1000782;
|
||||
GUILD_MINERVA = 1000783;
|
||||
GUILD_ZOENGTERBIN = 1000784;
|
||||
GUILD_STYRMOEYA = 1000785;
|
||||
GUILD_YHAH_AMARIYO = 1000786;
|
||||
GUILD_HILDIE = 1000787;
|
||||
GUILD_LETTICE = 1000788;
|
||||
GUILD_TYON = 1000789;
|
||||
GUILD_OTOPA_POTTOPA = 1000864;
|
||||
GUILD_THAISIE = 1000865;
|
||||
GUILD_SESEBARU = 1001182;
|
||||
GUILD_TOTONAWA = 1001371;
|
||||
GUILD_EUSTACE = 1001372;
|
||||
|
||||
|
||||
-- Quest Markers
|
||||
MRKR_YAYATOKI = 11000901;
|
||||
MRKR_ASCILIA = 11000902;
|
||||
MRKR_FRETFUL_FARMHAND = 11000903;
|
||||
MRKR_GIL_DIGGING_MISTRESS = 11000904;
|
||||
MRKR_COMBAT_TUTORIAL = 11000905;
|
||||
MRKR_ADV_GUILD = 11000906;
|
||||
|
||||
|
||||
-- Quest Flags
|
||||
FLAG_SEQ000_MINITUT0 = 0; -- PushEvent ASCILIA
|
||||
FLAG_SEQ000_MINITUT1 = 1; -- TalkEvent ASCILIA
|
||||
FLAG_SEQ000_MINITUT2 = 2; -- TalkEvent FRETFUL_FARMHAND
|
||||
FLAG_SEQ000_MINITUT3 = 3; -- TalkEvent GIL_DIGGING_MISTRESS
|
||||
|
||||
FLAG_SEQ010_TALK0 = 0; -- TalkEvent YAYATOKI
|
||||
|
||||
|
||||
function onStart(player, quest)
|
||||
quest:StartSequence(SEQ_000);
|
||||
end
|
||||
|
||||
function onFinish(player, quest)
|
||||
end
|
||||
|
||||
function onSequence(player, quest, sequence)
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
-- Setup states incase we loaded in.
|
||||
local asciliaCanPush = not quest:GetFlag(FLAG_SEQ000_MINITUT0);
|
||||
local asciliaFlag = quest:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE;
|
||||
local fretfulfarmhandFlag = quest:GetFlag(FLAG_SEQ000_MINITUT2) and QFLAG_NONE or QFLAG_PLATE;
|
||||
local gildiggingmistressFlag = quest:GetFlag(FLAG_SEQ000_MINITUT3) and QFLAG_NONE or QFLAG_PLATE;
|
||||
|
||||
local exitFlag = quest:GetFlags() == 0xF and QFLAG_MAP or QFLAG_NONE;
|
||||
|
||||
if (asciliaCanPush) then
|
||||
fretfulfarmhandFlag = QFLAG_NONE;
|
||||
gildiggingmistressFlag = QFLAG_NONE;
|
||||
end
|
||||
|
||||
--AddENpc(classId, byte flagType=0,isTalkEnabled, isPushEnabled, isEmoteEnabled, isSpawned)
|
||||
quest:AddENpc(ASCILIA, asciliaFlag, true, asciliaCanPush);
|
||||
quest:AddENpc(WARBURTON);
|
||||
quest:AddENpc(RURURAJI);
|
||||
quest:AddENpc(BIG_BELLIED_BARKER);
|
||||
quest:AddENpc(FRETFUL_FARMHAND, fretfulfarmhandFlag);
|
||||
quest:AddENpc(DEBAUCHED_DEMONESS);
|
||||
quest:AddENpc(DAPPER_DAN);
|
||||
quest:AddENpc(LOUTISH_LAD);
|
||||
quest:AddENpc(GIL_DIGGING_MISTRESS, gildiggingmistressFlag);
|
||||
quest:AddENpc(TWITTERING_TOMBOY);
|
||||
quest:AddENpc(STOCKY_STRANGER);
|
||||
quest:AddENpc(EXIT_TRIGGER, exitFlag, false, true);
|
||||
quest:AddENpc(OPENING_STOPER_ULDAH, QFLAG_NONE, false, false, true);
|
||||
|
||||
elseif (sequence == SEQ_010) then
|
||||
local yayatokiFlag = quest:GetFlag(FLAG_SEQ010_TALK0) and QFLAG_NONE or QFLAG_PLATE;
|
||||
local uldahopeningexitFlag = QFLAG_MAP;
|
||||
quest:AddENpc(KEEN_EYED_MERCHANT);
|
||||
quest:AddENpc(HIGH_SPIRITED_FELLOW);
|
||||
quest:AddENpc(DISREPUTABLE_MIDLANDER);
|
||||
quest:AddENpc(LONG_LEGGED_LADY);
|
||||
quest:AddENpc(LARGE_LUNGED_LABORER);
|
||||
quest:AddENpc(TOOTH_GRINDING_TRAVELER);
|
||||
quest:AddENpc(FULL_LIPPED_FILLE);
|
||||
quest:AddENpc(YAYATOKI, yayatokiFlag);
|
||||
quest:AddENpc(BLOCKER, QFLAG_NONE, false, true);
|
||||
quest:AddENpc(ULDAH_OPENING_EXIT, uldahopeningexitFlag, false, true);
|
||||
end
|
||||
end
|
||||
|
||||
function onTalk(player, quest, npc)
|
||||
local sequence = quest:getSequence();
|
||||
local classId = npc:GetActorClassId();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
seq000_onTalk(player, quest, npc, classId);
|
||||
elseif (sequence == SEQ_010) then
|
||||
seq010_onTalk(player, quest, npc, classId);
|
||||
end
|
||||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
function onPush(player, quest, npc)
|
||||
|
||||
local sequence = quest:getSequence();
|
||||
local classId = npc:GetActorClassId();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
if (classId == ASCILIA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal002");
|
||||
player:EndEvent();
|
||||
elseif (classId == EXIT_TRIGGER) then
|
||||
if (quest:GetFlags() == 0xF) then
|
||||
doExitTrigger(player, quest, npc);
|
||||
return;
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml001");
|
||||
GetWorldManager():DoPlayerMoveInZone(player, -22, 196, 87, 2.4, 0x11)
|
||||
player:EndEvent();
|
||||
end
|
||||
end
|
||||
elseif (sequence == SEQ_010) then
|
||||
if (classId == BLOCKER) then
|
||||
|
||||
posz = player:GetPos()[3];
|
||||
|
||||
if (posz >= 71 and posz <= 95) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml002");
|
||||
GetWorldManager():DoPlayerMoveInZone(player, -22.81, 196, 87.82, 2.98, 0x11);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml003");
|
||||
GetWorldManager():DoPlayerMoveInZone(player, -0.3, 196, 116, -2.7, 0x11);
|
||||
end
|
||||
elseif (classId == ULDAH_OPENING_EXIT) then
|
||||
player:ReplaceQuest(quest, "Man0u1")
|
||||
return;
|
||||
end
|
||||
end
|
||||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
function onNotice(player, quest, target)
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ");
|
||||
player:EndEvent();
|
||||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
function seq000_onTalk(player, quest, npc, classId)
|
||||
|
||||
if (classId == ASCILIA) then
|
||||
|
||||
if (not quest:GetFlag(FLAG_SEQ000_MINITUT0)) then -- If Talk tutorial
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal003");
|
||||
quest:SetFlag(FLAG_SEQ000_MINITUT0); -- Used to disable her PushEvent / Allow for her next TalkEvent
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini001");
|
||||
quest:SetFlag(FLAG_SEQ000_MINITUT1); -- Ascilia has now been talked to.
|
||||
end
|
||||
|
||||
elseif (classId == FRETFUL_FARMHAND) then
|
||||
if (not quest:GetFlag(FLAG_SEQ000_MINITUT2)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002_first");
|
||||
quest:SetFlag(FLAG_SEQ000_MINITUT2);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002");
|
||||
end
|
||||
|
||||
elseif (classId == GIL_DIGGING_MISTRESS) then
|
||||
if (not quest:GetFlag(FLAG_SEQ000_MINITUT3)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003_first");
|
||||
quest:SetFlag(FLAG_SEQ000_MINITUT3);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003");
|
||||
end
|
||||
|
||||
elseif (classId == WARBURTON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_3");
|
||||
elseif (classId == RURURAJI) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_13");
|
||||
elseif (classId == BIG_BELLIED_BARKER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_6");
|
||||
elseif (classId == DEBAUCHED_DEMONESS) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_8");
|
||||
elseif (classId == DAPPER_DAN) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_9");
|
||||
elseif (classId == LOUTISH_LAD) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_10");
|
||||
elseif (classId == TWITTERING_TOMBOY) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_12");
|
||||
elseif (classId == STOCKY_STRANGER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_6_2");
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function seq010_onTalk(player, quest, npc, classId)
|
||||
|
||||
if (classId == KEEN_EYED_MERCHANT) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2");
|
||||
elseif (classId == HIGH_SPIRITED_FELLOW) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_3");
|
||||
elseif (classId == DISREPUTABLE_MIDLANDER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_4");
|
||||
elseif (classId == LONG_LEGGED_LADY) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_14");
|
||||
elseif (classId == LARGE_LUNGED_LABORER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEtc003");
|
||||
elseif (classId == TOOTH_GRINDING_TRAVELER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEtc001");
|
||||
elseif (classId == FULL_LIPPED_FILLE) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEtc002");
|
||||
elseif (classId == YAYATOKI) then
|
||||
if (not quest:GetFlag(FLAG_SEQ010_TALK0)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8");
|
||||
quest:SetFlag(FLAG_SEQ010_TALK0);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8");
|
||||
end
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function getJournalMapMarkerList(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
local possibleMarkers = {};
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
if (quest:GetFlag(FLAG_SEQ000_MINITUT0)) then
|
||||
if (not quest:GetFlag(FLAG_SEQ000_MINITUT1)) then table.insert(possibleMarkers, MRKR_ASCILIA); end
|
||||
if (not quest:GetFlag(FLAG_SEQ000_MINITUT2)) then table.insert(possibleMarkers, MRKR_FRETFUL_FARMHAND); end
|
||||
if (not quest:GetFlag(FLAG_SEQ000_MINITUT3)) then table.insert(possibleMarkers, MRKR_GIL_DIGGING_MISTRESS); end
|
||||
end
|
||||
|
||||
elseif (sequence == SEQ_010) then
|
||||
if (not quest:GetFlag(FLAG_SEQ010_TALK0)) then
|
||||
table.insert(possibleMarkers, MRKR_YAYATOKI)
|
||||
end
|
||||
table.insert(possibleMarkers, MRKR_ADV_GUILD);
|
||||
end
|
||||
|
||||
return unpack(possibleMarkers)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
function doExitTrigger(player, quest, npc)
|
||||
quest:ClearData();
|
||||
quest:StartSequence(SEQ_005);
|
||||
contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0u01", "SimpleContent30079", "Quest/QuestDirectorMan0u001");
|
||||
|
||||
if (contentArea == nil) then
|
||||
return;
|
||||
end
|
||||
|
||||
director = contentArea:GetContentDirector();
|
||||
player:AddDirector(director);
|
||||
director:StartDirector(false);
|
||||
|
||||
player:KickEvent(director, "noticeEvent", true);
|
||||
player:SetLoginDirector(director);
|
||||
|
||||
GetWorldManager():DoZoneChangeContent(player, contentArea, -24.34, 192, 34.22, 0.78, 16);
|
||||
return;
|
||||
end
|
||||
|
||||
|
||||
MAN0U0_FLAG_MINITUT_DONE1 = 4;
|
||||
MAN0U0_FLAG_MINITUT_DONE2 = 8;
|
||||
MAN0U0_FLAG_MINITUT_DONE3 = 16;
|
||||
|
|
240
Data/scripts/quests/man/man0u1.lua
Normal file
240
Data/scripts/quests/man/man0u1.lua
Normal file
|
@ -0,0 +1,240 @@
|
|||
require("global");
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Court in the Sands
|
||||
Code: Man0u1
|
||||
Id: 110010
|
||||
Prereq: Flowers for All (Man0u0 - 110009)
|
||||
Notes:
|
||||
|
||||
|
||||
Vid refs -
|
||||
https://www.youtube.com/watch?v=WNRLrwZ3BJY&t=284s
|
||||
https://www.youtube.com/watch?v=eZgcq-FMpfw&t=504s
|
||||
|
||||
Coliseum fight - https://www.youtube.com/watch?v=Jcv9I2Bk46w
|
||||
|
||||
A LOT - https://www.youtube.com/watch?v=gySHO1Be9OM
|
||||
|
||||
]]
|
||||
|
||||
|
||||
--[[
|
||||
|
||||
Phase:
|
||||
|
||||
45 (Miner's Guild)
|
||||
Linette processEvent050 (initial CS)
|
||||
Change phase to 50 after interaction
|
||||
|
||||
50 (Miner's Guild Instance #1)
|
||||
Name DisplayName ActorClass Event
|
||||
Linette 1100016 1000861 processEvent050_2
|
||||
Corguevais 1200025 1000043/1001054 processEvent050_11
|
||||
Nittma Guttma 1400127 1001286 processEvent050_10
|
||||
Nortmoen 1600127 1600042
|
||||
F'lhaminn 1900054 1000038/1000842/1001514/2290008 processEvent051_1
|
||||
Tyago Moui 1900130 1001203 processEvent050_12
|
||||
Shilgen 2200216 1000637
|
||||
Muscular Miner 4000202 1000690/1700013 processEvent050_7
|
||||
Close-fisted Woman 4000366 1000981 processEvent050_8
|
||||
Astonished Adventurer 4000377 1000895 processEvent050_9
|
||||
Manic Miner 4000444 1001283 processEvent050_13
|
||||
Maddened Miner 4000445 1001284 processEvent050_14
|
||||
Maudlin Miner 4000446 1001287 processEvent050_3
|
||||
Mocking Miner 4000447 1001288 processEvent050_4
|
||||
Monitoring Miner 4000448 1001289 processEvent050_5
|
||||
Displeased Dancer 4000449 1001290 processEvent050_6
|
||||
|
||||
Emotes 103, 108, 121, 125, 140, 135 in that order @ F'lhaminn, then change phase to 51
|
||||
51
|
||||
Emotes 108 @ Maddened Miner
|
||||
Emotes 135, 103, 121 @ Manic Miner
|
||||
Check both for clear state after each interaction and change phase to 55
|
||||
|
||||
55 (Miner's Guild Instance #2)
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
|
||||
-- Sequence Numbers
|
||||
SEQ_000 = 0; -- Ul'dah Adventurer's Guild
|
||||
SEQ_005 = 5; -- Run to Camp Black Brush & Attune
|
||||
SEQ_010 = 10; -- Return to the Guild
|
||||
SEQ_012 = 12; -- Speak to Momodi
|
||||
SEQ_015 = 15; -- Visiting guilds (GSM, GLD)
|
||||
SEQ_045 = 45;
|
||||
SEQ_050 = 50;
|
||||
SEQ_057 = 57;
|
||||
SEQ_058 = 58;
|
||||
SEQ_060 = 60;
|
||||
SEQ_065 = 65;
|
||||
SEQ_070 = 70;
|
||||
SEQ_075 = 75;
|
||||
SEQ_080 = 80;
|
||||
SEQ_085 = 85;
|
||||
SEQ_090 = 90;
|
||||
SEQ_095 = 95;
|
||||
SEQ_100 = 100;
|
||||
SEQ_105 = 105;
|
||||
SEQ_110 = 110;
|
||||
|
||||
|
||||
-- Actor Class Ids
|
||||
OVERCOMPETITIVE_ADVENTURER = 1000807;
|
||||
MOMODI = 1000841;
|
||||
OTOPA_POTTOPA = 1000864;
|
||||
UNDAUNTED_ADVENTURER = 1000936;
|
||||
GREEDY_MERCHANT = 1000937;
|
||||
LIONHEARTED_ADVENTURER = 1000938;
|
||||
SPRY_SALESMAN = 1000939;
|
||||
|
||||
|
||||
|
||||
UPBEAT_ADVENTURER = 1000940;
|
||||
SEEMINGLY_CALM_ADVENTURER = 1000941;
|
||||
UNKNOWN1 = 0;
|
||||
UNKNOWN2 = 0;
|
||||
|
||||
THANCRED = 1000948; -- 1000010
|
||||
|
||||
|
||||
-- Quest Markers
|
||||
MRKR_MOMODI = 11001001;
|
||||
MRKR_CAMP_BLACK_BRUSH = 11001002;
|
||||
|
||||
-- Quest Items
|
||||
ITEM_VELODYNA_COSMOS = 0; -- Seq_000 : 2nd journal arg. >=5 doesn't have.
|
||||
ITEM_COLISEUM_PASS = 0; -- Seq_015 : 3rd journal arg. >=5 doesn't have
|
||||
|
||||
-- Quest Flags
|
||||
FLAG_SEQ000 = 0;
|
||||
|
||||
function onStart(player, quest)
|
||||
quest:StartSequence(SEQ_000);
|
||||
|
||||
-- Immediately move to the Adventurer's Guild private area
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventMomodiStart");
|
||||
GetWorldManager():DoZoneChange(player, 175, "PrivateAreaMasterPast", 4, 15, -75.242, 195.009, 74.572, -0.046);
|
||||
player:SendGameMessage(quest, 329, 0x20);
|
||||
player:SendGameMessage(quest, 330, 0x20);
|
||||
end
|
||||
|
||||
function onFinish(player, quest)
|
||||
end
|
||||
|
||||
function onSequence(player, quest, sequence)
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
-- Setup states incase we loaded in.
|
||||
|
||||
--AddENpc(classId, byte flagType=0,isTalkEnabled, isPushEnabled, isEmoteEnabled, isSpawned)
|
||||
quest:AddENpc(MOMODI, QFLAG_PLATE);
|
||||
quest:AddENpc(OTOPA_POTTOPA);
|
||||
|
||||
elseif (sequence == SEQ_005) then
|
||||
quest:AddENpc(MOMODI);
|
||||
end
|
||||
end
|
||||
|
||||
function onTalk(player, quest, npc)
|
||||
local sequence = quest:getSequence();
|
||||
local classId = npc:GetActorClassId();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
seq000_onTalk(player, quest, npc, classId);
|
||||
elseif (sequence == SEQ_005) then
|
||||
seq005_onTalk(player, quest, npc, classId);
|
||||
end
|
||||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
function onPush(player, quest, npc)
|
||||
|
||||
local sequence = quest:getSequence();
|
||||
local classId = npc:GetActorClassId();
|
||||
player:SendMessage(0x20, "", "Sequence: "..sequence.." Class Id: "..classId);
|
||||
if (sequence == SEQ_000) then
|
||||
|
||||
elseif (sequence == SEQ_010) then
|
||||
|
||||
end
|
||||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
|
||||
function onNotice(player, quest, target)
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_1"); -- Describes what an Instance is
|
||||
player:EndEvent();
|
||||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
|
||||
|
||||
function seq000_onTalk(player, quest, npc, classId)
|
||||
|
||||
if (classId == MOMODI) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
|
||||
player:EndEvent();
|
||||
quest:StartSequence(SEQ_005);
|
||||
GetWorldManager():DoZoneChange(player, 175, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation);
|
||||
return;
|
||||
elseif (classId == UNDAUNTED_ADVENTURER) then
|
||||
callClientFunction (player, "delegateEvent", player, quest, "processEvent000_2");
|
||||
elseif (classId == GREEDY_MERCHANT) then
|
||||
callClientFunction (player, "delegateEvent", player, quest, "processEvent000_3");
|
||||
elseif (classId == SPRY_SALESMAN) then
|
||||
callClientFunction (player, "delegateEvent", player, quest, "processEvent000_4");
|
||||
elseif (classId == LIONHEARTED_ADVENTURER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_5");
|
||||
elseif (classId == UPBEAT_ADVENTURER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_6");
|
||||
elseif (classId == SEEMINGLY_CALM_ADVENTURER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_7");
|
||||
elseif (classId == OVERCOMPETITIVE_ADVENTURER) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_8");
|
||||
elseif (classId == OTOPA_POTTOPA) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_9");
|
||||
elseif (classId == THANCRED) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_10");
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function seq005_onTalk(player, quest, npc, classId)
|
||||
if (classId == MOMODI) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_2");
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
|
||||
function getJournalInformation(player, quest)
|
||||
return 0, ITEM_VELODYNA_COSMOS, ITEM_COLISEUM_PASS;
|
||||
end
|
||||
|
||||
|
||||
function getJournalMapMarkerList(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
local possibleMarkers = {};
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
table.insert(possibleMarkers, MRKR_MOMODI);
|
||||
elseif (sequence == SEQ_010) then
|
||||
if (not quest:GetFlag(FLAG_SEQ010_TALK0)) then
|
||||
table.insert(possibleMarkers, MRKR_YAYATOKI)
|
||||
else
|
||||
table.insert(possibleMarkers, MRKR_ADV_GUILD);
|
||||
end
|
||||
end
|
||||
|
||||
return unpack(possibleMarkers)
|
||||
end
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue