Merge remote-tracking branch 'origin/ioncannon/quest_system' into Jorge/quest_system

# Conflicts:
#	Data/scripts/commands/EmoteStandardCommand.lua
#	Data/scripts/quests/man/man0g0.lua
#	Data/scripts/quests/man/man0g1.lua
#	Data/scripts/quests/man/man0u0.lua

Resolved using Theirs.
This commit is contained in:
CuriousJorge 2022-03-04 21:04:17 -05:00
commit 02fe9e070d
182 changed files with 3871 additions and 1332 deletions

View File

@ -0,0 +1,9 @@
require("global");
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, eventType, eventName)
player:EndEvent();
end

View File

@ -1,5 +1,5 @@
require ("global") require ("global")
function init(npc) function init(npc)
return false, false, 0, 0, 5143, 326; return false, false, 0, 0, 0, 0;
end end

View File

@ -1,5 +1,95 @@
require ("global") require ("global")
function init(npc) --[[
return false, false, 0, 0;
Elevator Standard Script
Functions:
elevatorAskLimsa001(eventNum) - Shows the ask dialog, and plays the event cutscenes for the Crow's Head Lift Lvl 1.
elevatorAskLimsa002(eventNum) - Shows the ask dialog, and plays the event cutscenes for the Crow's Head Lift Lvl 2.
elevatorAskLimsa003(eventNum) - Shows the ask dialog, and plays the event cutscenes for the Crow's Head Lift Lvl 3.
elevatorAskUldah001(eventNum) - Shows the ask dialog, and plays the event cutscenes for the Wellhead Lift Lvl 1.
elevatorAskUldah002(eventNum) - Shows the ask dialog, and plays the event cutscenes for the Wellhead Lift Lvl 2.
elevatorAskUldah003(eventNum) - Shows the ask dialog, and plays the event cutscenes for the Wellhead Lift Lvl 3.
elevatorQuestAskEvent(questId) - Special quest related elevator dialog.
Notes:
Script to control the elevators in Limsa Lominsa and Ul'dah. Each elevator entrance has a specific event for it's floor.
The only param is used to either show the ask dialog to the player or player the appropriate cutscene given the choice
made.
--]]
function onEventStarted(player, npc, eventType, eventName)
local actorClassId = npc.GetActorClassId();
-- Limsa; Crow's Lift Level 1
if (actorClassId == 1290007) then
local floorChoice = callClientFunction(player, "elevatorAskLimsa001", 0);
if (floorChoice == 1) then
callClientFunction(player, "elevatorAskLimsa001", 1);
endEventAndWarp(player, 133, -447, 40, 220, -1.574);
elseif (floorChoice == 2) then
callClientFunction(player, "elevatorAskLimsa001", 2);
endEventAndWarp(player, 133, -458, 92, 175, -0.383);
end
-- Limsa; Crow's Lift Level 2
elseif (actorClassId == 1290008) then
local floorChoice = callClientFunction(player, "elevatorAskLimsa002", 0);
if (floorChoice == 1) then
callClientFunction(player, "elevatorAskLimsa002", 1);
endEventAndWarp(player, 133, -447, 19, 220, -1.574);
elseif (floorChoice == 2) then
callClientFunction(player, "elevatorAskLimsa002", 2);
endEventAndWarp(player, 133, -458, 92, 175, -0.383);
end
-- Limsa; Crow's Lift Level 3
elseif (actorClassId == 1290009) then
local floorChoice = callClientFunction(player, "elevatorAskLimsa003", 0);
if (floorChoice == 1) then
callClientFunction(player, "elevatorAskLimsa003", 1);
endEventAndWarp(player, 133, -447, 19, 220, -1.574);
elseif (floorChoice == 2) then
callClientFunction(player, "elevatorAskLimsa003", 2);
endEventAndWarp(player, 133, -447, 40, 220, -1.574);
end
-- Ul'dah; Wellhead Lift Level 1
elseif (actorClassId == 1090460) then
local floorChoice = callClientFunction(player, "elevatorAskUldah001", 0);
if (floorChoice == 1) then
callClientFunction(player, "elevatorAskUldah001", 1);
endEventAndWarp(player, 209, -116.78, 222, 115.7, 2.85);
elseif (floorChoice == 2) then
callClientFunction(player, "elevatorAskUldah001", 2);
endEventAndWarp(player, 209, -121.60, 269.8, 135.28, -0.268);
end
-- Ul'dah; Wellhead Lift Level 2
elseif (actorClassId == 1090461) then
local floorChoice = callClientFunction(player, "elevatorAskUldah002", 0);
if (floorChoice == 1) then
callClientFunction(player, "elevatorAskUldah002", 1);
endEventAndWarp(player, 175, -116.78, 198, 115.7, -2.8911);
elseif (floorChoice == 2) then
callClientFunction(player, "elevatorAskUldah002", 2);
endEventAndWarp(player, 209, -121.60, 269.8, 135.28, -0.268);
end
-- Ul'dah; Wellhead Lift Level 3
elseif (actorClassId == 1090462) then
local floorChoice = callClientFunction(player, "elevatorAskUldah003", 0);
if (floorChoice == 1) then
callClientFunction(player, "elevatorAskUldah003", 1);
endEventAndWarp(player, 175, -116.78, 198, 115.7, -2.8911);
elseif (floorChoice == 2) then
callClientFunction(player, "elevatorAskUldah003", 2);
endEventAndWarp(player, 209, -116.78, 222, 115.7, 2.85);
end
end
end
function endEventAndWarp(player, zoneId, x, y, z, rotation)
player:EndEvent();
GetWorldManager():DoZoneChange(player, zoneId, nil, 0, 15, x, y, z, rotation);
end end

View File

@ -1,3 +1,5 @@
require("global");
function init(npc) function init(npc)
return false, false, 0, 0; return false, false, 0, 0;
end end
@ -7,7 +9,7 @@ function onEventStarted(player, npc, triggerName)
worldMaster = GetWorldMaster(); worldMaster = GetWorldMaster();
player:SendGameMessage(player, worldMaster, 34109, 0x20); player:SendGameMessage(player, worldMaster, 34109, 0x20);
elseif (triggerName == "exit") then elseif (triggerName == "exit") then
GetWorldManager():DoPlayerMoveInZone(player, 5); GetWorldManager():DoPlayerMoveInZone(player, 356.09, 3.74, -701.62, -1.4);
end end
player:EndEvent(); player:EndEvent();
end end

View File

@ -0,0 +1,9 @@
require("global");
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, eventType, eventName)
player:EndEvent();
end

View File

@ -0,0 +1,18 @@
require("global");
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, eventType, eventName)
if (eventType == ETYPE_PUSH) then
if (eventName == "caution") then
worldMaster = GetWorldMaster();
player:SendGameMessage(player, worldMaster, 34109, 0x20);
elseif (eventName == "exit") then
GetWorldManager():DoPlayerMoveInZone(player, 5.36433, 196, 133.656, -2.84938);
end
end
player:EndEvent();
end

View File

@ -2,11 +2,16 @@ function init(npc)
return false, false, 0, 0; return false, false, 0, 0;
end end
function onEventStarted(player, npc, triggerName) function onEventStarted(player, npc, eventType, eventName)
if (triggerName == "caution") then
worldMaster = GetWorldMaster();
player:SendGameMessage(player, worldMaster, 34109, 0x20);
elseif (triggerName == "exit") then
end
player:EndEvent(); player:EndEvent();
if (eventName == "caution") then
player:SendGameMessage(player, GetWorldMaster(), 34109, 0x20);
elseif (eventName == "exit") then
local activeQuests = player:GetQuestsForNpc(npc);
print(tostring(#activeQuests));
if (#activeQuests >= 1) then
activeQuests[1]:OnPush(player, npc, eventName);
end
end
end end

View File

@ -41,6 +41,20 @@ function onEventStarted(player, aetheryte, triggerName)
callClientFunction(player, "delegateEvent", player, quest, "processEvent025"); callClientFunction(player, "delegateEvent", player, quest, "processEvent025");
quest:StartSequence(SEQ_005); quest:StartSequence(SEQ_005);
end end
elseif (player:HasQuest(110006) == true) then
require ("quests/man/man0g1");
local quest = player:GetQuest("Man0g1");
if (quest:GetSequence() == SEQ_005) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent013");
--quest:StartSequence(???);
end
elseif (player:HasQuest(110010) == true) then
require ("quests/man/man0u1");
local quest = player:GetQuest("Man0u1");
if (quest:GetSequence() == SEQ_005) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent013");
quest:StartSequence(SEQ_010);
end
end end
if (player:GetGuildleveDirector() ~= nil) then if (player:GetGuildleveDirector() ~= nil) then

View File

@ -22,43 +22,53 @@ function init(npc)
end end
function onEventStarted(player, npc, eventType, eventName) function onEventStarted(player, npc, eventType, eventName)
local defaultTalk = player:GetDefaultTalkQuest(npc);
local tutorialTalk = player:GetTutorialQuest(npc);
local activeQuests = player:GetQuestsForNpc(npc);
local possibleQuests = {};
-- Create the switch table for this npc
if (defaultTalk ~= nil and eventType == ETYPE_TALK) then
table.insert(possibleQuests, defaultTalk);
end
if (tutorialTalk ~= nil and eventType == ETYPE_TALK) then
table.insert(possibleQuests, tutorialTalk);
end
if (activeQuests ~= nil) then
table.insert(possibleQuests, unpack(activeQuests));
end
-- Either let the player choose the quest or start it if it's the only one.
local chosenQuest = nil; local chosenQuest = nil;
if (#possibleQuests > 1) then
local currentPage = 0;
local numPages = math.floor((#possibleQuests-1)/4) + 1;
while (true) do if (eventType == 1) then
local page, index = callClientFunction(player, "switchEvent", possibleQuests[currentPage * 4 + 1], possibleQuests[currentPage * 4 + 2], possibleQuests[currentPage * 4 + 3], possibleQuests[currentPage * 4 + 4], currentPage + 1, numPages, 0x3F1); local defaultTalk = player:GetDefaultTalkQuest(npc);
local tutorialTalk = player:GetTutorialQuest(npc);
local activeQuests = player:GetQuestsForNpc(npc);
local possibleQuests = {};
if (page == 0) then -- Create the switch table for this npc
chosenQuest = possibleQuests[(currentPage * 4) + index]; if (defaultTalk ~= nil and eventType == ETYPE_TALK) then
break; table.insert(possibleQuests, defaultTalk);
elseif (page > 0) then end
currentPage = page - 1; if (tutorialTalk ~= nil and eventType == ETYPE_TALK) then
else table.insert(possibleQuests, tutorialTalk);
player:EndEvent(); end
return; if (activeQuests ~= nil) then
for i=1,#activeQuests do
table.insert(possibleQuests, activeQuests[i]);
end end
end end
elseif (#possibleQuests == 1) then
chosenQuest = possibleQuests[1]; -- Either let the player choose the quest or start it if it's the only one.
if (#possibleQuests > 1) then
local currentPage = 0;
local numPages = math.floor((#possibleQuests-1)/4) + 1;
while (true) do
local page, index = callClientFunction(player, "switchEvent", possibleQuests[currentPage * 4 + 1], possibleQuests[currentPage * 4 + 2], possibleQuests[currentPage * 4 + 3], possibleQuests[currentPage * 4 + 4], currentPage + 1, numPages, 0x3F1);
if (page == 0) then
chosenQuest = possibleQuests[(currentPage * 4) + index];
break;
elseif (page > 0) then
currentPage = page - 1;
else
player:EndEvent();
return;
end
end
elseif (#possibleQuests == 1) then
chosenQuest = possibleQuests[1];
end
else
local activeQuests = player:GetQuestsForNpc(npc);
if (#activeQuests != 0) then
chosenQuest = activeQuests[1];
end
end end
-- Run the quest event or tell the devs it's missing. -- Run the quest event or tell the devs it's missing.

View File

@ -0,0 +1,17 @@
--[[
InstanceRaidGuide Script
Functions;
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, eventType, eventName)
player:EndEvent();
end

View File

@ -66,7 +66,7 @@ emoteTable = {
}; };
function onEventStarted(player, actor, eventType, eventName, emoteId, showText, arg2, arg3, targetId) function onEventStarted(player, actor, eventType, triggerName, emoteId, showText, arg2, arg3, targetId)
if (targetId == nil) then if (targetId == nil) then
targetId = 0; targetId = 0;

View File

@ -8,7 +8,7 @@ Notes:
--]] --]]
require("global") require("global")
function onEventStarted(player, actor, triggerName, pushCommand, unk1, unk2, unk3, ownerActorId, unk4, unk5, unk6, unk7) function onEventStarted(player, actor, eventType, eventName, pushCommand, unk1, unk2, unk3, ownerActorId, unk4, unk5, unk6, unk7)
actor = player:GetActorInInstance(ownerActorId); actor = player:GetActorInInstance(ownerActorId);
print("TESSSSSSSSSSSSSST"); print("TESSSSSSSSSSSSSST");
@ -17,7 +17,7 @@ function onEventStarted(player, actor, triggerName, pushCommand, unk1, unk2, unk
if (actor:GetActorClassId() == 1200052) then if (actor:GetActorClassId() == 1200052) then
player:KickEventSpecial(harvestCommand, 0, "commandJudgeMode", 0, 0, 0, 0, 0x4E26, 0, nil, 0xF, actor, nil, nil, nil, nil); player:KickEventSpecial(harvestCommand, 0, "commandJudgeMode", 0, 0, 0, 0, 0x4E26, 0, nil, 0xF, actor, nil, nil, nil, nil);
else else
--player:kickEvent(actor, "pushCommand", false); player:kickEvent(actor, "pushCommand", false);
end end
else else
player:endEvent(); player:endEvent();

View File

@ -26,8 +26,8 @@ function onTrigger(player, argc, qty, name, lastName)
currency = 1000001; currency = 1000001;
qty = tonumber(qty) or 1; qty = tonumber(qty) or 1;
location = INVENTORY_CURRENCY; location = INVENTORY_CURRENCY;
print("ASDASDASDASDASD");
actionList = player:AddExp(qty, player.charaWork.parameterSave.state_mainSkill[0], 0); actionList = player:AddExp(qty, player.charaWork.parameterSave.state_mainSkill[1], 0);
player:DoBattleAction(0, 0, actionList); player:DoBattleAction(0, 0, actionList);
else else
print(sender.."unable to add experience, ensure player name is valid."); print(sender.."unable to add experience, ensure player name is valid.");

View File

@ -6,17 +6,17 @@ properties = {
description = "" description = ""
} }
function onTrigger(player, argc, animation, regionId, layoutId, maxLayoutId) function onTrigger(player, argc, animation, layoutId, instanceId, maxInstanceId)
layoutId = tonumber(layoutId); instanceId = tonumber(instanceId);
if (maxLayoutId ~= nil) then if (maxInstanceId ~= nil) then
maxLayoutId = tonumber(maxLayoutId); maxInstanceId = tonumber(maxInstanceId);
else else
maxLayoutId = layoutId; maxInstanceId = instanceId;
end end
actorClassId = 5900001; actorClassId = 5900001;
while (layoutId <= maxLayoutId) do while (instanceId <= maxInstanceId) do
if (actorClassId == nil) then if (actorClassId == nil) then
player:SendMessage(0x20, "", "No actor class id provided."); player:SendMessage(0x20, "", "No actor class id provided.");
return; return;
@ -32,16 +32,16 @@ function onTrigger(player, argc, animation, regionId, layoutId, maxLayoutId)
if (actorClassId ~= nil) then if (actorClassId ~= nil) then
zone = player.CurrentArea; zone = player.CurrentArea;
actor = zone:SpawnActor(actorClassId, "mapobj", pos[1], pos[2], pos[3], tonumber(regionId), tonumber(layoutId)); actor = zone:SpawnActor(actorClassId, "mapobj", pos[1], pos[2], pos[3], tonumber(layoutId), tonumber(instanceId));
print("test"); print("test");
wait(0.8); wait(2);
actor:PlayMapObjAnimation(player, animation); actor:PlayMapObjAnimation(player, animation);
zone:DespawnActor("mapobj"); zone:DespawnActor("mapobj");
wait(0.5); wait(0.5);
player:SendMessage(0x20, "", "Layout ID: "..layoutId); player:SendMessage(0x20, "", "Playing animation for instance: " .. instanceId);
end end
layoutId=layoutId+1; instanceId = instanceId + 1;
end end
end; end;
--!testmapobj 5900001 421 2810 2820 --!testmapobj 5900001 421 2810 2820

View File

@ -21,33 +21,3 @@ end
function main() function main()
end end
function onTalkEvent(player, npc)
if (player:HasQuest(110001) == true) then
man0l0Quest = player:GetQuest("man0l0");
if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1) == true and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2) == true and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3) == true) then
doorNpc = GetWorldManager():GetActorInWorldByUniqueId("exit_door");
player:SetEventStatus(doorNpc, "pushDefault", true, 0x2);
doorNpc:SetQuestGraphic(player, 0x3);
end
elseif (player:HasQuest(110005) == true) then
man0g0Quest = player:GetQuest("man0g0");
if (man0g0Quest:GetQuestFlag(MAN0L0_FLAG_STARTED_TALK_TUT) == true and man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == false) then
papalymo = GetWorldManager():GetActorInWorldByUniqueId("papalymo");
papalymo:SetQuestGraphic(player, 0x2);
elseif (man0g0Quest:GetQuestFlag(MAN0L0_FLAG_STARTED_TALK_TUT) == true and man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then
yda = GetWorldManager():GetActorInWorldByUniqueId("yda");
yda:SetQuestGraphic(player, 0x2);
end
elseif (player:HasQuest(110009) == true) then
man0u0Quest = player:GetQuest("man0u0");
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == true and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == true and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == true) then
exitTriggerNpc = GetWorldManager():GetActorInWorldByUniqueId("exit_trigger");
player:SetEventStatus(exitTriggerNpc, "pushDefault", true, 0x2);
exitTriggerNpc:SetQuestGraphic(player, 0x2);
end
end
end

View File

@ -0,0 +1,29 @@
require ("global")
require ("quests/man/man0l1")
function init()
return "/Director/Quest/QuestDirectorMan0l101";
end
function onCreateContentArea(players, director, contentArea, contentGroup)
sisipu = contentArea:SpawnActor(2290007, "sisipu", -49, 36.43, 162, 2.2);
for _, player in pairs(players) do
contentGroup:AddMember(player);
end;
contentGroup:AddMember(director);
contentGroup:AddMember(sisipu);
end
function onEventStarted(player, director, triggerName)
player:EndEvent();
end
function main()
end

View File

@ -159,6 +159,10 @@ QFLAG_PLATE = 2;
QFLAG_MAP = 3; QFLAG_MAP = 3;
QFLAG_REWARD = 4; QFLAG_REWARD = 4;
-- SPECIAL SEQUENCE CONSTANTS
SEQ_ACCEPT = 65535;
SEQ_COMPLETE = 65534;
-- MUSIC -- MUSIC
MUSIC_IMMEDIATE = 1; MUSIC_IMMEDIATE = 1;
MUSIC_CROSSFADE = 2; MUSIC_CROSSFADE = 2;

View File

@ -0,0 +1,104 @@
require ("global")
--[[
Quest Script
Name: The Search for Sicksa
Code: Etc1g5
Id: 110659
Prereq: Level 10, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Kill Bristletail Marmots.
SEQ_001 = 1; -- Talk to Beli.
-- Actor Class Ids
ENPC_BELI = 1001077;
BNPC_BRISTLETAIL_MARMOT = 2104022;
-- Quest Markers
MRKR_BRISTLETAIL_AREA = 11065901;
MRKR_BELI = 11065902;
-- Counters
COUNTER_MARMOTHIDE = 0;
-- Quest Details
OBJECTIVE_MARMOTHIDE = 8;
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(ENPC_BELI, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_BELI);
quest:SetENpc(BNPC_BRISTLETAIL_MARMOT);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_BELI, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_BELI and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventLahonoStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_BELI) then
callClientFunction(player, "delegateEvent", player, quest, "processEventFree");
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_BELI) then
callClientFunction(player, "delegateEvent", player, quest, "processEventAfter");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_BRISTLETAIL_MARMOT) then
local counterAmount = quest:GetData():IncCounter(COUNTER_MARMOTHIDE);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
if (counterAmount >= OBJECTIVE_MARMOTHIDE) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_MARMOTHIDE);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_BRISTLETAIL_AREA;
elseif (sequence == SEQ_001) then
return MRKR_BELI;
end
end

View File

@ -0,0 +1,104 @@
require ("global")
--[[
Quest Script
Name: Assessing the Damage
Code: Etc1l0
Id: 110633
Prereq: Level 20, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Kill Toll Puks.
SEQ_001 = 1; -- Talk to HALDBERK.
-- Actor Class Ids
ENPC_HALDBERK = 1000160;
BNPC_JETSAM_JELLIES = 2105409;
-- Quest Markers
MRKR_JELLIES_AREA = 11063301;
MRKR_HALDBERK = 11063302;
-- Counters
COUNTER_RINGS = 0;
-- Quest Details
OBJECTIVE_RINGS = 8;
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(ENPC_HALDBERK, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_HALDBERK);
quest:SetENpc(BNPC_JETSAM_JELLIES);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_HALDBERK, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_HALDBERK and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventHaldberkStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_HALDBERK) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000");
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_HALDBERK) then
callClientFunction(player, "delegateEvent", player, quest, "Etc1l0.processEvent010");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_JETSAM_JELLIES) then
local counterAmount = quest:GetData():IncCounter(COUNTER_RINGS);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
if (counterAmount >= OBJECTIVE_RINGS) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_RINGS);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_JELLIES_AREA;
elseif (sequence == SEQ_001) then
return MRKR_HALDBERK;
end
end

