diff --git a/FFXIVClassic Lobby Server/Database.cs b/FFXIVClassic Lobby Server/Database.cs
index b37b8efc..1f7ec710 100644
--- a/FFXIVClassic Lobby Server/Database.cs
+++ b/FFXIVClassic Lobby Server/Database.cs
@@ -228,6 +228,8 @@ namespace FFXIVClassic_Lobby_Server
{
conn.Dispose();
}
+
+
}
Log.database(String.Format("CID={0} state updated to active(2).", cid));
diff --git a/FFXIVClassic Lobby Server/PacketProcessor.cs b/FFXIVClassic Lobby Server/PacketProcessor.cs
index 6f3e8979..db2dcaaf 100644
--- a/FFXIVClassic Lobby Server/PacketProcessor.cs
+++ b/FFXIVClassic Lobby Server/PacketProcessor.cs
@@ -253,21 +253,21 @@ namespace FFXIVClassic_Lobby_Server
info.x = 0.016f;
info.y = 10.35f;
info.z = -36.91f;
- info.rot = 0.025f;
+ info.rot = 0.025f;
break;
case 2: //fst0Battle03 (Gridania)
info.zoneId = 166;
- info.x = 356.09f;
- info.y = 3.74f;
- info.z = -701.62f;
- info.rot = -1.4f;
+ info.x = 369.5434f;
+ info.y = 4.21f;
+ info.z = -706.1074f;
+ info.rot = -1.26721f;
break;
case 3: //wil0Battle01 (Ul'dah)
info.zoneId = 184;
- info.x = 12.63f;
- info.y = 196.05f;
- info.z = 131.01f;
- info.rot = -1.34f;
+ info.x = 5.364327f;
+ info.y = 196.0f;
+ info.z = 133.6561f;
+ info.rot = -2.849384f;
break;
}
diff --git a/FFXIVClassic Map Server/Database.cs b/FFXIVClassic Map Server/Database.cs
index 881910bc..c9bb7bf1 100644
--- a/FFXIVClassic Map Server/Database.cs
+++ b/FFXIVClassic Map Server/Database.cs
@@ -345,7 +345,7 @@ namespace FFXIVClassic_Lobby_Server
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@slot", slot);
- cmd.Parameters.AddWithValue("@questId", quest.actorId);
+ cmd.Parameters.AddWithValue("@questId", 0xFFFFF & quest.actorId);
cmd.Parameters.AddWithValue("@questData", quest.GetSerializedQuestData());
cmd.Parameters.AddWithValue("@questFlags", quest.GetQuestFlags());
diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj
index b24f70a6..c6fc13e5 100644
--- a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj
+++ b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj
@@ -72,6 +72,8 @@
+
+
@@ -102,7 +104,6 @@
-
diff --git a/FFXIVClassic Map Server/Server.cs b/FFXIVClassic Map Server/Server.cs
index 8f75ff7c..1409cd15 100644
--- a/FFXIVClassic Map Server/Server.cs
+++ b/FFXIVClassic Map Server/Server.cs
@@ -432,6 +432,7 @@ namespace FFXIVClassic_Lobby_Server
if (spawnType.ToLower().StartsWith("0x"))
sType = Convert.ToByte(spawnType, 16);
else
+
sType = Convert.ToByte(spawnType);
if (mWorldManager.GetZone(zoneId) == null)
diff --git a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs
index f84b4e24..4ea2ed8a 100644
--- a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs
+++ b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs
@@ -2,6 +2,7 @@
using FFXIVClassic_Lobby_Server.common;
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.actors;
+using FFXIVClassic_Map_Server.Actors.Chara;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;
@@ -20,6 +21,8 @@ namespace FFXIVClassic_Map_Server.Actors
{
private uint actorClassId;
+ public NpcWork npcWork = new NpcWork();
+
public Npc(uint id, string actorName, uint zoneId, float posX, float posY, float posZ, float rot, ushort actorState, uint animationId, uint displayNameId, string customDisplayName, string className)
: base(id)
{
@@ -38,6 +41,26 @@ namespace FFXIVClassic_Map_Server.Actors
this.zoneId = zoneId;
loadNpcTemplate(id);
+
+ charaWork.battleSave.potencial = 1.0f;
+
+ charaWork.parameterSave.state_mainSkill[0] = 3;
+ charaWork.parameterSave.state_mainSkill[2] = 3;
+ charaWork.parameterSave.state_mainSkillLevel = 2;
+
+ charaWork.parameterSave.hp[0] = 500;
+ charaWork.parameterSave.hpMax[0] = 500;
+ charaWork.property[0] = 1;
+ charaWork.property[1] = 1;
+
+ if (className.Equals("JellyfishScenarioLimsaLv00"))
+ {
+ charaWork.property[2] = 1;
+ npcWork.hateType = 1;
+ }
+
+ charaWork.property[3] = 1;
+ charaWork.property[4] = 1;
}
public SubPacket createAddActorPacket(uint playerActorId)
@@ -80,6 +103,54 @@ namespace FFXIVClassic_Map_Server.Actors
return BasePacket.createPacket(subpackets, true, false);
}
+ public override BasePacket getInitPackets(uint playerActorId)
+ {
+ ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("/_init", this, playerActorId);
+
+ //Properties
+ for (int i = 0; i < charaWork.property.Length; i++)
+ {
+ if (charaWork.property[i] != 0)
+ propPacketUtil.addProperty(String.Format("charaWork.property[{0}]", i));
+ }
+
+ //Parameters
+ propPacketUtil.addProperty("charaWork.parameterSave.hp[0]");
+ propPacketUtil.addProperty("charaWork.parameterSave.hpMax[0]");
+ propPacketUtil.addProperty("charaWork.parameterSave.mp");
+ propPacketUtil.addProperty("charaWork.parameterSave.mpMax");
+ propPacketUtil.addProperty("charaWork.parameterTemp.tp");
+
+ if (charaWork.parameterSave.state_mainSkill[0] != 0)
+ propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[0]");
+ if (charaWork.parameterSave.state_mainSkill[1] != 0)
+ propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[1]");
+ if (charaWork.parameterSave.state_mainSkill[2] != 0)
+ propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[2]");
+ if (charaWork.parameterSave.state_mainSkill[3] != 0)
+ propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[3]");
+
+ propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkillLevel");
+
+ //Status Times
+ for (int i = 0; i < charaWork.statusShownTime.Length; i++)
+ {
+ if (charaWork.statusShownTime[i] != 0xFFFFFFFF)
+ propPacketUtil.addProperty(String.Format("charaWork.statusShownTime[{0}]", i));
+ }
+
+ //General Parameters
+ for (int i = 3; i < charaWork.battleTemp.generalParameter.Length; i++)
+ {
+ if (charaWork.battleTemp.generalParameter[i] != 0)
+ propPacketUtil.addProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i));
+ }
+
+ propPacketUtil.addProperty("npcWork.hateType");
+
+ return BasePacket.createPacket(propPacketUtil.done(), true, false);
+ }
+
public uint getActorClassId()
{
return actorClassId;
diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs
index 4403cb8a..c4ec6a51 100644
--- a/FFXIVClassic Map Server/actors/chara/player/Player.cs
+++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs
@@ -966,6 +966,47 @@ namespace FFXIVClassic_Map_Server.Actors
public Equipment getEquipment()
{
return equipment;
+ }
+
+ public byte getInitialTown()
+ {
+ return playerWork.initialTown;
+ }
+
+ public int getFreeQuestSlot()
+ {
+ for (int i = 0; i < questScenario.Length; i++)
+ {
+ if (questScenario[i] == null)
+ return i;
+ }
+
+ return -1;
+ }
+
+ public void addQuest(uint id)
+ {
+ Actor actor = Server.getStaticActors((0xA0F00000 | id));
+ addQuest(actor.actorName);
+ }
+
+ public void addQuest(string name)
+ {
+ Actor actor = Server.getStaticActors(name);
+
+ if (actor == null)
+ return;
+
+ uint id = actor.actorId;
+
+ int freeSlot = getFreeQuestSlot();
+
+ if (freeSlot == -1)
+ return;
+
+ playerWork.questScenario[freeSlot] = id;
+ questScenario[freeSlot] = new Quest(this, playerWork.questScenario[freeSlot], name, null, 0);
+ Database.saveQuest(this, questScenario[freeSlot]);
}
public Quest getQuest(uint id)
@@ -1033,6 +1074,14 @@ namespace FFXIVClassic_Map_Server.Actors
{
currentDirector = new QuestDirectorMan0l001(this, 0x46080012);
}
+ else if (directorType.Equals("QuestDirectorMan0g001"))
+ {
+ currentDirector = new QuestDirectorMan0g001(this, 0x46080012);
+ }
+ else if (directorType.Equals("QuestDirectorMan0u001"))
+ {
+ currentDirector = new QuestDirectorMan0u001(this, 0x46080012);
+ }
if (sendPackets)
{
diff --git a/FFXIVClassic Map Server/actors/director/OpeningDirector.cs b/FFXIVClassic Map Server/actors/director/OpeningDirector.cs
index 0d910ba4..67d35c6c 100644
--- a/FFXIVClassic Map Server/actors/director/OpeningDirector.cs
+++ b/FFXIVClassic Map Server/actors/director/OpeningDirector.cs
@@ -15,9 +15,12 @@ namespace FFXIVClassic_Map_Server.actors.director
public OpeningDirector(Player player, uint id) : base(player, id)
{
this.displayNameId = 0;
- this.customDisplayName = "openingDire";
+ this.customDisplayName = String.Format("openingDire_{0}_{1}", player.zone.zoneName, "04");
+
+ this.actorName = String.Format("openingDire_{0}_{1}@{2:x3}{3:x2}", player.zone.zoneName, "04", player.zoneId, 0);
+
+ this.actorName = this.actorName.Replace("Battle", "Btl");
- this.actorName = "openingDire";
this.className = "OpeningDirector";
this.eventConditions = new EventList();
diff --git a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0g001.cs b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0g001.cs
new file mode 100644
index 00000000..51908902
--- /dev/null
+++ b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0g001.cs
@@ -0,0 +1,41 @@
+using FFXIVClassic_Lobby_Server.packets;
+using FFXIVClassic_Map_Server.Actors;
+using FFXIVClassic_Map_Server.lua;
+using FFXIVClassic_Map_Server.packets.send.actor;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FFXIVClassic_Map_Server.actors.director
+{
+ class QuestDirectorMan0g001 : Director
+ {
+ public QuestDirectorMan0g001(Player player, uint id)
+ : base(player, id)
+ {
+ this.displayNameId = 0;
+ this.customDisplayName = "questDirect_fst0Btl03_01";
+
+ this.actorName = "questDirect_fst0Btl03_01@0A615";
+ this.className = "QuestDirectorMan0g001";
+
+ this.eventConditions = new EventList();
+
+ List noticeEventList = new List();
+
+ noticeEventList.Add(new EventList.NoticeEventCondition("noticeEvent", 0xE, 0x0));
+ noticeEventList.Add(new EventList.NoticeEventCondition("noticeRequest", 0x0, 0x1));
+
+ this.eventConditions.noticeEventConditions = noticeEventList;
+ }
+
+ public override SubPacket createScriptBindPacket(uint playerActorId)
+ {
+ List lParams;
+ lParams = LuaUtils.createLuaParamList("/Director/Quest/QuestDirectorMan0g001", false, false, false, false, false, 0x753A);
+ return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
+ }
+ }
+}
diff --git a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0u001.cs b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0u001.cs
new file mode 100644
index 00000000..2a860b05
--- /dev/null
+++ b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0u001.cs
@@ -0,0 +1,41 @@
+using FFXIVClassic_Lobby_Server.packets;
+using FFXIVClassic_Map_Server.Actors;
+using FFXIVClassic_Map_Server.lua;
+using FFXIVClassic_Map_Server.packets.send.actor;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FFXIVClassic_Map_Server.actors.director
+{
+ class QuestDirectorMan0u001 : Director
+ {
+ public QuestDirectorMan0u001(Player player, uint id)
+ : base(player, id)
+ {
+ this.displayNameId = 0;
+ this.customDisplayName = "questDirect_wil0Btl01_01";
+
+ this.actorName = "questDirect_wil0Btl01_01@0A615";
+ this.className = "QuestDirectorMan0u001";
+
+ this.eventConditions = new EventList();
+
+ List noticeEventList = new List();
+
+ noticeEventList.Add(new EventList.NoticeEventCondition("noticeEvent", 0xE, 0x0));
+ noticeEventList.Add(new EventList.NoticeEventCondition("noticeRequest", 0x0, 0x1));
+
+ this.eventConditions.noticeEventConditions = noticeEventList;
+ }
+
+ public override SubPacket createScriptBindPacket(uint playerActorId)
+ {
+ List lParams;
+ lParams = LuaUtils.createLuaParamList("/Director/Quest/QuestDirectorMan0u001", false, false, false, false, false, 0x757F);
+ return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
+ }
+ }
+}
diff --git a/FFXIVClassic Map Server/actors/quest/Quest.cs b/FFXIVClassic Map Server/actors/quest/Quest.cs
index 8fe77bce..8a6469e5 100644
--- a/FFXIVClassic Map Server/actors/quest/Quest.cs
+++ b/FFXIVClassic Map Server/actors/quest/Quest.cs
@@ -25,7 +25,12 @@ namespace FFXIVClassic_Map_Server.Actors
this.owner = owner;
actorName = name;
this.questFlags = questFlags;
- this.questData = JsonConvert.DeserializeObject>(questDataJson);
+
+ if (questDataJson != null)
+ this.questData = JsonConvert.DeserializeObject>(questDataJson);
+ else
+ questData = null;
+
if (questData == null)
questData = new Dictionary();
}
diff --git a/scripts/directors/openingDire_fst0Btl03_04@0A600.lua b/scripts/directors/openingDire_fst0Btl03_04@0A600.lua
new file mode 100644
index 00000000..c573ad61
--- /dev/null
+++ b/scripts/directors/openingDire_fst0Btl03_04@0A600.lua
@@ -0,0 +1,37 @@
+require("/quests/man/man0g0")
+
+function onEventStarted(player, actor, triggerName)
+
+ man0g0Quest = getStaticActor("Man0g0");
+ player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil);
+
+end
+
+function onEventUpdate(player, npc, resultId)
+
+ player:endEvent();
+
+end
+
+function onTalked(player, npc)
+
+ man0g0Quest = player:getQuest("Man0g0");
+
+ if (man0g0Quest ~= nil) then
+
+ yda = getWorldManager():GetActorInWorld(1000009);
+ papalymo = getWorldManager():GetActorInWorld(1000010);
+
+ if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE) == false) then
+ yda:setQuestGraphic(player, 0x0);
+ papalymo:setQuestGraphic(player, 0x2);
+ else
+ if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then
+ yda:setQuestGraphic(player, 0x2);
+ papalymo:setQuestGraphic(player, 0x0);
+ end
+ end
+
+ end
+
+end
\ No newline at end of file
diff --git a/scripts/directors/openingDire_wil0Btl01_04@0B800.lua b/scripts/directors/openingDire_wil0Btl01_04@0B800.lua
new file mode 100644
index 00000000..8c218fef
--- /dev/null
+++ b/scripts/directors/openingDire_wil0Btl01_04@0B800.lua
@@ -0,0 +1,26 @@
+require("/quests/man/man0u0")
+
+function onEventStarted(player, actor, triggerName)
+
+ man0u0Quest = getStaticActor("Man0u0");
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil);
+
+end
+
+function onEventUpdate(player, npc, resultId)
+
+ player:endEvent();
+
+end
+
+function onTalked(player, npc)
+
+ man0u0Quest = player:getQuest("Man0u0");
+
+ if (man0u0Quest ~= nil) then
+
+
+
+ end
+
+end
\ No newline at end of file
diff --git a/scripts/directors/questDirect_fst0Btl03_01@0A615.lua b/scripts/directors/questDirect_fst0Btl03_01@0A615.lua
new file mode 100644
index 00000000..7f4360a5
--- /dev/null
+++ b/scripts/directors/questDirect_fst0Btl03_01@0A615.lua
@@ -0,0 +1,21 @@
+
+function onEventStarted(player, actor, triggerName)
+
+ man0g0Quest = getStaticActor("Man0g0");
+ --player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl001");
+ player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl002");
+
+end
+
+function onEventUpdate(player, npc, resultId)
+ --man0g0Quest = getStaticActor("Man0g0");
+ --player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl002");
+ player:endEvent();
+end
+
+function onCommand(player, command)
+ --Check command if ActivateCommand
+ player:endCommand();
+ player:endEvent();
+ player:kickEvent(player:getDirector(), "noticeEvent", true);
+end
\ No newline at end of file
diff --git a/scripts/directors/questDirect_ocn0Btl02_01@0C196.lua b/scripts/directors/questDirect_ocn0Btl02_01@0C196.lua
index 339e85c5..0d7c6a4e 100644
--- a/scripts/directors/questDirect_ocn0Btl02_01@0C196.lua
+++ b/scripts/directors/questDirect_ocn0Btl02_01@0C196.lua
@@ -2,8 +2,8 @@
function onEventStarted(player, actor, triggerName)
man0l0Quest = getStaticActor("Man0l0");
- player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl004");
- --player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002");
+ --player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl001");
+ player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002");
end
@@ -15,5 +15,7 @@ end
function onCommand(player, command)
--Check command if ActivateCommand
+ player:endCommand();
+ player:endEvent();
player:kickEvent(player:getDirector(), "noticeEvent", true);
end
\ No newline at end of file
diff --git a/scripts/player.lua b/scripts/player.lua
index b53ee7ea..d07bef19 100644
--- a/scripts/player.lua
+++ b/scripts/player.lua
@@ -14,18 +14,18 @@ function onBeginLogin(player)
player:getQuest(110001):ClearQuestFlags();
elseif (player:hasQuest(110005) == true) then
player:setDirector("openingDirector", false);
- player.positionX = 356.09;
- player.positionY = 3.74;
- player.positionZ = -701.62;
- player.rotation = -1.4;
+ player.positionX = 369.5434;
+ player.positionY = 4.21;
+ player.positionZ = -706.1074;
+ player.rotation = -1.26721;
player:getQuest(110005):ClearQuestData();
player:getQuest(110005):ClearQuestFlags();
elseif (player:hasQuest(110009) == true) then
player:setDirector("openingDirector", false);
- player.positionX = 12.63;
- player.positionY = 196.05;
- player.positionZ = 131.01;
- player.rotation = -1.34;
+ player.positionX = 5.364327;
+ player.positionY = 196.0;
+ player.positionZ = 133.6561;
+ player.rotation = -2.849384;
player:getQuest(110009):ClearQuestData();
player:getQuest(110009):ClearQuestFlags();
end
diff --git a/scripts/quests/man/man0g0.lua b/scripts/quests/man/man0g0.lua
new file mode 100644
index 00000000..e237eb10
--- /dev/null
+++ b/scripts/quests/man/man0g0.lua
@@ -0,0 +1,7 @@
+--Quest Flags
+MAN0G0_FLAG_TUTORIAL1_DONE = 0;
+MAN0G0_FLAG_TUTORIAL2_DONE = 1;
+
+MAN0G0_FLAG_MINITUT_DONE1 = 4;
+MAN0G0_FLAG_MINITUT_DONE2 = 8;
+MAN0G0_FLAG_MINITUT_DONE3 = 16;
diff --git a/scripts/quests/man/man0u0.lua b/scripts/quests/man/man0u0.lua
new file mode 100644
index 00000000..98d01bdd
--- /dev/null
+++ b/scripts/quests/man/man0u0.lua
@@ -0,0 +1,7 @@
+--Quest Flags
+MAN0U0_FLAG_TUTORIAL1_DONE = 0;
+MAN0U0_FLAG_TUTORIAL2_DONE = 1;
+
+MAN0U0_FLAG_MINITUT_DONE1 = 4;
+MAN0U0_FLAG_MINITUT_DONE2 = 8;
+MAN0U0_FLAG_MINITUT_DONE3 = 16;
diff --git a/scripts/zones/166/npcs/openingStop_fstBtl03_03@0A600.lua b/scripts/zones/166/npcs/openingStop_fstBtl03_03@0A600.lua
index 0e27be6e..6038d14c 100644
--- a/scripts/zones/166/npcs/openingStop_fstBtl03_03@0A600.lua
+++ b/scripts/zones/166/npcs/openingStop_fstBtl03_03@0A600.lua
@@ -1,5 +1,5 @@
function init(npc)
- return "/Chara/Npc/Object/OpeningStoperF0B1", false, false, false, false, false, 0x10A350, false, false, 0, 1, "TEST";
+ return "/Chara/Npc/Object/OpeningStoperF0B1", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
diff --git a/scripts/zones/166/npcs/pplStd_fst0Btl03_01@0A600.lua b/scripts/zones/166/npcs/pplStd_fst0Btl03_01@0A600.lua
new file mode 100644
index 00000000..2f0cc3f4
--- /dev/null
+++ b/scripts/zones/166/npcs/pplStd_fst0Btl03_01@0A600.lua
@@ -0,0 +1,61 @@
+require("/quests/man/man0g0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onSpawn(player, npc)
+ npc:setQuestGraphic(player, 0x2);
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0g0Quest = player:getQuest("Man0g0");
+
+ if (man0g0Quest ~= nil) then
+
+ if (triggerName == "pushDefault") then
+ player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal002", nil, nil, nil);
+ elseif (triggerName == "talkDefault") then
+ if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE) == false) then
+ player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal003", nil, nil, nil);
+ player:setEventStatus(npc, "pushDefault", false, 0x2);
+ player:getDirector():onTalked(npc);
+ man0g0Quest:SetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE, true);
+ man0g0Quest:SaveData();
+ else
+ if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then
+ man0g0Quest:SetQuestFlag(MAN0G0_FLAG_TUTORIAL2_DONE, true);
+ player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent010_1", nil, nil, nil);
+ else
+ player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_1", nil, nil, nil);
+ end
+ end
+ else
+ player:endEvent();
+ end
+ else
+ player:endEvent(); --Should not be here w.o this quest
+ end
+
+end
+
+function onEventUpdate(player, npc)
+
+ man0g0Quest = player:getQuest("Man0g0");
+
+ if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_TUTORIAL2_DONE) == true) then
+ player:endEvent();
+ player:setDirector("QuestDirectorMan0g001", true);
+
+ worldMaster = getWorldMaster();
+ player:sendGameMessage(player, worldMaster, 34108, 0x20);
+ player:sendGameMessage(player, worldMaster, 50011, 0x20);
+
+ getWorldManager():DoPlayerMoveInZone(player, 10);
+ player:kickEvent(player:getDirector(), "noticeEvent", true);
+ else
+ player:endEvent();
+ end
+
+end
\ No newline at end of file
diff --git a/scripts/zones/166/npcs/pplStd_fst0Btl03_02@0A600.lua b/scripts/zones/166/npcs/pplStd_fst0Btl03_02@0A600.lua
new file mode 100644
index 00000000..e5366219
--- /dev/null
+++ b/scripts/zones/166/npcs/pplStd_fst0Btl03_02@0A600.lua
@@ -0,0 +1,28 @@
+require("/quests/man/man0g0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0g0Quest = player:getQuest("Man0g0");
+
+ if (triggerName == "talkDefault") then
+ if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == false) then
+ player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil);
+ man0g0Quest:SetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1, true);
+ man0g0Quest:SaveData();
+ player:getDirector():onTalked(npc);
+ else
+ player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil);
+ end
+ else
+ player:endEvent();
+ end
+
+end
+
+function onEventUpdate(player, npc)
+ player:endEvent();
+end
\ No newline at end of file
diff --git a/scripts/zones/166/zone.lua b/scripts/zones/166/zone.lua
index 703d61b9..2657611f 100644
--- a/scripts/zones/166/zone.lua
+++ b/scripts/zones/166/zone.lua
@@ -3,7 +3,17 @@
function onZoneInit(zone)
end
-function onZoneIn(zone, player)
+function onZoneIn(player)
+
+ openingQuest = player:getQuest(110005);
+
+ --Opening Quest
+ if (openingQuest ~= nil) then
+ if (openingQuest:GetQuestFlag(0) == false) then
+ player:kickEvent(player:getDirector(), "noticeEvent");
+ end
+ end
+
end
function onZoneOut(zone, player)
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_01@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_01@0B800.lua
new file mode 100644
index 00000000..24f151d2
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_01@0B800.lua
@@ -0,0 +1,21 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0u0Quest = getStaticActor("Man0u0");
+
+ if (triggerName == "talkDefault") then
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_6", nil, nil, nil);
+ else
+ player:endEvent();
+ end
+
+end
+
+function onEventUpdate(player, npc)
+ player:endEvent();
+end
\ No newline at end of file
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_02@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_02@0B800.lua
new file mode 100644
index 00000000..8a9333c0
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_02@0B800.lua
@@ -0,0 +1,33 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onSpawn(player, npc)
+ npc:setQuestGraphic(player, 0x2);
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0u0Quest = player:getQuest("man0u0");
+
+ if (triggerName == "talkDefault") then
+ if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == false) then
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini002_first", nil, nil, nil);
+ npc:setQuestGraphic(player, 0x0);
+ man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2, true);
+ man0u0Quest:SaveData();
+ player:getDirector():onTalked(npc);
+ else
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini002", nil, nil, nil);
+ end
+ else
+ player:endEvent();
+ end
+
+end
+
+function onEventUpdate(player, npc)
+ player:endEvent();
+end
\ No newline at end of file
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_03@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_03@0B800.lua
new file mode 100644
index 00000000..74931883
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_03@0B800.lua
@@ -0,0 +1,21 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0u0Quest = getStaticActor("Man0u0");
+
+ if (triggerName == "talkDefault") then
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_8", nil, nil, nil);
+ else
+ player:endEvent();
+ end
+
+end
+
+function onEventUpdate(player, npc)
+ player:endEvent();
+end
\ No newline at end of file
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_04@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_04@0B800.lua
new file mode 100644
index 00000000..4deadf4e
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_04@0B800.lua
@@ -0,0 +1,21 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0u0Quest = getStaticActor("Man0u0");
+
+ if (triggerName == "talkDefault") then
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_9", nil, nil, nil);
+ else
+ player:endEvent();
+ end
+
+end
+
+function onEventUpdate(player, npc)
+ player:endEvent();
+end
\ No newline at end of file
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_05@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_05@0B800.lua
new file mode 100644
index 00000000..fdb2eb67
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_05@0B800.lua
@@ -0,0 +1,21 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0u0Quest = getStaticActor("Man0u0");
+
+ if (triggerName == "talkDefault") then
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_10", nil, nil, nil);
+ else
+ player:endEvent();
+ end
+
+end
+
+function onEventUpdate(player, npc)
+ player:endEvent();
+end
\ No newline at end of file
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_06@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_06@0B800.lua
new file mode 100644
index 00000000..acf3d645
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_06@0B800.lua
@@ -0,0 +1,33 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onSpawn(player, npc)
+ npc:setQuestGraphic(player, 0x2);
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0u0Quest = player:getQuest("man0u0");
+
+ if (triggerName == "talkDefault") then
+ if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == false) then
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini003_first", nil, nil, nil);
+ npc:setQuestGraphic(player, 0x0);
+ man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3, true);
+ man0u0Quest:SaveData();
+ player:getDirector():onTalked(npc);
+ else
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini003", nil, nil, nil);
+ end
+ else
+ player:endEvent();
+ end
+
+end
+
+function onEventUpdate(player, npc)
+ player:endEvent();
+end
\ No newline at end of file
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_07@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_07@0B800.lua
new file mode 100644
index 00000000..c61fa7c4
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_07@0B800.lua
@@ -0,0 +1,21 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0u0Quest = getStaticActor("Man0u0");
+
+ if (triggerName == "talkDefault") then
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_12", nil, nil, nil);
+ else
+ player:endEvent();
+ end
+
+end
+
+function onEventUpdate(player, npc)
+ player:endEvent();
+end
\ No newline at end of file
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_08@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_08@0B800.lua
new file mode 100644
index 00000000..c112e552
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_08@0B800.lua
@@ -0,0 +1,21 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0u0Quest = getStaticActor("Man0u0");
+
+ if (triggerName == "talkDefault") then
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_13", nil, nil, nil);
+ else
+ player:endEvent();
+ end
+
+end
+
+function onEventUpdate(player, npc)
+ player:endEvent();
+end
\ No newline at end of file
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_09@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_09@0B800.lua
new file mode 100644
index 00000000..85958ea5
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_09@0B800.lua
@@ -0,0 +1,16 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onEventStarted(player, npc, triggerName)
+
+
+end
+
+function onEventUpdate(player, npc)
+
+ player:endEvent();
+
+end
\ No newline at end of file
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_0a@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_0a@0B800.lua
new file mode 100644
index 00000000..4522c5f6
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_0a@0B800.lua
@@ -0,0 +1,48 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onSpawn(player, npc)
+ npc:setQuestGraphic(player, 0x2);
+end
+
+function onEventStarted(player, npc, triggerName)
+
+ man0u0Quest = player:getQuest("Man0u0");
+ if (man0u0Quest ~= nil) then
+
+ if (triggerName == "pushDefault") then
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal002", nil, nil, nil);
+ elseif (triggerName == "talkDefault") then
+ if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_TUTORIAL1_DONE) == false) then
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal003", nil, nil, nil);
+ player:setEventStatus(npc, "pushDefault", false, 0x2);
+ player:getDirector():onTalked(npc);
+ man0u0Quest:SetQuestFlag(MAN0U0_FLAG_TUTORIAL1_DONE, true);
+ man0u0Quest:SaveData();
+ else
+ player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini001", nil, nil, nil);
+
+ if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == false) then
+ npc:setQuestGraphic(player, 0x0);
+ man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1, true);
+ man0u0Quest:SaveData();
+ end
+
+ end
+ else
+ player:endEvent();
+ end
+ else
+ player:endEvent(); --Should not be here w.o this quest
+ end
+
+end
+
+function onEventUpdate(player, npc)
+
+ player:endEvent();
+
+end
\ No newline at end of file
diff --git a/scripts/zones/184/npcs/pplStd_wil0Btl01_0b@0B800.lua b/scripts/zones/184/npcs/pplStd_wil0Btl01_0b@0B800.lua
new file mode 100644
index 00000000..85958ea5
--- /dev/null
+++ b/scripts/zones/184/npcs/pplStd_wil0Btl01_0b@0B800.lua
@@ -0,0 +1,16 @@
+require("/quests/man/man0u0")
+
+function init(npc)
+ return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
+end
+
+function onEventStarted(player, npc, triggerName)
+
+
+end
+
+function onEventUpdate(player, npc)
+
+ player:endEvent();
+
+end
\ No newline at end of file
diff --git a/scripts/zones/184/zone.lua b/scripts/zones/184/zone.lua
new file mode 100644
index 00000000..acf245c1
--- /dev/null
+++ b/scripts/zones/184/zone.lua
@@ -0,0 +1,20 @@
+
+
+function onZoneInit(zone)
+end
+
+function onZoneIn(player)
+
+ openingQuest = player:getQuest(110009);
+
+ --Opening Quest
+ if (openingQuest ~= nil) then
+ if (openingQuest:GetQuestFlag(0) == false) then
+ player:kickEvent(player:getDirector(), "noticeEvent");
+ end
+ end
+
+end
+
+function onZoneOut(zone, player)
+end
\ No newline at end of file
diff --git a/scripts/zones/193/npcs/pplStd_05@0C100.lua b/scripts/zones/193/npcs/pplStd_05@0C100.lua
index ed315de5..4271a73c 100644
--- a/scripts/zones/193/npcs/pplStd_05@0C100.lua
+++ b/scripts/zones/193/npcs/pplStd_05@0C100.lua
@@ -26,8 +26,7 @@ function onEventStarted(player, npc, triggerName)
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini003", nil, nil, nil);
npc:setQuestGraphic(player, 0x0);
man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3, true);
- man0l0Quest:SaveData();
-
+ man0l0Quest:SaveData();
player:getDirector():onTalked(npc);
else
player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_8", nil, nil, nil);
diff --git a/scripts/zones/193/zone.lua b/scripts/zones/193/zone.lua
index c5c52349..75137ee9 100644
--- a/scripts/zones/193/zone.lua
+++ b/scripts/zones/193/zone.lua
@@ -4,6 +4,7 @@ function onZoneInit(zone)
end
function onZoneIn(player)
+
openingQuest = player:getQuest(110001);
--Opening Quest