onInit was added to all the scripts. Added code for all the Limsa opening event npcs.

This commit is contained in:
Filip Maj 2016-04-14 08:31:39 -04:00
parent bd4e4a293c
commit 95849e1c1c
90 changed files with 662 additions and 91 deletions

View File

@ -6,15 +6,20 @@ Switches between active and passive mode states
--]]
function onEventStarted(player, actor, triggerName)
function onEventStarted(player, command, triggerName)
if (player:getState() == 0) then
player:changeState(2);
elseif (player:getState() == 2) then
player:changeState(0);
end
player:endEvent();
player:endCommand();
--For Opening Tutorial
if (player:hasQuest("Man0l0") or player:hasQuest("Man0g0") or player:hasQuest("Man0u0")) then
player:getDirector():onCommand(command);
end
end

View File

@ -16,7 +16,7 @@ function onEventStarted(player, actor, triggerName)
player:sendGameMessage(worldMaster, 32503, 0x20);
end
player:endEvent();
player:endCommand();
end

View File

@ -18,6 +18,6 @@ function onEventUpdate(player, actor, step, arg1)
--Submit
player:endEvent();
player:endCommand();
end

View File

@ -14,6 +14,6 @@ function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg
player:examinePlayer(actor);
end
player:endEvent();
player:endCommand();
end

View File

@ -42,9 +42,6 @@ function onEventStarted(player, actor, triggerName, isGoobbue)
player:changeState(0);
end
player:endEvent();
player:endCommand();
end
function onEventUpdate(player, npc)
end

View File

@ -15,7 +15,7 @@ function onEventStarted(player, actor, triggerName, maxNumber)
worldMaster = getWorldMaster();
player:sendGameMessage(player, worldMaster, 25342, 0x20, result, maxNumber);
player:endEvent();
player:endCommand();
end

View File

@ -16,7 +16,7 @@ function onEventStarted(player, actor, triggerName, emoteId)
player:changeState(0);
end
player:endEvent();
player:endCommand();
end

View File

@ -15,7 +15,7 @@ function onEventStarted(player, actor, triggerName, emoteId)
player:doEmote(emoteId);
end
player:endEvent();
player:endCommand();
end

View File

@ -69,7 +69,7 @@ function onEventStarted(player, actor, triggerName, invActionInfo, param1, param
end
end
player:endEvent();
player:endCommand();
end
function loadGearset(player, classId)

View File

@ -11,5 +11,5 @@ The param "itemDBIds" has the vars: item1 and item2.
function onEventStarted(player, actor, triggerName, invActionInfo, param1, param2, param3, param4, param5, param6, param7, param8, itemDBIds)
player:getInventory(0x00):removeItem(invActionInfo.slot);
player:endEvent();
player:endCommand();
end

View File

@ -16,8 +16,9 @@ Countdown: 1
--]]
function onEventStarted(player, command)
player:setCurrentMenuId(0);
player:runEventFunction("delegateCommand", command, "eventConfirm");
--player:setCurrentMenuId(0);
--player:runEventFunction("delegateCommand", command, "eventConfirm");
player:logout();
end
function onEventUpdate(player, command, triggerName, step, arg1, arg2)
@ -28,23 +29,23 @@ function onEventUpdate(player, command, triggerName, step, arg1, arg2)
if (currentMenuId == 0) then
if (arg1 == 1) then --Exit
player:quitGame();
player:endEvent();
player:endCommand();
elseif (arg1 == 2) then --Character Screen
player:logout();
player:endEvent();
player:endCommand();
--player:setCurrentMenuId(1);
--player:runEventFunction("delegateCommand", command, "eventCountDown");
elseif (arg1 == 3) then --Cancel
player:endEvent();
player:endCommand();
end
--Countdown Dialog
elseif (currentMenuId == 1) then
if (arg2 == 1) then --Logout Complete
player:logout();
player:endEvent();
player:endCommand();
elseif (arg2 == 2) then --Cancel Pressed
player:endEvent();
player:endCommand();
end
end

View File

@ -7,7 +7,3 @@ function onEventStarted(player, actor, questId)
player:sendRequestedInfo("requestedData", "activegl", 7, nil, nil, nil, nil, nil, nil, nil);
-- player:sendRequestedInfo("requestedData", "glHist", 10, 0x1D4F2, 1009, 12464, 11727, 12485, 12526);
end
function onEventUpdate(player, actor, triggerName, step, arg1)
end

View File

@ -6,7 +6,3 @@
function onEventStarted(player, actor, questId)
player:sendRequestedInfo("requestedData", "qtdata", 0x1D4F2);
end
function onEventUpdate(player, actor, triggerName, step, arg1)
end

View File

@ -35,17 +35,17 @@ function onEventUpdate(player, actor, step, arg1)
player:setCurrentMenuId(1);
player:runEventFunction("delegateCommand", actor, "eventAetheryte", arg1, 2, 2, 2, 4, 4, 4);
else
player:endEvent();
player:endCommand();
end
elseif (menuId == 1) then --Aetheryte
if (arg1 == nil) then
player:endEvent();
player:endCommand();
return;
end
player:setCurrentMenuId(2);
player:runEventFunction("delegateCommand", actor, "eventConfirm", false, false, 1, 138824, false);
elseif (menuId == 2) then --Confirm
player:endEvent();
player:endCommand();
end
end

View File

@ -0,0 +1,20 @@
require("/quests/man/man0l0")
function onEventStarted(player, actor, triggerName)
man0l0Quest = getStaticActor("Man0l0");
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil);
--player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_1", nil, nil, nil, nil);
end
function onEventUpdate(player, npc, resultId)
man0l0Quest = getStaticActor("Man0l0");
if (resultId == RESULT_Event000_1) then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal001", nil, nil, nil, nil);
elseif (resultId == RESULT_TtrNomal001) then
player:endEvent();
end
end

View File

@ -0,0 +1,31 @@
require("/quests/man/man0l0")
function onEventStarted(player, actor, triggerName)
man0l0Quest = getStaticActor("Man0l0");
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil);
--player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_1", nil, nil, nil, nil);
end
function onEventUpdate(player, npc, resultId)
player:endEvent();
end
function onTalked(player, npc)
man0l0Quest = player:getQuest("Man0l0");
if (man0l0Quest ~= nil) then
if (man0l0Quest ~= nil and 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():GetActorInWorld(1090025);
player:setEventStatus(doorNpc, "pushDefault", true, 0x2);
doorNpc:setQuestGraphic(player, 0x3);
end
end
end

View File

@ -0,0 +1,19 @@
function onEventStarted(player, actor, triggerName)
man0l0Quest = getStaticActor("Man0l0");
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl004");
--player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002");
end
function onEventUpdate(player, npc, resultId)
--man0l0Quest = getStaticActor("Man0l0");
--player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002");
player:endEvent();
end
function onCommand(player, command)
--Check command if ActivateCommand
player:kickEvent(player:getDirector(), "noticeEvent", true);
end

View File

@ -1,5 +1,38 @@
local initClassItems, initRaceItems;
function onBeginLogin(player)
--For Opening. Set Director and reset position incase d/c
if (player:hasQuest(110001) == true) then
--player:setDirector("openingDirector", false);
player.positionX = 0.016;
player.positionY = 10.35;
--player.positionZ = -36.91;
player.positionZ = -20.91;
player.rotation = 0.025;
player:getQuest(110001):ClearQuestData();
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: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:getQuest(110009):ClearQuestData();
player:getQuest(110009):ClearQuestFlags();
end
end
function onLogin(player)
player:sendMessage(0x1D,"",">Callback \"onLogin\" for player script running.");
@ -7,8 +40,8 @@ function onLogin(player)
player:sendMessage(0x1D,"",">PlayTime == 0, new player!");
initClassItems(player);
initRaceItems(player);
end
initRaceItems(player);
end
end

View File

@ -0,0 +1,13 @@
--Quest Flags
MAN0L0_FLAG_TUTORIAL1_DONE = 0;
MAN0L0_FLAG_TUTORIAL2_DONE = 1;
MAN0L0_FLAG_TUTORIAL3_DONE = 2;
MAN0L0_FLAG_MINITUT_DONE1 = 4;
MAN0L0_FLAG_MINITUT_DONE2 = 8;
MAN0L0_FLAG_MINITUT_DONE3 = 16;
--Result Unique Ids
RESULT_Event000_1 = 0x2B9EBC42;
RESULT_TtrNomal001 = 0x8649D125;

View File

@ -1,3 +1,3 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Monster/Lemming/NuteaterStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 10, 1, 4, false, false, false, false, false, false, false, false, 2;
end

View File

@ -20,7 +20,7 @@ Menu Ids:
--]]
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Object/Aetheryte/AetheryteParent", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -20,7 +20,7 @@ Menu Ids:
--]]
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceGuildlevePublisher", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceLinkshellManager", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -23,7 +23,7 @@ Menu Ids:
--]]
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulacePassiveGLPublisher", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -32,7 +32,7 @@ Menu Ids:
--]]
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/Shop/PopulaceShopSalesman", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Object/TaskBoard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end

