1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-21 20:27:47 +00:00

Added the other two Shposhae quests; A Slippery Stone and Cutthroat Prices. Also modified the PopFlyingShip script to move the quest along.

This commit is contained in:
Filip Maj 2022-04-02 13:34:32 -04:00
parent 514610f006
commit a5a039ce3d
3 changed files with 246 additions and 0 deletions

View file

@ -18,7 +18,51 @@ end
function onEventStarted(player, npc, triggerName)
-- Special case for A Slippery Stone and Cutthroat Prices
if (player:HasQuest(110737) == true) then
require ("quests/etc/etc3g3");
local quest = player:GetQuest("Etc3g3");
if (quest:GetSequence() == SEQ_000) then
local choice = callClientFunction(player, "delegateEvent", player, quest, "processEvent_005");
if (choice == 1) then
quest:StartSequence(SEQ_001);
addPlayerToAirship(player, 2);
end
player:EndEvent();
return;
end
elseif (player:HasQuest(110728) == true) then
require ("quests/etc/etc3u3");
local quest = player:GetQuest("Etc3u3");
if (quest:GetSequence() == SEQ_000) then
local choice = callClientFunction(player, "delegateEvent", player, quest, "processEvent_005");
if (choice == 1) then
quest:StartSequence(SEQ_001);
addPlayerToAirship(player, 3);
end
player:EndEvent();
return;
end
end
-- Otherwise normal operation
callClientFunction(player, "eventIn", player, false, nil, 5);
player:EndEvent();
end
function addPlayerToAirship(player, city)
if (city == 1) then
-- Limsa Airship
GetWorldManager():WarpToPosition(player, -764.519, -3.146, 384.154, 1.575);
--GetWorldManager():AddPlayerToShipList(player, 2);
elseif (city == 2) then
-- Gridania Airship
GetWorldManager():WarpToPosition(player, 54.47, -7, -1198.54, -0.02);
--GetWorldManager():AddPlayerToShipList(player, 3);
elseif (city == 3) then
-- Ul'dah Airship
GetWorldManager():WarpToPosition(player, -126.580, 271.2, 156.435, -1.35);
--GetWorldManager():AddPlayerToShipList(player, 4);
end
end

View file

@ -0,0 +1,101 @@
require ("global")
--[[
Quest Script
Name: A Slippery Stone
Code: Etc3g3
Id: 110737
Prereq: Level 15, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to Lionnellais.
SEQ_001 = 1; -- Talk to Hasthwab.
-- Actor Class Ids
MIOUNNE = 1000230;
LIONNELLAIS = 1500055;
HASTHWAB = 1001064;
-- Quest Markers
MRKR_LIONNELLAIS = 11080301;
MRKR_HATHWAB = 11080302;
-- Quest Misc
AIRSHIP_PASS_ITEMID = 11000208;
function onStart(player, quest)
player:SendGameMessage(GetWorldMaster(), 25117, 0x20, AIRSHIP_PASS_ITEMID); -- You obtain a Airship Pass (GRD-LMS).
quest:StartSequence(SEQ_000);
end
function onFinish(player, quest)
end
function onStateChange(player, quest, sequence)
if (sequence == SEQ_ACCEPT) then
quest:SetENpc(MIOUNNE, QFLAG_PLATE);
end
if (sequence == SEQ_000) then
quest:SetENpc(LIONNELLAIS, QFLAG_PLATE);
quest:SetENpc(MIOUNNE);
elseif (sequence == SEQ_001) then
quest:SetENpc(HASTHWAB, QFLAG_REWARD);
quest:SetENpc(LIONNELLAIS);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == MIOUNNE and not player:HasQuest(quest)) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventMIOUNNEStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
end
-- Quest Progress
if (seq == SEQ_000) then
if (npcClassId == LIONNELLAIS) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005");
quest:StartSequence(SEQ_001);
elseif (npcClassId == MIOUNNE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_000");
end
elseif (seq == SEQ_001) then
--Quest Complete
if (npcClassId == HASTHWAB) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
elseif (npcClassId == LIONNELLAIS) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_01");
end
end
quest:UpdateENPCs();
player:EndEvent();
end
function getJournalInformation(player, quest)
return quest:GetSequence() == SEQ_000 and 1 or 0;
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_LIONNELLAIS;
elseif (sequence == SEQ_001) then
return MRKR_HATHWAB;
end
end

View file

@ -0,0 +1,101 @@
require ("global")
--[[
Quest Script
Name: Cutthroat Prices
Code: Etc3u3
Id: 110728
Prereq: Level 15, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to Stangyth.
SEQ_001 = 1; -- Talk to Hasthwab.
-- Actor Class Ids
MOMODI = 1000841;
STANGYTH = 1500208;
HASTHWAB = 1001064;
-- Quest Markers
MRKR_STANGYTH = 11090301;
MRKR_HATHWAB = 11090302;
-- Quest Misc
AIRSHIP_PASS_ITEMID = 11000209;
function onStart(player, quest)
player:SendGameMessage(GetWorldMaster(), 25117, 0x20, AIRSHIP_PASS_ITEMID); -- You obtain a Airship Pass (ULD-LMS).
quest:StartSequence(SEQ_000);
end
function onFinish(player, quest)
end
function onStateChange(player, quest, sequence)
if (sequence == SEQ_ACCEPT) then
quest:SetENpc(MOMODI, QFLAG_PLATE);
end
if (sequence == SEQ_000) then
quest:SetENpc(STANGYTH, QFLAG_PLATE);
quest:SetENpc(MOMODI);
elseif (sequence == SEQ_001) then
quest:SetENpc(HASTHWAB, QFLAG_REWARD);
quest:SetENpc(STANGYTH);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == MOMODI and not player:HasQuest(quest)) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventMIOUNNEStart"); -- Not a typo, SE's error copy/pasting tsk tsk.
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
end
-- Quest Progress
if (seq == SEQ_000) then
if (npcClassId == STANGYTH) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005");
quest:StartSequence(SEQ_001);
elseif (npcClassId == MOMODI) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_000");
end
elseif (seq == SEQ_001) then
--Quest Complete
if (npcClassId == HASTHWAB) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
elseif (npcClassId == STANGYTH) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_005_01");
end
end
quest:UpdateENPCs();
player:EndEvent();
end
function getJournalInformation(player, quest)
return quest:GetSequence() == SEQ_000 and 1 or 0;
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_STANGYTH;
elseif (sequence == SEQ_001) then
return MRKR_HATHWAB;
end
end