View File

@ -0,0 +1,104 @@
require ("global")
--[[
Quest Script
Name: Bridging the Gap
Code: Etc1l1
Id: 110634
Prereq: Level 10, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Kill Toll Puks.
SEQ_001 = 1; -- Talk to Hihine.
-- Actor Class Ids
ENPC_HIHINE = 1000267;
BNPC_TOLL_PUK = 2100113;
-- Quest Markers
MRKR_TOLLPUK_AREA = 11063401;
MRKR_HIHINE = 11063402;
-- Counters
COUNTER_KILLS = 0;
-- Quest Details
OBJECTIVE_KILLS = 8;
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(ENPC_HIHINE, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_HIHINE);
quest:SetENpc(BNPC_TOLL_PUK);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_HIHINE, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_HIHINE and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventHihineStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_HIHINE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2");
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_HIHINE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_TOLL_PUK) then
local counterAmount = quest:GetData():IncCounter(COUNTER_SLUMBERNUT);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
if (counterAmount >= OBJECTIVE_SLUMBERNUT) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_SLUMBERNUT);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_TOLLPUK_AREA;
elseif (sequence == SEQ_001) then
return MRKR_HIHINE;
end
end

View File

@ -0,0 +1,108 @@
require ("global")
--[[
Quest Script
Name: Revenge on the Reavers
Code: Etc1l3
Id: 110636
Prereq: Level 45, Any DoW/DoM
]]
-- Sequence Numbers
SEQ_000 = 0; -- Kill Reavers.
SEQ_001 = 1; -- Talk to Chaunollet.
-- Actor Class Ids
ENPC_CHAUNOLLET = 1000125;
BNPC_REAVER_CLAWS = 2180301;
BNPC_REAVER_FINS = 2180302;
BNPC_REAVER_EYES = 2180303;
-- Quest Markers
MRKR_REAVER_AREA = 11063601;
MRKR_CHAUNOLLET = 11063602;
-- Counters
COUNTER_QUESTITEM = 0;
-- Quest Details
OBJECTIVE_AMOUNT = 8;
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(ENPC_CHAUNOLLET, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_CHAUNOLLET);
quest:SetENpc(BNPC_REAVER_EYES);
quest:SetENpc(BNPC_REAVER_FINS);
quest:SetENpc(BNPC_REAVER_CLAWS);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_CHAUNOLLET, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_CHAUNOLLET and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventChaunolletStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_CHAUNOLLET) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000Chaunollet");
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_CHAUNOLLET) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010Chaunollet");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_REAVER_EYES or bnpc == BNPC_REAVER_FINS or bnpc == BNPC_REAVER_CLAWS) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
if (counterAmount >= OBJECTIVE_AMOUNT) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_QUESTITEM);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_REAVER_AREA;
elseif (sequence == SEQ_001) then
return MRKR_CHAUNOLLET;
end
end

View File

@ -0,0 +1,104 @@
require ("global")
--[[
Quest Script
Name: Till Death Do Us Part
Code: Etc1l5
Id: 110638
Prereq: Level 20, Any DoW/DoM
]]
-- Sequence Numbers
SEQ_000 = 0; -- Kill Musk Roselings.
SEQ_001 = 1; -- Talk to H'lahono.
-- Actor Class Ids
ENPC_HLAHONO = 1000250;
BNPC_MUSK_ROSELING = 2102717;
-- Quest Markers
MRKR_ROSELING_AREA = 11063801;
MRKR_HLAHONO = 11063802;
-- Counters
COUNTER_QUESTITEM = 0;
-- Quest Details
OBJECTIVE_AMOUNT = 8;
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(ENPC_HLAHONO, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_HLAHONO);
quest:SetENpc(BNPC_MUSK_ROSELING);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_HLAHONO, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_HLAHONO and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventLahonoStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_HLAHONO) then
callClientFunction(player, "delegateEvent", player, quest, "processEventFree");
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_HLAHONO) then
callClientFunction(player, "delegateEvent", player, quest, "processEventAfter");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_MUSK_ROSELING) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
if (counterAmount >= OBJECTIVE_AMOUNT) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_QUESTITEM);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_ROSELING_AREA;
elseif (sequence == SEQ_001) then
return MRKR_HLAHONO;
end
end

View File

@ -0,0 +1,104 @@
require ("global")
--[[
Quest Script
Name: Beryl Overboard
Code: Etc1l6
Id: 110639
Prereq: Level 20, Any DoW/DoM, Requires Etc1l5
]]
-- Sequence Numbers
SEQ_000 = 0; -- Kill Beryl Crabs.
SEQ_001 = 1; -- Talk to Nanapiri.
-- Actor Class Ids
ENPC_NANAPIRI = 1000136;
BNPC_BERYL_CRAB = 2107613;
-- Quest Markers
MRKR_CRAB_AREA = 11063901;
MRKR_NANAPIRI = 11063902;
-- Counters
COUNTER_QUESTITEM = 0;
-- Quest Details
OBJECTIVE_AMOUNT = 8;
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(ENPC_NANAPIRI, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_NANAPIRI);
quest:SetENpc(BNPC_BERYL_CRAB);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_NANAPIRI, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_NANAPIRI and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventNanapiriStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_NANAPIRI) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2");
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_NANAPIRI) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_BERYL_CRAB) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
if (counterAmount >= OBJECTIVE_AMOUNT) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_QUESTITEM);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_CRAB_AREA;
elseif (sequence == SEQ_001) then
return MRKR_NANAPIRI;
end
end

View File

@ -0,0 +1,133 @@
require ("global")
--[[
Quest Script
Name: Have You Seen My Son
Code: Etc1l7
Id: 110640
Prereq: Level 30, Any DoW/DoM
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to Yuyubesu.
SEQ_001 = 1; -- Kill Bomb Embers.
SEQ_002 = 2; -- Return to Yuyubesu.
SEQ_003 = 3; -- Talk to Hildie.
-- Actor Class Ids
ENPC_IMANIA = 1001567;
ENPC_YUYUBESU = 1001166;
ENPC_HILDIE = 1000787;
BNPC_BOMB_EMBER = 2101609;
-- Quest Markers
MRKR_YUYUBESU = 11064001;
MRKR_HILDIE = 11064002;
MRKR_BOMB_AREA = 11064003;
-- Counters
COUNTER_QUESTITEM = 0;
-- Quest Details
OBJECTIVE_AMOUNT = 8;
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(ENPC_IMANIA, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_IMANIA);
quest:SetENpc(ENPC_YUYUBESU, QFLAG_REWARD);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_YUYUBESU);
quest:SetENpc(BNPC_BOMB_EMBER);
elseif (sequence == SEQ_002) then
quest:SetENpc(ENPC_YUYUBESU, QFLAG_REWARD);
elseif (sequence == SEQ_003) then
quest:SetENpc(ENPC_YUYUBESU);
quest:SetENpc(ENPC_HILDIE, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_IMANIA and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventImaniaStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_IMANIA) then
callClientFunction(player, "delegateEvent", player, quest, "processEventImaniaFree");
elseif (npcClassId == ENPC_YUYUBESU) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000");
quest:StartSequence(SEQ_001);
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_YUYUBESU) then
callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuFree");
end
elseif (seq == SEQ_002) then
if (npcClassId == ENPC_YUYUBESU) then
callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuAfter");
quest:StartSequence(SEQ_003);
end
elseif (seq == SEQ_003) then
if (npcClassId == ENPC_YUYUBESU) then
callClientFunction(player, "delegateEvent", player, quest, "processEventYuyubesuAfterFree");
elseif (npcClassId == ENPC_HILDIE) then
callClientFunction(player, "delegateEvent", player, quest, "processEventHildie");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_BOMB_EMBER) then
local counterAmount = quest:GetData():IncCounter(COUNTER_QUESTITEM);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
if (counterAmount >= OBJECTIVE_AMOUNT) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_002);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_QUESTITEM);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_YUYUBESU;
elseif (sequence == SEQ_001) then
return MRKR_BOMB_AREA;
elseif (sequence == SEQ_002) then
return MRKR_YUYUBESU;
elseif (sequence == SEQ_003) then
return MRKR_HILDIE;
end
end

View File

