Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "cInclude.h"
- #include "Class.h"
- #include <string>
- #include <string.h>
- #include "Xor.h"
- #include <windows.h>
- #include <iostream>
- #include <tchar.h>
- #include <tlhelp32.h>
- #include <psapi.h>
- #include <fstream>
- #include <sstream>
- #include <intrin.h>
- #include <ctime>
- #include "Functions.h"
- #include "Bypass.h"
- #include "detours.h"
- #include "MemoryHacks.h"
- #include "HSDN.h"
- #include <WinInet.h>
- #include "Radar.h"
- #include <random>
- #pragma comment(lib,"Winmm.lib")
- #pragma comment(lib,"Wininet.lib")
- #pragma comment(lib, "detours.lib")
- #pragma intrinsic(_ReturnAddress)
- using namespace std;
- #pragma warning(disable:4305)
- #pragma warning(disable:4996)
- CRadar Rad;
- //-----------------------------------------------------------------------------------------------------------------------------------
- D3DVIEWPORT9 Viewport;
- float ScreenCX = 0;
- float ScreenCY = 0;
- HANDLE MEMORY = OpenProcess(PROCESS_ALL_ACCESS, 0, GetCurrentProcessId());
- MEMORY_BASIC_INFORMATION MBI;
- /*
- What it does ?
- First Get the crc address in the possible area i have this will keep you safe i have the crc interval offset
- Then simply replace the emulated crc in our Dll :D
- */
- void CRadar::RadarRange( float* x , float* y , float range )
- {
- if ( fabs( ( *x ) ) > range || fabs( ( *y ) ) > range )
- {
- if ( ( *y ) > ( *x ) )
- {
- if ( ( *y ) > -( *x ) )
- {
- ( *x ) = range*( *x ) / ( *y );
- ( *y ) = range;
- }
- else
- {
- ( *y ) = -range*( *y ) / ( *x );
- ( *x ) = -range;
- }
- }
- else
- {
- if ( ( *y ) > -( *x ) )
- {
- ( *y ) = range*( *y ) / ( *x );
- ( *x ) = range;
- }
- else
- {
- ( *x ) = -range*( *x ) / ( *y );
- ( *y ) = -range;
- }
- }
- }
- }
- class Math
- {
- public:
- float DegToRad(float degree)
- {
- return (float)(degree * (3.14159265358979323846f / 180.0F));
- }
- float RadToDeg(float degree)
- {
- return (float)(degree * (180.0F / 3.14159265358979323846f));
- }
- };Math* pMath = 0;
- void CRadar::CalcRadarPoint( D3DXVECTOR3 vOrigin ,D3DXVECTOR3 LocalPos, int& screenx , int& screeny )
- {
- float M_PI = 3.14159265358979323846f;
- //Interfaces::Engine()->GetViewAngles( vAngle );
- auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
- DWORD LocalPlayer = *(PDWORD)*(PDWORD)(uBase + OFFSET_LOCAL);
- float fnewyaw = *(float*)(LocalPlayer + 0x90);
- //D3DXVECTOR3 Coord = Rotate(vOrigin, LocalPos, fnewyaw);
- //D3DXVECTOR3 Return;
- //
- //Return.x = Coord.x + (float)screenx + (150 / 2.0f);
- //Return.z = -Coord.z + (float)screeny + (150 / 2.0f);
- //
- //if (Return.x > ((float)screeny + 150 - 4))
- // Return.x = ((float)screenx + 150);
- //else if (Return.x < ((float)screenx))
- // Return.x = (float)screenx;
- //
- //if (Return.z > ((float)screeny + 150 - 4))
- // Return.z = ((float)screeny + 150);
- //else if (Return.z < ((float)screeny))
- // Return.z = (float)screeny;
- float dx = vOrigin.x - LocalPos.x;
- float dy = vOrigin.y - LocalPos.y;
- float fYaw = float(fnewyaw * ( M_PI / 180.0 ) );
- float fsin_yaw = sin( fYaw );
- float fminus_cos_yaw = -cos( fYaw );
- float x = dy*fminus_cos_yaw + dx*fsin_yaw;
- float y = dx*fminus_cos_yaw - dy*fsin_yaw;
- float range = (float)500.0f;
- RadarRange( &x , &y , range );
- ImVec2 DrawPos = ImGui::GetCursorScreenPos();
- ImVec2 DrawSize = ImGui::GetContentRegionAvail();
- int rad_x = (int)DrawPos.x;
- int rad_y = (int)DrawPos.y;
- float r_siz_x = DrawSize.x;
- float r_siz_y = DrawSize.y;
- int x_max = (int)r_siz_x + rad_x - 5;
- int y_max = (int)r_siz_y + rad_y - 5;
- screenx = rad_x + ( (int)r_siz_x / 2 + int( x / range * r_siz_x ) );
- screeny = rad_y + ( (int)r_siz_y / 2 + int( y / range * r_siz_y ) );
- if ( screenx > x_max )
- screenx = x_max;
- if ( screenx < rad_x )
- screenx = rad_x;
- if ( screeny > y_max )
- screeny = y_max;
- if ( screeny < rad_y )
- screeny = rad_y;
- }
- void CRadar::OnRenderPlayer()
- {
- GameMatrix* Matrix = World.GetMatrix();
- D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
- auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
- auto usermodel = (ModelFactory*)(uBase +OFFSET_MODELFACTORY );
- size_t count = usermodel->Models.size();
- for(size_t i = 0; i < count; i++)
- //for ( BYTE PlayerIndex = 0; PlayerIndex < g_pPlayers->GetSize(); PlayerIndex++ )
- {
- Model* pModel = usermodel->Models.at(i);
- string Type = pModel->m_pAnimator->m_pModelName->m_pName;
- bool isMale = findnew(Type,DataMale);
- bool isBot = findnew(Type,bata);
- bool isFemale = findnew(Type,DataFemale);
- D3DXMATRIX ResultPosition = pModel->m_Position;
- D3DXVECTOR3 GetPosition;
- D3DXVECTOR3 outPosition;
- GetPosition.x = ResultPosition._41;
- GetPosition.y = ResultPosition._42;
- GetPosition.z = ResultPosition._43;
- D3DXVECTOR3 MyPos = MyLoCalPos();
- //CPlayer* pPlayer = g_pPlayers->GetPlayer( PlayerIndex );
- float Color_R = 0.f;
- float Color_G = 0.f;
- float Color_B = 0.f;
- float Alpha = 0.0f;
- if(isMale)
- {
- Color_R = 255.0f;
- Color_G = 0.0f;
- Color_B = 0.0f;
- Alpha = 255.0f;
- }
- else if(isFemale)
- {
- Color_R = 255.0f;
- Color_G = 50.0f;
- Color_B = 250.0f;
- Alpha = 255.0f;
- }
- else if(isBot)
- {
- Color_R = 0.0f;
- Color_G = 255.0f;
- Color_B = 0.0f;
- Alpha = 255.0f;
- }
- int screenx = (int)Viewport.Width;
- int screeny = (int)Viewport.Height;
- CalcRadarPoint( GetPosition ,MyPos, screenx , screeny );
- ImDrawList* Draw = ImGui::GetWindowDrawList();
- Draw->AddRectFilled( ImVec2( (float)screenx , (float)screeny ) ,
- ImVec2( (float)screenx + 5 , (float)screeny + 5 ) ,
- ImColor( Color_R , Color_G , Color_B , Alpha ) );
- }
- }
- void CRadar::OnRender()
- {
- //ImGui_NewFrame();
- if ( stack.d3d.radar)// && IsLocalAlive() || bIsGuiVisible )
- {
- float prevAlpha = ImGui::GetStyle().Alpha;
- float Alpha = (float)1.1f;
- DWORD Flags = ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_ShowBorders;
- ImGui::GetStyle().Alpha = Alpha;
- ImGui::SetNextWindowSize(ImVec2(50, 300));
- //ImGui::Begin(zNova, &bShowWindow, ImVec2(543, 300), 1.0f, dwFlag);
- if ( ImGui::Begin( "[DS]2D RADAR" , &stack.d3d.radar ,ImVec2(300,200),1.0f, Flags) )
- {
- ImDrawList* Draw = ImGui::GetWindowDrawList();
- ImVec2 DrawPos = ImGui::GetCursorScreenPos();
- ImVec2 DrawSize = ImGui::GetContentRegionAvail();
- Draw->AddLine(
- ImVec2( DrawPos.x + DrawSize.x / 2.f , DrawPos.y ) ,
- ImVec2( DrawPos.x + DrawSize.x / 2.f , DrawPos.y + DrawSize.y ) ,
- ImColor( 1.f , 1.f , 1.f , Alpha ) );
- Draw->AddLine(
- ImVec2( DrawPos.x , DrawPos.y + DrawSize.y / 2.f ) ,
- ImVec2( DrawPos.x + DrawSize.x , DrawPos.y + DrawSize.y / 2.f ) ,
- ImColor( 1.f , 1.f , 1.f , Alpha ) );
- //Draw->AddLine(
- // ImVec2(PosX + DrawSize.x / 2.0f ,PosY),
- // //ImVec2( DrawPos.x + DrawSize.x , DrawPos.y ) ,// 2.f
- // ImVec2(PosX + DrawSize.x, PosY + DrawSize.y / 2.0f),
- // //ImVec2( DrawPos.x + DrawSize.x , DrawPos.y + DrawSize.y ) ,// 2.f
- // ImColor( 1.f , 1.f , 1.f , Alpha ) );
- //Draw->AddLine(
- // ImVec2(PosX , PosY + DrawSize.y / 2.0f),
- // ImVec2(PosX + DrawSize.x / 2.0f, PosY + DrawSize.y),
- // //ImVec2( DrawPos.x , DrawPos.y + DrawSize.y ) ,// / 2.f
- // //ImVec2( DrawPos.x + DrawSize.x , DrawPos.y + DrawSize.y / 2.f ) ,
- // ImColor( 1.f , 1.f , 1.f , Alpha ) );
- OnRenderPlayer();
- ImGui::End();
- }
- ImGui::GetStyle().Alpha = prevAlpha;
- }
- ImGui::Render();
- /*else if ( !stack.d3d.radar )
- {
- if ( Interfaces::Engine()->IsInGame() )
- {
- OnRenderPlayer();
- }
- }*/
- }
- struct WeaponEspInfo_t
- {
- float pOutX, pOutY, RealDistance, vSizeod;
- float CrosshairDistance;
- };
- std::vector<WeaponEspInfo_t>WeaponEspInfo;
- void AddWeapons(LPDIRECT3DDEVICE9 Device)
- {
- D3DXMATRIX matrix;
- Device->GetVertexShaderConstantF(13, matrix, 4);
- D3DXVECTOR3 pOut, pIn(0, (float)1, 0);
- float distance = pIn.x * matrix._14 + pIn.y * matrix._24 + pIn.z * matrix._34 + matrix._44;
- D3DXVec3TransformCoord(&pOut, &pIn, &matrix);
- pOut.x = Viewport.X + (1.0f + pOut.x) *Viewport.Width / 2.0f;
- pOut.y = Viewport.Y + (1.0f - pOut.y) *Viewport.Height / 2.0f;
- WeaponEspInfo_t pWeaponEspInfo = { static_cast<float>(pOut.x), static_cast<float>(pOut.y), static_cast<float>(distance) };
- WeaponEspInfo.push_back(pWeaponEspInfo);
- }
- const char* getnewitem(int a) {
- switch (a)
- {
- case 1: return "Lv 1 helmet";
- case 2: return "Lv 2 helmet";
- case 3: return "Lv 3 helmet";
- case 5: return "Lv 1 Armor";
- case 6: return "Lv 2 Armor";
- case 7: return "Lv 3 Armor";
- case 8: return "Lv 1 Backpack";
- case 9: return "Lv 2 Backpack";
- case 10: return "Lv 3 Backpack";
- case 19: return "Ghillie Suit";
- case 50: return "Fuel Barrel";
- case 101: return "Bandage";
- case 102: return "Med Kit";
- case 103: return "First Aid Kit";
- case 105: return "Sports Drink";
- case 106: return "Cardio Tonic";
- case 1001: return "M4A1 Rifle";
- case 1002: return "AKM Rifle";
- case 1003: return "M870 SG";
- case 1004: return "M1887 SG";
- case 1005: return "AA12 SG";
- case 1006: return "AWM SR";
- case 1007: return "Barett SR";
- case 1008: return "M249 MG";
- case 1009: return "M14EBR Rifle";
- case 1010: return "AR15 Rifle";
- case 1011: return "MP7 SMG";
- case 1012: return "PP19 SMG";
- case 1013: return "Thompson SMG";
- case 1014: return "G18C Pistol";
- case 1015: return "Desert Eagle";
- case 1017: return "Vector";
- case 1018: return "P90 SMG";
- case 1019: return "SAIGA-12 Shotgun";
- case 1020: return "WRO Hunting Rifle";
- case 1021: return "SVD SR";
- case 1022: return "M110 Sniper Rifle";
- case 1023: return "ACR Rifle";
- case 1024: return "AN94 Rifle";
- case 1025: return "MP5 SMG";
- case 1026: return "AUG Rifle";
- case 1027: return "QBU Sniper Rifle";
- case 1031: return "RPG Rocket Tube";
- case 1101: return "SG Ammo";
- case 1102: return "Rifle Ammo";
- case 1103: return "SR Ammo";
- case 1104: return "SMG Ammo";
- case 1105: return "Pistol Ammo";
- case 1106: return "RPG Ammo";
- case 1201: return "Rifle Silencer";
- case 1202: return "SR Silence";
- case 1204: return "SMG Silencer";
- case 1211: return "Rifle Compensator";
- case 1212: return "SR Compensator";
- case 1213: return "SMG Compensator";
- case 1221: return "Rifle Flash Hider";
- case 1222: return "SR Flash Hider";
- case 1223: return "SMG Smoke Hider";
- case 1231: return "SG Choke";
- case 1241: return "Triangle Grip";
- case 1242: return "Vertical Foregrip";
- case 1251: return "Rifle QD-Mag";
- case 1252: return "Rifle EX-Mag";
- case 1253: return "Rifle EX-QD-Mag";
- case 1261: return "SR Cheek Pad";
- case 1262: return "Tactical Stock";
- case 1263: return "SG Bullet Loop";
- case 1264: return "SR EX-Mag";
- case 1265: return "SR QD-Mag";
- case 1266: return "SR EX-QD-Mag";
- case 1271: return "Red Dot Sight";
- case 1272: return "Holo-Sight";
- case 1273: return "2x Scope";
- case 1274: return "4x Scope";
- case 1275: return "8x Scope";
- case 1276: return "SMG QD-Mag";
- case 1277: return "SMG EX-Mag";
- case 1278: return "SMG QD-EX-Mag";
- case 1279: return "Collapsible Stock";
- case 1303: return "Crowbar";
- case 1306: return "Frying Pan";
- case 1307: return "Rubber Chicken";
- case 1401: return "Grenade";
- case 1402: return "Stun Grenade";
- case 1403: return "Smoke Grenade";
- case 1404: return "Molotov Cocktail";
- case 1405: return "Chicken Grenade";
- case 1406: return "Flash Grenade";
- char aa[12];
- sprintf(aa,"%d",a);
- default:return aa;
- //wchar_t aa[12];
- //_snwprintf(aa, sizeof(aa), L"%d", a);
- //new_item = a;
- break;
- }
- }
- class Vector
- {
- public:
- FLOAT X, Y;
- Vector()
- {
- this->X = 0.0f;
- this->Y = 0.0f;
- }
- };
- Vector ScreenCoords;
- IDirect3DDevice9* m_pD3Ddev;
- bool Create = false;
- bool crosshair;
- bool h1, h2, h3, h4, h5, h6;
- bool h7, h8, h9, h10, h11, h12;
- static bool no_titlebar = false;
- static bool no_border = true;
- static bool no_resize = true;
- static bool no_move = false;
- static bool no_scrollbar = false;
- static bool no_collapse = false;
- static bool no_menu = false;
- namespace GlobalStuff
- {
- extern bool Aimbotting;
- extern bool InAntiAim;
- extern bool Return;
- extern HMODULE Dll;
- extern HWND Window;
- extern bool PressedKeys[256];
- extern bool d3dinit;
- extern float asd;
- extern int ChamMode;
- extern bool SendPacket;
- extern int BestTarget;
- }
- bool InsideCircleX(POINT xyc, int r, int x, int y)
- {
- long dx = xyc.x - x;
- long dy = xyc.y - y;
- return dx * dx + dy * dy <= r * r;
- }
- bool showa2;
- #include "D3D9.h"
- void SetModelColor(LPDIRECT3DDEVICE9 pDevice, float r, float g, float b, float a, float glowr, float glowg, float glowb, float glowa)
- {
- float lightValues[4] = { r, g, b, a };
- float glowValues[4] = { glowr, glowg, glowb, glowa };
- pDevice->SetPixelShaderConstantF(1, lightValues, 1);
- pDevice->SetPixelShaderConstantF(3, glowValues, 1);
- }
- UINT Stride;
- UINT vSize;
- bool InitOnce = true;
- IDirect3DVertexShader9* vShader;
- HRESULT APIENTRY SetStreamSource_hook(LPDIRECT3DDEVICE9 pDevice, UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT sStride)
- {
- if (StreamNumber == 0)
- Stride = sStride;
- return SetStreamSource_orig(pDevice, StreamNumber, pStreamData, OffsetInBytes, sStride);
- }
- HRESULT APIENTRY SetTexture_hook(LPDIRECT3DDEVICE9 pDevice, DWORD Sampler, IDirect3DBaseTexture9 *pTexture)
- {
- if (InitOnce)
- {
- InitOnce = false;
- pDevice->GetViewport(&Viewport);
- ScreenCX = (float)Viewport.Width / 2.0f;
- ScreenCY = (float)Viewport.Height / 2.0f;
- }
- if (SUCCEEDED(pDevice->GetVertexShader(&vShader)))
- if (vShader != NULL)
- if (SUCCEEDED(vShader->GetFunction(NULL, &vSize)))
- if (vShader != NULL) { vShader->Release(); vShader = NULL; }
- if (stack.d3d.wallhack)
- {
- pDevice->SetRenderState(D3DRS_DEPTHBIAS, 0);
- if (vSize == 2008 || vSize == 2356 || vSize == 624 || vSize == 1004)
- {
- float bias = 1000.0f;
- float bias_float = static_cast<float>(-bias);
- bias_float /= 10000.0f;
- pDevice->SetRenderState(D3DRS_DEPTHBIAS, *(DWORD*)&bias_float);
- }
- if (Stride == 48 || vSize == 2008 || vSize == 2356)
- {
- D3DXMATRIX matLegs;
- D3DXMatrixScaling(&matLegs, 0.0f, 0.0f, 0.0f);
- pDevice->SetVertexShaderConstantF(20, matLegs, 1);//legs
- D3DXMATRIX matChest;
- D3DXMatrixScaling(&matChest, 0.0f, 0.0f, 0.0f);
- pDevice->SetVertexShaderConstantF(25, matChest, 1);//chest
- }
- if (Stride == 48 || vSize == 2300 || vSize == 900 || vSize == 1952 || vSize == 640)
- AddWeapons(pDevice);
- }
- pDevice->SetRenderState(D3DRS_DEPTHBIAS, 0);
- if(stack.d3d.cham)
- {
- if (vSize == 2008 || vSize == 2356 || vSize == 624 || vSize == 1004)
- {
- if(stack.d3d.cham == 1 && (vSize != 624 || vSize != 1004))
- {
- SetModelColor(pDevice, 0.0f, 255.0f, 0.0f, 255.0f, 0.0f, 1.0f, 0.0f, 1.0f);//green
- }
- if(stack.d3d.cham == 2 && (vSize != 624 || vSize != 1004))
- {
- SetModelColor(pDevice, 0.0f, 0.0f, 255.0f, 255.0f, 0.0f, 0.0f, 1.0f, 1.0f);//blue
- }
- if(stack.d3d.cham == 3 && (vSize != 624 || vSize != 1004))
- {
- SetModelColor(pDevice, 255.0f, 0.0f, 0.0f, 255.0f, 1.0f, 0.0f, 0.0f, 1.0f);//red
- }
- float bias = 1000.0f;
- float bias_float = static_cast<float>(-bias);
- bias_float /= 10000.0f;
- pDevice->SetRenderState(D3DRS_DEPTHBIAS, *(DWORD*)&bias_float);
- }
- }
- if (stack.d3d.nograss)
- {
- pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
- if (vSize == 1704 || vSize == 1660 || vSize == 600)//600 flashbang
- {
- pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_POINT);
- }
- }
- return SetTexture_orig(pDevice, Sampler, pTexture);
- }
- const char* getitemname(int a) {
- switch (a)
- {
- case 1: return "Lv 1 helmet";
- case 2: return "Lv 2 helmet";
- case 3: return "Lv 3 helmet";
- case 5: return "Lv 1 Armor";
- case 6: return "Lv 2 Armor";
- case 7: return "Lv 3 Armor";
- case 8: return "Lv 1 Backpack";
- case 9: return "Lv 2 Backpack";
- case 10: return "Lv 3 Backpack";
- case 19: return "Ghillie Suit";
- case 50: return "Fuel Barrel";
- case 101: return "Bandage";
- case 102: return "Med Kit";
- case 103: return "First Aid Kit";
- case 105: return "Sports Drink";
- case 106: return "Cardio Tonic";
- case 1001: return "M4A1 Rifle";
- case 1002: return "AKM Rifle";
- case 1003: return "M870 SG";
- case 1004: return "M1887 SG";
- case 1005: return "AA12 SG";
- case 1006: return "AWM SR";
- case 1007: return "Barett SR";
- case 1008: return "M249 MG";
- case 1009: return "M14EBR Rifle";
- case 1010: return "AR15 Rifle";
- case 1011: return "MP7 SMG";
- case 1012: return "PP19 SMG";
- case 1013: return "Thompson SMG";
- case 1014: return "G18C Pistol";
- case 1015: return "Desert Eagle";
- case 1017: return "Vector";
- case 1018: return "P90 SMG";
- case 1019: return "SAIGA-12 Shotgun";
- case 1020: return "WRO Hunting Rifle";
- case 1021: return "SVD SR";
- case 1022: return "M110 Sniper Rifle";
- case 1023: return "ACR Rifle";
- case 1024: return "AN94 Rifle";
- case 1025: return "MP5 SMG";
- case 1026: return "AUG Rifle";
- case 1027: return "QBU Sniper Rifle";
- case 1031: return "RPG Rocket Tube";
- case 1040: return "Crossbow";
- case 1101: return "SG Ammo";
- case 1102: return "Rifle Ammo";
- case 1103: return "SR Ammo";
- case 1104: return "SMG Ammo";
- case 1105: return "Pistol Ammo";
- case 1106: return "RPG Ammo";
- case 1109: return "Arrow";
- case 1201: return "Rifle Silencer";
- case 1202: return "SR Silence";
- case 1204: return "SMG Silencer";
- case 1211: return "Rifle Compensator";
- case 1212: return "SR Compensator";
- case 1213: return "SMG Compensator";
- case 1221: return "Rifle Flash Hider";
- case 1222: return "SR Flash Hider";
- case 1223: return "SMG Smoke Hider";
- case 1231: return "SG Choke";
- case 1241: return "Triangle Grip";
- case 1242: return "Vertical Foregrip";
- case 1251: return "Rifle QD-Mag";
- case 1252: return "Rifle EX-Mag";
- case 1253: return "Rifle EX-QD-Mag";
- case 1261: return "SR Cheek Pad";
- case 1262: return "Tactical Stock";
- case 1263: return "SG Bullet Loop";
- case 1264: return "SR EX-Mag";
- case 1265: return "SR QD-Mag";
- case 1266: return "SR EX-QD-Mag";
- case 1271: return "Red Dot Sight";
- case 1272: return "Holo-Sight";
- case 1273: return "2x Scope";
- case 1274: return "4x Scope";
- case 1275: return "8x Scope";
- case 1276: return "SMG QD-Mag";
- case 1277: return "SMG EX-Mag";
- case 1278: return "SMG QD-EX-Mag";
- case 1279: return "Collapsible Stock";
- case 1302: return "Damascus Knife";
- case 1303: return "Crowbar";
- case 1306: return "Frying Pan";
- case 1307: return "Rubber Chicken";
- case 1401: return "Grenade";
- case 1402: return "Stun Grenade";
- case 1403: return "Smoke Grenade";
- case 1404: return "Molotov Cocktail";
- case 1405: return "Chicken Grenade";
- case 1406: return "Flash Grenade";
- default:return "No Name";
- break;
- }
- }
- typedef DWORD(__thiscall *fDecrypt)(void* pthis, DWORD a1, int a3);
- fDecrypt oriDec;
- //{"playerAccount": "player519", "roleID": 176398278, "playerNickname": "zNova151", "defaultServerName": "PC-America", "defaultZoneName": "PC", "defaultGroupId": "10501", "isLogin": true, "announcement": "7647d1858749d84202df57d930c3b70b", "showNumOfA": 2, "playerUID": "243339800", "remindGuestBindTimestamp": 0, "serverRoleInfo": {"10501": {"groupId": "10501", "roleID": 176398278, "playerUID": "243339800"}}}
- void DecryptCall()
- {
- DWORD Modules = (DWORD)GetModuleHandleA(GameBase);
- pMainApp = (MainApp*)(Modules + OFFSET_MAINAPP);
- oriDec = (fDecrypt)(Modules + OFFSET_DCRYPTENTITY);
- }
- float aim_smooth = 1.0f;
- float aim_fov = 45.f;
- float heritage_fov = 25.0f;
- float teleport_fov = 5.0f;
- class Bone
- {
- public:
- void draw3DBoxLines(D3DXVECTOR3 center, D3DXMATRIX mat, float x1, float y1, float z1, float x2, float y2, float z2, D3DCOLOR color)
- {
- D3DVECTOR pointPos1 = { center.x + x1, center.y + y1, center.z + z1 };
- D3DVECTOR pointPos2 = { center.x + x2, center.y + y2, center.z + z2 };
- D3DXVECTOR3 sxy1;
- sxy1.x = 0;
- sxy1.y = 0;
- D3DXVECTOR3 sxy2;
- sxy2.x = 0;
- sxy2.y = 0;
- int width = (int)Viewport.Width;
- int height = (int)Viewport.Height;
- if (ClientApp::WorldToScreen(pointPos1, sxy1, mat, width, height) && ClientApp::WorldToScreen(pointPos2, sxy2, mat, width, height)) {
- if (sxy1.x != 0 || sxy1.y != 0 || sxy2.x != 0 || sxy2.y != 0)
- DrawLine(pDevice,sxy1.x, sxy1.y, sxy2.x, sxy2.y, color);
- }
- }
- void draw3DBOX(D3DXVECTOR3 center, D3DXMATRIX mat, float w, float h, D3DCOLOR color)
- {
- //bottom Line
- #define padding 12
- draw3DBoxLines(center, mat, -w, -w, 0, w, -w, 0, color);
- draw3DBoxLines(center, mat, -w, -w, h, w, -w, h, color); //BOTTOM BACK
- //middle Line
- draw3DBoxLines(center, mat, -w, -w, 0, -w, -w, h, color);
- draw3DBoxLines(center, mat, w, -w, 0, w, -w, h, color);
- //top Line
- draw3DBoxLines(center, mat, w, w + padding, 0, w, w + padding, h, color); // TOP
- draw3DBoxLines(center, mat, -w, w + padding, 0, -w, w + padding, h, color); //TOP
- draw3DBoxLines(center, mat, w, w + padding, 0, -w, w + padding, 0, color);// TOP
- draw3DBoxLines(center, mat, w, w + padding, h, -w, w + padding, h, color); // TOP
- //SIDE
- draw3DBoxLines(center, mat, -w, -w, 0, -w, w + padding, 0, color); //SIDE
- draw3DBoxLines(center, mat, w, w + padding, 0, w, -w, 0, color); //SIDE
- draw3DBoxLines(center, mat, -w, -w, h, -w, w + padding, h, color); // RIGHT BACK SIDE
- draw3DBoxLines(center, mat, w, w + padding, h, w, -w, h, color); // LEFT BACK SIDE
- }
- static D3DXVECTOR3 GetBonePosition( Model* pModel, int BoneID )
- {
- D3DXMATRIX result;
- D3DXMATRIX bone = pModel->m_pAnimator->m_Matrix->Bone[BoneID];
- if ( !D3DXMatrixIsIdentity( &bone ) )
- {
- D3DXMatrixMultiply( &result, &bone, &pModel->m_Position );
- return D3DXVECTOR3( result._41, result._42, result._43 );
- }
- }
- static bool InternalW2S( D3DXVECTOR3 vLocal, D3DXVECTOR3& vOut )
- {
- GameMatrix* Matrix = World.GetMatrix();
- D3DXMATRIX ViewMatrix = Matrix->WorldMatrix;
- D3DXMATRIX temp;
- D3DXVECTOR3 vScreen;
- D3DXMatrixTranspose( &temp, &ViewMatrix );
- D3DXVECTOR3 TranslationVector = D3DXVECTOR3( temp._41, temp._42, temp._43 );
- D3DXVECTOR3 Up = D3DXVECTOR3( temp._21, temp._22, temp._23 );
- D3DXVECTOR3 MRight = D3DXVECTOR3( temp._11, temp._12, temp._13 );
- float w = D3DXVec3Dot( &TranslationVector, &vLocal ) + temp._44;
- if ( w < 1.29f )
- {
- vScreen.x = 0;
- vScreen.y = 0;
- return false;
- }
- float y = D3DXVec3Dot( &Up, &vLocal ) + temp._24;
- float x = D3DXVec3Dot( &MRight, &vLocal ) + temp._14;
- vScreen.x = ( Viewport.Width / 2 ) * ( 1 + ( x / w ) );
- vScreen.y = ( Viewport.Height / 2 ) * ( 1 - ( y / w ) );
- vOut.x = vScreen.x;
- vOut.y = vScreen.y;
- return true;
- }
- };
- Bone* Jepoy = NULL;
- D3DCOLOR FLOAT4TOD3DCOLOR(float Col[])
- {
- ImU32 col32_no_alpha = ImGui::ColorConvertFloat4ToU32(ImVec4(Col[0], Col[1], Col[2], Col[3]));
- float a = (col32_no_alpha >> 24) & 255;
- float r = (col32_no_alpha >> 16) & 255;
- float g = (col32_no_alpha >> 8) & 255;
- float b = col32_no_alpha & 255;
- return D3DCOLOR_ARGB((int)a, (int)b, (int)g, (int)r);
- }
- // esp renk checkbox default renk ayarlama
- float debugcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float entitycolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float heritagecolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float esplineplayercolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float esplinebotcolor[] = { 0.0f, 255.45f, 0.0f, 1.00f };
- float espbonecolormale[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float espbonecolorfemale[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float espbonecolordroid[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float esp3dcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float espnamecolor[] = { 0.816f, 0.925f, 0.052f, 1.00f };
- float espdistancecolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float esp2dcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float esppkcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float espitemscolor[] = { 0.036f, 0.962f, 0.928, 1.00f };
- float espplanecolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float espvehiclecolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float espsbcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float espdeadcolor[] = { 255.45f, 84.0f, 242.0f, 12.00f };
- float espfovcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float teleportfov[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float espweaponcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- float espvehicledistancecolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
- HRESULT APIENTRY SetVertexShaderConstantF_hook(LPDIRECT3DDEVICE9 pDevice, UINT StartRegister, const float *pConstantData, UINT Vector4fCount)
- {
- if (pConstantData != NULL)
- {
- mStartregister = StartRegister;
- mVectorCount = Vector4fCount;
- }
- return SetVertexShaderConstantF_orig(pDevice, StartRegister, pConstantData, Vector4fCount);
- }
- float GetDistancexyzxc(float Xx, float Yy, float xX, float yY)
- {
- return sqrt((yY - Yy) * (yY - Yy) + (xX - Xx) * (xX - Xx));
- }
- D3DXVECTOR3 GetEnemyPos(Model* pModel)
- {
- D3DXMATRIX ResultPosition = pModel->m_Position;
- D3DXVECTOR3 GetPosition;
- GetPosition.x = ResultPosition._41;
- GetPosition.y = ResultPosition._42;
- GetPosition.z = ResultPosition._43;
- return GetPosition;
- }
- int GetTarget;
- int MyTarget()
- {
- int Result = -1;
- float ClosestPos = 99999.f;
- D3DXVECTOR3 OnWorld, Screen;
- GameMatrix* Matrix = World.GetMatrix();
- D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
- float ScreenCenterX = (Viewport.Width /2.0f);
- float ScreenCenterY = (Viewport.Height /2.0f);
- int width = (int)Viewport.Width;
- int height = (int)Viewport.Height;
- DWORD Base = (DWORD)GetModuleHandleA(GameBase);
- auto usermodel = (ModelFactory*)(Base + OFFSET_MODELFACTORY);
- float radiusx = aim_fov * (ScreenCenterX / 100.0f);
- float radiusy = aim_fov * (ScreenCenterY / 100.0f);
- if(usermodel->Models.size() != NULL)
- {
- // for(int i = 0; i < usermodel->Models; i+=0x4)
- for(int i = 0; i < usermodel->Models.size(); i++)//pFactory->GetWorld()->m_pVisible.size(); i++)
- {
- Model* pModel = usermodel->Models.at(i);//Model * pModel = (Model*)*(DWORD*)(i + usermodel->skeletonList);//
- string Type = pModel->m_pAnimator->m_pModelName->m_pName;
- bool isMale = findnew(Type,DataMale);
- bool isFemale = findnew(Type,DataFemale);
- int Distance = GetDistance(MyLoCalPos(),GetEnemyPos(pModel),10);
- if(isMale)
- {
- if(stack.aim.target == 1)GetTarget = 14;
- if(stack.aim.target == 2)GetTarget = 33;
- if(stack.aim.target == 3)GetTarget = 56;
- if(Distance > 1)
- {
- if(GetUserBoneInternal(pModel, OnWorld, GetTarget) && ClientApp::WorldToScreen(OnWorld, Screen, worldMatrix, width, height))
- {
- float Dist = GetDistance(Screen.x, Screen.y, ScreenCenterX, ScreenCenterY);
- if(Screen.x >= ScreenCenterX - radiusx && Screen.x <= ScreenCenterX + radiusx && Screen.y >= ScreenCenterY - radiusy && Screen.y <= ScreenCenterY + radiusy)
- if(Dist < ClosestPos)
- {
- ClosestPos = Dist;
- Result = i;
- }
- }
- }
- }else
- if(isFemale)
- {
- if(stack.aim.target == 1)GetTarget = 16;
- if(stack.aim.target == 2)GetTarget = 35;
- if(stack.aim.target == 3)GetTarget = 65;
- if(Distance > 1)
- {
- if(GetUserBoneInternal(pModel, OnWorld, GetTarget) && ClientApp::WorldToScreen(OnWorld, Screen, worldMatrix, width, height))
- {
- float Dist = GetDistance(Screen.x, Screen.y, ScreenCenterX, ScreenCenterY);
- if(Screen.x >= ScreenCenterX - radiusx && Screen.x <= ScreenCenterX + radiusx && Screen.y >= ScreenCenterY - radiusy && Screen.y <= ScreenCenterY + radiusy)
- if(Dist < ClosestPos)
- {
- ClosestPos = Dist;
- Result = i;
- }
- }
- }
- }
- }
- }
- return Result;
- }
- void* GetDictionaryObject(Entity* pObject, char *pType)
- {
- for (int i = 0; i < (*(PDWORD)pObject->mTable + 0x8); i++) {
- const auto table = pObject->mTable->m_PtrTable;
- const auto& entry = table[i];
- if (strcmp(entry.name->name, pType) == 0)
- {
- return (void*)entry.data;
- }
- }
- }
- DWORD Distancetele(LPDIRECT3DDEVICE9 pDevice)
- {
- int maxdistance = 99999;
- DWORD Near = 0;
- DWORD BAddress = (DWORD)GetModuleHandleA(GameBase);
- ListItem * CurentItem = pMainApp->m_ClientApp->m_pFirst->m_pStart;
- while (CurentItem && CurentItem != pMainApp->m_ClientApp->m_pFirst->m_pEnd)
- {
- DWORD IdObject = 0;
- DWORD ResultDcrypt = 0;
- DWORD AddLocalPlayer = 0;
- IdObject = CurentItem->m_ObjectId;
- ResultDcrypt = oriDec(pMainApp->m_ClientApp, IdObject, 0);
- AddLocalPlayer = *(DWORD*)(*(DWORD*)(BAddress + OFFSET_LOCAL));
- if (ResultDcrypt > 0 && AddLocalPlayer > 0)
- {
- CEntity* curEntity = (CEntity*)ResultDcrypt;
- string pMeta_str(curEntity->m_pMeta->pName);
- bool isLocal = (std::string::npos != pMeta_str.find(PlayerAvatar));
- bool isPlayer = (std::string::npos != pMeta_str.find(Avatar));
- bool isBot = (std::string::npos != pMeta_str.find(Robot));
- if (isPlayer)
- {
- int teamplayer = curEntity->m_Table->pTable->m_TeamRow->mVal;
- int poserow = curEntity->m_Table->pTable->m_PoseRow->mVal;
- int playerhealth = curEntity->m_Table->pTable->m_HpRow->HP;
- D3DXVECTOR3 EnemyPos = GetDecryptedPos(curEntity);
- D3DXVECTOR3 MyPosition = MyLoCalPos();
- if (playerhealth > 0)
- {
- /* if (localteam != teamplayer)
- {
- if (poserow != 3)
- {*/
- int distance = GetDistance(MyPosition, EnemyPos, 10);
- if (distance < maxdistance)
- {
- maxdistance = distance;
- Near = (DWORD)curEntity;
- }
- }
- // }
- //}
- }
- }
- CurentItem = CurentItem->m_pNext;
- }
- return Near;
- }
- DWORD Distancecross(LPDIRECT3DDEVICE9 pDevice)
- {
- int maxdistance = 99999;
- DWORD Near = 0;
- DWORD BAddress = (DWORD)GetModuleHandleA(GameBase);
- GameMatrix* Matrix = World.GetMatrix();
- D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
- D3DVIEWPORT9 viewP;
- pDevice->GetViewport(&viewP);
- DWORD width = viewP.Width;
- DWORD height = viewP.Height;
- float ScreenX = viewP.Width / 2;
- float ScreenY = viewP.Height / 2;
- float PosX = 0.0f, PosY = 0.0f;
- ListItem * CurentItem = pMainApp->m_ClientApp->m_pFirst->m_pStart;
- while (CurentItem && CurentItem != pMainApp->m_ClientApp->m_pFirst->m_pEnd)
- {
- /*for (auto cIdentity : EntityList2)
- {*/
- DWORD IdObject = 0;
- DWORD ResultDcrypt = 0;
- DWORD AddLocalPlayer = 0;
- IdObject = CurentItem->m_ObjectId;
- ResultDcrypt = oriDec(pMainApp->m_ClientApp, IdObject, 0);
- AddLocalPlayer = *(DWORD*)(*(DWORD*)(BAddress + OFFSET_LOCAL));
- if (ResultDcrypt > 0 && AddLocalPlayer > 0)
- {
- CEntity* curEntity = (CEntity*)ResultDcrypt;
- string pMeta_str(curEntity->m_pMeta->pName);
- bool isLocal = (std::string::npos != pMeta_str.find(PlayerAvatar));
- bool isPlayer = (std::string::npos != pMeta_str.find(Avatar));
- bool isBot = (std::string::npos != pMeta_str.find(Robot));
- if (isPlayer || isBot)
- {
- int teamplayer = curEntity->m_Table->pTable->m_TeamRow->mVal;
- int poserow = curEntity->m_Table->pTable->m_PoseRow->mVal;
- D3DXVECTOR3 EnemyPos = GetDecryptedPos(curEntity);
- D3DXVECTOR3 MyPosition = MyLoCalPos();
- int distance = GetDistance(MyPosition, EnemyPos, 10);
- D3DXVECTOR3 vHeadScreen;
- D3DXVECTOR3 eHead(EnemyPos.x, EnemyPos.y + 16.5f, EnemyPos.z);
- if (ClientApp::WorldToScreen(eHead, vHeadScreen, worldMatrix, width, height))
- {
- int playerhealth = curEntity->m_Table->pTable->m_HpRow->HP;
- if (playerhealth > 0)
- {
- /*int localteam = LocalTeam();
- if (localteam != teamplayer)
- {
- if (poserow != 3)
- {*/
- if(poserow == 3)
- if (playerhealth > 0)
- {
- PosX = vHeadScreen.x > ScreenX ? vHeadScreen.x - ScreenX : ScreenX - vHeadScreen.x;
- PosY = vHeadScreen.y > ScreenY ? vHeadScreen.y - ScreenY : ScreenY - vHeadScreen.y;
- float Tmp1 = sqrt(PosX*PosX + PosY*PosY);
- if (Tmp1 < maxdistance)
- {
- maxdistance = Tmp1;
- Near = (DWORD)curEntity;
- }
- }
- }
- }
- }
- }
- CurentItem = CurentItem->m_pNext;
- }
- return Near;
- }
- void PlayerTelekill( LPDIRECT3DDEVICE9 pDevice)
- {
- DWORD BAddress = (DWORD)GetModuleHandleA(GameBase);
- GameMatrix* Matrix = World.GetMatrix();
- D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
- DWORD fnClLocalPlayer = (DWORD)(BAddress + OFFSET_LOCAL);
- DWORD tmp = *(PDWORD)*(PDWORD)(fnClLocalPlayer);
- D3DXVECTOR3 MyPos = MyLoCalPos();
- bool teleported = false;
- DWORD HOTKEY = NULL;
- if(stack.teleport.hotkey == 1) HOTKEY = VK_SHIFT;
- if(stack.teleport.hotkey == 2) HOTKEY = 'G';
- if(stack.teleport.hotkey == 3) HOTKEY = 'T';
- if(stack.teleport.hotkey == 4) HOTKEY = VK_CAPITAL;
- if(stack.teleport.hotkey == 5) HOTKEY = 'V';
- if (stack.teleport.telekill)
- {
- if (GetAsyncKeyState(HOTKEY)) teleported=!teleported;
- {
- if(teleported)
- {
- DWORD Neartele = 0;
- if(stack.teleport.type == 1)Neartele = Distancetele(pDevice);
- if(stack.teleport.type == 2)Neartele = Distancecross(pDevice);
- //switch ((int)stack.teleport.type)
- //{
- //case 1: Neartele = Distancetele(pDevice); break;//Distance
- //case 2: Neartele = Distancecross(pDevice); break;//Crosshair
- //default: Neartele = Distancetele(pDevice);//Distance
- //}
- DWORD DecX = *(DWORD*)(Neartele + 0x10) ^ *(DWORD*)(*(DWORD*)(Neartele + 0x14));
- DWORD DecY = *(DWORD*)(Neartele + 0x18) ^ *(DWORD*)(*(DWORD*)(Neartele + 0x1C));
- DWORD DecZ = *(DWORD*)(Neartele + 0x20) ^ *(DWORD*)(*(DWORD*)(Neartele + 0x24));
- float PosX1 = *reinterpret_cast<float*>(&DecX);
- float PosY1 = *reinterpret_cast<float*>(&DecY);
- float PosZ1 = *reinterpret_cast<float*>(&DecZ);
- float PosX = PosX1 - 4.5;
- float PosY = PosY1 - 2;
- float PosZ = PosZ1 - 4.5;
- DWORD PosX2 = *reinterpret_cast<DWORD*>(&PosX);
- DWORD PosY2 = *reinterpret_cast<DWORD*>(&PosY);
- DWORD PosZ2 = *reinterpret_cast<DWORD*>(&PosZ);
- DWORD EncX = PosX2 ^ *(DWORD*)(*(DWORD*)(tmp + 0x14));
- DWORD EncY = PosY2 ^ *(DWORD*)(*(DWORD*)(tmp + 0x1C));
- DWORD EncZ = PosZ2 ^ *(DWORD*)(*(DWORD*)(tmp + 0x24));
- *(DWORD*)(tmp + 0x10) = EncX;
- *(DWORD*)(tmp + 0x18) = EncY;
- *(DWORD*)(tmp + 0x20) = EncZ;
- }
- }
- }
- }
- int PosX = 10;
- int PosY = 10;
- int SizeRadar = 150;
- D3DXVECTOR2 Coordinate(D3DXVECTOR3 Enemy, D3DXVECTOR3 Local, float Angle, int Dist, float PosX, float PosY)
- {
- D3DXVECTOR2 Coord, Return;
- float dX = Enemy.x - Local.x;
- float dY = Enemy.z - Local.z;
- Coord.x = -(dX * (cos(Angle) * 2.5) - dY * (sin(Angle) * 2.5)) / SizeRadar;
- Coord.y = (dX * (sin(Angle) * 2.5) + dY * (cos(Angle) * 2.5)) / SizeRadar;
- Return.x = Coord.x + PosX + (SizeRadar / 2);
- Return.y = Coord.y + PosY + (SizeRadar / 2);
- if(Return.x > (PosX + SizeRadar))Return.x = (PosX + SizeRadar);
- else if(Return.x < PosX)Return.x = PosX;
- if(Return.y > (PosY + SizeRadar))Return.y = (PosY + SizeRadar);
- else if(Return.y < PosY)Return.y = PosY;
- return Return;
- }
- DWORD LocalTeam()
- {
- DWORD Myteamid;
- DWORD BASE = (DWORD)GetModuleHandleA("ros.exe");
- DWORD pBase = *(DWORD*)(BASE + OFFSET_LOCAL);
- DWORD pBase1 = *(DWORD*)(pBase);
- DWORD pBase2 = *(DWORD*)(pBase1 + 0x138);
- DWORD pBase3 = *(DWORD*)(pBase2 + 0x14);
- DWORD pBase4 = *(DWORD*)(pBase3 + 0x5F0);
- if (pBase && pBase1 &&pBase2 &&pBase3 &&pBase4 &&pBase1)
- {
- Myteamid = *(DWORD*)(pBase4 + 0x8);
- }
- return Myteamid;
- }
- void RenderRadar(LPDIRECT3DDEVICE9 pDevice)
- {
- if(stack.d3d.radar)
- {
- //DrawBox(PosX, PosY, SizeRadar, SizeRadar, BOXCOL);
- DrawBorder(PosX, PosY, SizeRadar, SizeRadar, 1, BLACK(255), pDevice);
- FillRGB(PosX, PosY + (SizeRadar / 2) + 2 / SizeRadar, SizeRadar, 1, BLACK(255), pDevice);
- FillRGB(PosX + (SizeRadar / 2) + 2 / SizeRadar, PosY, 1, SizeRadar, BLACK(255), pDevice);
- FillRGB(PosX + (SizeRadar / 2) - 1, PosY + (SizeRadar / 2) - 1, 3, 3, WHITE(255), pDevice);
- }
- }
- void esper(LPDIRECT3DDEVICE9 pDevice)
- {
- DWORD Modules = (DWORD)GetModuleHandleA(GameBase);
- GameMatrix* Matrix = World.GetMatrix();
- D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
- int width = (int)Viewport.Width;
- int height = (int)Viewport.Height;
- int DrawX = (int)Viewport.Width / 2;
- int DrawY = (int)Viewport.Height / 2;
- float ScreenCenterX = (Viewport.Width / 2.0f);
- float ScreenBottomY = (Viewport.Height);
- ListItem * CurentItem = pMainApp->m_ClientApp->m_pFirst->m_pStart;
- while (CurentItem && CurentItem != pMainApp->m_ClientApp->m_pFirst->m_pEnd)
- {
- DWORD IdObject = 0;
- DWORD ResultDcrypt = 0;
- DWORD AddLocalPlayer = 0;
- IdObject = CurentItem->m_ObjectId;
- ResultDcrypt = oriDec(pMainApp->m_ClientApp, IdObject, 0);
- AddLocalPlayer = *(DWORD*)(*(DWORD*)(Modules + OFFSET_LOCAL));
- if (ResultDcrypt > 0 && AddLocalPlayer > 0)
- {
- CEntity* curEntity = (CEntity*)ResultDcrypt;
- CEntity* MyEntity = (CEntity*)AddLocalPlayer;
- Entity* ent = (Entity*)ResultDcrypt;
- D3DXVECTOR3 MyPos, EnemyPos;
- D3DXVECTOR3 vScreen;
- EnemyPos = GetDecryptedPos(curEntity);
- MyPos = GetDecryptedPos(MyEntity);
- int propID = curEntity->m_Table->pTable->Prop->mVal;
- int pDistance = GetDistance(MyPos, EnemyPos, 10);
- int Health = curEntity->m_Table->pTable->m_HpRow->HP;
- int botHealth = curEntity->m_Table->pTable->m_Hpbot->HP;
- D3DXVECTOR3 eHead(EnemyPos.x, EnemyPos.y + 21.5f, EnemyPos.z);
- D3DXVECTOR3 pHead;
- D3DXVECTOR3 eFoot(EnemyPos.x, EnemyPos.y + 12.5f, EnemyPos.z);
- D3DXVECTOR3 pFoot;
- D3DXVECTOR3 pRoot;
- float entityHeight = 12.5; // 12.5 -> body
- ClientApp::WorldToScreen(EnemyPos, pRoot, worldMatrix, width, height);
- ClientApp::WorldToScreen(eFoot, pFoot, worldMatrix, width, height);
- ClientApp::WorldToScreen(eHead, pHead, worldMatrix, width, height);
- struct Rectangle
- {
- int width;
- int height;
- int X;
- int Y;
- };
- Rectangle rect;
- rect.width = (int)(700 / pDistance);
- if (rect.width > 100)
- {
- rect.width = 100;
- }
- rect.height = (int)(pRoot.y - pHead.y);
- rect.X = (int)pRoot.x - rect.width / 2;
- rect.Y = (int)pRoot.y - rect.height;
- if (pDistance > 25)
- {
- rect.Y = (int)pRoot.y - rect.height + 15;
- }
- string pMeta_str(curEntity->m_pMeta->pName);
- bool Enemy = (std::string::npos != pMeta_str.find("BattleGroundAvatar"));
- bool DumpLocal = (std::string::npos != pMeta_str.find("PlayerBattleGround"));
- bool isLocal = (std::string::npos != pMeta_str.find(PlayerAvatar));
- bool isPlayer = (std::string::npos != pMeta_str.find(Avatar));
- bool isBot = (std::string::npos != pMeta_str.find(Robot));
- bool isTeamMate = (std::string::npos != pMeta_str.find("Team"));
- bool isItem = (std::string::npos != pMeta_str.find("DtsProp"));
- bool isSupplyBox = (std::string::npos != pMeta_str.find("DtsPlayerHeritage"));
- bool isPlane = (std::string::npos != pMeta_str.find("Plane"));
- bool isWeapon = (std::string::npos != pMeta_str.find("ClientWeaponEntity"));
- bool isCar = (std::string::npos != pMeta_str.find("LandCar"));
- bool isBicycle = (std::string::npos != pMeta_str.find("LandBike"));
- bool isLandCraft = (std::string::npos != pMeta_str.find("LandCraft"));
- bool isExpress = (std::string::npos != pMeta_str.find("LandExpress"));
- bool isMotor = (std::string::npos != pMeta_str.find("LandMotor"));
- bool isGlider = (std::string::npos != pMeta_str.find("LandGlider"));
- bool isBoat = (std::string::npos != pMeta_str.find("LandBoat"));
- bool isHover = (std::string::npos != pMeta_str.find("LandHover"));
- bool isBattleGround = (std::string::npos != pMeta_str.find("BattleGroundSpace"));
- bool isSupportDroid = (std::string::npos != pMeta_str.find("PetUnit"));
- auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
- DWORD LocalPlayer = *(PDWORD)*(PDWORD)(uBase + OFFSET_LOCAL);
- auto MyEntity = (CEntity*)LocalPlayer;
- float myYaw = *(PFLOAT)(LocalPlayer + 0x90);
- if(stack.d3d.radar)
- {
- if(isPlayer)
- {
- if(curEntity->m_Table->pTable->m_HpRow->HP > 0)
- //if(GetHealth(Entity) > 0)
- {
- if(!LocalTeam())
- {
- float Angle = D3DXToRadian(D3DXToDegree(myYaw) + 180);
- D3DXVECTOR2 Player = Coordinate(EnemyPos, MyPos, Angle, pDistance, PosX, PosY);
- FillRGB(Player.x, Player.y, 3, 3, RED(255), pDevice);
- char Dist[100];
- sprintf(Dist, "%d", pDistance);
- DrawCenteredString(Font, Player.x + 2, Player.y, PINK(255), Dist);
- }
- }
- }else
- if(Robot)
- {
- float Angle = D3DXToRadian(D3DXToDegree(myYaw) + 180);
- D3DXVECTOR2 Player = Coordinate(EnemyPos, MyPos, Angle, pDistance, PosX, PosY);
- FillRGB(Player.x, Player.y, 3, 3, GREEN(255), pDevice);
- }
- }
- #pragma region TableDumper
- // if(stack.server.two)
- // {
- // if(std::string(curEntity->m_pMeta->pName) == "BattleGroundAvatar")
- // //if(findnew(pMeta_str,"BattleGroundAvatar"))
- // {
- // CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
- //if(tbl && tbl->iPtrLog)
- //for(int i = 1; i <= MAXTABLE; i++)
- // {
- //auto Address = (tbl + i);
- //if(tbl->iPtrLog[i].pType==NULL)
- //continue;
- //if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
- //continue;
- //Log("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
- ////pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
- // }
- // }
- // }
- //
- if(stack.server.one)
- {
- if(isPlayer)
- {
- CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
- if(tbl && tbl->iPtrLog)
- for(int i = 1; i <= MAXTABLE; i++)
- {
- auto Address = (tbl + i);
- if(tbl->iPtrLog[i].pType==NULL)
- continue;
- if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
- continue;
- pLog->MyLogger("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
- }
- }
- }
- /*
- if(stack.server.three)
- {
- if(isBattleGround)
- {
- CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
- if(tbl && tbl->iPtrLog)
- for(int i = 1; i <= MAXTABLE; i++)
- {
- auto Address = (tbl + i);
- if(tbl->iPtrLog[i].pType==NULL)
- continue;
- if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
- continue;
- pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
- }
- }
- }
- if(stack.server.four)
- {
- if(isBot)
- {
- CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
- if(tbl && tbl->iPtrLog)
- for(int i = 1; i <= MAXTABLE; i++)
- {
- auto Address = (tbl + i);
- if(tbl->iPtrLog[i].pType==NULL)
- continue;
- if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
- continue;
- pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
- }
- }
- }
- if(stack.server.five)
- {
- if(isExpress)
- {
- CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
- if(tbl && tbl->iPtrLog)
- for(int i = 1; i <= MAXTABLE; i++)
- {
- auto Address = (tbl + i);
- if(tbl->iPtrLog[i].pType==NULL)
- continue;
- if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
- continue;
- pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
- }
- }
- }
- if(stack.server.six)
- {
- if(isCar)
- {
- CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
- if(tbl && tbl->iPtrLog)
- for(int i = 1; i <= MAXTABLE; i++)
- {
- auto Address = (tbl + i);
- if(tbl->iPtrLog[i].pType==NULL)
- continue;
- if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
- continue;
- pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
- }
- }
- }
- if(stack.server.seven)
- {
- if(isMotor)
- {
- CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
- if(tbl && tbl->iPtrLog)
- for(int i = 1; i <= MAXTABLE; i++)
- {
- auto Address = (tbl + i);
- if(tbl->iPtrLog[i].pType==NULL)
- continue;
- if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
- continue;
- pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
- }
- }
- }
- if(stack.server.eight)
- {
- if(isSupportDroid)
- {
- CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
- if(tbl && tbl->iPtrLog)
- for(int i = 1; i <= MAXTABLE; i++)
- {
- auto Address = (tbl + i);
- if(tbl->iPtrLog[i].pType==NULL)
- continue;
- if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
- continue;
- pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
- }
- }
- }
- */
- #pragma endregion
- if(stack.d3d.radar)
- {
- float PosX = Viewport.Width / 2 - 500;
- float PosY = Viewport.Height / 2 - 100;
- if(isPlayer || isBot)
- {
- WorldToRadar(pDevice, curEntity, PosX, PosY, 150, 4);
- }
- }
- if (isLocal)
- continue;
- bool banned = false;
- if(GetTotalKills() == 10)
- {
- banned = true;
- }
- if (ClientApp::WorldToScreen(EnemyPos, vScreen, worldMatrix, width, height))
- {
- if (stack.esp.box2d)
- {
- if (isPlayer || isBot)
- {
- Box2D(pHead, pRoot, FLOAT4TOD3DCOLOR(esp2dcolor), pDevice);
- }
- }
- if (stack.esp.esptext)
- {
- if (isPlayer)
- {
- string Nicknames = curEntity->m_Table->pTable->m_NickRow->m_NickName;
- char* chrNick = const_cast<char*>(Nicknames.c_str());
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espnamecolor), chrNick);
- }
- if (isBot)
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espnamecolor), bata);
- }
- if(isSupportDroid)
- {
- DrawCenteredString(Font,vScreen.x,vScreen.y,BLUE(255),"Support Droid");
- }
- }
- if (stack.esp.box3d)
- {
- if (isPlayer || isBot)
- {
- //Jepoy->draw3DBOX(EnemyPos,Matrix->WorldMatrix,5,10,FLOAT4TOD3DCOLOR(esp3dcolor));
- Box3D(pDevice, pHead.x, pHead.y, pRoot.x, pRoot.y, pDistance, FLOAT4TOD3DCOLOR(esp3dcolor));
- }
- }
- if (stack.esp.line)
- {
- DWORD LineX;
- DWORD LineY;
- if (stack.esp.line == 1)
- {
- LineX = Viewport.Width / 2;
- LineY = 0;
- }
- if (stack.esp.line == 2)
- {
- LineX = Viewport.Width / 2;
- LineY = Viewport.Height / 2;
- }
- if (stack.esp.line == 3)
- {
- LineX = Viewport.Width / 2;
- LineY = Viewport.Height;
- }
- if (isPlayer)
- {
- DrawLine(pDevice, LineX, LineY, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(esplineplayercolor));
- }
- if (isBot)
- {
- DrawLine(pDevice, LineX, LineY, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(esplinebotcolor));
- }
- }
- if (stack.esp.espplane)
- {
- if (isPlane)
- {
- Box3D(pDevice, pHead.x, pHead.y, pRoot.x, pRoot.y, pDistance, FLOAT4TOD3DCOLOR(espplanecolor));
- }
- }
- if (stack.esp.healthbar)
- {
- if (isPlayer)
- {
- Rainbowbar(pDevice,vScreen.x - 45,vScreen.y + 65,curEntity->m_Table->pTable->m_HpRow->HP);
- //ResizingHealthbar(pDevice,pHead.y,pRoot.y,pDistance,Health,true);//(pHead, vScreen, Health, pDevice);
- //CallImGuiHealth(D3DXVECTOR3(EnemyPos.x,EnemyPos.y,EnemyPos.z),D3DXVECTOR3(pHead.x,pHead.y,pHead.z),curEntity->m_Table->pTable->m_HpRow->HP,5);
- }
- if (isBot)
- {
- //ImGui::ProgressBar(Health,ImVec2(vScreen.x,vScreen.y),"FULL HP");
- DrawHealthBars(pHead,vScreen,botHealth,pDevice);//Healthbar(pDevice,vScreen.x,vScreen.y,botHealth,1,pDistance);//(pHead, vScreen, botHealth, pDevice);
- }
- }
- if (stack.esp.distance)
- {
- if (isPlayer || isBot)
- {
- char distbuff[1000];
- sprintf(distbuff, "[ %d m ]", pDistance);
- DrawCenteredString(Font, vScreen.x, vScreen.y + 17, FLOAT4TOD3DCOLOR(espdistancecolor), (PCHAR)distbuff);
- }
- }
- if (stack.esp.distancevehicle)
- {
- if (isCar || isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
- {
- char distbuff[1000];
- sprintf(distbuff, "[ %d m ]", pDistance);
- DrawCenteredString(Font, vScreen.x, vScreen.y + 17, FLOAT4TOD3DCOLOR(espvehicledistancecolor), (PCHAR)distbuff);
- }
- }
- if (stack.esp.playerkills)
- {
- if (isPlayer)
- {
- char killsbuff[1000];
- sprintf(killsbuff, " Kills = %d", curEntity->m_Table->pTable->m_PlayerKill->mVal);
- DrawCenteredString(Font, vScreen.x, vScreen.y + 34, FLOAT4TOD3DCOLOR(esppkcolor), (PCHAR)killsbuff);
- }
- }
- if (stack.esp.items)
- {
- const char* items = getitemname(propID);
- wchar_t* buff = (wchar_t*)getitemname(propID);
- if (isItem)
- {
- if(propID == 3 || propID == 7 || propID == 10 || propID == 19 || propID == 102 || propID == 103 || propID == 106 || propID == 1001 || propID == 1006 || propID == 1007 || propID == 1009 || propID == 1102 || propID == 1103 || propID == 1201 || propID == 1201 || propID == 1253 || propID == 1273 || propID == 1274 || propID == 1275)
- //if(Level3Check(curEntity) && RareItem(curEntity))
- {
- DrawShadowString(buff,vScreen.x,vScreen.y,0,255,0,Font);
- }
- if(propID == 1 || propID == 2 || propID == 5 || propID == 6 || propID == 8 || propID == 9
- || propID == 50 || propID == 101 || propID == 105 || propID == 1002 || propID == 1003 || propID == 1004 || propID == 1005
- || propID == 1008 || propID == 1010 || propID == 1011 || propID == 102 || propID == 1013 || propID == 1014 || propID == 1015
- || propID == 1017 || propID == 1018 || propID == 1019 || propID == 1020 || propID == 1021 || propID == 1022 || propID == 1023
- || propID == 1024 || propID == 1025 || propID == 1026 || propID == 1027 || propID == 1031 || propID == 1040 || propID == 1406
- || propID == 1104 || propID == 1105 || propID == 1106 || propID == 1109 || propID == 1202 || propID == 1204 || propID == 1211
- || propID == 1212 || propID == 1213 || propID == 1221 || propID == 1222 || propID == 1223 || propID == 1231 || propID == 1241
- || propID == 1242 || propID == 1251 || propID == 1252 || propID == 1261 || propID == 1262 || propID == 1263 || propID == 1265
- || propID == 1266 || propID == 1271 || propID == 1272 || propID == 1276 || propID == 1277 || propID == 1278 || propID == 1279
- || propID == 1302 || propID == 1303 || propID == 1306 || propID == 1307 || propID == 1401 || propID == 1402 || propID == 1403
- || propID == 1404 || propID == 1405)
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espitemscolor), (PCHAR)items);
- }
- }
- }
- if (stack.esp.weapon)
- {
- if (isPlayer || isBot)
- {
- const char* items = getitemname(curEntity->m_Table->pTable->Prop->mVal);
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espweaponcolor), (PCHAR)items);
- }
- }
- if (stack.esp.supplybox)
- {
- if (isSupplyBox)
- {
- if(curEntity->m_Table->pTable->m_HerRow->herLen > 0)
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espdeadcolor), "Loot");
- }
- else
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espsbcolor), "Supply Box");
- }
- }
- }
- if (stack.esp.vehicle)
- {
- if (isCar) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Car");
- }
- if (isBicycle) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Bicycle");
- }
- if (isExpress) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Express");
- }
- if (isMotor) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Motor");
- }
- if (isGlider) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Glider");
- }
- if (isBoat) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Boat");
- }
- if (isHover) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
- {
- DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Hover");
- }
- }
- POINT cr;
- cr.x = width / 2;
- cr.y = height / 2;
- if(stack.esp.heritagefov)
- {
- float radiusx = heritage_fov * (ScreenCX / 100 );
- float radiusy = heritage_fov * (ScreenCY / 100 );
- float point = (radiusx + radiusy ) /2 ;
- DrawFOV(pDevice,ScreenCX,ScreenCY,point,FLOAT4TOD3DCOLOR(heritagecolor));
- }
- D3DXVECTOR3 OnWorld, Screen;
- float radiusx = heritage_fov * (ScreenCX / 100.0f);
- float radiusy = heritage_fov * (ScreenCY / 100.0f);
- float ClosestPos = 99999.f;
- #pragma region ItemInside
- if(stack.esp.heritage)
- {
- if (InsideCircleX(cr, 150, vScreen.x, vScreen.y)) {
- auto dropsAddr = *(PDWORD)((DWORD)(curEntity->m_Table->pTable) + (0xC * 3) + 0x8);
- int maxCount = *(PDWORD)(dropsAddr + 0x8);
- auto itemTuple = *(PDWORD)(dropsAddr + 0x14);
- int itemX = vScreen.x;
- int itemY = vScreen.y + 30;
- for (int index = 0; index < maxCount; index++) {
- auto items = *(PDWORD)(itemTuple + (0xC * index) + 0x8);
- auto itemData = *(PDWORD)(items + 0xC);
- auto itemID = *(PDWORD)(itemData + 0x8);
- /* char buffer[1000];
- const char* Items = getnewitem(itemID);
- sprintf(buffer,"%s",Items);*/
- string item1 = getnewitem(itemID);
- char* printitem = const_cast<char*>(item1.c_str());
- if(isSupplyBox)
- {
- DrawCenteredString(Font, itemX, itemY, YELLOW(255),(PCHAR) printitem);
- }
- itemY += 15;
- }
- }
- }
- #pragma endregion
- /* DWORD KeyX = 0,KeyY=0,KeyZ=0,EncX=0,EncY=0,EncZ=0;
- DWORD FinalX,FinalY,FinalZ;
- KeyX = curEntity->XKey->Val;
- KeyY = curEntity->YKey->Val;
- KeyZ = curEntity->ZKey->Val;
- EncX = curEntity->EncryptedX;
- EncY = curEntity->EncryptedY;
- EncZ = curEntity->EncryptedZ;*/
- //30 = 5
- //60 = 10
- //90 = 15
- //120 = 20
- //150 = 25
- /* if(stack.teleport.fov)
- {
- float radiusx = teleport_fov * (ScreenCX / 100 );
- float radiusy = teleport_fov * (ScreenCY / 100 );
- float point = (radiusx + radiusy ) /2 ;
- DrawFOV(pDevice,ScreenCX,ScreenCY,point,FLOAT4TOD3DCOLOR(teleportfov));
- }*/
- /* D3DXVECTOR3 Screen1;
- float radiusxx = teleport_fov * (ScreenCX / 100.0f);
- float radiusyy = teleport_fov * (ScreenCY / 100.0f);
- if(stack.teleport.telekill)
- {
- if(Screen1.x >= ScreenCenterX - radiusxx && Screen1.x <= ScreenCenterX + radiusxx && Screen1.y >= ScreenCY - radiusyy && Screen1.y <= ScreenCY + radiusyy)
- {
- if(pDistance < ClosestPos)
- {
- ClosestPos = pDistance;
- }
- if(isPlayer && Health != 0 )
- {
- if(GetAsyncKeyState(Hotkey)) teleported=!teleported;
- if(teleported)
- {
- MyEntity->EncryptedX = EncX;
- MyEntity->EncryptedY = EncY;
- MyEntity->EncryptedZ = EncZ;
- MyEntity->XKey->Val = KeyX;
- MyEntity->YKey->Val = KeyY;
- MyEntity->ZKey->Val = KeyZ;
- if(stack.teleport.yesbot)
- {
- if(isBot)
- {
- MyEntity->EncryptedX = EncX;
- MyEntity->EncryptedY = EncY;
- MyEntity->EncryptedZ = EncZ;
- MyEntity->XKey->Val = KeyX;
- MyEntity->YKey->Val = KeyY;
- MyEntity->ZKey->Val = KeyZ;
- }
- }
- }
- }
- }
- }*/
- if (banned)
- {
- DrawCenteredString(Font, (int)Viewport.Width/2, (int)Viewport.Height/2, D3DCOLOR_ARGB(255, 255, 255, 255), "WARNING ! YOU REACHED 10 KILLS PRONE IN (3-10 DAYS BANNED) or MASSIVE REPORT");
- static DWORD lastTime = timeGetTime();
- DWORD timePassed = timeGetTime() - lastTime;
- if (timePassed>2000)
- {
- banned = false;
- lastTime = timeGetTime();
- }
- }
- }
- }
- CurentItem = CurentItem->m_pNext;
- }
- }
- /*Present*/
- HWND g_hFolderView;
- ////////////////////////////////
- // Find Desktop ListView, Part 1
- ////////////////////////////////
- //
- //BOOL CALLBACK FindDLV(HWND hWndPM, LPARAM lParam)
- //{
- // HWND hWnd = FindWindowEx(hWndPM, NULL, ("SHELLDLL_DefView"), NULL);
- //
- // if (hWnd)
- // {
- // // Gotcha!
- // HWND *phWnd = (HWND *)lParam;
- // *phWnd = hWnd;
- //
- // return false;
- // }
- //
- // return true;
- //}
- //
- //////////////////////////////////
- //// Find Desktop ListView, Part 2
- //////////////////////////////////
- //
- //HWND FindDesktopListView()
- //{
- // HWND hWndPM = FindWindowEx(NULL, NULL, ("Progman"), NULL);
- //
- // if (!hWndPM)
- // return NULL;
- //
- // HWND hWnd = FindWindowEx(hWndPM, NULL, ("SHELLDLL_DefView"), NULL);
- //
- // if (!hWnd)
- // {
- // EnumWindows(FindDLV, LPARAM((HWND *)&hWnd));
- //
- // // Strange, no Desktop ListView found!?
- // if (!hWnd)
- // return NULL;
- // }
- //
- // HWND hWndLV = FindWindowEx(hWnd, NULL, ("SysListView32"), NULL);
- //
- // return hWndLV;
- //}
- //
- //
- //
- //
- void DrawBone(Model* pModel, int BoneIndexStart, int BoneIndexEnd,LPDIRECT3DDEVICE9 pDevice,float Color)
- {
- GameMatrix* Matrix = World.GetMatrix();
- D3DXMATRIX cameraBase = Matrix->WorldMatrix;
- int width = (int)Viewport.Width;
- int height = (int)Viewport.Height;
- D3DXVECTOR3 OnWorldA;
- D3DXVECTOR3 OnWorldB;
- D3DXVECTOR3 OnScreenA,OnScreenB;
- OnScreenA.x=0;
- OnScreenA.y=0;
- OnScreenB.x=0;
- OnScreenB.y=0;
- if( GetUserBoneInternal(pModel,OnWorldA,BoneIndexStart) &&
- GetUserBoneInternal(pModel,OnWorldB,BoneIndexEnd)&&
- ClientApp::WorldToScreen(OnWorldA,OnScreenA,cameraBase,width,height)&&
- ClientApp::WorldToScreen(OnWorldB,OnScreenB,cameraBase,width,height))
- {
- DrawLineBonz(pDevice,OnScreenA.x,OnScreenA.y,OnScreenB.x,OnScreenB.y,100,Color);
- }
- }
- bool smooth = false;
- void AimAtPos(float x, float y, LPDIRECT3DDEVICE9 pDevice)
- {
- int ScreenCenterY = (int)Viewport.Height * 0.5f;
- int ScreenCenterX = (int)Viewport.Width * 0.5f;
- float AimSpeed = 1;
- float TargetX = 0;
- float TargetY = 0;
- //X Axis
- if (x != 0)
- {
- if (x > ScreenCenterX)
- {
- TargetX = -(ScreenCenterX - x);
- TargetX /= AimSpeed;
- if (TargetX + ScreenCenterX > ScreenCenterX * 2) TargetX = 0;
- }
- if (x < ScreenCenterX)
- {
- TargetX = x - ScreenCenterX;
- TargetX /= AimSpeed;
- if (TargetX + ScreenCenterX < 0) TargetX = 0;
- }
- }
- //Y Axis
- if (y != 0)
- {
- if (y > ScreenCenterY)
- {
- TargetY = -(ScreenCenterY - y);
- TargetY /= AimSpeed;
- if (TargetY + ScreenCenterY > ScreenCenterY * 2) TargetY = 0;
- }
- if (y < ScreenCenterY)
- {
- TargetY = y - ScreenCenterY;
- TargetY /= AimSpeed;
- if (TargetY + ScreenCenterY < 0) TargetY = 0;
- }
- }
- if (aim_smooth == 0)
- {
- mouse_event(MOUSEEVENTF_MOVE, (DWORD)(TargetX), (DWORD)(TargetY), NULL, NULL);
- return;
- }
- TargetX /= 10;
- TargetY /= 10;
- //Mouse even't will round to 0 a lot of the time, so we can add this, to make it more accurrate on slow speeds.
- if (fabs(TargetX) < 1)
- {
- if (TargetX > 0)
- {
- TargetX = 1;
- }
- if (TargetX < 0)
- {
- TargetX = -1;
- }
- }
- if (fabs(TargetY) < 1)
- {
- if (TargetY > 0)
- {
- TargetY = 1;
- }
- if (TargetY < 0)
- {
- TargetY = -1;
- }
- }
- mouse_event(MOUSEEVENTF_MOVE, TargetX, TargetY, NULL, NULL);
- }
- void DoAimBot2()
- {
- std::random_device rd; // obtain a random number from hardware
- std::mt19937 eng(rd()); // seed the generator
- std::uniform_int_distribution<> distr(25, 63); // define the range
- int aimsens = 0;
- GameMatrix* Matrix = World.GetMatrix();
- D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
- auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
- auto usermodel = (ModelFactory*)(uBase +OFFSET_MODELFACTORY );
- bool aiming = false;
- if(stack.aim.aimbot)
- {
- float ScreenCenterX = (Viewport.Width /2.0f);
- float ScreenCenterY = (Viewport.Height /2.0f);
- int width = (int)Viewport.Width;
- int height = (int)Viewport.Height;
- D3DXVECTOR3 OnWorld, Screen;
- int i = MyTarget();
- if(i != NULL)
- {
- Model * pModel = usermodel->Models.at(i);//pFactory->GetWorld()->m_pVisible.at(Slot);
- //Model* pModel = (Model*)*(DWORD*)(i + usermodel->skeletonList);
- string Type = pModel->m_pAnimator->m_pModelName->m_pName;
- bool isMale = findnew(Type,DataMale);
- bool isFemale = findnew(Type,DataFemale);
- if(isMale)
- {
- if(stack.aim.target == 1)GetTarget = 14;
- if(stack.aim.target == 2)GetTarget = 33;
- if(stack.aim.target == 3)GetTarget = 56;
- if (aiming && stack.aim.target == 1)
- {
- int First = (int)(1804289383 % 10);
- int second = (int)(First * 10);
- int final = (int)(second + 3);
- static DWORD lastTime = timeGetTime();
- DWORD timePassed = timeGetTime() - lastTime;
- if (timePassed>2000)
- {
- GetTarget = final;
- aiming = false;
- lastTime = timeGetTime();
- }
- }
- else if(aiming && stack.aim.target == 2)
- {
- int First = (int)(1804289383 % 10);
- int second = (int)(First + 11);
- static DWORD lastTime = timeGetTime();
- DWORD timePassed = timeGetTime() - lastTime;
- if (timePassed>2000)
- {
- GetTarget = second;
- aiming = false;
- lastTime = timeGetTime();
- }
- }
- else if(aiming && stack.aim.target == 3)
- {
- int First = (int)(1804289383 % 10);
- int second = (int)(First * 10);
- int final = (int)(second + 3);
- static DWORD lastTime = timeGetTime();
- DWORD timePassed = timeGetTime() - lastTime;
- if (timePassed>2000)
- {
- GetTarget = final;
- aiming = false;
- lastTime = timeGetTime();
- }
- }
- GetUserBoneInternal(pModel, OnWorld, GetTarget);
- if(ClientApp::WorldToScreen(OnWorld, Screen, worldMatrix, width, height))
- {
- double DistX = Screen.x - ScreenCenterX;
- double DistY = Screen.y - ScreenCenterY;
- switch(MyGetScope())
- {
- case 1271: // Red Dot Sight
- DistX /= 0.9f;
- DistY /= 0.9f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- case 1272: // Holo-Sight
- DistX /= 0.9f;
- DistY /= 0.9f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- case 1273: // 2x Scope
- DistX /= 1.086f;
- DistY /= 1.086f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- case 1274: // 4x Scope
- DistX /= 1.245f;
- DistY /= 1.245f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- case 1275: // 8x Scope
- DistX /= 1.504f;
- DistY /= 1.504f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- default:
- DistX /= 0.9f;
- DistY /= 0.9f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- }
- // DistX /= aim_smooth;
- //DistY /= aim_smooth;
- //
- // if(GetAsyncKeyState(VK_SHIFT))
- // {
- // mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- // //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- // }
- }
- }else
- if(isFemale)
- {
- if(stack.aim.target == 1)GetTarget = 16;
- if(stack.aim.target == 2)GetTarget = 35;
- if(stack.aim.target == 3)GetTarget = 65;
- if (aiming && stack.aim.target == 1)
- {
- int First = (int)(1804289383 % 10);
- int second = (int)(First * 10);
- int final = (int)(second + 5);
- static DWORD lastTime = timeGetTime();
- DWORD timePassed = timeGetTime() - lastTime;
- if (timePassed>2000)
- {
- GetTarget = final;
- aiming = false;
- lastTime = timeGetTime();
- }
- }
- else if(aiming && stack.aim.target == 2)
- {
- int First = (int)(1804289383 % 10);
- int second = (int)(First + 13);
- static DWORD lastTime = timeGetTime();
- DWORD timePassed = timeGetTime() - lastTime;
- if (timePassed>2000)
- {
- GetTarget = second;
- aiming = false;
- lastTime = timeGetTime();
- }
- }
- else if(aiming && stack.aim.target == 3)
- {
- int First = (int)(1804289383 % 10);
- int second = (int)(First * 10);
- int final = (int)(second + 5);
- static DWORD lastTime = timeGetTime();
- DWORD timePassed = timeGetTime() - lastTime;
- if (timePassed>2000)
- {
- GetTarget = final;
- aiming = false;
- lastTime = timeGetTime();
- }
- }
- GetUserBoneInternal(pModel, OnWorld, GetTarget);
- if(ClientApp::WorldToScreen(OnWorld, Screen, worldMatrix, width, height))
- {
- double DistX = Screen.x - ScreenCenterX;
- double DistY = Screen.y - ScreenCenterY;
- /* DistX /= aim_smooth;
- DistY /= aim_smooth;*/
- switch(MyGetScope())
- {
- case 1271: // Red Dot Sight
- DistX /= 0.850f;
- DistY /= 0.850f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- case 1272: // Holo-Sight
- DistX /= 0.850f;
- DistY /= 0.850f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- case 1273: // 2x Scope
- DistX /= 1.086f;
- DistY /= 1.086f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- case 1274: // 4x Scope
- DistX /= 1.245f;
- DistY /= 1.245f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- case 1275: // 8x Scope
- DistX /= 1.504f;
- DistY /= 1.504f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- default:
- DistX /= 0.850f;
- DistY /= 0.850f;
- if(GetAsyncKeyState(VK_SHIFT))
- {
- //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
- mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
- aiming =true;
- }
- break;
- }
- }
- }
- }
- }
- }
- void DebugBones(LPDIRECT3DDEVICE9 pDevice)
- {
- auto ModelEntry = (ModelFactory*)(Basez + OFFSET_MODELFACTORY);
- size_t count = ModelEntry->Models.size();;
- for(size_t i = 0; i < count; i ++)
- {
- Model* pModel = ModelEntry->Models.at(i);
- D3DXVECTOR3 vout,vScreen;
- GameMatrix* Matrix = World.GetMatrix();
- D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
- int width = Viewport.Width;
- int height = Viewport.Height;
- int BoneCount = pModel->m_pAnimator->BoneCount;
- auto animchar = pModel->m_pAnimator;
- D3DXMATRIX m_Position = pModel->m_Position;
- D3DXVECTOR3 GetPosition;
- D3DXVECTOR3 outPosition;
- GetPosition.x = m_Position._41;
- GetPosition.y = m_Position._42;
- GetPosition.z = m_Position._43;
- D3DXVECTOR3 Head;
- string Type(pModel->m_pAnimator->m_pModelName->m_pName);
- bool isMale = findnew(Type,DataMale);
- bool isFemale = findnew(Type,DataFemale);
- bool isSupportDroid = findnew(Type,bata);
- bool isCat = findnew(Type,pusa);
- bool Anubis = findnew(Type,Anubiss);
- if(stack.esp.bonedebug)
- {
- if(isMale || isFemale)
- {
- for(size_t j = 0; j < 100; j++)//pModel->m_pAnimator->BoneCount
- {
- D3DXVECTOR3 bone,pos;
- GetUserBoneInternal(pModel,pos,j);
- if (ClientApp::WorldToScreen(pos,bone,worldMatrix,width,height))
- {
- char no[MAX_PATH];
- sprintf(no, "%d", j);
- DrawCenteredString(Font,bone.x,bone.y,RED(255),no);
- }
- }
- }
- //
- }
- }
- }
- void InteralBone(LPDIRECT3DDEVICE9 pDevice)
- {
- DWORD Base = (DWORD)GetModuleHandleA(GameBase);
- auto pBigWorld = (ModelFactory*)(Base + OFFSET_MODELFACTORY);
- GameMatrix* Matrix = World.GetMatrix();
- D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
- int width = Viewport.Width;
- int height = Viewport.Height;
- size_t count = pBigWorld->Models.size();
- //for(int i = 0; i < pBigWorld->visibleModels; i+=0x4)
- for(size_t i = 0; i < count; i ++)
- {
- Model* pModel = pBigWorld->Models.at(i);
- //Model* pModel = (Model*)*(DWORD*)(pBigWorld->skeletonList + i);
- auto animchar = pModel->m_pAnimator;
- string Type(pModel->m_pAnimator->m_pModelName->m_pName);
- bool isMale = findnew(Type,DataMale);
- bool isFemale = findnew(Type,DataFemale);
- bool isSupportDroid = findnew(Type,bata);
- bool isCat = findnew(Type,pusa);
- bool Anubis = findnew(Type,Anubiss);
- if (stack.aim.fov)
- {
- float radiusx = aim_fov * (ScreenCX / 100 );
- float radiusy = aim_fov * (ScreenCY / 100 );
- float point = (radiusx + radiusy ) /2 ;
- DrawFOV(pDevice,ScreenCX,ScreenCY,point,FLOAT4TOD3DCOLOR(espfovcolor));
- }
- D3DXMATRIX ResultPosition = pModel->m_Position;
- D3DXVECTOR3 GetPosition;
- D3DXVECTOR3 outPosition;
- GetPosition.x = ResultPosition._41;
- GetPosition.y = ResultPosition._42;
- GetPosition.z = ResultPosition._43;
- D3DXVECTOR3 MyPos = MyLoCalPos();
- int pDistance = GetDistance(MyPos,GetPosition,10);
- if(ClientApp::WorldToScreen(GetPosition,outPosition,worldMatrix,width,height))
- {
- D3DXVECTOR3 Head;
- D3DXVECTOR3 OnScreen;
- float ScreenCenterX = (Viewport.Width /2.0f);
- float ScreenCenterY = (Viewport.Height /2.0f);
- int width = (int)Viewport.Width;
- int height = (int)Viewport.Height;
- if(stack.esp.bone)
- {
- if(isMale )
- {
- D3DXVECTOR3 Head, HeadPos,Neck,NeckPos;
- if( GetUserBoneInternal(pModel, Head, 14) && GetUserBoneInternal(pModel, Neck, 33) && ClientApp::WorldToScreen(Head,HeadPos,worldMatrix,width,height) && ClientApp::WorldToScreen(Neck,NeckPos,worldMatrix,width,height))
- {
- D3DXVECTOR3 Box = NeckPos - HeadPos;
- if (Box.y < 0) Box.y *= -1;
- int HeadRadius = (int)Box.y * 1.5;
- DrawFOV(pDevice,HeadPos.x,HeadPos.y - (HeadRadius + 2.3), 2.3 + HeadRadius,FLOAT4TOD3DCOLOR(espbonecolormale));
- }
- DrawBone(pModel,48,47,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,47,52,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,52,36,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,36,16,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,16,32,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,32,27,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,27,28,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,50,46,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,46,35,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,35,49,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,49,57,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,57,29,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,29,15,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,15,26,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,26,30,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,14,33,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,33,56,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,56,55,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,55,54,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- DrawBone(pModel,54,57,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
- }
- if(isSupportDroid)
- {
- DrawBone(pModel, 33, 34, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel,34, 2, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 2, 5, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 5, 6, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 6, 3, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 3, 23, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 33, 35, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 35, 12, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 12, 15, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 15, 16, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 16, 13, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 13, 26, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 33, 21, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 21, 0, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 0, 7, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 7, 1, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 1, 4, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 0, 17, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 17, 11, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- DrawBone(pModel, 11, 14,pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
- }
- if(isFemale)
- {
- D3DXVECTOR3 Head, HeadPos,Neck,NeckPos;
- if(GetUserBoneInternal(pModel, Head, 16)&& GetUserBoneInternal(pModel,Neck,35) && ClientApp::WorldToScreen(Head,HeadPos,worldMatrix,width,height) && ClientApp::WorldToScreen(Neck,NeckPos,worldMatrix,width,height))
- {
- D3DXVECTOR3 Box = NeckPos - HeadPos;
- if (Box.y < 0) Box.y *= -1;
- int HeadRadius = (int)Box.y * 1.5;
- DrawFOV(pDevice,HeadPos.x,HeadPos.y - (HeadRadius + 2.3), 2.3 + HeadRadius,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- }
- DrawBone(pModel,57,56,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,56,60,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,60,45,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,45,18,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,18,34,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,34,29,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,29,30,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,59,55,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,55,44,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,44,58,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,58,66,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,66,31,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,31,17,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,17,28,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,28,32,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,16,35,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,35,65,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,65,64,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,64,63,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- DrawBone(pModel,63,66,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
- }
- }
- }
- }
- }
- //void WalkSpeedLoop()
- //{
- // DWORD Base = (DWORD)GetModuleHandleA(GameBase);
- // bool HoldingA = (bool)GetAsyncKeyState(0x41);
- // bool HoldingS = (bool)GetAsyncKeyState(0x53);
- // bool HoldingD = (bool)GetAsyncKeyState(0x44);
- // bool HoldingW = (bool)GetAsyncKeyState(0x57);
- // __try
- // {
- //if(stack.player.speedhack)
- //{
- //if(!HoldingA && !HoldingS && !HoldingD && !HoldingW)
- //{
- // Sleep(100);
- //}
- //else
- //{
- // auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
- // Physicss = (Physics_*)(uBase + Physics);
- // float num2 = (float)(Physicss->ReadPhysics(0xAC) / 450.0f);
- // float num3 = (float)(Physicss->ReadPhysics(0xB4) / 450.0f);
- // float num4 = (float)Physicss->ReadPhysics(0x20);
- // float num5 = (float)Physicss->ReadPhysics(0x28);
- //
- // float numwrite = (float)(num4 + num2);
- // float numwrite1 = (float)(num5 + num3);
- //
- // (float)num4 = (float)numwrite;
- // (float)num5 = (float)numwrite1;
- //
- ////int num = Memory::ReadMemory<int>(Base + Physics);
- ////
- ////num = Memory::ReadMemory<int>(num);
- ////num = Memory::ReadMemory<int>(num + 16);
- ////float num2 = Memory::ReadMemory<float>(num + 172) / 450.0f;
- ////float num3 = Memory::ReadMemory<float>(num + 180) / 450.0f;
- ////float num4 = Memory::ReadMemory<float>(num + 32);
- ////float num5 = Memory::ReadMemory<float>(num + 40);
- ////float numwrite = Memory::ReadMemory<float>(num4 + num2);
- ////float numwrite1 = Memory::ReadMemory<float>(num5 + num3);
- ////num4 = numwrite;
- ////num5 = numwrite1;
- ////Memory::WriteMemory<float>(num + 32);throw(num4 + num2);
- //
- //}
- //}
- //}
- // __except(true){}
- //}
- void DoEsp(LPDIRECT3DDEVICE9 pDevice)
- {
- __try
- {
- RenderRadar(pDevice);
- DebugBones(pDevice);
- InteralBone(pDevice);
- }
- _except(true){}
- }
- void DrawMenu()
- {
- ImGui_NewFrame();
- if (bShowWindow)
- {
- DWORD dwFlag = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoResize ;
- //2B0176EC
- ImGui::SetNextWindowSize(ImVec2(100, 400));
- ImGui::Begin(zNova, &bShowWindow, ImVec2(543, 300), 1.0f, dwFlag);
- {
- ImGui::TextColored(ImColor(44, 234, 86), Stats); ImGui::SameLine(130);
- ImGui::TextColored(ImColor(44, 234, 86), fps); ImGui::SameLine(170);
- ImGui::TextColored(ImColor(44, 234, 86), FPS(0)); ImGui::SameLine(320);
- ImGui::TextColored(ImColor(44, 234, 86), url);
- /*ImGui::TextColored(ImColor(44, 234, 86), "DATE :"); ImGui::SameLine();
- ImGui::TextColored(ImColor(44, 234, 86), DATES()); ImGui::SameLine(350);
- ImGui::TextColored(ImColor(44, 234, 86), TIME());*/
- static int switchTabs = 10;
- ImGui::BeginChild(Child, ImVec2(118, 249), true);
- if (ImGui::Button(D3DFolder, ImVec2(100.0f, 35.0f)))
- {
- switchTabs = 0;
- }
- if (ImGui::Button(ESP, ImVec2(100.0f, 35.0f)))
- {
- switchTabs = 1;
- }
- //ImGui::SameLine(0.0, 2.0f);
- if (ImGui::Button(AIMBOT, ImVec2(100.0f, 35.0f)))
- {
- switchTabs = 2;
- }
- //ImGui::SameLine(0.0, 2.0f);
- if (ImGui::Button(PLAYER, ImVec2(100.0f, 35.0f)))
- {
- switchTabs = 3;
- }
- /*if (ImGui::Button("WEAPON", ImVec2(100.0f, 35.0f)))
- {
- switchTabs = 4;
- }
- if (ImGui::Button("SERVER", ImVec2(100.0f, 35.0f)))
- {
- switchTabs = 5;
- }*/
- if (ImGui::Button(TELEPORT, ImVec2(100.0f, 35.0f)))
- {
- switchTabs = 4;
- }
- if (ImGui::Button(WeaponCheat,ImVec2(100.0f,35.0f)))
- {
- switchTabs = 5;
- }
- //ImGui::SameLine(0.0, 2.0f);
- /**/
- ImGui::EndChild();
- ImGui::SameLine();
- ImGui::BeginChild(1, ImVec2(400, 249), true);
- const char* teletype[] = {"OFF","CrossHair","Distance" };
- const char* items[] = { "OFF","v1","v2","v3","v4","v5","v6","v7","v8","v9","v10","RainbowX", "CrossX","zNova", "zNovaX" };
- const char* aimspot[] = {"OFF","HEAD","NECK","BODY"};
- const char* lineposition[] = {"OFF", "TOP", "CENTER","BOTTOM"};
- const char* chamitem[] = {"OFF","GREEN","BLUE","RED"};
- const char* fovchoice[] = {"OFF","5","10","15","20","25"};
- const char* carspeed[] = {"OFF","2x","3x","4x","5x"};
- const char* telechoice[] = {"OFF","Shift","G","T","Capslock","V"};
- //TO DO IMGUI COMBO
- const char* muzzle1choice[] = {"OFF","Flash Hider","Compensator","Silencer"};
- const char* muzzle2choice[] = {"OFF","Flash Hider","Compensator","Silencer"};
- const char* mag1choice[] = {"OFF","QD-Mag","EX-Mag","EX-QD-Mag"};
- const char* mag2choice[] = {"OFF","QD-Mag","EX-Mag","EX-QD-Mag"};
- const char* scope1choice[] = {"OFF","Red Dot Sight","Holo-Sight","2x Scope","4x Scope","8x Scope"};
- const char* scope2choice[] = {"OFF","Red Dot Sight","Holo-Sight","2x Scope","4x Scope","8x Scope"};
- int iMenuTheme = 0;
- switch (switchTabs) {
- case 0:
- ImGui::Checkbox(Radar, &stack.d3d.radar);
- ImGui::Checkbox(WallHack, &stack.d3d.wallhack);
- ImGui::Checkbox(NoGrass, &stack.d3d.nograss);
- // ImGui::Checkbox(RemoveFogging, &stack.d3d.nofog);
- ImGui::Combo(Chams,(PINT) &stack.d3d.cham, chamitem, 4);
- ImGui::Combo(CrossHair,(PINT) &stack.d3d.crosshair, items, 15);
- break;
- case 1:
- ImGui::ColorEdit4((PlayerBox3D), esp3dcolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(PlayerBox3D, &stack.esp.box3d); ImGui::SameLine(200);
- ImGui::ColorEdit4((ESP_Name), espnamecolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_Name, &stack.esp.esptext);
- ImGui::ColorEdit4((ESP_PDist), espdistancecolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_PDist, &stack.esp.distance); ImGui::SameLine(200);
- ImGui::ColorEdit4((ESP_Box2D), esp2dcolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_Box2D, &stack.esp.box2d);
- ImGui::ColorEdit4((PKills), esppkcolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(PKills, &stack.esp.playerkills); ImGui::SameLine(200);
- ImGui::ColorEdit4((ESP_Items), espitemscolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_Items, &stack.esp.items);
- ImGui::ColorEdit4((ESP_Plane), espplanecolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_Plane, &stack.esp.espplane); ImGui::SameLine(200);
- ImGui::ColorEdit4((ESP_Vehicle), espvehiclecolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_Vehicle, &stack.esp.vehicle);
- ImGui::ColorEdit4((ESP_VDisColor), espvehicledistancecolor); ImGui::SameLine(0.0, 2.0f);
- ImGui::Checkbox(ESP_VDist, &stack.esp.distancevehicle); ImGui::SameLine(200);
- ImGui::ColorEdit4((SupplyColor), espsbcolor); ImGui::SameLine(0.0, 2.0f);
- ImGui::ColorEdit4((DeadPlayerColor), espdeadcolor); ImGui::SameLine(0.0, 2.0f);
- ImGui::Checkbox(ESP_Supply, &stack.esp.supplybox);
- ImGui::ColorEdit4((HeritageFOVColor), heritagecolor); ImGui::SameLine(0.0, 2.0f);
- ImGui::Checkbox(HeritageFOV, &stack.esp.heritagefov); ImGui::SameLine(200); ImGui::Checkbox(SeeItemsInside, &stack.esp.heritage);
- ImGui::ColorEdit4((MBoneColor), espbonecolormale); ImGui::SameLine(0.0, 2.0f);
- ImGui::ColorEdit4((FBoneColor), espbonecolorfemale); ImGui::SameLine(0.0, 2.0f);
- ImGui::ColorEdit4((SDroidColor), espbonecolordroid); ImGui::SameLine(0.0, 2.0f);
- ImGui::Checkbox(ESP_Bone, &stack.esp.bone); ImGui::SameLine(200);
- ImGui::Checkbox(ESP_Health, &stack.esp.healthbar);
- ImGui::ColorEdit4((ESP_LinePColor), esplineplayercolor); ImGui::SameLine(0.0, 2.0f); //ImGui::Checkbox(ESP_Line, &stack.esp.line);
- ImGui::ColorEdit4((ESP_LineBColor), esplinebotcolor); ImGui::SameLine(0.0, 2.0f);
- ImGui::Combo(ESP_Line,(PINT) &stack.esp.line, lineposition, 4);
- ImGui::SliderFloat(HeritageFOV, &heritage_fov, 0, 50);
- ImGui::Checkbox("BoneCount ", &stack.esp.bonedebug);
- // ImGui::Checkbox("Log Local", &stack.server.one);
- /* ImGui::Checkbox("DumpLocal", &stack.weapon.bullet);
- ImGui::Checkbox("Log curEntity", &stack.server.nine);
- */
- // ImGui::Checkbox("Dump Enemy", &stack.server.two);
- /* ImGui::Checkbox("DumpBattleGround", &stack.server.three);
- ImGui::Checkbox("DumpBot", &stack.server.four);
- ImGui::Checkbox("DumpExpress", &stack.server.five);
- ImGui::Checkbox("DumpCar", &stack.server.six);
- ImGui::Checkbox("DumpMotor", &stack.server.seven);
- ImGui::Checkbox("DumpSupportDroid", &stack.server.eight);*/
- //ImGui::SameLine();
- //ImGui::ColorEdit4(("ESP Color"), espcolor);
- //ImGui::Checkbox("ESP Dead", &stack.esp.dead);
- /* 1 Local
- 2 Enemy
- 3 BattleGround
- 4 Bot
- 5 Express
- 6 Car
- 7 Motor
- 8 SupportDroid*/
- // }
- // stack.esp.dead
- break;
- case 2:
- ImGui::Checkbox(FuncAimbot, &stack.aim.aimbot);
- ImGui::Combo(Target,(PINT) &stack.aim.target, aimspot, 4);
- ImGui::ColorEdit4((AimFOV), espfovcolor); ImGui::SameLine(0.0, 2.0f);
- ImGui::Checkbox(AimFOV, &stack.aim.fov);
- // ImGui::TextColored(ImColor(122, 145, 120, 100), "");
- ImGui::SliderFloat(AimFOV, &aim_fov, 0, 120);
- //ImGui::SliderFloat(AimSmooth, &aim_smooth, 0, 5);
- //ImGui::Checkbox("No border1", &no_border);
- break;
- case 3:
- ImGui::Checkbox(GMode, &stack.player.gravemode);
- ImGui::Checkbox(Left, &stack.player.xleft);
- ImGui::Checkbox(Right, &stack.player.xright);
- ImGui::Checkbox(UP, &stack.player.yup);
- ImGui::Checkbox(DOWN, &stack.player.ydown);
- ImGui::Checkbox(FastDrop, &stack.player.fastdrop);
- ImGui::Checkbox(UnderGroundWalk, &stack.player.underground);
- ImGui::Checkbox(Flying, &stack.player.fly);
- ImGui::Checkbox(ZeroGravity, &stack.player.zerogravity);
- ImGui::Checkbox(SpeedHacking, &stack.player.speedhack);
- ImGui::Checkbox(Sprint, &stack.player.sprint);
- // ImGui::Checkbox(NoFalling, &stack.player.nfd);
- // ImGui::Checkbox("Worm Hole", &stack.player.highjump);
- // ImGui::SliderFloat("Player FOV", &value,0, 300);
- // ImGui::Checkbox("GodMode", &stack.player.godmode);
- // ImGui::Checkbox("Hide Name", &stack.player.HideName);
- //// ImGui::Checkbox("High Jump", &stack.player.highjump);
- /* ImGui::Checkbox(CScope, &stack.weapon.scope);
- ImGui::Combo(CScopeType,(PINT) &stack.weapon.scope, scopechoice, 4);*/
- ImGui::SliderFloat(JumpValue, &jumpvalue,0, 1000);
- //ImGui::Checkbox("Car Wheel", &stack.car.wheel);
- /* ImGui::Checkbox(NoReload, &stack.weapon.reload);
- ImGui::Checkbox(UnliBullet, &stack.server.two);
- ImGui::Checkbox(NoRecoilXY, &stack.server.teamsize);
- ImGui::Checkbox(FastHeal, &stack.server.one);
- ImGui::Checkbox(SpeedHacking, &stack.server.three);
- ImGui::Checkbox(NoFallingDamage, &stack.server.four);
- ImGui::Checkbox(WalkJumper, &stack.server.six);
- ImGui::Checkbox(SuperKill, &stack.server.seven);
- ImGui::Checkbox(STW, &stack.server.eight);
- ImGui::Checkbox(Scope_High, &stack.server.nine);
- ImGui::TextColored(ImColor(44, 234, 86),GGROSX);
- ImGui::Checkbox(OPK, &stack.server.ten);*/
- break;
- // case 4:
- //break;
- /* case 5:
- ImGui::SliderFloat("Teamsize", &Teamsize,0, 1000);
- break;*/
- case 4:
- //ImGui::Checkbox("New NoClip", &stack.weapon.ammo);
- ImGui::Checkbox(NoClipFunc, &stack.teleport.noclip);
- ImGui::Checkbox(TeleKill, &stack.teleport.telekill);
- // ImGui::ColorEdit3((Teleport_FOV), teleportfov); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(Teleport_FOV, &stack.teleport.fov);
- ImGui::Combo(Hotkeys,(PINT) &stack.teleport.hotkey, telechoice, 6);
- // ImGui::TextColored(ImColor(44, 234, 86),Teletype);
- ImGui::TextColored(ImColor(44, 234, 86),Teletype);
- ImGui::RadioButton(CrossX, (PINT)&stack.teleport.type, 1); ImGui::SameLine(0.0f,1.0f);
- ImGui::RadioButton(DistanceX, (PINT)&stack.teleport.type, 2);
- // ImGui::Combo("Teletype",(PINT)&stack.teleport.type,teletype,3);
- //ImGui::RadioButton(CrossX, (int*)&stack.teleport.type, 1); ImGui::SameLine(0.0f,1.0f);
- //ImGui::RadioButton(DistanceX, (int*)&stack.teleport.type, 2);
- /* ImGui::Checkbox("Include Bot", &stack.teleport.yesbot);*/
- //ImGui::SliderFloat(Teleport_FOV, &teleport_fov,0, 25);
- ImGui::TextColored(ImColor(44, 234, 86),TextTelemark);
- /*if(Markpos.x && Markpos.y && Markpos.z == NULL)
- {
- ImGui::TextColored(ImColor(255,0,0),"MarkPos : %s, %s %s", Markpos.x, Markpos.y,Markpos.z);
- }
- else
- {
- ImGui::TextColored(ImColor(44,234,86),"MarkPos : %d, %d %d", Markpos.x, Markpos.y,Markpos.z);
- }*/
- ImGui::Checkbox(TeleMark, &stack.teleport.mark);
- /*ImGui::Combo("CarSpeed",(PINT) &stack.car.speed, carspeed, 5);*/
- //ImGui::ColorPicker3
- // ImGui::Checkbox("GG ROS", &stack.teleport.opk);
- // ImGui::SliderFloat("Height Value", &HeightValue,-100, 100);
- break;
- case 5:
- ImGui::Checkbox("Change Muzzle", &stack.weapon.onmuz);
- ImGui::ListBox("Weapon 1 Muzzle (CHOOSE ONE)", (PINT)&stack.weapon.muzzle, muzzle1choice, IM_ARRAYSIZE(muzzle1choice), 4);
- ImGui::ListBox("Weapon 2 Muzzle (CHOOSE ONE)",(PINT) &stack.weapon.muzzle2, muzzle2choice, IM_ARRAYSIZE(muzzle2choice), 4);
- //ImGui::Combo("Weapon 1 Muzzle",(PINT)&stack.weapon.muzzle,muzzle1choice,4);
- //ImGui::Combo("Weapon 2 Muzzle",(PINT)&stack.weapon.muzzle2,muzzle2choice,4);
- ImGui::Checkbox("Change Magazine", &stack.weapon.onmag);
- ImGui::ListBox("Weapon 1 Magazine (CHOOSE ONE)", (PINT)&stack.weapon.mag, mag1choice, IM_ARRAYSIZE(mag1choice), 4);
- ImGui::ListBox("Weapon 2 Magazine (CHOOSE ONE)",(PINT) &stack.weapon.mag2, mag2choice, IM_ARRAYSIZE(mag2choice), 4);
- /*ImGui::Combo("Weapon 1 Magazine",(PINT)&stack.weapon.mag,mag1choice,4);
- ImGui::Combo("Weapon 2 Magazine",(PINT)&stack.weapon.mag2,mag2choice,4);*/
- ImGui::Checkbox("Change Scope", &stack.weapon.onscope);
- ImGui::ListBox("Weapon 1 Scope (CHOOSE ONE)", (PINT)&stack.weapon.scope, scope1choice, IM_ARRAYSIZE(scope1choice), 6);
- ImGui::ListBox("Weapon 2 Scope (CHOOSE ONE)",(PINT) &stack.weapon.scope2, scope2choice, IM_ARRAYSIZE(scope2choice), 6);
- /* ImGui::Combo("Weapon 1 Scope",(PINT)&stack.weapon.scope,scope1choice,6);
- ImGui::Combo("Weapon 2 Scope",(PINT)&stack.weapon.scope2,scope2choice,6);*/
- break;
- /*if (ImGui::IsWindowFocused() && !ImGui::IsAnyItemActive())
- {
- ImGui::SetKeyboardFocusHere(keyboardFocus);
- if(keyboardFocus)
- {
- ImGui::TextColored(ImColor(255,0,0),"username : "); ImGui::SameLine(0.0, 2.0f); ImGui::InputText("",(PCHAR)user.c_str(),sizeof(user));
- ImGui::TextColored(ImColor(255,0,0),"password : "); ImGui::SameLine(0.0, 2.0f); ImGui::InputText("",(PCHAR)pass.c_str(),sizeof(pass));
- }
- }*/
- }
- /* */
- }
- /* ImGui::TextColored(ImColor(44, 234, 86), "DATE :" );
- ImGui::SameLine();
- ImGui::TextColored(ImColor(122, 145, 120,100), DATES());
- ImGui::Separator();
- ImGui::TextColored(ImColor(122,145 ,125.120),TIME());
- ImGui::Separator();*/
- ImGui::EndChild();
- ImGui::End();
- }
- ImGui::Render();
- }
- void DoCrossHair(LPDIRECT3DDEVICE9 pDevice)
- {
- if(stack.d3d.crosshair == 1)
- {
- FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), pDevice);//Left line
- FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), pDevice);//Right line
- FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), pDevice);//Top line
- FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), pDevice);//Bottom line
- DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), pDevice);//Point
- }
- if(stack.d3d.crosshair == 2)
- {
- FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), pDevice);//Left line
- FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), pDevice);//Right line
- FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), pDevice);//Top line
- FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), pDevice);//Bottom line
- DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), pDevice);
- }
- if(stack.d3d.crosshair == 3)
- {
- FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);//Left line
- FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);//Right line
- FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);//Top line
- FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);//Bottom line
- DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);
- }
- if(stack.d3d.crosshair == 4)
- {
- FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);//Left line
- FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);//Right line
- FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);//Top line
- FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);//Bottom line
- DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
- }
- if(stack.d3d.crosshair == 5)
- {
- FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);//Left line
- FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);//Right line
- FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);//Top line
- FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);//Bottom line
- DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
- }
- if(stack.d3d.crosshair == 6)
- {
- FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);//Left line
- FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);//Right line
- FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);//Top line
- FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);//Bottom line
- DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
- }
- if(stack.d3d.crosshair == 7)
- {
- FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 165, 0), pDevice);//Left line
- FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 165, 0), pDevice);//Right line
- FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DCOLOR_ARGB(255, 255, 165, 0), pDevice);//Top line
- FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DCOLOR_ARGB(255, 255, 165, 0), pDevice);//Bottom line
- DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
- }
- if(stack.d3d.crosshair == 8)
- {
- FillRGB(ScreenCX - 15, ScreenCY, 30, 1, RED(255), pDevice);//Diagonal line
- FillRGB(ScreenCX, ScreenCY - 15, 1, 30, RED(255), pDevice);//Vertical line
- }
- if(stack.d3d.crosshair == 9)
- {
- FillRGB(ScreenCX - 17, ScreenCY, 10, 1, RED(255), pDevice);//Left line
- FillRGB(ScreenCX + 9, ScreenCY, 10, 1, RED(255), pDevice); // Right line
- FillRGB(ScreenCX, ScreenCY - 17, 1, 10, RED(255), pDevice);//Top line
- FillRGB(ScreenCX, ScreenCY + 9, 1, 10, RED(255), pDevice);//Bottom line
- }
- if(stack.d3d.crosshair == 10)
- {
- FillRGB(ScreenCX - 13, ScreenCY, 10, 1, RED(255), pDevice);//Left line
- FillRGB(ScreenCX + 4, ScreenCY, 10, 1, RED(255), pDevice);//Right line
- FillRGB(ScreenCX, ScreenCY - 13, 1, 10, RED(255), pDevice);//Top line
- FillRGB(ScreenCX, ScreenCY + 4, 1, 10, RED(255), pDevice);//Bottom line
- DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);
- }
- if(stack.d3d.crosshair == 11)
- {
- FillRGB(ScreenCX - 20, ScreenCY, 40, 1, D3DCOLOR_ARGB(255, 125, 0, 255), pDevice);//Purple
- FillRGB(ScreenCX, ScreenCY - 20, 1, 40, D3DCOLOR_ARGB(255, 125, 0, 255), pDevice);
- FillRGB(ScreenCX - 17, ScreenCY, 34, 1, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);//Blue
- FillRGB(ScreenCX, ScreenCY - 17, 1, 34, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);
- FillRGB(ScreenCX - 14, ScreenCY, 28, 1, D3DCOLOR_ARGB(255, 000, 139, 200), pDevice);//Cyan
- FillRGB(ScreenCX, ScreenCY - 14, 1, 28, D3DCOLOR_ARGB(255, 000, 139, 200), pDevice);
- FillRGB(ScreenCX - 11, ScreenCY, 22, 1, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);//Green
- FillRGB(ScreenCX, ScreenCY - 11, 1, 22, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);
- FillRGB(ScreenCX - 9, ScreenCY, 18, 1, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);//Yellow
- FillRGB(ScreenCX, ScreenCY - 9, 1, 18, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);
- FillRGB(ScreenCX - 6, ScreenCY, 12, 1, D3DCOLOR_ARGB(255, 255, 132, 0), pDevice);//Orange
- FillRGB(ScreenCX, ScreenCY - 6, 1, 12, D3DCOLOR_ARGB(255, 255, 132, 0), pDevice);
- FillRGB(ScreenCX - 3, ScreenCY, 6, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);//Red
- FillRGB(ScreenCX, ScreenCY - 3, 1, 6, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
- }
- if (stack.d3d.crosshair == 12)
- {
- FillRGB(ScreenCX - 20, ScreenCY, 40, 1, PURPLE(255), pDevice);//Purple
- FillRGB(ScreenCX, ScreenCY - 20, 1, 40, PURPLE(255), pDevice);
- FillRGB(ScreenCX - 17, ScreenCY, 34, 1, BLUE(255), pDevice);//Blue
- FillRGB(ScreenCX, ScreenCY - 17, 1, 34, BLUE(255), pDevice);
- FillRGB(ScreenCX - 14, ScreenCY, 28, 1, CYAN(255), pDevice);//Cyan
- FillRGB(ScreenCX, ScreenCY - 14, 1, 28, CYAN(255), pDevice);
- FillRGB(ScreenCX - 11, ScreenCY, 22, 1, GREEN(255), pDevice);//Green
- FillRGB(ScreenCX, ScreenCY - 11, 1, 22, GREEN(255), pDevice);
- FillRGB(ScreenCX - 9, ScreenCY, 18, 1, YELLOW(255), pDevice);//Yellow
- FillRGB(ScreenCX, ScreenCY - 9, 1, 18, YELLOW(255), pDevice);
- FillRGB(ScreenCX - 6, ScreenCY, 12, 1, ORANGE(255), pDevice);//Orange
- FillRGB(ScreenCX, ScreenCY - 6, 1, 12, ORANGE(255), pDevice);
- FillRGB(ScreenCX - 3, ScreenCY, 6, 1, RED(255), pDevice);//Red
- FillRGB(ScreenCX, ScreenCY - 3, 1, 6, RED(255), pDevice);
- DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
- DrawRect(pDevice, ScreenCX - 7, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
- DrawRect(pDevice, ScreenCX + 7, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
- DrawRect(pDevice, ScreenCX - 1, ScreenCY - 7, 3, 1, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
- DrawRect(pDevice, ScreenCX - 1, ScreenCY + 7, 3, 1, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
- }
- if(stack.d3d.crosshair == 13)
- {
- DrawLine(pDevice, ScreenCX + 15, ScreenCY + 15, ScreenCX + 3, ScreenCY + 3, RED(255));
- DrawLine(pDevice, ScreenCX - 15, ScreenCY + 15, ScreenCX - 3, ScreenCY + 3, RED(255));
- DrawLine(pDevice, ScreenCX + 15, ScreenCY - 15, ScreenCX + 3, ScreenCY - 3, RED(255));
- DrawLine(pDevice, ScreenCX - 15, ScreenCY - 15, ScreenCX - 3, ScreenCY - 3, RED(255));
- }
- if(stack.d3d.crosshair == 14)
- {
- DrawRect(pDevice, ScreenCX, ScreenCY - 5, 1, 11, D3DCOLOR_RGBA(0, 0, 000, 255));
- DrawRect(pDevice, ScreenCX - 5, ScreenCY, 11, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 1, ScreenCY - 6, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 1, ScreenCY + 6, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 1, ScreenCY - 8, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 1, ScreenCY + 8, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 2, ScreenCY - 8, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 2, ScreenCY + 6, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX + 2, ScreenCY - 8, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX + 2, ScreenCY + 6, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 6, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX + 6, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 8, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX + 8, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 8, ScreenCY - 2, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX + 6, ScreenCY - 2, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 8, ScreenCY + 2, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX + 6, ScreenCY + 2, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
- DrawRect(pDevice, ScreenCX - 7, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
- DrawRect(pDevice, ScreenCX + 7, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
- DrawRect(pDevice, ScreenCX - 1, ScreenCY - 7, 3, 1, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
- DrawRect(pDevice, ScreenCX - 1, ScreenCY + 7, 3, 1, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
- }
- }
- HRESULT APIENTRY Present_hook(IDirect3DDevice9* pDevice, const RECT *pSourceRect, const RECT *pDestRect, HWND hDestWindowOverride, const RGNDATA *pDirtyRegion)
- {
- pDevice->GetViewport(&Viewport);
- ScreenCoords.X = Viewport.Width / 2;
- ScreenCoords.Y = Viewport.Height / 2;
- ScreenCX = (float)Viewport.Width / 2.0f;
- ScreenCY = (float)Viewport.Height / 2.0f;
- if (!Direct3DInitialize)
- {
- Direct3DInitialize = true;
- CreateMyShader(&Front, pDevice, 255, 0, 0, 255);
- CreateMyShader(&FGreen, pDevice, 0, 255, 0, 255);
- CreateMyShader(&Back, pDevice, 255, 255, 0, 255);
- CreateMyShader(&oldlShader, pDevice, 255, 0, 0, 255);
- }
- if (InBattle())
- {
- __try
- {
- DecryptCall();
- esper(pDevice);
- PlayerTelekill(pDevice);
- DoAimBot2();
- SpeedMain();
- NewMem();
- }
- __except (true) {}
- }
- if(InBattle())
- {
- DoCrossHair(pDevice);
- DoEsp(pDevice);
- DoReplace();
- DoTeleport();
- }
- // memcpy((void*)(Basez + AntiSSCallAddy), (int*)(PBYTE)"\x90\x90\x90\x90\x90\x90\x90", 7);
- //memcpy((void*)(GetModuleHandleA(GameBase) + AntiSS), (int*)(PBYTE)"\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58\x50\x58", 40);
- //if(InBattle())
- //{
- // __try
- // {
- //OriginalMemoryHacks();
- // }__except(true){}
- //}
- pDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, false);
- pDevice->SetRenderState(D3DRS_ZENABLE, false);
- pDevice->SetRenderState(D3DRS_STENCILENABLE, false);
- ImGui_Init(hWnd, pDevice);
- if (Create == false)
- {
- D3DXCreateLine(pDevice, &pLine);
- D3DXCreateFontA(pDevice, 14, 0, FW_NORMAL, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Font);
- m_pWindowProc = (WNDPROC)SetWindowLongPtr(hWnd, GWL_WNDPROC, (LONG_PTR)myWndProc);
- Create = true;
- }
- else
- {
- DrawMenu();
- //Rad.OnRender();
- }
- return Present_orig(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
- }
- HRESULT APIENTRY Reset_hook(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS *pPresentationParameters)
- {
- if (Font)
- Font->OnLostDevice();
- if (pLine)
- pLine->OnLostDevice();
- ImGui_InvalidateDeviceObjects();
- HRESULT ResetReturn = Reset_orig(pDevice, pPresentationParameters);
- if (SUCCEEDED(ResetReturn))
- {
- if (Font)
- Font->OnResetDevice();
- if (pLine)
- pLine->OnResetDevice();
- ImGui_CreateDeviceObjects();
- }
- return ResetReturn;
- }
- DWORD DetourCreate1(DWORD SrcVA, DWORD DstVA, DWORD Size)
- {
- #define SIZEOF_JMP_NEAR 5
- if (SrcVA && DstVA && Size > 0)
- {
- DWORD DetourVA = (DWORD)
- VirtualAlloc(NULL, Size + SIZEOF_JMP_NEAR,
- MEM_COMMIT | MEM_TOP_DOWN, PAGE_EXECUTE_READWRITE);
- if (DetourVA == 0)
- return(0);
- DWORD dwProtect;
- if (VirtualProtect((PVOID)SrcVA, Size, PAGE_EXECUTE_READWRITE, &dwProtect))
- {
- for (DWORD i = 0; i < Size; i++) {
- *(PBYTE)(DetourVA + i) = *(PBYTE)(SrcVA + i);
- }
- *(PBYTE)(DetourVA + Size + 0) = 0xE9;
- *(PDWORD)(DetourVA + Size + 1) = (SrcVA - DetourVA - SIZEOF_JMP_NEAR);
- *(PBYTE)(SrcVA + 0) = 0xE9;
- *(PDWORD)(SrcVA + 1) = (DstVA - SrcVA - SIZEOF_JMP_NEAR);
- VirtualProtect((PVOID)SrcVA, Size, dwProtect, &dwProtect);
- VirtualProtect((PVOID)DetourVA, Size + SIZEOF_JMP_NEAR, PAGE_EXECUTE_READ, &dwProtect);
- return DetourVA;
- }
- }
- return(NULL);
- }
- PVOID D3Ddiscover(void *tbl, int size)
- {
- //HWND hWnd;
- VOID *pInterface = NULL;
- D3DPRESENT_PARAMETERS d3dpp;
- if ((Hand = (HMODULE)CreateWindowEx(NULL, WC_DIALOG, (LPCWSTR)"", WS_OVERLAPPED, 0, 0, 50, 50, NULL, NULL, NULL, NULL)) == NULL)
- return FALSE;
- ShowWindow((HWND)Hand, SW_HIDE);
- LPDIRECT3D9 pD3D;
- LPDIRECT3DDEVICE9 pD3Ddev;
- if ((pD3D = Direct3DCreate9(D3D_SDK_VERSION)) != NULL)
- {
- ZeroMemory(&d3dpp, sizeof(d3dpp));
- d3dpp.Windowed = TRUE;
- d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
- d3dpp.hDeviceWindow = (HWND)Hand;
- d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
- d3dpp.BackBufferWidth = d3dpp.BackBufferHeight = 600;
- pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, (HWND)Hand, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pD3Ddev);
- if (pD3Ddev) {
- pInterface = (PDWORD)*(DWORD *)pD3Ddev;
- memcpy(tbl, (void *)pInterface, size);
- pD3Ddev->Release();
- }
- pD3D->Release();
- }
- DestroyWindow((HWND)Hand);
- return pInterface;
- }
- UINT WINAPI D3D(VOID *)
- {
- HINSTANCE hD3D; DWORD vTable[105];
- hD3D = NULL;
- do {
- hD3D = GetModuleHandleA("d3d9.dll");
- if (!hD3D) Sleep(10);
- } while (!hD3D);
- if (D3Ddiscover((PVOID)&vTable[0], 420) == 0) return NULL;
- {
- Reset_orig = (Reset_t)DetourCreate1((DWORD)vTable[16], (DWORD)Reset_hook, 5);
- Present_orig = (Present_t)DetourCreate1((DWORD)vTable[17], (DWORD)Present_hook, 5);
- SetStreamSource_orig = (SetStreamSource_t)DetourCreate1((DWORD)vTable[100], (DWORD)SetStreamSource_hook,5);
- SetTexture_orig = (SetTexture_t)DetourCreate1((DWORD)vTable[65], (DWORD)SetTexture_hook,5);
- SetVertexShaderConstantF_orig = (SetVertexShaderConstantF_t)DetourCreate1((DWORD)vTable[94],(DWORD)SetVertexShaderConstantF_hook,5);//DetourCreate1((DWORD)SetVertexShaderConstantF_orig, (PBYTE)SetVertexShaderConstantF_hook);
- Sleep(100);
- }
- return FALSE;
- }
- // MODULE //
- //DWORD WINAPI Loop(__in LPVOID lpParameter)//unsigned __stdcall
- //{
- // HMODULE dDll = NULL;
- // while (!dDll)
- // {
- // dDll = GetModuleHandleA("d3d9.dll");
- // Sleep(100);
- // }
- // CloseHandle(dDll);
- //
- //// IDirect3D9* d3d = NULL;
- //
- // IDirect3DDevice9* d3ddev = NULL;
- //
- // HWND tmpWnd = CreateWindowA("BUTTON", "RosD3D", WS_SYSMENU | WS_MINIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, NULL, NULL, Hand, NULL);
- // if (tmpWnd == NULL)
- // {
- //
- // return 0;
- // }
- // LPDIRECT3D9 d3d ;
- // d3d = Direct3DCreate9(D3D_SDK_VERSION);
- // if (d3d == NULL)
- // {
- // DestroyWindow(tmpWnd);
- //
- // return 0;
- // }
- //
- // D3DPRESENT_PARAMETERS d3dpp;
- // ZeroMemory(&d3dpp, sizeof(d3dpp));
- // d3dpp.Windowed = TRUE;
- // d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
- // d3dpp.hDeviceWindow = tmpWnd;
- // d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
- //
- // HRESULT result = d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &d3ddev);
- // if (result != D3D_OK)
- // {
- // d3d->Release();
- // DestroyWindow(tmpWnd);
- //
- // return 0;
- // }
- //
- //#if defined _M_X64
- // DWORD64* dVtable = (DWORD64*)d3ddev;
- // dVtable = (DWORD64*)dVtable[0];
- //#elif defined _M_IX86
- // DWORD* dVtable = (DWORD*)d3ddev;
- // dVtable = (DWORD*)dVtable[0];
- //#endif
- //
- // //cContext pContext = cContext::GetInstance();
- //
- // //if(pContext.ApplyDetour<oPresent>(oPresent,oPresent,oPresent))
- // if (MH_Initialize() != MH_OK) { return 1; }
- // if (MH_CreateHook((DWORD_PTR*)dVtable[17], &Present_hook, reinterpret_cast<void**>(&Present_orig)) != MH_OK) { return 1; }
- // if (MH_EnableHook((DWORD_PTR*)dVtable[17]) != MH_OK) { return 1; }
- //
- // if (MH_CreateHook((DWORD_PTR*)dVtable[100], &SetStreamSource_hook, reinterpret_cast<void**>(&SetStreamSource_orig)) != MH_OK) { return 1; }
- // if (MH_EnableHook((DWORD_PTR*)dVtable[100]) != MH_OK) { return 1; }
- // if (MH_CreateHook((DWORD_PTR*)dVtable[65], &SetTexture_hook, reinterpret_cast<void**>(&SetTexture_orig)) != MH_OK) { return 1; }
- // if (MH_EnableHook((DWORD_PTR*)dVtable[65]) != MH_OK) { return 1; }
- // if (MH_CreateHook((DWORD_PTR*)dVtable[16], &Reset_hook, reinterpret_cast<void**>(&Reset_orig)) != MH_OK) { return 1; }
- // if (MH_EnableHook((DWORD_PTR*)dVtable[16]) != MH_OK) { return 1; }
- //
- // //if(MH_CreateHook((LPVOID)DecryptCall,(LPVOID)(&Nigger), (LPVOID*)(&FakeReturn))){ return 1;}
- // //if (MH_EnableHook((LPVOID)DecryptCall) != MH_OK) { return 1; }
- //
- //
- // //d3ddev->Release();
- // //d3d->Release();
- // //DestroyWindow(tmpWnd);
- //
- // return 1;
- //
- //}
- inline bool HideThread(HANDLE hThread)
- {
- typedef NTSTATUS(NTAPI *pNtSetInformationThread) (HANDLE, UINT, PVOID, ULONG);
- NTSTATUS Status;
- pNtSetInformationThread NtSIT = (pNtSetInformationThread)GetProcAddress(GetModuleHandle(TEXT("ntdll.dll")), "NtSetInformationThread");
- if (NtSIT == NULL)
- return false;
- if (hThread == NULL)
- Status = NtSIT(GetCurrentThread(), 0x11, 0, 0);
- else
- Status = NtSIT(hThread, 0x11, 0, 0);
- if (Status != 0x00000000)
- return false;
- else
- return true;
- }
- void DebugSelf()
- {
- HANDLE hProcess = NULL;
- DEBUG_EVENT de;
- PROCESS_INFORMATION pi;
- STARTUPINFO si;
- ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
- ZeroMemory(&si, sizeof(STARTUPINFO));
- ZeroMemory(&de, sizeof(DEBUG_EVENT));
- GetStartupInfo(&si);
- CreateProcess(NULL, GetCommandLine(), NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi);
- ContinueDebugEvent(pi.dwProcessId, pi.dwThreadId, DBG_CONTINUE);
- WaitForDebugEvent(&de, INFINITE);
- }
- typedef NTSTATUS(NTAPI *pfnNtSetInformationThread)(_In_ HANDLE ThreadHandle, _In_ ULONG ThreadInformationClass, _In_ PVOID ThreadInformation, _In_ ULONG ThreadInformationLength);
- const ULONG ThreadHideFromDebuggerrr = 0x11;
- void HideFromDebugger()
- {
- HMODULE hNtDll = LoadLibrary(TEXT("ntdll.dll"));
- pfnNtSetInformationThread NtSetInformationThread = (pfnNtSetInformationThread)GetProcAddress(hNtDll, "NtSetInformationThread");
- NTSTATUS status = NtSetInformationThread(GetCurrentThread(), ThreadHideFromDebuggerrr, NULL, 0);
- }
- inline void ErasePeKrds(HMODULE hModz)
- {
- DWORD OldProtect = 0;
- char *pBaseAddr = (char*)hModz;
- VirtualProtect(pBaseAddr, 2096, PAGE_READWRITE, &OldProtect);
- // Erase the header
- ZeroMemory(pBaseAddr, 2096);
- }
- void EraseHeaders(HINSTANCE hModule)
- {
- PIMAGE_DOS_HEADER pDoH;
- PIMAGE_NT_HEADERS pNtH;
- DWORD i, ersize, protect;
- if (!hModule) return;
- pDoH = (PIMAGE_DOS_HEADER)(hModule);
- pNtH = (PIMAGE_NT_HEADERS)((LONG)hModule + ((PIMAGE_DOS_HEADER)hModule)->e_lfanew);
- ersize = sizeof(IMAGE_DOS_HEADER);
- if (VirtualProtect(pDoH, ersize, PAGE_READWRITE, &protect))
- {
- for (i = 0; i < ersize; i++)
- *(BYTE*)((BYTE*)pDoH + i) = 0;
- }
- ersize = sizeof(IMAGE_NT_HEADERS);
- if (pNtH && VirtualProtect(pNtH, ersize, PAGE_READWRITE, &protect))
- {
- for (i = 0; i < ersize; i++)
- *(BYTE*)((BYTE*)pNtH + i) = 0;
- }
- return;
- }
- typedef struct _LDR_MODULE
- {
- LIST_ENTRY InLoadOrderModuleList;
- LIST_ENTRY InMemoryOrderModuleList;
- LIST_ENTRY InInitializationOrderModuleList;
- PVOID BaseAddress;
- PVOID EntryPoint;
- ULONG SizeOfImage;
- }LDR_MODULE, *PLDR_MODULE;
- typedef struct _PEB_LDR_DATA
- {
- ULONG Length;
- BOOLEAN Initialized;
- PVOID SsHandle;
- LIST_ENTRY InLoadOrderModuleList;
- LIST_ENTRY InMemoryOrderModuleList;
- LIST_ENTRY InInitializationOrderModuleList;
- }PEB_LDR_DATA, *PPEB_LDR_DATA;
- typedef struct _PEB
- {
- BYTE Reserved1[2];
- BYTE BeingDebugged;
- BYTE Reserved2[1];
- PVOID Reserved3[2];
- PPEB_LDR_DATA Ldr;
- }PEB, *PPEB;
- void HideModule(HINSTANCE hModule)
- {
- PEB* peb;
- LDR_MODULE* ldr;
- peb = (PEB*)__readfsdword(0x30);
- ldr = (LDR_MODULE*)peb->Ldr->InLoadOrderModuleList.Flink;
- while (ldr->BaseAddress != 0)
- {
- if (ldr->BaseAddress == hModule)
- {
- if (ldr->InLoadOrderModuleList.Blink != 0)
- (ldr->InLoadOrderModuleList.Blink)->Flink = ldr->InLoadOrderModuleList.Flink;
- if (ldr->InLoadOrderModuleList.Blink != 0)
- (ldr->InLoadOrderModuleList.Flink)->Blink = ldr->InLoadOrderModuleList.Blink;
- if (ldr->InInitializationOrderModuleList.Blink != 0)
- (ldr->InInitializationOrderModuleList.Blink)->Flink = ldr->InInitializationOrderModuleList.Flink;
- if (ldr->InInitializationOrderModuleList.Flink != 0)
- (ldr->InInitializationOrderModuleList.Flink)->Blink = ldr->InInitializationOrderModuleList.Blink;
- if (ldr->InMemoryOrderModuleList.Flink != 0)
- (ldr->InMemoryOrderModuleList.Blink)->Flink = ldr->InMemoryOrderModuleList.Flink;
- if (ldr->InMemoryOrderModuleList.Flink != 0)
- (ldr->InMemoryOrderModuleList.Flink)->Blink = ldr->InMemoryOrderModuleList.Blink;
- }
- ldr = (LDR_MODULE*)ldr->InLoadOrderModuleList.Flink;
- }
- }
- string dsasd = "https://deepspace.rf.gd/";
- //string url = "https://pastebin.com/Acqq8wKd";
- //#define TrialXor /*https://pastebin.com/Acqq8wKd*/XorStr<0x90,30,0xB4880A1D>("\xF8\xE5\xE6\xE3\xE7\xAF\xB9\xB8\xE8\xF8\xE9\xEF\xF9\xFF\xF7\xF1\x8E\xC2\xCD\xCE\x8B\xE4\xC5\xD6\xD9\x91\xDD\xE0\xC8"+0xB4880A1D).s
- //int CheckTrial(char *url1,char *url2,char *url3){
- //char output[15000];
- //HINTERNET hInternet;
- //HINTERNET hFile;
- //DWORD ReadSize;
- //BOOL bResult;
- //hInternet = InternetOpenA(url2, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, NULL);
- //hFile = InternetOpenUrlA(hInternet, url1, NULL, NULL, INTERNET_FLAG_RELOAD, NULL);
- //ReadSize = 15;
- //bResult = InternetReadFile(hFile, output, 15, &ReadSize);
- //output[ReadSize] = '\0';
- //if(strcmp(url3, output)==0){
- // MessageBoxA(0,"Activated !","Enjoy",0);
- //
- //Beep(1000, 100);
- //}else{
- //ExitProcess(0);
- //Sleep(10);
- //ShellExecuteA(0,"open",dsasd.c_str(),0,0,SW_SHOWNORMAL);
- ////system("start url");
- //}
- //return 0;
- //}
- int trial(char *urll){
- char output[16];
- HINTERNET hInternet;HINTERNET hFile;DWORD ReadSize; BOOL bResult;
- hInternet = InternetOpenA("Some USER-AGENT",INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,NULL);
- hFile = InternetOpenUrlA(hInternet,urll,NULL,NULL,INTERNET_FLAG_RELOAD,NULL);
- ReadSize = 15;bResult = InternetReadFile(hFile,output,15,&ReadSize);output[ReadSize]='\0';
- if(strcmp("ACTIVE",output)==0){
- MessageBoxA(0, "SUCCESSFULLY INJECTED","testing", MB_OK | MB_ICONINFORMATION);
- }else{
- MessageBoxA(0, "ERROR","testing", MB_OK | MB_ICONINFORMATION);
- }
- return 0;
- }
- void __stdcall CheckFile(){
- trial("https://pastebin.com/raw/2ryNFhT5");
- }
- void AntiDebug1()
- {
- CONTEXT ctx = {};
- ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
- if (GetThreadContext(GetCurrentThread(), &ctx))
- {
- if (ctx.Dr0 != 0 || ctx.Dr1 != 0 || ctx.Dr2 != 0 || ctx.Dr3 != 0)
- {
- std::cout << "Stop debugging program!" << std::endl;
- exit(-1);
- }
- }
- }
- void AntiDebug2()
- {
- BOOL isDebugged = TRUE;
- __try
- {
- __asm
- {
- pushfd
- or dword ptr[esp], 0x100 // set the Trap Flag
- popfd // Load the value into EFLAGS register
- nop
- }
- }
- __except (EXCEPTION_EXECUTE_HANDLER)
- {
- // If an exception has been raised – debugger is not present
- isDebugged = FALSE;
- }
- if (isDebugged)
- {
- std::cout << "Stop debugging program!" << std::endl;
- exit(-1);
- }
- }
- void AntiDebug3()
- {
- CONTEXT ctx = {};
- ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
- if (GetThreadContext(GetCurrentThread(), &ctx))
- {
- if (ctx.Dr0 != 0 || ctx.Dr1 != 0 || ctx.Dr2 != 0 || ctx.Dr3 != 0)
- {
- std::cout << "Stop debugging program!" << std::endl;
- exit(-1);
- }
- }
- }
- BOOL APIENTRY DllMain(
- _In_ HINSTANCE _1,
- _In_ DWORD _2,
- _In_ LPVOID _3) {
- DWORD ROS = (DWORD)GetModuleHandleA(GameBase);
- DisableThreadLibraryCalls(_1);
- switch (_2) {
- case DLL_PROCESS_ATTACH:
- /*OutputDebugString(TEXT("%s%s%s%s%s%s%s%s%s%s%s")
- TEXT("%s%s%s%s%s%s%s%s%s%s%s%s%s")
- TEXT("%s%s%s%s%s%s%s%s%s%s%s%s%s")
- TEXT("%s%s%s%s%s%s%s%s%s%s%s%s%s"));*/
- ErasePeKrds(_1);
- HideThread(_1);
- HideFromDebugger();
- DebugSelf();
- AntiDebug1();
- AntiDebug2();
- AntiDebug3();
- //HideModule(_1);
- //EraseHeaders(_1);
- //while (!(hWnd = FindWindowA(0, "Rules of Survival 1.189032.190946")))
- // Sleep(200);
- Hand = _1;
- hWnd = FindWindowA(0, "Rules of Survival 1.228147.229724");//
- //
- SetWindowTextA(hWnd,"Rules of zNova");
- //(HMODULE)hWnd;
- //_beginthreadex(0,0,CallBypass,0,0,0);
- //CreateThread(0,0,(LPTHREAD_START_ROUTINE)CheckFile,0,0,0);
- CreateThread(0, 0, (LPTHREAD_START_ROUTINE)NoClip, 0, 0, 0);
- CreateThread(0, 0, (LPTHREAD_START_ROUTINE)D3D, 0, 0, 0);//_beginthreadex
- //CreateThread(0,0,(LPTHREAD_START_ROUTINE)GetAddress,0,0,0);
- break;
- case DLL_PROCESS_DETACH:
- //SetWindowLongPtr(FindWindowA(0, "Rules of Survival 1.189032.190946"), GWL_WNDPROC, (LONG_PTR)m_pWindowProc);//1.186978.188496
- break;
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement