mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
DftFst: Added a param handling to Kinnison on DftFst since it'd crash the client otherwise.
Etc3g0: Polished up the script, made it as authentic to retail as I could get it barring reward hand-out and starting the quest Etc5g0: Ported the quest over from the old scripting setup. Man0u1: Still very early wip.
This commit is contained in:
parent
4fe8f77887
commit
acf953e909
4 changed files with 181 additions and 63 deletions
|
@ -1,21 +1,103 @@
|
|||
--Quest Flags
|
||||
TALKED_PFARAHR = 0;
|
||||
require("global");
|
||||
|
||||
function canAcceptQuest(player)
|
||||
return (player:HasQuest("etc5g0") == false and player:IsQuestCompleted("Etc5g0") == false and player:GetHighestLevel() >= 1);
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Waste Not Want Not
|
||||
Code: Etc5g0
|
||||
Id: 110828
|
||||
Prereq: Level 1 on any class. Second MSQ completed. (110002 Man0l1 / 110006 Man0g1 / 110010 Man0u1)
|
||||
Notes: Rewards 200 gil
|
||||
|
||||
]]
|
||||
|
||||
-- Sequence Numbers
|
||||
SEQ_000 = 0; -- Talk to Pfarahr
|
||||
SEQ_001 = 1; -- Return to V'korolon
|
||||
|
||||
-- Actor Class Ids
|
||||
VKOROLON = 1000458;
|
||||
PFARAHR = 1001707;
|
||||
|
||||
-- Quest Item
|
||||
ITEM_WELL_WORN_BAG = 11000224;
|
||||
|
||||
-- Quest Markers
|
||||
MRKR_PFARAHR = 11082001;
|
||||
MRKR_VKOROLON = 11082002;
|
||||
|
||||
|
||||
|
||||
function onStart(player, quest)
|
||||
-- processEventVKOROLONStart -- No means of properly accepting quests yet
|
||||
quest:StartSequence(SEQ_000);
|
||||
player:SendGameMessage(GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM, ITEM_WELL_WORN_BAG, 1);
|
||||
end
|
||||
|
||||
function isObjectivesComplete(player, quest)
|
||||
return (quest:GetPhase() == 2);
|
||||
function onFinish(player, quest)
|
||||
end
|
||||
|
||||
function onAbandonQuest(player, quest)
|
||||
vkorolon = GetWorldManager():GetActorInWorldByUniqueId("vkorolon");
|
||||
pfarahr = GetWorldManager():GetActorInWorldByUniqueId("pfarahr");
|
||||
if (vkorolon ~= nil and canAcceptQuest(player)) then
|
||||
vkorolon:SetQuestGraphic(player, 0x2);
|
||||
end
|
||||
if (pfarahr ~= nil) then
|
||||
pfarahr:SetQuestGraphic(player, 0x0);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function onSequence(player, quest, sequence)
|
||||
if (sequence == SEQ_000) then
|
||||
quest:AddENpc(VKOROLON);
|
||||
quest:AddENpc(PFARAHR, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_001) then
|
||||
quest:AddENpc(VKOROLON, QFLAG_PLATE);
|
||||
quest:AddENpc(PFARAHR);
|
||||
end
|
||||
end
|
||||
|
||||
function onTalk(player, quest, npc)
|
||||
local sequence = quest:getSequence();
|
||||
local classId = npc:GetActorClassId();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
if (classId == VKOROLON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1");
|
||||
elseif (classId == PFARAHR) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010");
|
||||
quest:StartSequence(SEQ_001);
|
||||
quest:DoComplete(); -- Need ref since it feels out of place. Just placing it here since original script had it.
|
||||
end
|
||||
|
||||
elseif (sequence == SEQ_001) then
|
||||
if (classId == VKOROLON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent_020");
|
||||
--callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1); -- Reward window, shouldn't be handled by quest script
|
||||
player:CompleteQuest(quest:GetQuestId());
|
||||
elseif (classId == PFARAHR) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_1");
|
||||
end
|
||||
end
|
||||
player:EndEvent()
|
||||
quest:UpdateENPCs();
|
||||
end
|
||||
|
||||
|
||||
function getJournalInformation(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
return ITEM_WELL_WORN_BAG;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function getJournalMapMarkerList(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
local possibleMarkers = {};
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
table.insert(possibleMarkers, MRKR_PFARAHR);
|
||||
elseif (sequence == SEQ_001) then
|
||||
table.insert(possibleMarkers, MRKR_VKOROLON);
|
||||
end
|
||||
|
||||
return unpack(possibleMarkers)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue