Project Adjustments

PROJECT SETTINGS
- Additional Options "/bigobj" for debug builds
- Output directory relocated to solution directory "/bin"
- include "ProjDir" as an additional include directory for debug builds

FEATURES
- adjust params for some functions to include default values
- relocate functions from Menu to Features for clarity
- included comments

ISSUES
- SpeedHack is causing a crash if toggled while loading from main menu
- Database Tab is causing a crash due to "Config.Update"
This commit is contained in:
NightFyre 2024-01-28 13:08:50 -05:00
parent c0a374c7a8
commit 9dc8140e59
13 changed files with 688 additions and 606 deletions

View File

@ -43,13 +43,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@ -79,9 +79,12 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\bin</OutDir>
<TargetName>$(ProjectName)_debug</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@ -131,6 +134,8 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpplatest</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<AdditionalOptions>/bigobj</AdditionalOptions>
<AdditionalIncludeDirectories>$(ProjectDir);</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

View File

@ -69,6 +69,15 @@ SDK::APalPlayerCharacter* config::GetPalPlayerCharacter()
return nullptr;
}
SDK::APalPlayerController* config::GetPalPlayerController()
{
SDK::APalPlayerCharacter* pPlayer = GetPalPlayerCharacter();
if (!pPlayer)
return nullptr;
return static_cast<SDK::APalPlayerController*>(pPlayer->GetPalPlayerController());
}
SDK::APalPlayerState* config::GetPalPlayerState()
{
SDK::APalPlayerCharacter* pPlayer = GetPalPlayerCharacter();
@ -194,6 +203,8 @@ void config::Init()
TickFunc = (Tick)(Config.ClientBase + Config.offset_Tick);
Config.gWorld = Config.GetUWorld();
MH_CreateHook(TickFunc, DetourTick, reinterpret_cast<void**>(&OldTickFunc));
//init database

View File

@ -65,6 +65,7 @@ public:
static SDK::UWorld* GetUWorld();
static SDK::UPalCharacterImportanceManager* GetCharacterImpManager();
static SDK::APalPlayerCharacter* GetPalPlayerCharacter();
static SDK::APalPlayerController* GetPalPlayerController();
static SDK::APalPlayerState* GetPalPlayerState();
static SDK::UPalPlayerInventoryData* GetInventoryComponent();
static SDK::APalWeaponBase* GetPlayerEquippedWeapon();

View File

@ -2,6 +2,7 @@
#include "feature.h"
using namespace SDK;
// should only be called from a GUI thread with ImGui context
void ESP()
{
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
@ -28,6 +29,8 @@ void ESP()
ImGui::GetBackgroundDrawList()->AddText(nullptr, 16, ImVec2(10, 10 + (i * 30)), ImColor(128,0,0), T[i]->GetFullName().c_str());
}
// draws debug information for the input actor array
// should only be called from a GUI thread with ImGui context
void ESP_DEBUG(float mDist, ImVec4 color, UClass* mEntType)
{
APalPlayerCharacter* pLocalPlayer = Config.GetPalPlayerCharacter();
@ -42,7 +45,7 @@ void ESP_DEBUG(float mDist, ImVec4 color, UClass* mEntType)
if (!config::GetAllActorsofType(mEntType, &actors, true))
return;
auto draw = ImGui::GetWindowDrawList();
auto draw = ImGui::GetBackgroundDrawList();
__int32 actorsCount = actors.size();
for (AActor* actor : actors)
@ -71,158 +74,57 @@ void ESP_DEBUG(float mDist, ImVec4 color, UClass* mEntType)
}
}
void DrawUActorComponent(SDK::TArray<SDK::UActorComponent*> Comps,ImColor color)
// should only be called from a GUI thread with ImGui context
void DrawUActorComponent(TArray<UActorComponent*> Comps,ImColor color)
{
ImGui::GetBackgroundDrawList()->AddText(nullptr, 16, ImVec2(ImGui::GetIO().DisplaySize.x / 2, ImGui::GetIO().DisplaySize.y / 2), color, "Drawing...");
if (Comps.IsValid())
{
if (!Comps.IsValid())
return;
for (int i = 0; i < Comps.Count(); i++)
{
if (Comps[i] != NULL)
{
if (!Comps[i])
continue;
ImGui::GetBackgroundDrawList()->AddText(nullptr, 16, ImVec2(10, 10 + (i * 30)), color, Comps[i]->GetFullName().c_str());
}
}
}
}
void UnlockAllEffigies() {
SDK::APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
if (!pPalCharacter)
// credit:
void UnlockAllEffigies()
{
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
APalPlayerState* pPalPlayerState = Config.GetPalPlayerState();
if (!pPalCharacter || !pPalPlayerState)
return;
SDK::UWorld* world = Config.GetUWorld();
UWorld* world = Config.GetUWorld();
if (!world)
return;
SDK::TUObjectArray* objects = world->GObjects;
TUObjectArray* objects = world->GObjects;
for (int i = 0; i < objects->NumElements; ++i) {
SDK::UObject* object = objects->GetByIndex(i);
for (int i = 0; i < objects->NumElements; ++i)
{
UObject* object = objects->GetByIndex(i);
if (!object) {
if (!object)
continue;
}
if (!object->IsA(SDK::APalLevelObjectRelic::StaticClass())) {
if (!object->IsA(APalLevelObjectRelic::StaticClass()))
continue;
}
SDK::APalLevelObjectObtainable* relic = (SDK::APalLevelObjectObtainable*)object;
APalLevelObjectObtainable* relic = (APalLevelObjectObtainable*)object;
if (!relic) {
continue;
}
((SDK::APalPlayerState*)pPalCharacter->PlayerState)->RequestObtainLevelObject_ToServer(relic);
pPalPlayerState->RequestObtainLevelObject_ToServer(relic);
}
}
void ResetStamina()
{
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
if (!pPalCharacter)
return;
UPalCharacterParameterComponent* pParams = pPalCharacter->CharacterParameterComponent;
if (!pParams)
return;
pParams->ResetSP();
}
void SetInfiniteAmmo(bool bInfAmmo)
{
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
if (!pPalCharacter)
return;
UPalShooterComponent* pShootComponent = pPalCharacter->ShooterComponent;
if (!pShootComponent)
return;
APalWeaponBase* pWeapon = pShootComponent->HasWeapon;
if (pWeapon)
pWeapon->IsRequiredBullet = bInfAmmo ? false : true;
}
void SetCraftingSpeed(float mNewSpeed, bool bRestoreDefault)
{
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
if (!pPalCharacter)
return;
UPalCharacterParameterComponent* pParams = pPalCharacter->CharacterParameterComponent;
if (!pParams)
return;
UPalIndividualCharacterParameter* ivParams = pParams->IndividualParameter;
if (!ivParams)
return;
FPalIndividualCharacterSaveParameter sParams = ivParams->SaveParameter;
TArray<FFloatContainer_FloatPair> mCraftSpeedArray = sParams.CraftSpeedRates.Values;
if (mCraftSpeedArray.Count() > 0)
mCraftSpeedArray[0].Value = bRestoreDefault ? 1.0f : mNewSpeed;
}
void AddTechPoints(__int32 mPoints)
{
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
if (!mPlayerState)
return;
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
if (!pTechData)
return;
pTechData->TechnologyPoint += mPoints;
}
void AddAncientTechPoints(__int32 mPoints)
{
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
if (!mPlayerState)
return;
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
if (!pTechData)
return;
pTechData->bossTechnologyPoint += mPoints;
}
void RemoveTechPoints(__int32 mPoints)
{
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
if (!mPlayerState)
return;
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
if (!pTechData)
return;
pTechData->TechnologyPoint -= mPoints;
}
void RemoveAncientTechPoint(__int32 mPoints)
{
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
if (!mPlayerState)
return;
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
if (!pTechData)
return;
pTechData->bossTechnologyPoint -= mPoints;
}
// Credit: BennettStaley
void AddToInventoryContainer(__int32 mCount, __int32 mIndex)
void IncrementInventoryItemCountByIndex(__int32 mCount, __int32 mIndex)
{
APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (!p_appc != NULL)
@ -258,3 +160,332 @@ void AddToInventoryContainer(__int32 mCount, __int32 mIndex)
__int32 mNewCount = StackCount += mCount;
InventoryData->RequestAddItem(FirstItemId.StaticId, mNewCount, true);
}
//
void AddItemToInventoryByName(UPalPlayerInventoryData* data, char* itemName, int count)
{
// obtain lib instance
static UKismetStringLibrary* lib = UKismetStringLibrary::GetDefaultObj();
// Convert FNAME
wchar_t ws[255];
swprintf(ws, 255, L"%hs", itemName);
FName Name = lib->Conv_StringToName(FString(ws));
// Call
data->RequestAddItem(Name, count, true);
}
// Credit: asashi
void SpawnMultiple_ItemsToInventory(config::QuickItemSet Set)
{
SDK::UPalPlayerInventoryData* InventoryData = Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->GetInventoryData();
switch (Set)
{
case 0:
for (int i = 0; i < IM_ARRAYSIZE(database::basic_items_stackable); i++)
AddItemToInventoryByName(InventoryData, _strdup(database::basic_items_stackable[i].c_str()), 100);
break;
case 1:
for (int i = 0; i < IM_ARRAYSIZE(database::basic_items_single); i++)
AddItemToInventoryByName(InventoryData, _strdup(database::basic_items_single[i].c_str()), 1);
break;
case 2:
for (int i = 0; i < IM_ARRAYSIZE(database::pal_unlock_skills); i++)
AddItemToInventoryByName(InventoryData, _strdup(database::pal_unlock_skills[i].c_str()), 1);
break;
case 3:
for (int i = 0; i < IM_ARRAYSIZE(database::spheres); i++)
AddItemToInventoryByName(InventoryData, _strdup(database::spheres[i].c_str()), 100);
break;
case 4:
for (int i = 0; i < IM_ARRAYSIZE(database::tools); i++)
AddItemToInventoryByName(InventoryData, _strdup(database::tools[i].c_str()), 1);
break;
default:
break;
}
}
//
void AnyWhereTP(FVector& vector, bool IsSafe)
{
APalPlayerState* pPalPlayerState = Config.GetPalPlayerState();
APalPlayerController* pPalPlayerController = Config.GetPalPlayerController();
if (!pPalPlayerController || !pPalPlayerState)
return;
vector = { vector.X,vector.Y + 100,vector.Z };
FGuid guid = pPalPlayerController->GetPlayerUId();
pPalPlayerController->Transmitter->Player->RegisterRespawnLocation_ToServer(guid, vector);
pPalPlayerState->RequestRespawn();
}
//
void ExploitFly(bool IsFly)
{
SDK::APalPlayerCharacter* pPalPlayerCharacter = Config.GetPalPlayerCharacter();
if (!pPalPlayerCharacter)
return;
APalPlayerController* pPalPlayerController = pPalPlayerCharacter->GetPalPlayerController();
if (!pPalPlayerController)
return;
IsFly ? pPalPlayerController->StartFlyToServer() : pPalPlayerController->EndFlyToServer();
}
//
void SpeedHack(float mSpeed)
{
UWorld* pWorld = Config.gWorld;
if (!pWorld)
return;
AWorldSettings* pWorldSettings = pWorld->K2_GetWorldSettings();
if (!pWorldSettings)
return;
pWorldSettings->TimeDilation = mSpeed;
}
//
void SetDemiGodMode(bool bIsSet)
{
auto pCharacter = Config.GetPalPlayerCharacter();
if (!pCharacter)
return;
auto pParams = pCharacter->CharacterParameterComponent;
if (!pParams)
return;
auto mIVs = pParams->IndividualParameter;
if (!mIVs)
return;
auto sParams = mIVs->SaveParameter;
pParams->bIsEnableMuteki = bIsSet; // Credit: Mokobake
if (!bIsSet)
return;
// attempt additional parameters
sParams.HP.Value = sParams.MaxHP.Value;
sParams.MP.Value = sParams.MaxMP.Value;
sParams.FullStomach = sParams.MaxFullStomach;
sParams.PhysicalHealth = EPalStatusPhysicalHealthType::Healthful;
sParams.SanityValue = 100.f;
sParams.HungerType = EPalStatusHungerType::Default;
}
//
void RespawnLocalPlayer(bool bIsSafe)
{
APalPlayerController* pPalPlayerController = Config.GetPalPlayerController();
APalPlayerState* pPalPlayerState = Config.GetPalPlayerState();
if (!pPalPlayerController || !pPalPlayerState)
return;
bIsSafe ? pPalPlayerController->TeleportToSafePoint_ToServer() : pPalPlayerState->RequestRespawn();
}
//
void ReviveLocalPlayer()
{
APalPlayerCharacter* pPalPlayerCharacter = Config.GetPalPlayerCharacter();
if (!pPalPlayerCharacter)
return;
FFixedPoint newHealthPoint = FFixedPoint(99999999);
pPalPlayerCharacter->ReviveCharacter_ToServer(newHealthPoint);
}
//
void ResetStamina()
{
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
if (!pPalCharacter)
return;
UPalCharacterParameterComponent* pParams = pPalCharacter->CharacterParameterComponent;
if (!pParams)
return;
pParams->ResetSP();
}
//
void GiveExperiencePoints(__int32 mXP)
{
auto pPalPlayerState = Config.GetPalPlayerState();
if (!pPalPlayerState)
return;
pPalPlayerState->GrantExpForParty(mXP);
}
//
void SetPlayerAttackParam(__int32 mNewAtk)
{
APalPlayerCharacter* pPalPlayerCharacter = Config.GetPalPlayerCharacter();
if (!pPalPlayerCharacter)
return;
UPalCharacterParameterComponent* pParams = pPalPlayerCharacter->CharacterParameterComponent;
if (!pParams)
return;
if (pParams->AttackUp != mNewAtk)
pParams->AttackUp = mNewAtk;
}
//
void SetPlayerDefenseParam(__int32 mNewDef)
{
APalPlayerCharacter* pPalPlayerCharacter = Config.GetPalPlayerCharacter();
if (!pPalPlayerCharacter)
return;
UPalCharacterParameterComponent* pParams = pPalPlayerCharacter->CharacterParameterComponent;
if (!pParams)
return;
if (pParams->DefenseUp != mNewDef)
pParams->DefenseUp = mNewDef;
}
//
void SetInfiniteAmmo(bool bInfAmmo)
{
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
if (!pPalCharacter)
return;
UPalShooterComponent* pShootComponent = pPalCharacter->ShooterComponent;
if (!pShootComponent)
return;
APalWeaponBase* pWeapon = pShootComponent->HasWeapon;
if (pWeapon)
pWeapon->IsRequiredBullet = bInfAmmo ? false : true;
}
//
void SetCraftingSpeed(float mNewSpeed, bool bRestoreDefault)
{
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
if (!pPalCharacter)
return;
UPalCharacterParameterComponent* pParams = pPalCharacter->CharacterParameterComponent;
if (!pParams)
return;
UPalIndividualCharacterParameter* ivParams = pParams->IndividualParameter;
if (!ivParams)
return;
FPalIndividualCharacterSaveParameter sParams = ivParams->SaveParameter;
TArray<FFloatContainer_FloatPair> mCraftSpeedArray = sParams.CraftSpeedRates.Values;
if (mCraftSpeedArray.Count() > 0)
mCraftSpeedArray[0].Value = bRestoreDefault ? 1.0f : mNewSpeed;
}
//
void AddTechPoints(__int32 mPoints)
{
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
if (!mPlayerState)
return;
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
if (!pTechData)
return;
pTechData->TechnologyPoint += mPoints;
}
//
void AddAncientTechPoints(__int32 mPoints)
{
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
if (!mPlayerState)
return;
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
if (!pTechData)
return;
pTechData->bossTechnologyPoint += mPoints;
}
//
void RemoveTechPoints(__int32 mPoints)
{
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
if (!mPlayerState)
return;
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
if (!pTechData)
return;
pTechData->TechnologyPoint -= mPoints;
}
//
void RemoveAncientTechPoint(__int32 mPoints)
{
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
if (!mPlayerState)
return;
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
if (!pTechData)
return;
pTechData->bossTechnologyPoint -= mPoints;
}
/// OLDER METHODS
//SDK::FPalDebugOtomoPalInfo palinfo = SDK::FPalDebugOtomoPalInfo();
//SDK::TArray<SDK::EPalWazaID> EA = { 0U };
//void SpawnPal(char* PalName, bool IsMonster, int rank=1, int lvl = 1, int count=1)
//{
// SDK::UKismetStringLibrary* lib = SDK::UKismetStringLibrary::GetDefaultObj();
//
// //Convert FNAME
// wchar_t ws[255];
// swprintf(ws, 255, L"%hs", PalName);
// SDK::FName Name = lib->Conv_StringToName(SDK::FString(ws));
// //Call
// if (Config.GetPalPlayerCharacter() != NULL)
// {
// if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
// {
// if (Config.GetPalPlayerCharacter()->GetPalPlayerController())
// {
// if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState())
// {
// if (IsMonster)
// {
// Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->RequestSpawnMonsterForPlayer(Name, count, lvl);
// return;
// }
// EA[0] = SDK::EPalWazaID::AirCanon;
// palinfo.Level = lvl;
// palinfo.Rank = rank;
// palinfo.PalName.Key = Name;
// palinfo.WazaList = EA;
// palinfo.PassiveSkill = NULL;
// Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->Debug_CaptureNewMonsterByDebugOtomoInfo_ToServer(palinfo);
// }
// }
// }
// }
//}

View File

@ -5,16 +5,38 @@
void ESP();
void ESP_DEBUG(float mDist, ImVec4 color, SDK::UClass* mEntType = SDK::AActor::StaticClass());
void ESP_DEBUG(float mDist, ImVec4 color = { 1.0f, 0.0f, 0.0f, 01.0f }, SDK::UClass* mEntType = SDK::AActor::StaticClass());
void DrawUActorComponent(SDK::TArray<SDK::UActorComponent*> Comps, ImColor color);
void UnlockAllEffigies();
void AddToInventoryContainer(__int32 mCount, __int32 mIndex = 0);
void IncrementInventoryItemCountByIndex(__int32 mCount, __int32 mIndex = 0);
void AddItemToInventoryByName(SDK::UPalPlayerInventoryData* data, char* itemName, int count);
void SpawnMultiple_ItemsToInventory(config::QuickItemSet Set);
void AnyWhereTP(SDK::FVector& vector, bool IsSafe);
void ExploitFly(bool IsFly);
void SpeedHack(float mSpeed);
void SetDemiGodMode(bool bIsSet);
void RespawnLocalPlayer(bool bIsSafe);
void ReviveLocalPlayer();
void ResetStamina();
void GiveExperiencePoints(__int32 mXP);
void SetPlayerAttackParam(__int32 mNewAtk);
void SetPlayerDefenseParam(__int32 mNewDef);
void SetInfiniteAmmo(bool bInfAmmo);
void SetCraftingSpeed(float mNewSpeed, bool bRestoreDefault = false);

View File

@ -2,27 +2,30 @@
#include "helper.h"
namespace DX11_Base {
struct Colors {
int dark_blue = 1;
int dark_green = 2;
int dark_teal = 3;
int dark_red = 4;
int dark_pink = 5;
int dark_yellow = 6;
int dark_white = 7;
int dark_gray = 8;
int blue = 9;
int green = 10;
int teal = 11;
int red = 12;
int pink = 13;
int yellow = 14;
int white = 15;
int DEFAULT = 15;
};
class Console
{
public:
enum Colors
{
dark_blue = 1,
dark_green,
dark_teal,
dark_red,
dark_pink,
dark_yellow,
dark_white,
dark_gray,
blue,
green,
teal,
red,
pink,
yellow ,
white,
DEFAULT = white,
};
public:
FILE* stream_in{};
FILE* stream_out{};

View File

@ -1,5 +1,5 @@
#pragma once
#define DEBUG 1
#define DEBUG 0
// External Libraries
#include "../libs/ImGui/imgui.h"
@ -7,7 +7,8 @@
#include "../libs/ImGui/imgui_Impl_dx11.h"
#include "../libs/ImGui/imgui_Impl_Win32.h"
namespace DX11_Base {
namespace DX11_Base
{
using namespace std::chrono_literals;
inline HMODULE g_hModule{};
inline LPCWSTR g_ModuleName{};

View File

@ -21,7 +21,7 @@ DWORD WINAPI MainThread_Initialize()
g_Console = std::make_unique<Console>();
#if DEBUG
g_Console->InitializeConsole("Debug Console");
g_Console->printdbg("ImGui Hook - Initializing . . .\n\n", g_Console->color.DEFAULT);
g_Console->printdbg("ImGui Hook - Initializing . . .\n\n", Console::Colors::DEFAULT);
#endif
/// ESTABLISH GAME DATA
g_GameData = std::make_unique<GameData>();
@ -34,7 +34,7 @@ DWORD WINAPI MainThread_Initialize()
g_Hooking->Hook();
#if DEBUG
g_Console->printdbg("Main::Initialized\n", g_Console->color.green);
g_Console->printdbg("Main::Initialized\nUWorld:\t0x%llX\n", Console::Colors::green, Config.gWorld);
#endif
std::thread WCMUpdate(ClientBGThread); // Initialize Loops Thread

View File

@ -26,7 +26,7 @@ namespace DX11_Base {
va_start(arg, Color);
vfprintf(stream_out, Text, arg);
va_end(arg);
SetConsoleTextAttribute(g_Handle, color.DEFAULT);
SetConsoleTextAttribute(g_Handle, Colors::DEFAULT);
return;
}
@ -47,13 +47,13 @@ namespace DX11_Base {
switch (FLAG) {
case(TRUE):
output = " [ON]\n";
color = g_Console->color.green;
color = Colors::green;
append = TEXT + output;
printdbg(append.c_str(), color);
break;
case(FALSE):
output = " [OFF]\n";
color = g_Console->color.red;
color = Colors::red;
append = TEXT + output;
printdbg(append.c_str(), color);
break;

View File

@ -60,12 +60,12 @@ namespace DX11_Base {
CreateHook(12, (void**)&oID3D11DrawIndexed, MJDrawIndexed);
Sleep(1000);
#if DEBUG
g_Console->printdbg("D3D11Window::Hook Initialized\n", g_Console->color.pink);
g_Console->printdbg("D3D11Window::Hook Initialized\n", Console::Colors::pink);
#endif
return TRUE;
}
#if DEBUG
g_Console->printdbg("[+] D3D11Window::Hook Failed to Initialize\n", g_Console->color.red);
g_Console->printdbg("[+] D3D11Window::Hook Failed to Initialize\n", Console::Colors::red);
#endif
return FALSE;
}
@ -165,7 +165,7 @@ namespace DX11_Base {
return FALSE;
}
#if DEBUG
g_Console->printdbg("D3D11Window::Window Created\n", g_Console->color.pink);
g_Console->printdbg("D3D11Window::Window Created\n", Console::Colors::pink);
#endif
return TRUE;
}
@ -178,7 +178,7 @@ namespace DX11_Base {
return FALSE;
}
#if DEBUG
g_Console->printdbg("D3D11Window::Window Destroyed\n", g_Console->color.pink);
g_Console->printdbg("D3D11Window::Window Destroyed\n", Console::Colors::pink);
#endif
return TRUE;
}
@ -209,7 +209,7 @@ namespace DX11_Base {
m_OldWndProc = (WNDPROC)SetWindowLongPtr(g_GameVariables->g_GameWindow, GWLP_WNDPROC, (__int3264)(LONG_PTR)WndProc);
b_ImGui_Initialized = TRUE;
#if DEBUG
g_Console->printdbg("D3D11Window::Swapchain Initialized\n", g_Console->color.pink);
g_Console->printdbg("D3D11Window::Swapchain Initialized\n", Console::Colors::pink);
#endif
return 1;
}

View File

@ -4,7 +4,7 @@ namespace DX11_Base {
GameData::GameData()
{
#if DEBUG
g_Console->printdbg("GameData::Initialized\n", g_Console->color.pink);
g_Console->printdbg("GameData::Initialized\n", Console::Colors::pink);
#endif
return;
}
@ -12,7 +12,7 @@ namespace DX11_Base {
GameVariables::GameVariables()
{
#if DEBUG
g_Console->printdbg("GameVariables::Initialized\n", g_Console->color.pink);
g_Console->printdbg("GameVariables::Initialized\n", Console::Colors::pink);
#endif
return;
}
@ -41,7 +41,7 @@ namespace DX11_Base {
GetModuleFileNameExA(g_GameHandle, NULL, tempPath, sizeof(tempPath));
g_GamePath = tempPath;
#if DEBUG
g_Console->printdbg("GameData::Init - Process Window Info Established\n", g_Console->color.pink);
g_Console->printdbg("GameData::Init - Process Window Info Established\n", Console::Colors::pink);
#endif
}
}

View File

@ -5,7 +5,7 @@ namespace DX11_Base {
{
MH_Initialize();
#if DEBUG
g_Console->printdbg("Hooking::Initialized\n", g_Console->color.pink);
g_Console->printdbg("Hooking::Initialized\n", Console::Colors::pink);
#endif
return;
}
@ -23,7 +23,7 @@ namespace DX11_Base {
Config.Init();
MH_EnableHook(MH_ALL_HOOKS);
#if DEBUG
g_Console->printdbg("Hooking::Hook Initialized\n", g_Console->color.pink);
g_Console->printdbg("Hooking::Hook Initialized\n", Console::Colors::pink);
#endif
return;
}

View File

@ -36,122 +36,14 @@ int InputTextCallback(ImGuiInputTextCallbackData* data) {
return 0;
}
//SDK::FPalDebugOtomoPalInfo palinfo = SDK::FPalDebugOtomoPalInfo();
//SDK::TArray<SDK::EPalWazaID> EA = { 0U };
//void SpawnPal(char* PalName, bool IsMonster, int rank=1, int lvl = 1, int count=1)
//{
// SDK::UKismetStringLibrary* lib = SDK::UKismetStringLibrary::GetDefaultObj();
//
// //Convert FNAME
// wchar_t ws[255];
// swprintf(ws, 255, L"%hs", PalName);
// SDK::FName Name = lib->Conv_StringToName(SDK::FString(ws));
// //Call
// if (Config.GetPalPlayerCharacter() != NULL)
// {
// if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
// {
// if (Config.GetPalPlayerCharacter()->GetPalPlayerController())
// {
// if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState())
// {
// if (IsMonster)
// {
// Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->RequestSpawnMonsterForPlayer(Name, count, lvl);
// return;
// }
// EA[0] = SDK::EPalWazaID::AirCanon;
// palinfo.Level = lvl;
// palinfo.Rank = rank;
// palinfo.PalName.Key = Name;
// palinfo.WazaList = EA;
// palinfo.PassiveSkill = NULL;
// Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->Debug_CaptureNewMonsterByDebugOtomoInfo_ToServer(palinfo);
// }
// }
// }
// }
//}
void AddItem(SDK::UPalPlayerInventoryData* data,char* itemName, int count)
{
SDK::UKismetStringLibrary* lib = SDK::UKismetStringLibrary::GetDefaultObj();
//Convert FNAME
wchar_t ws[255];
swprintf(ws, 255, L"%hs",itemName);
SDK::FName Name = lib->Conv_StringToName(SDK::FString(ws));
//Call
data->RequestAddItem(Name, count, true);
}
void AnyWhereTP(SDK::FVector& vector,bool IsSafe)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
namespace DX11_Base
{
// helper variables
char inputBuffer_getFnAddr[100];
SDK::FGuid guid = Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPlayerUId();
vector = { vector.X,vector.Y + 100,vector.Z };
Config.GetPalPlayerCharacter()->GetPalPlayerController()->Transmitter->Player->RegisterRespawnLocation_ToServer(guid, vector);
Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->RequestRespawn();
}
return;
}
void ExploitFly(bool IsFly)
namespace Styles
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
if (IsFly)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
Config.GetPalPlayerCharacter()->GetPalPlayerController()->StartFlyToServer();
}
}
else
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
Config.GetPalPlayerCharacter()->GetPalPlayerController()->EndFlyToServer();
}
}
}
return;
}
void Spawn_Multiple(config::QuickItemSet Set)
{
SDK::UPalPlayerInventoryData * InventoryData = Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->GetInventoryData();
switch (Set)
{
case 0:
for (int i = 0; i < IM_ARRAYSIZE(database::basic_items_stackable); i++) {
AddItem(InventoryData, _strdup(database::basic_items_stackable[i].c_str()), 100);
}
case 1:
for (int i = 0; i < IM_ARRAYSIZE(database::basic_items_single); i++)
{
AddItem(InventoryData, _strdup(database::basic_items_single[i].c_str()), 1);
}
case 2:
for (int i = 0; i < IM_ARRAYSIZE(database::pal_unlock_skills); i++) {
AddItem(InventoryData, _strdup(database::pal_unlock_skills[i].c_str()), 1);
}
case 3:
for (int i = 0; i < IM_ARRAYSIZE(database::spheres); i++) {
AddItem(InventoryData, _strdup(database::spheres[i].c_str()), 100);
}
case 4:
for (int i = 0; i < IM_ARRAYSIZE(database::tools); i++) {
AddItem(InventoryData, _strdup(database::tools[i].c_str()), 1);
}
default:
break;
}
}//Creadit:asashi
namespace DX11_Base {
namespace Styles {
void InitStyle()
{
ImGuiStyle& style = ImGui::GetStyle();
@ -159,29 +51,26 @@ namespace DX11_Base {
// STYLE PROPERTIES
style.WindowTitleAlign = ImVec2(0.5f, 0.5f);
// Base ImGui Styling , Aplying a custyom style is left up to you.
ImGui::StyleColorsClassic();
/// EXAMPLE COLOR
//colors[ImGuiCol_FrameBg] = ImVec4(0, 0, 0, 0);
// COLORS
if (g_Menu->dbg_RAINBOW_THEME) {
if (g_Menu->dbg_RAINBOW_THEME)
{
// RGB MODE STLYE PROPERTIES
colors[ImGuiCol_Separator] = ImVec4(g_Menu->dbg_RAINBOW);
colors[ImGuiCol_TitleBg] = ImVec4(0, 0, 0, 1.0f);
colors[ImGuiCol_TitleBgActive] = ImVec4(0, 0, 0, 1.0f);
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0, 0, 0, 1.0f);
}
else {
else
{
/// YOUR DEFAULT STYLE PROPERTIES HERE
}
}
}
namespace Tabs {
namespace Tabs
{
void TABPlayer()
{
@ -229,16 +118,8 @@ namespace DX11_Base {
ImGui::SliderFloat("SpeedModifilers", &Config.SpeedModiflers, 1, 10);
ImGui::SliderInt("AttackModifilers", &Config.DamageUp, 0, 200000);
ImGui::SliderInt("defenseModifilers", &Config.DefuseUp, 0, 200000);
}
if (ImGui::Button("PrintPlayerAddr", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
g_Console->printdbg("\n\n[+] APalPlayerCharacter: %x [+]\n\n", g_Console->color.green, p_appc);
}
}
}
void TABExploit()
{
//Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->RequestSpawnMonsterForPlayer(name, 5, 1);
@ -253,23 +134,14 @@ namespace DX11_Base {
if (ImGui::Button("Give item", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
SDK::APalPlayerState* p_apps = Config.GetPalPlayerState();
if (p_appc && p_apps)
{
SDK::UPalPlayerInventoryData* InventoryData = Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->GetInventoryData();
if (InventoryData != NULL)
if (InventoryData && (Config.ItemName != NULL))
{
if (Config.ItemName != NULL)
{
g_Console->printdbg("\n\n[+] ItemName: %s [+]\n\n", g_Console->color.green, Config.ItemName);
AddItem(InventoryData, Config.ItemName, Config.Item);
}
}
}
g_Console->printdbg("\n\n[+] ItemName: %s [+]\n\n", Console::Colors::green, Config.ItemName);
AddItemToInventoryByName(InventoryData, Config.ItemName, Config.Item);
}
}
}
@ -278,22 +150,20 @@ namespace DX11_Base {
ImGui::InputInt("Multiple of how much:", &Config.AddItemCount);
if (ImGui::Button("Give items from slot", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
AddToInventoryContainer(Config.AddItemCount, Config.AddItemSlot);
}
IncrementInventoryItemCountByIndex(Config.AddItemCount, Config.AddItemSlot);
// this does not work lol
// std::stringstream AddItemsString;
// AddItemsString << "Give " << Config.AddItemCount << " items from slot" << Config.AddItemSlot;
if (ImGui::Button("Unlock All Effigies", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
UnlockAllEffigies();
}
if (ImGui::Button("ToggleFly", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
Config.IsToggledFly = !Config.IsToggledFly;
ExploitFly(Config.IsToggledFly);
}
/*if (ImGui::Button("DeleteSelf", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
@ -308,42 +178,15 @@ namespace DX11_Base {
}
}
}*/
if (ImGui::Button("GodHealth", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
{
SDK::FFixedPoint fixpoint = SDK::FFixedPoint();
fixpoint.Value = 99999999;
Config.GetPalPlayerCharacter()->ReviveCharacter_ToServer(fixpoint);
}
}
}
}
if (ImGui::Button("GodHealth", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
ReviveLocalPlayer();
//Creadit WoodgamerHD
if (ImGui::Button("Give exp", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
{
if (Config.EXP >= 0)
{
Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->GrantExpForParty(Config.EXP);
}
}
}
}
}
GiveExperiencePoints(Config.EXP);
}
void TABConfig()
{
@ -355,12 +198,13 @@ namespace DX11_Base {
ImGui::Spacing();
if (ImGui::Button("UNHOOK DLL", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) {
#if DEBUG
g_Console->printdbg("\n\n[+] UNHOOK INITIALIZED [+]\n\n", g_Console->color.red);
g_Console->printdbg("\n\n[+] UNHOOK INITIALIZED [+]\n\n", Console::Colors::red);
#endif
g_KillSwitch = TRUE;
}
}
void TABDatabase()
{
//ImGui::Checkbox("IsItems", &Config.matchDbItems);
@ -381,31 +225,13 @@ namespace DX11_Base {
}
}
}
void TABTeleporter()
{
ImGui::Checkbox("SafeTeleport", &Config.IsSafe);
if (ImGui::Button("Home", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
{
if (Config.IsSafe)
{
Config.GetPalPlayerCharacter()->GetPalPlayerController()->TeleportToSafePoint_ToServer();
}
else
{
Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->RequestRespawn();
}
RespawnLocalPlayer(Config.IsSafe);
}
}
}
}
ImGui::InputFloat3("Pos",Config.Pos);
ImGui::SameLine();
if (ImGui::Button("TP", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
@ -413,46 +239,78 @@ namespace DX11_Base {
SDK::FVector vector = { Config.Pos[0],Config.Pos[1],Config.Pos[2] };
AnyWhereTP(vector, Config.IsSafe);
}
for (const auto& pair : database::locationMap) {
for (const auto& pair : database::locationMap)
{
const std::string& locationName = pair.first;
if (ImGui::Button(locationName.c_str())) {
if (ImGui::Button(locationName.c_str()))
{
SDK::FVector location = SDK::FVector(pair.second[0], pair.second[1], pair.second[2]);
AnyWhereTP(location, Config.IsSafe);
}
}
}
void TABQuick()//Creadit:asashi
void TABQuick()
{
if (ImGui::Button("Basic Items stack", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) {
Spawn_Multiple(config::QuickItemSet::basic_items_stackable);
if (ImGui::Button("Basic Items stack", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
SpawnMultiple_ItemsToInventory(config::QuickItemSet::basic_items_stackable);
if (ImGui::Button("Basic Items single", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
SpawnMultiple_ItemsToInventory(config::QuickItemSet::basic_items_single);
if (ImGui::Button("Unlock Pal skills", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
SpawnMultiple_ItemsToInventory(config::QuickItemSet::pal_unlock_skills);
if (ImGui::Button("Spheres", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
SpawnMultiple_ItemsToInventory(config::QuickItemSet::spheres);
if (ImGui::Button("Tools", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
SpawnMultiple_ItemsToInventory(config::QuickItemSet::tools);
}
if (ImGui::Button("Basic Items single", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) {
Spawn_Multiple(config::QuickItemSet::basic_items_single);
void TABDebug()
{
// @TODO: print additional debug information
if (ImGui::Button("PrintPlayerAddr", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
g_Console->printdbg("\n\n[+] APalPlayerCharacter: %x [+]\n\n", Console::Colors::green, p_appc);
}
if (ImGui::Button("Unlock Pal skills", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) {
Spawn_Multiple(config::QuickItemSet::pal_unlock_skills);
}
if (ImGui::Button("Spheres", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) {
Spawn_Multiple(config::QuickItemSet::spheres);
ImGui::InputTextWithHint("##INPUT", "INPUT GOBJECT fn NAME", inputBuffer_getFnAddr, 100);
ImGui::SameLine();
if (ImGui::Button("GET fn", ImVec2(ImGui::GetContentRegionAvail().x, 20)))
{
std::string input = inputBuffer_getFnAddr;
SDK::UFunction* object = SDK::UObject::FindObject<SDK::UFunction>(input);
if (object)
{
static __int64 dwHandle = reinterpret_cast<__int64>(GetModuleHandle(0));
void* fnAddr = object->ExecFunction;
unsigned __int64 fnOffset = (reinterpret_cast<__int64>(fnAddr) - dwHandle);
g_Console->printdbg("[+] Found %s @ 0x%llX\n", Console::Colors::yellow, input.c_str(), fnOffset);
}
if (ImGui::Button("Tools", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) {
Spawn_Multiple(config::QuickItemSet::tools);
}
}
}
void Menu::Draw()
{
if (Config.IsESP)
{
ESP();
}
if (g_GameVariables->m_ShowMenu)
MainMenu();
if (Config.bisOpenManager && g_GameVariables->m_ShowMenu)
{
ManagerMenu();
}
if (g_GameVariables->m_ShowHud)
HUD(&g_GameVariables->m_ShowHud);
@ -463,42 +321,53 @@ namespace DX11_Base {
if (Config.isDebugESP)
ESP_DEBUG(Config.mDebugESPDistance, ImVec4(0,1,0,1));
}
void Menu::ManagerMenu()
{
if (ImGui::Begin("Manager", &g_GameVariables->m_ShowMenu, 96))
if (!ImGui::Begin("Manager", &g_GameVariables->m_ShowMenu, 96))
{
if (Config.GetUWorld() != NULL)
ImGui::End();
return;
}
if (Config.gWorld)
{
ImGui::Checkbox("filterPlayer", &Config.filterPlayer);
SDK::TArray<SDK::AActor*> T = Config.GetUWorld()->PersistentLevel->Actors;
for (int i = 0; i < T.Count(); i++)
{
if (T[i] != NULL)
{
if (T[i]->IsA(SDK::APalCharacter::StaticClass()))
{
if (!T[i])
continue;
if (!T[i]->IsA(SDK::APalCharacter::StaticClass()))
continue;
SDK::APalCharacter* Character = (SDK::APalCharacter*)T[i];
SDK::FString name;
if (Config.filterPlayer)
{
if (!T[i]->IsA(SDK::APalPlayerCharacter::StaticClass()))
{
continue;
}
}
if (T[i]->IsA(SDK::APalPlayerCharacter::StaticClass()))
{
if (!Character) { continue; }
if (!Character)
continue;
Character->CharacterParameterComponent->GetNickname(&name);
}
else
{
SDK::UKismetStringLibrary* lib = SDK::UKismetStringLibrary::GetDefaultObj();
if (!Character) { continue; }
if (!Character)
continue;
std::string s = Character->GetFullName();
size_t firstUnderscorePos = s.find('_');
if (firstUnderscorePos != std::string::npos) {
if (firstUnderscorePos != std::string::npos)
{
std::string result = s.substr(firstUnderscorePos + 1);
size_t secondUnderscorePos = result.find('_');
@ -517,21 +386,20 @@ namespace DX11_Base {
if (ImGui::Button("Kill"))
{
if (T[i]->IsA(SDK::APalCharacter::StaticClass()))
{
Damage(Character, 99999999999);
}
continue;
}
ImGui::SameLine();
if (ImGui::Button("TP"))
{
if (Config.GetPalPlayerCharacter() != NULL)
{
if (!Character) { continue; }
if (Character)
{
SDK::FVector vector = Character->K2_GetActorLocation();
AnyWhereTP(vector, Config.IsSafe);
}
}
}
/*if (Character->IsA(SDK::APalPlayerCharacter::StaticClass()))
{
@ -569,11 +437,16 @@ namespace DX11_Base {
}
ImGui::PopID();
}
}
if (Config.GetUWorld() != NULL)
{
}
ImGui::End();
}
}
}
void Menu::MainMenu()
{
if (!g_GameVariables->m_ShowDemo)
@ -635,8 +508,6 @@ namespace DX11_Base {
ImGui::EndTabBar();
}
ImGui::End();
}
void Menu::HUD(bool* p_open)
@ -645,94 +516,31 @@ namespace DX11_Base {
void Menu::Loops()
{
// Respawn
if ((GetAsyncKeyState(VK_F5) & 1))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
{
if (Config.IsSafe)
{
Config.GetPalPlayerCharacter()->GetPalPlayerController()->TeleportToSafePoint_ToServer();
}
else
{
Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->RequestRespawn();
RespawnLocalPlayer(Config.IsSafe);
}
}
}
}
}
// Revive Player
if ((GetAsyncKeyState(VK_F6) & 1))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
{
SDK::FFixedPoint fixpoint = SDK::FFixedPoint();
fixpoint.Value = 99999999;
Config.GetPalPlayerCharacter()->ReviveCharacter_ToServer(fixpoint);
ReviveLocalPlayer();
}
}
}
}
//
if (Config.IsSpeedHack)
{
if (Config.GetUWorld()
|| Config.GetUWorld()->PersistentLevel
|| Config.GetUWorld()->PersistentLevel->WorldSettings)
{
Config.GetUWorld()->PersistentLevel->WorldSettings->TimeDilation = Config.SpeedModiflers;
}
}
if (Config.IsAttackModiler)
{
if (Config.GetPalPlayerCharacter() != NULL && Config.GetPalPlayerCharacter()->CharacterParameterComponent->AttackUp != Config.DamageUp)
{
if (Config.GetPalPlayerCharacter()->CharacterParameterComponent != NULL)
{
Config.GetPalPlayerCharacter()->CharacterParameterComponent->AttackUp = Config.DamageUp;
}
}
}
//Creadit Mokobake
/**
if (Config.GetPalPlayerCharacter() != NULL)
{
if (Config.GetPalPlayerCharacter()->CharacterParameterComponent != NULL)
{
Config.GetPalPlayerCharacter()->CharacterParameterComponent->bIsEnableMuteki = Config.IsMuteki;
}
}**/
if (Config.IsDefuseModiler)
{
if (Config.GetPalPlayerCharacter() != NULL && Config.GetPalPlayerCharacter()->CharacterParameterComponent->DefenseUp != Config.DefuseUp)
{
if (Config.GetPalPlayerCharacter()->CharacterParameterComponent != NULL)
{
Config.GetPalPlayerCharacter()->CharacterParameterComponent->DefenseUp = Config.DefuseUp;
}
}
}
if (Config.IsInfStamina)
{
if (Config.GetPalPlayerCharacter() != NULL)
{
if (Config.GetPalPlayerCharacter()->CharacterParameterComponent != NULL)
{
Config.GetPalPlayerCharacter()->CharacterParameterComponent->ResetSP();
}
}
}
SpeedHack(Config.SpeedModiflers);
//
if (Config.IsAttackModiler)
SetPlayerDefenseParam(Config.DamageUp);
//
if (Config.IsDefuseModiler)
SetPlayerDefenseParam(Config.DefuseUp);
//
if (Config.IsInfStamina)
ResetStamina();
//
// SetDemiGodMode(Config.IsMuteki);
}
}