Got the emote sequence for Treasures of the Main working. Got the duty started but there are issues on zoning.

This commit is contained in:
Filip Maj 2022-03-04 02:20:56 -05:00
parent 765cf194c5
commit 2817560217
3 changed files with 151 additions and 34 deletions

View File

@ -7,31 +7,23 @@ end
function onCreateContentArea(players, director, contentArea, contentGroup) function onCreateContentArea(players, director, contentArea, contentGroup)
sisipu = contentArea:SpawnActor(2290007, "sisipu", -8, 16.35, 6, 0.5); sisipu = contentArea:SpawnActor(2290007, "sisipu", -49, 36.43, 162, 2.2);
mob1 = contentArea:SpawnActor(2205403, "mob1", -3.02+3, 17.35, 14.24, -2.81);
mob2 = contentArea:SpawnActor(2205403, "mob2", -3.02, 17.35, 14.24, -2.81);
mob3 = contentArea:SpawnActor(2205403, "mob3", -3.02-3, 17.35, 14.24, -2.81);
for _, player in pairs(players) do for _, player in pairs(players) do
contentGroup:AddMember(player); contentGroup:AddMember(player);
end; end;
contentGroup:AddMember(director); contentGroup:AddMember(director);
contentGroup:AddMember(yshtola); contentGroup:AddMember(sisipu);
contentGroup:AddMember(stahlmann);
contentGroup:AddMember(mob1);
contentGroup:AddMember(mob2);
contentGroup:AddMember(mob3);
end end
function onEventStarted(player, director, triggerName) function onEventStarted(player, director, triggerName)
local man0l1Quest = player:GetQuest("Man0l1");
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEvent604");
player:EndEvent(); player:EndEvent();
end end
function main()
end

View File

