Merge branch 'master' into master

This commit is contained in:
Sven Bledt 2024-01-26 06:56:05 +01:00 committed by GitHub
commit 1229d6262c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 106 additions and 99 deletions

View File

@ -7,13 +7,11 @@ config Config;
Tick TickFunc;
Tick OldTickFunc;
GetAllPlayer GetAllPlayerFunc;
GetAllPlayer OldGetAllPlayerFunc;
void config::Update(const char* filterText)
{
Config.db_filteredItems.clear();
const auto& itemsToSearch = Config.matchDbItems ? database::db_items : database::db_pals;
const auto& itemsToSearch = database::db_items;
for (const auto& itemName : itemsToSearch) {
if (strstr(itemName.c_str(), filterText) != nullptr) {
@ -23,15 +21,7 @@ void config::Update(const char* filterText)
std::sort(Config.db_filteredItems.begin(), Config.db_filteredItems.end());
}
const std::vector<std::string>& config::GetFilteredItems(){ return Config.db_filteredItems; }
void DetourPlayers(SDK::UPalCharacterImportanceManager* i_this, SDK::TArray<SDK::APalCharacter*>* OutArray)
{
Config.UCIM = i_this;
if(i_this->PlayerList.IsValid())
{
Config.AllPlayers = i_this->PlayerList_ForOutsideGet;
}
return OldGetAllPlayerFunc(i_this, OutArray);
}
bool DetourTick(SDK::APalPlayerCharacter* m_this,float DeltaSecond)
{
if (m_this->GetPalPlayerController() != NULL)
@ -64,14 +54,7 @@ SDK::APalPlayerCharacter* config::GetPalPlayerCharacter()
return nullptr;
}
SDK::TArray<SDK::APalPlayerCharacter*> config::GetTAllPlayers()
{
if (Config.AllPlayers.IsValid())
{
return Config.AllPlayers;
}
return NULL;
}
void config::Init()
{
@ -79,10 +62,9 @@ void config::Init()
Config.ClientBase = (DWORD64)GetModuleHandleA("PalWorld-Win64-Shipping.exe");
TickFunc = (Tick)(Config.ClientBase + Config.offset_Tick);
GetAllPlayerFunc = (GetAllPlayer)(Config.ClientBase + Config.offset_GetAllPlayers);
MH_CreateHook(TickFunc, DetourTick, reinterpret_cast<void**>(&OldTickFunc));
MH_CreateHook(GetAllPlayerFunc, DetourPlayers, reinterpret_cast<void**>(&OldGetAllPlayerFunc));
//init database
ZeroMemory(&Config.db_filteredItems, sizeof(Config.db_filteredItems));
}

View File

@ -5,15 +5,15 @@
#include "SDK.hpp"
typedef bool(*Tick)(SDK::APalPlayerCharacter* m_this,float DeltaSecond);
typedef void(*GetAllPlayer)(SDK::UPalCharacterImportanceManager* i_this, SDK::TArray<SDK::APalCharacter*>* OutArray);
typedef void(*AddStatus)(SDK::UPalNetworkIndividualComponent* p_this, SDK::FPalInstanceID* ID, SDK::TArray<SDK::FPalGotStatusPoint>* AddStatusPointArray);
class config
{
public:
//offsets
DWORD64 ClientBase = 0;
DWORD64 offset_Tick = 0x2AB44D0;//APalPlayerCharacter::Tick
DWORD64 offset_GetAllPlayers = 0x2962330;// UPalCharacterImportanceManager::GetAllPlayer
DWORD64 offset_Tick = 0x2A9E9D0;//APalPlayerCharacter::Tick
DWORD64 offset_AddStatus = 0x2B0E960; //UPalNetworkIndividualComponent::AddPlayerCharacterStatusPoint_ToServer
//check
bool IsESP = false;
bool IsAimbot = false;
@ -28,19 +28,17 @@ public:
bool IsMonster = false;
bool IsQuick = false;
bool matchDbItems = true;
bool isEq = false;
//def and value
float SpeedModiflers = 1.0f;
int DamageUp = 0;
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;
int PalNum = 1;
char inputTextBuffer[255] = "";
int EqModifiler = 1;
SDK::APalPlayerCharacter* localPlayer = NULL;
SDK::TArray<SDK::APalPlayerCharacter*> AllPlayers = {};
SDK::UPalCharacterImportanceManager* UCIM = NULL;

View File

@ -824,7 +824,7 @@ namespace database
"FriedKelpie",
"Chowder",
};
static std::vector<std::string> db_pals =
/*static std::vector<std::string> db_pals =
{
"Alpaca",
"AmaterasuWolf",
@ -992,7 +992,7 @@ namespace database
"DessertBoss",
"VolcanoBoss",
"SnowBoss",
};
};*/
static std::string basic_items_stackable[15] =
{
"Wood",

View File

@ -2,6 +2,21 @@
#include "../include/Menu.hpp"
#include "SDK.hpp"
#include "config.h"
AddStatus Equi;
AddStatus OldEqui;
void DetourEqui(SDK::UPalNetworkIndividualComponent* p_this, SDK::FPalInstanceID* ID, SDK::TArray<SDK::FPalGotStatusPoint>* AddStatusPointArray)
{
if(AddStatusPointArray->IsValid())
{
for (int i = 0; i < AddStatusPointArray->Num(); i++)
{
(*AddStatusPointArray)[i].StatusPoint = -1 * Config.EqModifiler;
}
}
return;
}
int InputTextCallback(ImGuiInputTextCallbackData* data) {
char inputChar = data->EventChar;
@ -9,9 +24,63 @@ int InputTextCallback(ImGuiInputTextCallbackData* data) {
return 0;
}
SDK::FPalDebugOtomoPalInfo palinfo = SDK::FPalDebugOtomoPalInfo();
SDK::TArray<SDK::EPalWazaID> EA = { 0U };
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::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();
@ -23,43 +92,7 @@ void AddItem(SDK::UPalPlayerInventoryData* data,char* itemName, int count)
//Call
data->RequestAddItem(Name, count, true);
}
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 AnyWhereTP(SDK::FVector& vector,bool IsSafe)
{
if (!IsSafe)
{
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
{
@ -69,15 +102,6 @@ void AnyWhereTP(SDK::FVector& vector,bool IsSafe)
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)
@ -212,7 +236,7 @@ namespace DX11_Base {
ImGui::Checkbox("IsQuick", &Config.IsQuick);
ImGui::Checkbox("SafeTeleport", &Config.IsSafe);
//creadit
ImGui::Checkbox("PalIsMonster", &Config.IsMonster);
//ImGui::Checkbox("PalIsMonster", &Config.IsMonster);
ImGui::InputFloat3("Pos:", Config.Pos);
ImGui::InputInt("EXP:", &Config.EXP);
ImGui::InputText("Item Name", Config.ItemName,sizeof(Config.ItemName));
@ -240,11 +264,11 @@ namespace DX11_Base {
}
}
}
ImGui::InputText("Pal Name", Config.PalName, sizeof(Config.PalName));
if (!Config.IsMonster){ImGui::InputInt("Pal Rank", &Config.PalRank);}
if (Config.IsMonster) { ImGui::InputInt("Pal Count", &Config.PalNum); }
ImGui::InputInt("Pal lvl", &Config.PalLvL);
if (ImGui::Button("Spawn Pal", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
////ImGui::InputText("Pal Name", Config.PalName, sizeof(Config.PalName));
// //if (!Config.IsMonster){ImGui::InputInt("Pal Rank", &Config.PalRank);}
// //if (Config.IsMonster) { ImGui::InputInt("Pal Count", &Config.PalNum); }
// ImGui::InputInt("Pal lvl", &Config.PalLvL);
/*if (ImGui::Button("Spawn Pal", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
if (Config.GetPalPlayerCharacter() != NULL)
{
@ -260,8 +284,8 @@ namespace DX11_Base {
}
}
}
}
if (ImGui::Button("HomeTP", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
}*/
if (ImGui::Button("HomeTP", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
@ -283,7 +307,7 @@ namespace DX11_Base {
}
}
}
if (ImGui::Button("AnywhereTP", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
/* if (ImGui::Button("AnywhereTP", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
if (Config.GetPalPlayerCharacter()!= NULL)
{
@ -296,13 +320,13 @@ namespace DX11_Base {
}
}
}
}
if (ImGui::Button("ToggleFly", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
}*/
if (ImGui::Button("ToggleFly", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
Config.IsToggledFly = !Config.IsToggledFly;
ExploitFly(Config.IsToggledFly);
}
if (ImGui::Button("DeleteSelf", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
/*if (ImGui::Button("DeleteSelf", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
@ -315,8 +339,8 @@ namespace DX11_Base {
}
}
}
}
if (ImGui::Button("GodHealth", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20)))
}*/
if (ImGui::Button("GodHealth", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
if (p_appc != NULL)
@ -351,7 +375,12 @@ namespace DX11_Base {
}
}
}
if (ImGui::Button("Equivalent", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
{
Config.isEq = !Config.isEq;
ToggleEqui(Config.isEq);
}
ImGui::InputInt("EquiModifiler", &Config.EqModifiler);
}
void TABConfig()
{
@ -371,7 +400,7 @@ namespace DX11_Base {
}
void TABDatabase()
{
ImGui::Checkbox("IsItems", &Config.matchDbItems);
//ImGui::Checkbox("IsItems", &Config.matchDbItems);
ImGui::InputText("Filter", Config.inputTextBuffer, sizeof(Config.inputTextBuffer), ImGuiInputTextFlags_CallbackCharFilter, InputTextCallback);
@ -381,13 +410,11 @@ namespace DX11_Base {
for (const auto& itemName : filteredItems) {
if (ImGui::Button(itemName.c_str()))
{
if (Config.matchDbItems)
{
strcpy_s(Config.ItemName, itemName.c_str());
continue;
}
strcpy_s(Config.PalName, itemName.c_str());
//if (Config.matchDbItems) {}
//strcpy_s(Config.PalName, itemName.c_str());
}
}
}