497 lines
19 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "../pch.h"
#include "../include/Menu.hpp"
#include "SDK.hpp"
#include "config.h"
SDK::FPalDebugOtomoPalInfo palinfo = SDK::FPalDebugOtomoPalInfo();
SDK::TArray<SDK::EPalWazaID> EA = { 0U };
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 SpawnPal(char* PalName,int rank, int lvl = 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())
{
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);
}
}
}
}
}
//Talk: Teleport or Shop anywhere Config.GetPalPlayerCharacter()->GetPalPlayerController()->Transmitter->Character->NotifyTalkStart_ToServer()
void AnyWhereTP(SDK::FVector& vector,bool IsSafe)
{
if (!IsSafe)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
{
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();
}
}
else
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController())
{
vector = { vector.X,vector.Y + 100,vector.Z };
Config.GetPalPlayerCharacter()->GetPalPlayerController()->Debug_Teleport2D(vector);
}
}
return;
}
void ExploitFly(bool IsFly)
{
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;
}
namespace DX11_Base {
namespace Styles {
void InitStyle()
{
ImGuiStyle& style = ImGui::GetStyle();
ImVec4* colors = ImGui::GetStyle().Colors;
// 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) {
// 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 {
/// YOUR DEFAULT STYLE PROPERTIES HERE
}
}
}
namespace Tabs {
void TABPlayer()
{
//<2F>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
ImGui::Checkbox("SpeedHack", &Config.IsSpeedHack);
ImGui::Checkbox("AttackHack", &Config.IsAttackModiler);
ImGui::Checkbox("DefenseHack", &Config.IsDefuseModiler);
ImGui::Checkbox("InfStamina", &Config.IsInfStamina);
//Creadit Mokobake
//ImGui::Checkbox("MuteKiGodmode", &Config.IsMuteki);
if (ImGui::Button("ToggleInfAmmo",ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
if (Config.GetPalPlayerCharacter()->ShooterComponent != NULL && Config.GetPalPlayerCharacter()->ShooterComponent->CanShoot())
{
if (Config.GetPalPlayerCharacter()->ShooterComponent->GetHasWeapon() != NULL)
{
Config.GetPalPlayerCharacter()->ShooterComponent->GetHasWeapon()->IsRequiredBullet = !Config.GetPalPlayerCharacter()->ShooterComponent->GetHasWeapon()->IsRequiredBullet;
}
}
}
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::GetWindowContentRegionWidth() - 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);
ImGui::Checkbox("SafeTeleport", &Config.IsSafe);
ImGui::InputFloat3("Pos:", Config.Pos);
ImGui::InputInt("EXP:", &Config.EXP);
ImGui::InputText("ItemName", Config.ItemName,sizeof(Config.ItemName));
ImGui::InputInt("ItemNum", &Config.Item);
if (ImGui::Button("Give item", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
{
SDK::UPalPlayerInventoryData* InventoryData = Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->GetInventoryData();
if (InventoryData != 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);
}
}
}
}
}
}
ImGui::InputText("PalName", Config.PalName, sizeof(Config.PalName));
ImGui::InputInt("PalRank", &Config.PalRank);
ImGui::InputInt("Pallvl", &Config.PalLvL);
if (ImGui::Button("Spawn Pal", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
if (Config.GetPalPlayerCharacter() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
{
if (Config.PalName != NULL)
{
g_Console->printdbg("\n\n[+] PalName: %s [+]\n\n", g_Console->color.green, Config.ItemName);
SpawnPal(Config.PalName,Config.PalRank,Config.PalLvL);
}
}
}
}
}
if (ImGui::Button("HomeTP", ImVec2(ImGui::GetWindowContentRegionWidth() - 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();
}
}
}
}
}
if (ImGui::Button("AnywhereTP", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
if (Config.GetPalPlayerCharacter()!= NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
if (Config.Pos != NULL)
{
SDK::FVector vector = { Config.Pos[0],Config.Pos[1],Config.Pos[2] };
AnyWhereTP(vector,Config.IsSafe);
}
}
}
}
if (ImGui::Button("ToggleFly", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
Config.IsToggledFly = !Config.IsToggledFly;
ExploitFly(Config.IsToggledFly);
}
if (ImGui::Button("DeleteSelf", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
{
Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->Debug_RequestDeletePlayerSelf_ToServer();
}
}
}
}
if (ImGui::Button("GodHealth", ImVec2(ImGui::GetWindowContentRegionWidth() - 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);
}
}
}
}
//Creadit WoodgamerHD
if(ImGui::Button("Give exp", ImVec2(ImGui::GetWindowContentRegionWidth() - 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);
}
}
}
}
}
//Creadit Kaotic13
}
void TABConfig()
{
ImGui::Text("PalWorld Menu");
ImGui::Text("VERSION: v1.1");
ImGui::Spacing();
ImGui::Separator();
ImGui::Spacing();
if (ImGui::Button("UNHOOK DLL", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20))) {
#if DEBUG
g_Console->printdbg("\n\n[+] UNHOOK INITIALIZED [+]\n\n", g_Console->color.red);
#endif
g_KillSwitch = TRUE;
}
}
}
void Menu::Draw()
{
if (Config.IsESP)
{
ESP();
}
if (g_GameVariables->m_ShowMenu)
MainMenu();
if (g_GameVariables->m_ShowHud)
HUD(&g_GameVariables->m_ShowHud);
if (g_GameVariables->m_ShowDemo)
ImGui::ShowDemoWindow();
}
void Menu::MainMenu()
{
if (!g_GameVariables->m_ShowDemo)
Styles::InitStyle();
if (g_Menu->dbg_RAINBOW_THEME) {
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(g_Menu->dbg_RAINBOW));
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(g_Menu->dbg_RAINBOW));
ImGui::PushStyleColor(ImGuiCol_BorderShadow, ImVec4(g_Menu->dbg_RAINBOW));
}
if (!ImGui::Begin("PalWorld", &g_GameVariables->m_ShowMenu, 96))
{
ImGui::End();
return;
}
if (g_Menu->dbg_RAINBOW_THEME) {
ImGui::PopStyleColor();
ImGui::PopStyleColor();
ImGui::PopStyleColor();
}
// Display Menu Content
//Tabs::TABMain();
ImGui::Text("Testing some case...");
if (ImGui::BeginTabBar("##tabs", ImGuiTabBarFlags_None))
{
if (ImGui::BeginTabItem("Player"))
{
Tabs::TABPlayer();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("EXPLOIT"))
{
Tabs::TABExploit();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("CONFIG"))
{
Tabs::TABConfig();
ImGui::EndTabItem();
}
ImGui::EndTabBar();
}
ImGui::End();
}
void Menu::HUD(bool* p_open)
{
}
void Menu::Loops()
{
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();
}
}
}
}
}
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);
}
}
}
}
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();
}
}
}
}
}