@ -72,7 +72,7 @@ ECHO_EXIT_TRIGGER = 1090003;
-- FSH Guild -- FSH Guild
NNMULIKA = 1000153; NNMULIKA = 1000153;
SISIPU = 1000155; SISIPU = 1000155;
ZEPHYR_TRIGGER = 1900001; ZEPHYR_TRIGGER = 1090004;
-- Echo in the Bsm Guild -- Echo in the Bsm Guild
TATTOOED_PIRATE = 1000111; TATTOOED_PIRATE = 1000111;
@ -91,6 +91,7 @@ ECHO_EXIT_TRIGGER2 = 1090001;
-- Quest Data -- Quest Data
CNTR_SEQ7_CUL = 1; CNTR_SEQ7_CUL = 1;
CNTR_SEQ7_MRD = 2; CNTR_SEQ7_MRD = 2;
CNTR_SEQ40_FSH = 3;
function onStart(player, quest) function onStart(player, quest)
quest:StartSequence(SEQ_000); quest:StartSequence(SEQ_000);
@ -162,9 +163,13 @@ function onStateChange(player, quest, sequence)
end end
elseif (sequence == SEQ_035) then elseif (sequence == SEQ_035) then
quest:SetENpc(NNMULIKA, QFLAG_PLATE); quest:SetENpc(NNMULIKA, QFLAG_PLATE);
elseif (sequence == SEQ_040) then
quest:SetENpc(SISIPU, QFLAG_PLATE, true, false, true);
quest:SetENpc(NNMULIKA);
elseif (sequence == SEQ_048) then elseif (sequence == SEQ_048) then
quest:SetENpc(BADERON); quest:SetENpc(BADERON);
quest:SetENpc(ZEPHYR_TRIGGER); quest:SetENpc(ZEPHYR_TRIGGER, QFLAG_MAP, false, true);
quest:SetENpc(NNMULIKA);
elseif (sequence == SEQ_075) then elseif (sequence == SEQ_075) then
quest:SetENpc(BODENOLF, QFLAG_PLATE); quest:SetENpc(BODENOLF, QFLAG_PLATE);
elseif (sequence == SEQ_080) then elseif (sequence == SEQ_080) then
@ -218,25 +223,52 @@ function onTalk(player, quest, npc)
seq007_onTalk(player, quest, npc, classId); seq007_onTalk(player, quest, npc, classId);
elseif (sequence == SEQ_035) then elseif (sequence == SEQ_035) then
if (classId == NNMULIKA) then if (classId == NNMULIKA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent602"); callClientFunction(player, "delegateEvent", player, quest, "processEvent600");
callClientFunction(player, "delegateEvent", player, quest, "processEvent602_2"); quest:StartSequence(SEQ_040);
callClientFunction(player, "delegateEvent", player, quest, "processEvent602_3");
callClientFunction(player, "delegateEvent", player, quest, "processEvent604");
--quest:StartSequence(SEQ_040);
player:EndEvent(); player:EndEvent();
GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 5);
end end
elseif (sequence == SEQ_040) then elseif (sequence == SEQ_040) then
if (classId == SISIPU) 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 elseif (sequence == SEQ_048) then
if (classId == BADERON) then if (classId == BADERON) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent602_3"); callClientFunction(player, "delegateEvent", player, quest, "processEvent602_3");
player:EndEvent(); elseif (classId == NNMULIKA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent602_2");
elseif (classId == ZEPHYR_TRIGGER) then elseif (classId == ZEPHYR_TRIGGER) then
local startDuty = callClientFunction(player, "delegateEvent", player, quest, "processEvent602_3"); local startDuty = callClientFunction(player, "delegateEvent", player, quest, "processEvent602_3");
if (startDuty) then if (startDuty) then
end end
player:EndEvent(); player:EndEvent();
end end
player:EndEvent();
elseif (sequence == SEQ_075) then elseif (sequence == SEQ_075) then
if (classId == BODENOLF) then if (classId == BODENOLF) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent630"); callClientFunction(player, "delegateEvent", player, quest, "processEvent630");
@ -423,6 +455,7 @@ function onPush(player, quest, npc)
startMan0l1Content(player, quest); startMan0l1Content(player, quest);
return; return;
end end
player:EndEvent();
end end
elseif (sequence == SEQ_085) then elseif (sequence == SEQ_085) then
if (classId == ECHO_EXIT_TRIGGER2) then if (classId == ECHO_EXIT_TRIGGER2) then
@ -434,12 +467,104 @@ function onPush(player, quest, npc)
end end
end end
function onEmote(player, quest, npc, emoteId) function onEmote(player, quest, npc, eventName)
local data = quest:GetData();
local sequence = quest:getSequence(); 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 (sequence == SEQ_040) then
if (classId == SISIPU) 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 end
player:EndEvent();
quest:UpdateENPCs(); quest:UpdateENPCs();
end end
@ -473,6 +598,8 @@ end
function startMan0l1Content(player, quest) function startMan0l1Content(player, quest)
quest:StartSequence(SEQ_050); 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"); local contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "Man0l101", "SimpleContent30002", "Quest/QuestDirectorMan0l101");
@ -481,13 +608,9 @@ function startMan0l1Content(player, quest)
end end
local director = contentArea:GetContentDirector(); local director = contentArea:GetContentDirector();
player:AddDirector(director); player:AddDirector(director);
director:StartDirector(false); director:StartDirector(true);
player:KickEvent(director, "noticeEvent", true); GetWorldManager():DoZoneChangeContent(player, contentArea, -63.25, 33.15, 164.51, 0.8, 16);
player:SetLoginDirector(director);
GetWorldManager():DoZoneChangeContent(player, contentArea, -5, 16.35, 6, 0.5, 16);
end end
function getJournalInformation(player, quest) function getJournalInformation(player, quest)

View File

@ -41,6 +41,7 @@ using Meteor.Map.Actors.Chara;
using Meteor.Map.DataObjects.chara; using Meteor.Map.DataObjects.chara;
using Meteor.Map.actors.chara; using Meteor.Map.actors.chara;
using Meteor.Map.Actors.QuestNS; using Meteor.Map.Actors.QuestNS;
using Meteor.Map.actors.group;
namespace Meteor.Map.lua namespace Meteor.Map.lua
{ {
@ -78,6 +79,7 @@ namespace Meteor.Map.lua
UserData.RegisterType<Npc>(); UserData.RegisterType<Npc>();
UserData.RegisterType<Quest>(); UserData.RegisterType<Quest>();
UserData.RegisterType<QuestData>(); UserData.RegisterType<QuestData>();
UserData.RegisterType<ContentGroup>();
UserData.RegisterType<Zone>(); UserData.RegisterType<Zone>();
UserData.RegisterType<InventoryItem>(); UserData.RegisterType<InventoryItem>();
UserData.RegisterType<ItemPackage>(); UserData.RegisterType<ItemPackage>();