static void DumpBuffs(FFXIVLIB instance, Serializer s) { List<Buff> buffsList = new List<Buff>(); // This has to be modified by hand atm, // just change your buff a few times, look for where the description is then find out what references this part of memory. (First byte of name) IntPtr pointerToBuff = (IntPtr)0x12F6BEC8; IntPtr finalPTR = (IntPtr)BitConverter.ToInt32(instance.ReadMemory(pointerToBuff, 4), 0); for (short i = 0; i < 370; i++) { Entity player = instance.GetEntityById(0); player.Modify("Buffs", i); // Give time to client to update widget Thread.Sleep(50); byte[] buff = instance.ReadMemory(finalPTR, 400); buffsList.Add(new Buff(i, buff)); } s.Serialize("Buff.xml", buffsList, "Buff"); }
private static void Main(string[] args) { FFXIVLIB instance = new FFXIVLIB(); while (true) { Entity myself = instance.GetEntityById(0); if (myself.IsCasting) { Console.WriteLine("{0} is casting {1} {2}%", myself.Name, ResourceParser.GetActionName(myself.CastingSpellId), myself.CastingPercentage); } else Console.WriteLine("{0} is not casting", myself.Name); Thread.Sleep(300); } }