View File

@ -0,0 +1,7 @@
function init(npc)
return "/Chara/Npc/MapObj/DoorStandard", false, false, false, false, false, 5900001 , false, false, 0, 0, 0x141, 0xB7d;
end
function onEventStarted(player, npc, triggerName)
end

View File

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

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Object/OpeningStoperF0B1", false, false, false, false, false, 0x10A350, false, false, 0, 1, "TEST";
end

View File

@ -0,0 +1,3 @@
function init(npc)
return "/Chara/Npc/Monster/Fighter/FighterAllyOpeningHealer", false, false, false, false, false, npc.getActorClassId(), false, false, 10, 1, 4, false, false, false, false, false, false, false, false, 2;
end

View File

@ -0,0 +1,3 @@
function init(npc)
return "/Chara/Npc/Monster/Fighter/FighterAllyOpeningAttacker", false, false, false, false, false, npc.getActorClassId(), false, false, 10, 1, 4, false, false, false, false, false, false, false, false, 2;
end

View File

@ -0,0 +1,3 @@
function init(npc)
return "/Chara/Npc/Monster/Jellyfish/JellyfishScenarioLimsaLv00", false, false, false, false, false, npc.getActorClassId(), true, true, 10, 0, 4, false, false, false, false, false, false, false, false, 2;
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_4", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_5", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_6", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_7", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,43 @@
require("/quests/man/man0l0")
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)
man0l0Quest = player:getQuest("man0l0");
if (man0l0Quest ~= nil) then
if (man0l0Quest ~= nil) then
if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3) == false) then
npc:setQuestGraphic(player, 0x2);
end
end
end
end
function onEventStarted(player, npc, triggerName)
man0l0Quest = player:getQuest("man0l0");
if (triggerName == "talkDefault") then
if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3) == false) then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini003", nil, nil, nil);
npc:setQuestGraphic(player, 0x0);
man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3, true);
man0l0Quest:SaveData();
player:getDirector():onTalked(npc);
else
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_8", nil, nil, nil);
end
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_9", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_10", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_11", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_12", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,46 @@
require("/quests/man/man0l0")
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)
man0l0Quest = player:getQuest("man0l0");
if (man0l0Quest ~= nil) then
if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2) == false) then
npc:setQuestGraphic(player, 0x2);
end
end
end
function onEventStarted(player, npc, triggerName)
man0l0Quest = player:getQuest("man0l0");
if (man0l0Quest ~= nil) then
if (triggerName == "talkDefault") then
if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2) == false) then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini002", nil, nil, nil);
npc:setQuestGraphic(player, 0x0);
man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2, true);
man0l0Quest:SaveData();
player:getDirector():onTalked(npc);
else
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_13", nil, nil, nil);
end
else
player:endEvent();
end
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,20 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
--player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_9", nil, nil, nil);
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_14", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_15", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_16", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,19 @@
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)
man0l0Quest = getStaticActor("Man0l0");
if (triggerName == "talkDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_17", nil, nil, nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc)
player:endEvent();
end

