mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +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
|
@ -0,0 +1,5 @@
|
|||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return true, true, 10, 0, 1, true, false, false, false, false, false, false, false, 0;
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return true, true, 10, 0, 1, true, false, false, false, false, false, false, false, 0;
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return true, true, 10, 0, 1, true, false, false, false, false, false, false, false, 0;
|
||||
end
|
|
@ -0,0 +1,40 @@
|
|||
--[[
|
||||
|
||||
AetheryteChild Script
|
||||
|
||||
Functions:
|
||||
|
||||
eventAetheryteChildSelect(showTeleport, parentAetheryteID, animaAmount, animaCost(always 1)): Opens menu
|
||||
eventAetheryteChildDesion(aetheryteId): "Your homepoint is now X"
|
||||
processGuildleveBoost(favourCost, currentFavour): Ask: "Invoke the aspect of your Guardian deity to gain a temporary boon for the duration of a levequest."
|
||||
processGuildlevePlaying(??)
|
||||
processGuildleveJoin() - Ask: "Do you wish to join your party leader's levequest?"
|
||||
|
||||
--]]
|
||||
|
||||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
menuChoice = callClientFunction(player, "eventAetheryteChildSelect", true, 1280062, 4, 1);
|
||||
|
||||
--Teleport
|
||||
if (menuChoice == 2) then
|
||||
|
||||
--Init Levequest
|
||||
elseif (menuChoice == -1) then
|
||||
callClientFunction(player, "eventGLSelect", 0);
|
||||
--Set Homepoint
|
||||
elseif (menuChoice == -2) then
|
||||
|
||||
--View Faction Standing
|
||||
elseif (menuChoice == -3) then
|
||||
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
|
@ -21,11 +21,11 @@ end
|
|||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
|
||||
--callClientFunction(player, "eventTalkWelcome", player);
|
||||
callClientFunction(player, "eventTalkWelcome", player);
|
||||
callClientFunction(player, "eventAskMainMenu", player, 20, true, true, true, true, 4);
|
||||
callClientFunction(player, "eventTalkMyChocobo", player);
|
||||
callClientFunction(player, "eventSetChocoboName", false);
|
||||
callClientFunction(player, "eventAfterChocoboName", player);
|
||||
--callClientFunction(player, "eventTalkMyChocobo", player);
|
||||
--callClientFunction(player, "eventSetChocoboName", false);
|
||||
--callClientFunction(player, "eventAfterChocoboName", player);
|
||||
|
||||
player:EndEvent();
|
||||
end
|
|
@ -42,7 +42,7 @@ function onEventStarted(player, npc, triggerName)
|
|||
createLinkshell(lsName, crestId);
|
||||
callClientFunction(player, "eventTalkStepMakeupDone");
|
||||
--Modify
|
||||
elseif (result == 1) then
|
||||
elseif (result == 4) then
|
||||
modifyLinkshell(lsName, crestId);
|
||||
callClientFunction(player, "eventTalkStepModifyDone");
|
||||
--Disband
|
||||
|
|
68
data/scripts/chocobo.lua
Normal file
68
data/scripts/chocobo.lua
Normal file
|
@ -0,0 +1,68 @@
|
|||
--[[
|
||||
|
||||
Globals referenced in all of the lua scripts
|
||||
|
||||
--]]
|
||||
|
||||
-- ACTOR STATES
|
||||
|
||||
ACTORSTATE_PASSIVE = 0;
|
||||
ACTORSTATE_DEAD1 = 1;
|
||||
ACTORSTATE_ACTIVE = 2;
|
||||
ACTORSTATE_DEAD2 = 3;
|
||||
ACTORSTATE_SITTING_ONOBJ = 11;
|
||||
ACTORSTATE_SITTING_ONFLOOR = 13;
|
||||
ACTORSTATE_MOUNTED = 15;
|
||||
|
||||
|
||||
-- MESSAGE
|
||||
MESSAGE_TYPE_NONE = 0;
|
||||
MESSAGE_TYPE_SAY = 1;
|
||||
MESSAGE_TYPE_SHOUT = 2;
|
||||
MESSAGE_TYPE_TELL = 3;
|
||||
MESSAGE_TYPE_PARTY = 4;
|
||||
MESSAGE_TYPE_LINKSHELL1 = 5;
|
||||
MESSAGE_TYPE_LINKSHELL2 = 6;
|
||||
MESSAGE_TYPE_LINKSHELL3 = 7;
|
||||
MESSAGE_TYPE_LINKSHELL4 = 8;
|
||||
MESSAGE_TYPE_LINKSHELL5 = 9;
|
||||
MESSAGE_TYPE_LINKSHELL6 = 10;
|
||||
MESSAGE_TYPE_LINKSHELL7 = 11;
|
||||
MESSAGE_TYPE_LINKSHELL8 = 12;
|
||||
|
||||
MESSAGE_TYPE_SAY_SPAM = 22;
|
||||
MESSAGE_TYPE_SHOUT_SPAM = 23;
|
||||
MESSAGE_TYPE_TELL_SPAM = 24;
|
||||
MESSAGE_TYPE_CUSTOM_EMOTE = 25;
|
||||
MESSAGE_TYPE_EMOTE_SPAM = 26;
|
||||
MESSAGE_TYPE_STANDARD_EMOTE = 27;
|
||||
MESSAGE_TYPE_URGENT_MESSAGE = 28;
|
||||
MESSAGE_TYPE_GENERAL_INFO = 29;
|
||||
MESSAGE_TYPE_SYSTEM = 32;
|
||||
MESSAGE_TYPE_SYSTEM_ERROR = 33;
|
||||
|
||||
-- INVENTORY
|
||||
INVENTORY_NORMAL = 0x0000; --Max 0xC8
|
||||
INVENTORY_LOOT = 0x0004; --Max 0xA
|
||||
INVENTORY_MELDREQUEST = 0x0005; --Max 0x04
|
||||
INVENTORY_BAZAAR = 0x0007; --Max 0x0A
|
||||
INVENTORY_CURRENCY = 0x0063; --Max 0x140
|
||||
INVENTORY_KEYITEMS = 0x0064; --Max 0x500
|
||||
INVENTORY_EQUIPMENT = 0x00FE; --Max 0x23
|
||||
INVENTORY_EQUIPMENT_OTHERPLAYER = 0x00F9; --Max 0x23
|
||||
|
||||
--UTILS
|
||||
|
||||
function callClientFunction(player, functionName, ...)
|
||||
player:RunEventFunction(functionName, ...);
|
||||
result = coroutine.yield();
|
||||
return result;
|
||||
end
|
||||
|
||||
function printf(s, ...)
|
||||
if ... then
|
||||
print(s:format(...));
|
||||
else
|
||||
print(s);
|
||||
end;
|
||||
end;
|
|
@ -14,12 +14,11 @@ function onEventStarted(player, command, triggerName)
|
|||
player:ChangeState(0);
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
--player:endEvent();
|
||||
|
||||
--For Opening Tutorial
|
||||
if (player:HasQuest("Man0l0") or player:HasQuest("Man0g0") or player:HasQuest("Man0u0")) then
|
||||
player:GetDirector():OnCommand(command);
|
||||
|
||||
player:GetDirector("Quest/QuestDirectorMan0l001"):OnCommandEvent(player, command);
|
||||
end
|
||||
|
||||
end
|
12
data/scripts/commands/LinkshellKickCommand.lua
Normal file
12
data/scripts/commands/LinkshellKickCommand.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
--[[
|
||||
|
||||
LinkshellKickCommand Script
|
||||
|
||||
--]]
|
||||
|
||||
function onEventStarted(player, actor, triggerName, linkshellName, kickedName)
|
||||
|
||||
GetWorldManager():RequestWorldLinkshellKick(player, linkshellName, kickedName);
|
||||
player:EndEvent();
|
||||
|
||||
end
|
35
data/scripts/commands/gm/endevent.lua
Normal file
35
data/scripts/commands/gm/endevent.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "ss",
|
||||
description =
|
||||
[[
|
||||
Passes endEvent() to player or <targetname> to close a script.
|
||||
!endevent |
|
||||
!endevent <targetname> |
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, name, lastName)
|
||||
local sender = "[endevent] ";
|
||||
|
||||
if name then
|
||||
if lastName then
|
||||
player = GetWorldManager():GetPCInWorld(name.." "..lastName) or nil;
|
||||
else
|
||||
player = GetWorldManager():GetPCInWorld(name) or nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local message = "Sending endEvent()";
|
||||
|
||||
if player then
|
||||
player:endEvent();
|
||||
player:SendMessage(messageID, sender, message);
|
||||
print(message);
|
||||
else
|
||||
print(sender.."Sending Event.");
|
||||
end;
|
||||
end;
|
42
data/scripts/commands/gm/givegil.lua
Normal file
42
data/scripts/commands/gm/givegil.lua
Normal file
|
@ -0,0 +1,42 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sss",
|
||||
description =
|
||||
[[
|
||||
Adds gil <qty> to player or <targetname>.
|
||||
!givegil <qty> |
|
||||
!givegil <qty> <targetname> |
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, qty, name, lastName)
|
||||
local sender = "[givegil] ";
|
||||
|
||||
if name then
|
||||
if lastName then
|
||||
player = GetWorldManager():GetPCInWorld(name.." "..lastName) or nil;
|
||||
else
|
||||
player = GetWorldManager():GetPCInWorld(name) or nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
if player then
|
||||
currency = 1000001;
|
||||
qty = tonumber(qty) or 1;
|
||||
location = INVENTORY_CURRENCY;
|
||||
|
||||
local added = player:GetInventory(location):AddItem(currency, qty, 1);
|
||||
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local message = "unable to add gil";
|
||||
|
||||
if currency and added then
|
||||
message = string.format("added %u gil to %s", qty, player:GetName());
|
||||
end
|
||||
player:SendMessage(messageID, sender, message);
|
||||
print(message);
|
||||
else
|
||||
print(sender.."unable to add gil, ensure player name is valid.");
|
||||
end;
|
||||
end;
|
57
data/scripts/commands/gm/nudge.lua
Normal file
57
data/scripts/commands/gm/nudge.lua
Normal file
|
@ -0,0 +1,57 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "ss",
|
||||
description =
|
||||
[[
|
||||
Positions your character forward a set <distance>, defaults to 5 yalms.
|
||||
!nudge |
|
||||
!nudge <distance> |
|
||||
!nudge <distance> <up/down> |
|
||||
]],
|
||||
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, distance, vertical)
|
||||
local pos = player:GetPos();
|
||||
local x = pos[0];
|
||||
local y = pos[1];
|
||||
local z = pos[2];
|
||||
local rot = pos[3];
|
||||
local zone = pos[4];
|
||||
local angle = rot + (math.pi/2);
|
||||
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local sender = "[nudge] ";
|
||||
|
||||
if distance == nil then
|
||||
distance = 5
|
||||
end;
|
||||
|
||||
local px = x - distance * math.cos(angle);
|
||||
local pz = z + distance * math.sin(angle);
|
||||
local message = string.format("Positioning forward %u yalms.", distance);
|
||||
local worldManager = GetWorldManager();
|
||||
|
||||
if argc == 1 then
|
||||
worldManager:DoPlayerMoveInZone(player, px, y, pz, rot, 0x0);
|
||||
player:SendMessage(messageID, sender, message);
|
||||
elseif argc == 2 then
|
||||
if vertical == "up" or vertical == "u" or vertical == "+" then
|
||||
y = y + distance;
|
||||
message = string.format("Positioning up %u yalms.", distance);
|
||||
worldManager:DoPlayerMoveInZone(player, x, y, z, rot, 0x0);
|
||||
player:SendMessage(messageID, sender, message);
|
||||
elseif vertical == "down" or vertical == "d" or vertical == "-" then
|
||||
y = y - distance;
|
||||
message = string.format("Positioning down %u yalms.", distance);
|
||||
worldManager:DoPlayerMoveInZone(player, x, y, z, rot, 0x0);
|
||||
player:SendMessage(messageID, sender, message);
|
||||
else
|
||||
player:SendMessage(messageID, sender, "Unknown parameters! Usage: \n"..properties.description);
|
||||
end;
|
||||
else
|
||||
worldManager:DoPlayerMoveInZone(player, px, y, pz, rot, 0x0);
|
||||
player:SendMessage(messageID, sender, message);
|
||||
end;
|
||||
end;
|
28
data/scripts/commands/gm/test.lua
Normal file
28
data/scripts/commands/gm/test.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "ss",
|
||||
description =
|
||||
[[
|
||||
Positions your character forward a set <distance>, defaults to 5 yalms.
|
||||
!nudge |
|
||||
!nudge <distance> |
|
||||
!nudge <distance> <up/down> |
|
||||
]],
|
||||
|
||||
}
|
||||
|
||||
function onTrigger(player, argc)
|
||||
worldMaster = GetWorldMaster();
|
||||
player:SendGameMessage(player, worldMaster, 34108, 0x20);
|
||||
player:SendGameMessage(player, worldMaster, 50011, 0x20);
|
||||
|
||||
director = player:GetZone():CreateDirector("Quest/QuestDirectorMan0l001");
|
||||
player:AddDirector(director);
|
||||
player:SetLoginDirector(director);
|
||||
|
||||
player:KickEvent(director, "noticeEvent", true);
|
||||
|
||||
GetWorldManager():DoZoneChange(player, 9);
|
||||
end;
|
49
data/scripts/commands/gm/workvalue.lua
Normal file
49
data/scripts/commands/gm/workvalue.lua
Normal file
|
@ -0,0 +1,49 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "ssss",
|
||||
description =
|
||||
[[
|
||||
<actorName> <workName> <uiFunc> <value>
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, target, workName, uiFunc, value)
|
||||
|
||||
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local sender = "[workvalue] ";
|
||||
|
||||
if (argc != 4) then
|
||||
player:SendMessage(messageID, sender, "Invalid args");
|
||||
return;
|
||||
end
|
||||
|
||||
if (target == "@t") then
|
||||
targetActor = GetWorldManager():GetActorInWorld(player.currentTarget) or nil;
|
||||
else
|
||||
targetActor = GetWorldManager():GetActorInWorld(target) or nil;
|
||||
end
|
||||
|
||||
if not targetActor then
|
||||
player:SendMessage(messageID, sender, "Error finding target...");
|
||||
return
|
||||
end
|
||||
|
||||
if (tonumber(value) ~= nil) then
|
||||
result = targetActor:SetWorkValue(player, workName, uiFunc, tonumber(value));
|
||||
elseif (value == "true") then
|
||||
result = targetActor:SetWorkValue(player, workName, uiFunc, true);
|
||||
elseif (value == "false") then
|
||||
result = targetActor:SetWorkValue(player, workName, uiFunc, false);
|
||||
else
|
||||
result = targetActor:SetWorkValue(player, workName, uiFunc, value);
|
||||
end
|
||||
|
||||
if (result) then
|
||||
player:SendMessage(messageID, sender, workName .. " changed to " .. value);
|
||||
else
|
||||
player:SendMessage(messageID, sender, "Could not changed workvalue. Is the name and datatype correct?");
|
||||
end
|
||||
|
||||
end
|
66
data/scripts/directors/OpeningDirector.lua
Normal file
66
data/scripts/directors/OpeningDirector.lua
Normal file
|
@ -0,0 +1,66 @@
|
|||
require ("global")
|
||||
require ("quests/man/man0l0")
|
||||
require ("quests/man/man0g0")
|
||||
require ("quests/man/man0u0")
|
||||
|
||||
function init()
|
||||
return "/Director/OpeningDirector";
|
||||
end
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
if (player:HasQuest(110001) == true) then
|
||||
quest = player:GetQuest("Man0l0");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ", nil, nil, nil);
|
||||
elseif (player:HasQuest(110005) == true) then
|
||||
quest = player:GetQuest("Man0g0");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ", nil, nil, nil);
|
||||
elseif (player:HasQuest(110009) == true) then
|
||||
quest = player:GetQuest("Man0u0");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ", nil, nil, nil);
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
end
|
||||
|
||||
function onUpdate()
|
||||
end
|
||||
|
||||
function onTalkEvent(player, npc)
|
||||
;
|
||||
if (player:HasQuest(110001) == true) then
|
||||
man0l0Quest = player:GetQuest("man0l0");
|
||||
if (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():GetActorInWorldByUniqueId("exit_door");
|
||||
player:SetEventStatus(doorNpc, "pushDefault", true, 0x2);
|
||||
doorNpc:SetQuestGraphic(player, 0x3);
|
||||
end
|
||||
elseif (player:HasQuest(110005) == true) then
|
||||
man0g0Quest = player:GetQuest("man0g0");
|
||||
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then
|
||||
yda = GetWorldManager():GetActorInWorldByUniqueId("yda");
|
||||
yda:SetQuestGraphic(player, 0x2);
|
||||
end
|
||||
elseif (player:HasQuest(110009) == true) then
|
||||
man0u0Quest = player:GetQuest("man0u0");
|
||||
if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == true and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == true and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == true) then
|
||||
exitTriggerNpc = GetWorldManager():GetActorInWorldByUniqueId("exit_trigger");
|
||||
player:SetEventStatus(exitTriggerNpc, "pushDefault", true, 0x2);
|
||||
exitTriggerNpc:SetQuestGraphic(player, 0x3);
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function onPushEvent(player, npc)
|
||||
end
|
||||
|
||||
function onCommandEvent(player, command)
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc)
|
||||
end
|
||||
|
||||
function onCommand(player, command)
|
||||
end
|
66
data/scripts/directors/Quest/QuestDirectorMan0g001.lua
Normal file
66
data/scripts/directors/Quest/QuestDirectorMan0g001.lua
Normal file
|
@ -0,0 +1,66 @@
|
|||
require ("global")
|
||||
require ("quests/man/man0g0")
|
||||
|
||||
--processTtrBtl001: Active Mode Tutorial
|
||||
--processTtrBtl002: Targetting Tutorial (After active mode done)
|
||||
--processTtrBtl003: Auto Attack Done
|
||||
--processTtrBtl004: Tutorial Complete
|
||||
|
||||
--[[
|
||||
12: TP
|
||||
13: WeaponSkills
|
||||
|
||||
]]--
|
||||
|
||||
function init()
|
||||
return "/Director/Quest/QuestDirectorMan0g001";
|
||||
end
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
quest = GetStaticActor("Man0g0");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl001", nil, nil, nil);
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl002", nil, nil, nil);
|
||||
|
||||
--sendDataPacket: Success
|
||||
--sendDataPacket: CloseWidget
|
||||
--IF DoW:
|
||||
--sendDataPacket: OpenWidget (TP)
|
||||
--IF TP REACHED:
|
||||
--sendDataPacket: CloseWidget
|
||||
--sendDataPacket: OpenWidget (WS)
|
||||
--IF WS USED:
|
||||
--sendDataPacket: Success
|
||||
--sendDataPacket: CloseWidget
|
||||
--ELSE MAGIC:
|
||||
--sendDataPacket: OpenWidget (DEFEAT ENEMY)
|
||||
|
||||
--IF DEAD
|
||||
--sendDataPacket: Attention
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
end
|
||||
|
||||
function onUpdate()
|
||||
end
|
||||
|
||||
function onTalkEvent(player, npc)
|
||||
|
||||
end
|
||||
|
||||
function onPushEvent(player, npc)
|
||||
end
|
||||
|
||||
function onCommandEvent(player, command)
|
||||
|
||||
quest = GetStaticActor("Man0g0");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl002", nil, nil, nil);
|
||||
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc)
|
||||
end
|
||||
|
||||
function onCommand(player, command)
|
||||
end
|
66
data/scripts/directors/Quest/QuestDirectorMan0l001.lua
Normal file
66
data/scripts/directors/Quest/QuestDirectorMan0l001.lua
Normal file
|
@ -0,0 +1,66 @@
|
|||
require ("global")
|
||||
require ("quests/man/man0l0")
|
||||
|
||||
--processTtrBtl001: Active Mode Tutorial
|
||||
--processTtrBtl002: Targetting Tutorial (After active mode done)
|
||||
--processTtrBtl003: Auto Attack Done
|
||||
--processTtrBtl004: Tutorial Complete
|
||||
|
||||
--[[
|
||||
12: TP
|
||||
13: WeaponSkills
|
||||
|
||||
]]--
|
||||
|
||||
function init()
|
||||
return "/Director/Quest/QuestDirectorMan0l001";
|
||||
end
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
quest = GetStaticActor("Man0l0");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl001", nil, nil, nil);
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl002", nil, nil, nil);
|
||||
|
||||
--sendDataPacket: Success
|
||||
--sendDataPacket: CloseWidget
|
||||
--IF DoW:
|
||||
--sendDataPacket: OpenWidget (TP)
|
||||
--IF TP REACHED:
|
||||
--sendDataPacket: CloseWidget
|
||||
--sendDataPacket: OpenWidget (WS)
|
||||
--IF WS USED:
|
||||
--sendDataPacket: Success
|
||||
--sendDataPacket: CloseWidget
|
||||
--ELSE MAGIC:
|
||||
--sendDataPacket: OpenWidget (DEFEAT ENEMY)
|
||||
|
||||
--IF DEAD
|
||||
--sendDataPacket: Attention
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
end
|
||||
|
||||
function onUpdate()
|
||||
end
|
||||
|
||||
function onTalkEvent(player, npc)
|
||||
|
||||
end
|
||||
|
||||
function onPushEvent(player, npc)
|
||||
end
|
||||
|
||||
function onCommandEvent(player, command)
|
||||
|
||||
quest = GetStaticActor("Man0l0");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl002", nil, nil, nil);
|
||||
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc)
|
||||
end
|
||||
|
||||
function onCommand(player, command)
|
||||
end
|
66
data/scripts/directors/Quest/QuestDirectorMan0u001.lua
Normal file
66
data/scripts/directors/Quest/QuestDirectorMan0u001.lua
Normal file
|
@ -0,0 +1,66 @@
|
|||
require ("global")
|
||||
require ("quests/man/man0u0")
|
||||
|
||||
--processTtrBtl001: Active Mode Tutorial
|
||||
--processTtrBtl002: Targetting Tutorial (After active mode done)
|
||||
--processTtrBtl003: Auto Attack Done
|
||||
--processTtrBtl004: Tutorial Complete
|
||||
|
||||
--[[
|
||||
12: TP
|
||||
13: WeaponSkills
|
||||
|
||||
]]--
|
||||
|
||||
function init()
|
||||
return "/Director/Quest/QuestDirectorMan0u001";
|
||||
end
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
quest = GetStaticActor("Man0u0");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl001", nil, nil, nil);
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl002", nil, nil, nil);
|
||||
|
||||
--sendDataPacket: Success
|
||||
--sendDataPacket: CloseWidget
|
||||
--IF DoW:
|
||||
--sendDataPacket: OpenWidget (TP)
|
||||
--IF TP REACHED:
|
||||
--sendDataPacket: CloseWidget
|
||||
--sendDataPacket: OpenWidget (WS)
|
||||
--IF WS USED:
|
||||
--sendDataPacket: Success
|
||||
--sendDataPacket: CloseWidget
|
||||
--ELSE MAGIC:
|
||||
--sendDataPacket: OpenWidget (DEFEAT ENEMY)
|
||||
|
||||
--IF DEAD
|
||||
--sendDataPacket: Attention
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
end
|
||||
|
||||
function onUpdate()
|
||||
end
|
||||
|
||||
function onTalkEvent(player, npc)
|
||||
|
||||
end
|
||||
|
||||
function onPushEvent(player, npc)
|
||||
end
|
||||
|
||||
function onCommandEvent(player, command)
|
||||
|
||||
quest = GetStaticActor("Man0l0");
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processTtrBtl002", nil, nil, nil);
|
||||
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc)
|
||||
end
|
||||
|
||||
function onCommand(player, command)
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
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
|
|
@ -1,25 +0,0 @@
|
|||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
man0u0Quest = GetStaticActor("Man0u0");
|
||||
man0l0Quest = GetStaticActor("Man0l0");
|
||||
player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl001");
|
||||
--player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtlMagic001");
|
||||
--player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002");
|
||||
--player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl003");
|
||||
|
||||
--player:RunEventFunction("delegateEvent", player, man0u0Quest, "processTtrBtl004");
|
||||
|
||||
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");
|
||||
--player:EndCommand();
|
||||
end
|
|
@ -12,22 +12,29 @@ function onBeginLogin(player)
|
|||
player:AddQuest(110005);
|
||||
elseif (initialTown == 3 and player:HasQuest(110009) == false) then
|
||||
player:AddQuest(110009);
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--For Opening. Set Director and reset position incase d/c
|
||||
if (player:HasQuest(110001) == true) then
|
||||
--player:SetDirector("openingDirector", false);
|
||||
director = player:GetZone():CreateDirector("OpeningDirector");
|
||||
player:AddDirector(director);
|
||||
player:SetLoginDirector(director);
|
||||
player:KickEvent(director, "noticeEvent", "noticeEvent");
|
||||
|
||||
player.positionX = 0.016;
|
||||
player.positionY = 10.35;
|
||||
--player.positionZ = -36.91;
|
||||
player.positionZ = -20.91;
|
||||
player.positionZ = -36.91;
|
||||
player.rotation = 0.025;
|
||||
player:GetQuest(110001):ClearQuestData();
|
||||
player:GetQuest(110001):ClearQuestFlags();
|
||||
elseif (player:HasQuest(110005) == true) then
|
||||
player:SetDirector("openingDirector", false);
|
||||
director = player:GetZone():CreateDirector("OpeningDirector");
|
||||
player:AddDirector(director);
|
||||
player:SetLoginDirector(director);
|
||||
player:KickEvent(director, "noticeEvent", "noticeEvent");
|
||||
|
||||
player.positionX = 369.5434;
|
||||
player.positionY = 4.21;
|
||||
player.positionZ = -706.1074;
|
||||
|
@ -35,15 +42,18 @@ function onBeginLogin(player)
|
|||
player:GetQuest(110005):ClearQuestData();
|
||||
player:GetQuest(110005):ClearQuestFlags();
|
||||
elseif (player:HasQuest(110009) == true) then
|
||||
player:SetDirector("openingDirector", false);
|
||||
director = player:GetZone():CreateDirector("OpeningDirector");
|
||||
player:AddDirector(director);
|
||||
player:SetLoginDirector(director);
|
||||
player:KickEvent(director, "noticeEvent", "noticeEvent");
|
||||
|
||||
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
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
@ -54,7 +64,9 @@ function onLogin(player)
|
|||
player:SendMessage(0x1D,"",">PlayTime == 0, new player!");
|
||||
|
||||
initClassItems(player);
|
||||
initRaceItems(player);
|
||||
initRaceItems(player);
|
||||
|
||||
player:SavePlayTime();
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -6,8 +6,4 @@ 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;
|
||||
MAN0L0_FLAG_MINITUT_DONE3 = 16;
|
|
@ -1,6 +1,7 @@
|
|||
--Quest Flags
|
||||
MAN0U0_FLAG_TUTORIAL1_DONE = 0;
|
||||
MAN0U0_FLAG_TUTORIAL2_DONE = 1;
|
||||
MAN0U0_FLAG_TUTORIAL3_DONE = 2;
|
||||
|
||||
MAN0U0_FLAG_MINITUT_DONE1 = 4;
|
||||
MAN0U0_FLAG_MINITUT_DONE2 = 8;
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
require ("global")
|
||||
require("/quests/man/man0g0")
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
man0g0Quest = GetStaticActor("Man0g0");
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil);
|
||||
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
|
|
@ -6,9 +6,10 @@ function onEventStarted(player, npc, triggerName)
|
|||
|
||||
if (triggerName == "talkDefault") then
|
||||
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == false) then
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil);
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent000_3", nil, nil, nil);
|
||||
man0g0Quest:SetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1, true);
|
||||
man0g0Quest:SaveData();
|
||||
npc:SetQuestGraphic(player, 0x0);
|
||||
player:GetDirector():OnTalked(npc);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil);
|
|
@ -13,16 +13,27 @@ function onEventStarted(player, npc, triggerName)
|
|||
if (triggerName == "pushDefault") then
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrNomal002", nil, nil, nil);
|
||||
elseif (triggerName == "talkDefault") then
|
||||
--Is doing talk tutorial?
|
||||
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE) == false) then
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrNomal003", nil, nil, nil);
|
||||
player:SetEventStatus(npc, "pushDefault", false, 0x2);
|
||||
npc:SetQuestGraphic(player, 0x2);
|
||||
player:GetDirector():OnTalked(npc);
|
||||
man0g0Quest:SetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE, true);
|
||||
man0g0Quest:SaveData();
|
||||
--Was she talked to after papalymo?
|
||||
else
|
||||
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then
|
||||
man0g0Quest:SetQuestFlag(MAN0G0_FLAG_TUTORIAL2_DONE, true);
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent010_1", nil, nil, nil);
|
||||
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == 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);
|
||||
return;
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent000_1", nil, nil, nil);
|
||||
end
|
||||
|
@ -31,24 +42,4 @@ function onEventStarted(player, npc, triggerName)
|
|||
end
|
||||
|
||||
player:EndEvent();
|
||||
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
|
|
@ -1,20 +0,0 @@
|
|||
require ("global")
|
||||
|
||||
function onZoneInit(zone)
|
||||
end
|
||||
|
||||
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)
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkLouisoix_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithAnaidjaa_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithDyrstbrod_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -1,26 +0,0 @@
|
|||
require ("global")
|
||||
require("/quests/man/man0l0")
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
man0l0Quest = GetStaticActor("Man0l0");
|
||||
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil);
|
||||
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
|
|
@ -22,7 +22,7 @@ function onEventStarted(player, npc, triggerName)
|
|||
npc:SetQuestGraphic(player, 0x0);
|
||||
man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3, true);
|
||||
man0l0Quest:SaveData();
|
||||
player:GetDirector():OnTalked(npc);
|
||||
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processEvent000_8", nil, nil, nil);
|
||||
end
|
||||
|
|
|
@ -24,14 +24,17 @@ function onEventStarted(player, npc, triggerName)
|
|||
if (choice == 1) then
|
||||
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processEvent000_2", nil, nil, nil, nil);
|
||||
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);
|
||||
director = player:GetZone():CreateDirector("Quest/QuestDirectorMan0l001");
|
||||
player:KickEvent(director, "noticeEvent", true);
|
||||
player:AddDirector(director);
|
||||
player:SetLoginDirector(director);
|
||||
|
||||
GetWorldManager():DoZoneChange(player, 9);
|
||||
else
|
||||
player:EndEvent();
|
||||
end
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
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
|
|
@ -1,3 +0,0 @@
|
|||
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
|
|
@ -31,7 +31,7 @@ function onEventStarted(player, npc, triggerName)
|
|||
npc:SetQuestGraphic(player, 0x2);
|
||||
man0l0Quest:SaveData();
|
||||
|
||||
player:GetDirector():OnTalked(npc);
|
||||
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
|
||||
--Was he talked to for the mini tutorial?
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processTtrMini001", nil, nil, nil);
|
||||
|
@ -41,7 +41,7 @@ function onEventStarted(player, npc, triggerName)
|
|||
man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1, true);
|
||||
man0l0Quest:SaveData();
|
||||
|
||||
player:GetDirector():OnTalked(npc);
|
||||
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,9 +20,8 @@ function onEventStarted(player, npc, triggerName)
|
|||
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processTtrMini002", nil, nil, nil);
|
||||
npc:SetQuestGraphic(player, 0x0);
|
||||
man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2, true);
|
||||
man0l0Quest:SaveData();
|
||||
|
||||
player:GetDirector():OnTalked(npc);
|
||||
man0l0Quest:SaveData();
|
||||
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processEvent000_13", nil, nil, nil);
|
||||
end
|
||||
|
|
5
data/scripts/unique/ocn0Cruise01/ship_route_1.lua
Normal file
5
data/scripts/unique/ocn0Cruise01/ship_route_1.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0, 0x1415, 201;
|
||||
end
|
5
data/scripts/unique/ocn0Cruise01/ship_route_2.lua
Normal file
5
data/scripts/unique/ocn0Cruise01/ship_route_2.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0, 0x1415, 201;
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultSea = GetStaticActor("DftSea");
|
||||
callClientFunction(player, "delegateEvent", player, defaultSea, "tribeTalk", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultSea = GetStaticActor("DftSea");
|
||||
callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSweetnix_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0, 0xC4, 0x1C8;
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0, 0x187, 0x2;
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultSea = GetStaticActor("DftSea");
|
||||
callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithJoellaut_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -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