using XFEExtension.NetCore.MemoryEditor.Manager;
namespace SeaOfRadiationEditor;
internal static class Program
{
public static DynamicMemoryManager Manager { get; } = MemoryManager.CreateBuilder()
.WithAutoReacquireProcess("Sea_Of_Radiation_2")
.BuildDynamicManager(
MemoryItemBuilder.Create<int>("Reset")
.WithResolvePointer("UnityPlayer.dll", 0x01CBD6E8, 0xF28, 0x2A8, 0x30, 0x18, 0x28, 0x2D0)
.WithListener(10, true),
MemoryItemBuilder.Create<int>("Health")
.WithResolvePointer("UnityPlayer.dll", 0x01CBD6E8, 0x120, 0x68, 0xD0, 0x60, 0x20, 0x134)
.WithListener(10, true),
MemoryItemBuilder.Create<float>("TimeCounter")
.WithResolvePointer("UnityPlayer.dll", 0x01CBD6E8, 0xF28, 0x2A8, 0x30, 0x18, 0x28, 0x2C4)
.WithListener(10, true),
MemoryItemBuilder.Create<float>("Stamina")
.WithResolvePointer("UnityPlayer.dll", 0x01D33C98, 0x10, 0x18, 0x38, 0x70, 0x28, 0x248)
.WithListener(10, true),
MemoryItemBuilder.Create<int>("Gene")
.WithResolvePointer("gameoverlayrenderer64.dll", 0x0013DF44, 0x10, 0x20, 0x20, 0x1C0, 0x49C)
.WithListener(10, true));
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
var mainForm = new MainForm();
Manager.CurrentProcessEntered += Manager_CurrentProcessEntered;
Manager.CurrentProcessExit += Manager_CurrentProcessExit;
Task.Run(async () => await Manager.WaitProcessEnter());
try
{
Application.Run(mainForm);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private static void Manager_CurrentProcessExit(object? sender, EventArgs e) => SystemProfile.IsGameRunning = false;
private static void Manager_CurrentProcessEntered(object? sender, EventArgs e) => SystemProfile.IsGameRunning = true;
}
using XFEExtension.NetCore.MemoryEditor.Manager;
namespace SeaOfRadiationEditor;
internal static class Program
{
public static DynamicMemoryManager Manager { get; } = MemoryManager.CreateBuilder()
.WithAutoReacquireProcess("Sea_Of_Radiation_2")
.BuildDynamicManager(
MemoryItemBuilder.Create<int>("Reset")
.WithResolvePointer("UnityPlayer.dll", 0x01CBD6E8, 0xF28, 0x2A8, 0x30, 0x18, 0x28, 0x2D0)
.WithListener(10, true),
MemoryItemBuilder.Create<int>("Health")
.WithResolvePointer("UnityPlayer.dll", 0x01CBD6E8, 0x120, 0x68, 0xD0, 0x60, 0x20, 0x134)
.WithListener(10, true),
MemoryItemBuilder.Create<float>("TimeCounter")
.WithResolvePointer("UnityPlayer.dll", 0x01CBD6E8, 0xF28, 0x2A8, 0x30, 0x18, 0x28, 0x2C4)
.WithListener(10, true),
MemoryItemBuilder.Create<float>("Stamina")
.WithResolvePointer("UnityPlayer.dll", 0x01D33C98, 0x10, 0x18, 0x38, 0x70, 0x28, 0x248)
.WithListener(10, true),
MemoryItemBuilder.Create<int>("Gene")
.WithResolvePointer("gameoverlayrenderer64.dll", 0x0013DF44, 0x10, 0x20, 0x20, 0x1C0, 0x49C)
.WithListener(10, true));
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
var mainForm = new MainForm();
Manager.CurrentProcessEntered += Manager_CurrentProcessEntered;
Manager.CurrentProcessExit += Manager_CurrentProcessExit;
Task.Run(async () => await Manager.WaitProcessEnter());
try
{
Application.Run(mainForm);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private static void Manager_CurrentProcessExit(object? sender, EventArgs e) => SystemProfile.IsGameRunning = false;
private static void Manager_CurrentProcessEntered(object? sender, EventArgs e) => SystemProfile.IsGameRunning = true;
}