View File

@ -0,0 +1,55 @@
require("/quests/man/man0l0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceTutorial", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onSpawn(player, npc)
man0l0Quest = player:getQuest("Man0l0");
if (man0l0Quest ~= nil) then
if (man0l0Quest ~= nil and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1) == true and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2) == true and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3) == true) then
player:setEventStatus(npc, "pushDefault", true, 0x2);
npc:setQuestGraphic(player, 0x3);
else
player:setEventStatus(npc, "pushDefault", true, 0x2);
npc:setQuestGraphic(player, 0x3);
end
end
end
function onEventStarted(player, npc, triggerName)
if (triggerName == "pushDefault") then
man0l0Quest = getStaticActor("Man0l0");
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEventNewRectAsk", nil);
else
player:endEvent();
end
end
function onEventUpdate(player, npc, resultId, choice)
if (resultId == 0x2B9EBC42) then
player:endEvent();
player:setDirector("QuestDirectorMan0l001", true);
worldMaster = getWorldMaster();
player:sendGameMessage(player, worldMaster, 34108, 0x20);
player:sendGameMessage(player, worldMaster, 50011, 0x20);
getWorldManager():DoPlayerMoveInZone(player, 9);
player:kickEvent(player:getDirector(), "noticeEvent", true);
else
if (choice == 1) then
man0l0Quest = player:getQuest("Man0l0");
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_2", nil, nil, nil, nil);
else
player:endEvent();
end
end
end

View File

@ -1,13 +1,65 @@
function onInstantiate(npc)
require("/quests/man/man0l0")
function init(npc)
return "/Chara/Npc/Populace/PopulaceTutorial", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onSpawn(player, npc)
man0l0Quest = player:getQuest("Man0l0");
if (man0l0Quest ~= nil) then
if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1) == false) then
npc:setQuestGraphic(player, 0x2);
end
if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_TUTORIAL3_DONE) == true) then
player:setEventStatus(npc, "pushDefault", false, 0x2);
end
end
end
function onEventStarted(player, npc, triggerName)
man0l0Quest = getStaticActor("Man0l0");
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal003", nil, nil, nil);
--player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrithuric_002", nil, nil, nil); --LTW
--player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrithuric_003", nil, nil, nil); --LTW NO GUILD
man0l0Quest = player:getQuest("Man0l0");
if (man0l0Quest ~= nil) then
if (triggerName == "pushDefault") then
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal002", nil, nil, nil);
elseif (triggerName == "talkDefault") then
--Is doing talk tutorial?
if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_TUTORIAL3_DONE) == false) then
player:setEventStatus(npc, "pushDefault", false, 0x2);
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal003", nil, nil, nil);
man0l0Quest:SetQuestFlag(MAN0L0_FLAG_TUTORIAL3_DONE, true);
npc:setQuestGraphic(player, 0x2);
man0l0Quest:SaveData();
player:getDirector():onTalked(npc);
--Was he talked to for the mini tutorial?
else
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini001", nil, nil, nil);
if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1) == false) then
npc:setQuestGraphic(player, 0x0);
man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1, true);
man0l0Quest:SaveData();
player:getDirector():onTalked(npc);
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

@ -3,7 +3,16 @@
function onZoneInit(zone)
end
function onZoneIn(zone, player)
function onZoneIn(player)
openingQuest = player:getQuest(110001);
--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

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Object/ObjectBed", false, false, false, false, false, 0x1250FB, false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Object/ObjectInnDoor", false, false, false, false, false, 0x1250F8, false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Object/ObjectItemStorage", false, false, false, false, false, 0x1250F8, false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceCutScenePlayer", false, false, false, false, false, 0x107B38, false, false, 0, 1, "TEST";
end

View File

@ -1,4 +1,4 @@
function onInstantiate(npc)
function init(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end