Added more quest functions and completed the scripts for Gridania and most of Ul'dah. Up to the battle part that is.

This commit is contained in:
Filip Maj 2016-04-17 19:09:01 -04:00
parent 95849e1c1c
commit 79eaf5d79e
36 changed files with 733 additions and 28 deletions

View file

@ -0,0 +1,37 @@
require("/quests/man/man0g0")
function onEventStarted(player, actor, triggerName)
man0g0Quest = getStaticActor("Man0g0");
player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil);
end
function onEventUpdate(player, npc, resultId)
player:endEvent();
end
function onTalked(player, npc)
man0g0Quest = player:getQuest("Man0g0");
if (man0g0Quest ~= nil) then
yda = getWorldManager():GetActorInWorld(1000009);
papalymo = getWorldManager():GetActorInWorld(1000010);
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE) == false) then
yda:setQuestGraphic(player, 0x0);
papalymo:setQuestGraphic(player, 0x2);
else
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then
yda:setQuestGraphic(player, 0x2);
papalymo:setQuestGraphic(player, 0x0);
end
end
end
end

View file

@ -0,0 +1,26 @@
require("/quests/man/man0u0")
function onEventStarted(player, actor, triggerName)
man0u0Quest = getStaticActor("Man0u0");
player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil);
end
function onEventUpdate(player, npc, resultId)
player:endEvent();
end
function onTalked(player, npc)
man0u0Quest = player:getQuest("Man0u0");
if (man0u0Quest ~= nil) then
end
end

View file

@ -0,0 +1,21 @@
function onEventStarted(player, actor, triggerName)
man0g0Quest = getStaticActor("Man0g0");
--player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl001");
player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl002");
end
function onEventUpdate(player, npc, resultId)
--man0g0Quest = getStaticActor("Man0g0");
--player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl002");
player:endEvent();
end
function onCommand(player, command)
--Check command if ActivateCommand
player:endCommand();
player:endEvent();
player:kickEvent(player:getDirector(), "noticeEvent", true);
end

View file

@ -2,8 +2,8 @@
function onEventStarted(player, actor, triggerName)
man0l0Quest = getStaticActor("Man0l0");
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl004");
--player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002");
--player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl001");
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002");
end
@ -15,5 +15,7 @@ end
function onCommand(player, command)
--Check command if ActivateCommand
player:endCommand();
player:endEvent();
player:kickEvent(player:getDirector(), "noticeEvent", true);
end

View file

@ -14,18 +14,18 @@ function onBeginLogin(player)
player:getQuest(110001):ClearQuestFlags();
elseif (player:hasQuest(110005) == true) then
player:setDirector("openingDirector", false);
player.positionX = 356.09;
player.positionY = 3.74;
player.positionZ = -701.62;
player.rotation = -1.4;
player.positionX = 369.5434;
player.positionY = 4.21;
player.positionZ = -706.1074;
player.rotation = -1.26721;
player:getQuest(110005):ClearQuestData();
player:getQuest(110005):ClearQuestFlags();
elseif (player:hasQuest(110009) == true) then
player:setDirector("openingDirector", false);
player.positionX = 12.63;
player.positionY = 196.05;
player.positionZ = 131.01;
player.rotation = -1.34;
player.positionX = 5.364327;
player.positionY = 196.0;
player.positionZ = 133.6561;
player.rotation = -2.849384;
player:getQuest(110009):ClearQuestData();
player:getQuest(110009):ClearQuestFlags();
end

View file

@ -0,0 +1,7 @@
--Quest Flags
MAN0G0_FLAG_TUTORIAL1_DONE = 0;
MAN0G0_FLAG_TUTORIAL2_DONE = 1;
MAN0G0_FLAG_MINITUT_DONE1 = 4;
MAN0G0_FLAG_MINITUT_DONE2 = 8;
MAN0G0_FLAG_MINITUT_DONE3 = 16;

View file

@ -0,0 +1,7 @@
--Quest Flags
MAN0U0_FLAG_TUTORIAL1_DONE = 0;
MAN0U0_FLAG_TUTORIAL2_DONE = 1;
MAN0U0_FLAG_MINITUT_DONE1 = 4;
MAN0U0_FLAG_MINITUT_DONE2 = 8;
MAN0U0_FLAG_MINITUT_DONE3 = 16;

View file

@ -1,5 +1,5 @@
function init(npc)
return "/Chara/Npc/Object/OpeningStoperF0B1", false, false, false, false, false, 0x10A350, false, false, 0, 1, "TEST";
return "/Chara/Npc/Object/OpeningStoperF0B1", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)

View file

