added Manager,damage and RandomName

This commit is contained in:
2200151533 2024-01-28 07:46:52 +08:00
parent f7116bbd67
commit a113baadda
4 changed files with 175 additions and 59 deletions

View File

@ -20,9 +20,9 @@ void config::Update(const char* filterText)
} }
std::sort(Config.db_filteredItems.begin(), Config.db_filteredItems.end()); std::sort(Config.db_filteredItems.begin(), Config.db_filteredItems.end());
} }
const std::vector<std::string>& config::GetFilteredItems(){ return Config.db_filteredItems; } const std::vector<std::string>& config::GetFilteredItems() { return Config.db_filteredItems; }
bool DetourTick(SDK::APalPlayerCharacter* m_this,float DeltaSecond) bool DetourTick(SDK::APalPlayerCharacter* m_this, float DeltaSecond)
{ {
if (m_this->GetPalPlayerController() != NULL) if (m_this->GetPalPlayerController() != NULL)
{ {
@ -31,7 +31,7 @@ bool DetourTick(SDK::APalPlayerCharacter* m_this,float DeltaSecond)
Config.localPlayer = m_this; Config.localPlayer = m_this;
} }
} }
return OldTickFunc(m_this, DeltaSecond); return OldTickFunc(m_this, DeltaSecond);
} }
SDK::UWorld* config::GetUWorld() SDK::UWorld* config::GetUWorld()
{ {
@ -52,8 +52,8 @@ SDK::UPalCharacterImportanceManager* config::GetCharacterImpManager()
if (!pWorld) if (!pWorld)
return nullptr; return nullptr;
SDK::UGameInstance* pGameInstance = pWorld->OwningGameInstance; SDK::UGameInstance* pGameInstance = pWorld->OwningGameInstance;
if (!pGameInstance) if (!pGameInstance)
return nullptr; return nullptr;
return static_cast<SDK::UPalGameInstance*>(pGameInstance)->CharacterImportanceManager; return static_cast<SDK::UPalGameInstance*>(pGameInstance)->CharacterImportanceManager;
@ -172,7 +172,7 @@ bool config::GetAllActorsofType(SDK::UClass* mType, std::vector<SDK::AActor*>* o
if (!pActor || !pActor->RootComponent || (pActor == pLocalPlayer && bSkipLocalPlayer)) if (!pActor || !pActor->RootComponent || (pActor == pLocalPlayer && bSkipLocalPlayer))
continue; continue;
if (!pActor->IsA(mType)) if (!pActor->IsA(mType))
continue; continue;
result.push_back(pActor); result.push_back(pActor);
@ -191,7 +191,7 @@ void config::Init()
{ {
//register hook //register hook
Config.ClientBase = (DWORD64)GetModuleHandleA("PalWorld-Win64-Shipping.exe"); Config.ClientBase = (DWORD64)GetModuleHandleA("PalWorld-Win64-Shipping.exe");
TickFunc = (Tick)(Config.ClientBase + Config.offset_Tick); TickFunc = (Tick)(Config.ClientBase + Config.offset_Tick);
MH_CreateHook(TickFunc, DetourTick, reinterpret_cast<void**>(&OldTickFunc)); MH_CreateHook(TickFunc, DetourTick, reinterpret_cast<void**>(&OldTickFunc));

View File

@ -4,16 +4,14 @@
#include "database.h" #include "database.h"
#include "SDK.hpp" #include "SDK.hpp"
typedef bool(*Tick)(SDK::APalPlayerCharacter* m_this,float DeltaSecond); typedef bool(*Tick)(SDK::APalPlayerCharacter* m_this, float DeltaSecond);
typedef void(*AddStatus)(SDK::UPalNetworkIndividualComponent* p_this, SDK::FPalInstanceID* ID, SDK::TArray<SDK::FPalGotStatusPoint>* AddStatusPointArray);
class config class config
{ {
public: public:
//offsets //offsets
DWORD64 ClientBase = 0; DWORD64 ClientBase = 0;
DWORD64 offset_Tick = 0x2AB1DC0;//APalPlayerCharacter::Tick // 48 89 5C 24 ? 57 48 83 EC 60 48 8B F9 E8 ? ? ? ? 48 8B | [IDA NOTE]: 2ND RESULT DWORD64 offset_Tick = 0x2AB1DC0;//APalPlayerCharacter::Tick
DWORD64 offset_AddStatus = 0x2B0E960; //UPalNetworkIndividualComponent::AddPlayerCharacterStatusPoint_ToServer
//check //check
bool IsESP = false; bool IsESP = false;
bool IsAimbot = false; bool IsAimbot = false;
@ -28,20 +26,20 @@ public:
bool IsMonster = false; bool IsMonster = false;
bool IsQuick = false; bool IsQuick = false;
bool matchDbItems = true; bool matchDbItems = true;
bool isEq = false;
bool isDebugESP = false; bool isDebugESP = false;
float mDebugESPDistance = 5.0f; bool bisOpenManager = false;
bool filterPlayer = false;
//def and value bool bisRandomName = false;
float SpeedModiflers = 1.0f; float SpeedModiflers = 1.0f;
//def and value
float mDebugESPDistance = 5.0f;
int DamageUp = 0; int DamageUp = 0;
int DefuseUp = 0; int DefuseUp = 0;
int EXP = 0; int EXP = 0;
int Item = 0; int Item = 0;
float Pos[3] = {0,0,0}; float Pos[3] = { 0,0,0 };
char ItemName[255]; char ItemName[255];
char inputTextBuffer[255] = ""; char inputTextBuffer[255] = "";
int EqModifiler = 1;
SDK::UWorld* gWorld = nullptr; SDK::UWorld* gWorld = nullptr;
SDK::APalPlayerCharacter* localPlayer = NULL; SDK::APalPlayerCharacter* localPlayer = NULL;
SDK::TArray<SDK::APalPlayerCharacter*> AllPlayers = {}; SDK::TArray<SDK::APalPlayerCharacter*> AllPlayers = {};
@ -53,7 +51,7 @@ public:
enum QuickItemSet enum QuickItemSet
{ {
basic_items_stackable, basic_items_stackable,
basic_items_single, basic_items_single,
pal_unlock_skills, pal_unlock_skills,
spheres, spheres,
tools tools
@ -69,12 +67,11 @@ public:
static SDK::APalPlayerState* GetPalPlayerState(); static SDK::APalPlayerState* GetPalPlayerState();
static SDK::UPalPlayerInventoryData* GetInventoryComponent(); static SDK::UPalPlayerInventoryData* GetInventoryComponent();
static SDK::APalWeaponBase* GetPlayerEquippedWeapon(); static SDK::APalWeaponBase* GetPlayerEquippedWeapon();
static SDK::TArray<SDK::APalPlayerCharacter*> GetTAllPlayers();
static bool GetTAllPlayers(SDK::TArray<class SDK::APalCharacter*>* outResult); static bool GetTAllPlayers(SDK::TArray<class SDK::APalCharacter*>* outResult);
static bool GetTAllImpNPC(SDK::TArray<class SDK::APalCharacter*>* outResult); static bool GetTAllImpNPC(SDK::TArray<class SDK::APalCharacter*>* outResult);
static bool GetTAllNPC(SDK::TArray<class SDK::APalCharacter*>* outResult); static bool GetTAllNPC(SDK::TArray<class SDK::APalCharacter*>* outResult);
static bool GetTAllPals(SDK::TArray<class SDK::APalCharacter*>* outResult); static bool GetTAllPals(SDK::TArray<class SDK::APalCharacter*>* outResult);
static bool GetAllActorsofType(SDK::UClass* mType, std::vector<SDK::AActor*>* outArray, bool bLoopAllLevels = false , bool bSkipLocalPlayer = false); static bool GetAllActorsofType(SDK::UClass* mType, std::vector<SDK::AActor*>* outArray, bool bLoopAllLevels = false, bool bSkipLocalPlayer = false);
static void Init(); static void Init();
static void Update(const char* filterText); static void Update(const char* filterText);
static const std::vector<std::string>& GetFilteredItems(); static const std::vector<std::string>& GetFilteredItems();

View File

@ -23,6 +23,7 @@ namespace DX11_Base {
// FORWARD DECLARE FUNCTIONS // FORWARD DECLARE FUNCTIONS
void Draw(); void Draw();
void MainMenu(); void MainMenu();
void ManagerMenu();
void HUD(bool* p_open); void HUD(bool* p_open);
void Loops(); void Loops();

View File

@ -2,48 +2,39 @@
#include "../include/Menu.hpp" #include "../include/Menu.hpp"
#include "SDK.hpp" #include "SDK.hpp"
#include "config.h" #include "config.h"
std::string rand_str(const int len)
AddStatus Equi;
AddStatus OldEqui;
void DetourEqui(SDK::UPalNetworkIndividualComponent* p_this, SDK::FPalInstanceID* ID, SDK::TArray<SDK::FPalGotStatusPoint>* AddStatusPointArray)
{ {
if(AddStatusPointArray->IsValid()) std::string str;
char c;
int idx;
for (idx = 0; idx < len; idx++)
{ {
for (int i = 0; i < AddStatusPointArray->Count(); i++) c = 'a' + rand() % 26;
{ str.push_back(c);
(*AddStatusPointArray)[i].StatusPoint = -1 * Config.EqModifiler;
}
} }
return; return str;
} }
void Damage(SDK::APalCharacter* character, int32 damage)
{
SDK::FPalDamageInfo info = SDK::FPalDamageInfo();
info.AttackElementType = SDK::EPalElementType::Normal;
info.Attacker = Config.GetPalPlayerCharacter();
info.AttackerGroupID = Config.GetPalPlayerState()->IndividualHandleId.PlayerUId;
info.AttackerLevel = 50;
info.AttackType = SDK::EPalAttackType::Weapon;
info.bApplyNativeDamageValue = true;
info.bAttackableToFriend = true;
info.IgnoreShield = true;
info.NativeDamageValue = damage;
Config.GetPalPlayerState()->SendDamage_ToServer(character, info);
}
int InputTextCallback(ImGuiInputTextCallbackData* data) { int InputTextCallback(ImGuiInputTextCallbackData* data) {
char inputChar = data->EventChar; char inputChar = data->EventChar;
Config.Update(Config.inputTextBuffer); Config.Update(Config.inputTextBuffer);
return 0; return 0;
}
void ToggleEqui(bool isEq)
{
if (isEq)
{
if (Equi = NULL)
{
Equi = (AddStatus)(Config.ClientBase + Config.offset_AddStatus);
MH_CreateHook(Equi, DetourEqui, reinterpret_cast<void**>(OldEqui));
MH_EnableHook(Equi);
return;
}
MH_EnableHook(Equi);
return;
}
else
{
MH_DisableHook(Equi);
}
} }
//SDK::FPalDebugOtomoPalInfo palinfo = SDK::FPalDebugOtomoPalInfo(); //SDK::FPalDebugOtomoPalInfo palinfo = SDK::FPalDebugOtomoPalInfo();
//SDK::TArray<SDK::EPalWazaID> EA = { 0U }; //SDK::TArray<SDK::EPalWazaID> EA = { 0U };
@ -203,6 +194,24 @@ namespace DX11_Base {
ImGui::Checkbox("InfStamina", &Config.IsInfStamina); ImGui::Checkbox("InfStamina", &Config.IsInfStamina);
if (ImGui::Button("RandomName", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
if (Config.GetPalPlayerCharacter() != NULL)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
{
SDK::UKismetStringLibrary* lib = SDK::UKismetStringLibrary::GetDefaultObj();
std::string s = rand_str(20);
wchar_t ws[255];
swprintf(ws, 255, L"%hs", s.c_str());
Config.GetPalPlayerCharacter()->GetPalPlayerController()->Transmitter->NetworkIndividualComponent->UpdateCharacterNickName_ToServer(Config.GetPalPlayerCharacter()->CharacterParameterComponent->IndividualHandle->ID, SDK::FString(ws));
}
}
}
//Creadit Mokobake //Creadit Mokobake
//ImGui::Checkbox("MuteKiGodmode", &Config.IsMuteki); //ImGui::Checkbox("MuteKiGodmode", &Config.IsMuteki);
@ -234,6 +243,7 @@ namespace DX11_Base {
{ {
//Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->RequestSpawnMonsterForPlayer(name, 5, 1); //Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->RequestSpawnMonsterForPlayer(name, 5, 1);
ImGui::Checkbox("IsQuick", &Config.IsQuick); ImGui::Checkbox("IsQuick", &Config.IsQuick);
ImGui::Checkbox("Open Manager", &Config.bisOpenManager);
ImGui::Checkbox("SafeTeleport", &Config.IsSafe); ImGui::Checkbox("SafeTeleport", &Config.IsSafe);
//creadit //creadit
//ImGui::Checkbox("PalIsMonster", &Config.IsMonster); //ImGui::Checkbox("PalIsMonster", &Config.IsMonster);
@ -392,17 +402,11 @@ namespace DX11_Base {
} }
} }
} }
if (ImGui::Button("Equivalent", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
{
Config.isEq = !Config.isEq;
ToggleEqui(Config.isEq);
}
ImGui::InputInt("EquiModifiler", &Config.EqModifiler);
} }
void TABConfig() void TABConfig()
{ {
ImGui::Text("PalWorld Menu"); ImGui::Text("PalWorld Menu");
ImGui::Text("VERSION: v1.1"); ImGui::Text("VERSION: v1.2.3");
ImGui::Spacing(); ImGui::Spacing();
ImGui::Separator(); ImGui::Separator();
@ -463,6 +467,10 @@ namespace DX11_Base {
} }
if (g_GameVariables->m_ShowMenu) if (g_GameVariables->m_ShowMenu)
MainMenu(); MainMenu();
if (Config.bisOpenManager && g_GameVariables->m_ShowMenu)
{
ManagerMenu();
}
if (g_GameVariables->m_ShowHud) if (g_GameVariables->m_ShowHud)
HUD(&g_GameVariables->m_ShowHud); HUD(&g_GameVariables->m_ShowHud);
@ -473,7 +481,117 @@ namespace DX11_Base {
if (Config.isDebugESP) if (Config.isDebugESP)
ESP_DEBUG(Config.mDebugESPDistance, ImVec4(0,1,0,1)); ESP_DEBUG(Config.mDebugESPDistance, ImVec4(0,1,0,1));
} }
void Menu::ManagerMenu()
{
if (ImGui::Begin("Manager", &g_GameVariables->m_ShowMenu, 96))
{
if (Config.GetUWorld() != NULL)
{
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()))
{
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; }
Character->CharacterParameterComponent->GetNickname(&name);
}
else
{
SDK::UKismetStringLibrary* lib = SDK::UKismetStringLibrary::GetDefaultObj();
if (!Character) { continue; }
std::string s = Character->GetFullName();
size_t firstUnderscorePos = s.find('_');
if (firstUnderscorePos != std::string::npos) {
std::string result = s.substr(firstUnderscorePos + 1);
size_t secondUnderscorePos = result.find('_');
if (secondUnderscorePos != std::string::npos) {
result = result.substr(0, secondUnderscorePos);
}
wchar_t ws[255];
swprintf(ws, 255, L"%hs", result);
name = SDK::FString(ws);
}
}
ImGui::Text(name.ToString().c_str());
ImGui::SameLine();
ImGui::PushID(i);
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; }
SDK::FVector vector = Character->K2_GetActorLocation();
AnyWhereTP(vector, Config.IsSafe);
}
}
/*if (Character->IsA(SDK::APalPlayerCharacter::StaticClass()))
{
ImGui::SameLine();
if (ImGui::Button("Boss"))
{
if (Config.GetPalPlayerCharacter() != NULL)
{
auto controller = Config.GetPalPlayerCharacter()->GetPalPlayerController();
if (controller != NULL)
{
controller->Transmitter->BossBattle->RequestBossBattleEntry_ToServer(SDK::EPalBossType::ElectricBoss, (SDK::APalPlayerCharacter*)Character);
controller->Transmitter->BossBattle->RequestBossBattleStart_ToServer(SDK::EPalBossType::ElectricBoss, (SDK::APalPlayerCharacter*)Character);
}
}
}
}*/
if (Character->IsA(SDK::APalPlayerCharacter::StaticClass()))
{
ImGui::SameLine();
if (ImGui::Button("MaskIt"))
{
if (Config.GetPalPlayerCharacter() != NULL)
{
auto controller = Config.GetPalPlayerCharacter()->GetPalPlayerController();
if (controller != NULL)
{
auto player = (SDK::APalPlayerCharacter*)Character;
SDK::FString fakename;
player->CharacterParameterComponent->GetNickname(&fakename);
Config.GetPalPlayerCharacter()->GetPalPlayerController()->Transmitter->NetworkIndividualComponent->UpdateCharacterNickName_ToServer(Config.GetPalPlayerCharacter()->CharacterParameterComponent->IndividualHandle->ID, fakename);
}
}
}
}
ImGui::PopID();
}
}
}
}
}
}
void Menu::MainMenu() void Menu::MainMenu()
{ {
if (!g_GameVariables->m_ShowDemo) if (!g_GameVariables->m_ShowDemo)