Minor script revision + new quest

warp.lua - Switched to warp type 0x16 for flipping between city zones.  Zero gameplay interruption with this type.
etc5u1 - Added in a spawn location for privateArea
etc5g1 - Scripted, aside from the means of accepting the quest which requires special handling to trigger the intro CS for it.
This commit is contained in:
CuriousJorge 2022-04-03 00:57:24 -04:00
parent 4494b30285
commit d50bfef2e5
3 changed files with 59 additions and 17 deletions

View File

@ -77,7 +77,7 @@ function onTrigger(player, argc, p1, p2, p3, p4, privateArea, privateAreaType, n
} }
if (player_zone == zones[player_zone][1]) then if (player_zone == zones[player_zone][1]) then
worldManager:DoZoneChange(player, zones[player_zone][2], "", 0, 0x02, player_x, player_y, player_z, player_rot); worldManager:DoZoneChange(player, zones[player_zone][2], "", 0, 0x16, player_x, player_y, player_z, player_rot);
player:SendMessage(messageID, sender, string.format("setting coordinates X:%d Y:%d Z:%d to new zone (%d) private area:%s", player_x, player_y, player_z, zones[player_zone][2], privateArea or "unspecified")); player:SendMessage(messageID, sender, string.format("setting coordinates X:%d Y:%d Z:%d to new zone (%d) private area:%s", player_x, player_y, player_z, zones[player_zone][2], privateArea or "unspecified"));
end end
else else

View File

@ -19,14 +19,14 @@ SEQ_010 = 10;
-- Actor Class Ids -- Actor Class Ids
OTOPA_POTTOPA = 1000864; OTOPA_POTTOPA = 1000864;
VKOROLON = 1000458; VKOROLON = 1000458;
NICOLIAUX = 1000409; 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;
GAUWYN_THE_GANNET = 1002065; GAUWYN_THE_GANNET = 1002065;
HILDIBRAND = 1002067; HILDIBRAND = 1002067;
NASHU_MHAKARACCA = 1001996; NASHU_MHAKARACCA = 1001996;
PRIVATE_AREA_ENTRANCE = 0; PRIVATE_AREA_ENTRANCE = 1090086; -- Check that this ID is free to use before merge
PRIVATE_AREA_EXIT = 0; PRIVATE_AREA_EXIT = 1290002;
-- DefaultTalk NPCs? -- DefaultTalk NPCs?
SANSA = 1000239; SANSA = 1000239;
@ -60,13 +60,25 @@ function onStateChange(player, quest, sequence)
end end
quest:SetENpc(OTOPA_POTTOPA, otopaFlag); quest:SetENpc(OTOPA_POTTOPA, otopaFlag);
quest:SetENpc(VKOROLON, QFLAG_NORM); -- Always shows despite interaction quest:SetENpc(VKOROLON, QFLAG_NORM); -- Always shows despite interaction
end
if (sequence == SEQ_000) then
elseif (sequence == SEQ_000) then
quest:SetENpc(VKOROLON);
quest:SetENpc(NICOLIAUX, QFLAG_NORM);
quest:SetENpc(POWLE);
quest:SetENpc(AUNILLIE);
quest:SetENpc(GAUWYN_THE_GANNET);
quest:SetENpc(HILDIBRAND);
quest:SetENpc(NASHU_MHAKARACCA);
quest:SetENpc(PRIVATE_AREA_ENTRANCE, QFLAG_MAP, false, true, false, true);
elseif (sequence == SEQ_010) then elseif (sequence == SEQ_010) then
quest:SetENpc(VKOROLON, QFLAG_REWARD);
quest:SetENpc(NICOLIAUX);
quest:SetENpc(POWLE);
quest:SetENpc(AUNILLIE);
quest:SetENpc(GAUWYN_THE_GANNET);
quest:SetENpc(HILDIBRAND);
quest:SetENpc(NASHU_MHAKARACCA);
end end
end end
@ -88,34 +100,64 @@ function onTalk(player, quest, npc)
player:SendGameMessage(player, GetWorldMaster(), 51148, MESSAGE_TYPE_SYSTEM, 10011243, 2075); -- Log out in The Roost w/ item. player:SendGameMessage(player, GetWorldMaster(), 51148, MESSAGE_TYPE_SYSTEM, 10011243, 2075); -- Log out in The Roost w/ item.
elseif (classId == VKOROLON) then elseif (classId == VKOROLON) then
-- This retail accurate. No dialog functions called. -- This is retail accurate. No dialog functions called.
player:SendGameMessage(player, GetWorldMaster(), 51148, MESSAGE_TYPE_SYSTEM, 10011243, 2075); player:SendGameMessage(player, GetWorldMaster(), 51148, MESSAGE_TYPE_SYSTEM, 10011243, 2075);
end end
elseif (sequence == SEQ_000) then elseif (sequence >= SEQ_000) then
if (classId == VKOROLON) then
elseif (sequence == SEQ_010) then if (sequence == SEQ_010) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_020");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 500, 1, 1);
player:CompleteQuest(quest);
-- Log out in Mizzenmast Inn w/ item.
player:SendGameMessage(player, GetWorldMaster(), 51148, MESSAGE_TYPE_SYSTEM, 10011243, 1070);
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1"); -- Educated guess
end
elseif (classId == NICOLIAUX) then
if (sequence == SEQ_010) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_1"); -- Educated guess
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010");
attentionMessage(player, 25225, quest.GetQuestId()); -- objectives complete!
quest:UpdateENPCs(); -- Band-aid for a QFLAG_NORM issue
quest:StartSequence(SEQ_010);
end
elseif (classId == POWLE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_5");
elseif (classId == AUNILLIE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_6");
elseif (classId == GAUWYN_THE_GANNET) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_2");
elseif (classId == HILDIBRAND) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_3");
elseif (classId == NASHU_MHAKARACCA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_4");
end end
end
player:EndEvent() player:EndEvent()
quest:UpdateENPCs(); quest:UpdateENPCs();
end end
function onPush(player, quest, npc) function onPush(player, quest, npc)
local npcClassId = npc.GetActorClassId(); local npcClassId = npc.GetActorClassId();
player:EndEvent(); player:EndEvent();
if (npcClassId == PRIVATE_AREA_ENTRANCE) then if (npcClassId == PRIVATE_AREA_ENTRANCE) then
GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 9999); -- Temp GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 5, -33.709, 7.810, -1272.337, -0.810);
elseif (npcClassId == PRIVATE_AREA_EXIT) then
GetWorldManager():WarpToPublicArea(player);
end end
end end
function getJournalInformation(player, quest) function getJournalInformation(player, quest)
end end

View File

@ -135,7 +135,7 @@ function onPush(player, quest, npc)
player:EndEvent(); player:EndEvent();
if (npcClassId == PRIVATE_AREA_ENTRANCE) then if (npcClassId == PRIVATE_AREA_ENTRANCE) then
--TO-DO: Fill in the # below for the privateArea when it's made --TO-DO: Fill in the # below for the privateArea when it's made
--GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", #, -206.712, 195.148, 151.064, 1.821); GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 5, -206.712, 195.148, 151.064, 1.821);
end end
end end