@ -0,0 +1,61 @@
require("/quests/man/man0g0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onSpawn(player, npc)
npc:setQuestGraphic(player, 0x2);
end
function onEventStarted(player, npc, triggerName)
man0g0Quest = player:getQuest("Man0g0");
if (man0g0Quest ~= nil) then
if (triggerName == "pushDefault") then
player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal002", nil, nil, nil);
elseif (triggerName == "talkDefault") then
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE) == false) then
player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal003", nil, nil, nil);
player:setEventStatus(npc, "pushDefault", false, 0x2);
player:getDirector():onTalked(npc);
man0g0Quest:SetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE, true);
man0g0Quest:SaveData();
else
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then
man0g0Quest:SetQuestFlag(MAN0G0_FLAG_TUTORIAL2_DONE, true);
player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent010_1", nil, nil, nil);
else
player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_1", nil, nil, nil);
end
end
else
player:endEvent();
end
else
player:endEvent(); --Should not be here w.o this quest
end
end
function onEventUpdate(player, npc)
man0g0Quest = player:getQuest("Man0g0");
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_TUTORIAL2_DONE) == true) then
player:endEvent();
player:setDirector("QuestDirectorMan0g001", true);
worldMaster = getWorldMaster();
player:sendGameMessage(player, worldMaster, 34108, 0x20);
player:sendGameMessage(player, worldMaster, 50011, 0x20);
getWorldManager():DoPlayerMoveInZone(player, 10);
player:kickEvent(player:getDirector(), "noticeEvent", true);
else
player:endEvent();
end
end

View file

@ -0,0 +1,28 @@
require("/quests/man/man0g0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
man0g0Quest = player:getQuest("Man0g0");
if (triggerName == "talkDefault") then
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == false) then
player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil);
man0g0Quest:SetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1, true);
man0g0Quest:SaveData();
player:getDirector():onTalked(npc);
else
player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil);
end
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -3,7 +3,17 @@
function onZoneInit(zone)
end
function onZoneIn(zone, player)
function onZoneIn(player)
openingQuest = player:getQuest(110005);
--Opening Quest
if (openingQuest ~= nil) then
if (openingQuest:GetQuestFlag(0) == false) then
player:kickEvent(player:getDirector(), "noticeEvent");
end
end
end
function onZoneOut(zone, player)

View file

@ -0,0 +1,21 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
man0u0Quest = getStaticActor("Man0u0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_6", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,33 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onSpawn(player, npc)
npc:setQuestGraphic(player, 0x2);
end
function onEventStarted(player, npc, triggerName)
man0u0Quest = player:getQuest("man0u0");
if (triggerName == "talkDefault") then
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == false) then
player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini002_first", nil, nil, nil);
npc:setQuestGraphic(player, 0x0);
man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2, true);
man0u0Quest:SaveData();
player:getDirector():onTalked(npc);
else
player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini002", nil, nil, nil);
end
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,21 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
man0u0Quest = getStaticActor("Man0u0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_8", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,21 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
man0u0Quest = getStaticActor("Man0u0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_9", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,21 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
man0u0Quest = getStaticActor("Man0u0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_10", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,33 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onSpawn(player, npc)
npc:setQuestGraphic(player, 0x2);
end
function onEventStarted(player, npc, triggerName)
man0u0Quest = player:getQuest("man0u0");
if (triggerName == "talkDefault") then
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == false) then
player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini003_first", nil, nil, nil);
npc:setQuestGraphic(player, 0x0);
man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3, true);
man0u0Quest:SaveData();
player:getDirector():onTalked(npc);
else
player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini003", nil, nil, nil);
end
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,21 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
man0u0Quest = getStaticActor("Man0u0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_12", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,21 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
man0u0Quest = getStaticActor("Man0u0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_13", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,16 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,48 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onSpawn(player, npc)
npc:setQuestGraphic(player, 0x2);
end
function onEventStarted(player, npc, triggerName)
man0u0Quest = player:getQuest("Man0u0");
if (man0u0Quest ~= nil) then
if (triggerName == "pushDefault") then
player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal002", nil, nil, nil);
elseif (triggerName == "talkDefault") then
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_TUTORIAL1_DONE) == false) then
player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal003", nil, nil, nil);
player:setEventStatus(npc, "pushDefault", false, 0x2);
player:getDirector():onTalked(npc);
man0u0Quest:SetQuestFlag(MAN0U0_FLAG_TUTORIAL1_DONE, true);
man0u0Quest:SaveData();
else
player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini001", nil, nil, nil);
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == false) then
npc:setQuestGraphic(player, 0x0);
man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1, true);
man0u0Quest:SaveData();
end
end
else
player:endEvent();
end
else
player:endEvent(); --Should not be here w.o this quest
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,16 @@
require("/quests/man/man0u0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
end
function onEventUpdate(player, npc)
player:endEvent();
end

View file

@ -0,0 +1,20 @@
function onZoneInit(zone)
end
function onZoneIn(player)
openingQuest = player:getQuest(110009);
--Opening Quest
if (openingQuest ~= nil) then
if (openingQuest:GetQuestFlag(0) == false) then
player:kickEvent(player:getDirector(), "noticeEvent");
end
end
end
function onZoneOut(zone, player)
end

View file

@ -26,8 +26,7 @@ function onEventStarted(player, npc, triggerName)
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini003", nil, nil, nil);
npc:setQuestGraphic(player, 0x0);
man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3, true);
man0l0Quest:SaveData();
man0l0Quest:SaveData();
player:getDirector():onTalked(npc);
else
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_8", nil, nil, nil);

View file

@ -4,6 +4,7 @@ function onZoneInit(zone)
end
function onZoneIn(player)
openingQuest = player:getQuest(110001);
--Opening Quest