mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
More static actors loaded and can be accessed anywhere. Improved lua scripting to allow small talk.
This commit is contained in:
parent
300748668f
commit
789df97d48
16 changed files with 882 additions and 28 deletions
|
@ -1,8 +1,10 @@
|
|||
using FFXIVClassic_Lobby_Server;
|
||||
using FFXIVClassic_Lobby_Server.common;
|
||||
using FFXIVClassic_Map_Server.packets.send.player;
|
||||
using MySql.Data.MySqlClient;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
@ -358,5 +360,44 @@ namespace FFXIVClassic_Map_Server.utils
|
|||
|
||||
|
||||
}
|
||||
|
||||
public void getStaticActors()
|
||||
{
|
||||
using (MemoryStream s = new MemoryStream(File.ReadAllBytes("D:\\luadec\\script\\staticactorr9w.luab")))
|
||||
{
|
||||
using (BinaryReader binReader = new BinaryReader(s))
|
||||
{
|
||||
|
||||
using (StreamWriter w = File.AppendText("D:\\myfile.txt"))
|
||||
{
|
||||
|
||||
|
||||
while (binReader.BaseStream.Position != binReader.BaseStream.Length)
|
||||
{
|
||||
uint id = Utils.swapEndian(binReader.ReadUInt32()) | 0xA0F00000;
|
||||
|
||||
List<byte> list = new List<byte>();
|
||||
byte readByte;
|
||||
|
||||
while ((readByte = binReader.ReadByte()) != 0)
|
||||
{ //or whatever your condition is
|
||||
list.Add(readByte);
|
||||
}
|
||||
|
||||
string output = Encoding.UTF8.GetString(list.ToArray());
|
||||
|
||||
string output2 = String.Format("mStaticActors.Add(0x{0:x}, new {2}(0x{0:x}, \"{1}\"));", id, output.Substring(1 + output.LastIndexOf("/")), output.Split('/')[1]);
|
||||
|
||||
Console.WriteLine(output2);
|
||||
w.WriteLine(output2);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue