mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Quests + Minor fixes
MarketEntrance - Adjusted events parameter so it works again Warp - Added shortcut for switching between a given town's zones so I can stop having to look up the right zone id Weather - Added shortcut for weather ids to +8000 to the value if the're within a certain range. DftSea - Inn NPC check etc5u0 - Used a constant in place of a value, updated a constant's name. etc5l0 - Fully scripted. etc5u1 - Mostly scripted. Requires Dream handling and privArea + NPC placement. etc5g1 - Mostly scripted. Requires Dream handling and privArea + NPC placement.
This commit is contained in:
104
Data/scripts/quests/etc/etc5l0.lua
Normal file
104
Data/scripts/quests/etc/etc5l0.lua
Normal file
@@ -0,0 +1,104 @@
|
||||
require("global");
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: The Ink Thief
|
||||
Code: Etc5l0
|
||||
Id: 110838
|
||||
Prereq: Level 1 on any class. Second MSQ completed. (110002 Man0l1 / 110006 Man0g1 / 110010 Man0u1)
|
||||
Notes:
|
||||
|
||||
]]
|
||||
|
||||
-- Sequence Numbers
|
||||
SEQ_000 = 0; -- Talk to Sweetnix.
|
||||
SEQ_001 = 1; -- Return to Mytesyn.
|
||||
|
||||
-- Actor Class Ids
|
||||
MYTESYN = 1000167;
|
||||
SWEETNIX = 1001573;
|
||||
|
||||
-- Quest Item
|
||||
ITEM_INKWELL = 11000223;
|
||||
|
||||
-- Quest Markers
|
||||
MRKR_SWEETNIX = 11072001;
|
||||
MRKR_MYTESYN = 11072002;
|
||||
|
||||
|
||||
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(MYTESYN, QFLAG_NORM);
|
||||
end
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
quest:SetENpc(MYTESYN);
|
||||
quest:SetENpc(SWEETNIX, QFLAG_NORM);
|
||||
elseif (sequence == SEQ_001) then
|
||||
quest:SetENpc(MYTESYN, QFLAG_REWARD);
|
||||
quest:SetENpc(SWEETNIX);
|
||||
end
|
||||
end
|
||||
|
||||
function onTalk(player, quest, npc)
|
||||
local sequence = quest:getSequence();
|
||||
local npcClassId = npc:GetActorClassId();
|
||||
|
||||
if (sequence == SEQ_ACCEPT) then
|
||||
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventMYTESYNStart");
|
||||
if (questAccepted == 1) then
|
||||
player:AcceptQuest(quest);
|
||||
end
|
||||
player:EndEvent();
|
||||
return;
|
||||
elseif (sequence == SEQ_000) then
|
||||
if (npcClassId == MYTESYN) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1");
|
||||
elseif (npcClassId == SWEETNIX) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010");
|
||||
attentionMessage(player, 25246, ITEM_INKWELL, 1);
|
||||
attentionMessage(player, 25225, quest:GetQuestId());
|
||||
quest:StartSequence(SEQ_001);
|
||||
end
|
||||
|
||||
elseif (sequence == SEQ_001) then
|
||||
if (npcClassId == MYTESYN) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent_020");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200,1 ,1)
|
||||
player:CompleteQuest(quest);
|
||||
elseif (npcClassId == SWEETNIX) 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_001) then
|
||||
return ITEM_INKWELL;
|
||||
end
|
||||
end
|
||||
|
||||
function getJournalMapMarkerList(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
return MRKR_SWEETNIX;
|
||||
elseif (sequence == SEQ_001) then
|
||||
return MRKR_MYTESYN;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user