mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-24 19:38:26 +02:00
Fixed bug in Hearing Confessions. Added Letting Out Orions Belt and Sniff Out a Profit. The former still needs the correct attention message though when talking to a NPC.
This commit is contained in:
parent
c9f18f5415
commit
59f4e4bbd5
3 changed files with 258 additions and 1 deletions
93
Data/scripts/quests/wld/wld0l4.lua
Normal file
93
Data/scripts/quests/wld/wld0l4.lua
Normal file
|
@ -0,0 +1,93 @@
|
|||
require ("global")
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Sniffing Out a Profit
|
||||
Code: Wld0l4
|
||||
Id: 110774
|
||||
Prereq: Level 37, Any Class, Requires "Letting Out Orion's Belt"
|
||||
|
||||
]]
|
||||
|
||||
-- Sequence Numbers
|
||||
SEQ_000 = 0; -- Talk to Ryssfloh.
|
||||
SEQ_001 = 1; -- Talk to Faine.
|
||||
|
||||
-- Actor Class Ids
|
||||
AHLDSKYF = 1000332;
|
||||
FAINE = 1001608;
|
||||
|
||||
-- Quest Markers
|
||||
MRKR_FAINE = 11110301;
|
||||
MRKR_AHLDSKYF = 11110302;
|
||||
|
||||
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(AHLDSKYF, QFLAG_PLATE);
|
||||
end
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
quest:SetENpc(AHLDSKYF);
|
||||
quest:SetENpc(FAINE, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_001) then
|
||||
quest:SetENpc(FAINE);
|
||||
quest:SetENpc(AHLDSKYF, QFLAG_REWARD);
|
||||
end
|
||||
end
|
||||
|
||||
function onTalk(player, quest, npc, eventName)
|
||||
local npcClassId = npc.GetActorClassId();
|
||||
local seq = quest:GetSequence();
|
||||
|
||||
-- Offer the quest
|
||||
if (npcClassId == AHLDSKYF and not player:HasQuest(quest)) then
|
||||
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventAhldskyffStart");
|
||||
if (questAccepted == 1) then
|
||||
player:AcceptQuest(quest);
|
||||
end
|
||||
player:EndEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
-- Quest Progress
|
||||
if (seq == SEQ_000) then
|
||||
if (npcClassId == AHLDSKYF) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent000");
|
||||
elseif (npcClassId == FAINE) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent005");
|
||||
quest:StartSequence(SEQ_001);
|
||||
end
|
||||
elseif (seq == SEQ_001) then
|
||||
--Quest Complete
|
||||
if (npcClassId == AHLDSKYF) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
|
||||
player:CompleteQuest(quest);
|
||||
elseif (npcClassId == FAINE) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2");
|
||||
quest:StartSequence(SEQ_001);
|
||||
end
|
||||
end
|
||||
|
||||
quest:UpdateENPCs();
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function getJournalMapMarkerList(player, quest)
|
||||
local sequence = quest:getSequence();
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
return MRKR_FAINE;
|
||||
elseif (sequence == SEQ_001) then
|
||||
return MRKR_AHLDSKYF;
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue