From 588ebaed1ce148ed9e65aa002c2e74a796ebfb31 Mon Sep 17 00:00:00 2001 From: AtomBottle Date: Sun, 25 Jun 2023 23:59:32 +0800 Subject: [PATCH] v0.1 --- apex_dma/Game.cpp | 150 ++++-- apex_dma/Game.h | 8 +- apex_dma/Makefile | 2 +- apex_dma/Math.cpp | 15 +- apex_dma/Math.h | 11 +- apex_dma/Readme.md | 27 ++ apex_dma/apex_dma.cpp | 307 ++++++------ apex_dma/index.html | 120 +++++ apex_dma/offsets.h | 154 +++--- apex_guest/Client/Client/Client.vcxproj | 14 +- .../Client/Client/Client.vcxproj.filters | 6 +- apex_guest/Client/Client/imgui/imgui.h | 6 +- apex_guest/Client/Client/imgui/imgui_draw.cpp | 29 ++ .../Client/Client/imgui/imgui_widgets.cpp | 1 - apex_guest/Client/Client/main.cpp | 152 +++--- apex_guest/Client/Client/main.h | 6 +- apex_guest/Client/Client/overlay.cpp | 437 +++++++++++++++--- apex_guest/Client/Client/overlay.h | 11 +- apex_guest/Overlay/Overlay/Overlay.vcxproj | 7 +- apex_guest/Overlay/Overlay/main.cpp | 12 +- 20 files changed, 1010 insertions(+), 465 deletions(-) create mode 100644 apex_dma/Readme.md create mode 100644 apex_dma/index.html diff --git a/apex_dma/Game.cpp b/apex_dma/Game.cpp index 4ba9e68..072b92e 100644 --- a/apex_dma/Game.cpp +++ b/apex_dma/Game.cpp @@ -2,8 +2,10 @@ extern Memory apex_mem; +int miss = 0; + extern bool firing_range; -float smooth = 12.0f; +float smooth = 85.0f; bool aim_no_recoil = true; int bone = 2; @@ -39,35 +41,90 @@ void get_class_name(uint64_t entity_ptr, char* out_str) apex_mem.ReadArray(client_class.pNetworkName, out_str, 32); } -void charge_rifle_hack(uint64_t entity_ptr) -{ - extern uint64_t g_Base; - extern bool shooting; - WeaponXEntity curweap = WeaponXEntity(); - curweap.update(entity_ptr); - float BulletSpeed = curweap.get_projectile_speed(); - int ammo = curweap.get_ammo(); - - if (ammo != 0 && BulletSpeed == 1 && shooting) - { - apex_mem.Write(g_Base + OFFSET_TIMESCALE + 0x68, std::numeric_limits::min()); - } - else - { - apex_mem.Write(g_Base + OFFSET_TIMESCALE + 0x68, 1.f); - } -} - int Entity::getTeamId() { return *(int*)(buffer + OFFSET_TEAM); } +int calc_level(int m_xp) +{ + if (m_xp<0) return 0; + if (m_xp<100) return 1; + if (m_xp<2750) return 2; + if (m_xp<6650) return 3; + if (m_xp<11400) return 4; + if (m_xp<17000) return 5; + if (m_xp<23350) return 6; + if (m_xp<30450) return 7; + if (m_xp<38300) return 8; + if (m_xp<46450) return 9; + if (m_xp<55050) return 10; + if (m_xp<64100) return 11; + if (m_xp<73600) return 12; + if (m_xp<83550) return 13; + if (m_xp<93950) return 14; + if (m_xp<104800) return 15; + if (m_xp<116100) return 16; + if (m_xp<127850) return 17; + if (m_xp<140050) return 18; + if (m_xp<152400) return 19; + if (m_xp<164900) return 20; + if (m_xp<177550) return 21; + if (m_xp<190350) return 22; + if (m_xp<203300) return 23; + if (m_xp<216400) return 24; + if (m_xp<229650) return 25; + if (m_xp<243050) return 26; + if (m_xp<256600) return 27; + if (m_xp<270300) return 28; + if (m_xp<284150) return 29; + if (m_xp<298150) return 30; + if (m_xp<312300) return 31; + if (m_xp<326600) return 32; + if (m_xp<341050) return 33; + if (m_xp<355650) return 34; + if (m_xp<370400) return 35; + if (m_xp<385300) return 36; + if (m_xp<400350) return 37; + if (m_xp<415550) return 38; + if (m_xp<430900) return 39; + if (m_xp<446400) return 40; + if (m_xp<462050) return 41; + if (m_xp<477850) return 42; + if (m_xp<493800) return 43; + if (m_xp<509900) return 44; + if (m_xp<526150) return 45; + if (m_xp<542550) return 46; + if (m_xp<559100) return 47; + if (m_xp<575800) return 48; + if (m_xp<592650) return 49; + if (m_xp<609650) return 50; + if (m_xp<626800) return 51; + if (m_xp<644100) return 52; + if (m_xp<661550) return 53; + if (m_xp<679150) return 54; + if (m_xp<696900) return 55; + if (m_xp<714800) return 56; + return floor((m_xp-714800+1)/18000) + 57; +} + int Entity::getHealth() { return *(int*)(buffer + OFFSET_HEALTH); } +int Entity::getArmortype() +{ + int armortype; + apex_mem.Read(ptr + OFFSET_ARMOR_TYPE, armortype); + return armortype; +} + +int Entity::getMaxshield() +{ + return *(int*)(buffer + OFFSET_MAXSHIELD); +} + int Entity::getShield() { return *(int*)(buffer + OFFSET_SHIELD); @@ -283,7 +340,7 @@ float CalculateFov(Entity& from, Entity& target) return Math::GetFov(ViewAngles, Angle); } -QAngle CalculateBestBoneAim(Entity& from, uintptr_t t, float max_fov) +QAngle CalculateBestBoneAim(Entity& from, uintptr_t t, float max_fov , int recoil_val) { Entity target = getEntity(t); if(firing_range) @@ -310,10 +367,10 @@ QAngle CalculateBestBoneAim(Entity& from, uintptr_t t, float max_fov) float BulletSpeed = curweap.get_projectile_speed(); float BulletGrav = curweap.get_projectile_gravity(); float zoom_fov = curweap.get_zoom_fov(); - + //printf("%f \n", zoom_fov); if (zoom_fov != 0.0f && zoom_fov != 1.0f) { - max_fov *= zoom_fov/90.0f; + //max_fov *= zoom_fov/90.0f; } /* @@ -344,12 +401,33 @@ QAngle CalculateBestBoneAim(Entity& from, uintptr_t t, float max_fov) } if (CalculatedAngles == QAngle(0, 0, 0)) - CalculatedAngles = Math::CalcAngle(LocalCamera, TargetBonePosition); + + { + float random1 = (float)(rand() % 7 + 1)/100; + float random2 = (float)(rand() % 7 + 1)/100; + Vector start = LocalCamera; + Vector end = TargetBonePosition; + Vector dir = (end - start).Normalize(); + Vector mid1 = start + (dir * ((end - start).Length() * (0.33f + random1))); + Vector mid2 = start + (dir * ((end - start).Length() * (0.67f + random2))); + mid1.z += 25.f; + mid2.z += 25.f; + + // Calculate aim angle using the final intermediate point + Vector aim = Math::Bezier(start, mid1, mid2, end, 0.5f + random2); + CalculatedAngles = Math::CalcAngle(LocalCamera, aim); + } + QAngle ViewAngles = from.GetViewAngles(); QAngle SwayAngles = from.GetSwayAngles(); //remove sway and recoil - if(aim_no_recoil) - CalculatedAngles-=SwayAngles-ViewAngles; + if(aim_no_recoil){ + QAngle sway = SwayAngles - ViewAngles; + sway.x = sway.x * recoil_val; //pitch + sway.y = sway.y * recoil_val; //yaw + sway.z = sway.z * recoil_val; + CalculatedAngles-=sway; + } Math::NormalizeAngles(CalculatedAngles); QAngle Delta = CalculatedAngles - ViewAngles; double fov = Math::GetFov(SwayAngles, CalculatedAngles); @@ -360,7 +438,25 @@ QAngle CalculateBestBoneAim(Entity& from, uintptr_t t, float max_fov) Math::NormalizeAngles(Delta); - QAngle SmoothedAngles = ViewAngles + Delta/smooth; + QAngle RandomAngles = QAngle( + (rand() % 5 - 4) * 0.001f, + (rand() % 5 - 4) * 0.001f, + (rand() % 5 - 4) * 0.001f + ); + QAngle RandomAnglesMax = QAngle( + (rand() % 8 - 4) * 0.001f, + (rand() % 8 - 4) * 0.001f, + (rand() % 8 - 4) * 0.001f + ); + miss = rand() % 100; + QAngle SmoothedAngles = ViewAngles + Delta/smooth + RandomAngles; + if(miss >= 60){ + QAngle SmoothedAngles = ViewAngles + Delta/smooth + RandomAnglesMax; + } + else if(miss <= 50){ + QAngle SmoothedAngles = ViewAngles + Delta/smooth + RandomAngles; + } + return SmoothedAngles; } diff --git a/apex_dma/Game.h b/apex_dma/Game.h index 7b3c4bc..4a5f04c 100644 --- a/apex_dma/Game.h +++ b/apex_dma/Game.h @@ -29,6 +29,8 @@ public: int getTeamId(); int getHealth(); int getShield(); + int getArmortype(); + int getMaxshield(); bool isGlowing(); bool isZooming(); Vector getAbsVelocity(); @@ -92,6 +94,8 @@ Entity getEntity(uintptr_t ptr); Item getItem(uintptr_t ptr); bool WorldToScreen(Vector from, float* m_vMatrix, int targetWidth, int targetHeight, Vector& to); float CalculateFov(Entity& from, Entity& target); -QAngle CalculateBestBoneAim(Entity& from, uintptr_t target, float max_fov); +QAngle CalculateBestBoneAim(Entity& from, uintptr_t target, float max_fov , int recoil_val); void get_class_name(uint64_t entity_ptr, char* out_str); -void charge_rifle_hack(uint64_t entity_ptr); \ No newline at end of file +void charge_rifle_hack(uint64_t entity_ptr); + +int calc_level(int m_xp); diff --git a/apex_dma/Makefile b/apex_dma/Makefile index 6ed390b..f443389 100644 --- a/apex_dma/Makefile +++ b/apex_dma/Makefile @@ -1,6 +1,6 @@ CXX=g++ CXXFLAGS=-I./memflow_lib/memflow-win32-ffi/ -I./memflow_lib/memflow-ffi/ -L./memflow_lib/target/release -Wno-multichar -LIBS=-lm -Wl,--no-as-needed -ldl -lpthread -l:libmemflow_win32_ffi.a +LIBS=-lm -Wl,--no-as-needed -ldl -lpthread -l:libmemflow_win32_ffi.a -lcurl -l:libjsoncpp.so OUTDIR=./build OBJDIR=$(OUTDIR)/obj diff --git a/apex_dma/Math.cpp b/apex_dma/Math.cpp index 9089c2b..f339e11 100644 --- a/apex_dma/Math.cpp +++ b/apex_dma/Math.cpp @@ -15,6 +15,19 @@ void Math::NormalizeAngles(QAngle& angle) angle.y += 360.f; } +Vector Math::Bezier(const Vector& start, const Vector& mid1, const Vector& mid2, const Vector& end, float t) +{ + Vector q1 = start + (mid1 - start) * t; + Vector q2 = mid1 + (mid2 - mid1) * t; + Vector q3 = mid2 + (end - mid2) * t; + + Vector r1 = q1 + (q2 - q1) * t; + Vector r2 = q2 + (q3 - q2) * t; + + return r1 + (r2 - r1) * t; + return Vector(); +} + QAngle Math::CalcAngle(const Vector& src, const Vector& dst) { QAngle angle = QAngle(); @@ -41,4 +54,4 @@ double Math::GetFov(const QAngle& viewAngle, const QAngle& aimAngle) double Math::DotProduct(const Vector& v1, const float* v2) { return v1.x * v2[0] + v1.y * v2[1] + v1.z * v2[2]; -} \ No newline at end of file +} diff --git a/apex_dma/Math.h b/apex_dma/Math.h index 3796e34..c8408a4 100644 --- a/apex_dma/Math.h +++ b/apex_dma/Math.h @@ -23,8 +23,9 @@ struct SVector namespace Math { - void NormalizeAngles(QAngle& angle); - double GetFov(const QAngle& viewAngle, const QAngle& aimAngle); - double DotProduct(const Vector& v1, const float* v2); - QAngle CalcAngle(const Vector& src, const Vector& dst); -} \ No newline at end of file + Vector Bezier(const Vector& start, const Vector& mid1, const Vector& mid2, const Vector& end, float t); + void NormalizeAngles(QAngle& angle); + double GetFov(const QAngle& viewAngle, const QAngle& aimAngle); + double DotProduct(const Vector& v1, const float* v2); + QAngle CalcAngle(const Vector& src, const Vector& dst); +} diff --git a/apex_dma/Readme.md b/apex_dma/Readme.md new file mode 100644 index 0000000..5e79f7f --- /dev/null +++ b/apex_dma/Readme.md @@ -0,0 +1,27 @@ +# apex_dma_kvm_pub +##### UnknownCheats thread: https://www.unknowncheats.me/forum/apex-legends/406426-kvm-vmread-apex-esp-aimbot.html +#new features + +- Xp level ESP +- seerhealthESP/smooth aimbot from https://kgithub.com/KrackerCo/apex_dma_kvm_pub. +- platform userid ESP,i also keep one html file,you can input uid to search player's rank,selcet legend. +> idont know why after i add rank ESP,the client will crash,but i keep void"GetJson", these code are paste from https://www.unknowncheats.me/forum/apex-legends/520061-rank-statistics-players.html, +if somebody can finish this work, +pull request please +- support UTF-8 ESP for japanese/chinese +- free camera +- client's stream proof,include commandline,you can change it to view offset in client's main.cpp + void ShowWindow +- you can enable aimbot/esp for your teammates +# how to use +## guest +- use vmprotect or rewrite your own version +- release x64, use custom overlay. +## linux + - install 'libcurl' and 'jsoncpp',if cant complie ,check the Makefile +#### Archlinux +` sudo pacman -S jsoncpp` +` sudo pacman -S curl` + - for rank esp, you need your own apikey,reg one from apexlegendsapi + - what's "add_off"? , host need it to read the setting of guest,it's in apex_dma.cpp + +* i have no time to teach about GPU passthrough or how to install this repo, because i only have a few time .....sorry of that* \ No newline at end of file diff --git a/apex_dma/apex_dma.cpp b/apex_dma/apex_dma.cpp index dfa881a..f79fd9e 100644 --- a/apex_dma/apex_dma.cpp +++ b/apex_dma/apex_dma.cpp @@ -5,6 +5,8 @@ #include #include #include +#include "json/json.h" +#include "curl/curl.h" #include #include "Game.h" #include @@ -12,12 +14,18 @@ Memory apex_mem; Memory client_mem; +uint64_t add_off = 0x411e0; + +bool freecam = false; +bool lockall_enable = false; + +int recoil = 0.5; bool firing_range = false; bool active = true; uintptr_t aimentity = 0; uintptr_t tmp_aimentity = 0; uintptr_t lastaimentity = 0; -float max = 999.0f; +float kmax = 999.0f; float max_dist = 200.0f*40.0f; int team_player = 0; float max_fov = 15; @@ -30,8 +38,6 @@ extern bool aim_no_recoil; bool aiming = false; extern float smooth; extern int bone; -bool thirdperson = false; -bool chargerifle = false; bool shooting = false; bool actions_t = false; @@ -41,9 +47,9 @@ bool vars_t = false; bool item_t = false; uint64_t g_Base; uint64_t c_Base; -bool next = false; +bool knext = false; bool valid = false; -bool lock = false; +bool klock = false; typedef struct player { @@ -59,6 +65,10 @@ typedef struct player bool visible = false; int health = 0; int shield = 0; + int xp_level = 0; + int maxshield = 0; + int armortype = 0; + uint64_t uid = 0; char name[33] = { 0 }; }player; @@ -67,14 +77,35 @@ struct Matrix float matrix[16]; }; -float lastvis_esp[toRead]; -float lastvis_aim[toRead]; +float lastvis_esp[toRead]; float lastvis_aim[toRead]; int tmp_spec = 0, spectators = 0; int tmp_all_spec = 0, allied_spectators = 0; ////////////////////////////////////////////////////////////////////////////////////////////////// +static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) +{ + ((std::string *)userp)->append((char *)contents, size * nmemb); + return size * nmemb; +} +std::string getJson(std::string url) +{ + CURL *curl; + CURLcode res; + std::string readBuffer; + curl = curl_easy_init(); + if (curl) + { + curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer); + res = curl_easy_perform(curl); + curl_easy_cleanup(curl); + } + return readBuffer; +} + void ProcessPlayer(Entity& LPlayer, Entity& target, uint64_t entitylist, int index) { int entity_team = target.getTeamId(); @@ -99,7 +130,7 @@ void ProcessPlayer(Entity& LPlayer, Entity& target, uint64_t entitylist, int ind float dist = LocalPlayerPosition.DistTo(EntityPosition); if (dist > max_dist) return; - if(!firing_range) + if(!firing_range && !lockall_enable) if (entity_team < 0 || entity_team>50 || entity_team == team_player) return; if(aim==2) @@ -107,9 +138,9 @@ void ProcessPlayer(Entity& LPlayer, Entity& target, uint64_t entitylist, int ind if((target.lastVisTime() > lastvis_aim[index])) { float fov = CalculateFov(LPlayer, target); - if (fov < max) + if (fov < kmax) { - max = fov; + kmax = fov; tmp_aimentity = target.ptr; } } @@ -124,9 +155,9 @@ void ProcessPlayer(Entity& LPlayer, Entity& target, uint64_t entitylist, int ind else { float fov = CalculateFov(LPlayer, target); - if (fov < max) + if (fov < kmax) { - max = fov; + kmax = fov; tmp_aimentity = target.ptr; } } @@ -139,47 +170,58 @@ void DoActions() while (actions_t) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); - bool tmp_thirdperson = false; - bool tmp_chargerifle = false; uint32_t counter = 0; while (g_Base!=0 && c_Base!=0) { std::this_thread::sleep_for(std::chrono::milliseconds(30)); + + uint64_t LocalPlayer = 0; + apex_mem.Read(g_Base + OFFSET_LOCAL_ENT, LocalPlayer); - uint64_t LocalPlayer = 0; - apex_mem.Read(g_Base + OFFSET_LOCAL_ENT, LocalPlayer); if (LocalPlayer == 0) continue; Entity LPlayer = getEntity(LocalPlayer); team_player = LPlayer.getTeamId(); - if (team_player < 0 || team_player>50) + if (team_player < 0 || team_player>50 && !lockall_enable) { continue; } - if(thirdperson && !tmp_thirdperson) - { - if(!aiming) - { - apex_mem.Write(g_Base + OFFSET_THIRDPERSON, 1); - apex_mem.Write(LPlayer.ptr + OFFSET_THIRDPERSON_SV, 1); - tmp_thirdperson = true; - } - } - else if((!thirdperson && tmp_thirdperson) || aiming) - { - if(tmp_thirdperson) - { - apex_mem.Write(g_Base + OFFSET_THIRDPERSON, -1); - apex_mem.Write(LPlayer.ptr + OFFSET_THIRDPERSON_SV, 0); - tmp_thirdperson = false; - } - } uint64_t entitylist = g_Base + OFFSET_ENTITYLIST; + + //an model index dumper,but sometimecarsh game + /* + uint64_t viewmodel_handle = 0; + apex_mem.Read(LocalPlayer + 0x2d78, viewmodel_handle); + viewmodel_handle &= 0xffff; + uint64_t viewmodel_entity = 0; + apex_mem.Read(entitylist + (viewmodel_handle << 5), viewmodel_entity); + m_currentFrame.modelIndex=0x00a8 + m_hViewModels=0x2d78 + m_ModelName=0x00a8 + apex_mem.Write(viewmodel_entity + 0x00a8, 975); + + index dumper + bool dump_loop = false; + if(model_index <= 2492 && dump_loop){ + uint64_t name_ptr; + char ModelName[200] = { 0 }; + model_index = model_index + 1; + apex_mem.Read(viewmodel_entity + 0x0030, name_ptr); + apex_mem.ReadArray(name_ptr, ModelName, 200); + printf("model: %s , index: %u \n", ModelName,model_index); + if (strstr(ModelName, "mdl/Weapons/arms/pov_pilot_light_wraith_cyber_ninja.rmdl")) + { + printf("%u\n", model_index); + dump_loop = false; + } + } + } + */ uint64_t baseent = 0; apex_mem.Read(entitylist, baseent); if (baseent == 0) @@ -187,10 +229,21 @@ void DoActions() continue; } - max = 999.0f; + kmax = 999.0f; tmp_aimentity = 0; tmp_spec = 0; tmp_all_spec = 0; + + int current_obid; + if (freecam){ + apex_mem.Write(LocalPlayer + OFFSET_OBSERVER_MODE, 7); + } + else{ + apex_mem.Read(LocalPlayer + OFFSET_OBSERVER_MODE, current_obid); + if(current_obid == 7){ + apex_mem.Write(LocalPlayer+OFFSET_OBSERVER_MODE, 0); + } + } if(firing_range) { int c=0; @@ -238,7 +291,7 @@ void DoActions() ProcessPlayer(LPlayer, Target, entitylist, i); int entity_team = Target.getTeamId(); - if (entity_team == team_player) + if (entity_team == team_player && !lockall_enable) { continue; } @@ -271,24 +324,10 @@ void DoActions() } } - if(!lock) + if(!klock) aimentity = tmp_aimentity; else aimentity = lastaimentity; - - if(chargerifle) - { - charge_rifle_hack(LocalPlayer); - tmp_chargerifle = true; - } - else - { - if(tmp_chargerifle) - { - apex_mem.Write(g_Base + OFFSET_TIMESCALE + 0x68, 1.f); - tmp_chargerifle = false; - } - } } } actions_t = false; @@ -315,8 +354,8 @@ static void EspLoop() apex_mem.Read(g_Base + OFFSET_LOCAL_ENT, LocalPlayer); if (LocalPlayer == 0) { - next = true; - while(next && g_Base!=0 && c_Base!=0 && esp) + knext = true; + while(knext && g_Base!=0 && c_Base!=0 && esp) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); } @@ -326,8 +365,8 @@ static void EspLoop() int team_player = LPlayer.getTeamId(); if (team_player < 0 || team_player>50) { - next = true; - while(next && g_Base!=0 && c_Base!=0 && esp) + knext = true; + while(knext && g_Base!=0 && c_Base!=0 && esp) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); } @@ -394,6 +433,14 @@ static void EspLoop() float boxMiddle = bs.x - (width / 2.0f); int health = Target.getHealth(); int shield = Target.getShield(); + int maxshield = Target.getMaxshield(); + int armortype = Target.getArmortype(); + int xp; + apex_mem.Read(centity + OFFSET_XP, xp); + int xp_level = calc_level(xp); + uint64_t uid = 0; + apex_mem.Read(centity + OFFSET_UID, uid); + players[c] = { dist, @@ -407,7 +454,11 @@ static void EspLoop() 0, (Target.lastVisTime() > lastvis_esp[c]), health, - shield + shield, + xp_level, + maxshield, + armortype, + uid }; Target.get_name(g_Base, i-1, &players[c].name[0]); lastvis_esp[c] = Target.lastVisTime(); @@ -445,9 +496,16 @@ static void EspLoop() } int entity_team = Target.getTeamId(); - if (entity_team < 0 || entity_team>50 || entity_team == team_player) - { - continue; + if (!lockall_enable){ + if (entity_team < 0 || entity_team>50 || entity_team == team_player) + { + continue; + } + } + else{ + if (entity_team < 0 || entity_team>50){ + continue; + } } Vector EntityPosition = Target.getPosition(); @@ -469,7 +527,15 @@ static void EspLoop() float boxMiddle = bs.x - (width / 2.0f); int health = Target.getHealth(); int shield = Target.getShield(); + int maxshield = Target.getMaxshield(); + int armortype = Target.getArmortype(); + int xp; + apex_mem.Read(centity + OFFSET_XP, xp); + int xp_level = calc_level(xp); + + uint64_t uid; + apex_mem.Read(centity + OFFSET_UID, uid); players[i] = { dist, @@ -483,7 +549,11 @@ static void EspLoop() Target.isKnocked(), (Target.lastVisTime() > lastvis_esp[i]), health, - shield + shield, + xp_level, + maxshield, + armortype, + uid }; Target.get_name(g_Base, i-1, &players[i].name[0]); lastvis_esp[i] = Target.lastVisTime(); @@ -492,8 +562,8 @@ static void EspLoop() } } - next = true; - while(next && g_Base!=0 && c_Base!=0 && esp) + knext = true; + while(knext && g_Base!=0 && c_Base!=0 && esp) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); } @@ -516,20 +586,20 @@ static void AimbotLoop() { if (aimentity == 0 || !aiming) { - lock=false; + klock=false; lastaimentity=0; continue; } - lock=true; + klock=true; lastaimentity = aimentity; uint64_t LocalPlayer = 0; apex_mem.Read(g_Base + OFFSET_LOCAL_ENT, LocalPlayer); if (LocalPlayer == 0) continue; Entity LPlayer = getEntity(LocalPlayer); - QAngle Angles = CalculateBestBoneAim(LPlayer, aimentity, max_fov); + QAngle Angles = CalculateBestBoneAim(LPlayer, aimentity, max_fov, recoil); if (Angles.x == 0 && Angles.y == 0) { - lock=false; + klock=false; lastaimentity=0; continue; } @@ -542,7 +612,7 @@ static void AimbotLoop() static void set_vars(uint64_t add_addr) { - printf("Reading client vars...\n"); + printf("Checking CLIENT...\n"); std::this_thread::sleep_for(std::chrono::milliseconds(50)); //Get addresses of client vars uint64_t check_addr = 0; @@ -585,14 +655,21 @@ static void set_vars(uint64_t add_addr) client_mem.Read(add_addr + sizeof(uint64_t)*18, chargerifle_addr); uint64_t shooting_addr = 0; client_mem.Read(add_addr + sizeof(uint64_t)*19, shooting_addr); - + uint64_t freecam_addr = 0; + client_mem.Read(add_addr + sizeof(uint64_t)*20, freecam_addr); + uint64_t lockall_addr = 0; + client_mem.Read(add_addr + sizeof(uint64_t)*21, lockall_addr); + uint64_t firing_range_addr=0; + client_mem.Read(add_addr + sizeof(uint64_t)*22, firing_range_addr); + uint64_t recoil_addr=0; + client_mem.Read(add_addr + sizeof(uint64_t)*23, recoil_addr); uint32_t check = 0; client_mem.Read(check_addr, check); if(check != 0xABCD) { - printf("Incorrect values read. Check if the add_off is correct. Quitting.\n"); + printf("check add_off,or start client before start host\n"); active = false; return; } @@ -603,7 +680,7 @@ static void set_vars(uint64_t add_addr) if(c_Base!=0 && g_Base!=0) { client_mem.Write(check_addr, 0); - printf("\nReady\n"); + printf("\nsuccess.\n"); } while(c_Base!=0 && g_Base!=0) @@ -623,11 +700,12 @@ static void set_vars(uint64_t add_addr) client_mem.Read(smooth_addr, smooth); client_mem.Read(max_fov_addr, max_fov); client_mem.Read(bone_addr, bone); - client_mem.Read(thirdperson_addr, thirdperson); client_mem.Read(shooting_addr, shooting); - client_mem.Read(chargerifle_addr, chargerifle); - - if(esp && next) + client_mem.Read(freecam_addr, freecam); + client_mem.Read(lockall_addr, lockall_enable); + client_mem.Read(firing_range_addr, firing_range); + client_mem.Read(recoil_addr, recoil); + if(esp && knext) { if(valid) client_mem.WriteArray(player_addr, players, toRead); @@ -641,85 +719,31 @@ static void set_vars(uint64_t add_addr) std::this_thread::sleep_for(std::chrono::milliseconds(1)); } while (next_val && g_Base!=0 && c_Base!=0); - next = false; + knext = false; } } } vars_t = false; } -static void item_glow_t() -{ - item_t = true; - while(item_t) - { - std::this_thread::sleep_for(std::chrono::milliseconds(1)); - int k = 0; - while(g_Base!=0 && c_Base!=0) - { - std::this_thread::sleep_for(std::chrono::milliseconds(1)); - uint64_t entitylist = g_Base + OFFSET_ENTITYLIST; - if (item_glow) - { - for (int i = 0; i < 10000; i++) - { - uint64_t centity = 0; - apex_mem.Read(entitylist + ((uint64_t)i << 5), centity); - if (centity == 0) continue; - Item item = getItem(centity); - - if(item.isItem() && !item.isGlowing()) - { - item.enableGlow(); - } - } - k=1; - std::this_thread::sleep_for(std::chrono::milliseconds(600)); - } - else - { - if(k==1) - { - for (int i = 0; i < 10000; i++) - { - uint64_t centity = 0; - apex_mem.Read(entitylist + ((uint64_t)i << 5), centity); - if (centity == 0) continue; - - Item item = getItem(centity); - - if(item.isItem() && item.isGlowing()) - { - item.disableGlow(); - } - } - k=0; - } - } - } - } - item_t = false; -} int main(int argc, char *argv[]) { if(geteuid() != 0) { - printf("Error: %s is not running as root\n", argv[0]); + printf("Error: %s please run in root\n", argv[0]); return 0; } - const char* cl_proc = "client_ap.exe"; + const char* cl_proc = "client.exe"; const char* ap_proc = "R5Apex.exe"; //const char* ap_proc = "EasyAntiCheat_launcher.exe"; - //Client "add" offset - uint64_t add_off = 0x3f880; + //uint64_t add_off = 0x40d20; std::thread aimbot_thr; std::thread esp_thr; std::thread actions_thr; - std::thread itemglow_thr; std::thread vars_thr; while(active) { @@ -730,34 +754,30 @@ int main(int argc, char *argv[]) aim_t = false; esp_t = false; actions_t = false; - item_t = false; g_Base = 0; aimbot_thr.~thread(); esp_thr.~thread(); actions_thr.~thread(); - itemglow_thr.~thread(); } std::this_thread::sleep_for(std::chrono::seconds(1)); - printf("Searching for apex process...\n"); + printf("Wating for apex process...\n"); apex_mem.open_proc(ap_proc); if(apex_mem.get_proc_status() == process_status::FOUND_READY) { g_Base = apex_mem.get_proc_baseaddr(); - printf("\nApex process found\n"); - printf("Base: %lx\n", g_Base); + printf("\nFounded Apex!\n"); aimbot_thr = std::thread(AimbotLoop); esp_thr = std::thread(EspLoop); actions_thr = std::thread(DoActions); - itemglow_thr = std::thread(item_glow_t); + aimbot_thr.detach(); esp_thr.detach(); actions_thr.detach(); - itemglow_thr.detach(); } } else @@ -776,15 +796,14 @@ int main(int argc, char *argv[]) } std::this_thread::sleep_for(std::chrono::seconds(1)); - printf("Searching for client process...\n"); + printf("Waiting for client...\n"); client_mem.open_proc(cl_proc); if(client_mem.get_proc_status() == process_status::FOUND_READY) { c_Base = client_mem.get_proc_baseaddr(); - printf("\nClient process found\n"); - printf("Base: %lx\n", c_Base); + printf("\nFounded client!\n"); vars_thr = std::thread(set_vars, c_Base + add_off); vars_thr.detach(); @@ -799,4 +818,4 @@ int main(int argc, char *argv[]) } return 0; -} \ No newline at end of file +} diff --git a/apex_dma/index.html b/apex_dma/index.html new file mode 100644 index 0000000..9517c34 --- /dev/null +++ b/apex_dma/index.html @@ -0,0 +1,120 @@ + + + + + + + + + +

ApexApi tool

+ + + + + + + + +
+ + + + + + diff --git a/apex_dma/offsets.h b/apex_dma/offsets.h index 2f86252..19c48e7 100644 --- a/apex_dma/offsets.h +++ b/apex_dma/offsets.h @@ -1,102 +1,52 @@ -#define ORIGIN 1 -#define STEAM 2 - -#define VERSION STEAM - -#if VERSION == STEAM - - #define OFFSET_ENTITYLIST 0x1d88fc8 - #define OFFSET_LOCAL_ENT 0x0213a5c0 + 0x8 //.?AVC_GameMovement@@ + 0x8 - #define OFFSET_NAME_LIST 0xbd28ca0 - #define OFFSET_THIRDPERSON 0x01d18740 + 0x6c //thirdperson_override + 0x6c - #define OFFSET_TIMESCALE 0x016cdc80 //host_timescale - - #define OFFSET_TEAM 0x044c //m_iTeamNum - #define OFFSET_HEALTH 0x043c //m_iHealth - #define OFFSET_SHIELD 0x170 //m_shieldHealth - #define OFFSET_NAME 0x589 //m_iName - #define OFFSET_SIGN_NAME 0x580 //m_iSignifierName - #define OFFSET_ABS_VELOCITY 0x140 //m_vecAbsVelocity - #define OFFSET_VISIBLE_TIME 0x1a80 //CPlayer!lastVisibleTime - #define OFFSET_ZOOMING 0x1c61 //m_bZooming - #define OFFSET_THIRDPERSON_SV 0x36e0 //m_thirdPersonShoulderView - #define OFFSET_YAW 0x22c4 - 0x8 //m_currentFramePlayer.m_ammoPoolCount - 0x8 - - #define OFFSET_LIFE_STATE 0x798 //m_lifeState, >0 = dead - #define OFFSET_BLEED_OUT_STATE 0x2750 //m_bleedoutState, >0 = knocked - - #define OFFSET_ORIGIN 0x014c //m_vecAbsOrigin - #define OFFSET_BONES 0x0e98 + 0x48 //m_nForceBone + 0x48 - #define OFFSET_STUDIOHDR 0x10f0 //CBaseAnimating!m_pStudioHdr - #define OFFSET_AIMPUNCH 0x24c0 //m_currentFrameLocalPlayer.m_vecPunchWeapon_Angle - #define OFFSET_CAMERAPOS 0x1f58 //CPlayer!camera_origin - #define OFFSET_VIEWANGLES 0x25bc - 0x14 //m_ammoPoolCapacity - 0x14 - #define OFFSET_BREATH_ANGLES OFFSET_VIEWANGLES - 0x10 - #define OFFSET_OBSERVER_MODE 0x34ec //m_iObserverMode - #define OFFSET_OBSERVING_TARGET 0x34f8 //m_hObserverTarget - - #define OFFSET_MATRIX 0x11a350 - #define OFFSET_RENDER 0x7401cd0 - - #define OFFSET_WEAPON 0x1a24 //m_latestPrimaryWeapons - #define OFFSET_BULLET_SPEED 0x1f50 //CWeaponX!m_flProjectileSpeed - #define OFFSET_BULLET_SCALE 0x1f58 //CWeaponX!m_flProjectileScale - #define OFFSET_ZOOM_FOV 0x16c0 + 0xb8 //m_playerData + m_curZoomFOV - #define OFFSET_AMMO 0x1644 //m_ammoInClip - - #define OFFSET_ITEM_GLOW 0x2c0 //m_highlightFunctionBits - - #define OFFSET_GLOW_T1 0x262 //16256 = enabled, 0 = disabled - #define OFFSET_GLOW_T2 0x2dc //1193322764 = enabled, 0 = disabled - #define OFFSET_GLOW_ENABLE 0x3c8 //7 = enabled, 2 = disabled - #define OFFSET_GLOW_THROUGH_WALLS 0x3d0 //2 = enabled, 5 = disabled - -#elif VERSION == ORIGIN - - #define OFFSET_ENTITYLIST 0x1d88fc8 - #define OFFSET_LOCAL_ENT 0x0213a5c0 + 0x8 //.?AVC_GameMovement@@ + 0x8 - #define OFFSET_NAME_LIST 0xbd28ca0 - #define OFFSET_THIRDPERSON 0x01d18740 + 0x6c //thirdperson_override + 0x6c - #define OFFSET_TIMESCALE 0x016cdc80 //host_timescale - - #define OFFSET_TEAM 0x044c //m_iTeamNum - #define OFFSET_HEALTH 0x043c //m_iHealth - #define OFFSET_SHIELD 0x170 //m_shieldHealth - #define OFFSET_NAME 0x589 //m_iName - #define OFFSET_SIGN_NAME 0x580 //m_iSignifierName - #define OFFSET_ABS_VELOCITY 0x140 //m_vecAbsVelocity - #define OFFSET_VISIBLE_TIME 0x1a80 //CPlayer!lastVisibleTime - #define OFFSET_ZOOMING 0x1c61 //m_bZooming - #define OFFSET_THIRDPERSON_SV 0x36e0 //m_thirdPersonShoulderView - #define OFFSET_YAW 0x22c4 - 0x8 //m_currentFramePlayer.m_ammoPoolCount - 0x8 - - #define OFFSET_LIFE_STATE 0x798 //m_lifeState, >0 = dead - #define OFFSET_BLEED_OUT_STATE 0x2750 //m_bleedoutState, >0 = knocked - - #define OFFSET_ORIGIN 0x014c //m_vecAbsOrigin - #define OFFSET_BONES 0x0e98 + 0x48 //m_nForceBone + 0x48 - #define OFFSET_STUDIOHDR 0x10f0 //CBaseAnimating!m_pStudioHdr - #define OFFSET_AIMPUNCH 0x24c0 //m_currentFrameLocalPlayer.m_vecPunchWeapon_Angle - #define OFFSET_CAMERAPOS 0x1f58 //CPlayer!camera_origin - #define OFFSET_VIEWANGLES 0x25bc - 0x14 //m_ammoPoolCapacity - 0x14 - #define OFFSET_BREATH_ANGLES OFFSET_VIEWANGLES - 0x10 - #define OFFSET_OBSERVER_MODE 0x34ec //m_iObserverMode - #define OFFSET_OBSERVING_TARGET 0x34f8 //m_hObserverTarget - - #define OFFSET_MATRIX 0x11a350 - #define OFFSET_RENDER 0x7401cd0 - - #define OFFSET_WEAPON 0x1a24 //m_latestPrimaryWeapons - #define OFFSET_BULLET_SPEED 0x1f50 //CWeaponX!m_flProjectileSpeed - #define OFFSET_BULLET_SCALE 0x1f58 //CWeaponX!m_flProjectileScale - #define OFFSET_ZOOM_FOV 0x16c0 + 0xb8 //m_playerData + m_curZoomFOV - #define OFFSET_AMMO 0x1644 //m_ammoInClip - - #define OFFSET_ITEM_GLOW 0x2c0 //m_highlightFunctionBits - - #define OFFSET_GLOW_T1 0x262 //16256 = enabled, 0 = disabled - #define OFFSET_GLOW_T2 0x2dc //1193322764 = enabled, 0 = disabled - #define OFFSET_GLOW_ENABLE 0x3c8 //7 = enabled, 2 = disabled - #define OFFSET_GLOW_THROUGH_WALLS 0x3d0 //2 = enabled, 5 = disabled - -#endif \ No newline at end of file +#define OFFSET_UID 0x25c8 //m_platformUserId +#define OFFSET_ARMOR_TYPE 0x4654 //m_armorType +#define OFFSET_MAXSHIELD 0x0174 //m_shieldhealthmax + +#define OFFSET_XP 0x36c4 //m_xp + +#define OFFSET_WEAPON 0x1a14 //m_latestPrimaryWeapons +#define OFFSET_WEAPON_NAME 0x1858 //m_weaponNameIndex 2nd one +#define OFFSET_ENTITYLIST 0x1e53c68 //cl_entitylist +#define OFFSET_LOCAL_ENT 0x22036C0 + 0x8 //.?AVC_GameMovement@@ + 0x8 +#define OFFSET_NAME_LIST 0xbe94be0 //NameList + +#define OFFSET_TEAM 0x044c //m_iTeamNum +#define OFFSET_HEALTH 0x043c //m_iHealth +#define OFFSET_SHIELD 0x170 //m_shieldHealth +#define OFFSET_NAME 0x589 //m_iName +#define OFFSET_SIGN_NAME 0x580 //m_iSignifierName +#define OFFSET_ABS_VELOCITY 0x140 //m_vecAbsVelocity +#define OFFSET_VISIBLE_TIME 0x1A70 //CPlayer!lastVisibleTime +#define OFFSET_ZOOMING 0x1c51 //m_bZooming +#define OFFSET_YAW 0x22bc - 0x8 //m_currentFramePlayer.m_ammoPoolCount - 0x8 + +#define OFFSET_LIFE_STATE 0x798 //m_lifeState, >0 = dead +#define OFFSET_BLEED_OUT_STATE 0x2750 //m_bleedoutState, >0 = knocked + +#define OFFSET_ORIGIN 0x014c //m_vecAbsOrigin +#define OFFSET_BONES 0x0e98 + 0x48 //m_nForceBone + 0x48 +#define OFFSET_STUDIOHDR 0x10e8 //CBaseAnimating!m_pStudioHdr +#define OFFSET_AIMPUNCH 0x24b8 //m_currentFrameLocalPlayer.m_vecPunchWeapon_Angle +#define OFFSET_CAMERAPOS 0x1f50 //CPlayer!camera_origin +#define OFFSET_VIEWANGLES 0x25b4 - 0x14 //m_ammoPoolCapacity - 0x14 +#define OFFSET_BREATH_ANGLES OFFSET_VIEWANGLES - 0x10 +#define OFFSET_OBSERVER_MODE 0x34f4 //m_iObserverMode +#define OFFSET_OBSERVING_TARGET 0x3500 //m_hObserverTarget + +#define OFFSET_MATRIX 0x11a350 //ViewMatrix +#define OFFSET_RENDER 0x743AB20 //ViewRender + +#define OFFSET_BULLET_SPEED 0x1f3c +#define OFFSET_BULLET_SCALE 0x1f44 +#define OFFSET_ZOOM_FOV 0x16b0 + 0xb8 //m_playerData + m_curZoomFOV +#define OFFSET_AMMO 0x1634 //m_ammoInClip //1634 + +#define OFFSET_ITEM_GLOW 0x2c0 //m_highlightFunctionBits + +#define OFFSET_GLOW_T1 0x262 //16256 = enabled, 0 = disabled +#define OFFSET_GLOW_T2 0x2dc //1193322764 = enabled, 0 = disabled +#define OFFSET_GLOW_ENABLE 0x3c8 //7 = enabled, 2 = disabled//for BH GLOW +#define OFFSET_GLOW_THROUGH_WALLS 0x3d0 //2 = enabled, 5 = disabled//for BH GLOW +#define GLOW_COLOR 0x1D0 // Script_CopyHighlightState 15th mov +#define OFFSET_GLOW_ENABLE_GLOW_CONTEXT OFFSET_GLOW_ENABLE // Script_Highlight_SetCurrentContext +#define OFFSET_GLOW_THROUGH_WALLS_GLOW_VISIBLE_TYPE OFFSET_GLOW_THROUGH_WALLS // Script_Highlight_SetVisibilityType 5th mov diff --git a/apex_guest/Client/Client/Client.vcxproj b/apex_guest/Client/Client/Client.vcxproj index 05592a4..ce645af 100644 --- a/apex_guest/Client/Client/Client.vcxproj +++ b/apex_guest/Client/Client/Client.vcxproj @@ -22,14 +22,15 @@ Application true - v142 + v143 Unicode false + Static Application false - v142 + v143 true Unicode false @@ -54,9 +55,8 @@ false - $(VC_IncludePath);$(WindowsSDK_IncludePath) - $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) - client_ap + C:\Users\ray\Downloads\apex\Client\Client\jsoncpp\lib;C:\Users\ray\Downloads\apex\Client\Client\curl\lib;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + client @@ -66,6 +66,7 @@ true _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true + MultiThreaded Console @@ -82,8 +83,9 @@ true true true - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;%(PreprocessorDefinitions) true + MultiThreadedDLL Console diff --git a/apex_guest/Client/Client/Client.vcxproj.filters b/apex_guest/Client/Client/Client.vcxproj.filters index 274f8dd..71962b7 100644 --- a/apex_guest/Client/Client/Client.vcxproj.filters +++ b/apex_guest/Client/Client/Client.vcxproj.filters @@ -70,12 +70,12 @@ Headers\imgui - - Headers - Headers\imgui + + Headers + diff --git a/apex_guest/Client/Client/imgui/imgui.h b/apex_guest/Client/Client/imgui/imgui.h index f260639..e737e59 100644 --- a/apex_guest/Client/Client/imgui/imgui.h +++ b/apex_guest/Client/Client/imgui/imgui.h @@ -2447,6 +2447,10 @@ struct ImDrawList IMGUI_API void AddBezierCubic(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness, int num_segments = 0); // Cubic Bezier (4 control points) IMGUI_API void AddBezierQuadratic(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col, float thickness, int num_segments = 0); // Quadratic Bezier (3 control points) + //Seer + IMGUI_API void AddHexagon(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p5, const ImVec2& p6, ImU32 col, float thickness = 1.0f); + IMGUI_API void AddHexagonFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p5, const ImVec2& p6, ImU32 col); + // Image primitives // - Read FAQ to understand what ImTextureID is. // - "p_min" and "p_max" represent the upper-left and lower-right corners of the rectangle. @@ -2908,4 +2912,4 @@ enum ImDrawCornerFlags_ #include "imgui_user.h" #endif -#endif // #ifndef IMGUI_DISABLE +#endif // #ifndef IMGUI_DISABLE \ No newline at end of file diff --git a/apex_guest/Client/Client/imgui/imgui_draw.cpp b/apex_guest/Client/Client/imgui/imgui_draw.cpp index 30b100b..3af5aa7 100644 --- a/apex_guest/Client/Client/imgui/imgui_draw.cpp +++ b/apex_guest/Client/Client/imgui/imgui_draw.cpp @@ -1383,6 +1383,35 @@ void ImDrawList::AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float th PathStroke(col, 0, thickness); } +//Seer +void ImDrawList::AddHexagon(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p5, const ImVec2& p6, ImU32 col, float thickness) +{ + if ((col & IM_COL32_A_MASK) == 0) + return; + + PathLineTo(p1); + PathLineTo(p2); + PathLineTo(p3); + PathLineTo(p4); + PathLineTo(p5); + PathLineTo(p6); + PathStroke(col, ImDrawFlags_Closed, thickness); +} + +void ImDrawList::AddHexagonFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p5, const ImVec2& p6, ImU32 col) +{ + if ((col & IM_COL32_A_MASK) == 0) + return; + + PathLineTo(p1); + PathLineTo(p2); + PathLineTo(p3); + PathLineTo(p4); + PathLineTo(p5); + PathLineTo(p6); + PathFillConvex(col); +} + // p_min = upper-left, p_max = lower-right // Note we don't render 1 pixels sized rectangles properly. void ImDrawList::AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding, ImDrawFlags flags, float thickness) diff --git a/apex_guest/Client/Client/imgui/imgui_widgets.cpp b/apex_guest/Client/Client/imgui/imgui_widgets.cpp index 7da069b..2a3e59d 100644 --- a/apex_guest/Client/Client/imgui/imgui_widgets.cpp +++ b/apex_guest/Client/Client/imgui/imgui_widgets.cpp @@ -1066,7 +1066,6 @@ bool ImGui::ImageButton(ImTextureID user_texture_id, const ImVec2& size, const I const ImVec2 padding = (frame_padding >= 0) ? ImVec2((float)frame_padding, (float)frame_padding) : g.Style.FramePadding; return ImageButtonEx(id, user_texture_id, size, uv0, uv1, padding, bg_col, tint_col); } - bool ImGui::Checkbox(const char* label, bool* v) { ImGuiWindow* window = GetCurrentWindow(); diff --git a/apex_guest/Client/Client/main.cpp b/apex_guest/Client/Client/main.cpp index f54d1f1..8ad512f 100644 --- a/apex_guest/Client/Client/main.cpp +++ b/apex_guest/Client/Client/main.cpp @@ -14,38 +14,57 @@ typedef struct player bool visible = false; int health = 0; int shield = 0; + int xp_level = 0; + int maxshield = 0; + int armortype = 0; + uint64_t uid = 0; char name[33] = { 0 }; }player; - + uint32_t check = 0xABCD; +//VK_XBUTTON2=�ϲ�� //VK_XBUTTON1 = �²�� +int aim_key = VK_XBUTTON2; +int aim_key2 = VK_XBUTTON1; -int aim_key = VK_RBUTTON; int shoot_key = VK_LBUTTON; -bool use_nvidia = true; + +float scale = 1.4f; +bool firing_range; +int offset = 0; +bool use_nvidia = false; bool active = true; bool ready = false; extern visuals v; -int aim = 0; //read -bool esp = false; //read +int aim = 2; //read + +bool freecam = false;//read +bool lockall_mode = false; //read + +int recoil_100 = 75; +int recoil = 0.5; +bool esp = true; //read bool item_glow = false; bool player_glow = false; bool aim_no_recoil = true; bool aiming = false; //read uint64_t g_Base = 0; //write -float max_dist = 200.0f * 40.0f; //read -float smooth = 12.0f; -float max_fov = 15.0f; -int bone = 2; +float max_dist = 650.0f * 40.0f; //read +float seer_dist = 400.0 * 40.0f; +float smooth = 85.0f; +float max_fov = 20.0f; +int bone = 3; bool thirdperson = false; int spectators = 0; //write int allied_spectators = 0; //write bool chargerifle = false; bool shooting = false; //read + +int index = 0; bool valid = false; //write bool next = false; //read write -uint64_t add[20]; +uint64_t add[24]; bool k_f5 = 0; bool k_f6 = 0; @@ -55,9 +74,7 @@ bool IsKeyDown(int vk) { return (GetAsyncKeyState(vk) & 0x8000) != 0; } - player players[100]; - void Overlay::RenderEsp() { next = false; @@ -79,8 +96,14 @@ void Overlay::RenderEsp() { if (players[i].health > 0) { + //xp and userid + std::string rankstr = std::to_string(players[i].xp_level); + rankstr = rankstr.substr(0, rankstr.find('.')) + u8"��( uid:" + std::to_string(players[i].uid) + u8")"; + + //DISTENCE + teamnum std::string distance = std::to_string(players[i].dist / 39.62); - distance = distance.substr(0, distance.find('.')) + "m(" + std::to_string(players[i].entity_team) + ")"; + distance = distance.substr(0, distance.find('.')) + u8"��(" + std::to_string(players[i].entity_team) + u8"С��)"; +; if (v.box) { if (players[i].visible) @@ -96,7 +119,7 @@ void Overlay::RenderEsp() } } - if(v.line) + if (v.line) DrawLine(ImVec2((float)(getWidth() / 2), (float)getHeight()), ImVec2(players[i].b_x, players[i].b_y), BLUE, 1); //LINE FROM MIDDLE SCREEN if (v.distance) @@ -104,16 +127,18 @@ void Overlay::RenderEsp() if (players[i].knocked) String(ImVec2(players[i].boxMiddle, (players[i].b_y + 1)), RED, distance.c_str()); //DISTANCE else - String(ImVec2(players[i].boxMiddle, (players[i].b_y + 1)), GREEN, distance.c_str()); //DISTANCE + String(ImVec2(players[i].boxMiddle, (players[i].b_y + 1)), WHITE , distance.c_str()); //DISTANCE } - if(v.healthbar) - ProgressBar((players[i].b_x - (players[i].width / 2.0f) - 4), (players[i].b_y - players[i].height), 3, players[i].height, players[i].health, 100); //health bar - if (v.shieldbar) - ProgressBar((players[i].b_x + (players[i].width / 2.0f) + 1), (players[i].b_y - players[i].height), 3, players[i].height, players[i].shield, 125); //shield bar - + //esp stuff of shield bar/ bar color + if(v.healthbar && players[i].dist < seer_dist) + DrawHealth((players[i].b_x - (players[i].width / 2.0f) + 5), (players[i].b_y - players[i].height - 10), players[i].shield, players[i].maxshield, players[i].armortype, players[i].health); + //���� if(v.name) String(ImVec2(players[i].boxMiddle, (players[i].b_y - players[i].height - 15)), WHITE, players[i].name); + if (v.renderrank) { + String(ImVec2((players[i].b_x - (players[i].width / 2.0f) + 5), (players[i].b_y - players[i].height - 45)), WHITE, rankstr.c_str()); + } } } @@ -122,8 +147,10 @@ void Overlay::RenderEsp() } } + int main(int argc, char** argv) { + ShowWindow(GetForegroundWindow(), 0); add[0] = (uintptr_t)✓ add[1] = (uintptr_t)&aim; add[2] = (uintptr_t)&esp; @@ -144,13 +171,15 @@ int main(int argc, char** argv) add[17] = (uintptr_t)&allied_spectators; add[18] = (uintptr_t)&chargerifle; add[19] = (uintptr_t)&shooting; + add[20] = (uintptr_t)&freecam; + add[21] = (uintptr_t)&lockall_mode; + add[22] = (uintptr_t)&firing_range; + add[23] = (uintptr_t)&recoil; - - printf(XorStr("add offset: 0x%I64x\n"), (uint64_t)&add[0] - (uint64_t)GetModuleHandle(NULL)); - + printf(XorStr("offset: 0x%I64x\n"), (uint64_t)&add[0] - (uint64_t)GetModuleHandle(NULL)); Overlay ov1 = Overlay(); ov1.Start(); - printf(XorStr("Waiting for host process...\n")); + printf(XorStr("Waiting for host/apex...\n")); while (check == 0xABCD) { if (IsKeyDown(VK_F4)) @@ -163,87 +192,32 @@ int main(int argc, char** argv) if (active) { ready = true; - printf(XorStr("Ready\n")); + printf(XorStr("Successful\n")); } while (active) { - std::this_thread::sleep_for(std::chrono::milliseconds(1)); + recoil = recoil_100 / 100; if (IsKeyDown(VK_F4)) { active = false; } - - if (IsKeyDown(VK_F5) && k_f5 == 0) - { - k_f5 = 1; - esp = !esp; - } - else if (!IsKeyDown(VK_F5) && k_f5 == 1) - { - k_f5 = 0; - } - - if (IsKeyDown(VK_F6) && k_f6 == 0) - { - k_f6 = 1; - switch (aim) - { - case 0: - aim = 1; - break; - case 1: - aim = 2; - break; - case 2: - aim = 0; - break; - default: - break; - } - } - else if (!IsKeyDown(VK_F6) && k_f6 == 1) - { - k_f6 = 0; - } - - if (IsKeyDown(VK_F8) && k_f8 == 0) - { - k_f8 = 1; - item_glow = !item_glow; - } - else if (!IsKeyDown(VK_F8) && k_f8 == 1) - { - k_f8 = 0; - } - - if (IsKeyDown(VK_LEFT)) - { - if (max_dist > 100.0f * 40.0f) - max_dist -= 50.0f * 40.0f; - std::this_thread::sleep_for(std::chrono::milliseconds(130)); - } - - if (IsKeyDown(VK_RIGHT)) - { - if (max_dist < 800.0f * 40.0f) - max_dist += 50.0f * 40.0f; - std::this_thread::sleep_for(std::chrono::milliseconds(130)); - } + std::this_thread::sleep_for(std::chrono::milliseconds(1)); if (IsKeyDown(aim_key)) aiming = true; else aiming = false; - - if (IsKeyDown(shoot_key)) - shooting = true; - else - shooting = false; + if (aim > 0) { + if (IsKeyDown(aim_key2)) + aim = 1; + else + aim = 2; + } } ready = false; ov1.Clear(); if(!use_nvidia) - system(XorStr("taskkill /F /T /IM overlay_ap.exe")); //custom overlay process name + system(XorStr("taskkill /F /T /IM ov.exe")); //custom overlay processname return 0; } \ No newline at end of file diff --git a/apex_guest/Client/Client/main.h b/apex_guest/Client/Client/main.h index 1ce8c52..bdb424b 100644 --- a/apex_guest/Client/Client/main.h +++ b/apex_guest/Client/Client/main.h @@ -7,4 +7,8 @@ #include #include "math.h" -#include "overlay.h" \ No newline at end of file +#include "overlay.h" + +#include +#include + diff --git a/apex_guest/Client/Client/overlay.cpp b/apex_guest/Client/Client/overlay.cpp index a21f42f..4b9baf8 100644 --- a/apex_guest/Client/Client/overlay.cpp +++ b/apex_guest/Client/Client/overlay.cpp @@ -2,20 +2,25 @@ extern int aim; extern bool esp; -extern bool item_glow; -extern bool player_glow; extern bool aim_no_recoil; extern bool ready; extern bool use_nvidia; extern float max_dist; +extern float seer_dist; extern float smooth; extern float max_fov; +extern float scale; extern int bone; extern bool thirdperson; extern int spectators; extern int allied_spectators; extern bool chargerifle; - +extern bool freecam; +extern bool lockall_mode; +extern bool display_spec; +extern bool firing_range; +extern int recoil_100; +extern int index; int width; int height; bool k_leftclick = false; @@ -103,24 +108,27 @@ void Overlay::RenderMenu() aim_enable = false; vis_check = false; } - + //ImGui::Begin("#FOVC", nullptr, ImGuiWindowFlags_NoMove | ImGuiInputTextFlags_ReadOnly | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoScrollbar); + //auto draw = ImGui::GetBackgroundDrawList(); + //draw->AddCircle(ImVec2(1920 / 2, 1080 / 2), max_fov * scale, IM_COL32(255, 0, 0, 255), 100, 0.0f); + //ImGui::End(); ImGui::SetNextWindowPos(ImVec2(0, 0)); - ImGui::SetNextWindowSize(ImVec2(490, 215)); + ImGui::SetNextWindowSize(ImVec2(490, 245)); ImGui::Begin(XorStr("##title"), (bool*)true, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar); + if (ImGui::BeginTabBar(XorStr("Tab"))) { - if (ImGui::BeginTabItem(XorStr("Main"))) + if (ImGui::BeginTabItem(XorStr(u8"MainMenu"))) { - ImGui::Checkbox(XorStr("ESP"), &esp); - - ImGui::Checkbox(XorStr("AIM"), &aim_enable); + ImGui::Checkbox(XorStr(u8"ESP"), &esp); + ImGui::Checkbox(XorStr(u8"Aimbot"), &aim_enable); if (aim_enable) { ImGui::SameLine(); - ImGui::Checkbox(XorStr("Visibility check"), &vis_check); + ImGui::Checkbox(XorStr(u8"Visible check"), &vis_check); ImGui::SameLine(); - ImGui::Checkbox(XorStr("No recoil/sway"), &aim_no_recoil); + ImGui::Checkbox(XorStr(u8"No recoil"), &aim_no_recoil); if (vis_check) { aim = 2; @@ -135,58 +143,70 @@ void Overlay::RenderMenu() aim = 0; } - ImGui::Checkbox(XorStr("Glow items"), &item_glow); - ImGui::Checkbox(XorStr("Glow players"), &player_glow); - ImGui::Checkbox(XorStr("Thirdperson"), &thirdperson); - ImGui::Checkbox(XorStr("Charge rifle hack"), &chargerifle); + ImGui::Checkbox(XorStr(u8"freecamera"), &freecam); + ImGui::Checkbox(XorStr(u8"Lock on teammates"), &lockall_mode); + ImGui::Checkbox(XorStr(u8"firing_range mode"), &firing_range);//firing_range + //ImGui::InputInt(XorStr("index"), &index);//index ImGui::EndTabItem(); } - if (ImGui::BeginTabItem(XorStr("Config"))) + if (ImGui::BeginTabItem(XorStr(u8"Aimbot"))) { - ImGui::Text(XorStr("Max distance:")); + ImGui::Text(XorStr(u8"Max distence:")); ImGui::SliderFloat(XorStr("##1"), &max_dist, 100.0f * 40, 800.0f * 40, "%.2f"); ImGui::SameLine(); - ImGui::Text("(%d meters)", (int)(max_dist / 40)); + ImGui::Text(u8"(%d M)", (int)(max_dist / 40)); - ImGui::Text(XorStr("Smooth aim value:")); - ImGui::SliderFloat(XorStr("##2"), &smooth, 12.0f, 150.0f, "%.2f"); + ImGui::Text(XorStr(u8"Smooth")); + ImGui::SliderFloat(XorStr("##2"), &smooth, 75.0f, 100.0f, "%.2f"); - ImGui::Text(XorStr("Max FOV:")); + ImGui::Text(XorStr(u8"FOV:")); ImGui::SliderFloat(XorStr("##3"), &max_fov, 5.0f, 250.0f, "%.2f"); - - ImGui::Text(XorStr("Aim at (bone id):")); - ImGui::SliderInt(XorStr("##4"), &bone, 0, 175); + + ImGui::Text(XorStr(u8"Bone:")); + ImGui::SliderInt(XorStr("##4"), &bone, 0, 3); + + ImGui::Text(XorStr(u8"NoRecoil:")); + ImGui::SliderInt(XorStr("##5"), &recoil_100, 0, 100); + //ImGui::Text(XorStr(u8"FOV Draw scale:")); + //ImGui::SliderFloat(XorStr("##5"), &scale, 0.0f, 140.0f, "%.2f"); ImGui::EndTabItem(); } - if (ImGui::BeginTabItem(XorStr("Visuals"))) + if (ImGui::BeginTabItem(XorStr(u8"ESPHACK"))) { - ImGui::Text(XorStr("ESP options:")); - ImGui::Checkbox(XorStr("Box"), &v.box); + ImGui::Text(XorStr(u8"ESP")); + //ImGui::Checkbox + ImGui::Checkbox(XorStr(u8"BOX"), &v.box); ImGui::SameLine(0, 70.0f); - ImGui::Checkbox(XorStr("Name"), &v.name); - ImGui::Checkbox(XorStr("Line"), &v.line); - ImGui::Checkbox(XorStr("Distance"), &v.distance); - ImGui::Checkbox(XorStr("Health bar"), &v.healthbar); - ImGui::Checkbox(XorStr("Shield bar"), &v.shieldbar); + ImGui::Checkbox(XorStr(u8"Name"), &v.name); + ImGui::Checkbox(XorStr(u8"uid"), &v.renderrank); + ImGui::Checkbox(XorStr(u8"line"), &v.line); + ImGui::Checkbox(XorStr(u8"dist + teamID"), &v.distance); + ImGui::Checkbox(XorStr(u8"seer esp"), &v.healthbar); + ImGui::Text(XorStr(u8"seer esp distence:")); + ImGui::SliderFloat(XorStr("##1"), &seer_dist, 100.0f * 40, 800.0f * 40, "%.2f"); + ImGui::SameLine(); + ImGui::Text(u8"(%d M)", (int)(seer_dist / 40)); ImGui::EndTabItem(); } ImGui::EndTabBar(); } - ImGui::Text(XorStr("Overlay FPS: %.3f ms/frame (%.1f FPS)"), 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate); ImGui::End(); } void Overlay::RenderInfo() { + //ImGui::Begin("#FOVC'", nullptr, ImGuiWindowFlags_NoMove | ImGuiInputTextFlags_ReadOnly | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoScrollbar); + //auto draw = ImGui::GetBackgroundDrawList(); + //draw ->AddCircle(ImVec2(1920 / 2, 1080 / 2), max_fov * scale ,IM_COL32(255, 0, 0, 255), 100, 0.0f); + //ImGui::End(); ImGui::SetNextWindowPos(ImVec2(0, 0)); - ImGui::SetNextWindowSize(ImVec2(50, 25)); + ImGui::SetNextWindowSize(ImVec2(210, 25)); ImGui::Begin(XorStr("##info"), (bool*)true, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar); - DrawLine(ImVec2(9, 5), ImVec2(45, 5), RED, 2); - ImGui::TextColored(RED, "%d", spectators); + ImGui::TextColored(RED, u8"Enemies �� %d", spectators); ImGui::SameLine(); - ImGui::Text("-"); + ImGui::Text(" / "); ImGui::SameLine(); - ImGui::TextColored(GREEN, "%d", allied_spectators); + ImGui::TextColored(GREEN, u8"Team �� %d", allied_spectators); ImGui::End(); } @@ -238,6 +258,9 @@ DWORD Overlay::CreateOverlay() IMGUI_CHECKVERSION(); ImGui::CreateContext(); ImGuiIO& io = ImGui::GetIO(); + io.Fonts->AddFontDefault(); + ImFont* font = io.Fonts->AddFontFromFileTTF("C://windows//fonts/simhei.ttf", 12.0f, NULL, io.Fonts->GetGlyphRangesChineseFull()); + ImGui::GetIO().FontDefault = font; // Setup Dear ImGui style ImGui::StyleColorsDark(); @@ -256,21 +279,6 @@ DWORD Overlay::CreateOverlay() while (running) { HWND wnd = GetWindow(GetForegroundWindow(), GW_HWNDPREV); - if (use_nvidia) - { - if (GetWindowLong(overlayHWND, GWL_STYLE) != nv_edit) - SetWindowLong(overlayHWND, GWL_STYLE, nv_edit); - if (show_menu) - { - ClickThrough(false); - } - else - { - if (GetWindowLong(overlayHWND, GWL_EXSTYLE) != nv_ex_edit) - SetWindowLong(overlayHWND, GWL_EXSTYLE, nv_ex_edit); - ClickThrough(true); - } - } if (wnd != overlayHWND) { SetWindowPos(overlayHWND, wnd, 0, 0, 0, 0, SWP_ASYNCWINDOWPOS | SWP_NOMOVE | SWP_NOSIZE); @@ -310,11 +318,12 @@ DWORD Overlay::CreateOverlay() { k_ins = false; } - - if (show_menu) + if (show_menu) { RenderMenu(); - else + } + else { RenderInfo(); + } RenderEsp(); @@ -347,11 +356,6 @@ void Overlay::Clear() { running = 0; Sleep(50); - if (use_nvidia) - { - SetWindowLong(overlayHWND, GWL_STYLE, nv_default); - SetWindowLong(overlayHWND, GWL_EXSTYLE, nv_ex_default); - } } int Overlay::getWidth() @@ -435,7 +439,7 @@ void Overlay::DrawBox(ImColor color, float x, float y, float w, float h) void Overlay::Text(ImVec2 pos, ImColor color, const char* text_begin, const char* text_end, float wrap_width, const ImVec4* cpu_fine_clip_rect) { - ImGui::GetWindowDrawList()->AddText(ImGui::GetFont(), ImGui::GetFontSize(), pos, color, text_begin, text_end, wrap_width, cpu_fine_clip_rect); + ImGui::GetWindowDrawList()->AddText(ImGui::GetFont(), 14, pos, color, text_begin, text_end, wrap_width, cpu_fine_clip_rect); } void Overlay::String(ImVec2 pos, ImColor color, const char* text) @@ -448,14 +452,305 @@ void Overlay::RectFilled(float x0, float y0, float x1, float y1, ImColor color, ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(x0, y0), ImVec2(x1, y1), color, rounding, rounding_corners_flags); } -void Overlay::ProgressBar(float x, float y, float w, float h, int value, int v_max) -{ - ImColor barColor = ImColor( - min(510 * (v_max - value) / 100, 255), - min(510 * value / 100, 255), - 25, - 255 - ); - +void Overlay::ProgressBar(float x, float y, float w, float h, int value, int v_max,ImColor barColor) +{ RectFilled(x, y, x + w, y + ((h / float(v_max)) * (float)value), barColor, 0.0f, 0); +} + + +//seer esp +void DrawQuadFilled(ImVec2 p1, ImVec2 p2, ImVec2 p3, ImVec2 p4, ImColor color) { + ImGui::GetWindowDrawList()->AddQuadFilled(p1, p2, p3, p4, color); +} +void DrawHexagon(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p5, const ImVec2& p6, ImU32 col, float thickness) +{ + ImGui::GetWindowDrawList()->AddHexagon(p1, p2, p3, p4, p5, p6, col, thickness); +} +void DrawHexagonFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p5, const ImVec2& p6, ImU32 col) +{ + ImGui::GetWindowDrawList()->AddHexagonFilled(p1, p2, p3, p4, p5, p6, col); +} + +void Overlay::DrawHealth(float x, float y, int shield, int max_shield, int armorType, int health) { + + int bg_offset = 3; + int bar_width = 158; + // 4steps...2*3=6 + // 38*4=152 152+6 = 158 + // 5steps...2*4=8 + // 30*5=150 150+8 = 158 + float max_health = 100.0f; + float shield_step = 25.0f; + + int shield_25 = 30; + int steps = 5; + + + ImVec2 bg1(x - bar_width / 2 - bg_offset, y); + ImVec2 bg2(bg1.x - 10, bg1.y - 16); + ImVec2 bg3(bg2.x + 5, bg2.y - 7); + ImVec2 bg4(bg3.x + bar_width + bg_offset, bg3.y); + ImVec2 bg5(bg4.x + 11, bg4.y + 18); + ImVec2 bg6(x + bar_width / 2 + bg_offset, y); + DrawHexagonFilled(bg1, bg2, bg3, bg4, bg5, bg6, ImColor(0, 0, 0, 120)); + + + ImVec2 h1(bg1.x + 3, bg1.y - 4); + ImVec2 h2(h1.x - 5, h1.y - 8); + ImVec2 h3(h2.x + (float)health / max_health * bar_width, h2.y); + ImVec2 h4(h1.x + (float)health / max_health * bar_width, h1.y); + ImVec2 h3m(h2.x + bar_width, h2.y); + ImVec2 h4m(h1.x + bar_width, h1.y); + DrawQuadFilled(h1, h2, h3m, h4m, ImColor(10, 10, 30, 60)); + DrawQuadFilled(h1, h2, h3, h4, WHITE); + + + ImColor shieldCracked(97, 97, 97); + ImColor shieldCrackedDark(67, 67, 67); + + ImColor shieldCol; + ImColor shieldColDark; //not used, but the real seer q has shadow inside + if (max_shield == 50) { //white + shieldCol = ImColor(247, 247, 247); + shieldColDark = ImColor(164, 164, 164); + } + else if (max_shield == 75) { //blue + shieldCol = ImColor(39, 178, 255); + shieldColDark = ImColor(27, 120, 210); + } + else if (max_shield == 100) { //purple + shieldCol = ImColor(206, 59, 255); + shieldColDark = ImColor(136, 36, 220); + } + else if (max_shield == 100) { //gold + shieldCol = ImColor(255, 255, 79); + shieldColDark = ImColor(218, 175, 49); + } + else if (max_shield == 125) { //red + shieldCol = ImColor(219, 2, 2); + shieldColDark = ImColor(219, 2, 2); + } + else { + shieldCol = ImColor(247, 247, 247); + shieldColDark = ImColor(164, 164, 164); + } + int shield_tmp = shield; + int shield1 = 0; + int shield2 = 0; + int shield3 = 0; + int shield4 = 0; + int shield5 = 0; + if (shield_tmp > 25) { + shield1 = 25; + shield_tmp -= 25; + if (shield_tmp > 25) { + shield2 = 25; + shield_tmp -= 25; + if (shield_tmp > 25) { + shield3 = 25; + shield_tmp -= 25; + if (shield_tmp > 25) { + shield4 = 25; + shield_tmp -= 25; + shield5 = shield_tmp; + } + else { + shield4 = shield_tmp; + } + } + else { + shield3 = shield_tmp; + } + } + else { + shield2 = shield_tmp; + } + } + else { + shield1 = shield_tmp; + } + ImVec2 s1(h2.x - 1, h2.y - 2); + ImVec2 s2(s1.x - 3, s1.y - 5); + ImVec2 s3(s2.x + shield1 / shield_step * shield_25, s2.y); + ImVec2 s4(s1.x + shield1 / shield_step * shield_25, s1.y); + ImVec2 s3m(s2.x + shield_25, s2.y); + ImVec2 s4m(s1.x + shield_25, s1.y); + + ImVec2 ss1(s4m.x + 2, s1.y); + ImVec2 ss2(s3m.x + 2, s2.y); + ImVec2 ss3(ss2.x + shield2 / shield_step * shield_25, s2.y); + ImVec2 ss4(ss1.x + shield2 / shield_step * shield_25, s1.y); + ImVec2 ss3m(ss2.x + shield_25, s2.y); + ImVec2 ss4m(ss1.x + shield_25, s1.y); + + ImVec2 sss1(ss4m.x + 2, s1.y); + ImVec2 sss2(ss3m.x + 2, s2.y); + ImVec2 sss3(sss2.x + shield3 / shield_step * shield_25, s2.y); + ImVec2 sss4(sss1.x + shield3 / shield_step * shield_25, s1.y); + ImVec2 sss3m(sss2.x + shield_25, s2.y); + ImVec2 sss4m(sss1.x + shield_25, s1.y); + + ImVec2 ssss1(sss4m.x + 2, s1.y); + ImVec2 ssss2(sss3m.x + 2, s2.y); + ImVec2 ssss3(ssss2.x + shield4 / shield_step * shield_25, s2.y); + ImVec2 ssss4(ssss1.x + shield4 / shield_step * shield_25, s1.y); + ImVec2 ssss3m(ssss2.x + shield_25, s2.y); + ImVec2 ssss4m(ssss1.x + shield_25, s1.y); + + ImVec2 sssss1(ssss4m.x + 2, s1.y); + ImVec2 sssss2(ssss3m.x + 2, s2.y); + ImVec2 sssss3(sssss2.x + shield5 / shield_step * shield_25, s2.y); + ImVec2 sssss4(sssss1.x + shield5 / shield_step * shield_25, s1.y); + ImVec2 sssss3m(sssss2.x + shield_25, s2.y); + ImVec2 sssss4m(sssss1.x + shield_25, s1.y); + if (max_shield == 50) { + if (shield <= 25) { + if (shield < 25) { + DrawQuadFilled(s1, s2, s3m, s4m, shieldCracked); + DrawQuadFilled(ss1, ss2, ss3m, ss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + + } + else if (shield <= 50) { + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + if (shield != 50) { + DrawQuadFilled(ss1, ss2, ss3m, ss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(ss1, ss2, ss3, ss4, shieldCol); + } + } + else if (max_shield == 75) { + if (shield <= 25) { + if (shield < 25) { + DrawQuadFilled(s1, s2, s3m, s4m, shieldCracked); + DrawQuadFilled(ss1, ss2, ss3m, ss4m, shieldCracked); + DrawQuadFilled(sss1, sss2, sss3m, sss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + + } + else if (shield <= 50) { + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + if (shield < 50) { + DrawQuadFilled(ss1, ss2, ss3m, ss4m, shieldCracked); + DrawQuadFilled(sss1, sss2, sss3m, sss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(ss1, ss2, ss3, ss4, shieldCol); + } + else if (shield <= 75) { + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + DrawQuadFilled(ss1, ss2, ss3, ss4, shieldCol); + if (shield < 75) { + DrawQuadFilled(sss1, sss2, sss3m, sss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(sss1, sss2, sss3, sss4, shieldCol); + } + } + else if (max_shield == 100) { + if (shield <= 25) { + if (shield < 25) { + DrawQuadFilled(s1, s2, s3m, s4m, shieldCracked); + DrawQuadFilled(ss1, ss2, ss3m, ss4m, shieldCracked); + DrawQuadFilled(sss1, sss2, sss3m, sss4m, shieldCracked); + DrawQuadFilled(ssss1, ssss2, ssss3m, ssss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + + } + else if (shield <= 50) { + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + if (shield < 50) { + DrawQuadFilled(ss1, ss2, ss3m, ss4m, shieldCracked); + DrawQuadFilled(sss1, sss2, sss3m, sss4m, shieldCracked); + DrawQuadFilled(ssss1, ssss2, ssss3m, ssss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(ss1, ss2, ss3, ss4, shieldCol); + } + else if (shield <= 75) { + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + DrawQuadFilled(ss1, ss2, ss3, ss4, shieldCol); + if (shield < 75) { + DrawQuadFilled(sss1, sss2, sss3m, sss4m, shieldCracked); + DrawQuadFilled(ssss1, ssss2, ssss3m, ssss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(sss1, sss2, sss3, sss4, shieldCol); + } + else if (shield <= 100) { + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + DrawQuadFilled(ss1, ss2, ss3, ss4, shieldCol); + DrawQuadFilled(sss1, sss2, sss3, sss4, shieldCol); + if (shield < 100) { + DrawQuadFilled(ssss1, ssss2, ssss3m, ssss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(ssss1, ssss2, ssss3, ssss4, shieldCol); + } + } + else if (max_shield == 125) { + if (shield <= 25) { + if (shield < 25) { + DrawQuadFilled(s1, s2, s3m, s4m, shieldCracked); + DrawQuadFilled(ss1, ss2, ss3m, ss4m, shieldCracked); + DrawQuadFilled(sss1, sss2, sss3m, sss4m, shieldCracked); + DrawQuadFilled(ssss1, ssss2, ssss3m, ssss4m, shieldCracked); + DrawQuadFilled(sssss1, sssss2, sssss3m, sssss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + + } + else if (shield <= 50) { + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + if (shield < 50) { + DrawQuadFilled(ss1, ss2, ss3m, ss4m, shieldCracked); + DrawQuadFilled(sss1, sss2, sss3m, sss4m, shieldCracked); + DrawQuadFilled(ssss1, ssss2, ssss3m, ssss4m, shieldCracked); + DrawQuadFilled(sssss1, sssss2, sssss3m, sssss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(ss1, ss2, ss3, ss4, shieldCol); + } + else if (shield <= 75) { + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + DrawQuadFilled(ss1, ss2, ss3, ss4, shieldCol); + if (shield < 75) { + DrawQuadFilled(sss1, sss2, sss3m, sss4m, shieldCracked); + DrawQuadFilled(ssss1, ssss2, ssss3m, ssss4m, shieldCracked); + DrawQuadFilled(sssss1, sssss2, sssss3m, sssss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(sss1, sss2, sss3, sss4, shieldCol); + } + else if (shield <= 100) { + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + DrawQuadFilled(ss1, ss2, ss3, ss4, shieldCol); + DrawQuadFilled(sss1, sss2, sss3, sss4, shieldCol); + if (shield < 100) { + DrawQuadFilled(ssss1, ssss2, ssss3m, ssss4m, shieldCracked); + DrawQuadFilled(sssss1, sssss2, sssss3m, sssss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(ssss1, ssss2, ssss3, ssss4, shieldCol); + } + else if (shield <= 125) { + DrawQuadFilled(s1, s2, s3, s4, shieldCol); + DrawQuadFilled(ss1, ss2, ss3, ss4, shieldCol); + DrawQuadFilled(sss1, sss2, sss3, sss4, shieldCol); + DrawQuadFilled(ssss1, ssss2, ssss3, ssss4, shieldCol); + if (shield < 125) { + DrawQuadFilled(sssss1, sssss2, sssss3m, sssss4m, shieldCracked); + } + if (shield != 0) + DrawQuadFilled(sssss1, sssss2, sssss3, sssss4, shieldCol); + } + } } \ No newline at end of file diff --git a/apex_guest/Client/Client/overlay.h b/apex_guest/Client/Client/overlay.h index b34d4ad..f52de57 100644 --- a/apex_guest/Client/Client/overlay.h +++ b/apex_guest/Client/Client/overlay.h @@ -18,10 +18,11 @@ #pragma comment(lib, "d3d11.lib") #define GREEN ImColor(0, 255, 0) -#define RED ImColor(255, 0, 0) -#define BLUE ImColor(0, 0, 255) +#define RED ImColor(255, 75, 0) +#define BLUE ImColor(51, 153, 255) #define ORANGE ImColor(255, 165, 0) #define WHITE ImColor(255, 255, 255) +#define PURPLE ImColor(255, 0 , 255) typedef struct visuals { @@ -31,8 +32,10 @@ typedef struct visuals bool healthbar = true; bool shieldbar = true; bool name = true; + bool renderrank = true; }visuals; + class Overlay { public: @@ -49,8 +52,10 @@ public: void DrawBox(ImColor color, float x, float y, float w, float h); void Text(ImVec2 pos, ImColor color, const char* text_begin, const char* text_end, float wrap_width, const ImVec4* cpu_fine_clip_rect); void RectFilled(float x0, float y0, float x1, float y1, ImColor color, float rounding, int rounding_corners_flags); - void ProgressBar(float x, float y, float w, float h, int value, int v_max); + void ProgressBar(float x, float y, float w, float h, int value, int v_max,ImColor barColor); void String(ImVec2 pos, ImColor color, const char* text); + //Seer + void DrawHealth(float x, float y, int shield, int max_shield, int armorType, int health); private: bool running; HWND overlayHWND; diff --git a/apex_guest/Overlay/Overlay/Overlay.vcxproj b/apex_guest/Overlay/Overlay/Overlay.vcxproj index a2ddd40..f001589 100644 --- a/apex_guest/Overlay/Overlay/Overlay.vcxproj +++ b/apex_guest/Overlay/Overlay/Overlay.vcxproj @@ -21,14 +21,14 @@ Application true - v142 + v143 Unicode false Application false - v142 + v143 true Unicode false @@ -46,7 +46,7 @@ - overlay_ap + ov @@ -67,6 +67,7 @@ true true true + MultiThreadedDLL Windows diff --git a/apex_guest/Overlay/Overlay/main.cpp b/apex_guest/Overlay/Overlay/main.cpp index fc33645..54448f0 100644 --- a/apex_guest/Overlay/Overlay/main.cpp +++ b/apex_guest/Overlay/Overlay/main.cpp @@ -3,13 +3,14 @@ #include #pragma comment(lib, "dwmapi.lib") +#define WDA_EXCLUDEFROMCAPTURE 0x00000011 const MARGINS margins = { -1 ,-1, -1, -1 }; -const wchar_t g_szClassName[] = L"overlay"; +const wchar_t g_szClassName[] = L"B4A893Xoverlay"; int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { WNDCLASSEX wc; - HWND hwnd; + HWND B4A893Xhwnd; MSG Msg; wc.cbSize = sizeof(WNDCLASSEX); @@ -27,7 +28,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine RegisterClassEx(&wc); - hwnd = CreateWindowEx( + B4A893Xhwnd = CreateWindowEx( WS_EX_LAYERED | WS_EX_TRANSPARENT, g_szClassName, g_szClassName, @@ -35,8 +36,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine 0, 0, 1920, 1080, NULL, NULL, hInstance, NULL); - SetLayeredWindowAttributes(hwnd, RGB(0,0,0), 255, LWA_ALPHA); - DwmExtendFrameIntoClientArea(hwnd, &margins); + SetLayeredWindowAttributes(B4A893Xhwnd, RGB(0,0,0), 175, LWA_ALPHA); + SetWindowDisplayAffinity(B4A893Xhwnd, WDA_EXCLUDEFROMCAPTURE); + DwmExtendFrameIntoClientArea(B4A893Xhwnd, &margins); while (GetMessage(&Msg, NULL, 0, 0) > 0) {