mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Hildibrand series of quests all in. Requires inn dream handling and some retail accuracy double-checking to finish it off. Misc script fixes also.
=============================== Nudgenpc.lua - Added a command variation Testmapobj.lua - Added !help documentation DftWil.lua - Corrected an npc name/function Player.cs - Changed Dalamud packet to default to 7, not 0. Fixes the moon not displaying in a specific Hildibrand cutscene Etc5g0.lua - Made quest accepting retail-accurate with how it displayed messages/ended the TalkEvent Etc5g1.lua - Added Bed !. Kinda kludged in atm since it's a pre-accepted quest state. Etc5u1.lua - Same as above Etc5l1.lua - Quest "Private Eyes" scripted. Etc5l2.lua - Quest "Mysteries of the Red Moon" scripted Etc5l3.lua - Quest "Prophecy Inspection" scripted
This commit is contained in:
parent
01d05b5cee
commit
a7b1b79461
@ -38,7 +38,8 @@ horizontal = {
|
|||||||
rotation = {
|
rotation = {
|
||||||
["ROTATE"] = 3,
|
["ROTATE"] = 3,
|
||||||
["ORIENTATION"] = 3,
|
["ORIENTATION"] = 3,
|
||||||
["O"] = 3
|
["O"] = 3,
|
||||||
|
["ROT"] = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTrigger(player, argc, arg1, arg2)
|
function onTrigger(player, argc, arg1, arg2)
|
||||||
|
@ -3,7 +3,12 @@ require("global");
|
|||||||
properties = {
|
properties = {
|
||||||
permissions = 0,
|
permissions = 0,
|
||||||
parameters = "sssss",
|
parameters = "sssss",
|
||||||
description = ""
|
description =
|
||||||
|
[[
|
||||||
|
|
||||||
|
Tests a layout/region id w/ an animation string
|
||||||
|
!testmapobj <anim> <region> <layout> <maxlayout>
|
||||||
|
]],
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTrigger(player, argc, animation, layoutId, instanceId, maxInstanceId)
|
function onTrigger(player, argc, animation, layoutId, instanceId, maxInstanceId)
|
||||||
|
@ -271,9 +271,9 @@ function onTalk(player, quest, npc, eventName)
|
|||||||
local npcId = npc:GetActorClassId();
|
local npcId = npc:GetActorClassId();
|
||||||
local clientFunc = defaultTalkWil[npcId];
|
local clientFunc = defaultTalkWil[npcId];
|
||||||
|
|
||||||
if (npcId == 1000864) then -- Kopuru Fupuru (Adv. Guild Inn NPC)
|
if (npcId == 1000864) then -- Otopa Pottopa (Adv. Guild Inn NPC)
|
||||||
if (player:IsQuestCompleted(110848)) then -- "Ring of Deceit" completed.
|
if (player:IsQuestCompleted(110848)) then -- "Ring of Deceit" completed.
|
||||||
defaultTalkWithInn(player, quest, "defaultTalkWithInn_Desk");
|
callClientFunction(player, "delegateEvent", player, quest, "defaultTalkWithInn_Desk");
|
||||||
else
|
else
|
||||||
callClientFunction(player, "delegateEvent", player, quest, clientFunc);
|
callClientFunction(player, "delegateEvent", player, quest, clientFunc);
|
||||||
end
|
end
|
||||||
|
@ -28,8 +28,6 @@ MRKR_PFARAHR = 11082001;
|
|||||||
MRKR_VKOROLON = 11082002;
|
MRKR_VKOROLON = 11082002;
|
||||||
|
|
||||||
function onStart(player, quest)
|
function onStart(player, quest)
|
||||||
quest:StartSequence(SEQ_000);
|
|
||||||
player:SendGameMessage(GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM, ITEM_WELL_WORN_BAG, 1);
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function onFinish(player, quest)
|
function onFinish(player, quest)
|
||||||
@ -57,6 +55,10 @@ function onTalk(player, quest, npc)
|
|||||||
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventVKOROLONStart");
|
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventVKOROLONStart");
|
||||||
if (questAccepted == 1) then
|
if (questAccepted == 1) then
|
||||||
player:AcceptQuest(quest);
|
player:AcceptQuest(quest);
|
||||||
|
quest:StartSequence(SEQ_000);
|
||||||
|
wait(2);
|
||||||
|
attentionMessage(player, 25246, ITEM_WELL_WORN_BAG, 1);
|
||||||
|
|
||||||
end
|
end
|
||||||
player:EndEvent();
|
player:EndEvent();
|
||||||
return;
|
return;
|
||||||
|
@ -19,6 +19,7 @@ SEQ_010 = 10;
|
|||||||
-- Actor Class Ids
|
-- Actor Class Ids
|
||||||
OTOPA_POTTOPA = 1000864;
|
OTOPA_POTTOPA = 1000864;
|
||||||
VKOROLON = 1000458;
|
VKOROLON = 1000458;
|
||||||
|
THE_ROOST_BED = 1200379;
|
||||||
NICOLIAUX = 1002071; -- 1000409: Can't use his public area id, otherwise a ! shows on him there also
|
NICOLIAUX = 1002071; -- 1000409: Can't use his public area id, otherwise a ! shows on him there also
|
||||||
POWLE = 1000238;
|
POWLE = 1000238;
|
||||||
AUNILLIE = 1000410;
|
AUNILLIE = 1000410;
|
||||||
@ -51,14 +52,14 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function onStateChange(player, quest, sequence)
|
function onStateChange(player, quest, sequence)
|
||||||
|
|
||||||
if (sequence == SEQ_ACCEPT) then
|
if (sequence == SEQ_ACCEPT) then
|
||||||
local hasQuestItem = player:GetItemPackage(INVENTORY_NORMAL):HasItem(ITEM_WANTED_GAUWYN);
|
local hasQuestItem = player:GetItemPackage(INVENTORY_NORMAL):HasItem(ITEM_WANTED_GAUWYN);
|
||||||
local otopaFlag = 0;
|
|
||||||
|
|
||||||
if (hasQuestItem == false) then
|
if (hasQuestItem == false) then
|
||||||
otopaFlag = 2;
|
quest:SetENpc(OTOPA_POTTOPA, QFLAG_NORM);
|
||||||
end
|
end
|
||||||
quest:SetENpc(OTOPA_POTTOPA, otopaFlag);
|
quest:SetENpc(THE_ROOST_BED, 5);
|
||||||
quest:SetENpc(VKOROLON, QFLAG_NORM); -- Always shows despite interaction
|
quest:SetENpc(VKOROLON, QFLAG_NORM); -- Always shows despite interaction
|
||||||
|
|
||||||
elseif (sequence == SEQ_000) then
|
elseif (sequence == SEQ_000) then
|
||||||
|
166
Data/scripts/quests/etc/etc5l1.lua
Normal file
166
Data/scripts/quests/etc/etc5l1.lua
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
require("global");
|
||||||
|
|
||||||
|
--[[
|
||||||
|
|
||||||
|
Quest Script
|
||||||
|
|
||||||
|
Name: Private Eyes
|
||||||
|
Code: Etc5l1
|
||||||
|
Id: 110839
|
||||||
|
Prereq: Level 15. Man5g1 (In Plain Sight) complete. [110829]
|
||||||
|
Notes:
|
||||||
|
|
||||||
|
]]
|
||||||
|
|
||||||
|
-- Sequence Numbers
|
||||||
|
SEQ_000 = 0; -- Talk to Bertrand
|
||||||
|
SEQ_010 = 10; -- Head to the meeting point.
|
||||||
|
|
||||||
|
-- Actor Class Ids
|
||||||
|
OTOPA_POTTOPA = 1000864;
|
||||||
|
MYTESYN = 1000167;
|
||||||
|
MIZZENMAST_BED = 1200378;
|
||||||
|
BERTRAND = 1001903; -- 1060004 also a valid ID, but doesn't look like the NPC appeared anywhere else?
|
||||||
|
ABRAHAM = 1002066;
|
||||||
|
PRIVATE_AREA_ENTRANCE = 1090087; -- Check that this ID is free to use before merge
|
||||||
|
PRIVATE_AREA_EXIT = 1290002;
|
||||||
|
CUTSCENE_PUSH_TRIGGER = 1090088; -- Check that this ID is free to use before merge
|
||||||
|
|
||||||
|
-- Prop Actor Ids (for documentation sake)
|
||||||
|
BRONZE_CHEST = 1080056; -- bgObj 20923 w/ body 1024
|
||||||
|
GLASS_DRINK = 1080057; -- bgObj 20901 w/ body 26624
|
||||||
|
RECTANGULAR_BOX = 1080058; -- bgObj 20951 w/ body 1024
|
||||||
|
|
||||||
|
-- Quest Items
|
||||||
|
ITEM_WANTED_GAUWYN = 10011243;
|
||||||
|
|
||||||
|
-- Quest Markers
|
||||||
|
MRKR_CAVE = 11072101;
|
||||||
|
MRKR_BERTRAND = 11072102;
|
||||||
|
MRKR_CUTSCENE = 11072103;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function onStart(player, quest)
|
||||||
|
quest:StartSequence(SEQ_000);
|
||||||
|
end
|
||||||
|
|
||||||
|
function onFinish(player, quest)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function onStateChange(player, quest, sequence)
|
||||||
|
|
||||||
|
if (sequence == SEQ_ACCEPT) then
|
||||||
|
local hasQuestItem = player:GetItemPackage(INVENTORY_NORMAL):HasItem(ITEM_WANTED_GAUWYN);
|
||||||
|
local otopaFlag = 0;
|
||||||
|
|
||||||
|
if (hasQuestItem == false) then
|
||||||
|
otopaFlag = 2;
|
||||||
|
end
|
||||||
|
quest:SetENpc(OTOPA_POTTOPA, otopaFlag);
|
||||||
|
quest:SetENpc(MYTESYN, QFLAG_NORM); -- Assuming this functions the same as it did in Etc5g1
|
||||||
|
quest:SetENpc(MIZZENMAST_BED, 5);
|
||||||
|
|
||||||
|
elseif (sequence == SEQ_000) then
|
||||||
|
quest:SetENpc(MYTESYN);
|
||||||
|
quest:SetENpc(PRIVATE_AREA_ENTRANCE, QFLAG_MAP, false, true, false, true);
|
||||||
|
quest:SetENpc(BERTRAND, QFLAG_NORM);
|
||||||
|
quest:SetENpc(ABRAHAM);
|
||||||
|
elseif (sequence == SEQ_010) then
|
||||||
|
quest:SetENpc(CUTSCENE_PUSH_TRIGGER, QFLAG_MAP,false, true, false, true);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function onTalk(player, quest, npc)
|
||||||
|
local sequence = quest:getSequence();
|
||||||
|
local classId = npc:GetActorClassId();
|
||||||
|
|
||||||
|
if (sequence == SEQ_ACCEPT) then
|
||||||
|
-- Am assuming this all functions the same as it did in Etc5g1
|
||||||
|
if (classId == OTOPA_POTTOPA) then
|
||||||
|
local hasQuestItem = player:GetItemPackage(INVENTORY_NORMAL):HasItem(ITEM_WANTED_GAUWYN);
|
||||||
|
|
||||||
|
if (not hasQuestItem) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventOTOPAPOTTOPAStart");
|
||||||
|
giveWantedItem(player);
|
||||||
|
npc:SetQuestGraphic(player, QFLAG_NONE);
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventOTOPAPOTTOPAStart_2");
|
||||||
|
end
|
||||||
|
player:SendGameMessage(player, GetWorldMaster(), 51148, MESSAGE_TYPE_SYSTEM, 10011243, 1070); -- Log out in Mizzenmast Inn w/ item.
|
||||||
|
elseif (classId == MYTESYN) then
|
||||||
|
player:SendGameMessage(player, GetWorldMaster(), 51148, MESSAGE_TYPE_SYSTEM, 10011243, 1070);
|
||||||
|
end
|
||||||
|
|
||||||
|
elseif (sequence == SEQ_000) then
|
||||||
|
if (classId == MYTESYN) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1");
|
||||||
|
elseif (classId == BERTRAND) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010");
|
||||||
|
quest:UpdateENPCs(); -- Band-aid for a QFLAG_NORM issue
|
||||||
|
quest:StartSequence(SEQ_010);
|
||||||
|
GetWorldManager():WarpToPublicArea(player);
|
||||||
|
elseif (classId == ABRAHAM) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_1");
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
player:EndEvent()
|
||||||
|
quest:UpdateENPCs();
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function onPush(player, quest, npc)
|
||||||
|
local classId = npc.GetActorClassId();
|
||||||
|
|
||||||
|
|
||||||
|
if (classId == PRIVATE_AREA_ENTRANCE) then
|
||||||
|
choice = callClientFunction(player, "delegateEvent", player, quest, "instanceAreaJoinAskInBasaClass");
|
||||||
|
if (choice == 1) then
|
||||||
|
GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 5, -220.948, 16.603, -92.863, -2.090);
|
||||||
|
end
|
||||||
|
|
||||||
|
elseif (classId == CUTSCENE_PUSH_TRIGGER) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_020");
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 500, 1, 1);
|
||||||
|
player:CompleteQuest(quest);
|
||||||
|
end
|
||||||
|
player:EndEvent();
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getJournalInformation(player, quest)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function getJournalMapMarkerList(player, quest)
|
||||||
|
local sequence = quest:getSequence();
|
||||||
|
|
||||||
|
if (sequence == SEQ_000) then
|
||||||
|
return MRKR_CAVE;
|
||||||
|
-- TO-DO: Check for private area and use MRKR_BERTRAND in place of this
|
||||||
|
elseif (sequence == SEQ_010) then
|
||||||
|
return MRKR_CUTSCENE;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function giveWantedItem(player)
|
||||||
|
|
||||||
|
local invCheck = player:getItemPackage(INVENTORY_NORMAL):addItem(ITEM_WANTED_GAUWYN, 1, 1);
|
||||||
|
|
||||||
|
if (invCheck == INV_ERROR_FULL) then
|
||||||
|
-- Your inventory is full.
|
||||||
|
player:SendGameMessage(player, GetWorldMaster(), 60022, MESSAGE_TYPE_SYSTEM_ERROR);
|
||||||
|
elseif (invCheck == INV_ERROR_ALREADY_HAS_UNIQUE) then
|
||||||
|
-- You cannot have more than one <itemId> <quality> in your possession at any given time.
|
||||||
|
player:SendGameMessage(player, GetWorldMaster(), 40279, MESSAGE_TYPE_SYSTEM_ERROR, ITEM_WANTED_GAUWYN, 1);
|
||||||
|
elseif (invCheck == INV_ERROR_SYSTEM_ERROR) then
|
||||||
|
player:SendMessage(MESSAGE_TYPE_SYSTEM, "", "[DEBUG] Server Error on adding item.");
|
||||||
|
elseif (invCheck == INV_ERROR_SUCCESS) then
|
||||||
|
player:SendGameMessage(player, GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM_ERROR, ITEM_WANTED_GAUWYN, 1);
|
||||||
|
end
|
||||||
|
end
|
140
Data/scripts/quests/etc/etc5l2.lua
Normal file
140
Data/scripts/quests/etc/etc5l2.lua
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
require("global");
|
||||||
|
|
||||||
|
--[[
|
||||||
|
|
||||||
|
Quest Script
|
||||||
|
|
||||||
|
Name: Mysteries of the Red Moon
|
||||||
|
Code: Etc5l2
|
||||||
|
Id: 110840
|
||||||
|
Prereq: Level 20. Man5l1 (Private Eyes) complete. [110839]
|
||||||
|
Notes:
|
||||||
|
|
||||||
|
]]
|
||||||
|
|
||||||
|
-- Sequence Numbers
|
||||||
|
SEQ_000 = 0; -- Investigate the room.
|
||||||
|
SEQ_005 = 5; -- Head to the Arrzaneth Ossuary
|
||||||
|
|
||||||
|
-- Actor Class Ids
|
||||||
|
KOPURU_FUPURU = 1002047;
|
||||||
|
BOOK = 1200412;
|
||||||
|
INN_EXIT = 1090089;
|
||||||
|
CUTSCENE_PUSH_TRIGGER = 1090253; -- Already had from capture
|
||||||
|
|
||||||
|
-- Quest Markers
|
||||||
|
MRKR_KOPURU_FUPURU = 11072201;
|
||||||
|
MRKR_BOOK = 11072202;
|
||||||
|
MRKR_CUTSCENE = 11072203;
|
||||||
|
|
||||||
|
-- Quest Item
|
||||||
|
ITEM_HIDLIBRAND_DOSSIER = 10011252;
|
||||||
|
|
||||||
|
function onStart(player, quest)
|
||||||
|
quest:StartSequence(SEQ_000);
|
||||||
|
end
|
||||||
|
|
||||||
|
function onFinish(player, quest)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function onStateChange(player, quest, sequence)
|
||||||
|
|
||||||
|
if (sequence == SEQ_ACCEPT) then
|
||||||
|
quest:SetENpc(KOPURU_FUPURU, QFLAG_NORM);
|
||||||
|
elseif (sequence == SEQ_000) then
|
||||||
|
quest:SetENpc(KOPURU_FUPURU, QFLAG_NORM);
|
||||||
|
quest:SetENpc(BOOK, QFLAG_NORM);
|
||||||
|
quest:SetENpc(INN_EXIT, QFLAG_MAP, false, true, false, true);
|
||||||
|
elseif (sequence == SEQ_005) then
|
||||||
|
quest:SetENpc(BOOK);
|
||||||
|
quest:SetENpc(KOPURU_FUPURU);
|
||||||
|
quest:SetENpc(INN_EXIT, QFLAG_MAP, false, true, false, true);
|
||||||
|
quest:SetENpc(CUTSCENE_PUSH_TRIGGER, QFLAG_MAP,false, true, false, true);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function onTalk(player, quest, npc)
|
||||||
|
local sequence = quest:getSequence();
|
||||||
|
local classId = npc:GetActorClassId();
|
||||||
|
|
||||||
|
-- Offer the quest
|
||||||
|
if (classId == KOPURU_FUPURU and sequence == SEQ_ACCEPT) then
|
||||||
|
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventStart");
|
||||||
|
if (questAccepted == 1) then
|
||||||
|
player:AcceptQuest(quest);
|
||||||
|
end
|
||||||
|
player:EndEvent();
|
||||||
|
return;
|
||||||
|
-- Quest Progress
|
||||||
|
elseif (sequence == SEQ_000) then
|
||||||
|
if (classId == KOPURU_FUPURU) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_KOPURU");
|
||||||
|
GetWorldManager():DoZoneChange(player, 181, "PrivateAreaMasterPast", 5, 15, 0,0,0, player.rotation);
|
||||||
|
elseif (classId == BOOK) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent000");
|
||||||
|
quest:UpdateENPCs(); -- Band-aid for a QFLAG_NORM issue
|
||||||
|
quest:StartSequence(SEQ_005);
|
||||||
|
end
|
||||||
|
elseif (sequence == SEQ_005) then
|
||||||
|
if (classId == KOPURU_FUPURU) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_KOPURU");
|
||||||
|
GetWorldManager():DoZoneChange(player, 181, "PrivateAreaMasterPast", 5, 15, 0,0,0, player.rotation);
|
||||||
|
elseif (classId == BOOK) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_BOOK");
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
player:EndEvent()
|
||||||
|
quest:UpdateENPCs();
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function onPush(player, quest, npc)
|
||||||
|
local classId = npc.GetActorClassId();
|
||||||
|
|
||||||
|
|
||||||
|
if (classId == INN_EXIT) then
|
||||||
|
choice = callClientFunction(player, "delegateEvent", player, quest, "processEventExit");
|
||||||
|
if (choice == 1) then
|
||||||
|
player:EndEvent();
|
||||||
|
GetWorldManager():DoZoneChange(player, 209, "", 0, 15, -104.296, 203, 162.257, -0.4);
|
||||||
|
end
|
||||||
|
-- Quest Complete
|
||||||
|
elseif (classId == CUTSCENE_PUSH_TRIGGER) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_NQ");
|
||||||
|
--TO-DO: Get the scaled EXP for this sqrwa figured out
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 1000, 1, 1, 9);
|
||||||
|
|
||||||
|
player:SendGameMessage(player, GetWorldMaster(), 51149, MESSAGE_TYPE_SYSTEM, ITEM_HIDLIBRAND_DOSSIER);
|
||||||
|
local itemCheck = giveWantedItem(player);
|
||||||
|
if (itemCheck == true) then
|
||||||
|
player:CompleteQuest(quest);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
player:EndEvent();
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function getJournalMapMarkerList(player, quest)
|
||||||
|
local sequence = quest:getSequence();
|
||||||
|
|
||||||
|
if (sequence == SEQ_000) then
|
||||||
|
return MRKR_KOPURU_FUPURU;
|
||||||
|
-- TO-DO: Check for private area and use MRKR_BOOK in place of this
|
||||||
|
elseif (sequence == SEQ_005) then
|
||||||
|
return MRKR_CUTSCENE;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function giveWantedItem(player)
|
||||||
|
|
||||||
|
local invCheck = player:getItemPackage(INVENTORY_NORMAL):addItem(ITEM_HIDLIBRAND_DOSSIER, 1, 1);
|
||||||
|
|
||||||
|
if (invCheck == INV_ERROR_SUCCESS) then
|
||||||
|
player:SendGameMessage(player, GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM_ERROR, ITEM_HIDLIBRAND_DOSSIER, 1);
|
||||||
|
return true;
|
||||||
|
end
|
||||||
|
end
|
253
Data/scripts/quests/etc/etc5l3.lua
Normal file
253
Data/scripts/quests/etc/etc5l3.lua
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
require("global");
|
||||||
|
|
||||||
|
--[[
|
||||||
|
|
||||||
|
Quest Script
|
||||||
|
|
||||||
|
Name: Prophecy Inspection
|
||||||
|
Code: Etc5l3
|
||||||
|
Id: 110841
|
||||||
|
Prereq: Level 20. Man5l2 (Mysteries of the Red Moon) complete. [110840]
|
||||||
|
Notes:
|
||||||
|
|
||||||
|
]]
|
||||||
|
|
||||||
|
-- Sequence Numbers
|
||||||
|
SEQ_000 = 0; -- Head to the Coffer & Coffin
|
||||||
|
SEQ_005 = 5; -- Help out Alret
|
||||||
|
SEQ_010 = 10; -- Talk to Alret
|
||||||
|
|
||||||
|
-- Actor Class Ids
|
||||||
|
KOPURU_FUPURU = 1002047;
|
||||||
|
VKOROLON = 1000458;
|
||||||
|
MYTESYN = 1000167;
|
||||||
|
COFFER_AND_COFFIN_PUSH = 1090090;
|
||||||
|
BED_LIMSA = 1200378;
|
||||||
|
BED_GRIDANIA = 1200379;
|
||||||
|
BED_ULDAH = 1200380;
|
||||||
|
|
||||||
|
HILDIBRAND = 1001995;
|
||||||
|
NASHU_MHAKARACCA = 1001996;
|
||||||
|
ALRET = 1002114;
|
||||||
|
BOMB_BANE_1 = 1080090;
|
||||||
|
BOMB_BANE_2 = 1080091;
|
||||||
|
BOMB_BANE_3 = 1080092;
|
||||||
|
BOMB_BANE_4 = 1080093;
|
||||||
|
BOMB_BANE_5 = 1080094;
|
||||||
|
|
||||||
|
-- Quest Markers
|
||||||
|
MRKR_COFFIN = 11072204;
|
||||||
|
MRKR_BANE_1 = 11072205;
|
||||||
|
MRKR_BANE_2 = 11072206;
|
||||||
|
MRKR_BANE_3 = 11072207;
|
||||||
|
MRKR_BANE_4 = 11072208;
|
||||||
|
MRKR_BANE_5 = 11072209;
|
||||||
|
MRKR_ALRET = 11072210;
|
||||||
|
|
||||||
|
-- Quest Flags
|
||||||
|
FLAG_SEQ005_BANE_1 = 0;
|
||||||
|
FLAG_SEQ005_BANE_2 = 1;
|
||||||
|
FLAG_SEQ005_BANE_3 = 2;
|
||||||
|
FLAG_SEQ005_BANE_4 = 3;
|
||||||
|
FLAG_SEQ005_BANE_5 = 4;
|
||||||
|
|
||||||
|
-- Quest Counter
|
||||||
|
COUNTER_BANE = 0;
|
||||||
|
|
||||||
|
-- Quest Item
|
||||||
|
ITEM_HIDLIBRAND_DOSSIER = 10011252;
|
||||||
|
ITEM_BOMB_BANE = 11000230;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function onStart(player, quest)
|
||||||
|
quest:StartSequence(SEQ_000);
|
||||||
|
end
|
||||||
|
|
||||||
|
function onFinish(player, quest)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function onStateChange(player, quest, sequence)
|
||||||
|
local data = quest:GetData();
|
||||||
|
|
||||||
|
-- Quest not accepted: Set up actors to let you retrieve the item & initiate the log-in check at the Inn
|
||||||
|
if (sequence == SEQ_ACCEPT) then
|
||||||
|
quest:SetENpc(KOPURU_FUPURU, QFLAG_NORM);
|
||||||
|
quest:SetENpc(VKOROLON, QFLAG_NORM);
|
||||||
|
quest:SetENpc(MYTESYN, QFLAG_NORM);
|
||||||
|
quest:SetENpc(BED_ULDAH, 5);
|
||||||
|
quest:SetENpc(BED_GRIDANIA, 5);
|
||||||
|
quest:SetENpc(BED_LIMSA, 5);
|
||||||
|
-- Quest started
|
||||||
|
elseif (sequence == SEQ_000) then
|
||||||
|
quest:SetENpc(COFFER_AND_COFFIN_PUSH, QFLAG_MAP, false, true, false, true);
|
||||||
|
elseif (sequence == SEQ_005) then
|
||||||
|
local bane1Flag = data:GetFlag(FLAG_SEQ005_BANE_1) and QFLAG_NONE or QFLAG_PLATE;
|
||||||
|
local bane2Flag = data:GetFlag(FLAG_SEQ005_BANE_2) and QFLAG_NONE or QFLAG_PLATE;
|
||||||
|
local bane3Flag = data:GetFlag(FLAG_SEQ005_BANE_3) and QFLAG_NONE or QFLAG_PLATE;
|
||||||
|
local bane4Flag = data:GetFlag(FLAG_SEQ005_BANE_4) and QFLAG_NONE or QFLAG_PLATE;
|
||||||
|
local bane5Flag = data:GetFlag(FLAG_SEQ005_BANE_5) and QFLAG_NONE or QFLAG_PLATE;
|
||||||
|
|
||||||
|
quest:SetENpc(COFFER_AND_COFFIN_PUSH, QFLAG_MAP, false, true, false, true);
|
||||||
|
quest:SetENpc(HILDIBRAND);
|
||||||
|
quest:SetENpc(NASHU_MHAKARACCA);
|
||||||
|
quest:SetENpc(ALRET);
|
||||||
|
quest:SetENpc(BOMB_BANE_1, bane1Flag);
|
||||||
|
quest:SetENpc(BOMB_BANE_2, bane2Flag);
|
||||||
|
quest:SetENpc(BOMB_BANE_3, bane3Flag);
|
||||||
|
quest:SetENpc(BOMB_BANE_4, bane4Flag);
|
||||||
|
quest:SetENpc(BOMB_BANE_5, bane5Flag);
|
||||||
|
-- Quest finished
|
||||||
|
elseif (sequence == SEQ_010) then
|
||||||
|
quest:SetENpc(HILDIBRAND);
|
||||||
|
quest:SetENpc(NASHU_MHAKARACCA);
|
||||||
|
quest:SetENpc(ALRET, QFLAG_REWARD);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function onTalk(player, quest, npc)
|
||||||
|
local sequence = quest:getSequence();
|
||||||
|
local classId = npc:GetActorClassId();
|
||||||
|
|
||||||
|
if (sequence == SEQ_ACCEPT) then
|
||||||
|
if (classId == KOPURU_FUPURU) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventKOPURUStart");
|
||||||
|
elseif (classId == VKOROLON) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventKOROLONStart");
|
||||||
|
elseif (classId == MYTESYN) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventMYTESYNStart");
|
||||||
|
end
|
||||||
|
giveDossierItem(player);
|
||||||
|
player:SendGameMessage(player, GetWorldMaster(), 51149, MESSAGE_TYPE_SYSTEM, ITEM_HIDLIBRAND_DOSSIER);
|
||||||
|
|
||||||
|
elseif (sequence == SEQ_005) then
|
||||||
|
local data = quest:GetData();
|
||||||
|
local incCounter = false;
|
||||||
|
|
||||||
|
if (classId == HILDIBRAND) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_1");
|
||||||
|
elseif (classId == NASHU_MHAKARACCA) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_2");
|
||||||
|
elseif (classId == ALRET) then
|
||||||
|
if (sequence == SEQ_005) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_3");
|
||||||
|
end
|
||||||
|
elseif (classId == BOMB_BANE_1) then
|
||||||
|
if not (data:GetFlag(FLAG_SEQ005_BANE_1)) then
|
||||||
|
incCounter = true;
|
||||||
|
data:SetFlag(FLAG_SEQ005_BANE_1);
|
||||||
|
end
|
||||||
|
elseif (classId == BOMB_BANE_2) then
|
||||||
|
if not (data:GetFlag(FLAG_SEQ005_BANE_2)) then
|
||||||
|
incCounter = true;
|
||||||
|
data:SetFlag(FLAG_SEQ005_BANE_2);
|
||||||
|
end
|
||||||
|
elseif (classId == BOMB_BANE_3) then
|
||||||
|
if not (data:GetFlag(FLAG_SEQ005_BANE_3)) then
|
||||||
|
incCounter = true;
|
||||||
|
data:SetFlag(FLAG_SEQ005_BANE_3);
|
||||||
|
end
|
||||||
|
elseif (classId == BOMB_BANE_4) then
|
||||||
|
if not (data:GetFlag(FLAG_SEQ005_BANE_4)) then
|
||||||
|
incCounter = true;
|
||||||
|
data:SetFlag(FLAG_SEQ005_BANE_4);
|
||||||
|
end
|
||||||
|
elseif (classId == BOMB_BANE_5) then
|
||||||
|
if not (data:GetFlag(FLAG_SEQ005_BANE_5)) then
|
||||||
|
incCounter = true;
|
||||||
|
data:SetFlag(FLAG_SEQ005_BANE_5);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if (incCounter == true) then
|
||||||
|
counterAmount = data:IncCounter(COUNTER_BANE);
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_4", counterAmount, 5);
|
||||||
|
wait(1);
|
||||||
|
|
||||||
|
if (counterAmount >= 5) then
|
||||||
|
attentionMessage(player, 25225, quest:GetQuestId()); -- "Seeing the Seers" objectives complete!
|
||||||
|
quest:GetData():ClearData();
|
||||||
|
quest:UpdateENPCs(); -- Band-aid for a QFLAG_PLATE issue
|
||||||
|
quest:StartSequence(SEQ_010);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
elseif (sequence == SEQ_010) then
|
||||||
|
if (classId == HILDIBRAND) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_1");
|
||||||
|
elseif (classId == NASHU_MHAKARACCA) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_2");
|
||||||
|
elseif (classId == ALRET) then -- Finish the quest
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_020");
|
||||||
|
--TO-DO: Get the scaled EXP for this sqrwa figured out
|
||||||
|
--TO-DO: Also confirm reward was issued before flagging quest as complete
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 1000, 1, 1, 9);
|
||||||
|
GetWorldManager():WarpToPublicArea(player);
|
||||||
|
player:CompleteQuest(quest);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
player:EndEvent()
|
||||||
|
quest:UpdateENPCs();
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function onPush(player, quest, npc)
|
||||||
|
local sequence = quest:getSequence();
|
||||||
|
local classId = npc.GetActorClassId();
|
||||||
|
|
||||||
|
if (classId == COFFER_AND_COFFIN_PUSH) then
|
||||||
|
if (sequence == SEQ_000) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005");
|
||||||
|
player:EndEvent();
|
||||||
|
attentionMessage(player, 25246, ITEM_BOMB_BANE, 1);
|
||||||
|
quest:StartSequence(SEQ_005);
|
||||||
|
end
|
||||||
|
|
||||||
|
GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 5, -1732.891, 56.119, -307.285, -2.785);
|
||||||
|
actor = player.CurrentArea:FindActorInZoneByUniqueID("etc5l3_nashu");
|
||||||
|
actor:ChangeState(ACTORSTATE_SITTING_ONFLOOR); -- Band-aid to get her sitting.
|
||||||
|
end
|
||||||
|
player:EndEvent();
|
||||||
|
end
|
||||||
|
|
||||||
|
function getJournalInformation(player, quest)
|
||||||
|
-- Bugged on the client's end and never shows?
|
||||||
|
return 0, ITEM_BOMB_BANE;
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function getJournalMapMarkerList(player, quest)
|
||||||
|
local sequence = quest:getSequence();
|
||||||
|
local data = quest:GetData();
|
||||||
|
local possibleMarkers = {};
|
||||||
|
|
||||||
|
if (sequence == SEQ_000) then
|
||||||
|
return MRKR_COFFIN;
|
||||||
|
|
||||||
|
elseif (sequence == SEQ_005) then
|
||||||
|
local data = quest:GetData();
|
||||||
|
if (not data:GetFlag(FLAG_SEQ005_BANE_1)) then table.insert(possibleMarkers, MRKR_BANE_1); end
|
||||||
|
if (not data:GetFlag(FLAG_SEQ005_BANE_2)) then table.insert(possibleMarkers, MRKR_BANE_2); end
|
||||||
|
if (not data:GetFlag(FLAG_SEQ005_BANE_3)) then table.insert(possibleMarkers, MRKR_BANE_3); end
|
||||||
|
if (not data:GetFlag(FLAG_SEQ005_BANE_4)) then table.insert(possibleMarkers, MRKR_BANE_4); end
|
||||||
|
if (not data:GetFlag(FLAG_SEQ005_BANE_5)) then table.insert(possibleMarkers, MRKR_BANE_5); end
|
||||||
|
return unpack(possibleMarkers)
|
||||||
|
|
||||||
|
elseif (sequence == SEQ_010) then
|
||||||
|
return MRKR_ALRET;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function giveDossierItem(player)
|
||||||
|
|
||||||
|
local invCheck = player:getItemPackage(INVENTORY_NORMAL):addItem(ITEM_HIDLIBRAND_DOSSIER, 1, 1);
|
||||||
|
|
||||||
|
if (invCheck == INV_ERROR_SUCCESS) then
|
||||||
|
player:SendGameMessage(player, GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM_ERROR, ITEM_HIDLIBRAND_DOSSIER, 1);
|
||||||
|
return true;
|
||||||
|
end
|
||||||
|
end
|
@ -18,6 +18,7 @@ SEQ_010 = 10;
|
|||||||
|
|
||||||
-- Actor Class Ids
|
-- Actor Class Ids
|
||||||
OTOPA_POTTOPA = 1000864;
|
OTOPA_POTTOPA = 1000864;
|
||||||
|
HOURGLASS_BED = 1200380;
|
||||||
GAUWYN_THE_GANNET = 1002065;
|
GAUWYN_THE_GANNET = 1002065;
|
||||||
HILDIBRAND = 1001995;
|
HILDIBRAND = 1001995;
|
||||||
NASHU_MHAKARACCA = 1001996;
|
NASHU_MHAKARACCA = 1001996;
|
||||||
@ -52,12 +53,11 @@ end
|
|||||||
function onStateChange(player, quest, sequence)
|
function onStateChange(player, quest, sequence)
|
||||||
if (sequence == SEQ_ACCEPT) then
|
if (sequence == SEQ_ACCEPT) then
|
||||||
local hasQuestItem = player:GetItemPackage(INVENTORY_NORMAL):HasItem(ITEM_WANTED_GAUWYN);
|
local hasQuestItem = player:GetItemPackage(INVENTORY_NORMAL):HasItem(ITEM_WANTED_GAUWYN);
|
||||||
local otopaFlag = 0;
|
|
||||||
|
|
||||||
if (hasQuestItem == false) then
|
if (hasQuestItem == false) then
|
||||||
otopaFlag = 2;
|
quest:SetENpc(OTOPA_POTTOPA, QFLAG_NORM);
|
||||||
end
|
end
|
||||||
quest:SetENpc(OTOPA_POTTOPA, otopaFlag);
|
quest:SetENpc(HOURGLASS_BED, 5);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (sequence == SEQ_000) then
|
if (sequence == SEQ_000) then
|
||||||
|
@ -591,7 +591,7 @@ namespace Meteor.Map.Actors
|
|||||||
public void SendZoneInPackets(WorldManager world, ushort spawnType)
|
public void SendZoneInPackets(WorldManager world, ushort spawnType)
|
||||||
{
|
{
|
||||||
QueuePacket(SetActorIsZoningPacket.BuildPacket(Id, false));
|
QueuePacket(SetActorIsZoningPacket.BuildPacket(Id, false));
|
||||||
QueuePacket(SetDalamudPacket.BuildPacket(Id, 0));
|
QueuePacket(SetDalamudPacket.BuildPacket(Id, 7));
|
||||||
|
|
||||||
//Music Packets
|
//Music Packets
|
||||||
if (currentMainState == SetActorStatePacket.MAIN_STATE_MOUNTED)
|
if (currentMainState == SetActorStatePacket.MAIN_STATE_MOUNTED)
|
||||||
|
Loading…
Reference in New Issue
Block a user