#include <windows.h>
#include "IniReader.h"
#include "main.h"
#include "AntiHookProt.h"
#include "log.h"
// WC_UTIL
#include "WC_UTIL/WCGameState.h"
#include "WC_UTIL/TextOut.h"
#include "WC_UTIL/STORMFUNC.h"
#include "WC_UTIL/GAMEFUNC.h"
// HACKS
#include "HACKS/BasicMH.h"
#include "HACKS/GrayHP.h"
#include "HACKS/ManaBar.h"
#include "HACKS/SafeClick.h"
#include "HACKS/HPMPRegen.h"
#include "HACKS/SpeedInNumber.h"
#include "HACKS/UnitSpawnNotifer.h"
#include "HACKS/ItemSpawnNotifer.h"
#include "HACKS/LocalPlayer.h"
#include "HACKS/CustomCamera.h"
#include "HACKS/BountyView.h"
#include "HACKS/GameStartNotifer.h"
#include "HACKS/TrueColor.h"
// PROTECTS
#include "PROTECTS/CloakDLL.h"
#include "PROTECTS/CopyMemoryProtect.h"
DWORD dwGameBaseAddress;
HANDLE hThread;
bool bDllStatus = true, bHackStatus, bHoteyControl = true;
int nHotkey;
int nGameStartNotif;
bool bBasicMH, bManaBar, bGrayHP, bSafeClick, bRegenHPMP, bSpeedInNuber, bUnitNotifer, bItemNotifer, bCustomCamera,
bLocalPlayer, bBountyView, bTrueColor;
int nCloakDll, nCopyMemory, nAntiHook = 1;
void SetupHackSetting()
{
InitIniReader("\\sHack+.ini");
nHotkey = ReadInteger("Setting", "Hotkey", VK_END);
bHackStatus = ReadBoolean("Setting", "StatusOnStartUp", false);
nGameStartNotif = ReadInteger("Setting", "GameStartNotifer", 0);
bBasicMH = ReadBoolean("Hacks", "BasicMH", true);
bManaBar = ReadBoolean("Hacks", "ManaBar", false);
bGrayHP = ReadBoolean("Hacks", "GrayHP", true);
bSafeClick = ReadBoolean("Hacks", "SafeClick", true);
bRegenHPMP = ReadBoolean("Hacks", "RegenHPMP", false);
bSpeedInNuber = ReadBoolean("Hacks", "SpeedInNumber", false);
bUnitNotifer = ReadBoolean("Hacks", "UnitNotifer", false);
bItemNotifer = ReadBoolean("Hacks", "ItemNotifer", false);
bCustomCamera = ReadBoolean("Hacks", "CustomCamera", false);
bLocalPlayer = ReadBoolean("Hacks", "LocalPlayer", false);
bBountyView = ReadBoolean("Hacks", "BountyView", false);
bTrueColor = ReadBoolean("Hacks", "TrueColor", false);
nCloakDll = ReadInteger("Protects", "CloakDll", 0);
nCopyMemory = ReadInteger("Protects", "Protect#1", 0);
//nAntiHook = ReadInteger("Protects", "Protect#2", 0);
if ( bRegenHPMP ) nTypeRegenHPMP = ReadInteger("HacksExtraSettings", "TypeRegenHPMP", 0);
if ( nTypeRegenHPMP == 0 ) HPMPformat = ReadString("HacksExtraSettings", "RegenHPMPFormat0", "%u / %u |cFFF4FB00[%.02f]|r");
if ( nTypeRegenHPMP == 1 ) HPMPRegenFormat = ReadString("HacksExtraSettings", "RegenHPMPFormat1", "%s\n|cFFFFFF00HP/MP Regen:|r\n|cFFF4FB00%.02f|r/|cFF0C9FEF%.02f|r");
PCHAR szURCS = ReadString("HacksExtraSettings", "ExtraUnitRawCodes", 0);
if ( szURCS != 0 ) UnitExtraRawCodesInit(szURCS);
PCHAR szIRCS = ReadString("HacksExtraSettings", "ExtraItemRawCodes", 0);
if ( szIRCS != 0 ) ItemExtraRawCodesInit(szIRCS);
}
void __declspec(dllexport) SwitchHotkeyControl(bool b)
{
bHoteyControl = b;
}
void __declspec(dllexport) ToggleHack(DWORD dwAdr, bool b, bool shs, bool bProtect, bool log)
{
// Clear call (not dirty registers)
__asm PUSH ECX
__asm PUSH EDX
if ( dwAdr == NULL ) dwAdr = dwGameBaseAddress;
if ( shs ) bHackStatus = !bHackStatus;
if ( IS_IN_GAME && log )
{
if ( b ) GameChatEmptyTextOut(" [|CFFFFD700sHack+ v1.3|R] Hack has been turned |CFF00FF00ON|R", 3);
else GameChatEmptyTextOut(" [|CFFFFD700sHack+ v1.3|R] Hack has been turned |CFFFF0000OFF|R", 3);
}
DWORD dwOldProtectCODE;
if ( bProtect )
VirtualProtect((void*)(dwAdr + GAME_DLL_OFFSET_CODE), GAME_DLL_SIZE_CODE, PAGE_EXECUTE_READWRITE, &dwOldProtectCODE);
if ( bBasicMH ) BasicMHSwitch(dwAdr, b);
if ( bManaBar ) ManaBarSwitch(dwAdr, b);
if ( bGrayHP ) GrayHPSwitch(dwAdr, b);
if ( bSafeClick ) SafeClickSwitch(dwAdr, b);
if ( bRegenHPMP ) HPMPRegenSwitch(dwAdr, b);
if ( bSpeedInNuber ) SpeedInNumberSwitch(dwAdr, b);
if ( bUnitNotifer ) UnitSpawnNotiferSwitch(dwAd�
评论0