mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Overhaul of the director system and opening quests. Private Areas further implemented as well.
This commit is contained in:
parent
dcaad5729d
commit
e898c045f7
@ -237,7 +237,9 @@ namespace FFXIVClassic_Map_Server
|
||||
rotation = @rot,
|
||||
destinationZoneId = @destZone,
|
||||
destinationSpawnType = @destSpawn,
|
||||
currentZoneId = @zoneId
|
||||
currentZoneId = @zoneId,
|
||||
currentPrivateArea = @privateArea,
|
||||
currentPrivateAreaType = @privateAreaType
|
||||
WHERE id = @charaId
|
||||
";
|
||||
|
||||
@ -248,6 +250,8 @@ namespace FFXIVClassic_Map_Server
|
||||
cmd.Parameters.AddWithValue("@z", player.positionZ);
|
||||
cmd.Parameters.AddWithValue("@rot", player.rotation);
|
||||
cmd.Parameters.AddWithValue("@zoneId", player.zoneId);
|
||||
cmd.Parameters.AddWithValue("@privateArea", player.privateArea);
|
||||
cmd.Parameters.AddWithValue("@privateAreaType", player.privateAreaType);
|
||||
cmd.Parameters.AddWithValue("@destZone", player.destinationZone);
|
||||
cmd.Parameters.AddWithValue("@destSpawn", player.destinationSpawnType);
|
||||
|
||||
@ -327,7 +331,7 @@ namespace FFXIVClassic_Map_Server
|
||||
VALUES
|
||||
(@charaId, @slot, @questId, @questData, @questFlags)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
questData = @questData, questFlags = @questFlags
|
||||
questId = @questId, questData = @questData, questFlags = @questFlags
|
||||
";
|
||||
|
||||
cmd = new MySqlCommand(query, conn);
|
||||
@ -385,7 +389,9 @@ namespace FFXIVClassic_Map_Server
|
||||
achievementPoints,
|
||||
playTime,
|
||||
destinationZoneId,
|
||||
destinationSpawnType
|
||||
destinationSpawnType,
|
||||
currentPrivateArea,
|
||||
currentPrivateAreaType
|
||||
FROM characters WHERE id = @charId";
|
||||
|
||||
cmd = new MySqlCommand(query, conn);
|
||||
@ -419,10 +425,17 @@ namespace FFXIVClassic_Map_Server
|
||||
player.destinationZone = reader.GetUInt32("destinationZoneId");
|
||||
player.destinationSpawnType = reader.GetByte("destinationSpawnType");
|
||||
|
||||
if (!reader.IsDBNull(reader.GetOrdinal("currentPrivateArea")))
|
||||
player.privateArea = reader.GetString("currentPrivateArea");
|
||||
player.privateAreaType = reader.GetUInt32("currentPrivateAreaType");
|
||||
|
||||
if (player.destinationZone != 0)
|
||||
player.zoneId = player.destinationZone;
|
||||
|
||||
player.zone = Server.GetWorldManager().GetZone(player.zoneId);
|
||||
if (player.privateArea != null && !player.privateArea.Equals(""))
|
||||
player.zone = Server.GetWorldManager().GetPrivateArea(player.zoneId, player.privateArea, player.privateAreaType);
|
||||
else
|
||||
player.zone = Server.GetWorldManager().GetZone(player.zoneId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@
|
||||
<Compile Include="packets\receive\supportdesk\GMSupportTicketPacket.cs" />
|
||||
<Compile Include="packets\receive\supportdesk\GMTicketIssuesRequestPacket.cs" />
|
||||
<Compile Include="packets\receive\_0x02ReceivePacket.cs" />
|
||||
<Compile Include="packets\receive\_0x07Packet.cs" />
|
||||
<Compile Include="packets\receive\ZoneInCompletePacket.cs" />
|
||||
<Compile Include="packets\send\actor\ActorDoEmotePacket.cs" />
|
||||
<Compile Include="packets\send\actor\ActorInstantiatePacket.cs" />
|
||||
<Compile Include="packets\send\actor\ActorSpecialGraphicPacket.cs" />
|
||||
|
@ -126,8 +126,9 @@ namespace FFXIVClassic_Map_Server
|
||||
break;
|
||||
//Unknown - Happens a lot at login, then once every time player zones
|
||||
case 0x0007:
|
||||
//subpacket.DebugPrintSubPacket();
|
||||
_0x07Packet unknown07 = new _0x07Packet(subpacket.data);
|
||||
subpacket.DebugPrintSubPacket();
|
||||
ZoneInCompletePacket zoneInCompletePacket = new ZoneInCompletePacket(subpacket.data);
|
||||
LuaEngine.OnZoneInDone(session.GetActor());
|
||||
break;
|
||||
//Update Position
|
||||
case 0x00CA:
|
||||
@ -181,7 +182,7 @@ namespace FFXIVClassic_Map_Server
|
||||
if (ownerActor == null)
|
||||
{
|
||||
//Is it a instance actor?
|
||||
ownerActor = Server.GetWorldManager().GetActorInWorld(session.GetActor().currentEventOwner);
|
||||
ownerActor = session.GetActor().zone.FindActorInZone(session.GetActor().currentEventOwner);
|
||||
if (ownerActor == null)
|
||||
{
|
||||
//Is it a Director?
|
||||
@ -202,6 +203,7 @@ namespace FFXIVClassic_Map_Server
|
||||
break;
|
||||
//Unknown, happens at npc spawn and cutscene play????
|
||||
case 0x00CE:
|
||||
subpacket.DebugPrintSubPacket();
|
||||
break;
|
||||
//Event Result
|
||||
case 0x012E:
|
||||
|
@ -111,6 +111,7 @@ namespace FFXIVClassic_Map_Server
|
||||
id,
|
||||
parentZoneId,
|
||||
privateAreaName,
|
||||
privateAreaType,
|
||||
className,
|
||||
dayMusic,
|
||||
nightMusic,
|
||||
@ -129,7 +130,7 @@ namespace FFXIVClassic_Map_Server
|
||||
if (zoneList.ContainsKey(parentZoneId))
|
||||
{
|
||||
Zone parent = zoneList[parentZoneId];
|
||||
PrivateArea privArea = new PrivateArea(parent, reader.GetUInt32("id"), reader.GetString("className"), reader.GetString("privateAreaName"), 1, reader.GetUInt16("dayMusic"), reader.GetUInt16("nightMusic"), reader.GetUInt16("battleMusic"));
|
||||
PrivateArea privArea = new PrivateArea(parent, reader.GetUInt32("id"), reader.GetString("className"), reader.GetString("privateAreaName"), reader.GetUInt32("privateAreaType"), reader.GetUInt16("dayMusic"), reader.GetUInt16("nightMusic"), reader.GetUInt16("battleMusic"));
|
||||
parent.AddPrivateArea(privArea);
|
||||
}
|
||||
else
|
||||
@ -184,7 +185,7 @@ namespace FFXIVClassic_Map_Server
|
||||
if (!reader.IsDBNull(7))
|
||||
privArea = reader.GetString(7);
|
||||
|
||||
ZoneEntrance entance = new ZoneEntrance(reader.GetUInt32(1), privArea, reader.GetByte(2), reader.GetFloat(3), reader.GetFloat(4), reader.GetFloat(5), reader.GetFloat(6));
|
||||
ZoneEntrance entance = new ZoneEntrance(reader.GetUInt32(1), privArea, 1, reader.GetByte(2), reader.GetFloat(3), reader.GetFloat(4), reader.GetFloat(5), reader.GetFloat(6));
|
||||
zoneEntranceList[id] = entance;
|
||||
count++;
|
||||
}
|
||||
@ -548,19 +549,19 @@ namespace FFXIVClassic_Map_Server
|
||||
}
|
||||
|
||||
ZoneEntrance ze = zoneEntranceList[zoneEntrance];
|
||||
DoZoneChange(player, ze.zoneId, ze.privateAreaName, ze.spawnType, ze.spawnX, ze.spawnY, ze.spawnZ, ze.spawnRotation);
|
||||
DoZoneChange(player, ze.zoneId, ze.privateAreaName, ze.privateAreaType, ze.spawnType, ze.spawnX, ze.spawnY, ze.spawnZ, ze.spawnRotation);
|
||||
}
|
||||
|
||||
//Moves actor to new zone, and sends packets to spawn at the given coords.
|
||||
public void DoZoneChange(Player player, uint destinationZoneId, string destinationPrivateArea, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
||||
public void DoZoneChange(Player player, uint destinationZoneId, string destinationPrivateArea, int destinationPrivateAreaType, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
||||
{
|
||||
//Add player to new zone and update
|
||||
Area newArea;
|
||||
|
||||
if (destinationPrivateArea == null)
|
||||
newArea = GetZone(destinationZoneId);
|
||||
else
|
||||
newArea = GetZone(destinationZoneId).GetPrivateArea(destinationPrivateArea, 0);
|
||||
else //Add check for -1 if it is a instance
|
||||
newArea = GetZone(destinationZoneId).GetPrivateArea(destinationPrivateArea, (uint)destinationPrivateAreaType);
|
||||
|
||||
//This server does not contain that zoneId
|
||||
if (newArea == null)
|
||||
@ -581,6 +582,9 @@ namespace FFXIVClassic_Map_Server
|
||||
|
||||
//Update player actor's properties
|
||||
player.zoneId = newArea.actorId;
|
||||
|
||||
player.privateArea = newArea is PrivateArea ? ((PrivateArea)newArea).GetPrivateAreaName() : null;
|
||||
player.privateAreaType = newArea is PrivateArea ? ((PrivateArea)newArea).GetPrivateAreaType() : 0;
|
||||
player.zone = newArea;
|
||||
player.positionX = spawnX;
|
||||
player.positionY = spawnY;
|
||||
@ -589,11 +593,15 @@ namespace FFXIVClassic_Map_Server
|
||||
|
||||
//Send packets
|
||||
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId), true, false);
|
||||
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x0), true, false);
|
||||
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x10), true, false);
|
||||
player.SendZoneInPackets(this, spawnType);
|
||||
player.playerSession.ClearInstance();
|
||||
player.SendInstanceUpdate();
|
||||
|
||||
//Send "You have entered an instance" if it's a Private Area
|
||||
if (newArea is PrivateArea)
|
||||
player.SendGameMessage(GetActor(), 34108, 0x20);
|
||||
|
||||
LuaEngine.OnZoneIn(player);
|
||||
}
|
||||
|
||||
@ -630,7 +638,7 @@ namespace FFXIVClassic_Map_Server
|
||||
player.rotation = spawnRotation;
|
||||
|
||||
//Send packets
|
||||
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x0), true, false);
|
||||
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x10), true, false);
|
||||
player.playerSession.QueuePacket(player.CreateSpawnTeleportPacket(player.actorId, spawnType), true, false);
|
||||
player.SendInstanceUpdate();
|
||||
|
||||
@ -845,6 +853,17 @@ namespace FFXIVClassic_Map_Server
|
||||
return null;
|
||||
}
|
||||
|
||||
public Actor GetActorInWorldByUniqueId(string uid)
|
||||
{
|
||||
foreach (Zone zone in zoneList.Values)
|
||||
{
|
||||
Actor a = zone.FindActorInZoneByUniqueID(uid);
|
||||
if (a != null)
|
||||
return a;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Player GetPCInWorld(uint charId)
|
||||
{
|
||||
foreach (Zone zone in zoneList.Values)
|
||||
@ -863,6 +882,14 @@ namespace FFXIVClassic_Map_Server
|
||||
return zoneList[zoneId];
|
||||
}
|
||||
|
||||
public PrivateArea GetPrivateArea(uint zoneId, string privateArea, uint privateAreaType)
|
||||
{
|
||||
if (!zoneList.ContainsKey(zoneId))
|
||||
return null;
|
||||
|
||||
return zoneList[zoneId].GetPrivateArea(privateArea, privateAreaType);
|
||||
}
|
||||
|
||||
public WorldMaster GetActor()
|
||||
{
|
||||
return worldMaster;
|
||||
@ -877,16 +904,18 @@ namespace FFXIVClassic_Map_Server
|
||||
{
|
||||
public uint zoneId;
|
||||
public string privateAreaName;
|
||||
public int privateAreaType;
|
||||
public byte spawnType;
|
||||
public float spawnX;
|
||||
public float spawnY;
|
||||
public float spawnZ;
|
||||
public float spawnRotation;
|
||||
|
||||
public ZoneEntrance(uint zoneId, string privateAreaName, byte spawnType, float x, float y, float z, float rot)
|
||||
public ZoneEntrance(uint zoneId, string privateAreaName, int privateAreaType, byte spawnType, float x, float y, float z, float rot)
|
||||
{
|
||||
this.zoneId = zoneId;
|
||||
this.privateAreaName = privateAreaName;
|
||||
this.privateAreaType = privateAreaType;
|
||||
this.spawnType = spawnType;
|
||||
this.spawnX = x;
|
||||
this.spawnY = y;
|
||||
|
@ -28,6 +28,8 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
public float[] moveSpeeds = new float[4];
|
||||
|
||||
public uint zoneId, zoneId2;
|
||||
public string privateArea;
|
||||
public uint privateAreaType;
|
||||
public Area zone = null;
|
||||
public Area zone2 = null;
|
||||
public bool isZoning = false;
|
||||
@ -351,7 +353,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
uint zoneId = zone.actorId;
|
||||
uint privLevel = 0;
|
||||
if (zone is PrivateArea)
|
||||
privLevel = ((PrivateArea)zone).GetPrivateAreaLevel();
|
||||
privLevel = ((PrivateArea)zone).GetPrivateAreaType();
|
||||
|
||||
actorName = String.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel);
|
||||
}
|
||||
|
@ -300,6 +300,19 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
return mActorList[id];
|
||||
}
|
||||
|
||||
public Actor FindActorInZoneByUniqueID(string uniqueId)
|
||||
{
|
||||
foreach (Actor a in mActorList.Values)
|
||||
{
|
||||
if (a is Npc)
|
||||
{
|
||||
if (((Npc)a).GetUniqueId().ToLower().Equals(uniqueId))
|
||||
return a;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Player FindPCInZone(string name)
|
||||
{
|
||||
foreach (Actor a in mActorList.Values)
|
||||
@ -360,7 +373,16 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
if (actorClass == null)
|
||||
return;
|
||||
|
||||
Npc npc = new Npc(mActorList.Count + 1, actorClass, location.uniqueId, actorId, location.x, location.y, location.z, location.rot, location.state, location.animId, null);
|
||||
uint zoneId;
|
||||
|
||||
if (this is PrivateArea)
|
||||
zoneId = ((PrivateArea)this).GetParentZone().actorId;
|
||||
else
|
||||
zoneId = actorId;
|
||||
|
||||
Npc npc = new Npc(mActorList.Count + 1, actorClass, location.uniqueId, this, location.x, location.y, location.z, location.rot, location.state, location.animId, null);
|
||||
|
||||
|
||||
npc.LoadEventConditions(actorClass.eventConditions);
|
||||
|
||||
AddActorToZone(npc);
|
||||
|
@ -15,14 +15,14 @@ namespace FFXIVClassic_Map_Server.actors.area
|
||||
{
|
||||
private Zone parentZone;
|
||||
private string privateAreaName;
|
||||
private uint privateAreaLevel;
|
||||
private uint privateAreaType;
|
||||
|
||||
public PrivateArea(Zone parent, uint id, string className, string privateAreaName, uint privateAreaLevel, ushort bgmDay, ushort bgmNight, ushort bgmBattle)
|
||||
public PrivateArea(Zone parent, uint id, string className, string privateAreaName, uint privateAreaType, ushort bgmDay, ushort bgmNight, ushort bgmBattle)
|
||||
: base(id, parent.zoneName, parent.regionId, className, bgmDay, bgmNight, bgmBattle, parent.isIsolated, parent.isInn, parent.canRideChocobo, parent.canStealth, true)
|
||||
{
|
||||
this.parentZone = parent;
|
||||
this.privateAreaName = privateAreaName;
|
||||
this.privateAreaLevel = privateAreaLevel;
|
||||
this.privateAreaType = privateAreaType;
|
||||
}
|
||||
|
||||
public string GetPrivateAreaName()
|
||||
@ -30,9 +30,9 @@ namespace FFXIVClassic_Map_Server.actors.area
|
||||
return privateAreaName;
|
||||
}
|
||||
|
||||
public uint GetPrivateAreaLevel()
|
||||
public uint GetPrivateAreaType()
|
||||
{
|
||||
return privateAreaLevel;
|
||||
return privateAreaType;
|
||||
}
|
||||
|
||||
public Zone GetParentZone()
|
||||
@ -46,12 +46,11 @@ namespace FFXIVClassic_Map_Server.actors.area
|
||||
|
||||
string path = className;
|
||||
|
||||
if (className.ToLower().Contains("content"))
|
||||
path = "Content/" + className;
|
||||
string realClassName = className.Substring(className.LastIndexOf("/") + 1);
|
||||
|
||||
lParams = LuaUtils.CreateLuaParamList("/Area/PrivateArea/" + path, false, true, zoneName, privateAreaName, 0x9E, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false);
|
||||
ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams).DebugPrintSubPacket();
|
||||
return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
lParams = LuaUtils.CreateLuaParamList("/Area/PrivateArea" + path, false, true, zoneName, privateAreaName, privateAreaType, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false);
|
||||
ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, realClassName, lParams).DebugPrintSubPacket();
|
||||
return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, realClassName, lParams);
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@ namespace FFXIVClassic_Map_Server.actors.area
|
||||
class Zone : Area
|
||||
{
|
||||
Dictionary<string, Dictionary<uint, PrivateArea>> privateAreas = new Dictionary<string, Dictionary<uint, PrivateArea>>();
|
||||
Dictionary<string, List<PrivateArea>> instancedPrivateAreas = new Dictionary<string, List<PrivateArea>>();
|
||||
|
||||
public Zone(uint id, string zoneName, ushort regionId, string className, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid)
|
||||
: base(id, zoneName, regionId, className, bgmDay, bgmNight, bgmBattle, isIsolated, isInn, canRideChocobo, canStealth, isInstanceRaid)
|
||||
@ -26,11 +27,11 @@ namespace FFXIVClassic_Map_Server.actors.area
|
||||
public void AddPrivateArea(PrivateArea pa)
|
||||
{
|
||||
if (privateAreas.ContainsKey(pa.GetPrivateAreaName()))
|
||||
privateAreas[pa.GetPrivateAreaName()][0] = pa;
|
||||
privateAreas[pa.GetPrivateAreaName()][pa.GetPrivateAreaType()] = pa;
|
||||
else
|
||||
{
|
||||
privateAreas[pa.GetPrivateAreaName()] = new Dictionary<uint, PrivateArea>();
|
||||
privateAreas[pa.GetPrivateAreaName()][0] = pa;
|
||||
privateAreas[pa.GetPrivateAreaName()][pa.GetPrivateAreaType()] = pa;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
using FFXIVClassic.Common;
|
||||
using FFXIVClassic_Map_Server.actors;
|
||||
using FFXIVClassic_Map_Server.actors.area;
|
||||
using FFXIVClassic_Map_Server.actors.chara.npc;
|
||||
using FFXIVClassic_Map_Server.Actors.Chara;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
|
||||
using FFXIVClassic_Map_Server.packets.receive.events;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using FFXIVClassic_Map_Server.utils;
|
||||
@ -27,8 +27,8 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
|
||||
public NpcWork npcWork = new NpcWork();
|
||||
|
||||
public Npc(int actorNumber, ActorClass actorClass, string uniqueId, uint zoneId, float posX, float posY, float posZ, float rot, ushort actorState, uint animationId, string customDisplayName)
|
||||
: base((4 << 28 | zoneId << 19 | (uint)actorNumber))
|
||||
public Npc(int actorNumber, ActorClass actorClass, string uniqueId, Area spawnedArea, float posX, float posY, float posZ, float rot, ushort actorState, uint animationId, string customDisplayName)
|
||||
: base((4 << 28 | spawnedArea.actorId << 19 | (uint)actorNumber))
|
||||
{
|
||||
this.positionX = posX;
|
||||
this.positionY = posY;
|
||||
@ -41,8 +41,8 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
|
||||
this.uniqueIdentifier = uniqueId;
|
||||
|
||||
this.zoneId = zoneId;
|
||||
this.zone = Server.GetWorldManager().GetZone(zoneId);
|
||||
this.zoneId = spawnedArea.actorId;
|
||||
this.zone = spawnedArea;
|
||||
|
||||
this.actorClassId = actorClass.actorClassId;
|
||||
|
||||
@ -132,7 +132,11 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
subpackets.Add(CreateSpeedPacket(playerActorId));
|
||||
subpackets.Add(CreateSpawnPositonPacket(playerActorId, 0x0));
|
||||
|
||||
if (uniqueIdentifier.Equals("door2"))
|
||||
if (uniqueIdentifier.Equals("door1"))
|
||||
{
|
||||
subpackets.Add(_0xD8Packet.BuildPacket(actorId, playerActorId, 0xB0D, 0x1af));
|
||||
}
|
||||
else if (uniqueIdentifier.Equals("door2"))
|
||||
{
|
||||
subpackets.Add(_0xD8Packet.BuildPacket(actorId, playerActorId, 0xB09, 0x1af));
|
||||
}
|
||||
@ -167,16 +171,16 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
}
|
||||
else if (actorClassId == 5900013)
|
||||
{
|
||||
uint id = 2;
|
||||
uint id2 = 5144;
|
||||
string val = "fdot";
|
||||
uint id = 201;
|
||||
uint id2 = 0x1415;
|
||||
string val = "fdin";
|
||||
subpackets.Add(_0xD8Packet.BuildPacket(actorId, playerActorId, id, id2));
|
||||
subpackets.Add(_0xD9Packet.BuildPacket(actorId, playerActorId, val));
|
||||
}
|
||||
else if (actorClassId == 5900014)
|
||||
{
|
||||
uint id = 2;
|
||||
uint id2 = 5145;
|
||||
uint id = 201;
|
||||
uint id2 = 0x1415;
|
||||
string val = "fdot";
|
||||
subpackets.Add(_0xD8Packet.BuildPacket(actorId, playerActorId, id, id2));
|
||||
subpackets.Add(_0xD9Packet.BuildPacket(actorId, playerActorId, val));
|
||||
@ -374,8 +378,17 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
|
||||
if (File.Exists("./scripts/base/" + classPath + ".lua"))
|
||||
parent = LuaEngine.LoadScript("./scripts/base/" + classPath + ".lua");
|
||||
if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier));
|
||||
|
||||
if (zone is PrivateArea)
|
||||
{
|
||||
if (File.Exists(String.Format("./scripts/unique/{0}/privatearea/{1}/{2}/{3}.lua", zone.zoneName, ((PrivateArea)zone).GetPrivateAreaName(), className, uniqueIdentifier)))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/privatearea/{1}/{2}/{3}.lua", zone.zoneName, ((PrivateArea)zone).GetPrivateAreaName(), className, uniqueIdentifier));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier));
|
||||
}
|
||||
|
||||
if (parent == null && child == null)
|
||||
{
|
||||
@ -402,8 +415,16 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
|
||||
if (File.Exists("./scripts/base/" + classPath + ".lua"))
|
||||
parent = LuaEngine.LoadScript("./scripts/base/" + classPath + ".lua");
|
||||
if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier));
|
||||
if (zone is PrivateArea)
|
||||
{
|
||||
if (File.Exists(String.Format("./scripts/unique/{0}/privatearea/{1}/{2}/{3}.lua", zone.zoneName, ((PrivateArea)zone).GetPrivateAreaName(), className, uniqueIdentifier)))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/privatearea/{1}/{2}/{3}.lua", zone.zoneName, ((PrivateArea)zone).GetPrivateAreaName(), className, uniqueIdentifier));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier));
|
||||
}
|
||||
|
||||
if (parent == null && child == null)
|
||||
{
|
||||
|
@ -249,6 +249,17 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
return packets;
|
||||
}
|
||||
|
||||
/*
|
||||
* PLAYER ARGS:
|
||||
* Unknown - Bool
|
||||
* Unknown - Bool
|
||||
* Is Init Director - Bool
|
||||
* Unknown - Bool
|
||||
* Unknown - Number
|
||||
* Unknown - Bool
|
||||
* Timer Array - 20 Number
|
||||
*/
|
||||
|
||||
public override SubPacket CreateScriptBindPacket(uint playerActorId)
|
||||
{
|
||||
List<LuaParam> lParams;
|
||||
@ -257,10 +268,13 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
if (loginInitDirector != null)
|
||||
lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, true, loginInitDirector, true, 0, false, timers, true);
|
||||
else
|
||||
lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, false, true, 0, false, timers, true);
|
||||
lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", true, false, false, true, 0, false, timers, true);
|
||||
}
|
||||
else
|
||||
lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, false, false, false, true);
|
||||
|
||||
ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams).DebugPrintSubPacket();
|
||||
|
||||
return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
@ -527,6 +541,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
playerSession.QueuePacket(weatherDirectorSpawn);
|
||||
}
|
||||
|
||||
|
||||
foreach (Director director in ownedDirectors)
|
||||
{
|
||||
director.GetSpawnPackets(actorId).DebugPrintPacket();
|
||||
@ -1033,6 +1048,43 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
playerWork.questScenario[freeSlot] = id;
|
||||
questScenario[freeSlot] = new Quest(this, playerWork.questScenario[freeSlot], name, null, 0);
|
||||
Database.SaveQuest(this, questScenario[freeSlot]);
|
||||
SendQuestClientUpdate(freeSlot);
|
||||
}
|
||||
|
||||
public void RemoveQuest(uint id)
|
||||
{
|
||||
if (HasQuest(id))
|
||||
{
|
||||
for (int i = 0; i < questScenario.Length; i++)
|
||||
{
|
||||
if (questScenario[i] != null && questScenario[i].actorId == id)
|
||||
{
|
||||
questScenario[i] = null;
|
||||
Database.SaveQuest(this, questScenario[i]);
|
||||
SendQuestClientUpdate(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ReplaceQuest(uint oldId, uint newId)
|
||||
{
|
||||
if (HasQuest(oldId))
|
||||
{
|
||||
for (int i = 0; i < questScenario.Length; i++)
|
||||
{
|
||||
if (questScenario[i] != null && questScenario[i].GetQuestId() == oldId)
|
||||
{
|
||||
Actor actor = Server.GetStaticActors((0xA0F00000 | newId));
|
||||
playerWork.questScenario[i] = (0xA0F00000 | newId);
|
||||
questScenario[i] = new Quest(this, playerWork.questScenario[i], actor.actorName, null, 0);
|
||||
Database.SaveQuest(this, questScenario[i]);
|
||||
SendQuestClientUpdate(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Quest GetQuest(uint id)
|
||||
@ -1090,6 +1142,13 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
return -1;
|
||||
}
|
||||
|
||||
private void SendQuestClientUpdate(int slot)
|
||||
{
|
||||
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("playerWork/journal", this, actorId);
|
||||
propPacketUtil.AddProperty(String.Format("playerWork.questScenario[{0}]", slot));
|
||||
QueuePackets(propPacketUtil.Done());
|
||||
}
|
||||
|
||||
public void SetLoginDirector(Director director)
|
||||
{
|
||||
if (ownedDirectors.Contains(director))
|
||||
@ -1102,11 +1161,6 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
ownedDirectors.Add(director);
|
||||
director.AddChild(this);
|
||||
|
||||
//director.GetSpawnPackets(actorId).DebugPrintPacket();
|
||||
|
||||
//QueuePacket(director.GetSpawnPackets(actorId));
|
||||
//QueuePacket(director.GetInitPackets(actorId));
|
||||
//QueuePacket(director.GetSetEventStatusPackets(actorId));
|
||||
}
|
||||
}
|
||||
@ -1124,7 +1178,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
foreach (Director d in ownedDirectors)
|
||||
{
|
||||
if (d.className.Equals(directorName))
|
||||
if (d.GetScriptPath().Equals(directorName))
|
||||
return d;
|
||||
}
|
||||
|
||||
|
@ -68,14 +68,42 @@ namespace FFXIVClassic_Map_Server.actors.director
|
||||
return BasePacket.CreatePacket(initProperties.BuildPacket(playerActorId, actorId), true, false);
|
||||
}
|
||||
|
||||
public void OnTalked(Player player, Npc npc)
|
||||
public void OnTalkEvent(Player player, Npc npc)
|
||||
{
|
||||
LuaEngine.DoDirectorOnTalked(this, player, npc);
|
||||
if (File.Exists("./scripts/directors/" + directorScriptPath + ".lua"))
|
||||
{
|
||||
LuaScript script = LuaEngine.LoadScript("./scripts/directors/" + directorScriptPath + ".lua");
|
||||
|
||||
if (script == null)
|
||||
return;
|
||||
|
||||
//Run Script
|
||||
if (!script.Globals.Get("onTalkEvent").IsNil())
|
||||
script.Call(script.Globals["onTalkEvent"], player, npc);
|
||||
}
|
||||
else
|
||||
{
|
||||
LuaEngine.SendError(player, String.Format("ERROR: Could not find script for director {0}.", GetName()));
|
||||
}
|
||||
}
|
||||
|
||||
public void OnCommand(Player player, Command command)
|
||||
public void OnCommandEvent(Player player, Command command)
|
||||
{
|
||||
LuaEngine.DoDirectorOnCommand(this, player, command);
|
||||
if (File.Exists("./scripts/directors/" + directorScriptPath + ".lua"))
|
||||
{
|
||||
LuaScript script = LuaEngine.LoadScript("./scripts/directors/" + directorScriptPath + ".lua");
|
||||
|
||||
if (script == null)
|
||||
return;
|
||||
|
||||
//Run Script
|
||||
if (!script.Globals.Get("onCommandEvent").IsNil())
|
||||
script.Call(script.Globals["onCommandEvent"], player, command);
|
||||
}
|
||||
else
|
||||
{
|
||||
LuaEngine.SendError(player, String.Format("ERROR: Could not find script for director {0}.", GetName()));
|
||||
}
|
||||
}
|
||||
|
||||
public void AddChild(Actor actor)
|
||||
@ -186,10 +214,15 @@ namespace FFXIVClassic_Map_Server.actors.director
|
||||
uint zoneId = zone.actorId;
|
||||
uint privLevel = 0;
|
||||
if (zone is PrivateArea)
|
||||
privLevel = ((PrivateArea)zone).GetPrivateAreaLevel();
|
||||
privLevel = ((PrivateArea)zone).GetPrivateAreaType();
|
||||
|
||||
actorName = String.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel);
|
||||
}
|
||||
|
||||
public string GetScriptPath()
|
||||
{
|
||||
return directorScriptPath;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -41,6 +41,11 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
//Inform update
|
||||
}
|
||||
|
||||
public uint GetQuestId()
|
||||
{
|
||||
return actorId & 0xFFFFF;
|
||||
}
|
||||
|
||||
public object GetQuestData(string dataName)
|
||||
{
|
||||
if (questData.ContainsKey(dataName))
|
||||
@ -54,11 +59,6 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
questData.Clear();
|
||||
}
|
||||
|
||||
public uint GetQuestId()
|
||||
{
|
||||
return actorId;
|
||||
}
|
||||
|
||||
public void ClearQuestFlags()
|
||||
{
|
||||
questFlags = 0;
|
||||
@ -98,9 +98,11 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
return currentPhase;
|
||||
}
|
||||
|
||||
public void NextPhase()
|
||||
public void NextPhase(int phaseNumber)
|
||||
{
|
||||
currentPhase++;
|
||||
currentPhase = phaseNumber;
|
||||
owner.SendGameMessage(Server.GetWorldManager().GetActor(), 25116, 0x20, (object)GetQuestId());
|
||||
SaveData();
|
||||
}
|
||||
|
||||
public uint GetQuestFlags()
|
||||
|
@ -173,6 +173,23 @@ namespace FFXIVClassic_Map_Server.lua
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnZoneInDone(Player player)
|
||||
{
|
||||
string luaPath = String.Format(FILEPATH_ZONE, player.GetZone().zoneName);
|
||||
|
||||
if (File.Exists(luaPath))
|
||||
{
|
||||
LuaScript script = LoadScript(luaPath);
|
||||
|
||||
if (script == null)
|
||||
return;
|
||||
|
||||
//Run Script
|
||||
if (!script.Globals.Get("onZoneInDone").IsNil())
|
||||
script.Call(script.Globals["onZoneInDone"], player.GetZone(), player);
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnBeginLogin(Player player)
|
||||
{
|
||||
if (File.Exists(FILEPATH_PLAYER))
|
||||
@ -394,47 +411,5 @@ namespace FFXIVClassic_Map_Server.lua
|
||||
player.playerSession.QueuePacket(BasePacket.CreatePacket(SendError, true, false));
|
||||
}
|
||||
|
||||
|
||||
internal static void DoDirectorOnTalked(Director director, Player player, Npc npc)
|
||||
{
|
||||
string luaPath = String.Format(FILEPATH_DIRECTORS, director.GetName());
|
||||
|
||||
if (File.Exists(luaPath))
|
||||
{
|
||||
LuaScript script = LoadScript(luaPath);
|
||||
|
||||
if (script == null)
|
||||
return;
|
||||
|
||||
//Run Script
|
||||
if (!script.Globals.Get("onTalked").IsNil())
|
||||
script.Call(script.Globals["onTalked"], player, npc);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendError(player, String.Format("ERROR: Could not find script for director {0}.", director.GetName()));
|
||||
}
|
||||
}
|
||||
|
||||
internal static void DoDirectorOnCommand(Director director, Player player, Command command)
|
||||
{
|
||||
string luaPath = String.Format(FILEPATH_DIRECTORS, director.GetName());
|
||||
|
||||
if (File.Exists(luaPath))
|
||||
{
|
||||
LuaScript script = LoadScript(luaPath);
|
||||
|
||||
if (script == null)
|
||||
return;
|
||||
|
||||
//Run Script
|
||||
if (!script.Globals.Get("onCommand").IsNil())
|
||||
script.Call(script.Globals["onCommand"], player, command);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendError(player, String.Format("ERROR: Could not find script for director {0}.", director.GetName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,13 @@ using System.IO;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.receive
|
||||
{
|
||||
class _0x07Packet
|
||||
class ZoneInCompletePacket
|
||||
{
|
||||
public bool invalidPacket = false;
|
||||
public uint timestamp;
|
||||
public uint unknown;
|
||||
public int unknown;
|
||||
|
||||
public _0x07Packet(byte[] data)
|
||||
public ZoneInCompletePacket(byte[] data)
|
||||
{
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
@ -17,7 +17,7 @@ namespace FFXIVClassic_Map_Server.packets.receive
|
||||
{
|
||||
try{
|
||||
timestamp = binReader.ReadUInt32();
|
||||
unknown = binReader.ReadUInt32();
|
||||
unknown = binReader.ReadInt32();
|
||||
}
|
||||
catch (Exception){
|
||||
invalidPacket = true;
|
@ -24,7 +24,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events
|
||||
binWriter.Write((UInt32)playerActorId);
|
||||
binWriter.Write((UInt32)targetActorId);
|
||||
|
||||
int test = 0x75dc8705; //This will crash if set to 0 on pushCommand but not for mining which has to be 0????
|
||||
int test = 0x75dc1705; //This will crash if set to 0 on pushCommand but not for mining which has to be 0????
|
||||
|
||||
binWriter.Write((UInt32)test);
|
||||
binWriter.Write((UInt32)0x30400000);
|
||||
|
@ -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
|
@ -18,16 +18,23 @@ function onBeginLogin(player)
|
||||
|
||||
--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,7 +42,11 @@ 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;
|
||||
@ -44,7 +55,6 @@ function onBeginLogin(player)
|
||||
player:GetQuest(110009):ClearQuestFlags();
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
function onLogin(player)
|
||||
@ -55,6 +65,8 @@ function onLogin(player)
|
||||
|
||||
initClassItems(player);
|
||||
initRaceItems(player);
|
||||
|
||||
player:SavePlayTime();
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -7,7 +7,3 @@ 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;
|
@ -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);
|
||||
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
|
||||
@ -32,23 +43,3 @@ function onEventStarted(player, npc, triggerName)
|
||||
|
||||
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
|
||||
|
@ -21,8 +21,7 @@ function onEventStarted(player, npc, triggerName)
|
||||
npc:SetQuestGraphic(player, 0x0);
|
||||
man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2, true);
|
||||
man0l0Quest:SaveData();
|
||||
|
||||
player:GetDirector():OnTalked(npc);
|
||||
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
|
@ -3,6 +3,6 @@ require ("quests/man/man0u0")
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
man0u0Quest = GetStaticActor("Man0u0");
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "defaultTalkWithLady001_001", nil, nil, nil);
|
||||
callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_13", nil, nil, nil);
|
||||
player:EndEvent();
|
||||
end
|
@ -8,19 +8,32 @@ end
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
man0u0Quest = player:GetQuest("Man0u0");
|
||||
|
||||
if (man0u0Quest ~= nil) 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();
|
||||
|
||||
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);
|
||||
@ -28,6 +41,8 @@ function onEventStarted(player, npc, triggerName)
|
||||
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…
Reference in New Issue
Block a user