@ -0,0 +1,213 @@
require ("global")
--[[
Quest Script
Name: Food for Thought
Code: Etc1l8
Id: 110641
Prereq: Level 20, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Spread rumors to all, must perform /psych.
SEQ_001 = 1; -- Return to Dympna.
-- Actor Class Ids
DYMPNA = 1000331;
AERGWNYT = 1000347;
FERDILLAIX = 1000344;
BUBUROON = 1000219;
RBAHARRA = 1000340;
FUFUNA = 1000345;
-- Quest Markers
MRKR_DYMPNA = 11064101;
MRKR_AERGWNYT = 11064102;
MRKR_FERDILLAIX = 11064103;
MRKR_BUBUROON = 11064104;
MRKR_RBAHARRA = 11064105;
MRKR_FUFUNA = 11064106;
-- Quest Flags
FLAG_TALKED_AERGWNYT = 0;
FLAG_TALKED_FERDILLAIX = 1;
FLAG_TALKED_BUBUROON = 2;
FLAG_TALKED_RBAHARRA = 3;
FLAG_TALKED_FUFUNA = 4;
-- Quest Counters
COUNTER_TALKED = 0;
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(DYMPNA, QFLAG_NORM);
end
local data = quest:GetData();
if (sequence == SEQ_000) then
quest:SetENpc(DYMPNA);
quest:SetENpc(AERGWNYT, (not data:GetFlag(FLAG_TALKED_AERGWNYT) and QFLAG_NORM or QFLAG_NONE));
quest:SetENpc(FERDILLAIX, (not data:GetFlag(FLAG_TALKED_FERDILLAIX) and QFLAG_NORM or QFLAG_NONE));
quest:SetENpc(BUBUROON, (not data:GetFlag(FLAG_TALKED_BUBUROON) and QFLAG_NORM or QFLAG_NONE));
quest:SetENpc(RBAHARRA, (not data:GetFlag(FLAG_TALKED_RBAHARRA) and QFLAG_NORM or QFLAG_NONE));
quest:SetENpc(FUFUNA, (not data:GetFlag(FLAG_TALKED_FUFUNA) and QFLAG_NORM or QFLAG_NONE));
elseif (sequence == SEQ_001) then
quest:SetENpc(DYMPNA, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == DYMPNA and not player:HasQuest(quest)) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventOffersStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
end
-- Quest Progress
local data = quest:GetData();
if (seq == SEQ_000) then
if (npcClassId == DYMPNA) then
callClientFunction(player, "delegateEvent", player, quest, "processEventOffersAfter");
elseif (npcClassId == AERGWNYT) then
if (not data:GetFlag(FLAG_TALKED_AERGWNYT)) then
callClientFunction(player, "delegateEvent", player, quest, "processEventAergwyntSpeak");
else
callClientFunction(player, "delegateEvent", player, quest, "processEventAergwyntAfter");
end
elseif (npcClassId == FERDILLAIX) then
if (not data:GetFlag(FLAG_TALKED_FERDILLAIX)) then
callClientFunction(player, "delegateEvent", player, quest, "processEventFerdillaixSpeak");
else
callClientFunction(player, "delegateEvent", player, quest, "processEventFerdillaixAfter");
end
elseif (npcClassId == BUBUROON) then
if (not data:GetFlag(FLAG_TALKED_BUBUROON)) then
callClientFunction(player, "delegateEvent", player, quest, "processEventBuburoonSpeak");
else
callClientFunction(player, "delegateEvent", player, quest, "processEventBuburoonAfter");
end
elseif (npcClassId == RBAHARRA) then
if (not data:GetFlag(FLAG_TALKED_RBAHARRA)) then
callClientFunction(player, "delegateEvent", player, quest, "processEventBaharraSpeak");
else
callClientFunction(player, "delegateEvent", player, quest, "processEventBaharraAfter");
end
elseif (npcClassId == FUFUNA) then
if (not data:GetFlag(FLAG_TALKED_FUFUNA)) then
callClientFunction(player, "delegateEvent", player, quest, "processEventFufunaSpeak");
else
callClientFunction(player, "delegateEvent", player, quest, "processEventFufunaAfter");
end
end
elseif (seq == SEQ_001) then
--Quest Complete
if (npcClassId == DYMPNA) then
callClientFunction(player, "delegateEvent", player, quest, "processEventClear");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
function onEmote(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
local data = quest:GetData();
local incCounter = false;
if (seq == SEQ_000 and eventName == "emoteDefault1") then
if (npcClassId == AERGWNYT) then
if (not data:GetFlag(FLAG_TALKED_AERGWNYT)) then
callClientFunction(player, "delegateEvent", player, quest, "processEventAergwynt");
data:SetFlag(FLAG_TALKED_AERGWNYT);
incCounter = true;
end
elseif (npcClassId == FERDILLAIX) then
if (not data:GetFlag(FLAG_TALKED_FERDILLAIX)) then
callClientFunction(player, "delegateEvent", player, quest, "processEventFerdillaix");
data:SetFlag(FLAG_TALKED_FERDILLAIX);
incCounter = true;
end
elseif (npcClassId == BUBUROON) then
if (not data:GetFlag(FLAG_TALKED_BUBUROON)) then
callClientFunction(player, "delegateEvent", player, quest, "processEventBuburoon");
data:SetFlag(FLAG_TALKED_BUBUROON);
incCounter = true;
end
elseif (npcClassId == RBAHARRA) then
if (not data:GetFlag(FLAG_TALKED_RBAHARRA)) then
callClientFunction(player, "delegateEvent", player, quest, "processEventBaharra");
data:SetFlag(FLAG_TALKED_RBAHARRA);
incCounter = true;
end
elseif (npcClassId == FUFUNA) then
if (not data:GetFlag(FLAG_TALKED_FUFUNA)) then
callClientFunction(player, "delegateEvent", player, quest, "processEventFufuna");
data:SetFlag(FLAG_TALKED_FUFUNA);
incCounter = true;
end
end
-- Increase objective counter & play relevant messages
if (incCounter == true) then
local counterAmount = data:IncCounter(COUNTER_TALKED);
attentionMessage(player, 51059, 0, counterAmount, 5); -- You have helped spread Dympna's rumor. (... of 5)
if (seq000_checkCondition(data)) then -- All informants spoken to
attentionMessage(player, 25225, quest.GetQuestId()); -- objectives complete!
quest:UpdateENPCs(); -- Band-aid for a QFLAG_NORM issue
quest:StartSequence(SEQ_001);
end
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- Check if all informants are talked to
function seq000_checkCondition(data)
return (data:GetFlag(FLAG_TALKED_AERGWNYT) and
data:GetFlag(FLAG_TALKED_FERDILLAIX) and
data:GetFlag(FLAG_TALKED_BUBUROON) and
data:GetFlag(FLAG_TALKED_RBAHARRA) and
data:GetFlag(FLAG_TALKED_FUFUNA));
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
local data = quest:GetData();
local possibleMarkers = {};
if (sequence == SEQ_000) then
if (not data:GetFlag(FLAG_TALKED_AERGWNYT)) then table.insert(possibleMarkers, MRKR_AERGWNYT); end
if (not data:GetFlag(FLAG_TALKED_FERDILLAIX)) then table.insert(possibleMarkers, MRKR_FERDILLAIX); end
if (not data:GetFlag(FLAG_TALKED_BUBUROON)) then table.insert(possibleMarkers, MRKR_BUBUROON); end
if (not data:GetFlag(FLAG_TALKED_RBAHARRA)) then table.insert(possibleMarkers, MRKR_RBAHARRA); end
if (not data:GetFlag(FLAG_TALKED_FUFUNA)) then table.insert(possibleMarkers, MRKR_FUFUNA); end
elseif (sequence == SEQ_001) then
table.insert(possibleMarkers, MRKR_DYMPNA);
end
return unpack(possibleMarkers)
end

View File

@ -0,0 +1,104 @@
require ("global")
--[[
Quest Script
Name: Sleepless in Eorzea
Code: Etc1u1
Id: 110676
Prereq: Level 10, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Kill Nutgrabber Marmots.
SEQ_001 = 1; -- Talk to Kukusi.
-- Actor Class Ids
ENPC_KUKUSI = 1001463;
BNPC_NUTGRABBER_MARMOT = 2104021;
-- Quest Markers
MRKR_NUTGRABBER_AREA = 11067601;
MRKR_KUKUSI = 11067602;
-- Counters
COUNTER_SLUMBERNUT = 0;
-- Quest Details
OBJECTIVE_SLUMBERNUT = 8;
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(ENPC_KUKUSI, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_KUKUSI);
quest:SetENpc(BNPC_NUTGRABBER_MARMOT);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_KUKUSI, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_KUKUSI and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventKukusiStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_KUKUSI) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_2");
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_KUKUSI) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_3");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_NUTGRABBER_MARMOT) then
local counterAmount = quest:GetData():IncCounter(COUNTER_SLUMBERNUT);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
if (counterAmount >= OBJECTIVE_SLUMBERNUT) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_SLUMBERNUT);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_NUTGRABBER_AREA;
elseif (sequence == SEQ_001) then
return MRKR_KUKUSI;
end
end

View File

@ -49,7 +49,7 @@ function onFinish(player, quest)
end end
function onStateChange(player, quest, sequence) function onStateChange(player, quest, sequence)
if (sequence == 65535) then if (sequence == SEQ_ACCEPT) then
quest:SetENpc(KINNISON, QFLAG_PLATE); quest:SetENpc(KINNISON, QFLAG_PLATE);
end end
@ -135,7 +135,7 @@ function onTalk(player, quest, npc, eventName)
attentionMessage(player, 51061, 0, counterAmount, 5); -- You have heard word of the Seedseers. (... of 5) attentionMessage(player, 51061, 0, counterAmount, 5); -- You have heard word of the Seedseers. (... of 5)
if (seq000_checkCondition(data)) then -- All Seers spoken to if (seq000_checkCondition(data)) then -- All Seers spoken to
attentionMessage(player, 25225, 110674); -- "Seeing the Seers" objectives complete! attentionMessage(player, 25225, quest:GetQuestId()); -- "Seeing the Seers" objectives complete!
quest:UpdateENPCs(); -- Band-aid for a QFLAG_PLATE issue quest:UpdateENPCs(); -- Band-aid for a QFLAG_PLATE issue
quest:StartSequence(SEQ_001); quest:StartSequence(SEQ_001);
end end
@ -166,6 +166,7 @@ end
function getJournalMapMarkerList(player, quest) function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
local data = quest:GetData();
local possibleMarkers = {}; local possibleMarkers = {};
local data = quest:GetData(); local data = quest:GetData();

View File

@ -0,0 +1,181 @@
require ("global")
--[[
Quest Script
Name: The Tug of the Whorl
Code: Etc3l0
Id: 110653
Prereq: Level 5, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to all the citizens.
SEQ_001 = 1; -- Return to Ginnade.
-- Actor Class Ids
GINNADE = 1000132;
ZONGGO = 1000057;
WHAHTOA = 1000475;
FERDILLAIX = 1000344;
FRAILOISE = 1000065;
ARNEGIS = 1000227;
-- Quest Markers
MRKR_ZONGGO = 11070001
MRKR_WHAHTOA = 11070002
MRKR_FERDILLAIX = 11070003
MRKR_FRAILOISE = 11070004
MRKR_ARNEGIS = 11070005
MRKR_GINNADE = 11070006
-- Quest Flags
FLAG_TALKED_ZONGGO = 0;
FLAG_TALKED_WHAHTOA = 1;
FLAG_TALKED_FERDILLAIX = 2;
FLAG_TALKED_FRAILOISE = 3;
FLAG_TALKED_ARNEGIS = 4;
-- Quest Counters
COUNTER_TALKED = 0;
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(GINNADE, QFLAG_NORM);
end
local data = quest:GetData();
if (sequence == SEQ_000) then
quest:SetENpc(GINNADE);
quest:SetENpc(ZONGGO, (not data:GetFlag(FLAG_TALKED_ZONGGO) and QFLAG_NORM or QFLAG_NONE));
quest:SetENpc(WHAHTOA, (not data:GetFlag(FLAG_TALKED_WHAHTOA) and QFLAG_NORM or QFLAG_NONE));
quest:SetENpc(FERDILLAIX, (not data:GetFlag(FLAG_TALKED_FERDILLAIX) and QFLAG_NORM or QFLAG_NONE));
quest:SetENpc(FRAILOISE, (not data:GetFlag(FLAG_TALKED_FRAILOISE) and QFLAG_NORM or QFLAG_NONE));
quest:SetENpc(ARNEGIS, (not data:GetFlag(FLAG_TALKED_ARNEGIS) and QFLAG_NORM or QFLAG_NONE));
elseif (sequence == SEQ_001) then
quest:SetENpc(GINNADE, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
local incCounter = false;
-- Offer the quest
if (npcClassId == GINNADE and not player:HasQuest(quest)) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventGinnadeStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
end
-- Quest Progress
local data = quest:GetData();
if (seq == SEQ_000) then
if (npcClassId == GINNADE) then
callClientFunction(player, "delegateEvent", player, quest, "followEvent005");
elseif (npcClassId == ZONGGO) then
if (not data:GetFlag(FLAG_TALKED_ZONGGO)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
data:SetFlag(FLAG_TALKED_ZONGGO);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "followEvent010");
end
elseif (npcClassId == WHAHTOA) then
if (not data:GetFlag(FLAG_TALKED_WHAHTOA)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020");
data:SetFlag(FLAG_TALKED_WHAHTOA);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "followEvent020");
end
elseif (npcClassId == FERDILLAIX) then
if (not data:GetFlag(FLAG_TALKED_FERDILLAIX)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent030");
data:SetFlag(FLAG_TALKED_FERDILLAIX);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "followEvent030");
end
elseif (npcClassId == FRAILOISE) then
if (not data:GetFlag(FLAG_TALKED_FRAILOISE)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent040");
data:SetFlag(FLAG_TALKED_FRAILOISE);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "followEvent040");
end
elseif (npcClassId == ARNEGIS) then
if (not data:GetFlag(FLAG_TALKED_ARNEGIS)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent050");
data:SetFlag(FLAG_TALKED_ARNEGIS);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "followEvent050");
end
end
-- Increase objective counter & play relevant messages
if (incCounter == true) then
local counterAmount = data:IncCounter(COUNTER_TALKED);
attentionMessage(player, 51060, 0, counterAmount, 5); -- You have spoken with a Barracuda informant. (... of 5)
if (seq000_checkCondition(data)) then -- All informants spoken to
attentionMessage(player, 25225, quest.GetQuestId()); -- "The Tug of the Whorl" objectives complete!
quest:UpdateENPCs(); -- Band-aid for a QFLAG_NORM issue
quest:StartSequence(SEQ_001);
end
end
elseif (seq == SEQ_001) then
--Quest Complete
if (npcClassId == GINNADE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent060");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- Check if all informants are talked to
function seq000_checkCondition(data)
return (data:GetFlag(FLAG_TALKED_ZONGGO) and
data:GetFlag(FLAG_TALKED_WHAHTOA) and
data:GetFlag(FLAG_TALKED_FERDILLAIX) and
data:GetFlag(FLAG_TALKED_FRAILOISE) and
data:GetFlag(FLAG_TALKED_ARNEGIS));
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
local data = quest:GetData();
local possibleMarkers = {};
if (sequence == SEQ_000) then
if (not data:GetFlag(FLAG_TALKED_ZONGGO)) then table.insert(possibleMarkers, MRKR_ZONGGO); end
if (not data:GetFlag(FLAG_TALKED_WHAHTOA)) then table.insert(possibleMarkers, MRKR_WHAHTOA); end
if (not data:GetFlag(FLAG_TALKED_FERDILLAIX)) then table.insert(possibleMarkers, MRKR_FERDILLAIX); end
if (not data:GetFlag(FLAG_TALKED_FRAILOISE)) then table.insert(possibleMarkers, MRKR_FRAILOISE); end
if (not data:GetFlag(FLAG_TALKED_ARNEGIS)) then table.insert(possibleMarkers, MRKR_ARNEGIS); end
elseif (sequence == SEQ_001) then
table.insert(possibleMarkers, MRKR_GINNADE);
end
return unpack(possibleMarkers)
end

View File

@ -0,0 +1,183 @@
require ("global")
--[[
Quest Script
Name: A Call to Arms
Code: Etc3u0
Id: 110695
Prereq: Level 5, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to all the ___.
SEQ_001 = 1; -- Return to Fruhybolg.
-- Actor Class Ids
FRUHYBOLG = 1000964;
ZOENGTERBIN = 1000784;
LETTICE = 1000788;
THIMM = 1001439;
VANNES = 1001464;
JEGER = 1000655;
-- Quest Markers
MRKR_FRUHYBOLG = 11090001;
MRKR_ZOENGTERBIN = 11090002;
MRKR_LETTICE = 11090003;
MRKR_THIMM = 11090004;
MRKR_VANNES = 11090005;
MRKR_JEGER = 11090006;
-- Quest Flags
FLAG_TALKED_VANNES = 1;
FLAG_TALKED_JEGER = 2;
FLAG_TALKED_LETTICE = 3;
FLAG_TALKED_ZOENGTERBIN = 4;
FLAG_TALKED_THIMM = 5;
-- Quest Counters
COUNTER_TALKED = 0;
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(FRUHYBOLG, QFLAG_PLATE);
end
local data = quest:GetData();
if (sequence == SEQ_000) then
quest:SetENpc(FRUHYBOLG);
quest:SetENpc(VANNES, (not data:GetFlag(FLAG_TALKED_VANNES) and QFLAG_PLATE or QFLAG_NONE));
quest:SetENpc(JEGER, (not data:GetFlag(FLAG_TALKED_JEGER) and QFLAG_PLATE or QFLAG_NONE));
quest:SetENpc(LETTICE, (not data:GetFlag(FLAG_TALKED_LETTICE) and QFLAG_PLATE or QFLAG_NONE));
quest:SetENpc(ZOENGTERBIN, (not data:GetFlag(FLAG_TALKED_ZOENGTERBIN) and QFLAG_PLATE or QFLAG_NONE));
quest:SetENpc(THIMM, (not data:GetFlag(FLAG_TALKED_THIMM) and QFLAG_PLATE or QFLAG_NONE));
elseif (sequence == SEQ_001) then
quest:SetENpc(FRUHYBOLG, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
local incCounter = false;
-- Offer the quest
if (npcClassId == FRUHYBOLG and not player:HasQuest(quest)) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventFhruybolgStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
end
-- Quest Progress
local data = quest:GetData();
if (seq == SEQ_000) then
if (npcClassId == FRUHYBOLG) then
callClientFunction(player, "delegateEvent", player, quest, "processEventOffersAfter");
elseif (npcClassId == VANNES) then
if (not data:GetFlag(FLAG_TALKED_VANNES)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_V");
data:SetFlag(FLAG_TALKED_VANNES);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_V_2");
end
elseif (npcClassId == JEGER) then
if (not data:GetFlag(FLAG_TALKED_JEGER)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_J");
data:SetFlag(FLAG_TALKED_JEGER);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_J_2");
end
elseif (npcClassId == LETTICE) then
if (not data:GetFlag(FLAG_TALKED_LETTICE)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_L");
data:SetFlag(FLAG_TALKED_LETTICE);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_L_2");
end
elseif (npcClassId == ZOENGTERBIN) then
if (not data:GetFlag(FLAG_TALKED_ZOENGTERBIN)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_Z");
data:SetFlag(FLAG_TALKED_ZOENGTERBIN);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_Z_2");
end
elseif (npcClassId == THIMM) then
if (not data:GetFlag(FLAG_TALKED_THIMM)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_T");
data:SetFlag(FLAG_TALKED_THIMM);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_T_2");
end
end
-- Increase objective counter & play relevant messages
if (incCounter == true) then
local counterAmount = data:IncCounter(COUNTER_TALKED);
attentionMessage(player, 51062, 0, counterAmount, 5); -- You have passed on word of the rite. (... of 5)
if (seq000_checkCondition(data)) then -- All people spoken to
attentionMessage(player, 25225, quest:GetQuestId()); -- "A Call to Arms" objectives complete!
quest:UpdateENPCs(); -- Band-aid for a QFLAG_PLATE issue
quest:StartSequence(SEQ_001);
end
end
elseif (seq == SEQ_001) then
--Quest Complete
if (npcClassId == FRUHYBOLG) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- Check if all people are talked to
function seq000_checkCondition(data)
return (data:GetFlag(FLAG_TALKED_VANNES) and
data:GetFlag(FLAG_TALKED_JEGER) and
data:GetFlag(FLAG_TALKED_LETTICE) and
data:GetFlag(FLAG_TALKED_ZOENGTERBIN) and
data:GetFlag(FLAG_TALKED_THIMM));
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
local data = quest:GetData();
local possibleMarkers = {};
if (sequence == SEQ_000) then
if (not data:GetFlag(FLAG_TALKED_VANNES)) then table.insert(possibleMarkers, MRKR_VANNES); end
if (not data:GetFlag(FLAG_TALKED_JEGER)) then table.insert(possibleMarkers, MRKR_JEGER); end
if (not data:GetFlag(FLAG_TALKED_LETTICE)) then table.insert(possibleMarkers, MRKR_LETTICE); end
if (not data:GetFlag(FLAG_TALKED_ZOENGTERBIN)) then table.insert(possibleMarkers, MRKR_ZOENGTERBIN); end
if (not data:GetFlag(FLAG_TALKED_THIMM)) then table.insert(possibleMarkers, MRKR_THIMM); end
elseif (sequence == SEQ_001) then
table.insert(possibleMarkers, MRKR_FRUHYBOLG);
end
return unpack(possibleMarkers)
end

View File

@ -13,8 +13,8 @@ Notes: Rewards 200 gil
]] ]]
-- Sequence Numbers -- Sequence Numbers
SEQ_000 = 0; -- Talk to Pfarahr SEQ_000 = 0; -- Talk to Pfarahr.
SEQ_001 = 1; -- Return to V'korolon SEQ_001 = 1; -- Return to V'korolon.
-- Actor Class Ids -- Actor Class Ids
VKOROLON = 1000458; VKOROLON = 1000458;
@ -27,10 +27,7 @@ ITEM_WELL_WORN_BAG = 11000224;
MRKR_PFARAHR = 11082001; MRKR_PFARAHR = 11082001;
MRKR_VKOROLON = 11082002; MRKR_VKOROLON = 11082002;
function onStart(player, quest) function onStart(player, quest)
-- processEventVKOROLONStart -- No means of properly accepting quests yet
quest:StartSequence(SEQ_000); quest:StartSequence(SEQ_000);
player:SendGameMessage(GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM, ITEM_WELL_WORN_BAG, 1); player:SendGameMessage(GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM, ITEM_WELL_WORN_BAG, 1);
end end
@ -38,9 +35,11 @@ end
function onFinish(player, quest) function onFinish(player, quest)
end end
function onStateChange(player, quest, sequence) function onStateChange(player, quest, sequence)
if (sequence == SEQ_ACCEPT) then
quest:SetENpc(VKOROLON, QFLAG_PLATE);
end
if (sequence == SEQ_000) then if (sequence == SEQ_000) then
quest:SetENpc(VKOROLON); quest:SetENpc(VKOROLON);
quest:SetENpc(PFARAHR, QFLAG_PLATE); quest:SetENpc(PFARAHR, QFLAG_PLATE);
@ -54,20 +53,26 @@ function onTalk(player, quest, npc)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
local classId = npc:GetActorClassId(); local classId = npc:GetActorClassId();
if (sequence == SEQ_000) then if (sequence == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventVKOROLONStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
elseif (sequence == SEQ_000) then
if (classId == VKOROLON) then if (classId == VKOROLON) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1"); callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1");
elseif (classId == PFARAHR) then elseif (classId == PFARAHR) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010"); callClientFunction(player, "delegateEvent", player, quest, "processEvent_010");
quest:StartSequence(SEQ_001); quest:StartSequence(SEQ_001);
quest:DoComplete(); -- Need ref since it feels out of place. Just placing it here since original script had it.
end end
elseif (sequence == SEQ_001) then elseif (sequence == SEQ_001) then
if (classId == VKOROLON) then if (classId == VKOROLON) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_020"); callClientFunction(player, "delegateEvent", player, quest, "processEvent_020");
--callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1); -- Reward window, shouldn't be handled by quest script callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1)
player:CompleteQuest(quest:GetQuestId()); player:CompleteQuest(quest);
elseif (classId == PFARAHR) then elseif (classId == PFARAHR) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_1"); callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_1");
end end
@ -76,27 +81,21 @@ function onTalk(player, quest, npc)
quest:UpdateENPCs(); quest:UpdateENPCs();
end end
function getJournalInformation(player, quest) function getJournalInformation(player, quest)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
if (sequence == SEQ_000) then if (sequence == SEQ_000) then
return ITEM_WELL_WORN_BAG; return ITEM_WELL_WORN_BAG;
end end
end end
function getJournalMapMarkerList(player, quest) function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
local possibleMarkers = {};
if (sequence == SEQ_000) then if (sequence == SEQ_000) then
table.insert(possibleMarkers, MRKR_PFARAHR); return MRKR_PFARAHR;
elseif (sequence == SEQ_001) then elseif (sequence == SEQ_001) then
table.insert(possibleMarkers, MRKR_VKOROLON); return MRKR_VKOROLON;
end end
return unpack(possibleMarkers)
end end

View File

@ -10,49 +10,27 @@ Id: 110005
Prereq: None (Given on chara creation) Prereq: None (Given on chara creation)
Notes: Notes:
Using PrivateAreaMasterPast Type 1
]] ]]
--[[
SEQS
[@IF($E4($E8(1),0), 
[@SHEET(xtx/journalxtxFst,177,1)]
,)]
[@IF($E4($E8(1),5), 
[@SHEET(xtx/journalxtxFst,178,1)]
,)]
[@IF($E4($E8(1),10), 
[@SHEET(xtx/journalxtxFst,179,1)]
,)]
qItem
[@IF($E0($E8(1),10),
[@SHEET(xtx/itemName,11000088,5)][@CR]
,)]
--]]
-- Sequence Numbers -- Sequence Numbers
SEQ_000 = 0; -- Intro with Yda & Papalymo SEQ_000 = 0; -- Intro with Yda & Papalymo
SEQ_005 = 5; -- Combat tutorial SEQ_005 = 5; -- Combat tutorial
SEQ_010 = 10; -- Gridania section SEQ_010 = 10; -- Gridania section
-- Actor Class Ids -- Actor Class Ids
YDA = 1000009; YDA = 1000009;
PAPALYMO = 1000010; PAPALYMO = 1000010;
FARRIMOND = 1000017; FARRIMOND = 1000017;
CECILIA = 1000683; CECILIA = 1000683;
SWETHYNA = 1000680; SWETHYNA = 1000680;
TKEBBE = 1000876; TKEBBE = 1000876;
LONSYGG = 1000951; LONSYGG = 1000951;
GUILD_ENTRANCE = 1099046; PUSH_ADV_GUILD = 1099046;
BLOCKER1 = 1099047; BLOCKER1 = 1099047;
-- Non-interactive NPCs -- Non-interactive NPCs
GUILD_ANENE = 1000427; GUILD_ANENE = 1000427;
GUILD_SYLBERT = 1000428; -- No source GUILD_SYLBERT = 1000428; -- No source
GUILD_HONGA_VUNGA = 1000429; GUILD_HONGA_VUNGA = 1000429;
@ -70,27 +48,18 @@ GUILD_EMONI = 1001183;
GUILD_GYLES = 1001184; GUILD_GYLES = 1001184;
GUILD_PENELOPE = 1700001; -- No source GUILD_PENELOPE = 1700001; -- No source
-- PrivateAreaMasterPast 1
-- Quest Markers -- Quest Markers
MRKR_LONSYGG = 11000501; -- Obsolete. Pre-1.19 location for this npc MRKR_LONSYGG = 11000501; -- Obsolete. Pre-1.19 location for this npc
MRKR_YDA = 11000502; MRKR_YDA = 11000502;
MRKR_PAPALYMO = 11000503; MRKR_PAPALYMO = 11000503;
MRKR_GUILD = 11000504; MRKR_GUILD = 11000504;
-- Quest Flags -- Quest Flags
FLAG_SEQ000_MINITUT0 = 0; -- Talked to YDA FLAG_SEQ000_MINITUT0 = 0; -- Talked to Yda.
FLAG_SEQ000_MINITUT1 = 1; -- Talked to PAPALYMO FLAG_SEQ000_MINITUT1 = 1; -- Talked to Papalymo.
FLAG_SEQ000_MINITUT2 = 2; -- Talked to YDA again FLAG_SEQ000_MINITUT2 = 2; -- Talked to Yda again.
FLAG_SEQ010_TKEBBE = 0; -- Talked to T'kebbe (optional) FLAG_SEQ010_TKEBBE = 0; -- Talked to T'kebbe (optional)
--[[ --[[
processEvent000_0 processEvent000_0
processEvent000_1 processEvent000_1
@ -122,9 +91,6 @@ processTtrBtl004
processInformDialogAsQuest processInformDialogAsQuest
--]] --]]
function onStart(player, quest) function onStart(player, quest)
quest:StartSequence(SEQ_000); quest:StartSequence(SEQ_000);
end end
@ -133,7 +99,6 @@ function onFinish(player, quest)
end end
function onStateChange(player, quest, sequence) function onStateChange(player, quest, sequence)
if (sequence == SEQ_000) then if (sequence == SEQ_000) then
-- Setup states incase we loaded in. -- Setup states incase we loaded in.
local data = quest:GetData(); local data = quest:GetData();
@ -172,7 +137,6 @@ function onStateChange(player, quest, sequence)
end end
end end
function onTalk(player, quest, npc) function onTalk(player, quest, npc)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
local classId = npc:GetActorClassId(); local classId = npc:GetActorClassId();
@ -185,8 +149,6 @@ function onTalk(player, quest, npc)
quest:UpdateENPCs(); quest:UpdateENPCs();
end end
function onPush(player, quest, npc) function onPush(player, quest, npc)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
local classId = npc:GetActorClassId(); local classId = npc:GetActorClassId();
@ -263,7 +225,6 @@ function seq010_onTalk(player, quest, npc, classId)
player:EndEvent(); player:EndEvent();
end end
function getJournalMapMarkerList(player, quest) function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
local possibleMarkers = {}; local possibleMarkers = {};
@ -286,9 +247,6 @@ function getJournalMapMarkerList(player, quest)
return unpack(possibleMarkers) return unpack(possibleMarkers)
end end
function doContentArea(player, quest, npc) function doContentArea(player, quest, npc)
quest:GetData():ClearData(); quest:GetData():ClearData();
quest:StartSequence(SEQ_005); quest:StartSequence(SEQ_005);

View File

@ -1,5 +1,5 @@
require("global"); require("global");
require("tutorial");
--[[ --[[
Quest Script Quest Script
@ -17,6 +17,7 @@ Notes:
-- Sequence Numbers -- Sequence Numbers
SEQ_000 = 0; SEQ_000 = 0;
SEQ_003 = 3;
-- Actor Class Ids -- Actor Class Ids
@ -28,7 +29,8 @@ MOROSE_MERCHANT = 1001058;
NARROW_EYED_ADVENTURER = 1001059; NARROW_EYED_ADVENTURER = 1001059;
BEAMING_ADVENTURER = 1001062; BEAMING_ADVENTURER = 1001062;
WELL_BUNDLED_ADVENTURER = 1001060; WELL_BUNDLED_ADVENTURER = 1001060;
UNCONCERNED_PASSERBY = 1001648; -- I don't think this was used? UNCONCERNED_PASSERBY = 1001648;
--BLOCKER = ;
-- Quest Markers -- Quest Markers
MRKR_MIOUNNE = 11000601; MRKR_MIOUNNE = 11000601;
@ -77,11 +79,11 @@ function onTalk(player, quest, npc)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
local classId = npc:GetActorClassId(); local classId = npc:GetActorClassId();
if (sequence == SEQ_000) then --if (sequence == SEQ_000) then
seq000_onTalk(player, quest, npc, classId); seq000_onTalk(player, quest, npc, classId);
elseif (sequence == SEQ_005) then -- elseif (sequence == SEQ_005) then
seq005_onTalk(player, quest, npc, classId); -- seq005_onTalk(player, quest, npc, classId);
end -- end
quest:UpdateENPCs(); quest:UpdateENPCs();
end end
@ -100,21 +102,49 @@ end
function onNotice(player, quest, target) function onNotice(player, quest, target)
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_1"); -- Describes what an Instance is
player:EndEvent(); player:EndEvent();
quest:UpdateENPCs(); player:SendMessage(0x20, "", "Test");
callClientFunction(player, "delegateEvent", player, quest, "processEventTu_001");
player:EndEvent();
end
-- Copy-pasted from man0l1 for now, fix later
function onNpcLS(player, quest, npcLSId)
local sequence = quest:getSequence();
if (npcLSId == 1) then
player:SetNpcLS(1, 1);
player:SendGameMessageLocalizedDisplayName(quest, 330, 39, 1300018, nil);
showTutorialSuccessWidget(player, 9080);
wait(3);
closeTutorialWidget(player);
endTutorialMode(player);
end
end end
function seq000_onTalk(player, quest, npc, classId) function seq000_onTalk(player, quest, npc, classId)
if (classId == MOMODI) then if (classId == MIOUNNE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
callClientFunction(player, "delegateEvent", player, quest, "processEvent100_1");
player:EndEvent(); player:EndEvent();
quest:StartSequence(SEQ_005); quest:StartSequence(SEQ_003);
GetWorldManager():DoZoneChange(player, 175, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation);
return;
local director = GetWorldManager():GetArea(155):CreateDirector("AfterQuestWarpDirector", false);
director:StartDirector(true);
player:AddDirector(director);
--player:SetLoginDirector(director);
player:KickEvent(director, "noticeEvent", true);
quest:UpdateENPCs();
--GetWorldManager():WarpToPublicArea(player);
GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation);
elseif (classId == BEAMING_ADVENTURER) then elseif (classId == BEAMING_ADVENTURER) then
callClientFunction (player, "delegateEvent", player, quest, "processEvent100_6"); callClientFunction (player, "delegateEvent", player, quest, "processEvent100_6");
elseif (classId == AMIABLE_ADVENTURER) then elseif (classId == AMIABLE_ADVENTURER) then
@ -126,16 +156,11 @@ function seq000_onTalk(player, quest, npc, classId)
elseif (classId == UNCONCERNED_PASSERBY) then elseif (classId == UNCONCERNED_PASSERBY) then
callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml001"); --"processEvent100_9"); callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml001"); --"processEvent100_9");
elseif (classId == VKOROLON) then elseif (classId == VKOROLON) then
callClientFunction(player, "delegateEvent", player, quest, "defaultTalkWithVkorolon_001"); callClientFunction(player, "delegateEvent", player, GetStaticActor("DftWil"), "defaultTalkWithVkorolon_001");
elseif (classId == WELL_BUNDLED_ADVENTURER) then elseif (classId == WELL_BUNDLED_ADVENTURER) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent100_4"); callClientFunction(player, "delegateEvent", player, quest, "processEvent100_4");
elseif (classId == WISPILY_WHISKERED_WOODWORKER) then elseif (classId == WISPILY_WHISKERED_WOODWORKER) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent100_8"); callClientFunction(player, "delegateEvent", player, quest, "processEvent100_8");
elseif (classId == MIOUNNE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent110");
player:EndEvent();
quest:StartSequence(SEQ_005);
GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation);
end end
player:EndEvent(); player:EndEvent();

View File

@ -26,13 +26,14 @@ SEQ_055 = 55; -- Search lighthouse for corpse
SEQ_060 = 60; -- Talk to Sisipu SEQ_060 = 60; -- Talk to Sisipu
SEQ_065 = 65; -- Return to FSH Guild SEQ_065 = 65; -- Return to FSH Guild
SEQ_070 = 70; -- Contact Baderon on LS SEQ_070 = 70; -- Contact Baderon on LS
SEQ_075 = 75; -- Go to the ARM and BSM Guilds. SEQ_075 = 75; -- Go to the ARM and BSM Guilds. Talk to Bodenolf.
SEQ_080 = 80; -- Speak with H'naanza SEQ_080 = 80; -- Speak with H'naanza
SEQ_085 = 85; -- Speak with Bodenolf SEQ_085 = 85; -- Speak with Bodenolf
SEQ_090 = 90; -- Contact Baderon on LS SEQ_090 = 90; -- Contact Baderon on LS
SEQ_092 = 92; -- Return to Baderon. SEQ_092 = 92; -- Return to Baderon.
-- Actor Class Ids -- Actor Class Ids
-- Echo in Adv Guild
YSHTOLA = 1000001; YSHTOLA = 1000001;
CRAPULOUS_ADVENTURER = 1000075; CRAPULOUS_ADVENTURER = 1000075;
DUPLICITOUS_TRADER = 1000076; DUPLICITOUS_TRADER = 1000076;
@ -46,13 +47,16 @@ COCKAHOOP_COCKSWAIN = 1001643;
SENTENIOUS_SELLSWORD = 1001649; SENTENIOUS_SELLSWORD = 1001649;
SOLICITOUS_SELLSWORD = 1001650; SOLICITOUS_SELLSWORD = 1001650;
-- Sequence 003
BEARDEDROCK_AETHERYTE = 1280002; BEARDEDROCK_AETHERYTE = 1280002;
-- Sequence 007
CHARLYS = 1000138; CHARLYS = 1000138;
ISANDOREL = 1000152; ISANDOREL = 1000152;
MERLZIRN = 1000472; MERLZIRN = 1000472;
MSK_TRIGGER = 1090001; MSK_TRIGGER = 1090001;
-- Echo in Mrd Guild
NERVOUS_BARRACUDA = 1000096; NERVOUS_BARRACUDA = 1000096;
INTIMIDATING_BARRACUDA = 1000097; INTIMIDATING_BARRACUDA = 1000097;
OVEREAGER_BARRACUDA = 1000107; OVEREAGER_BARRACUDA = 1000107;
@ -65,12 +69,36 @@ ADVENTURER2 = 1000870;
ADVENTURER3 = 1000871; ADVENTURER3 = 1000871;
ECHO_EXIT_TRIGGER = 1090003; ECHO_EXIT_TRIGGER = 1090003;
-- Fsh Guild
NNMULIKA = 1000153;
SISIPU_EMOTE = 1000155;
ZEPHYR_TRIGGER = 1090004;
-- Sequence 055, 060, 065
SISIPU = 1000156;
WINDWORN_CORPSE = 1000091;
GLASSYEYED_CORPSE = 1000092;
FEARSTRICKEN_CORPSE = 1000378;
FSH_TRIGGER = 1090006;
-- Echo in the Bsm Guild
TATTOOED_PIRATE = 1000111;
IOFA = 1000135;
BODENOLF = 1000144;
HNAANZA = 1000145;
MIMIDOA = 1000176;
JOELLAUT = 1000163;
WERNER = 1000247;
HIHINE = 1000267;
TRINNE = 1000268;
ECHO_EXIT_TRIGGER2 = 1090001;
-- Quest Markers -- Quest Markers
MRKR_HOB = 11000202;
-- Quest Data -- Quest Data
CNTR_SEQ7_CUL = 1; CNTR_SEQ7_CUL = 1;
CNTR_SEQ7_MRD = 2; CNTR_SEQ7_MRD = 2;
CNTR_SEQ40_FSH = 3;
function onStart(player, quest) function onStart(player, quest)
quest:StartSequence(SEQ_000); quest:StartSequence(SEQ_000);
@ -140,6 +168,48 @@ function onStateChange(player, quest, sequence)
if (subseqCUL == 1 and subseqMRD == 4) then if (subseqCUL == 1 and subseqMRD == 4) then
player:SetNpcLS(1, 1); player:SetNpcLS(1, 1);
end end
elseif (sequence == SEQ_035) then
quest:SetENpc(NNMULIKA, QFLAG_PLATE);
elseif (sequence == SEQ_040) then
quest:SetENpc(SISIPU_EMOTE, QFLAG_PLATE, true, false, true);
quest:SetENpc(NNMULIKA);
elseif (sequence == SEQ_048) then
quest:SetENpc(BADERON);
quest:SetENpc(ZEPHYR_TRIGGER, QFLAG_MAP, false, true);
quest:SetENpc(NNMULIKA);
elseif (sequence == SEQ_055) then
quest:SetENpc(WINDWORN_CORPSE, QFLAG_PLATE);
quest:SetENpc(GLASSYEYED_CORPSE);
quest:SetENpc(FEARSTRICKEN_CORPSE);
quest:SetENpc(SISIPU);
elseif (sequence == SEQ_060) then
quest:SetENpc(SISIPU, QFLAG_PLATE);
quest:SetENpc(WINDWORN_CORPSE);
quest:SetENpc(GLASSYEYED_CORPSE);
quest:SetENpc(FEARSTRICKEN_CORPSE);
elseif (sequence == SEQ_065) then
quest:SetENpc(FSH_TRIGGER, QFLAG_MAP, false, true);
elseif (sequence == SEQ_075) then
quest:SetENpc(BODENOLF, QFLAG_PLATE);
elseif (sequence == SEQ_080) then
quest:SetENpc(HNAANZA, QFLAG_PLATE);
quest:SetENpc(TATTOOED_PIRATE);
quest:SetENpc(IOFA);
quest:SetENpc(BODENOLF);
quest:SetENpc(MIMIDOA);
quest:SetENpc(JOELLAUT);
quest:SetENpc(WERNER);
quest:SetENpc(HIHINE);
quest:SetENpc(TRINNE);
elseif (sequence == SEQ_085) then
quest:SetENpc(HNAANZA);
quest:SetENpc(TATTOOED_PIRATE);
quest:SetENpc(WERNER);
quest:SetENpc(HIHINE);
quest:SetENpc(TRINNE);
quest:SetENpc(ECHO_EXIT_TRIGGER2, QFLAG_MAP, false, true);
elseif (sequence == SEQ_092) then
quest:SetENpc(BADERON, QFLAG_REWARD);
end end
end end
@ -158,25 +228,124 @@ function onTalk(player, quest, npc)
elseif (sequence == SEQ_005) then elseif (sequence == SEQ_005) then
if (classId == BADERON) then if (classId == BADERON) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent026"); callClientFunction(player, "delegateEvent", player, quest, "processEvent026");
quest:StartSequence(SEQ_006);
player:EndEvent(); player:EndEvent();
quest:StartSequence(SEQ_006);
end end
elseif (sequence == SEQ_006) then elseif (sequence == SEQ_006) then
if (classId == BADERON) then if (classId == BADERON) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent027"); callClientFunction(player, "delegateEvent", player, quest, "processEvent027");
quest:StartSequence(SEQ_007);
player:EndEvent(); player:EndEvent();
player:SendGameMessage(GetWorldMaster(), 25117, 0x20, 11000125); -- You obtain Baderon's Recommendation
quest:StartSequence(SEQ_007);
end end
elseif (sequence == SEQ_007) then elseif (sequence == SEQ_007) then
seq007_onTalk(player, quest, npc, classId); seq007_onTalk(player, quest, npc, classId);
elseif (sequence == SEQ_035) then
if (classId == NNMULIKA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent600");
quest:StartSequence(SEQ_040);
player:EndEvent();
GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 5);
end
elseif (sequence == SEQ_040) then
if (classId == SISIPU_EMOTE) then
local emoteTestStep = quest:GetData():GetCounter(CNTR_SEQ40_FSH);
if (emoteTestStep == 0 or emoteTestStep == 1) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_1");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
if (emoteTestStep == 0) then
quest:GetData():IncCounter(CNTR_SEQ40_FSH);
end
elseif (emoteTestStep == 2) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_2");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
elseif (emoteTestStep == 3) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_3");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
elseif (emoteTestStep == 4) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_4");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
elseif (emoteTestStep == 5) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_5");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
elseif (emoteTestStep == 6) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_6");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
end
elseif (classId == NNMULIKA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent600_2");
end
player:EndEvent();
elseif (sequence == SEQ_048) then
if (classId == BADERON) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent602_3");
elseif (classId == NNMULIKA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent602_2");
end
player:EndEvent();
elseif (sequence == SEQ_055 or sequence == SEQ_060) then
if (classId == SISIPU) then
if (sequence == SEQ_060) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent615");
quest:StartSequence(SEQ_065);
player:EndEvent();
GetWorldManager():WarpToPublicArea(player, -42.0, 37.678, 155.694, -1.25);
return;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent605_2");
end
elseif (classId == WINDWORN_CORPSE) then
if (sequence == SEQ_055) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent610");
quest:StartSequence(SEQ_060);
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent610_2");
end
elseif (classId == FEARSTRICKEN_CORPSE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent610_2");
elseif (classId == GLASSYEYED_CORPSE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent610_2");
end
player:EndEvent();
elseif (sequence == SEQ_070) then
if (classId == BADERON) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent615_2");
end
player:EndEvent();
elseif (sequence == SEQ_075) then
if (classId == BODENOLF) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent630");
player:EndEvent();
quest:StartSequence(SEQ_080);
GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 4, -504.985, 42.490, 433.712, 2.35);
end
elseif (sequence == SEQ_080) then
if (classId == HNAANZA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent632");
player:EndEvent();
quest:StartSequence(SEQ_085);
else
seq080_085_onTalk(player, quest, npc, classId);
end
elseif (sequence == SEQ_085) then
if (classId == HNAANZA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent632_2");
else
seq080_085_onTalk(player, quest, npc, classId);
end
elseif (sequence == SEQ_092) then
if (classId == BADERON) then
callClientFunction(player, "delegateEvent", player, quest, "processEventComplete");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 300, 1, 1, 2);
player:EndEvent();
player:CompleteQuest(quest);
return;
end
end end
quest:UpdateENPCs(); quest:UpdateENPCs();
end end
-- !warp 133 -459.619873 40.0005722 196.370377 PrivateAreaMasterPast 2
function seq000_onTalk(player, quest, npc, classId) function seq000_onTalk(player, quest, npc, classId)
if (classId == CRAPULOUS_ADVENTURER) then if (classId == CRAPULOUS_ADVENTURER) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_2"); callClientFunction(player, "delegateEvent", player, quest, "processEvent010_2");
@ -279,6 +448,27 @@ function seq007_onTalk(player, quest, npc, classId)
player:EndEvent(); player:EndEvent();
end end
function seq080_085_onTalk(player, quest, npc, classId)
if (classId == IOFA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_2");
elseif (classId == TRINNE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_3");
elseif (classId == HIHINE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_4");
elseif (classId == MIMIDOA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_5");
elseif (classId == WERNER) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_6");
elseif (classId == TATTOOED_PIRATE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_7");
elseif (classId == JOELLAUT) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_8");
elseif (classId == BODENOLF) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent630_9");
end
player:EndEvent();
end
function onPush(player, quest, npc) function onPush(player, quest, npc)
local data = quest:GetData(); local data = quest:GetData();
local sequence = quest:getSequence(); local sequence = quest:getSequence();
@ -298,9 +488,140 @@ function onPush(player, quest, npc)
quest:UpdateENPCs(); quest:UpdateENPCs();
GetWorldManager():WarpToPublicArea(player); GetWorldManager():WarpToPublicArea(player);
end end
elseif (sequence == SEQ_048) then
if (classId == ZEPHYR_TRIGGER) then
local result = callClientFunction(player, "delegateEvent", player, quest, "contentsJoinAskInBasaClass");
if (result == 1) then
-- DO ESCORT DUTY HERE
-- startMan0l1Content(player, quest);
-- For now just skip the sequence
quest:StartSequence(SEQ_050);
callClientFunction(player, "delegateEvent", player, quest, "processEvent605");
player:EndEvent();
quest:StartSequence(SEQ_055);
GetWorldManager():DoZoneChange(player, 128, "PrivateAreaMasterPast", 2, 15, 137.44, 60.33, 1322.0, -1.60);
return;
end
player:EndEvent();
end
elseif (sequence == SEQ_065) then
if (classId == FSH_TRIGGER) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent620");
-- Give 3000 gil
player:EndEvent();
quest:StartSequence(SEQ_075);
end
elseif (sequence == SEQ_085) then
if (classId == ECHO_EXIT_TRIGGER2) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent635");
player:EndEvent();
quest:UpdateENPCs();
GetWorldManager():WarpToPublicArea(player);
end
end end
end end
function onEmote(player, quest, npc, eventName)
local data = quest:GetData();
local sequence = quest:getSequence();
local classId = npc:GetActorClassId();
-- Play the emote
if (eventName == "emoteDefault1") then -- Bow
player:DoEmote(npc.Id, 5, 21041);
elseif (eventName == "emoteDefault2") then -- Clap
player:DoEmote(npc.Id, 7, 21061);
elseif (eventName == "emoteDefault3") then -- Congratulate
player:DoEmote(npc.Id, 29, 21281);
elseif (eventName == "emoteDefault4") then -- Poke
player:DoEmote(npc.Id, 28, 21271);
elseif (eventName == "emoteDefault5") then -- Joy
player:DoEmote(npc.Id, 18, 21171);
elseif (eventName == "emoteDefault6") then -- Wave
player:DoEmote(npc.Id, 16, 21151);
end
wait(2.5);
-- Handle the result
if (sequence == SEQ_040) then
if (classId == SISIPU_EMOTE) then
local emoteTestStep = data:GetCounter(CNTR_SEQ40_FSH);
-- Bow
if (emoteTestStep == 1) then
if (eventName == "emoteDefault1") then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_7");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_2");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
data:IncCounter(CNTR_SEQ40_FSH);
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_1");
end
-- Clap
elseif (emoteTestStep == 2) then
if (eventName == "emoteDefault2") then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_7");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_3");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
data:IncCounter(CNTR_SEQ40_FSH);
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_2");
end
-- Congratulate
elseif (emoteTestStep == 3) then
if (eventName == "emoteDefault3") then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_7");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_4");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
data:IncCounter(CNTR_SEQ40_FSH);
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_3");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
end
-- Poke
elseif (emoteTestStep == 4) then
if (eventName == "emoteDefault4") then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_7");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_5");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
data:IncCounter(CNTR_SEQ40_FSH);
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_4");
end
-- Joy
elseif (emoteTestStep == 5) then
if (eventName == "emoteDefault5") then
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_7");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_6");
player:SendGameMessage(GetWorldMaster(), 25083, MESSAGE_TYPE_SYSTEM, 1);
data:IncCounter(CNTR_SEQ40_FSH);
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_5");
end
-- Wave
elseif (emoteTestStep == 6) then
if (eventName == "emoteDefault6") then
callClientFunction(player, "delegateEvent", player, quest, "processEvent602");
player:EndEvent();
GetWorldManager():WarpToPublicArea(player);
quest:StartSequence(SEQ_048);
return;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_8");
callClientFunction(player, "delegateEvent", player, quest, "processEvent601_6");
end
end
end
end
player:EndEvent();
quest:UpdateENPCs();
end
function onNotice(player, quest, target) function onNotice(player, quest, target)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
@ -316,7 +637,6 @@ function onNpcLS(player, quest, npcLSId)
if (npcLSId == 1) then if (npcLSId == 1) then
player:SetNpcLS(1, 1); player:SetNpcLS(1, 1);
if (sequence == SEQ_003) then if (sequence == SEQ_003) then
player:SendGameMessageLocalizedDisplayName(quest, 298, 39, 1000015, nil); player:SendGameMessageLocalizedDisplayName(quest, 298, 39, 1000015, nil);
endTutorialMode(player); endTutorialMode(player);
@ -325,15 +645,39 @@ function onNpcLS(player, quest, npcLSId)
player:SendGameMessageLocalizedDisplayName(quest, 81, 39, 1000015, nil); player:SendGameMessageLocalizedDisplayName(quest, 81, 39, 1000015, nil);
player:SendGameMessageLocalizedDisplayName(quest, 82, 39, 1000015, nil); player:SendGameMessageLocalizedDisplayName(quest, 82, 39, 1000015, nil);
quest:StartSequence(SEQ_035); quest:StartSequence(SEQ_035);
elseif (sequence == SEQ_070) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent625");
player:EndEvent();
quest:StartSequence(SEQ_075);
elseif (sequence == SEQ_090) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent637");
player:EndEvent();
quest:StartSequence(SEQ_092);
end end
end end
end end
function startMan0l1Content(player, quest)
quest:StartSequence(SEQ_050);
callClientFunction(player, "delegateEvent", player, quest, "processEvent604");
player:EndEvent();
local contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "Man0l101", "SimpleContent30002", "Quest/QuestDirectorMan0l101");
if (contentArea == nil) then
return;
end
local director = contentArea:GetContentDirector();
player:AddDirector(director);
director:StartDirector(true);
GetWorldManager():DoZoneChangeContent(player, contentArea, -63.25, 33.15, 164.51, 0.8, 16);
end
function getJournalInformation(player, quest) function getJournalInformation(player, quest)
return 0, quest:GetData():GetCounter(CNTR_SEQ7_CUL) * 5, quest:GetData():GetCounter(CNTR_SEQ7_MRD) * 5; return 0, quest:GetData():GetCounter(CNTR_SEQ7_CUL) * 5, quest:GetData():GetCounter(CNTR_SEQ7_MRD) * 5;
end end
function getJournalMapMarkerList(player, quest) function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence(); local sequence = quest:getSequence();

View File

@ -104,11 +104,15 @@ function onFinish(player, quest)
end end
function onStateChange(player, quest, sequence) function onStateChange(player, quest, sequence)
local data = quest:GetData();
if (sequence == SEQ_000) then if (sequence == SEQ_000) then
-- Setup states incase we loaded in. -- Setup states incase we loaded in.
<<<<<<< HEAD
local data = quest:GetData(); local data = quest:GetData();
=======
>>>>>>> origin/ioncannon/quest_system
local asciliaCanPush = not data:GetFlag(FLAG_SEQ000_MINITUT0); local asciliaCanPush = not data:GetFlag(FLAG_SEQ000_MINITUT0);
local asciliaFlag = data:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE; local asciliaFlag = data:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE;
local fretfulfarmhandFlag = data:GetFlag(FLAG_SEQ000_MINITUT2) and QFLAG_NONE or QFLAG_PLATE; local fretfulfarmhandFlag = data:GetFlag(FLAG_SEQ000_MINITUT2) and QFLAG_NONE or QFLAG_PLATE;
@ -137,7 +141,10 @@ function onStateChange(player, quest, sequence)
quest:SetENpc(OPENING_STOPER_ULDAH, QFLAG_NONE, false, false, true); quest:SetENpc(OPENING_STOPER_ULDAH, QFLAG_NONE, false, false, true);
elseif (sequence == SEQ_010) then elseif (sequence == SEQ_010) then
<<<<<<< HEAD
local data = quest:GetData(); local data = quest:GetData();
=======
>>>>>>> origin/ioncannon/quest_system
local yayatokiFlag = data:GetFlag(FLAG_SEQ010_TALK0) and QFLAG_NONE or QFLAG_PLATE; local yayatokiFlag = data:GetFlag(FLAG_SEQ010_TALK0) and QFLAG_NONE or QFLAG_PLATE;
local uldahopeningexitFlag = QFLAG_MAP; local uldahopeningexitFlag = QFLAG_MAP;
quest:SetENpc(KEEN_EYED_MERCHANT); quest:SetENpc(KEEN_EYED_MERCHANT);
@ -166,10 +173,14 @@ function onTalk(player, quest, npc)
end end
function onPush(player, quest, npc) function onPush(player, quest, npc)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
local classId = npc:GetActorClassId(); local classId = npc:GetActorClassId();
<<<<<<< HEAD
local data = quest:GetData(); local data = quest:GetData();
=======
local data = quest:GetData();
>>>>>>> origin/ioncannon/quest_system
if (sequence == SEQ_000) then if (sequence == SEQ_000) then
if (classId == ASCILIA) then if (classId == ASCILIA) then
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal002"); callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal002");
@ -211,6 +222,7 @@ function onNotice(player, quest, target)
end end
function seq000_onTalk(player, quest, npc, classId) function seq000_onTalk(player, quest, npc, classId)
<<<<<<< HEAD
local data = quest:GetData(); local data = quest:GetData();
if (classId == ASCILIA) then if (classId == ASCILIA) then
@ -220,6 +232,17 @@ function seq000_onTalk(player, quest, npc, classId)
else else
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini001"); callClientFunction(player, "delegateEvent", player, quest, "processTtrMini001");
data:SetFlag(FLAG_SEQ000_MINITUT1); -- Ascilia has now been talked to. data:SetFlag(FLAG_SEQ000_MINITUT1); -- Ascilia has now been talked to.
=======
local data = quest:GetData();
if (classId == ASCILIA) then
if (not data:GetFlag(FLAG_SEQ000_MINITUT0)) then -- If Talk tutorial
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal003");
quest:GetData():SetFlag(FLAG_SEQ000_MINITUT0); -- Used to disable her PushEvent / Allow for her next TalkEvent
else
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini001");
quest:GetData():SetFlag(FLAG_SEQ000_MINITUT1); -- Ascilia has now been talked to.
>>>>>>> origin/ioncannon/quest_system
end end
elseif (classId == FRETFUL_FARMHAND) then elseif (classId == FRETFUL_FARMHAND) then
@ -260,7 +283,10 @@ function seq000_onTalk(player, quest, npc, classId)
end end
function seq010_onTalk(player, quest, npc, classId) function seq010_onTalk(player, quest, npc, classId)
<<<<<<< HEAD
local data = quest:GetData(); local data = quest:GetData();
=======
>>>>>>> origin/ioncannon/quest_system
if (classId == KEEN_EYED_MERCHANT) then if (classId == KEEN_EYED_MERCHANT) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2"); callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2");
elseif (classId == HIGH_SPIRITED_FELLOW) then elseif (classId == HIGH_SPIRITED_FELLOW) then
@ -276,9 +302,15 @@ function seq010_onTalk(player, quest, npc, classId)
elseif (classId == FULL_LIPPED_FILLE) then elseif (classId == FULL_LIPPED_FILLE) then
callClientFunction(player, "delegateEvent", player, quest, "processEtc002"); callClientFunction(player, "delegateEvent", player, quest, "processEtc002");
elseif (classId == YAYATOKI) then elseif (classId == YAYATOKI) then
<<<<<<< HEAD
if (not data:GetFlag(FLAG_SEQ010_TALK0)) then if (not data:GetFlag(FLAG_SEQ010_TALK0)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8"); callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8");
data:SetFlag(FLAG_SEQ010_TALK0); data:SetFlag(FLAG_SEQ010_TALK0);
=======
if (not quest:GetData():GetFlag(FLAG_SEQ010_TALK0)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8");
quest:GetData():SetFlag(FLAG_SEQ010_TALK0);
>>>>>>> origin/ioncannon/quest_system
else else
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8"); callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8");
end end
@ -289,11 +321,15 @@ end
function getJournalMapMarkerList(player, quest) function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence(); local sequence = quest:getSequence();
local data = quest:GetData();
local possibleMarkers = {}; local possibleMarkers = {};
local data = quest:GetData(); local data = quest:GetData();
if (sequence == SEQ_000) then if (sequence == SEQ_000) then
<<<<<<< HEAD
=======
>>>>>>> origin/ioncannon/quest_system
if (data:GetFlag(FLAG_SEQ000_MINITUT0)) then if (data:GetFlag(FLAG_SEQ000_MINITUT0)) then
if (not data:GetFlag(FLAG_SEQ000_MINITUT1)) then table.insert(possibleMarkers, MRKR_ASCILIA); end if (not data:GetFlag(FLAG_SEQ000_MINITUT1)) then table.insert(possibleMarkers, MRKR_ASCILIA); end
if (not data:GetFlag(FLAG_SEQ000_MINITUT2)) then table.insert(possibleMarkers, MRKR_FRETFUL_FARMHAND); end if (not data:GetFlag(FLAG_SEQ000_MINITUT2)) then table.insert(possibleMarkers, MRKR_FRETFUL_FARMHAND); end
@ -313,7 +349,11 @@ end
<<<<<<< HEAD
function doExitTrigger(player, quest, npc) function doExitTrigger(player, quest, npc)
=======
function doExitTrigger(player, quest, npc)
>>>>>>> origin/ioncannon/quest_system
quest:GetData():ClearData(); quest:GetData():ClearData();
quest:StartSequence(SEQ_005); quest:StartSequence(SEQ_005);
contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0u01", "SimpleContent30079", "Quest/QuestDirectorMan0u001"); contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0u01", "SimpleContent30079", "Quest/QuestDirectorMan0u001");

View File

@ -59,8 +59,6 @@ Phase:
--]] --]]
-- Sequence Numbers -- Sequence Numbers
SEQ_000 = 0; -- Ul'dah Adventurer's Guild SEQ_000 = 0; -- Ul'dah Adventurer's Guild
SEQ_005 = 5; -- Run to Camp Black Brush & Attune SEQ_005 = 5; -- Run to Camp Black Brush & Attune
@ -83,7 +81,6 @@ SEQ_100 = 100;
SEQ_105 = 105; SEQ_105 = 105;
SEQ_110 = 110; SEQ_110 = 110;
-- Actor Class Ids -- Actor Class Ids
OVERCOMPETITIVE_ADVENTURER = 1000807; OVERCOMPETITIVE_ADVENTURER = 1000807;
MOMODI = 1000841; MOMODI = 1000841;
@ -93,8 +90,6 @@ GREEDY_MERCHANT = 1000937;
LIONHEARTED_ADVENTURER = 1000938; LIONHEARTED_ADVENTURER = 1000938;
SPRY_SALESMAN = 1000939; SPRY_SALESMAN = 1000939;
UPBEAT_ADVENTURER = 1000940; UPBEAT_ADVENTURER = 1000940;
SEEMINGLY_CALM_ADVENTURER = 1000941; SEEMINGLY_CALM_ADVENTURER = 1000941;
UNKNOWN1 = 0; UNKNOWN1 = 0;

View File

@ -0,0 +1,301 @@
require ("global")
--[[
Quest Script
Name: The House Always Wins
Code: Pgl200
Id: 110060
Prereq: Level 20, Pugilist
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to Titinin.
SEQ_005 = 5; -- Head to the GSM guild and talk to Esperaunce 3 times.
SEQ_010 = 10; -- Warp into a duty; pickup coins.
SEQ_015 = 15; -- Head to the ADV guild and talk to the Wise Miser. Journal Data 3: Set to 1 if talked to Titinin.
SEQ_025 = 25; -- Head to the PGL guild entrence and talk to Lady Lewena. Journal Data 4: Set to 1 if talked to Titinin.
SEQ_030 = 30; -- Head to GLA guild and warp into the duty and fight. Journal Data 5: Set to 1 once you win the fight.
SEQ_035 = 35; -- Return to Titinin.
-- Actor Class Ids
ENPC_GAGARUNA = 1000862;
ENPC_TITININ = 1000934;
ENPC_NAIDA_ZAMAIDA = 1000955;
ENPC_SINGLETON = 1001445;
ENPC_TRIGGER_GSM = 1090058;
ENPC_TRIGGER_PGL = 1090042;
ENPC_PRIVAREA_EXIT = 1290002;
-- PGL Actors
ENPC_MELISIE = 1001009;
ENPC_GUNNULF = 1001256;
ENPC_SHAMANI = 1001012;
ENPC_HALSTEIN = 1001007;
ENPC_HEIBERT = 1001257;
ENPC_IPAGHLO = 1001260;
-- GSM Actors
ENPC_SULTRY_STRUMPET = 1000952;
ENPC_BEAUTEOUS_BEAUTY = 1000953;
ENPC_ESPERAUNCE = 1000954;
-- Quest Markers
MRKR_TITININ = 11006001;
MRKR_OBJECTIVE = 11006002;
MRKR_ESPERAUNCE1 = 11006003;
MRKR_ESPERAUNCE2 = 11006004;
MRKR_NAIDA_ZAMADIA = 11006005;
MRKR_OBJECTIVE2 = 11006006;
MRKR_SINGLETON = 11006007;
MRKR_TITININ2 = 11006008;
-- Quest Details
ITEM_PLATINUM_LEDGER = 11000134;
ITEM_KINGOFPLOTS_GIL = 11000097;
ITEM_WISEMISER_GIL = 11000098;
ITEM_LEWENA_GIL = 11000099;
COUNTER_005 = 0;
COUNTER_015 = 1;
COUNTER_025 = 2;
COUNTER_030 = 3;
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(ENPC_GAGARUNA, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_TITININ, QFLAG_PLATE);
quest:SetENpc(ENPC_GAGARUNA);
quest:SetENpc(ENPC_MELISIE);
quest:SetENpc(ENPC_GUNNULF);
quest:SetENpc(ENPC_SHAMANI);
quest:SetENpc(ENPC_HALSTEIN);
quest:SetENpc(ENPC_HEIBERT);
quest:SetENpc(ENPC_IPAGHLO);
elseif (sequence == SEQ_005) then
quest:SetENpc(ENPC_TITININ);
quest:SetENpc(ENPC_GAGARUNA);
quest:SetENpc(ENPC_SULTRY_STRUMPET);
quest:SetENpc(ENPC_BEAUTEOUS_BEAUTY);
quest:SetENpc(ENPC_ESPERAUNCE, QFLAG_PLATE);
quest:SetENpc(ENPC_TRIGGER_GSM, QFLAG_NONE, false, true);
quest:SetENpc(ENPC_PRIVAREA_EXIT, QFLAG_NONE, false, true);
elseif (sequence == SEQ_010) then
quest:SetENpc(ENPC_SULTRY_STRUMPET);
quest:SetENpc(ENPC_BEAUTEOUS_BEAUTY);
quest:SetENpc(ENPC_ESPERAUNCE);
elseif (sequence == SEQ_015) then
quest:SetENpc(ENPC_TITININ);
quest:SetENpc(ENPC_NAIDA_ZAMAIDA, QFLAG_PLATE);
quest:SetENpc(ENPC_GAGARUNA);
elseif (sequence == SEQ_025) then
quest:SetENpc(ENPC_TITININ);
quest:SetENpc(ENPC_GAGARUNA);
quest:SetENpc(ENPC_TRIGGER_PGL, QFLAG_MAP, false, true);
elseif (sequence == SEQ_030) then
quest:SetENpc(ENPC_TITININ);
quest:SetENpc(ENPC_GAGARUNA);
quest:SetENpc(ENPC_SINGLETON, QFLAG_PLATE);
elseif (sequence == SEQ_035) then
quest:SetENpc(ENPC_TITININ, QFLAG_REWARD);
quest:SetENpc(ENPC_GAGARUNA);
quest:SetENpc(ENPC_MELISIE);
quest:SetENpc(ENPC_GUNNULF);
quest:SetENpc(ENPC_SHAMANI);
quest:SetENpc(ENPC_HALSTEIN);
quest:SetENpc(ENPC_HEIBERT);
quest:SetENpc(ENPC_IPAGHLO);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
local data = quest:GetData();
-- Offer the quest
if (npcClassId == ENPC_GAGARUNA and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventGagarunaStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_TITININ) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
player:SendGameMessage(GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM, ITEM_PLATINUM_LEDGER, 1);
quest:StartSequence(SEQ_005);
elseif (npcClassId == ENPC_GAGARUNA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2");
elseif (npcClassId == ENPC_IPAGHLO) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_3");
elseif (npcClassId == ENPC_HALSTEIN) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_4");
elseif (npcClassId == ENPC_MELISIE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_5");
elseif (npcClassId == ENPC_HEIBERT) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_6");
elseif (npcClassId == ENPC_GUNNULF) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_7");
elseif (npcClassId == ENPC_SHAMANI) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_8");
end
elseif (seq == SEQ_005) then
if (npcClassId == ENPC_ESPERAUNCE) then
local talkCount = data:IncCounter(COUNTER_005);
if (talkCount == 1) then
player:SendGameMessage(quest, 117, MESSAGE_TYPE_SYSTEM);
elseif (talkCount == 2) then
player:SendGameMessage(quest, 118, MESSAGE_TYPE_SYSTEM);
elseif (talkCount >= 3) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020");
quest:StartSequence(SEQ_010); -- Temp until Duty is finished. Should go to a duty here.
end
elseif (npcClassId == ENPC_TITININ) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_2");
elseif (npcClassId == ENPC_GAGARUNA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_3");
elseif (npcClassId == ENPC_SULTRY_STRUMPET) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_4");
elseif (npcClassId == ENPC_BEAUTEOUS_BEAUTY) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_5");
end
elseif (seq == SEQ_010) then
if (npcClassId == ENPC_ESPERAUNCE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2");
callClientFunction(player, "delegateEvent", player, quest, "processEvent030");
quest:StartSequence(SEQ_015); -- Temp until Duty is finished.
player:SendGameMessage(GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM, ITEM_KINGOFPLOTS_GIL, 1);
player:EndEvent();
GetWorldManager():WarpToPublicArea(player);
return;
elseif (npcClassId == ENPC_SULTRY_STRUMPET) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_3");
elseif (npcClassId == ENPC_BEAUTEOUS_BEAUTY) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_4");
end
elseif (seq == SEQ_015) then
if (npcClassId == ENPC_NAIDA_ZAMAIDA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent040");
quest:StartSequence(SEQ_025);
player:SendGameMessage(GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM, ITEM_WISEMISER_GIL, 1);
elseif (npcClassId == ENPC_TITININ) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent030_2");
data:SetCounter(COUNTER_015, 1);
elseif (npcClassId == ENPC_GAGARUNA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent030_3");
end
elseif (seq == SEQ_025) then
if (npcClassId == ENPC_PUSH_PGL) then
elseif (npcClassId == ENPC_TITININ) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent040_2");
data:SetCounter(COUNTER_025, 1);
elseif (npcClassId == ENPC_GAGARUNA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent040_3");
end
elseif (seq == SEQ_030) then
if (npcClassId == ENPC_SINGLETON) then
local enterDuty = callClientFunction(player, "delegateEvent", player, quest, "processEvent050_4");
if (enterDuty == 1) then
--Enter duty at this point....
callClientFunction(player, "delegateEvent", player, quest, "processEvent060");
data:SetCounter(COUNTER_030, 1);
quest:StartSequence(SEQ_035); -- Temp until Duty is finished.
player:SendGameMessage(GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM, ITEM_LEWENA_GIL, 1);
GetWorldManager():DoZoneChange(player, 209, nil, 0, 0x2, -192.0, 194.5, 193.785, 3.0);
end
elseif (npcClassId == ENPC_TITININ) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent050_2");
elseif (npcClassId == ENPC_GAGARUNA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent050_3");
end
elseif (seq == SEQ_035) then
if (npcClassId == ENPC_TITININ) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent070");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 2)
player:CompleteQuest(quest);
elseif (npcClassId == ENPC_GAGARUNA) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent060_2");
elseif (npcClassId == ENPC_IPAGHLO) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent060_3");
elseif (npcClassId == ENPC_HALSTEIN) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent060_4");
elseif (npcClassId == ENPC_MELISIE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent060_5");
elseif (npcClassId == ENPC_HEIBERT) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent060_6");
elseif (npcClassId == ENPC_GUNNULF) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent060_7");
elseif (npcClassId == ENPC_SHAMANI) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent060_8");
end
end
quest:UpdateENPCs();
player:EndEvent();
end
function onPush(player, quest, npc)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
local data = quest:GetData();
if (seq == SEQ_005) then
player:EndEvent();
if (npcClassId == ENPC_TRIGGER_GSM) then
GetWorldManager():WarpToPrivateArea(player, "PrivateAreaMasterPast", 5);
elseif (npcClassId == ENPC_PRIVAREA_EXIT) then
GetWorldManager():WarpToPublicArea(player);
end
elseif (seq == SEQ_025) then
if (npcClassId == ENPC_TRIGGER_PGL) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent050");
quest:StartSequence(SEQ_030);
player:EndEvent();
end
end
end
function getJournalInformation(player, quest)
local data = quest:GetData();
return 0, data:GetCounter(COUNTER_015), data:GetCounter(COUNTER_025), data:GetCounter(COUNTER_030);
end
function getJournalMapMarkerList(player, quest)
local seq = quest:getSequence();
local data = quest:GetData();
if (seq == SEQ_000) then
return MRKR_TITININ;
elseif (seq == SEQ_005) then
return MRKR_ESPERAUNCE1;
elseif (seq == SEQ_010) then
return MRKR_OBJECTIVE;
elseif (seq == SEQ_015) then
if (data:GetCounter(COUNTER_015) == 1) then
return MRKR_NAIDA_ZAMADIA;
end
elseif (seq == SEQ_025) then
if (data:GetCounter(COUNTER_025) == 1) then
return MRKR_OBJECTIVE2;
end
elseif (seq == SEQ_030) then
return MRKR_SINGLETON;
elseif (seq == SEQ_035) then
return MRKR_TITININ2;
end
return;
end

View File

@ -0,0 +1,101 @@
require ("global")
--[[
Quest Script
Name: In the Name of Science
Code: Wld0g1
Id: 110762
Prereq: Level 10, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Kill Sabletooth Spriggans.
SEQ_001 = 1; -- Talk to Marcette.
-- Actor Class Ids
ENPC_MARCETTE = 1001583;
BNPC_SABLETOOTH_SPRIGGAN = 2106214;
-- Quest Markers
MRKR_MARCETTE = 11120001;
MRKR_SPRIGGAN_AREA = 11120002;
-- Counters
COUNTER_TEETH = 0;
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(ENPC_MARCETTE, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_MARCETTE);
quest:SetENpc(BNPC_SABLETOOTH_SPRIGGAN);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_MARCETTE, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_MARCETTE and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventAtellouneStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_MARCETTE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_2");
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_MARCETTE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_SABLETOOTH_SPRIGGAN) then
local counterAmount = quest:GetData():IncCounter(COUNTER_TEETH);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You have passed on word of the rite. (... of 5)
if (counterAmount >= 4) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_TEETH);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_SPRIGGAN_AREA;
elseif (sequence == SEQ_001) then
return MRKR_MARCETTE;
end
end

View File

@ -0,0 +1,164 @@
require("global");
--[[
Quest Script
Name: Hearing Confession
Code: Wld0g2
Id: 110763
Prereq: Level 10 on any class.
Notes: Rewards 200 gil
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to the four lost souls.
SEQ_001 = 1; -- Return to Swaenhylt
-- Actor Class Ids
SWAENHYLT = 1001582;
FLAVIELLE = 1001459;
KEKETO = 1001346;
CEADDA = 1000330;
THIMM = 1001439;
-- Quest Markers
MRKR_FLAVIELLE = 11120101;
MRKR_KEKETO = 11120102;
MRKR_CEADDA = 11120103;
MRKR_THIMM = 11120104;
MRKR_SWAENHYLT = 11120105;
-- Quest Flags
FLAG_TALKED_FLAVIELLE = 0;
FLAG_TALKED_KEKETO = 1;
FLAG_TALKED_CEADDA = 2;
FLAG_TALKED_THIMM = 3;
-- Quest Counters
COUNTER_TALKED = 0;
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(SWAENHYLT, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
local data = quest:GetData();
quest:SetENpc(SWAENHYLT);
quest:SetENpc(FLAVIELLE, (not data:GetFlag(FLAG_TALKED_FLAVIELLE) and QFLAG_PLATE or QFLAG_NONE));
quest:SetENpc(KEKETO, (not data:GetFlag(FLAG_TALKED_KEKETO) and QFLAG_PLATE or QFLAG_NONE));
quest:SetENpc(CEADDA, (not data:GetFlag(FLAG_TALKED_CEADDA) and QFLAG_PLATE or QFLAG_NONE));
quest:SetENpc(THIMM, (not data:GetFlag(FLAG_TALKED_THIMM) and QFLAG_PLATE or QFLAG_NONE));
elseif (sequence == SEQ_001) then
quest:SetENpc(SWAENHYLT, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc)
local sequence = quest:getSequence();
local classId = npc:GetActorClassId();
if (sequence == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventSwaenhyltStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
elseif (sequence == SEQ_000) then
local incCounter = false;
local data = quest:GetData();
if (classId == SWAENHYLT) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_2");
elseif (classId == FLAVIELLE) then
if (not data:GetFlag(FLAG_TALKED_FLAVIELLE)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005");
data:SetFlag(FLAG_TALKED_FLAVIELLE);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_2");
end
elseif (classId == KEKETO) then
if (not data:GetFlag(FLAG_TALKED_KEKETO)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
data:SetFlag(FLAG_TALKED_KEKETO);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_2");
end
elseif (classId == CEADDA) then
if (not data:GetFlag(FLAG_TALKED_CEADDA)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent015");
data:SetFlag(FLAG_TALKED_CEADDA);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent015_2");
end
elseif (classId == THIMM) then
if (not data:GetFlag(FLAG_TALKED_THIMM)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020");
data:SetFlag(FLAG_TALKED_THIMM);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2");
end
end
-- Increase objective counter & play relevant messages
if (incCounter == true) then
local counterAmount = data:IncCounter(COUNTER_TALKED);
attentionMessage(player, 51063, 0, counterAmount, 4); -- You have heard a lost soul's confession. (... of 5)
if (seq000_checkCondition(data)) then -- All lost souls spoken to
attentionMessage(player, 25225, quest:GetQuestId()); -- "Hearing Confessions" objectives complete!
quest:UpdateENPCs(); -- Band-aid for a QFLAG_PLATE issue
quest:StartSequence(SEQ_001);
end
end
elseif (sequence == SEQ_001) then
if (classId == SWAENHYLT) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent025");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
player:EndEvent()
quest:UpdateENPCs();
end
-- Check if all souls are talked to
function seq000_checkCondition(data)
return (data:GetFlag(FLAG_TALKED_FLAVIELLE) and
data:GetFlag(FLAG_TALKED_KEKETO) and
data:GetFlag(FLAG_TALKED_CEADDA) and
data:GetFlag(FLAG_TALKED_THIMM));
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
local data = quest:GetData();
local possibleMarkers = {};
if (sequence == SEQ_000) then
if (not data:GetFlag(FLAG_TALKED_FLAVIELLE)) then table.insert(possibleMarkers, MRKR_FLAVIELLE); end
if (not data:GetFlag(FLAG_TALKED_KEKETO)) then table.insert(possibleMarkers, MRKR_KEKETO); end
if (not data:GetFlag(FLAG_TALKED_CEADDA)) then table.insert(possibleMarkers, MRKR_CEADDA); end
if (not data:GetFlag(FLAG_TALKED_THIMM)) then table.insert(possibleMarkers, MRKR_THIMM); end
elseif (sequence == SEQ_001) then
table.insert(possibleMarkers, MRKR_SWAENHYLT);
end
return unpack(possibleMarkers)
end

View File

@ -0,0 +1,104 @@
require ("global")
--[[
Quest Script
Name: A Bitter Oil to Swallow
Code: Wld0g3
Id: 110764
Prereq: Level 17, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Kill Oilbugs.
SEQ_001 = 1; -- Talk to Eugenaire.
-- Actor Class Ids
ENPC_EUGENAIRE = 1001190;
BNPC_OILBUG = 2103910;
-- Quest Markers
MRKR_EUGENAIRE = 11120201;
MRKR_OILBUG_AREA = 11120202;
-- Counters
COUNTER_OIL = 0;
-- Quest Details
OBJECTIVE_OIL = 8;
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(ENPC_EUGENAIRE, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_EUGENAIRE);
quest:SetENpc(BNPC_OILBUG);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_EUGENAIRE, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_EUGENAIRE and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventEugenaireStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_EUGENAIRE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_000");
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_EUGENAIRE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent_010");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_OILBUG) then
local counterAmount = quest:GetData():IncCounter(COUNTER_OIL);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
if (counterAmount >= OBJECTIVE_OIL) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_OIL);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_OILBUG_AREA;
elseif (sequence == SEQ_001) then
return MRKR_EUGENAIRE;
end
end

View File

@ -0,0 +1,104 @@
require ("global")
--[[
Quest Script
Name: Spores on the Brain
Code: Wld0g4
Id: 110765
Prereq: Level 11, Any Class, Requires "In the Name of Science"
]]
-- Sequence Numbers
SEQ_000 = 0; -- Kill Mature Funguars.
SEQ_001 = 1; -- Talk to Marcette.
-- Actor Class Ids
ENPC_MARCETTE = 1001583;
BNPC_MATURE_FUNGUAR = 2105916;
-- Quest Markers
MRKR_MARCETTE = 11120302;
MRKR_FUNGUAR_AREA = 11120301;
-- Counters
COUNTER_SPORESAC = 0;
-- Quest Details
OBJECTIVE_SPORESAC = 8;
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(ENPC_MARCETTE, QFLAG_PLATE);
elseif (sequence == SEQ_000) then
quest:SetENpc(ENPC_MARCETTE);
quest:SetENpc(BNPC_MATURE_FUNGUAR);
elseif (sequence == SEQ_001) then
quest:SetENpc(ENPC_MARCETTE, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == ENPC_MARCETTE and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventMarcetteStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
-- Quest Progress
elseif (seq == SEQ_000) then
if (npcClassId == ENPC_MARCETTE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_2");
end
--Quest Complete
elseif (seq == SEQ_001) then
if (npcClassId == ENPC_MARCETTE) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
quest:UpdateENPCs();
player:EndEvent();
end
-- TODO FINISH THIS
function onKillBNpc(player, quest, bnpc)
if (bnpc == BNPC_MATURE_FUNGUAR) then
local counterAmount = quest:GetData():IncCounter(COUNTER_SPORESAC);
attentionMessage(player, 51062, 0, counterAmount, 4); -- You obtain <item>
if (counterAmount >= OBJECTIVE_SPORESAC) then
attentionMessage(player, 25225, quest:GetQuestId()); -- Objectives complete!
quest:StartSequence(SEQ_001);
end
end
end
function getJournalInformation(player, quest)
return quest:GetData():GetCounter(COUNTER_SPORESAC);
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
return MRKR_FUNGUAR_AREA;
elseif (sequence == SEQ_001) then
return MRKR_MARCETTE;
end
end

View File

@ -0,0 +1,93 @@
require ("global")
--[[
Quest Script
Name: Trading Tongueflaps
Code: Wld0l1
Id: 110771
Prereq: Level 5, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to Ryssfloh.
SEQ_001 = 1; -- Talk to Sweetnix Rosycheeks.
-- Actor Class Ids
SWEETNIX = 1001573;
RYSSFLOH = 1000359;
-- Quest Markers
MRKR_RYSSFLOH = 11110001;
MRKR_SWEETNIX = 11110002;
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(SWEETNIX, QFLAG_PLATE);
end
if (sequence == SEQ_000) then
quest:SetENpc(SWEETNIX);
quest:SetENpc(RYSSFLOH, QFLAG_PLATE);
elseif (sequence == SEQ_001) then
quest:SetENpc(RYSSFLOH);
quest:SetENpc(SWEETNIX, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == SWEETNIX and not player:HasQuest(quest)) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventSweetnixStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
end
-- Quest Progress
if (seq == SEQ_000) then
if (npcClassId == SWEETNIX) then
callClientFunction(player, "delegateEvent", player, quest, "followEvent005");
elseif (npcClassId == RYSSFLOH) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
quest:StartSequence(SEQ_001);
end
elseif (seq == SEQ_001) then
--Quest Complete
if (npcClassId == SWEETNIX) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
elseif (npcClassId == RYSSFLOH) then
callClientFunction(player, "delegateEvent", player, quest, "followEvent015");
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_RYSSFLOH;
elseif (sequence == SEQ_001) then
return MRKR_SWEETNIX;
end
end

View File

@ -0,0 +1,164 @@
require("global");
--[[
Quest Script
Name: Letting Out Orion's Belt
Code: Wld0l2
Id: 110772
Prereq: Level 10 on any class.
Notes: Rewards 200 gil
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to the four gourmands.
SEQ_001 = 1; -- Return to Ahldskyf.
-- Actor Class Ids
AHLDSKYF = 1000332;
FZHUMII = 1000226;
SHOSHOMA = 1000334;
DACA_JINJAHL = 1000202;
AENTFOET = 1000064;
-- Quest Markers
MRKR_FZHUMII = 11110101;
MRKR_SHOSHOMA = 11110102;
MRKR_DACA_JINJAHL = 11110103;
MRKR_AENTFOET = 11110104;
MRKR_AHLDSKYF = 11110105;
-- Quest Flags
FLAG_TALKED_FZHUMII = 0;
FLAG_TALKED_SHOSHOMA = 1;
FLAG_TALKED_DACA_JINJAHL = 2;
FLAG_TALKED_AENTFOET = 3;
-- Quest Counters
COUNTER_TALKED = 0;
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);
elseif (sequence == SEQ_000) then
local data = quest:GetData();
quest:SetENpc(AHLDSKYF);
quest:SetENpc(FZHUMII, (not data:GetFlag(FLAG_TALKED_FZHUMII) and QFLAG_PLATE or QFLAG_NONE));
quest:SetENpc(SHOSHOMA, (not data:GetFlag(FLAG_TALKED_SHOSHOMA) and QFLAG_PLATE or QFLAG_NONE));
quest:SetENpc(DACA_JINJAHL, (not data:GetFlag(FLAG_TALKED_DACA_JINJAHL) and QFLAG_PLATE or QFLAG_NONE));
quest:SetENpc(AENTFOET, (not data:GetFlag(FLAG_TALKED_AENTFOET) and QFLAG_PLATE or QFLAG_NONE));
elseif (sequence == SEQ_001) then
quest:SetENpc(AHLDSKYF, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc)
local sequence = quest:getSequence();
local classId = npc:GetActorClassId();
if (sequence == SEQ_ACCEPT and classId == AHLDSKYF) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventAhldskyffStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
elseif (sequence == SEQ_000) then
local incCounter = false;
local data = quest:GetData();
if (classId == AHLDSKYF) then
callClientFunction(player, "delegateEvent", player, quest, "processEventAhldskyffStart_1");
elseif (classId == FZHUMII) then
if (not data:GetFlag(FLAG_TALKED_FZHUMII)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000");
data:SetFlag(FLAG_TALKED_FZHUMII);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_1");
end
elseif (classId == SHOSHOMA) then
if (not data:GetFlag(FLAG_TALKED_SHOSHOMA)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent005");
data:SetFlag(FLAG_TALKED_SHOSHOMA);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent005_1");
end
elseif (classId == DACA_JINJAHL) then
if (not data:GetFlag(FLAG_TALKED_DACA_JINJAHL)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
data:SetFlag(FLAG_TALKED_KEKETO);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_1");
end
elseif (classId == AENTFOET) then
if (not data:GetFlag(FLAG_TALKED_AENTFOET)) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent015");
data:SetFlag(FLAG_TALKED_AENTFOET);
incCounter = true;
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent015_1");
end
end
-- Increase objective counter & play relevant messages
if (incCounter == true) then
local counterAmount = data:IncCounter(COUNTER_TALKED);
attentionMessage(player, 51063, 0, counterAmount, 4); -- ????. (... of 5)
if (seq000_checkCondition(data)) then -- All lost souls spoken to
attentionMessage(player, 25225, quest:GetQuestId()); -- "Letting Out Orion's Belt" objectives complete!
quest:UpdateENPCs(); -- Band-aid for a QFLAG_PLATE issue
quest:StartSequence(SEQ_001);
end
end
elseif (sequence == SEQ_001) then
if (classId == AHLDSKYF) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
end
end
player:EndEvent()
quest:UpdateENPCs();
end
-- Check if all souls are talked to
function seq000_checkCondition(data)
return (data:GetFlag(FLAG_TALKED_FZHUMII) and
data:GetFlag(FLAG_TALKED_SHOSHOMA) and
data:GetFlag(FLAG_TALKED_DACA_JINJAHL) and
data:GetFlag(FLAG_TALKED_AENTFOET));
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
local data = quest:GetData();
local possibleMarkers = {};
if (sequence == SEQ_000) then
if (not data:GetFlag(FLAG_TALKED_FZHUMII)) then table.insert(possibleMarkers, MRKR_FZHUMII); end
if (not data:GetFlag(FLAG_TALKED_SHOSHOMA)) then table.insert(possibleMarkers, MRKR_SHOSHOMA); end
if (not data:GetFlag(FLAG_TALKED_DACA_JINJAHL)) then table.insert(possibleMarkers, MRKR_DACA_JINJAHL); end
if (not data:GetFlag(FLAG_TALKED_AENTFOET)) then table.insert(possibleMarkers, MRKR_AENTFOET); end
elseif (sequence == SEQ_001) then
table.insert(possibleMarkers, MRKR_AHLDSKYF);
end
return unpack(possibleMarkers)
end

View File

@ -0,0 +1,93 @@
require ("global")
--[[
Quest Script
Name: Sniffing Out a Profit
Code: Wld0l3
Id: 110773
Prereq: Level 17, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to Lolojo.
SEQ_001 = 1; -- Talk to Syzfrusk.
-- Actor Class Ids
SYZFRUSK = 1001306;
LOLOJO = 1001603;
-- Quest Markers
MRKR_LOLOJO = 11110201;
MRKR_SYZFRUSK = 11110202;
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(SYZFRUSK, QFLAG_PLATE);
end
if (sequence == SEQ_000) then
quest:SetENpc(SYZFRUSK);
quest:SetENpc(LOLOJO, QFLAG_PLATE);
elseif (sequence == SEQ_001) then
quest:SetENpc(LOLOJO);
quest:SetENpc(SYZFRUSK, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == SYZFRUSK and not player:HasQuest(quest)) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventOffersStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
end
-- Quest Progress
if (seq == SEQ_000) then
if (npcClassId == SYZFRUSK) then
callClientFunction(player, "delegateEvent", player, quest, "processEventFree");
elseif (npcClassId == LOLOJO) then
callClientFunction(player, "delegateEvent", player, quest, "processlolojoEvent");
quest:StartSequence(SEQ_001);
end
elseif (seq == SEQ_001) then
--Quest Complete
if (npcClassId == SYZFRUSK) then
callClientFunction(player, "delegateEvent", player, quest, "processEventClear");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
elseif (npcClassId == LOLOJO) then
callClientFunction(player, "delegateEvent", player, quest, "processlolojoEventFree");
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_LOLOJO;
elseif (sequence == SEQ_001) then
return MRKR_SYZFRUSK;
end
end

View 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

View File

@ -0,0 +1,93 @@
require ("global")
--[[
Quest Script
Name: Of Archons and Muses
Code: Wld0u1
Id: 110753
Prereq: Level 10, Any Class
]]
-- Sequence Numbers
SEQ_000 = 0; -- Talk to Lyngwaek.
SEQ_001 = 1; -- Talk to Tyago Moui.
-- Actor Class Ids
TYAGO_MOUI = 1001203;
LYNGWAEK = 1000647;
-- Quest Markers
MRKR_LYNGWAEK = 11130001;
MRKR_TYAGO_MOUI = 11130002;
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(TYAGO_MOUI, QFLAG_PLATE);
end
if (sequence == SEQ_000) then
quest:SetENpc(MRKR_TYAGO_MOUI);
quest:SetENpc(LYNGWAEK, QFLAG_PLATE);
elseif (sequence == SEQ_001) then
quest:SetENpc(LYNGWAEK);
quest:SetENpc(TYAGO_MOUI, QFLAG_REWARD);
end
end
function onTalk(player, quest, npc, eventName)
local npcClassId = npc.GetActorClassId();
local seq = quest:GetSequence();
-- Offer the quest
if (npcClassId == MRKR_TYAGO_MOUI and seq == SEQ_ACCEPT) then
local questAccepted = callClientFunction(player, "delegateEvent", player, quest, "processEventTyagomouiStart");
if (questAccepted == 1) then
player:AcceptQuest(quest);
end
player:EndEvent();
return;
end
-- Quest Progress
if (seq == SEQ_000) then
if (npcClassId == MRKR_TYAGO_MOUI) then
callClientFunction(player, "delegateEvent", player, quest, "followEvent005");
elseif (npcClassId == LYNGWAEK) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
quest:StartSequence(SEQ_001);
end
elseif (seq == SEQ_001) then
--Quest Complete
if (npcClassId == MRKR_TYAGO_MOUI) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020");
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
player:CompleteQuest(quest);
elseif (npcClassId == LYNGWAEK) then
callClientFunction(player, "delegateEvent", player, quest, "followEvent015");
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_LYNGWAEK;
elseif (sequence == SEQ_001) then
return MRKR_TYAGO_MOUI;
end
end

View File

@ -1,28 +0,0 @@
require ("global")
require ("ally")
function onSpawn(ally)
ally:SetMaxHP(69420)
ally:SetHP(ally:GetMaxHP())
ally.isAutoAttackEnabled = false;
ally.neutral = false
end
function onCombatTick(ally, target, tick, contentGroupCharas)
allyGlobal.onCombatTick(ally, target, tick, contentGroupCharas);
end
function onRoam(ally, contentGroupCharas)
ally.detectionType = 0xFF
ally.isMovingToSpawn = false
ally.neutral = false
ally.animationId = 0
allyGlobal.onCombatTick(ally, nil, nil, contentGroupCharas)
end
function tryAggro(ally, contentGroupCharas)
allyGlobal.tryAggro(ally, contentGroupCharas)
end

View File

@ -1,26 +0,0 @@
require ("global")
require ("ally")
function onSpawn(ally)
ally:SetMaxHP(69420)
ally:SetHP(ally:GetMaxHP())
ally.isAutoAttackEnabled = false
ally.neutral = false
end
function onCombatTick(ally, target, tick, contentGroupCharas)
allyGlobal.onCombatTick(ally, target, tick, contentGroupCharas)
end
function tryAggro(ally, contentGroupCharas)
allyGlobal.tryAggro(ally, contentGroupCharas)
end
function onRoam(ally, contentGroupCharas)
ally.detectionType = 0xFF
ally.isMovingToSpawn = false
ally.neutral = false
ally.animationId = 0
--allyGlobal.onCombatTick(ally, contentGroupCharas)
end

View File

@ -1,12 +0,0 @@
require ("global")
require ("quests/man/man0g0")
function onEventStarted(player, npc, triggerName)
if (triggerName == "caution") then
worldMaster = GetWorldMaster();
player:SendGameMessage(player, worldMaster, 34109, 0x20);
elseif (triggerName == "exit") then
GetWorldManager():DoPlayerMoveInZone(player, 356.09, 3.74, -701.62, -1.4);
end
player:EndEvent();
end

View File

@ -1,19 +0,0 @@
require ("global")
require ("quests/man/man0g0")
function onEventStarted(player, npc, triggerName)
man0g0Quest = player:GetQuest("Man0g0");
if (triggerName == "talkDefault") then
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == false) then
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent000_3", nil, nil, nil);
man0g0Quest:SetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1, true);
man0g0Quest:SaveData();
npc:SetQuestGraphic(player, 0x0);
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
else
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil);
end
end
player:EndEvent();
end

View File

@ -1,59 +0,0 @@
require ("global")
require ("quests/man/man0g0")
function onSpawn(player, npc)
npc:SetQuestGraphic(player, 0x2);
end
function onEventStarted(player, npc, triggerName)
man0g0Quest = player:GetQuest("Man0g0");
print("Got Quest Man0g0");
if (man0g0Quest ~= nil) then
print("Man0g0Quest is not nil");
if (triggerName == "pushDefault") then
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrNomal002", nil, nil, nil);
elseif (triggerName == "talkDefault") then
--Is doing talk tutorial?
if (man0g0Quest:GetQuestFlag(MAN0L0_FLAG_STARTED_TALK_TUT) == false) then
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrNomal003", nil, nil, nil);
player:SetEventStatus(npc, "pushDefault", false, 0x2);
npc:SetQuestGraphic(player, 0x0);
man0g0Quest:SetQuestFlag(MAN0L0_FLAG_STARTED_TALK_TUT, true);
man0g0Quest:SaveData();
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
--Was she talked to after papalymo?
else
print("Making content area");
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then
player:EndEvent();
contentArea = player:GetZone():CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0g01", "SimpleContent30010", "Quest/QuestDirectorMan0g001");
if (contentArea == nil) then
player:EndEvent();
return;
end
director = contentArea:GetContentDirector();
--player:AddDirector(director);
director:StartDirector(false);
player:KickEvent(director, "noticeEvent", true);
player:SetLoginDirector(director);
print("Content area and director made");
player:ChangeState(0);
GetWorldManager():DoZoneChangeContent(player, contentArea, 362.4087, 4, -703.8168, 1.5419, 16);
print("Zone Change");
return;
else
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent000_1", nil, nil, nil);
end
end
end
end
player:EndEvent();
end

View File

@ -1,10 +0,0 @@
require ("global")
function init(npc)
return false, false, 0, 0, 0x1eb, 0x2;
end
function onEventStarted(player, npc)
callClientFunction(player, "askEnterInstanceRaid", 16);
player:endEvent();
end

View File

@ -1,10 +0,0 @@
require ("global")
function init(npc)
return false, false, 0, 0, 0x1eb, 0x2;
end
function onEventStarted(player, npc)
callClientFunction(player, "askEnterInstanceRaid", 15);
player:endEvent();
end

View File

@ -1,5 +0,0 @@
require ("global")
function init(npc)
return false, false, 0, 0, 0x141, 0xcde;
end

View File

@ -1,5 +0,0 @@
require ("global")
function init(npc)
return false, false, 0, 0, 0x187, 0x2;
end

View File

@ -1,2 +0,0 @@
function onDeath(monster, player, lastAttacker)
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultFst = GetStaticActor("DftFst");
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_dauremant_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultFst = GetStaticActor("DftFst");
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_hodder_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,5 +0,0 @@
require ("global")
function init(npc)
return false, false, 0, 0, 0x141, 0xb79;
end

View File

@ -1,14 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g0");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent020_3");
end
end
player:EndEvent();
end

View File

@ -1,14 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g0");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent020_4");
end
end
player:EndEvent();
end

View File

@ -1,14 +0,0 @@
require ("global")
function init(player, npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
man0g0Quest = player:GetQuest("Man0g0");
if (man0g0Quest ~= nil) then
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrBlkNml001", nil, nil, nil);
GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 109.966, 7.559, -1206.117, -2.7916);
end
player:EndEvent();
end

View File

@ -1,16 +0,0 @@
require ("global")
require ("quests/man/man0g0")
function onSpawn(player, npc)
npc:SetQuestGraphic(player, 0x3);
end
function onEventStarted(player, npc)
man0g1Quest = GetStaticActor("Man0g1");
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent100");
player:ReplaceQuest(110005, 110006);
player:SendGameMessage(GetStaticActor("Man0g1"), 353, 0x20);
player:SendGameMessage(GetStaticActor("Man0g1"), 354, 0x20);
GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 2, 15, 67.034, 4, -1205.6497, -1.074);
player:endEvent();
end

View File

@ -1,14 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g0Quest = player:GetQuest("Man0g0");
if (man0g0Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent020_6");
end
end
player:EndEvent();
end

View File

@ -1,15 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g0");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent020_2");
end
end
player:EndEvent();
end

View File

@ -1,19 +0,0 @@
require ("global")
function onSpawn(player, npc)
npc:SetQuestGraphic(player, 0x2);
end
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g0");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent020_5");
npc:SetQuestGraphic(player, 0x0);
end
end
player:EndEvent();
end

View File

@ -1,14 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g1");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent100_3");
end
end
player:EndEvent();
end

View File

@ -1,14 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g1");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent100_6");
end
end
player:EndEvent();
end

View File

@ -1,26 +0,0 @@
require ("global")
function onSpawn(player, npc)
npc:SetQuestGraphic(player, 0x2);
end
function onEventStarted(player, npc, triggerName)
local man0g1Quest = player:GetQuest("Man0g1");
local pos = player:GetPos();
if (man0g1Quest ~= nil) then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent110");
player:EndEvent();
--[[director = player:GetZone():CreateDirector("AfterQuestWarpDirector");
player:KickEvent(director, "noticeEvent", true);
player:AddDirector(director);
player:SetLoginDirector(director);
--]]
GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, pos[0], pos[1], pos[2], pos[3]);
return;
end
player:EndEvent();
end

View File

@ -1,14 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g1");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent100_2");
end
end
player:EndEvent();
end

View File

@ -1,15 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g1");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent100_7");
end
end
player:EndEvent();
end

View File

@ -1,14 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g1");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent100_9");
end
end
player:EndEvent();
end

View File

@ -1,8 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
defaultFst = GetStaticActor("DftFst");
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithVkorolon_001");
player:EndEvent();
end

View File

@ -1,14 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g1");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent100_4");
end
end
player:EndEvent();
end

View File

@ -1,14 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0g1Quest = player:GetQuest("Man0g1");
if (man0g1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0g1Quest, "processEvent100_8");
end
end
player:EndEvent();
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x141, 0xB84;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x141, 0xB83;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x141, 0xB81;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x141, 0xB7D;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x14b, 0x14aa;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x141, 0xB7E;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x141, 0xB80;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x141, 0xB7F;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x141, 0xB82;
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultFst = GetStaticActor("DftFst");
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkLouisoix_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,11 +0,0 @@
function onZoneInit(zone)
end
function onZoneIn(player)
end
function onZoneOut(zone, player)
end

View File

@ -1,5 +0,0 @@
require ("global")
function init(npc)
return false, false, 0, 0, 0x1415, 201;
end

View File

@ -1,5 +0,0 @@
require ("global")
function init(npc)
return false, false, 0, 0, 0x1415, 201;
end

View File

@ -1,15 +0,0 @@
require ("global")
function onEventStarted(player, npc)
floorChoice = callClientFunction(player, "elevatorAskLimsa001", 0);
if (floorChoice == 1) then
callClientFunction(player, "elevatorAskLimsa001", 1);
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -447, 40, 220, -1.574);
elseif (floorChoice == 2) then
callClientFunction(player, "elevatorAskLimsa001", 2);
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -458, 92, 175, -0.383);
end
player:EndEvent();
end

View File

@ -1,15 +0,0 @@
require ("global")
function onEventStarted(player, npc)
floorChoice = callClientFunction(player, "elevatorAskLimsa002", 0);
if (floorChoice == 1) then
callClientFunction(player, "elevatorAskLimsa002", 1);
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -447, 19, 220, -1.574);
elseif (floorChoice == 2) then
callClientFunction(player, "elevatorAskLimsa002", 2);
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -458, 92, 175, -0.383);
end
player:EndEvent();
end

View File

@ -1,15 +0,0 @@
require ("global")
function onEventStarted(player, npc)
floorChoice = callClientFunction(player, "elevatorAskLimsa003", 0);
if (floorChoice == 1) then
callClientFunction(player, "elevatorAskLimsa003", 1);
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -447, 19, 220, -1.574);
elseif (floorChoice == 2) then
callClientFunction(player, "elevatorAskLimsa003", 2);
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -447, 40, 220, -1.574);
end
player:EndEvent();
end

View File

@ -1,13 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0l1Quest = player:GetQuest("Man0l1");
if (man0l1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEtc001");
player:EndEvent();
end
end
end

View File

@ -1,13 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0l1Quest = player:GetQuest("Man0l1");
if (man0l1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEtc003");
player:EndEvent();
end
end
end

View File

@ -1,13 +0,0 @@
require ("global")
function onEventStarted(player, npc, triggerName)
man0l1Quest = player:GetQuest("Man0l1");
if (man0l1Quest ~= nil) then
if (triggerName == "talkDefault") then
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEtc002");
player:EndEvent();
end
end
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x79, 0x96C;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x79, 0x96A;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x79, 0x96D;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x79, 0x970;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x79, 0x974;
end

View File

@ -1,3 +0,0 @@
function init(npc)
return false, false, 0, 0, 0x79, 0x972;
end

Some files were not shown because too many files have changed in this diff Show More