mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-21 20:27:47 +00:00
Merge remote-tracking branch 'origin/ioncannon/quest_system' into Jorge/quest_system
This commit is contained in:
commit
4fe8f77887
19 changed files with 223 additions and 188 deletions
|
@ -33,6 +33,16 @@ end
|
||||||
|
|
||||||
function onEventStarted(player, aetheryte, triggerName)
|
function onEventStarted(player, aetheryte, triggerName)
|
||||||
|
|
||||||
|
-- Main Scenario Intro Quests
|
||||||
|
if (player:HasQuest(110002) == true) then
|
||||||
|
require ("quests/man/man0l1");
|
||||||
|
local quest = player:GetQuest("Man0l1");
|
||||||
|
if (quest:GetSequence() == SEQ_003) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent025");
|
||||||
|
quest:StartSequence(SEQ_005);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if (player:GetGuildleveDirector() ~= nil) then
|
if (player:GetGuildleveDirector() ~= nil) then
|
||||||
doGuildleveMenu(player, aetheryte);
|
doGuildleveMenu(player, aetheryte);
|
||||||
else
|
else
|
||||||
|
|
|
@ -61,7 +61,7 @@ function onEventStarted(player, npc, triggerName)
|
||||||
local killCount = 50;
|
local killCount = 50;
|
||||||
callClientFunction(player, "caravanGuardOffer", areaName, areaName2, playerGC);
|
callClientFunction(player, "caravanGuardOffer", areaName, areaName2, playerGC);
|
||||||
--callClientFunction(player, "caravanGuardReward", cargo, nil, areaName, playerGC, killCount, areaName2);
|
--callClientFunction(player, "caravanGuardReward", cargo, nil, areaName, playerGC, killCount, areaName2);
|
||||||
--player:SendGameMessageDisplayIDSender(npc, 6, MESSAGE_TYPE_SAY, npc.displayNameId);
|
--player:SendGameMessageLocalizedDisplayName(npc, 6, MESSAGE_TYPE_SAY, npc.displayNameId);
|
||||||
|
|
||||||
|
|
||||||
player:EndEvent();
|
player:EndEvent();
|
||||||
|
|
|
@ -10,37 +10,7 @@ to hit some ID, add "nils".
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
|
function onEventStarted(player, command, eventType, eventName, npcLsId)
|
||||||
local function handleAdventurersGuild(player)
|
player:HandleNpcLS(npcLsId);
|
||||||
if (player:HasQuest(110006) == true) then
|
player:EndEvent();
|
||||||
local man0g1Quest = player:GetQuest("Man0g1");
|
|
||||||
player:SendGameMessage(man0g1Quest, 330, 39, 1300018, nil);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function handlePathOfTheTwelve(player)
|
|
||||||
player:SendMessage(0x20, "", "Test");
|
|
||||||
end
|
|
||||||
|
|
||||||
local npcLsHandlers = {
|
|
||||||
handleAdventurersGuild,
|
|
||||||
nil,
|
|
||||||
nil,
|
|
||||||
nil,
|
|
||||||
nil,
|
|
||||||
handlePathOfTheTwelve
|
|
||||||
}
|
|
||||||
|
|
||||||
function onEventStarted(player, command, triggerName, npcLsId)
|
|
||||||
player:OnNpcLS(npcLsId);
|
|
||||||
|
|
||||||
if (npcLsHandlers[npcLsId] ~= nil) then
|
|
||||||
npcLsHandlers[npcLsId](player);
|
|
||||||
player:SetNpcLS(npcLsId-1, NPCLS_ACTIVE);
|
|
||||||
else
|
|
||||||
player:SendMessage(0x20, "", "That Npc Linkshell is not implemented yet.");
|
|
||||||
end
|
|
||||||
|
|
||||||
player:endEvent();
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
15
Data/scripts/directors/AfterQuestWarpDirector.lua
Normal file
15
Data/scripts/directors/AfterQuestWarpDirector.lua
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
require("global")
|
||||||
|
|
||||||
|
function init()
|
||||||
|
return "/Director/AfterQuestWarpDirector";
|
||||||
|
end
|
||||||
|
|
||||||
|
function onEventStarted(player, director, eventType, eventName)
|
||||||
|
if (player:HasQuest(110002) == true) then
|
||||||
|
quest = player:GetQuest("Man0l1");
|
||||||
|
quest:OnNotice(player);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function main()
|
||||||
|
end
|
|
@ -1,4 +1,5 @@
|
||||||
require("global");
|
require("global");
|
||||||
|
require("tutorial")
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
@ -45,11 +46,21 @@ COCKAHOOP_COCKSWAIN = 1001643;
|
||||||
SENTENIOUS_SELLSWORD = 1001649;
|
SENTENIOUS_SELLSWORD = 1001649;
|
||||||
SOLICITOUS_SELLSWORD = 1001650;
|
SOLICITOUS_SELLSWORD = 1001650;
|
||||||
|
|
||||||
|
BEARDEDROCK_AETHERYTE = 1280002;
|
||||||
|
|
||||||
|
CHARLYS = 1000138;
|
||||||
|
ISANDOREL = 1000152;
|
||||||
|
MERLZIRN = 1000472;
|
||||||
|
MSK_TRIGGER = 1090001;
|
||||||
|
|
||||||
-- Quest Markers
|
-- Quest Markers
|
||||||
MRKR_HOB = 11000202;
|
MRKR_HOB = 11000202;
|
||||||
|
|
||||||
-- Quest Flags
|
-- Quest Flags
|
||||||
FLAG_SEQ000_MINITUT0 = 0;
|
FLAG_SEQ007_VISITED_CUL = 1;
|
||||||
|
FLAG_SEQ007_VISITED_MSK = 2;
|
||||||
|
FLAG_SEQ007_MSK_CUTSCENE = 3;
|
||||||
|
FLAG_SEQ007_MSK_CUTSCENE2 = 4;
|
||||||
|
|
||||||
function onStart(player, quest)
|
function onStart(player, quest)
|
||||||
quest:StartSequence(SEQ_000);
|
quest:StartSequence(SEQ_000);
|
||||||
|
@ -65,18 +76,41 @@ function onFinish(player, quest)
|
||||||
end
|
end
|
||||||
|
|
||||||
function onSequence(player, quest, sequence)
|
function onSequence(player, quest, sequence)
|
||||||
quest:AddENpc(YSHTOLA);
|
|
||||||
quest:AddENpc(CRAPULOUS_ADVENTURER);
|
if (sequence == SEQ_000) then
|
||||||
quest:AddENpc(DUPLICITOUS_TRADER);
|
quest:AddENpc(YSHTOLA);
|
||||||
quest:AddENpc(DEBONAIR_PIRATE);
|
quest:AddENpc(CRAPULOUS_ADVENTURER);
|
||||||
quest:AddENpc(ONYXHAIRED_ADVENTURER);
|
quest:AddENpc(DUPLICITOUS_TRADER);
|
||||||
quest:AddENpc(SKITTISH_ADVENTURER);
|
quest:AddENpc(DEBONAIR_PIRATE);
|
||||||
quest:AddENpc(RELAXING_ADVENTURER);
|
quest:AddENpc(ONYXHAIRED_ADVENTURER);
|
||||||
quest:AddENpc(BADERON, QFLAG_PLATE);
|
quest:AddENpc(SKITTISH_ADVENTURER);
|
||||||
quest:AddENpc(MYTESYN);
|
quest:AddENpc(RELAXING_ADVENTURER);
|
||||||
quest:AddENpc(COCKAHOOP_COCKSWAIN);
|
quest:AddENpc(BADERON, QFLAG_PLATE);
|
||||||
quest:AddENpc(SENTENIOUS_SELLSWORD);
|
quest:AddENpc(MYTESYN);
|
||||||
quest:AddENpc(SOLICITOUS_SELLSWORD);
|
quest:AddENpc(COCKAHOOP_COCKSWAIN);
|
||||||
|
quest:AddENpc(SENTENIOUS_SELLSWORD);
|
||||||
|
quest:AddENpc(SOLICITOUS_SELLSWORD);
|
||||||
|
elseif (sequence == SEQ_003) then
|
||||||
|
quest:AddENpc(BADERON);
|
||||||
|
elseif (sequence == SEQ_005) then
|
||||||
|
quest:AddENpc(BADERON, QFLAG_PLATE);
|
||||||
|
elseif (sequence == SEQ_006) then
|
||||||
|
quest:AddENpc(BADERON, QFLAG_PLATE);
|
||||||
|
elseif (sequence == SEQ_007) then
|
||||||
|
local isandorelFlag1 = not quest:GetFlag(FLAG_SEQ007_VISITED_MSK);
|
||||||
|
local isandorelFlag2 = not quest:GetFlag(FLAG_SEQ007_MSK_CUTSCENE);
|
||||||
|
|
||||||
|
quest:AddENpc(BADERON);
|
||||||
|
quest:AddENpc(CHARLYS, not quest:GetFlag(FLAG_SEQ007_VISITED_CUL) and QFLAG_PLATE or QFLAG_NONE);
|
||||||
|
quest:AddENpc(ISANDOREL, ((isandorelFlag1) or (quest:GetFlag(FLAG_SEQ007_MSK_CUTSCENE) and isandorelFlag2)) and QFLAG_PLATE or QFLAG_NONE);
|
||||||
|
quest:AddENpc(MSK_TRIGGER, not quest:GetFlag(FLAG_SEQ007_MSK_CUTSCENE) and QFLAG_MAP or QFLAG_NONE, false, not quest:GetFlag(FLAG_SEQ007_MSK_CUTSCENE));
|
||||||
|
|
||||||
|
quest:AddENpc(MERLZIRN);
|
||||||
|
|
||||||
|
if (quest:GetFlag(FLAG_SEQ007_VISITED_CUL) and quest:GetFlag(FLAG_SEQ007_VISITED_MSK)) then
|
||||||
|
player:SetNpcLS(1, 1);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -86,11 +120,33 @@ function onTalk(player, quest, npc)
|
||||||
|
|
||||||
if (sequence == SEQ_000) then
|
if (sequence == SEQ_000) then
|
||||||
seq000_onTalk(player, quest, npc, classId);
|
seq000_onTalk(player, quest, npc, classId);
|
||||||
|
elseif (sequence == SEQ_003) then
|
||||||
|
if (classId == BADERON) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2");
|
||||||
|
player:EndEvent();
|
||||||
|
end
|
||||||
|
elseif (sequence == SEQ_005) then
|
||||||
|
if (classId == BADERON) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent026");
|
||||||
|
quest:StartSequence(SEQ_006);
|
||||||
|
player:EndEvent();
|
||||||
|
end
|
||||||
|
elseif (sequence == SEQ_006) then
|
||||||
|
if (classId == BADERON) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent027");
|
||||||
|
quest:StartSequence(SEQ_007);
|
||||||
|
player:EndEvent();
|
||||||
|
end
|
||||||
|
elseif (sequence == SEQ_007) then
|
||||||
|
seq007_onTalk(player, quest, npc, classId);
|
||||||
end
|
end
|
||||||
|
|
||||||
quest:UpdateENPCs();
|
quest:UpdateENPCs();
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- !warp 133 -459.619873 40.0005722 196.370377 PrivateAreaMasterPast 2
|
||||||
|
|
||||||
function seq000_onTalk(player, quest, npc, classId)
|
function seq000_onTalk(player, quest, npc, classId)
|
||||||
if (classId == CRAPULOUS_ADVENTURER) then
|
if (classId == CRAPULOUS_ADVENTURER) then
|
||||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_2");
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_2");
|
||||||
|
@ -108,8 +164,16 @@ function seq000_onTalk(player, quest, npc, classId)
|
||||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_8");
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent010_8");
|
||||||
elseif (classId == BADERON) then
|
elseif (classId == BADERON) then
|
||||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent020");
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent020");
|
||||||
|
player:SetNpcLS(1, 3);
|
||||||
quest:StartSequence(SEQ_003);
|
quest:StartSequence(SEQ_003);
|
||||||
player:EndEvent();
|
player:EndEvent();
|
||||||
|
|
||||||
|
local director = GetWorldManager():GetArea(133):CreateDirector("AfterQuestWarpDirector", false);
|
||||||
|
player:AddDirector(director);
|
||||||
|
director:StartDirector(true);
|
||||||
|
player:SetLoginDirector(director);
|
||||||
|
player:KickEvent(director, "noticeEvent", true);
|
||||||
|
|
||||||
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation);
|
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation);
|
||||||
return;
|
return;
|
||||||
elseif (classId == MYTESYN) then
|
elseif (classId == MYTESYN) then
|
||||||
|
@ -125,17 +189,93 @@ function seq000_onTalk(player, quest, npc, classId)
|
||||||
player:EndEvent();
|
player:EndEvent();
|
||||||
end
|
end
|
||||||
|
|
||||||
function seq003_onTalk(player, quest, npc, classId)
|
function seq007_onTalk(player, quest, npc, classId)
|
||||||
|
if (classId == BADERON) then
|
||||||
|
if (quest:GetFlag(FLAG_SEQ007_VISITED_CUL)) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent027_3");
|
||||||
|
elseif (quest:GetFlag(FLAG_SEQ007_VISITED_MSK)) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent027_4");
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent027_2");
|
||||||
|
end
|
||||||
|
player:EndEvent();
|
||||||
|
elseif (classId == CHARLYS) then
|
||||||
|
if (not quest:GetFlag(FLAG_SEQ007_VISITED_CUL)) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent030");
|
||||||
|
quest:SetFlag(FLAG_SEQ007_VISITED_CUL);
|
||||||
|
--give 100gil
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent030_2");
|
||||||
|
end
|
||||||
|
player:EndEvent();
|
||||||
|
elseif (classId == ISANDOREL) then
|
||||||
|
if (quest:GetFlag(FLAG_SEQ007_VISITED_MSK) and quest:GetFlag(FLAG_SEQ007_MSK_CUTSCENE)) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent050");
|
||||||
|
quest:SetFlag(FLAG_SEQ007_MSK_CUTSCENE2);
|
||||||
|
player:EndEvent();
|
||||||
|
local pos = player:GetPos();
|
||||||
|
GetWorldManager():DoZoneChange(player, 230, "PrivateAreaMasterPast", 3, 15, pos[1], pos[2], pos[3], pos[4]);
|
||||||
|
elseif (not quest:GetFlag(FLAG_SEQ007_VISITED_MSK)) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent035");
|
||||||
|
quest:SetFlag(FLAG_SEQ007_VISITED_MSK);
|
||||||
|
else
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent035_2");
|
||||||
|
end
|
||||||
|
player:EndEvent();
|
||||||
|
elseif (classId == MERLZIRN) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent40_2");
|
||||||
|
player:EndEvent();
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function onPush(player, quest, npc)
|
function onPush(player, quest, npc)
|
||||||
local sequence = quest:getSequence();
|
local sequence = quest:getSequence();
|
||||||
local classId = npc:GetActorClassId();
|
local classId = npc:GetActorClassId();
|
||||||
|
|
||||||
|
if (sequence == SEQ_007) then
|
||||||
|
if (classId == MSK_TRIGGER) then
|
||||||
|
callClientFunction(player, "delegateEvent", player, quest, "processEvent040");
|
||||||
|
quest:SetFlag(FLAG_SEQ007_MSK_CUTSCENE);
|
||||||
|
player:EndEvent();
|
||||||
|
GetWorldManager():DoZoneChange(player, 230, nil, 0, 15, -620.0, 29.476, -70.050, 0.791);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function onNotice(player, quest, target)
|
||||||
|
local sequence = quest:getSequence();
|
||||||
|
|
||||||
|
if (sequence == SEQ_003) then
|
||||||
|
player:EndEvent();
|
||||||
|
end
|
||||||
|
|
||||||
|
quest:UpdateENPCs();
|
||||||
|
end
|
||||||
|
|
||||||
|
function onNpcLS(player, quest, npcLSId)
|
||||||
|
local sequence = quest:getSequence();
|
||||||
|
|
||||||
|
if (npcLSId == 1) then
|
||||||
|
player:SetNpcLS(1, 1);
|
||||||
|
|
||||||
|
if (sequence == SEQ_003) then
|
||||||
|
player:SendGameMessageLocalizedDisplayName(quest, 298, 39, 1000015, nil);
|
||||||
|
endTutorialMode(player);
|
||||||
|
elseif (sequence == SEQ_007) then
|
||||||
|
player:SendGameMessageLocalizedDisplayName(quest, 80, 39, 1000015, nil);
|
||||||
|
player:SendGameMessageLocalizedDisplayName(quest, 81, 39, 1000015, nil);
|
||||||
|
player:SendGameMessageLocalizedDisplayName(quest, 82, 39, 1000015, nil);
|
||||||
|
quest:StartSequence(SEQ_035);
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function getJournalInformation(player, quest)
|
function getJournalInformation(player, quest)
|
||||||
return 0, 5, 20;
|
if (quest:GetFlag(FLAG_SEQ007_VISITED_CUL) and quest:GetFlag(FLAG_SEQ007_VISITED_MSK)) then
|
||||||
|
return 0, 5, 20;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
require ("global")
|
|
||||||
|
|
||||||
function onEventStarted(player, npc, triggerName)
|
|
||||||
man0l1Quest = player:GetQuest("Man0l1");
|
|
||||||
|
|
||||||
if (man0l1Quest ~= nil) then
|
|
||||||
if (triggerName == "talkDefault") then
|
|
||||||
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEvent010_2");
|
|
||||||
player:EndEvent();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,13 +0,0 @@
|
||||||
require ("global")
|
|
||||||
|
|
||||||
function onEventStarted(player, npc, triggerName)
|
|
||||||
man0l1Quest = player:GetQuest("Man0l1");
|
|
||||||
|
|
||||||
if (man0l1Quest ~= nil) then
|
|
||||||
if (triggerName == "talkDefault") then
|
|
||||||
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEvent010_5");
|
|
||||||
player:EndEvent();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,13 +0,0 @@
|
||||||
require ("global")
|
|
||||||
|
|
||||||
function onEventStarted(player, npc, triggerName)
|
|
||||||
man0l1Quest = player:GetQuest("Man0l1");
|
|
||||||
|
|
||||||
if (man0l1Quest ~= nil) then
|
|
||||||
if (triggerName == "talkDefault") then
|
|
||||||
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEvent010_4");
|
|
||||||
player:EndEvent();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,23 +0,0 @@
|
||||||
require ("global")
|
|
||||||
|
|
||||||
function onSpawn(player, npc)
|
|
||||||
man0l1Quest = player:GetQuest("Man0l1");
|
|
||||||
|
|
||||||
if (man0l1Quest ~= nil) then
|
|
||||||
npc:SetQuestGraphic(player, 0x2);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function onEventStarted(player, npc, triggerName)
|
|
||||||
man0l1Quest = player:GetQuest("Man0l1");
|
|
||||||
|
|
||||||
if (man0l1Quest ~= nil) then
|
|
||||||
if (triggerName == "talkDefault") then
|
|
||||||
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEvent020");
|
|
||||||
man0l1Quest:NextPhase(3);
|
|
||||||
player:EndEvent();
|
|
||||||
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,13 +0,0 @@
|
||||||
require ("global")
|
|
||||||
|
|
||||||
function onEventStarted(player, npc, triggerName)
|
|
||||||
man0l1Quest = player:GetQuest("Man0l1");
|
|
||||||
|
|
||||||
if (man0l1Quest ~= nil) then
|
|
||||||
if (triggerName == "talkDefault") then
|
|
||||||
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEvent010_7");
|
|
||||||
player:EndEvent();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,13 +0,0 @@
|
||||||
require ("global")
|
|
||||||
|
|
||||||
function onEventStarted(player, npc, triggerName)
|
|
||||||
man0l1Quest = player:GetQuest("Man0l1");
|
|
||||||
|
|
||||||
if (man0l1Quest ~= nil) then
|
|
||||||
if (triggerName == "talkDefault") then
|
|
||||||
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEvent010_6");
|
|
||||||
player:EndEvent();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,13 +0,0 @@
|
||||||
require ("global")
|
|
||||||
|
|
||||||
function onEventStarted(player, npc, triggerName)
|
|
||||||
man0l1Quest = player:GetQuest("Man0l1");
|
|
||||||
|
|
||||||
if (man0l1Quest ~= nil) then
|
|
||||||
if (triggerName == "talkDefault") then
|
|
||||||
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEvent010_7");
|
|
||||||
player:EndEvent();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,13 +0,0 @@
|
||||||
require ("global")
|
|
||||||
|
|
||||||
function onEventStarted(player, npc, triggerName)
|
|
||||||
man0l1Quest = player:GetQuest("Man0l1");
|
|
||||||
|
|
||||||
if (man0l1Quest ~= nil) then
|
|
||||||
if (triggerName == "talkDefault") then
|
|
||||||
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEvent010_3");
|
|
||||||
player:EndEvent();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,13 +0,0 @@
|
||||||
require ("global")
|
|
||||||
|
|
||||||
function onEventStarted(player, npc, triggerName)
|
|
||||||
man0l1Quest = player:GetQuest("Man0l1");
|
|
||||||
|
|
||||||
if (man0l1Quest ~= nil) then
|
|
||||||
if (triggerName == "talkDefault") then
|
|
||||||
callClientFunction(player, "delegateEvent", player, man0l1Quest, "processEvent010_8");
|
|
||||||
player:EndEvent();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -254,7 +254,7 @@ namespace Meteor.Map.Actors
|
||||||
return subpackets;
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SubPacket> GetSetEventStatusPackets(bool talkEnabled = true, bool emoteEnabled = true, bool pushEnabled = true, bool noticeEnabled = true)
|
public List<SubPacket> GetSetEventStatusPackets(bool talkEnabled = true, bool emoteEnabled = true, Boolean? pushEnabled = null, bool noticeEnabled = true)
|
||||||
{
|
{
|
||||||
List<SubPacket> subpackets = new List<SubPacket>();
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
|
|
||||||
|
@ -283,19 +283,19 @@ namespace Meteor.Map.Actors
|
||||||
if (eventConditions.pushWithCircleEventConditions != null)
|
if (eventConditions.pushWithCircleEventConditions != null)
|
||||||
{
|
{
|
||||||
foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions)
|
foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions)
|
||||||
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, pushEnabled, 2, condition.conditionName));
|
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, pushEnabled ?? condition.isEnabled, 2, condition.conditionName));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eventConditions.pushWithFanEventConditions != null)
|
if (eventConditions.pushWithFanEventConditions != null)
|
||||||
{
|
{
|
||||||
foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions)
|
foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions)
|
||||||
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, pushEnabled, 2, condition.conditionName));
|
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, pushEnabled ?? condition.isEnabled, 2, condition.conditionName));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eventConditions.pushWithBoxEventConditions != null)
|
if (eventConditions.pushWithBoxEventConditions != null)
|
||||||
{
|
{
|
||||||
foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions)
|
foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions)
|
||||||
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, pushEnabled, 2, condition.conditionName));
|
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, pushEnabled ?? condition.isEnabled, 2, condition.conditionName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return subpackets;
|
return subpackets;
|
||||||
|
|
|
@ -109,6 +109,16 @@ namespace Meteor.Map.Actors
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual bool IsPublic()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual bool IsPrivate()
|
||||||
|
{
|
||||||
|
return !IsPublic();
|
||||||
|
}
|
||||||
|
|
||||||
public override SubPacket CreateScriptBindPacket()
|
public override SubPacket CreateScriptBindPacket()
|
||||||
{
|
{
|
||||||
List<LuaParam> lParams;
|
List<LuaParam> lParams;
|
||||||
|
|
|
@ -52,6 +52,11 @@ namespace Meteor.Map.actors.area
|
||||||
return PrivateAreaType;
|
return PrivateAreaType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool IsPublic()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public Zone GetParentZone()
|
public Zone GetParentZone()
|
||||||
{
|
{
|
||||||
return ParentZone;
|
return ParentZone;
|
||||||
|
|
|
@ -582,7 +582,7 @@ namespace Meteor.Map.Actors
|
||||||
QueuePacket(SetWeatherPacket.BuildPacket(Id, SetWeatherPacket.WEATHER_CLEAR, 1));
|
QueuePacket(SetWeatherPacket.BuildPacket(Id, SetWeatherPacket.WEATHER_CLEAR, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendZoneInPackets(WorldManager world, ushort spawnType)
|
public void SendZoneInPackets(WorldManager world, ushort spawnType, bool changeMap)
|
||||||
{
|
{
|
||||||
QueuePacket(SetActorIsZoningPacket.BuildPacket(Id, false));
|
QueuePacket(SetActorIsZoningPacket.BuildPacket(Id, false));
|
||||||
QueuePacket(SetDalamudPacket.BuildPacket(Id, 0));
|
QueuePacket(SetDalamudPacket.BuildPacket(Id, 0));
|
||||||
|
@ -965,7 +965,7 @@ namespace Meteor.Map.Actors
|
||||||
QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, log, LuaUtils.CreateLuaParamList(msgParams)));
|
QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, log, LuaUtils.CreateLuaParamList(msgParams)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGameMessageCustomSender(Actor textIdOwner, ushort textId, byte log, string customSender, params object[] msgParams)
|
public void SendGameMessageDisplayName(Actor textIdOwner, ushort textId, byte log, string customSender, params object[] msgParams)
|
||||||
{
|
{
|
||||||
if (msgParams == null || msgParams.Length == 0)
|
if (msgParams == null || msgParams.Length == 0)
|
||||||
QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, customSender, log));
|
QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, customSender, log));
|
||||||
|
@ -973,7 +973,7 @@ namespace Meteor.Map.Actors
|
||||||
QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, customSender, log, LuaUtils.CreateLuaParamList(msgParams)));
|
QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, customSender, log, LuaUtils.CreateLuaParamList(msgParams)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGameMessageDisplayIDSender(Actor textIdOwner, ushort textId, byte log, uint displayId, params object[] msgParams)
|
public void SendGameMessageLocalizedDisplayName(Actor textIdOwner, ushort textId, byte log, uint displayId, params object[] msgParams)
|
||||||
{
|
{
|
||||||
if (msgParams == null || msgParams.Length == 0)
|
if (msgParams == null || msgParams.Length == 0)
|
||||||
QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, displayId, log));
|
QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, displayId, log));
|
||||||
|
@ -1699,11 +1699,15 @@ namespace Meteor.Map.Actors
|
||||||
|
|
||||||
if (defaultTalk != null && defaultTalk.IsQuestENPC(this, npc))
|
if (defaultTalk != null && defaultTalk.IsQuestENPC(this, npc))
|
||||||
return defaultTalk;
|
return defaultTalk;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Quest GetTutorialQuest(Npc npc)
|
public Quest GetTutorialQuest(Npc npc)
|
||||||
{
|
{
|
||||||
|
if (npc.CurrentArea.RegionId != 101 || npc.CurrentArea.RegionId != 103 || npc.CurrentArea.RegionId != 104)
|
||||||
|
return null;
|
||||||
|
|
||||||
switch (npc.GetActorClassId())
|
switch (npc.GetActorClassId())
|
||||||
{
|
{
|
||||||
case 1000137:
|
case 1000137:
|
||||||
|
@ -1735,6 +1739,11 @@ namespace Meteor.Map.Actors
|
||||||
bool isCalling, isExtra;
|
bool isCalling, isExtra;
|
||||||
isCalling = isExtra = false;
|
isCalling = isExtra = false;
|
||||||
|
|
||||||
|
if (npcLSId < 1 || npcLSId > 40)
|
||||||
|
return;
|
||||||
|
|
||||||
|
npcLSId--;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case NPCLS_INACTIVE:
|
case NPCLS_INACTIVE:
|
||||||
|
|
|
@ -63,6 +63,7 @@ namespace Meteor.Map.actors
|
||||||
|
|
||||||
public class PushCircleEventCondition
|
public class PushCircleEventCondition
|
||||||
{
|
{
|
||||||
|
public bool isEnabled = true;
|
||||||
public string conditionName = "";
|
public string conditionName = "";
|
||||||
public float radius = 30.0f;
|
public float radius = 30.0f;
|
||||||
public bool outwards = false;
|
public bool outwards = false;
|
||||||
|
@ -71,6 +72,7 @@ namespace Meteor.Map.actors
|
||||||
|
|
||||||
public class PushFanEventCondition
|
public class PushFanEventCondition
|
||||||
{
|
{
|
||||||
|
public bool isEnabled = true;
|
||||||
public string conditionName;
|
public string conditionName;
|
||||||
public float radius = 30.0f;
|
public float radius = 30.0f;
|
||||||
public bool outwards = false;
|
public bool outwards = false;
|
||||||
|
@ -79,6 +81,7 @@ namespace Meteor.Map.actors
|
||||||
|
|
||||||
public class PushBoxEventCondition
|
public class PushBoxEventCondition
|
||||||
{
|
{
|
||||||
|
public bool isEnabled = true;
|
||||||
public uint bgObj;
|
public uint bgObj;
|
||||||
public uint layout;
|
public uint layout;
|
||||||
public string conditionName = "";
|
public string conditionName = "";
|
||||||
|
|
Loading…
Add table
Reference in a new issue