mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
Merge remote-tracking branch 'origin/ioncannon/quest_system' into Jorge/quest_system
This commit is contained in:
commit
594e08f990
84 changed files with 2660 additions and 1279 deletions
|
@ -23,7 +23,7 @@ end
|
|||
|
||||
function onEventStarted(player, npc, eventType, eventName)
|
||||
local defaultTalk = player:GetDefaultTalkQuest(npc);
|
||||
local tutorialTalk = player:GetTutorialQuest(npc);
|
||||
local tutorialTalk = player:GetTutorialQuest(npc);
|
||||
local activeQuests = player:GetQuestsForNpc(npc);
|
||||
local possibleQuests = {};
|
||||
|
||||
|
|
58
Data/scripts/commands/gm/completedQuest.lua
Normal file
58
Data/scripts/commands/gm/completedQuest.lua
Normal file
|
@ -0,0 +1,58 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "dd",
|
||||
description =
|
||||
[[
|
||||
Sets if a quest is completed.
|
||||
!completedQuest <questId> true/false
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, questId, flag)
|
||||
|
||||
print("HEY");
|
||||
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local sender = "[completedQuest] ";
|
||||
local message = "Error";
|
||||
|
||||
if (argc < 1) then
|
||||
return;
|
||||
end
|
||||
|
||||
local questId = tonumber(questId);
|
||||
local flag = flag or nil;
|
||||
|
||||
-- Fail if not valid questId
|
||||
if (questId < 110001 or questId > 110001 + 2048) then
|
||||
player:SendMessage(messageID, sender, "Invalid questId entered");
|
||||
return;
|
||||
end
|
||||
|
||||
-- Getting
|
||||
if (arc == 1) then
|
||||
player:SendMessage(messageID, sender, string.format("Quest %d completion is set to: %s", questId, tostring(player:IsQuestCompleted(questId))));
|
||||
return;
|
||||
-- Setting
|
||||
else
|
||||
-- Fail if not valid flag
|
||||
if (not flag == nil) then
|
||||
player:SendMessage(messageID, sender, "Invalid flag entered");
|
||||
else
|
||||
local boolFlag = false;
|
||||
|
||||
if (flag == "true" or flag == "1" or flag == "on" or flag == "O") then
|
||||
boolFlag = true;
|
||||
elseif (flag == "false" or flag == "0" or flag == "off" or flag == "X") then
|
||||
boolFlag = false;
|
||||
elseif flag == "flip" or flag == "toggle" then
|
||||
boolFlag = not player:IsQuestCompleted(questId);
|
||||
end
|
||||
|
||||
player:SetQuestComplete(questId, boolFlag);
|
||||
player:SendMessage(messageID, sender, string.format("Quest %d completion set to: %s", questId, tostring(player:IsQuestCompleted(questId))));
|
||||
return;
|
||||
end
|
||||
end
|
||||
end
|
|
@ -66,7 +66,7 @@ function onTrigger(player, argc, command, var1, var2, var3)
|
|||
|
||||
local flagStr = "";
|
||||
for i=0,31,1 do
|
||||
if (quest:GetFlag(i)) then
|
||||
if (quest:GetData():GetFlag(i)) then
|
||||
flagStr = flagStr .. "O";
|
||||
else
|
||||
flagStr = flagStr .. "X";
|
||||
|
@ -76,10 +76,12 @@ function onTrigger(player, argc, command, var1, var2, var3)
|
|||
end
|
||||
end
|
||||
|
||||
local data = quest:GetData();
|
||||
|
||||
message = string.format("\nInfo for quest %s [%d]\n", quest.Name, quest:GetQuestId());
|
||||
message = message .. string.format("Current Sequence: %d\n", quest:getSequence());
|
||||
message = message .. string.format("Flags: \n%s\n", flagStr)
|
||||
message = message .. string.format("Counters: %d,%d,%d,%d", quest:getCounter(0), quest:getCounter(1), quest:getCounter(2), quest:getCounter(3));
|
||||
message = message .. string.format("Counters: %d,%d,%d,%d", data:getCounter(0), data:getCounter(1), data:getCounter(2), data:getCounter(3));
|
||||
else
|
||||
message = ("Quest not active: "..var1);
|
||||
end
|
||||
|
@ -118,7 +120,7 @@ function onTrigger(player, argc, command, var1, var2, var3)
|
|||
boolvar = false;
|
||||
elseif var3 == "flip" or var3 == "toggle" then
|
||||
if player:HasQuest(questvar) == true then
|
||||
boolvar = not player:GetQuest(questvar):GetFlag(flagvar);
|
||||
boolvar = not player:GetQuest(questvar):GetData():GetFlag(flagvar);
|
||||
end
|
||||
else
|
||||
message = ("error: flag: boolean not recognized");
|
||||
|
@ -126,13 +128,13 @@ function onTrigger(player, argc, command, var1, var2, var3)
|
|||
return;
|
||||
end
|
||||
|
||||
var4 = player:GetQuest(questvar):GetFlag(flagvar);
|
||||
var4 = player:GetQuest(questvar):GetData():GetFlag(flagvar);
|
||||
|
||||
if var4 ~= boolvar then
|
||||
if (boolvar == true) then
|
||||
player:GetQuest(questvar):SetFlag(flagvar);
|
||||
player:GetQuest(questvar):GetData():SetFlag(flagvar);
|
||||
else
|
||||
player:GetQuest(questvar):ClearFlag(flagvar);
|
||||
player:GetQuest(questvar):GetData():ClearFlag(flagvar);
|
||||
end
|
||||
player:GetQuest(questvar):UpdateENPCs();
|
||||
player:GetQuest(questvar):SaveData();
|
||||
|
@ -152,7 +154,7 @@ function onTrigger(player, argc, command, var1, var2, var3)
|
|||
questvar = tonumber(var1);
|
||||
index = (tonumber(var2));
|
||||
|
||||
player:GetQuest(questvar):SetCounter(index, tonumber(var3));
|
||||
player:GetQuest(questvar):GetData():SetCounter(index, tonumber(var3));
|
||||
player:GetQuest(questvar):UpdateENPCs();
|
||||
player:GetQuest(questvar):SaveData();
|
||||
message = ("changing counter "..tonumber(var2).." to "..var3);
|
||||
|
|
|
@ -41,8 +41,6 @@ FLAG_TALKED_LEFWYNE = 4;
|
|||
-- Quest Counters
|
||||
COUNTER_TALKED = 0;
|
||||
|
||||
--offerQuestResult = callClientFunction(player, "delegateEvent", player, quest, "processEventOffersStart");
|
||||
|
||||
function onStart(player, quest)
|
||||
quest:StartSequence(SEQ_000);
|
||||
end
|
||||
|
@ -50,79 +48,93 @@ end
|
|||
function onFinish(player, quest)
|
||||
end
|
||||
|
||||
function onSequence(player, quest, sequence)
|
||||
function onStateChange(player, quest, sequence)
|
||||
if (sequence == 65535) then
|
||||
quest:SetENpc(KINNISON, QFLAG_PLATE);
|
||||
end
|
||||
|
||||
local data = quest:GetData();
|
||||
if (sequence == SEQ_000) then
|
||||
quest:AddENpc(KINNISON);
|
||||
quest:AddENpc(SYBELL, (not quest:GetFlag(FLAG_TALKED_SYBELL) and QFLAG_PLATE or QFLAG_NONE));
|
||||
quest:AddENpc(KHUMA_MOSHROCA, (not quest:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA) and QFLAG_PLATE or QFLAG_NONE));
|
||||
quest:AddENpc(NELLAURE, (not quest:GetFlag(FLAG_TALKED_NELLAURE) and QFLAG_PLATE or QFLAG_NONE));
|
||||
quest:AddENpc(MESTONNAUX, (not quest:GetFlag(FLAG_TALKED_MESTONNAUX) and QFLAG_PLATE or QFLAG_NONE));
|
||||
quest:AddENpc(LEFWYNE, (not quest:GetFlag(FLAG_TALKED_LEFWYNE) and QFLAG_PLATE or QFLAG_NONE));
|
||||
quest:SetENpc(KINNISON);
|
||||
quest:SetENpc(SYBELL, (not data:GetFlag(FLAG_TALKED_SYBELL) and QFLAG_PLATE or QFLAG_NONE));
|
||||
quest:SetENpc(KHUMA_MOSHROCA, (not data:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA) and QFLAG_PLATE or QFLAG_NONE));
|
||||
quest:SetENpc(NELLAURE, (not data:GetFlag(FLAG_TALKED_NELLAURE) and QFLAG_PLATE or QFLAG_NONE));
|
||||
quest:SetENpc(MESTONNAUX, (not data:GetFlag(FLAG_TALKED_MESTONNAUX) and QFLAG_PLATE or QFLAG_NONE));
|
||||
quest:SetENpc(LEFWYNE, (not data:GetFlag(FLAG_TALKED_LEFWYNE) and QFLAG_PLATE or QFLAG_NONE));
|
||||
elseif (sequence == SEQ_001) then
|
||||
quest:AddENpc(KINNISON, QFLAG_PLATE);
|
||||
quest:SetENpc(KINNISON, QFLAG_PLATE);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function onTalk(player, quest, npc, eventName)
|
||||
local npcClassId = npc.GetActorClassId();
|
||||
local seq = quest:GetSequence();
|
||||
local incCounter = false;
|
||||
|
||||
-- Offer the quest
|
||||
if (npcClassId == KINNISON 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 == KINNISON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventOffersAfter");
|
||||
elseif (npcClassId == SYBELL) then
|
||||
if (not quest:GetFlag(FLAG_TALKED_SYBELL)) then
|
||||
if (not data:GetFlag(FLAG_TALKED_SYBELL)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventSybellSpeak");
|
||||
quest:SetFlag(FLAG_TALKED_SYBELL);
|
||||
data:SetFlag(FLAG_TALKED_SYBELL);
|
||||
incCounter = true;
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventSybellSpeakAfter");
|
||||
end
|
||||
elseif (npcClassId == KHUMA_MOSHROCA) then
|
||||
if (not quest:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA)) then
|
||||
if (not data:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventKhumaSpeak");
|
||||
quest:SetFlag(FLAG_TALKED_KHUMA_MOSHROCA);
|
||||
data:SetFlag(FLAG_TALKED_KHUMA_MOSHROCA);
|
||||
incCounter = true;
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventKhumaSpeakAfter");
|
||||
end
|
||||
elseif (npcClassId == NELLAURE) then
|
||||
if (not quest:GetFlag(FLAG_TALKED_NELLAURE)) then
|
||||
if (not data:GetFlag(FLAG_TALKED_NELLAURE)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventNellaureSpeak");
|
||||
quest:SetFlag(FLAG_TALKED_NELLAURE);
|
||||
data:SetFlag(FLAG_TALKED_NELLAURE);
|
||||
incCounter = true;
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventNellaureSpeakAfter");
|
||||
end
|
||||
elseif (npcClassId == MESTONNAUX) then
|
||||
if (not quest:GetFlag(FLAG_TALKED_MESTONNAUX)) then
|
||||
if (not data:GetFlag(FLAG_TALKED_MESTONNAUX)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventMestonnauxSpeak");
|
||||
quest:SetFlag(FLAG_TALKED_MESTONNAUX);
|
||||
data:SetFlag(FLAG_TALKED_MESTONNAUX);
|
||||
incCounter = true;
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventMestonnauxSpeakAfter");
|
||||
end
|
||||
elseif (npcClassId == LEFWYNE) then
|
||||
if (not quest:GetFlag(FLAG_TALKED_LEFWYNE)) then
|
||||
if (not data:GetFlag(FLAG_TALKED_LEFWYNE)) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventLefwyneSpeak");
|
||||
quest:SetFlag(FLAG_TALKED_LEFWYNE);
|
||||
data:SetFlag(FLAG_TALKED_LEFWYNE);
|
||||
incCounter = true;
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventLefwyneSpeakAfter");
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- Increase objective counter & play relevant messages
|
||||
if (incCounter == true) then
|
||||
quest:IncCounter(COUNTER_TALKED);
|
||||
local counterAmount = quest:GetCounter(COUNTER_TALKED);
|
||||
local counterAmount = data:IncCounter(COUNTER_TALKED);
|
||||
|
||||
attentionMessage(player, 51061, 0, counterAmount, 5); -- You have heard word of the Seedseers. (... of 5)
|
||||
|
||||
if (seq000_checkCondition(quest)) then -- All Seers spoken to
|
||||
if (seq000_checkCondition(data)) then -- All Seers spoken to
|
||||
attentionMessage(player, 25225, 110674); -- "Seeing the Seers" objectives complete!
|
||||
quest:UpdateENPCs(); -- Band-aid for a QFLAG_PLATE issue
|
||||
quest:StartSequence(SEQ_001);
|
||||
|
@ -134,7 +146,7 @@ function onTalk(player, quest, npc, eventName)
|
|||
if (npcClassId == KINNISON) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEventClear");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
|
||||
player:CompleteQuest(quest:GetQuestId());
|
||||
player:CompleteQuest(quest);
|
||||
end
|
||||
end
|
||||
quest:UpdateENPCs();
|
||||
|
@ -143,12 +155,12 @@ end
|
|||
|
||||
|
||||
-- Check if all seers are talked to
|
||||
function seq000_checkCondition(quest)
|
||||
return (quest:GetFlag(FLAG_TALKED_SYBELL) and
|
||||
quest:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA) and
|
||||
quest:GetFlag(FLAG_TALKED_NELLAURE) and
|
||||
quest:GetFlag(FLAG_TALKED_MESTONNAUX) and
|
||||
quest:GetFlag(FLAG_TALKED_LEFWYNE));
|
||||
function seq000_checkCondition(data)
|
||||
return (data:GetFlag(FLAG_TALKED_SYBELL) and
|
||||
data:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA) and
|
||||
data:GetFlag(FLAG_TALKED_NELLAURE) and
|
||||
data:GetFlag(FLAG_TALKED_MESTONNAUX) and
|
||||
data:GetFlag(FLAG_TALKED_LEFWYNE));
|
||||
end
|
||||
|
||||
|
||||
|
@ -157,11 +169,11 @@ function getJournalMapMarkerList(player, quest)
|
|||
local possibleMarkers = {};
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
if (not quest:GetFlag(FLAG_TALKED_SYBELL)) then table.insert(possibleMarkers, MRKR_SYBELL); end
|
||||
if (not quest:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA)) then table.insert(possibleMarkers, MRKR_KHUMA_MOSHROCA); end
|
||||
if (not quest:GetFlag(FLAG_TALKED_NELLAURE)) then table.insert(possibleMarkers, MRKR_NELLAURE); end
|
||||
if (not quest:GetFlag(FLAG_TALKED_MESTONNAUX)) then table.insert(possibleMarkers, MRKR_MESTONNAUX); end
|
||||
if (not quest:GetFlag(FLAG_TALKED_LEFWYNE)) then table.insert(possibleMarkers, MRKR_LEFWYNE); end
|
||||
if (not data:GetFlag(FLAG_TALKED_SYBELL)) then table.insert(possibleMarkers, MRKR_SYBELL); end
|
||||
if (not data:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA)) then table.insert(possibleMarkers, MRKR_KHUMA_MOSHROCA); end
|
||||
if (not data:GetFlag(FLAG_TALKED_NELLAURE)) then table.insert(possibleMarkers, MRKR_NELLAURE); end
|
||||
if (not data:GetFlag(FLAG_TALKED_MESTONNAUX)) then table.insert(possibleMarkers, MRKR_MESTONNAUX); end
|
||||
if (not data:GetFlag(FLAG_TALKED_LEFWYNE)) then table.insert(possibleMarkers, MRKR_LEFWYNE); end
|
||||
elseif (sequence == SEQ_001) then
|
||||
table.insert(possibleMarkers, MRKR_KINNISON);
|
||||
end
|
||||
|
|
|
@ -40,13 +40,13 @@ end
|
|||
|
||||
|
||||
|
||||
function onSequence(player, quest, sequence)
|
||||
function onStateChange(player, quest, sequence)
|
||||
if (sequence == SEQ_000) then
|
||||
quest:AddENpc(VKOROLON);
|
||||
quest:AddENpc(PFARAHR, QFLAG_PLATE);
|
||||
quest:SetENpc(VKOROLON);
|
||||
quest:SetENpc(PFARAHR, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_001) then
|
||||
quest:AddENpc(VKOROLON, QFLAG_PLATE);
|
||||
quest:AddENpc(PFARAHR);
|
||||
quest:SetENpc(VKOROLON, QFLAG_PLATE);
|
||||
quest:SetENpc(PFARAHR);
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ end
|
|||
function onFinish(player, quest)
|
||||
end
|
||||
|
||||
function onSequence(player, quest, sequence)
|
||||
function onStateChange(player, quest, sequence)
|
||||
if (sequence == SEQ_000) then
|
||||
-- Setup states incase we loaded in.
|
||||
local rostnsthalFlag = quest:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE;
|
||||
|
@ -72,34 +72,34 @@ function onSequence(player, quest, sequence)
|
|||
local exitCanPush = quest:GetFlags() == 0xF;
|
||||
local exitFlag = quest:GetFlags() == 0xF and QFLAG_MAP or QFLAG_NONE;
|
||||
|
||||
quest:AddENpc(WELLTRAVELED_MERCHANT);
|
||||
quest:AddENpc(TIPSY_ADVENTURER);
|
||||
quest:AddENpc(CULTIVATED_TENDER);
|
||||
quest:AddENpc(ANXIOUS_ADVENTURER);
|
||||
quest:AddENpc(BABYFACED_ADVENTURER, babyfaceFlag);
|
||||
quest:AddENpc(AUSTERE_ADVENTURER);
|
||||
quest:AddENpc(UNDIGNIFIED_ADVENTURER);
|
||||
quest:AddENpc(SHADOWY_TRAVELER);
|
||||
quest:AddENpc(ASTUTE_MERCHANT);
|
||||
quest:AddENpc(VOLUPTUOUS_VIXEN, vixenFlag);
|
||||
quest:AddENpc(INDIFFERENT_PASSERBY);
|
||||
quest:AddENpc(PRATTLING_ADVENTURER);
|
||||
quest:AddENpc(LANKY_TRAVELER);
|
||||
quest:AddENpc(GRINNING_ADVENTURER);
|
||||
quest:AddENpc(ROSTNSTHAL, rostnsthalFlag, true, rostnsthalCanPush);
|
||||
quest:AddENpc(EXIT_TRIGGER, exitFlag, false, exitCanPush);
|
||||
quest:SetENpc(WELLTRAVELED_MERCHANT);
|
||||
quest:SetENpc(TIPSY_ADVENTURER);
|
||||
quest:SetENpc(CULTIVATED_TENDER);
|
||||
quest:SetENpc(ANXIOUS_ADVENTURER);
|
||||
quest:SetENpc(BABYFACED_ADVENTURER, babyfaceFlag);
|
||||
quest:SetENpc(AUSTERE_ADVENTURER);
|
||||
quest:SetENpc(UNDIGNIFIED_ADVENTURER);
|
||||
quest:SetENpc(SHADOWY_TRAVELER);
|
||||
quest:SetENpc(ASTUTE_MERCHANT);
|
||||
quest:SetENpc(VOLUPTUOUS_VIXEN, vixenFlag);
|
||||
quest:SetENpc(INDIFFERENT_PASSERBY);
|
||||
quest:SetENpc(PRATTLING_ADVENTURER);
|
||||
quest:SetENpc(LANKY_TRAVELER);
|
||||
quest:SetENpc(GRINNING_ADVENTURER);
|
||||
quest:SetENpc(ROSTNSTHAL, rostnsthalFlag, true, rostnsthalCanPush);
|
||||
quest:SetENpc(EXIT_TRIGGER, exitFlag, false, exitCanPush);
|
||||
elseif (sequence == SEQ_005) then
|
||||
elseif (sequence == SEQ_010) then
|
||||
quest:AddENpc(HOB);
|
||||
quest:AddENpc(GERT);
|
||||
quest:AddENpc(LORHZANT);
|
||||
quest:AddENpc(MUSCLEBOUND_DECKHAND);
|
||||
quest:AddENpc(PEARLYTOOTHED_PORTER);
|
||||
quest:AddENpc(UNDIGNIFIED_ADVENTURER);
|
||||
quest:AddENpc(WELLTRAVELED_MERCHANT);
|
||||
quest:AddENpc(VOLUPTUOUS_VIXEN);
|
||||
quest:AddENpc(LANKY_TRAVELER);
|
||||
quest:AddENpc(PRIVAREA_PAST_EXIT, QFLAG_NONE, false, true);
|
||||
quest:SetENpc(HOB);
|
||||
quest:SetENpc(GERT);
|
||||
quest:SetENpc(LORHZANT);
|
||||
quest:SetENpc(MUSCLEBOUND_DECKHAND);
|
||||
quest:SetENpc(PEARLYTOOTHED_PORTER);
|
||||
quest:SetENpc(UNDIGNIFIED_ADVENTURER);
|
||||
quest:SetENpc(WELLTRAVELED_MERCHANT);
|
||||
quest:SetENpc(VOLUPTUOUS_VIXEN);
|
||||
quest:SetENpc(LANKY_TRAVELER);
|
||||
quest:SetENpc(PRIVAREA_PAST_EXIT, QFLAG_NONE, false, true);
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -85,56 +85,56 @@ end
|
|||
function onFinish(player, quest)
|
||||
end
|
||||
|
||||
function onSequence(player, quest, sequence)
|
||||
function onStateChange(player, quest, sequence)
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
quest:AddENpc(YSHTOLA);
|
||||
quest:AddENpc(CRAPULOUS_ADVENTURER);
|
||||
quest:AddENpc(DUPLICITOUS_TRADER);
|
||||
quest:AddENpc(DEBONAIR_PIRATE);
|
||||
quest:AddENpc(ONYXHAIRED_ADVENTURER);
|
||||
quest:AddENpc(SKITTISH_ADVENTURER);
|
||||
quest:AddENpc(RELAXING_ADVENTURER);
|
||||
quest:AddENpc(BADERON, QFLAG_PLATE);
|
||||
quest:AddENpc(MYTESYN);
|
||||
quest:AddENpc(COCKAHOOP_COCKSWAIN);
|
||||
quest:AddENpc(SENTENIOUS_SELLSWORD);
|
||||
quest:AddENpc(SOLICITOUS_SELLSWORD);
|
||||
quest:SetENpc(YSHTOLA);
|
||||
quest:SetENpc(CRAPULOUS_ADVENTURER);
|
||||
quest:SetENpc(DUPLICITOUS_TRADER);
|
||||
quest:SetENpc(DEBONAIR_PIRATE);
|
||||
quest:SetENpc(ONYXHAIRED_ADVENTURER);
|
||||
quest:SetENpc(SKITTISH_ADVENTURER);
|
||||
quest:SetENpc(RELAXING_ADVENTURER);
|
||||
quest:SetENpc(BADERON, QFLAG_PLATE);
|
||||
quest:SetENpc(MYTESYN);
|
||||
quest:SetENpc(COCKAHOOP_COCKSWAIN);
|
||||
quest:SetENpc(SENTENIOUS_SELLSWORD);
|
||||
quest:SetENpc(SOLICITOUS_SELLSWORD);
|
||||
elseif (sequence == SEQ_003) then
|
||||
quest:AddENpc(BADERON);
|
||||
quest:SetENpc(BADERON);
|
||||
elseif (sequence == SEQ_005) then
|
||||
quest:AddENpc(BADERON, QFLAG_PLATE);
|
||||
quest:SetENpc(BADERON, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_006) then
|
||||
quest:AddENpc(BADERON, QFLAG_PLATE);
|
||||
quest:SetENpc(BADERON, QFLAG_PLATE);
|
||||
elseif (sequence == SEQ_007) then
|
||||
local subseqCUL = quest:GetCounter(CNTR_SEQ7_CUL);
|
||||
local subseqMRD = quest:GetCounter(CNTR_SEQ7_MRD);
|
||||
|
||||
-- Always active in this seqence
|
||||
quest:AddENpc(BADERON);
|
||||
quest:AddENpc(CHARLYS, subseqCUL == 0 and QFLAG_PLATE or QFLAG_NONE);
|
||||
quest:SetENpc(BADERON);
|
||||
quest:SetENpc(CHARLYS, subseqCUL == 0 and QFLAG_PLATE or QFLAG_NONE);
|
||||
|
||||
-- Down and Up the MSK guild
|
||||
quest:AddENpc(ISANDOREL, (subseqMRD == 0 or subseqMRD == 2) and QFLAG_PLATE or QFLAG_NONE);
|
||||
quest:SetENpc(ISANDOREL, (subseqMRD == 0 or subseqMRD == 2) and QFLAG_PLATE or QFLAG_NONE);
|
||||
|
||||
if (subseqMRD == 1) then
|
||||
quest:AddENpc(MSK_TRIGGER, QFLAG_MAP, false, true);
|
||||
quest:SetENpc(MSK_TRIGGER, QFLAG_MAP, false, true);
|
||||
elseif (subseqMRD == 2) then
|
||||
quest:AddENpc(MERLZIRN);
|
||||
quest:SetENpc(MERLZIRN);
|
||||
end
|
||||
|
||||
-- In Echo
|
||||
quest:AddENpc(NERVOUS_BARRACUDA);
|
||||
quest:AddENpc(INTIMIDATING_BARRACUDA);
|
||||
quest:AddENpc(OVEREAGER_BARRACUDA);
|
||||
quest:AddENpc(SOPHISTICATED_BARRACUDA);
|
||||
quest:AddENpc(SMIRKING_BARRACUDA);
|
||||
quest:AddENpc(MANNSKOEN);
|
||||
quest:AddENpc(TOTORUTO);
|
||||
quest:AddENpc(ADVENTURER1);
|
||||
quest:AddENpc(ADVENTURER2);
|
||||
quest:AddENpc(ADVENTURER3);
|
||||
quest:AddENpc(ECHO_EXIT_TRIGGER, subseqMRD == 3 and QFLAG_MAP or QFLAG_NONE, false, subseqMRD == 3);
|
||||
quest:SetENpc(NERVOUS_BARRACUDA);
|
||||
quest:SetENpc(INTIMIDATING_BARRACUDA);
|
||||
quest:SetENpc(OVEREAGER_BARRACUDA);
|
||||
quest:SetENpc(SOPHISTICATED_BARRACUDA);
|
||||
quest:SetENpc(SMIRKING_BARRACUDA);
|
||||
quest:SetENpc(MANNSKOEN);
|
||||
quest:SetENpc(TOTORUTO);
|
||||
quest:SetENpc(ADVENTURER1);
|
||||
quest:SetENpc(ADVENTURER2);
|
||||
quest:SetENpc(ADVENTURER3);
|
||||
quest:SetENpc(ECHO_EXIT_TRIGGER, subseqMRD == 3 and QFLAG_MAP or QFLAG_NONE, false, subseqMRD == 3);
|
||||
|
||||
if (subseqCUL == 1 and subseqMRD == 4) then
|
||||
player:SetNpcLS(1, 1);
|
||||
|
|
|
@ -103,7 +103,7 @@ end
|
|||
function onFinish(player, quest)
|
||||
end
|
||||
|
||||
function onSequence(player, quest, sequence)
|
||||
function onStateChange(player, quest, sequence)
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
-- Setup states incase we loaded in.
|
||||
|
@ -119,34 +119,34 @@ function onSequence(player, quest, sequence)
|
|||
gildiggingmistressFlag = QFLAG_NONE;
|
||||
end
|
||||
|
||||
--AddENpc(classId, byte flagType=0,isTalkEnabled, isPushEnabled, isEmoteEnabled, isSpawned)
|
||||
quest:AddENpc(ASCILIA, asciliaFlag, true, asciliaCanPush);
|
||||
quest:AddENpc(WARBURTON);
|
||||
quest:AddENpc(RURURAJI);
|
||||
quest:AddENpc(BIG_BELLIED_BARKER);
|
||||
quest:AddENpc(FRETFUL_FARMHAND, fretfulfarmhandFlag);
|
||||
quest:AddENpc(DEBAUCHED_DEMONESS);
|
||||
quest:AddENpc(DAPPER_DAN);
|
||||
quest:AddENpc(LOUTISH_LAD);
|
||||
quest:AddENpc(GIL_DIGGING_MISTRESS, gildiggingmistressFlag);
|
||||
quest:AddENpc(TWITTERING_TOMBOY);
|
||||
quest:AddENpc(STOCKY_STRANGER);
|
||||
quest:AddENpc(EXIT_TRIGGER, exitFlag, false, true);
|
||||
quest:AddENpc(OPENING_STOPER_ULDAH, QFLAG_NONE, false, false, true);
|
||||
--SetENpc(classId, byte flagType=0,isTalkEnabled, isPushEnabled, isEmoteEnabled, isSpawned)
|
||||
quest:SetENpc(ASCILIA, asciliaFlag, true, asciliaCanPush);
|
||||
quest:SetENpc(WARBURTON);
|
||||
quest:SetENpc(RURURAJI);
|
||||
quest:SetENpc(BIG_BELLIED_BARKER);
|
||||
quest:SetENpc(FRETFUL_FARMHAND, fretfulfarmhandFlag);
|
||||
quest:SetENpc(DEBAUCHED_DEMONESS);
|
||||
quest:SetENpc(DAPPER_DAN);
|
||||
quest:SetENpc(LOUTISH_LAD);
|
||||
quest:SetENpc(GIL_DIGGING_MISTRESS, gildiggingmistressFlag);
|
||||
quest:SetENpc(TWITTERING_TOMBOY);
|
||||
quest:SetENpc(STOCKY_STRANGER);
|
||||
quest:SetENpc(EXIT_TRIGGER, exitFlag, false, true);
|
||||
quest:SetENpc(OPENING_STOPER_ULDAH, QFLAG_NONE, false, false, true);
|
||||
|
||||
elseif (sequence == SEQ_010) then
|
||||
local yayatokiFlag = quest:GetFlag(FLAG_SEQ010_TALK0) and QFLAG_NONE or QFLAG_PLATE;
|
||||
local uldahopeningexitFlag = QFLAG_MAP;
|
||||
quest:AddENpc(KEEN_EYED_MERCHANT);
|
||||
quest:AddENpc(HIGH_SPIRITED_FELLOW);
|
||||
quest:AddENpc(DISREPUTABLE_MIDLANDER);
|
||||
quest:AddENpc(LONG_LEGGED_LADY);
|
||||
quest:AddENpc(LARGE_LUNGED_LABORER);
|
||||
quest:AddENpc(TOOTH_GRINDING_TRAVELER);
|
||||
quest:AddENpc(FULL_LIPPED_FILLE);
|
||||
quest:AddENpc(YAYATOKI, yayatokiFlag);
|
||||
quest:AddENpc(BLOCKER, QFLAG_NONE, false, true);
|
||||
quest:AddENpc(ULDAH_OPENING_EXIT, uldahopeningexitFlag, false, true);
|
||||
quest:SetENpc(KEEN_EYED_MERCHANT);
|
||||
quest:SetENpc(HIGH_SPIRITED_FELLOW);
|
||||
quest:SetENpc(DISREPUTABLE_MIDLANDER);
|
||||
quest:SetENpc(LONG_LEGGED_LADY);
|
||||
quest:SetENpc(LARGE_LUNGED_LABORER);
|
||||
quest:SetENpc(TOOTH_GRINDING_TRAVELER);
|
||||
quest:SetENpc(FULL_LIPPED_FILLE);
|
||||
quest:SetENpc(YAYATOKI, yayatokiFlag);
|
||||
quest:SetENpc(BLOCKER, QFLAG_NONE, false, true);
|
||||
quest:SetENpc(ULDAH_OPENING_EXIT, uldahopeningexitFlag, false, true);
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -127,17 +127,17 @@ end
|
|||
function onFinish(player, quest)
|
||||
end
|
||||
|
||||
function onSequence(player, quest, sequence)
|
||||
function onStateChange(player, quest, sequence)
|
||||
|
||||
if (sequence == SEQ_000) then
|
||||
-- Setup states incase we loaded in.
|
||||
|
||||
--AddENpc(classId, byte flagType=0,isTalkEnabled, isPushEnabled, isEmoteEnabled, isSpawned)
|
||||
quest:AddENpc(MOMODI, QFLAG_PLATE);
|
||||
quest:AddENpc(OTOPA_POTTOPA);
|
||||
--SetENpc(classId, byte flagType=0,isTalkEnabled, isPushEnabled, isEmoteEnabled, isSpawned)
|
||||
quest:SetENpc(MOMODI, QFLAG_PLATE);
|
||||
quest:SetENpc(OTOPA_POTTOPA);
|
||||
|
||||
elseif (sequence == SEQ_005) then
|
||||
quest:AddENpc(MOMODI);
|
||||
quest:SetENpc(MOMODI);
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ end
|
|||
function onFinish(player, quest)
|
||||
end
|
||||
|
||||
function onSequence(player, quest, seqNum)
|
||||
function onStateChange(player, quest, seqNum)
|
||||
quest:ClearENpcs();
|
||||
end
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
require ("global")
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Getting Started (Mother Miounne)
|
||||
Code: Trl0g1
|
||||
Id: 110141
|
||||
|
||||
Enables the "Getting Started" option on Miounne.
|
||||
* NOTE: This quest is active for all players at all times.
|
||||
]]
|
||||
|
||||
function onTalk(player, quest, npc, eventName)
|
||||
local choice = callClientFunction(player, "delegateEvent", player, quest, "processEventMiounneStart");
|
||||
|
||||
if (choice == 1) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent225");
|
||||
elseif (choice == 2) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent230");
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function IsQuestENPC(player, quest, npc)
|
||||
return npc:GetActorClassId()] == 1000230;
|
||||
end
|
|
@ -1,29 +0,0 @@
|
|||
require ("global")
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Getting Started (Baderon)
|
||||
Code: Trl0l1
|
||||
Id: 110140
|
||||
|
||||
Enables the "Getting Started" option on Baderon.
|
||||
* NOTE: This quest is active for all players at all times.
|
||||
]]
|
||||
|
||||
function onTalk(player, quest, npc, eventName)
|
||||
local choice = callClientFunction(player, "delegateEvent", player, quest, "processEventBaderonStart");
|
||||
|
||||
if (choice == 1) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent640");
|
||||
elseif (choice == 2) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent650");
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function IsQuestENPC(player, quest, npc)
|
||||
return npc:GetActorClassId()] == 1000137;
|
||||
end
|
|
@ -1,29 +0,0 @@
|
|||
require ("global")
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Getting Started (Momodi)
|
||||
Code: Trl0u1
|
||||
Id: 110142
|
||||
|
||||
Enables the "Getting Started" option on Momodi.
|
||||
* NOTE: This quest is active for all players at all times.
|
||||
]]
|
||||
|
||||
function onTalk(player, quest, npc, eventName)
|
||||
local choice = callClientFunction(player, "delegateEvent", player, quest, "processEventMomodiStart");
|
||||
|
||||
if (choice == 1) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent235");
|
||||
elseif (choice == 2) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent240");
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function IsQuestENPC(player, quest, npc)
|
||||
return npc:GetActorClassId() == 1000841;
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue