mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-22 12:47:46 +00:00
Merged in CuriousJorge/ffxiv-classic-server/develop (pull request #41)
"Seeing the Seers" quest etc3g0 scripted + minor fixes
This commit is contained in:
commit
3d4bf3465b
11 changed files with 363 additions and 54 deletions
|
@ -16,7 +16,7 @@ function onTrigger(player)
|
||||||
|
|
||||||
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||||
local sender = "[mypos] ";
|
local sender = "[mypos] ";
|
||||||
local message = string.format("current position X:%d Y:%d Z:%d (Rotation: %d) Zone:%d", x, y, z, rot, zone);
|
local message = string.format("X:%.3f Y:%.3f Z:%.3f (Rotation: %.3f) Zone:%d", x, y, z, rot, zone);
|
||||||
|
|
||||||
player:SendMessage(messageID, sender, message);
|
player:SendMessage(messageID, sender, message);
|
||||||
end;
|
end;
|
|
@ -8,6 +8,11 @@ function onTrigger(player, argc, stop, walk, run)
|
||||||
stop = tonumber(stop) or 0;
|
stop = tonumber(stop) or 0;
|
||||||
walk = tonumber(walk) or 2;
|
walk = tonumber(walk) or 2;
|
||||||
run = tonumber(run) or 5;
|
run = tonumber(run) or 5;
|
||||||
|
if argc == 3 then
|
||||||
player:ChangeSpeed(stop, walk, run, run);
|
player:ChangeSpeed(stop, walk, run, run);
|
||||||
end;
|
elseif argc == 1 then
|
||||||
|
player:ChangeSpeed(0, stop/2, stop, stop);
|
||||||
|
else
|
||||||
|
player:ChangeSpeed(0,2,5,5);
|
||||||
|
end
|
||||||
|
end
|
|
@ -53,7 +53,7 @@ function onTrigger(player, argc, p1, p2, p3, p4, privateArea, name, lastName)
|
||||||
local z = tonumber(applyPositionOffset(p3, player_z)) or player_z;
|
local z = tonumber(applyPositionOffset(p3, player_z)) or player_z;
|
||||||
|
|
||||||
player:SendMessage(messageID, sender, string.format("setting coordinates X:%d Y:%d Z:%d within current zone (%d)", x, y, z, player_zone));
|
player:SendMessage(messageID, sender, string.format("setting coordinates X:%d Y:%d Z:%d within current zone (%d)", x, y, z, player_zone));
|
||||||
worldManager:DoPlayerMoveInZone(player, x, y, z, 0x0F);
|
worldManager:DoPlayerMoveInZone(player, x, y, z, player_rot, 0x00);
|
||||||
else
|
else
|
||||||
local zone = tonumber(applyPositionOffset(p1, player_zone)) or player_zone;
|
local zone = tonumber(applyPositionOffset(p1, player_zone)) or player_zone;
|
||||||
local x = tonumber(applyPositionOffset(p2, player_x)) or player_x;
|
local x = tonumber(applyPositionOffset(p2, player_x)) or player_x;
|
||||||
|
|
|
@ -1,19 +1,61 @@
|
||||||
|
-- Level requirement is 5 on any class. Set to 1 for testing
|
||||||
|
-- TODO: Reward handling
|
||||||
|
|
||||||
|
--Actor Scripts
|
||||||
|
--unique/fst0Town01a/PopulaceStandard/kinnison
|
||||||
|
--unique/fst0Town01a/PopulaceStandard/mestonnaux
|
||||||
|
--unique/fst0Town01a/PopulaceStandard/sybell
|
||||||
|
--unique/fst0Town01a/PopulaceStandard/khuma_moshroca
|
||||||
|
--unique/fst0Town01a/PopulaceStandard/lefwyne
|
||||||
|
--unique/fst0Town01a/PopulaceStandard/nellaure
|
||||||
|
|
||||||
|
|
||||||
--Quest Flags
|
--Quest Flags
|
||||||
TALKED_1 = 0;
|
FLAG_TALKED_MESTONNAUX = 0;
|
||||||
TALKED_2 = 1;
|
FLAG_TALKED_SYBELL = 1;
|
||||||
TALKED_3 = 2;
|
FLAG_TALKED_NELLAURE = 2;
|
||||||
TALKED_4 = 4;
|
FLAG_TALKED_KHUMA_MOSHROCA = 4;
|
||||||
TALKED_5 = 8;
|
FLAG_TALKED_LEFWYNE = 8;
|
||||||
|
|
||||||
function checkNextPhase(player)
|
function checkNextPhase(player)
|
||||||
ownedQuest = player:GetQuest("Etc3g0");
|
ownedQuest = player:GetQuest("Etc3g0");
|
||||||
if (
|
if (
|
||||||
ownedQuest:GetQuestFlag(TALKED_1) == false and
|
ownedQuest:GetQuestFlag(FLAG_TALKED_MESTONNAUX) == true and
|
||||||
ownedQuest:GetQuestFlag(TALKED_2) == false and
|
ownedQuest:GetQuestFlag(FLAG_TALKED_SYBELL) == true and
|
||||||
ownedQuest:GetQuestFlag(TALKED_3) == false and
|
ownedQuest:GetQuestFlag(FLAG_TALKED_NELLAURE) == true and
|
||||||
ownedQuest:GetQuestFlag(TALKED_4) == false and
|
ownedQuest:GetQuestFlag(FLAG_TALKED_KHUMA_MOSHROCA) == true and
|
||||||
ownedQuest:GetQuestFlag(TALKED_5) == false
|
ownedQuest:GetQuestFlag(FLAG_TALKED_LEFWYNE) == true
|
||||||
) then
|
) then
|
||||||
ownedQuest:NextPhase(243);
|
ownedQuest:NextPhase(243);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function canAcceptQuest(player)
|
||||||
|
return (player:HasQuest("Etc3g0") == false and player:IsQuestCompleted("Etc3g0") == false and player:GetHighestLevel() >= 1);
|
||||||
|
end
|
||||||
|
|
||||||
|
function isObjectivesComplete(player, quest)
|
||||||
|
return (quest:GetPhase() == 243);
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function onAbandonQuest(player, quest)
|
||||||
|
kinnison = GetWorldManager():GetActorInWorldByUniqueId("kinnison");
|
||||||
|
mestonnaux = GetWorldManager():GetActorInWorldByUniqueId("mestonnaux");
|
||||||
|
sybell = GetWorldManager():GetActorInWorldByUniqueId("sybell");
|
||||||
|
khuma_moshroca = GetWorldManager():GetActorInWorldByUniqueId("khuma_moshroca");
|
||||||
|
lefwyne = GetWorldManager():GetActorInWorldByUniqueId("lefwyne");
|
||||||
|
nellaure = GetWorldManager():GetActorInWorldByUniqueId("nellaure");
|
||||||
|
|
||||||
|
if (kinnison ~= nil and canAcceptQuest(player)) then
|
||||||
|
kinnison:SetQuestGraphic(player, 0x2);
|
||||||
|
end
|
||||||
|
|
||||||
|
if (mestonnaux ~= nil) then mestonnaux:SetQuestGraphic(player, 0x0); end
|
||||||
|
if (sybell ~= nil) then sybell:SetQuestGraphic(player, 0x0); end
|
||||||
|
if (khuma_moshroca ~= nil) then khuma_moshroca:SetQuestGraphic(player, 0x0); end
|
||||||
|
if (lefwyne ~= nil) then lefwyne:SetQuestGraphic(player, 0x0); end
|
||||||
|
if (nellaure ~= nil) then nellaure:SetQuestGraphic(player, 0x0); end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
TALKED_PFARAHR = 0;
|
TALKED_PFARAHR = 0;
|
||||||
|
|
||||||
function canAcceptQuest(player)
|
function canAcceptQuest(player)
|
||||||
return (player:HasQuest("etc5g0") == false and player:GetHighestLevel() >= 1);
|
return (player:HasQuest("etc5g0") == false and player:IsQuestCompleted("Etc5g0") == false and player:GetHighestLevel() >= 1);
|
||||||
end
|
end
|
||||||
|
|
||||||
function isObjectivesComplete(player, quest)
|
function isObjectivesComplete(player, quest)
|
||||||
|
|
|
@ -1,7 +1,54 @@
|
||||||
require ("global")
|
require ("global")
|
||||||
|
require ("quests/etc/etc3g0")
|
||||||
|
|
||||||
|
function onSpawn(player, npc)
|
||||||
|
|
||||||
|
if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 0) then
|
||||||
|
if player:GetQuest("Etc3g0"):GetQuestFlag(FLAG_TALKED_KHUMA_MOSHROCA) == false then
|
||||||
|
npc:SetQuestGraphic(player, 0x2);
|
||||||
|
else
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function onEventStarted(player, npc)
|
function onEventStarted(player, npc)
|
||||||
defaultFst = GetStaticActor("DftFst");
|
|
||||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKhuma_moshroca_001", nil, nil, nil);
|
defaultFst = GetStaticActor("DftFst");
|
||||||
|
quest = GetStaticActor("Etc3g0");
|
||||||
|
|
||||||
|
if (player:HasQuest("Etc3g0") == true) then
|
||||||
|
|
||||||
|
unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1);
|
||||||
|
|
||||||
|
if (result == 1) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKhumamoshroca_001", nil, nil, nil);
|
||||||
|
elseif (result == 2) then
|
||||||
|
ownedQuest = player:GetQuest("Etc3g0");
|
||||||
|
|
||||||
|
if (ownedQuest:GetQuestFlag(FLAG_TALKED_KHUMA_MOSHROCA)) == false then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventKhumaSpeak", nil, nil, nil);
|
||||||
|
ownedQuest:SetQuestFlag(FLAG_TALKED_KHUMA_MOSHROCA, true);
|
||||||
|
ownedQuest:SaveData();
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
checkNextPhase(player);
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventKhumaSpeakAfter", nil, nil, nil);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKhumamoshroca_001", nil, nil, nil);
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
player:endEvent();
|
player:endEvent();
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,40 +3,64 @@ require ("quests/etc/etc3g0")
|
||||||
|
|
||||||
function onSpawn(player, npc)
|
function onSpawn(player, npc)
|
||||||
|
|
||||||
if (player:HasQuest("Etc3g0") == false and player:GetQuest("Etc3g0"):GetQuestFlag(TALKED_4)) then
|
if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 243) then
|
||||||
|
npc:SetQuestGraphic(player, 0x4);
|
||||||
|
elseif (canAcceptQuest(player)) then
|
||||||
npc:SetQuestGraphic(player, 0x2);
|
npc:SetQuestGraphic(player, 0x2);
|
||||||
else
|
else
|
||||||
npc:SetQuestGraphic(player, 0x0);
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function onEventStarted(player, npc)
|
function onEventStarted(player, npc)
|
||||||
|
|
||||||
defaultFst = GetStaticActor("DftFst");
|
defaultFst = GetStaticActor("DftFst");
|
||||||
quest = GetStaticActor("Etc3g0");
|
quest = GetStaticActor("Etc3g0");
|
||||||
|
|
||||||
unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1);
|
if ((canAcceptQuest(player) == true) or (player:HasQuest("Etc3g0") == true)) then
|
||||||
|
|
||||||
if (result == 1) then
|
unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1);
|
||||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKinnison_001", -1, -1);
|
|
||||||
elseif (result == 2) then
|
if (result == 1) then
|
||||||
if (player:HasQuest("Etc3g0") == false) then
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKinnison_001", -1, -1);
|
||||||
offerQuestResult = callClientFunction(player, "delegateEvent", player, quest, "processEventOffersStart");
|
elseif (result == 2) then
|
||||||
if (offerQuestResult == 1) then
|
if (player:HasQuest("Etc3g0") == false) then
|
||||||
player:AddQuest("Etc3g0");
|
offerQuestResult = callClientFunction(player, "delegateEvent", player, quest, "processEventOffersStart");
|
||||||
npc:SetQuestGraphic(player, 0x0);
|
if (offerQuestResult == 1) then
|
||||||
end
|
player:AddQuest("Etc3g0");
|
||||||
else
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
ownedQuest = player:GetQuest("Etc3g0");
|
|
||||||
if (ownedQuest:GetPhase() == 1) then
|
-- This is to overcome some weirdness where some NPCs are not updating their quest marker upon quest accepted
|
||||||
callClientFunction(player, "delegateEvent", player, quest, "processEventClear");
|
-- So we're just going to force the change to be sure
|
||||||
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
|
mestonnaux = GetWorldManager():GetActorInWorldByUniqueId("mestonnaux");
|
||||||
player:CompleteQuest("Etc3g0");
|
sybell = GetWorldManager():GetActorInWorldByUniqueId("sybell");
|
||||||
|
khuma_moshroca = GetWorldManager():GetActorInWorldByUniqueId("khuma_moshroca");
|
||||||
|
lefwyne = GetWorldManager():GetActorInWorldByUniqueId("lefwyne");
|
||||||
|
nellaure = GetWorldManager():GetActorInWorldByUniqueId("nellaure");
|
||||||
|
|
||||||
|
if (mestonnaux ~= nil) then mestonnaux:SetQuestGraphic(player, 0x2); end
|
||||||
|
if (sybell ~= nil) then sybell:SetQuestGraphic(player, 0x2); end
|
||||||
|
if (khuma_moshroca ~= nil) then khuma_moshroca:SetQuestGraphic(player, 0x2); end
|
||||||
|
if (lefwyne ~= nil) then lefwyne:SetQuestGraphic(player, 0x2); end
|
||||||
|
if (nellaure ~= nil) then nellaure:SetQuestGraphic(player, 0x2); end
|
||||||
|
|
||||||
|
end
|
||||||
else
|
else
|
||||||
callClientFunction(player, "delegateEvent", player, quest, "processEventOffersAfter");
|
ownedQuest = player:GetQuest("Etc3g0");
|
||||||
|
if (ownedQuest:GetPhase() == 243) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventClear");
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9);
|
||||||
|
player:CompleteQuest("Etc3g0");
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventOffersAfter");
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKinnison_001", -1, -1);
|
||||||
|
end
|
||||||
|
|
||||||
player:endEvent();
|
player:endEvent();
|
||||||
end
|
end
|
|
@ -1,7 +1,53 @@
|
||||||
require ("global")
|
require ("global")
|
||||||
|
require ("quests/etc/etc3g0")
|
||||||
|
|
||||||
|
function onSpawn(player, npc)
|
||||||
|
|
||||||
|
if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 0) then
|
||||||
|
if player:GetQuest("Etc3g0"):GetQuestFlag(FLAG_TALKED_LEFWYNE) == false then
|
||||||
|
npc:SetQuestGraphic(player, 0x2);
|
||||||
|
else
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function onEventStarted(player, npc)
|
function onEventStarted(player, npc)
|
||||||
defaultFst = GetStaticActor("DftFst");
|
|
||||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithLefwyne_001", nil, nil, nil);
|
defaultFst = GetStaticActor("DftFst");
|
||||||
|
quest = GetStaticActor("Etc3g0");
|
||||||
|
|
||||||
|
if (player:HasQuest("Etc3g0") == true) then
|
||||||
|
|
||||||
|
unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1);
|
||||||
|
|
||||||
|
if (result == 1) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithLefwyne_001", nil, nil, nil);
|
||||||
|
elseif (result == 2) then
|
||||||
|
ownedQuest = player:GetQuest("Etc3g0");
|
||||||
|
|
||||||
|
if (ownedQuest:GetQuestFlag(FLAG_TALKED_LEFWYNE)) == false then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventLefwyneSpeak", nil, nil, nil);
|
||||||
|
ownedQuest:SetQuestFlag(FLAG_TALKED_LEFWYNE, true);
|
||||||
|
ownedQuest:SaveData();
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
checkNextPhase(player);
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventLefwyneSpeakAfter", nil, nil, nil);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithLefwyne_001", nil, nil, nil);
|
||||||
|
end
|
||||||
|
|
||||||
player:endEvent();
|
player:endEvent();
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,54 @@
|
||||||
require ("global")
|
require ("global")
|
||||||
|
require ("quests/etc/etc3g0")
|
||||||
|
|
||||||
|
function onSpawn(player, npc)
|
||||||
|
|
||||||
|
if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 0) then
|
||||||
|
if player:GetQuest("Etc3g0"):GetQuestFlag(FLAG_TALKED_MESTONNAUX) == false then
|
||||||
|
npc:SetQuestGraphic(player, 0x2);
|
||||||
|
else
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function onEventStarted(player, npc)
|
function onEventStarted(player, npc)
|
||||||
defaultFst = GetStaticActor("DftFst");
|
|
||||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithMestonnaux_001", nil, nil, nil);
|
defaultFst = GetStaticActor("DftFst");
|
||||||
|
quest = GetStaticActor("Etc3g0");
|
||||||
|
|
||||||
|
if (player:HasQuest("Etc3g0") == true) then
|
||||||
|
|
||||||
|
unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1);
|
||||||
|
|
||||||
|
if (result == 1) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithMestonnaux_001", nil, nil, nil);
|
||||||
|
elseif (result == 2) then
|
||||||
|
ownedQuest = player:GetQuest("Etc3g0");
|
||||||
|
|
||||||
|
if (ownedQuest:GetQuestFlag(FLAG_TALKED_MESTONNAUX)) == false then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventMestonnauxSpeak", nil, nil, nil);
|
||||||
|
ownedQuest:SetQuestFlag(FLAG_TALKED_MESTONNAUX, true);
|
||||||
|
ownedQuest:SaveData();
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
checkNextPhase(player);
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventMestonnauxSpeakAfter", nil, nil, nil);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithMestonnaux_001", nil, nil, nil);
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
player:endEvent();
|
player:endEvent();
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
require ("global")
|
||||||
|
require ("quests/etc/etc3g0")
|
||||||
|
|
||||||
|
function onSpawn(player, npc)
|
||||||
|
|
||||||
|
if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 0) then
|
||||||
|
if player:GetQuest("Etc3g0"):GetQuestFlag(FLAG_TALKED_NELLAURE) == false then
|
||||||
|
npc:SetQuestGraphic(player, 0x2);
|
||||||
|
else
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function onEventStarted(player, npc)
|
||||||
|
|
||||||
|
defaultFst = GetStaticActor("DftFst");
|
||||||
|
quest = GetStaticActor("Etc3g0");
|
||||||
|
|
||||||
|
if (player:HasQuest("Etc3g0") == true) then
|
||||||
|
|
||||||
|
unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1);
|
||||||
|
|
||||||
|
if (result == 1) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithNellaure_001", nil, nil, nil);
|
||||||
|
elseif (result == 2) then
|
||||||
|
ownedQuest = player:GetQuest("Etc3g0");
|
||||||
|
|
||||||
|
if (ownedQuest:GetQuestFlag(FLAG_TALKED_NELLAURE)) == false then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventNellaureSpeak", nil, nil, nil);
|
||||||
|
ownedQuest:SetQuestFlag(FLAG_TALKED_NELLAURE, true);
|
||||||
|
ownedQuest:SaveData();
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
checkNextPhase(player);
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventNellaureSpeakAfter", nil, nil, nil);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithNellaure_001", nil, nil, nil);
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
player:endEvent();
|
||||||
|
end
|
|
@ -1,7 +1,54 @@
|
||||||
require ("global")
|
require ("global")
|
||||||
|
require ("quests/etc/etc3g0")
|
||||||
|
|
||||||
|
function onSpawn(player, npc)
|
||||||
|
|
||||||
|
if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 0) then
|
||||||
|
if player:GetQuest("Etc3g0"):GetQuestFlag(FLAG_TALKED_SYBELL) == false then
|
||||||
|
npc:SetQuestGraphic(player, 0x2);
|
||||||
|
else
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function onEventStarted(player, npc)
|
function onEventStarted(player, npc)
|
||||||
defaultFst = GetStaticActor("DftFst");
|
|
||||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSybell_001", nil, nil, nil);
|
defaultFst = GetStaticActor("DftFst");
|
||||||
|
quest = GetStaticActor("Etc3g0");
|
||||||
|
|
||||||
|
if (player:HasQuest("Etc3g0") == true) then
|
||||||
|
|
||||||
|
unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1);
|
||||||
|
|
||||||
|
if (result == 1) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSybell_001", nil, nil, nil);
|
||||||
|
elseif (result == 2) then
|
||||||
|
ownedQuest = player:GetQuest("Etc3g0");
|
||||||
|
|
||||||
|
if (ownedQuest:GetQuestFlag(FLAG_TALKED_SYBELL)) == false then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventSybellSpeak", nil, nil, nil);
|
||||||
|
ownedQuest:SetQuestFlag(FLAG_TALKED_SYBELL, true);
|
||||||
|
ownedQuest:SaveData();
|
||||||
|
npc:SetQuestGraphic(player, 0x0);
|
||||||
|
checkNextPhase(player);
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEventSybellSpeakAfter", nil, nil, nil);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSybell_001", nil, nil, nil);
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
player:endEvent();
|
player:endEvent();
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue