Changed "SendRequestedInfo" to "SendDataPacket" as that's the actual name of the packet. Copied all the progress with the Limsa Opening director to Gridania and Uldah.

This commit is contained in:
Filip Maj 2017-03-19 12:35:21 -04:00
parent 1bf25b2a2b
commit 7c25b14640
6 changed files with 101 additions and 74 deletions

View File

@ -1216,7 +1216,7 @@ namespace FFXIVClassic_Map_Server.Actors
QueuePacket(InventoryEndChangePacket.BuildPacket(toBeExamined.actorId, actorId)); QueuePacket(InventoryEndChangePacket.BuildPacket(toBeExamined.actorId, actorId));
} }
public void SendRequestedInfo(params object[] parameters) public void SendDataPacket(params object[] parameters)
{ {
List<LuaParam> lParams = LuaUtils.CreateLuaParamList(parameters); List<LuaParam> lParams = LuaUtils.CreateLuaParamList(parameters);
SubPacket spacket = InfoRequestResponsePacket.BuildPacket(actorId, actorId, lParams); SubPacket spacket = InfoRequestResponsePacket.BuildPacket(actorId, actorId, lParams);

View File

@ -1,16 +1,9 @@
require ("global") require ("global")
require ("tutorial")
require ("quests/man/man0g0") require ("quests/man/man0g0")
--processTtrBtl001: Active Mode Tutorial --processTtrBtl001: Active Mode Tutorial
--processTtrBtl002: Targetting Tutorial (After active mode done) --processTtrBtl002: Targetting Tutorial (After active mode done)
--processTtrBtl003: Auto Attack Done
--processTtrBtl004: Tutorial Complete
--[[
12: TP
13: WeaponSkills
]]--
function init() function init()
return "/Director/Quest/QuestDirectorMan0g001"; return "/Director/Quest/QuestDirectorMan0g001";
@ -18,30 +11,51 @@ end
function onEventStarted(player, actor, triggerName) function onEventStarted(player, actor, triggerName)
quest = player:GetQuest("Man0g0"); man0g0Quest = player:GetQuest("Man0g0");
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl001", nil, nil, nil); startTutorialMode(player);
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_1", nil, nil, nil); callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrBtl001", nil, nil, nil);
player:ChangeMusic(7);
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_1", nil, nil, nil);
--sendDataPacket: Success
--sendDataPacket: CloseWidget
--IF DoW:
--sendDataPacket: OpenWidget (TP)
--IF TP REACHED:
--sendDataPacket: CloseWidget
--sendDataPacket: OpenWidget (WS)
--IF WS USED:
--sendDataPacket: Success
--sendDataPacket: CloseWidget
--ELSE MAGIC:
--sendDataPacket: OpenWidget (DEFEAT ENEMY)
--IF DEAD
--sendDataPacket: Attention
quest:NextPhase(10);
player:EndEvent(); player:EndEvent();
waitForSignal("playerActive");
wait(1); --If this isn't here, the scripts bugs out. TODO: Find a better alternative.
kickEventContinue(player, actor, "noticeEvent", "noticeEvent");
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrBtl002", nil, nil, nil);
player:EndEvent();
wait(4);
closeTutorialWidget(player);
showTutorialSuccessWidget(player, 9055); --Open TutorialSuccessWidget for attacking enemy
wait(3);
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_TP);
wait(5);
closeTutorialWidget(player);
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_WEAPONSKILLS);
wait(4); --Should be wait for weaponskillUsed signal
closeTutorialWidget(player);
showTutorialSuccessWidget(player, 9065); --Open TutorialSuccessWidget for weapon skill
wait(6); --Should be wait for mobkill
worldMaster = GetWorldMaster();
player:SendDataPacket("attention", worldMaster, "", 51073, 2);
wait(7);
player:ChangeMusic(7);
player:ChangeState(0);
kickEventContinue(player, actor, "noticeEvent", "noticeEvent");
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent020_1", nil, nil, nil);
--[[
IF DoW:
OpenWidget (TP)
IF TP REACHED:
CloseWidget
OpenWidget (WS)
IF WS USED:
Success
CloseWidget
ELSE MAGIC:
OpenWidget (DEFEAT ENEMY)
]]
man0g0Quest:NextPhase(10);
player:EndEvent();
GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1); GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1);
@ -59,9 +73,6 @@ end
function onCommandEvent(player, command) function onCommandEvent(player, command)
quest = GetStaticActor("Man0g0");
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl002", nil, nil, nil);
end end
function onEventUpdate(player, npc) function onEventUpdate(player, npc)

View File

@ -34,7 +34,7 @@ function onEventStarted(player, actor, triggerName)
wait(6); --Should be wait for mobkill wait(6); --Should be wait for mobkill
worldMaster = GetWorldMaster(); worldMaster = GetWorldMaster();
player:SendRequestedInfo("attention", worldMaster, "", 51073, 1); player:SendDataPacket("attention", worldMaster, "", 51073, 1);
wait(7); wait(7);
player:ChangeMusic(7); player:ChangeMusic(7);
player:ChangeState(0); player:ChangeState(0);
@ -73,9 +73,6 @@ end
function onCommandEvent(player, command) function onCommandEvent(player, command)
quest = GetStaticActor("Man0l0");
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl002", nil, nil, nil);
end end
function onEventUpdate(player, npc) function onEventUpdate(player, npc)

View File

@ -1,4 +1,5 @@
require ("global") require ("global")
require ("tutorial")
require ("quests/man/man0u0") require ("quests/man/man0u0")
--processTtrBtl001: Active Mode Tutorial --processTtrBtl001: Active Mode Tutorial
@ -6,39 +7,57 @@ require ("quests/man/man0u0")
--processTtrBtl003: Auto Attack Done --processTtrBtl003: Auto Attack Done
--processTtrBtl004: Tutorial Complete --processTtrBtl004: Tutorial Complete
--[[
12: TP
13: WeaponSkills
]]--
function init() function init()
return "/Director/Quest/QuestDirectorMan0u001"; return "/Director/Quest/QuestDirectorMan0u001";
end end
function onEventStarted(player, actor, triggerName) function onEventStarted(player, actor, triggerName)
quest = GetStaticActor("Man0u0"); man0u0Quest = player:GetQuest("Man0u0");
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl001", nil, nil, nil); startTutorialMode(player);
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl002", nil, nil, nil); callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrBtl001", nil, nil, nil);
--sendDataPacket: Success
--sendDataPacket: CloseWidget
--IF DoW:
--sendDataPacket: OpenWidget (TP)
--IF TP REACHED:
--sendDataPacket: CloseWidget
--sendDataPacket: OpenWidget (WS)
--IF WS USED:
--sendDataPacket: Success
--sendDataPacket: CloseWidget
--ELSE MAGIC:
--sendDataPacket: OpenWidget (DEFEAT ENEMY)
--IF DEAD
--sendDataPacket: Attention
player:EndEvent(); player:EndEvent();
waitForSignal("playerActive");
wait(1); --If this isn't here, the scripts bugs out. TODO: Find a better alternative.
kickEventContinue(player, actor, "noticeEvent", "noticeEvent");
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrBtl002", nil, nil, nil);
player:EndEvent();
wait(4);
closeTutorialWidget(player);
showTutorialSuccessWidget(player, 9055); --Open TutorialSuccessWidget for attacking enemy
wait(3);
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_TP);
wait(5);
closeTutorialWidget(player);
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_WEAPONSKILLS);
wait(4); --Should be wait for weaponskillUsed signal
closeTutorialWidget(player);
showTutorialSuccessWidget(player, 9065); --Open TutorialSuccessWidget for weapon skill
wait(6); --Should be wait for mobkill
worldMaster = GetWorldMaster();
player:SendDataPacket("attention", worldMaster, "", 51073, 3);
wait(7);
player:ChangeMusic(7);
player:ChangeState(0);
kickEventContinue(player, actor, "noticeEvent", "noticeEvent");
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent020", nil, nil, nil);
--[[
IF DoW:
OpenWidget (TP)
IF TP REACHED:
CloseWidget
OpenWidget (WS)
IF WS USED:
Success
CloseWidget
ELSE MAGIC:
OpenWidget (DEFEAT ENEMY)
]]
man0u0Quest:NextPhase(10);
player:EndEvent();
end end

View File

@ -18,10 +18,10 @@ function onBeginLogin(player)
--For Opening. Set Director and reset position incase d/c --For Opening. Set Director and reset position incase d/c
if (player:HasQuest(110001) == true) then if (player:HasQuest(110001) == true) then
--director = player:GetZone():CreateDirector("OpeningDirector"); director = player:GetZone():CreateDirector("OpeningDirector");
--player:AddDirector(director); player:AddDirector(director);
--player:SetLoginDirector(director); player:SetLoginDirector(director);
--player:KickEvent(director, "noticeEvent", true); player:KickEvent(director, "noticeEvent", true);
player.positionX = 0.016; player.positionX = 0.016;
player.positionY = 10.35; player.positionY = 10.35;

View File

@ -31,7 +31,7 @@ TUTORIAL_DEFEATENEMY = 18;
--Helper functions --Helper functions
function showTutorialSuccessWidget(player, textId) function showTutorialSuccessWidget(player, textId)
player:SendRequestedInfo(2, nil, nil, textId); player:SendDataPacket(2, nil, nil, textId);
end end
function openTutorialWidget(player, controllerType, widgetId) function openTutorialWidget(player, controllerType, widgetId)
@ -39,17 +39,17 @@ function openTutorialWidget(player, controllerType, widgetId)
if (controllerType ~= CONTROLLER_GAMEPAD) then if (controllerType ~= CONTROLLER_GAMEPAD) then
controllerType = CONTROLLER_KEYBOARD; controllerType = CONTROLLER_KEYBOARD;
end end
player:SendRequestedInfo(4, nil, nil, controllerType, widgetId); player:SendDataPacket(4, nil, nil, controllerType, widgetId);
end end
function closeTutorialWidget(player) function closeTutorialWidget(player)
player:SendRequestedInfo(5); player:SendDataPacket(5);
end end
function startTutorialMode(player) function startTutorialMode(player)
player:SendRequestedInfo(9); player:SendDataPacket(9);
end end
function endTutorialMode(player) function endTutorialMode(player)
player:SendRequestedInfo(7); player:SendDataPacket(7);
end end