mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 06:24:38 +02:00
Overhaul of the director system and opening quests. Private Areas further implemented as well.
This commit is contained in:
parent
dcaad5729d
commit
e898c045f7
69 changed files with 2602 additions and 1816 deletions
|
@ -1,22 +0,0 @@
|
|||
require ("global")
|
||||
require("/quests/man/man0u0")
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
man0u0Quest = GetStaticActor("Man0u0");
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil);
|
||||
player:EndEvent();
|
||||
|
||||
end
|
||||
|
||||
function onTalked(player, npc)
|
||||
|
||||
man0u0Quest = player:GetQuest("Man0u0");
|
||||
|
||||
if (man0u0Quest ~= nil) then
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,13 @@
|
|||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
if (triggerName == "caution") then
|
||||
worldMaster = GetWorldMaster();
|
||||
player:SendGameMessage(player, worldMaster, 34109, 0x20);
|
||||
elseif (triggerName == "exit") then
|
||||
GetWorldManager():DoPlayerMoveInZone(player, 6);
|
||||
end
|
||||
player:EndEvent();
|
||||
end
|
|
@ -0,0 +1,13 @@
|
|||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
if (triggerName == "caution") then
|
||||
worldMaster = GetWorldMaster();
|
||||
player:SendGameMessage(player, worldMaster, 34109, 0x20);
|
||||
elseif (triggerName == "exit") then
|
||||
GetWorldManager():DoPlayerMoveInZone(player, 18);
|
||||
end
|
||||
player:EndEvent();
|
||||
end
|
|
@ -2,7 +2,7 @@ require ("global")
|
|||
require ("quests/man/man0u0")
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
man0u0Quest = GetStaticActor("Man0u0");
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "defaultTalkWithLady001_001", nil, nil, nil);
|
||||
man0u0Quest = GetStaticActor("Man0u0");
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_13", nil, nil, nil);
|
||||
player:EndEvent();
|
||||
end
|
|
@ -9,25 +9,40 @@ function onEventStarted(player, npc, triggerName)
|
|||
man0u0Quest = player:GetQuest("Man0u0");
|
||||
|
||||
if (man0u0Quest ~= nil) then
|
||||
if (triggerName == "pushDefault") then
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == false) then
|
||||
npc:SetQuestGraphic(player, 0x2);
|
||||
end
|
||||
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_TUTORIAL3_DONE) == true) then
|
||||
player:SetEventStatus(npc, "pushDefault", false, 0x2);
|
||||
end
|
||||
end
|
||||
|
||||
if (man0u0Quest ~= nil) then
|
||||
if (triggerName == "pushDefault") then
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrNomal002", nil, nil, nil);
|
||||
elseif (triggerName == "talkDefault") then
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_TUTORIAL1_DONE) == false) then
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrNomal003", nil, nil, nil);
|
||||
--Is doing talk tutorial?
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_TUTORIAL3_DONE) == false) then
|
||||
player:SetEventStatus(npc, "pushDefault", false, 0x2);
|
||||
player:GetDirector():OnTalked(npc);
|
||||
man0u0Quest:SetQuestFlag(MAN0U0_FLAG_TUTORIAL1_DONE, true);
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrNomal003", nil, nil, nil);
|
||||
man0u0Quest:SetQuestFlag(MAN0U0_FLAG_TUTORIAL3_DONE, true);
|
||||
npc:SetQuestGraphic(player, 0x2);
|
||||
man0u0Quest:SaveData();
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini001", nil, nil, nil);
|
||||
|
||||
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
|
||||
--Was he talked to for the mini tutorial?
|
||||
else
|
||||
callClientFunction(player, "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();
|
||||
man0u0Quest:SaveData();
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
|
||||
else
|
||||
player:EndEvent();
|
||||
end
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
require ("global")
|
||||
require ("quests/man/man0u0")
|
||||
|
||||
function onSpawn(player, npc)
|
||||
|
||||
man0u0Quest = player:GetQuest("Man0u0");
|
||||
|
||||
if (man0u0Quest ~= nil) then
|
||||
player:SetEventStatus(npc, "pushDefault", true, 0x2);
|
||||
if (man0u0Quest ~= nil and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == true and man0U0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == true and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == true) then
|
||||
npc:SetQuestGraphic(player, 0x3);
|
||||
else
|
||||
npc:SetQuestGraphic(player, 0x0);
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
man0u0Quest = GetStaticActor("Man0u0");
|
||||
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) ~= true) then
|
||||
print "AAAA"
|
||||
end
|
||||
|
||||
--if (man0u0Quest ~= nil and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == true and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == true and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == true) then
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
worldMaster = GetWorldMaster();
|
||||
player:SendGameMessage(player, worldMaster, 34108, 0x20);
|
||||
player:SendGameMessage(player, worldMaster, 50011, 0x20);
|
||||
|
||||
director = player:GetZone():CreateDirector("Quest/QuestDirectorMan0u001");
|
||||
player:KickEvent(director, "noticeEvent", true);
|
||||
player:AddDirector(director);
|
||||
player:SetLoginDirector(director);
|
||||
|
||||
GetWorldManager():DoZoneChange(player, 17);
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
--[[AFTER GOOBBUE
|
||||
22.81, 196, 87.82
|
||||
]]
|
||||
--0x45c00005
|
|
@ -1,20 +1,31 @@
|
|||
require ("global")
|
||||
require ("quests/man/man0u0")
|
||||
|
||||
function onSpawn(player, npc)
|
||||
man0u0Quest = player:GetQuest("Man0u0");
|
||||
|
||||
if (man0u0Quest ~= nil) then
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == false) then
|
||||
npc:SetQuestGraphic(player, 0x2);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
man0u0Quest = player:GetQuest("Man0u0");
|
||||
|
||||
if (man0u0Quest != nil)
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == false) then
|
||||
callClientFunction(player, "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
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini002", nil, nil, nil);
|
||||
|
||||
if (man0u0Quest ~= nil) then
|
||||
if (triggerName == "talkDefault") then
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == false) then
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini002_first", nil, nil, nil);
|
||||
npc:SetQuestGraphic(player, 0x0);
|
||||
man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2, true);
|
||||
man0u0Quest:SaveData();
|
||||
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini002", nil, nil, nil);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
|
@ -1,21 +1,31 @@
|
|||
require ("global")
|
||||
require ("quests/man/man0u0")
|
||||
|
||||
function onSpawn(player, npc)
|
||||
man0u0Quest = player:GetQuest("Man0u0");
|
||||
|
||||
if (man0u0Quest ~= nil) then
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == false) then
|
||||
npc:SetQuestGraphic(player, 0x2);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
man0u0Quest = player:GetQuest("Man0u0");
|
||||
|
||||
|
||||
if (man0u0Quest ~= nil) then
|
||||
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == false) then
|
||||
callClientFunction(player, "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
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini003", nil, nil, nil);
|
||||
if (triggerName == "talkDefault") then
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == false) then
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini003_first", nil, nil, nil);
|
||||
npc:SetQuestGraphic(player, 0x0);
|
||||
man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3, true);
|
||||
man0u0Quest:SaveData();
|
||||
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini003", nil, nil, nil);
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
player:EndEvent();
|
||||
end
|
|
@ -2,5 +2,7 @@ require ("global")
|
|||
require ("quests/man/man0u0")
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
man0u0Quest = GetStaticActor("Man0u0");
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_3", nil, nil, nil);
|
||||
player:EndEvent();
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue