From 3a7d070860f1719b2e8f5eee2788fec696a957b4 Mon Sep 17 00:00:00 2001 From: 2200151533 <2200151533@qq.com> Date: Thu, 25 Jan 2024 00:12:03 +0800 Subject: [PATCH] Okay, now we have added item generators and pal generators --- config.cpp | 2 + config.h | 9 ++- feature.cpp | 10 ++-- src/Menu.cpp | 162 +++++++++++++++++++++++++++++---------------------- 4 files changed, 108 insertions(+), 75 deletions(-) diff --git a/config.cpp b/config.cpp index dc4af3d..ec57947 100644 --- a/config.cpp +++ b/config.cpp @@ -11,6 +11,7 @@ GetAllPlayer OldGetAllPlayerFunc; void DetourPlayers(SDK::UPalCharacterImportanceManager* i_this, SDK::TArray* OutArray) { + Config.UCIM = i_this; if(i_this->PlayerList.IsValid()) { Config.AllPlayers = i_this->PlayerList_ForOutsideGet; @@ -60,6 +61,7 @@ SDK::TArray config::GetTAllPlayers() void config::Init() { + //register hook Config.ClientBase = (DWORD64)GetModuleHandleA("PalWorld-Win64-Shipping.exe"); TickFunc = (Tick)(Config.ClientBase + Config.offset_Tick); diff --git a/config.h b/config.h index e6e91ac..e7486fd 100644 --- a/config.h +++ b/config.h @@ -1,6 +1,7 @@ #pragma once #include #include "libs/utils/memory.h" +#include #include "SDK.hpp" typedef bool(*Tick)(SDK::APalPlayerCharacter* m_this,float DeltaSecond); @@ -13,7 +14,7 @@ public: DWORD64 offset_Tick = 0x2AB44D0;//APalPlayerCharacter::Tick DWORD64 offset_GetAllPlayers = 0x2962330;// UPalCharacterImportanceManager::GetAllPlayer //�˵��ж� - bool IsESP = true; + bool IsESP = false; bool IsAimbot = false; bool IsSpeedHack = false; bool IsAttackModiler = false; @@ -29,9 +30,15 @@ public: int DefuseUp = 0; int EXP = 0; int Item = 0; + int PalRank = 0; float Pos[3] = {0,0,0}; + char ItemName[255]; + char PalName[255]; + int PalLvL = 1; SDK::APalPlayerCharacter* localPlayer = NULL; + SDK::TArray AllPlayers = {}; + SDK::UPalCharacterImportanceManager* UCIM = NULL; SDK::UObject* WorldContextObject = NULL; //���� diff --git a/feature.cpp b/feature.cpp index 950ea8d..9c5e9fa 100644 --- a/feature.cpp +++ b/feature.cpp @@ -3,16 +3,16 @@ void ESP() { - /** if (Config.GetPalPlayerCharacter() != NULL) { - if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL) + if (Config.GetPalPlayerCharacter()->ShooterComponent != NULL) { - - DrawUActorComponent(Config.GetPalPlayerCharacter()->BlueprintCreatedComponents, ImColor(128, 0, 0)); + if(Config.GetPalPlayerCharacter()->ShooterComponent->GetHasWeapon() != NULL) + { + DrawUActorComponent(Config.GetPalPlayerCharacter()->ShooterComponent->GetHasWeapon()->InstanceComponents, ImColor(128, 0, 0)); + } } } - **/ } void DrawUActorComponent(SDK::TArray Comps,ImColor color) { diff --git a/src/Menu.cpp b/src/Menu.cpp index ecb6779..ad03d75 100644 --- a/src/Menu.cpp +++ b/src/Menu.cpp @@ -3,6 +3,49 @@ #include "SDK.hpp" #include "config.h" + +SDK::FPalDebugOtomoPalInfo palinfo = SDK::FPalDebugOtomoPalInfo(); +SDK::TArray 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) { @@ -128,7 +171,51 @@ namespace DX11_Base { ImGui::Checkbox("SafeTeleport", &Config.IsSafe); ImGui::InputFloat3("Pos:", Config.Pos); ImGui::InputInt("EXP:", &Config.EXP); - ImGui::InputInt("ItemNum:", &Config.Item); + 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(); @@ -201,42 +288,9 @@ namespace DX11_Base { } } } - if (ImGui::Button("test", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20))) - { - - g_Console->printdbg("\n\n[+] WorldContextObject: %x [+]\n\n", g_Console->color.green,Config.WorldContextObject); - - if (Config.GetTAllPlayers().IsValid()) - { - SDK::TArray T = Config.GetTAllPlayers(); - for (int i =0;i< T.Num();i++) - { - g_Console->printdbg("\n\n[+] APalPlayerCharacter: %x [+]\n\n", g_Console->color.green,T[i]); - if (T[i]->GetPalPlayerController() != NULL) - { - if (T[i]->GetPalPlayerController()->IsLocalController()) - { - g_Console->printdbg("\n\n[+] Finded APalPlayerCharacter:[+]\n\n", g_Console->color.green); - } - if (T[i] != NULL) - { - if (T[i]->GetPalPlayerController()->GetPalPlayerState() != NULL) - { - SDK::FFixedPoint fixpoint = SDK::FFixedPoint(); - fixpoint.Value = 99999999; - T[i]->ReviveCharacter_ToServer(fixpoint); - } - } - } - } - } - else - { - g_Console->printdbg("\n\n[+]GetTAllPlayers().IsInValid[+]\n\n", g_Console->color.red); - } - } + //Creadit WoodgamerHD - if(ImGui::Button("Give EXP", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20))) + if(ImGui::Button("Give exp", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20))) { SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter(); if (p_appc != NULL) @@ -254,39 +308,9 @@ namespace DX11_Base { } } //Creadit Kaotic13 - if (ImGui::Button("Givefirst 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) { - SDK::UPalItemContainerMultiHelper* InventoryMultiHelper = InventoryData->InventoryMultiHelper; - if (InventoryMultiHelper != NULL) { - SDK::TArray Containers = InventoryMultiHelper->Containers; - if (Containers.Num() == 0) { - return; - } - - SDK::UPalItemSlot* FirstSlot = Containers[0]->Get(0); - - if (FirstSlot != NULL) - { - SDK::FPalItemId FirstItemId = FirstSlot->GetItemId(); - int32 StackCount = FirstSlot->GetStackCount(); - InventoryData->RequestAddItem(FirstItemId.StaticId, StackCount * Config.Item, true); - } - } - } - } - } - } - } + + + } void TABConfig() {