Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
Injector committed Oct 10, 2022
1 parent 9482736 commit 8c3cfb5
Show file tree
Hide file tree
Showing 64 changed files with 5,182 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<h1 align="center">
<img src="https://xlebfactory.ru/data/logo.png" />
<br/>
The Witcher: Enhanced Edition - Developer Console Activator
<br/>
</h1>

### Описание:

Это простенький трейнер, который инжектится в игру и задействует значение g_cAuroraSettings.m_nDebugMode, которое отвечает за отладку и использование консоли.
Помимо этого в приложение входит возможность активации свободной камеры и отключения GUI, для ваших скриншотов или изучения локации.

Протестировано на версии 1.4.5.1304 и Steam версии.

### Файлы:
- **commands_rus - список команд на русском**
- **commands_eng - список команд на английском**
- **untested_commands - список непроверенных команд, используйте осторожно. Могут крашнуть игру**

### Авторы:
- **Bloomstorm - приложение, команды**
- **SunBeam - нахождение адреса g_cAuroraSettings.m_nDebugMode, команды, составление айдишников монстров, нпс**
- **Icirian - составления айдишников предметов в игре**

### Ссылки на загрузку:
- **[Приложение](https://github.com/SB-MaterialAdmin/Web/releases/release_1.zip)**

<h1 align="center">
<img src="https://xlebfactory.ru/data/w1.jpg" />

Атака Гулей, заспавнены с dm_spawncreature
</h1>

<h1 align="center">
<img src="https://xlebfactory.ru/data/w2.jpg" />

Предместья, без деревьев
</h1>

<h1 align="center">
<img src="https://xlebfactory.ru/data/w3.jpg" />

Выбор уровней
</h1>
6 changes: 6 additions & 0 deletions WitcherDebug/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
155 changes: 155 additions & 0 deletions WitcherDebug/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

163 changes: 163 additions & 0 deletions WitcherDebug/Form1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Timers;
using System.IO;
using Timer = System.Timers.Timer;

namespace WitcherDebug
{
public partial class Form1 : Form
{
private Timer _findAppTimer;
private XmlConfig _config;
private bool _activated;
private string _findingProcess = "Поиск процесса игры...";

public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
title.BackColor = Color.Transparent;
title.ForeColor = Color.Gray;
Selo.SetStyleRefl(title, ControlStyles.SupportsTransparentBackColor, true);
activate.BackColor = Color.Transparent;
activate.ForeColor = Color.White;
Selo.SetStyleRefl(activate, ControlStyles.SupportsTransparentBackColor, true);
label2.BackColor = Color.Transparent;
label2.ForeColor = Color.White;
Selo.SetStyleRefl(label2, ControlStyles.SupportsTransparentBackColor, true);
label4.BackColor = Color.Transparent;
label4.ForeColor = Color.White;
Selo.SetStyleRefl(label4, ControlStyles.SupportsTransparentBackColor, true);
findProc.BackColor = Color.Transparent;
findProc.ForeColor = Color.White;
Selo.SetStyleRefl(findProc, ControlStyles.SupportsTransparentBackColor, true);
FormBorderStyle = FormBorderStyle.FixedSingle;
activateDisableGUI.BackColor = Color.Transparent;
activateDisableGUI.ForeColor = Color.White;
Selo.SetStyleRefl(activateDisableGUI, ControlStyles.SupportsTransparentBackColor, true);
activateFreeCamera.BackColor = Color.Transparent;
activateFreeCamera.ForeColor = Color.White;
Selo.SetStyleRefl(activateFreeCamera, ControlStyles.SupportsTransparentBackColor, true);

_config = new XmlConfig();
if (File.Exists("config.xml"))
_config = XmlParser.Parse<XmlConfig>(File.ReadAllText("config.xml"));

switch (_config.Language)
{
case "en":
title.Text = "The Witcher: Enhanced Edition Developer Console Activator";
activate.Text = "Activate";
activateFreeCamera.Text = "Free Camera";
activateDisableGUI.Text = "Disable GUI";
findProc.Text = _findingProcess = "Searching for the process...";
Text = "Developer Console Activator";
break;
case "ru":
break;
}

_findAppTimer = new Timer(_config.Interval);
_findAppTimer.Elapsed += OnAppTimerElapsed;
_findAppTimer.AutoReset = true;
_findAppTimer.Enabled = true;
findProc.Text = string.Empty;

WDCActivator.Load();
if (WDCActivator.PId == 0 || WDCActivator.Mem.mProc.Process == null)
{
ResetButtons();
findProc.Text = _findingProcess;
WDCActivator.IsLoaded = false;
}
}

private void OnAppTimerElapsed(object sender, ElapsedEventArgs e)
{
WDCActivator.Load();
if (WDCActivator.PId == 0 || WDCActivator.Mem.mProc.Process == null)
{
findProc.Text = _findingProcess;
ResetButtons();
_activated = false;
WDCActivator.IsLoaded = false;
}
else
{
findProc.Text = string.Empty;
EnableButtons();
if (_config.Auto && !_activated)
{
activate.Checked = true;
AutoActivate();
_activated = true;
}
}
}

private void activate_CheckedChanged(object sender, EventArgs e)
{
if (WDCActivator.PId == 0 || WDCActivator.Mem.mProc.Process == null)
{
ResetButtons();
findProc.Text = _findingProcess;
_activated = false;
WDCActivator.IsLoaded = false;
return;
}
WDCActivator.Activate(activate.Checked ? "1" : "0");
}

private async void AutoActivate()
{
await Task.Delay(3000);
WDCActivator.Activate("1");
}

private void activateFreeCamera_CheckedChanged(object sender, EventArgs e)
{
if (WDCActivator.PId == 0 || WDCActivator.Mem.mProc.Process == null)
{
ResetButtons();
findProc.Text = _findingProcess;
_activated = false;
WDCActivator.IsLoaded = false;
return;
}
WDCActivator.ActivateFreeCamera(activateFreeCamera.Checked ? "1" : "0");
}

private void disableGUI_CheckedChanged(object sender, EventArgs e)
{
if (WDCActivator.PId == 0 || WDCActivator.Mem.mProc.Process == null)
{
ResetButtons();
findProc.Text = _findingProcess;
_activated = false;
WDCActivator.IsLoaded = false;
return;
}
WDCActivator.DisableGUI(activateDisableGUI.Checked ? "1" : "0");
}

private void ResetButtons()
{
activate.Enabled = activate.Checked = false;
activateFreeCamera.Enabled = activateFreeCamera.Checked = false;
activateDisableGUI.Enabled = activateDisableGUI.Checked = false;
}

private void EnableButtons() => activate.Enabled = activateFreeCamera.Enabled = activateDisableGUI.Enabled = true;
}
}
Loading

0 comments on commit 8c3cfb5

Please sign in to comment.