Advertisement
Guest User

Untitled

a guest
Jan 5th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 123.30 KB | None | 0 0
  1. #include "cInclude.h"
  2. #include "Class.h"
  3. #include <string>
  4. #include <string.h>
  5. #include "Xor.h"
  6. #include <windows.h>
  7. #include <iostream>
  8. #include <tchar.h>
  9. #include <tlhelp32.h>
  10. #include <psapi.h>
  11. #include <fstream>
  12. #include <sstream>
  13. #include <intrin.h>
  14. #include <ctime>
  15. #include "Functions.h"
  16. #include "Bypass.h"
  17. #include "detours.h"
  18. #include "MemoryHacks.h"
  19. #include "HSDN.h"
  20. #include <WinInet.h>
  21. #include "Radar.h"
  22. #include <random>
  23. #pragma comment(lib,"Winmm.lib")
  24. #pragma comment(lib,"Wininet.lib")
  25. #pragma comment(lib, "detours.lib")
  26. #pragma intrinsic(_ReturnAddress)
  27. using namespace std;
  28. #pragma warning(disable:4305)
  29. #pragma warning(disable:4996)
  30.  
  31. CRadar Rad;
  32. //-----------------------------------------------------------------------------------------------------------------------------------
  33. D3DVIEWPORT9 Viewport;
  34. float ScreenCX = 0;
  35. float ScreenCY = 0;
  36. HANDLE MEMORY = OpenProcess(PROCESS_ALL_ACCESS, 0, GetCurrentProcessId());
  37.  
  38. MEMORY_BASIC_INFORMATION MBI;
  39.  
  40. /*
  41. What it does ?
  42. First Get the crc address in the possible area i have this will keep you safe i have the crc interval offset
  43. Then simply replace the emulated crc in our Dll :D
  44.  
  45. */
  46.  
  47.  
  48. void CRadar::RadarRange( float* x , float* y , float range )
  49. {
  50. if ( fabs( ( *x ) ) > range || fabs( ( *y ) ) > range )
  51. {
  52. if ( ( *y ) > ( *x ) )
  53. {
  54. if ( ( *y ) > -( *x ) )
  55. {
  56. ( *x ) = range*( *x ) / ( *y );
  57. ( *y ) = range;
  58. }
  59. else
  60. {
  61. ( *y ) = -range*( *y ) / ( *x );
  62. ( *x ) = -range;
  63. }
  64. }
  65. else
  66. {
  67. if ( ( *y ) > -( *x ) )
  68. {
  69. ( *y ) = range*( *y ) / ( *x );
  70. ( *x ) = range;
  71. }
  72. else
  73. {
  74. ( *x ) = -range*( *x ) / ( *y );
  75. ( *y ) = -range;
  76. }
  77. }
  78. }
  79. }
  80. class Math
  81. {
  82. public:
  83.  
  84. float DegToRad(float degree)
  85. {
  86. return (float)(degree * (3.14159265358979323846f / 180.0F));
  87. }
  88.  
  89. float RadToDeg(float degree)
  90. {
  91. return (float)(degree * (180.0F / 3.14159265358979323846f));
  92. }
  93. };Math* pMath = 0;
  94.  
  95. void CRadar::CalcRadarPoint( D3DXVECTOR3 vOrigin ,D3DXVECTOR3 LocalPos, int& screenx , int& screeny )
  96. {
  97.  
  98. float M_PI = 3.14159265358979323846f;
  99. //Interfaces::Engine()->GetViewAngles( vAngle );
  100. auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
  101. DWORD LocalPlayer = *(PDWORD)*(PDWORD)(uBase + OFFSET_LOCAL);
  102. float fnewyaw = *(float*)(LocalPlayer + 0x90);
  103.  
  104. //D3DXVECTOR3 Coord = Rotate(vOrigin, LocalPos, fnewyaw);
  105. //D3DXVECTOR3 Return;
  106. //
  107. //Return.x = Coord.x + (float)screenx + (150 / 2.0f);
  108. //Return.z = -Coord.z + (float)screeny + (150 / 2.0f);
  109. //
  110. //if (Return.x > ((float)screeny + 150 - 4))
  111. // Return.x = ((float)screenx + 150);
  112. //else if (Return.x < ((float)screenx))
  113. // Return.x = (float)screenx;
  114. //
  115. //if (Return.z > ((float)screeny + 150 - 4))
  116. // Return.z = ((float)screeny + 150);
  117. //else if (Return.z < ((float)screeny))
  118. // Return.z = (float)screeny;
  119.  
  120.  
  121.  
  122. float dx = vOrigin.x - LocalPos.x;
  123. float dy = vOrigin.y - LocalPos.y;
  124.  
  125. float fYaw = float(fnewyaw * ( M_PI / 180.0 ) );
  126.  
  127. float fsin_yaw = sin( fYaw );
  128. float fminus_cos_yaw = -cos( fYaw );
  129.  
  130. float x = dy*fminus_cos_yaw + dx*fsin_yaw;
  131. float y = dx*fminus_cos_yaw - dy*fsin_yaw;
  132.  
  133. float range = (float)500.0f;
  134.  
  135. RadarRange( &x , &y , range );
  136.  
  137. ImVec2 DrawPos = ImGui::GetCursorScreenPos();
  138. ImVec2 DrawSize = ImGui::GetContentRegionAvail();
  139.  
  140. int rad_x = (int)DrawPos.x;
  141. int rad_y = (int)DrawPos.y;
  142.  
  143. float r_siz_x = DrawSize.x;
  144. float r_siz_y = DrawSize.y;
  145.  
  146. int x_max = (int)r_siz_x + rad_x - 5;
  147. int y_max = (int)r_siz_y + rad_y - 5;
  148.  
  149. screenx = rad_x + ( (int)r_siz_x / 2 + int( x / range * r_siz_x ) );
  150. screeny = rad_y + ( (int)r_siz_y / 2 + int( y / range * r_siz_y ) );
  151.  
  152. if ( screenx > x_max )
  153. screenx = x_max;
  154.  
  155. if ( screenx < rad_x )
  156. screenx = rad_x;
  157.  
  158. if ( screeny > y_max )
  159. screeny = y_max;
  160.  
  161. if ( screeny < rad_y )
  162. screeny = rad_y;
  163. }
  164.  
  165. void CRadar::OnRenderPlayer()
  166. {
  167.  
  168.  
  169. GameMatrix* Matrix = World.GetMatrix();
  170. D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
  171. auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
  172.  
  173. auto usermodel = (ModelFactory*)(uBase +OFFSET_MODELFACTORY );
  174.  
  175. size_t count = usermodel->Models.size();
  176.  
  177. for(size_t i = 0; i < count; i++)
  178. //for ( BYTE PlayerIndex = 0; PlayerIndex < g_pPlayers->GetSize(); PlayerIndex++ )
  179. {
  180. Model* pModel = usermodel->Models.at(i);
  181. string Type = pModel->m_pAnimator->m_pModelName->m_pName;
  182. bool isMale = findnew(Type,DataMale);
  183. bool isBot = findnew(Type,bata);
  184. bool isFemale = findnew(Type,DataFemale);
  185.  
  186. D3DXMATRIX ResultPosition = pModel->m_Position;
  187. D3DXVECTOR3 GetPosition;
  188. D3DXVECTOR3 outPosition;
  189. GetPosition.x = ResultPosition._41;
  190. GetPosition.y = ResultPosition._42;
  191. GetPosition.z = ResultPosition._43;
  192. D3DXVECTOR3 MyPos = MyLoCalPos();
  193. //CPlayer* pPlayer = g_pPlayers->GetPlayer( PlayerIndex );
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. float Color_R = 0.f;
  203. float Color_G = 0.f;
  204. float Color_B = 0.f;
  205. float Alpha = 0.0f;
  206.  
  207. if(isMale)
  208. {
  209.  
  210. Color_R = 255.0f;
  211. Color_G = 0.0f;
  212. Color_B = 0.0f;
  213. Alpha = 255.0f;
  214. }
  215. else if(isFemale)
  216. {
  217.  
  218.  
  219. Color_R = 255.0f;
  220. Color_G = 50.0f;
  221. Color_B = 250.0f;
  222. Alpha = 255.0f;
  223. }
  224. else if(isBot)
  225. {
  226. Color_R = 0.0f;
  227. Color_G = 255.0f;
  228. Color_B = 0.0f;
  229. Alpha = 255.0f;
  230. }
  231.  
  232. int screenx = (int)Viewport.Width;
  233. int screeny = (int)Viewport.Height;
  234. CalcRadarPoint( GetPosition ,MyPos, screenx , screeny );
  235.  
  236. ImDrawList* Draw = ImGui::GetWindowDrawList();
  237.  
  238. Draw->AddRectFilled( ImVec2( (float)screenx , (float)screeny ) ,
  239. ImVec2( (float)screenx + 5 , (float)screeny + 5 ) ,
  240. ImColor( Color_R , Color_G , Color_B , Alpha ) );
  241.  
  242.  
  243.  
  244. }
  245. }
  246. void CRadar::OnRender()
  247. {
  248. //ImGui_NewFrame();
  249. if ( stack.d3d.radar)// && IsLocalAlive() || bIsGuiVisible )
  250. {
  251.  
  252.  
  253. float prevAlpha = ImGui::GetStyle().Alpha;
  254.  
  255. float Alpha = (float)1.1f;
  256. DWORD Flags = ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_ShowBorders;
  257. ImGui::GetStyle().Alpha = Alpha;
  258. ImGui::SetNextWindowSize(ImVec2(50, 300));
  259. //ImGui::Begin(zNova, &bShowWindow, ImVec2(543, 300), 1.0f, dwFlag);
  260. if ( ImGui::Begin( "[DS]2D RADAR" , &stack.d3d.radar ,ImVec2(300,200),1.0f, Flags) )
  261. {
  262. ImDrawList* Draw = ImGui::GetWindowDrawList();
  263.  
  264. ImVec2 DrawPos = ImGui::GetCursorScreenPos();
  265. ImVec2 DrawSize = ImGui::GetContentRegionAvail();
  266.  
  267.  
  268. Draw->AddLine(
  269. ImVec2( DrawPos.x + DrawSize.x / 2.f , DrawPos.y ) ,
  270. ImVec2( DrawPos.x + DrawSize.x / 2.f , DrawPos.y + DrawSize.y ) ,
  271. ImColor( 1.f , 1.f , 1.f , Alpha ) );
  272.  
  273. Draw->AddLine(
  274. ImVec2( DrawPos.x , DrawPos.y + DrawSize.y / 2.f ) ,
  275. ImVec2( DrawPos.x + DrawSize.x , DrawPos.y + DrawSize.y / 2.f ) ,
  276. ImColor( 1.f , 1.f , 1.f , Alpha ) );
  277.  
  278.  
  279. //Draw->AddLine(
  280. // ImVec2(PosX + DrawSize.x / 2.0f ,PosY),
  281. // //ImVec2( DrawPos.x + DrawSize.x , DrawPos.y ) ,// 2.f
  282. // ImVec2(PosX + DrawSize.x, PosY + DrawSize.y / 2.0f),
  283. // //ImVec2( DrawPos.x + DrawSize.x , DrawPos.y + DrawSize.y ) ,// 2.f
  284. // ImColor( 1.f , 1.f , 1.f , Alpha ) );
  285.  
  286. //Draw->AddLine(
  287. // ImVec2(PosX , PosY + DrawSize.y / 2.0f),
  288. // ImVec2(PosX + DrawSize.x / 2.0f, PosY + DrawSize.y),
  289. // //ImVec2( DrawPos.x , DrawPos.y + DrawSize.y ) ,// / 2.f
  290. // //ImVec2( DrawPos.x + DrawSize.x , DrawPos.y + DrawSize.y / 2.f ) ,
  291. // ImColor( 1.f , 1.f , 1.f , Alpha ) );
  292.  
  293. OnRenderPlayer();
  294.  
  295.  
  296.  
  297. ImGui::End();
  298. }
  299.  
  300. ImGui::GetStyle().Alpha = prevAlpha;
  301.  
  302. }
  303. ImGui::Render();
  304. /*else if ( !stack.d3d.radar )
  305. {
  306. if ( Interfaces::Engine()->IsInGame() )
  307. {
  308. OnRenderPlayer();
  309. }
  310. }*/
  311. }
  312.  
  313.  
  314. struct WeaponEspInfo_t
  315. {
  316. float pOutX, pOutY, RealDistance, vSizeod;
  317. float CrosshairDistance;
  318. };
  319. std::vector<WeaponEspInfo_t>WeaponEspInfo;
  320.  
  321. void AddWeapons(LPDIRECT3DDEVICE9 Device)
  322. {
  323. D3DXMATRIX matrix;
  324. Device->GetVertexShaderConstantF(13, matrix, 4);
  325.  
  326. D3DXVECTOR3 pOut, pIn(0, (float)1, 0);
  327. float distance = pIn.x * matrix._14 + pIn.y * matrix._24 + pIn.z * matrix._34 + matrix._44;
  328. D3DXVec3TransformCoord(&pOut, &pIn, &matrix);
  329.  
  330. pOut.x = Viewport.X + (1.0f + pOut.x) *Viewport.Width / 2.0f;
  331. pOut.y = Viewport.Y + (1.0f - pOut.y) *Viewport.Height / 2.0f;
  332.  
  333. WeaponEspInfo_t pWeaponEspInfo = { static_cast<float>(pOut.x), static_cast<float>(pOut.y), static_cast<float>(distance) };
  334. WeaponEspInfo.push_back(pWeaponEspInfo);
  335. }
  336.  
  337. const char* getnewitem(int a) {
  338. switch (a)
  339. {
  340. case 1: return "Lv 1 helmet";
  341. case 2: return "Lv 2 helmet";
  342. case 3: return "Lv 3 helmet";
  343. case 5: return "Lv 1 Armor";
  344. case 6: return "Lv 2 Armor";
  345. case 7: return "Lv 3 Armor";
  346. case 8: return "Lv 1 Backpack";
  347. case 9: return "Lv 2 Backpack";
  348. case 10: return "Lv 3 Backpack";
  349. case 19: return "Ghillie Suit";
  350. case 50: return "Fuel Barrel";
  351. case 101: return "Bandage";
  352. case 102: return "Med Kit";
  353. case 103: return "First Aid Kit";
  354. case 105: return "Sports Drink";
  355. case 106: return "Cardio Tonic";
  356. case 1001: return "M4A1 Rifle";
  357. case 1002: return "AKM Rifle";
  358. case 1003: return "M870 SG";
  359. case 1004: return "M1887 SG";
  360. case 1005: return "AA12 SG";
  361. case 1006: return "AWM SR";
  362. case 1007: return "Barett SR";
  363. case 1008: return "M249 MG";
  364. case 1009: return "M14EBR Rifle";
  365. case 1010: return "AR15 Rifle";
  366. case 1011: return "MP7 SMG";
  367. case 1012: return "PP19 SMG";
  368. case 1013: return "Thompson SMG";
  369. case 1014: return "G18C Pistol";
  370. case 1015: return "Desert Eagle";
  371. case 1017: return "Vector";
  372. case 1018: return "P90 SMG";
  373. case 1019: return "SAIGA-12 Shotgun";
  374. case 1020: return "WRO Hunting Rifle";
  375. case 1021: return "SVD SR";
  376. case 1022: return "M110 Sniper Rifle";
  377. case 1023: return "ACR Rifle";
  378. case 1024: return "AN94 Rifle";
  379. case 1025: return "MP5 SMG";
  380. case 1026: return "AUG Rifle";
  381. case 1027: return "QBU Sniper Rifle";
  382. case 1031: return "RPG Rocket Tube";
  383. case 1101: return "SG Ammo";
  384. case 1102: return "Rifle Ammo";
  385. case 1103: return "SR Ammo";
  386. case 1104: return "SMG Ammo";
  387. case 1105: return "Pistol Ammo";
  388. case 1106: return "RPG Ammo";
  389. case 1201: return "Rifle Silencer";
  390. case 1202: return "SR Silence";
  391. case 1204: return "SMG Silencer";
  392. case 1211: return "Rifle Compensator";
  393. case 1212: return "SR Compensator";
  394. case 1213: return "SMG Compensator";
  395. case 1221: return "Rifle Flash Hider";
  396. case 1222: return "SR Flash Hider";
  397. case 1223: return "SMG Smoke Hider";
  398. case 1231: return "SG Choke";
  399. case 1241: return "Triangle Grip";
  400. case 1242: return "Vertical Foregrip";
  401. case 1251: return "Rifle QD-Mag";
  402. case 1252: return "Rifle EX-Mag";
  403. case 1253: return "Rifle EX-QD-Mag";
  404. case 1261: return "SR Cheek Pad";
  405. case 1262: return "Tactical Stock";
  406. case 1263: return "SG Bullet Loop";
  407. case 1264: return "SR EX-Mag";
  408. case 1265: return "SR QD-Mag";
  409. case 1266: return "SR EX-QD-Mag";
  410. case 1271: return "Red Dot Sight";
  411. case 1272: return "Holo-Sight";
  412. case 1273: return "2x Scope";
  413. case 1274: return "4x Scope";
  414. case 1275: return "8x Scope";
  415. case 1276: return "SMG QD-Mag";
  416. case 1277: return "SMG EX-Mag";
  417. case 1278: return "SMG QD-EX-Mag";
  418. case 1279: return "Collapsible Stock";
  419. case 1303: return "Crowbar";
  420. case 1306: return "Frying Pan";
  421. case 1307: return "Rubber Chicken";
  422. case 1401: return "Grenade";
  423. case 1402: return "Stun Grenade";
  424. case 1403: return "Smoke Grenade";
  425. case 1404: return "Molotov Cocktail";
  426. case 1405: return "Chicken Grenade";
  427. case 1406: return "Flash Grenade";
  428.  
  429.  
  430. char aa[12];
  431. sprintf(aa,"%d",a);
  432. default:return aa;
  433. //wchar_t aa[12];
  434. //_snwprintf(aa, sizeof(aa), L"%d", a);
  435. //new_item = a;
  436.  
  437.  
  438. break;
  439.  
  440. }
  441. }
  442. class Vector
  443. {
  444. public:
  445. FLOAT X, Y;
  446.  
  447. Vector()
  448. {
  449. this->X = 0.0f;
  450. this->Y = 0.0f;
  451. }
  452. };
  453. Vector ScreenCoords;
  454.  
  455.  
  456. IDirect3DDevice9* m_pD3Ddev;
  457. bool Create = false;
  458. bool crosshair;
  459. bool h1, h2, h3, h4, h5, h6;
  460. bool h7, h8, h9, h10, h11, h12;
  461.  
  462. static bool no_titlebar = false;
  463. static bool no_border = true;
  464. static bool no_resize = true;
  465. static bool no_move = false;
  466. static bool no_scrollbar = false;
  467. static bool no_collapse = false;
  468. static bool no_menu = false;
  469. namespace GlobalStuff
  470. {
  471. extern bool Aimbotting;
  472. extern bool InAntiAim;
  473. extern bool Return;
  474. extern HMODULE Dll;
  475. extern HWND Window;
  476. extern bool PressedKeys[256];
  477. extern bool d3dinit;
  478. extern float asd;
  479. extern int ChamMode;
  480. extern bool SendPacket;
  481. extern int BestTarget;
  482. }
  483.  
  484.  
  485.  
  486. bool InsideCircleX(POINT xyc, int r, int x, int y)
  487. {
  488. long dx = xyc.x - x;
  489. long dy = xyc.y - y;
  490. return dx * dx + dy * dy <= r * r;
  491. }
  492. bool showa2;
  493. #include "D3D9.h"
  494.  
  495. void SetModelColor(LPDIRECT3DDEVICE9 pDevice, float r, float g, float b, float a, float glowr, float glowg, float glowb, float glowa)
  496. {
  497. float lightValues[4] = { r, g, b, a };
  498. float glowValues[4] = { glowr, glowg, glowb, glowa };
  499.  
  500. pDevice->SetPixelShaderConstantF(1, lightValues, 1);
  501. pDevice->SetPixelShaderConstantF(3, glowValues, 1);
  502.  
  503.  
  504. }
  505. UINT Stride;
  506. UINT vSize;
  507. bool InitOnce = true;
  508. IDirect3DVertexShader9* vShader;
  509.  
  510. HRESULT APIENTRY SetStreamSource_hook(LPDIRECT3DDEVICE9 pDevice, UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT sStride)
  511. {
  512. if (StreamNumber == 0)
  513. Stride = sStride;
  514.  
  515. return SetStreamSource_orig(pDevice, StreamNumber, pStreamData, OffsetInBytes, sStride);
  516. }
  517. HRESULT APIENTRY SetTexture_hook(LPDIRECT3DDEVICE9 pDevice, DWORD Sampler, IDirect3DBaseTexture9 *pTexture)
  518. {
  519. if (InitOnce)
  520. {
  521. InitOnce = false;
  522. pDevice->GetViewport(&Viewport);
  523. ScreenCX = (float)Viewport.Width / 2.0f;
  524. ScreenCY = (float)Viewport.Height / 2.0f;
  525.  
  526.  
  527. }
  528.  
  529. if (SUCCEEDED(pDevice->GetVertexShader(&vShader)))
  530. if (vShader != NULL)
  531. if (SUCCEEDED(vShader->GetFunction(NULL, &vSize)))
  532. if (vShader != NULL) { vShader->Release(); vShader = NULL; }
  533.  
  534.  
  535. if (stack.d3d.wallhack)
  536. {
  537. pDevice->SetRenderState(D3DRS_DEPTHBIAS, 0);
  538. if (vSize == 2008 || vSize == 2356 || vSize == 624 || vSize == 1004)
  539.  
  540.  
  541.  
  542. {
  543. float bias = 1000.0f;
  544. float bias_float = static_cast<float>(-bias);
  545. bias_float /= 10000.0f;
  546. pDevice->SetRenderState(D3DRS_DEPTHBIAS, *(DWORD*)&bias_float);
  547. }
  548.  
  549. if (Stride == 48 || vSize == 2008 || vSize == 2356)
  550. {
  551. D3DXMATRIX matLegs;
  552. D3DXMatrixScaling(&matLegs, 0.0f, 0.0f, 0.0f);
  553. pDevice->SetVertexShaderConstantF(20, matLegs, 1);//legs
  554.  
  555. D3DXMATRIX matChest;
  556. D3DXMatrixScaling(&matChest, 0.0f, 0.0f, 0.0f);
  557. pDevice->SetVertexShaderConstantF(25, matChest, 1);//chest
  558. }
  559.  
  560. if (Stride == 48 || vSize == 2300 || vSize == 900 || vSize == 1952 || vSize == 640)
  561. AddWeapons(pDevice);
  562. }
  563.  
  564.  
  565. pDevice->SetRenderState(D3DRS_DEPTHBIAS, 0);
  566. if(stack.d3d.cham)
  567. {
  568. if (vSize == 2008 || vSize == 2356 || vSize == 624 || vSize == 1004)
  569.  
  570. {
  571. if(stack.d3d.cham == 1 && (vSize != 624 || vSize != 1004))
  572. {
  573. SetModelColor(pDevice, 0.0f, 255.0f, 0.0f, 255.0f, 0.0f, 1.0f, 0.0f, 1.0f);//green
  574. }
  575. if(stack.d3d.cham == 2 && (vSize != 624 || vSize != 1004))
  576. {
  577. SetModelColor(pDevice, 0.0f, 0.0f, 255.0f, 255.0f, 0.0f, 0.0f, 1.0f, 1.0f);//blue
  578. }
  579. if(stack.d3d.cham == 3 && (vSize != 624 || vSize != 1004))
  580. {
  581. SetModelColor(pDevice, 255.0f, 0.0f, 0.0f, 255.0f, 1.0f, 0.0f, 0.0f, 1.0f);//red
  582. }
  583.  
  584.  
  585. float bias = 1000.0f;
  586. float bias_float = static_cast<float>(-bias);
  587. bias_float /= 10000.0f;
  588. pDevice->SetRenderState(D3DRS_DEPTHBIAS, *(DWORD*)&bias_float);
  589. }
  590. }
  591.  
  592. if (stack.d3d.nograss)
  593. {
  594. pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
  595. if (vSize == 1704 || vSize == 1660 || vSize == 600)//600 flashbang
  596. {
  597. pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_POINT);
  598. }
  599. }
  600.  
  601.  
  602.  
  603.  
  604. return SetTexture_orig(pDevice, Sampler, pTexture);
  605. }
  606.  
  607. const char* getitemname(int a) {
  608. switch (a)
  609. {
  610. case 1: return "Lv 1 helmet";
  611. case 2: return "Lv 2 helmet";
  612. case 3: return "Lv 3 helmet";
  613. case 5: return "Lv 1 Armor";
  614. case 6: return "Lv 2 Armor";
  615. case 7: return "Lv 3 Armor";
  616. case 8: return "Lv 1 Backpack";
  617. case 9: return "Lv 2 Backpack";
  618. case 10: return "Lv 3 Backpack";
  619. case 19: return "Ghillie Suit";
  620. case 50: return "Fuel Barrel";
  621. case 101: return "Bandage";
  622. case 102: return "Med Kit";
  623. case 103: return "First Aid Kit";
  624. case 105: return "Sports Drink";
  625. case 106: return "Cardio Tonic";
  626. case 1001: return "M4A1 Rifle";
  627. case 1002: return "AKM Rifle";
  628. case 1003: return "M870 SG";
  629. case 1004: return "M1887 SG";
  630. case 1005: return "AA12 SG";
  631. case 1006: return "AWM SR";
  632. case 1007: return "Barett SR";
  633. case 1008: return "M249 MG";
  634. case 1009: return "M14EBR Rifle";
  635. case 1010: return "AR15 Rifle";
  636. case 1011: return "MP7 SMG";
  637. case 1012: return "PP19 SMG";
  638. case 1013: return "Thompson SMG";
  639. case 1014: return "G18C Pistol";
  640. case 1015: return "Desert Eagle";
  641. case 1017: return "Vector";
  642. case 1018: return "P90 SMG";
  643. case 1019: return "SAIGA-12 Shotgun";
  644. case 1020: return "WRO Hunting Rifle";
  645. case 1021: return "SVD SR";
  646. case 1022: return "M110 Sniper Rifle";
  647. case 1023: return "ACR Rifle";
  648. case 1024: return "AN94 Rifle";
  649. case 1025: return "MP5 SMG";
  650. case 1026: return "AUG Rifle";
  651. case 1027: return "QBU Sniper Rifle";
  652. case 1031: return "RPG Rocket Tube";
  653. case 1040: return "Crossbow";
  654. case 1101: return "SG Ammo";
  655. case 1102: return "Rifle Ammo";
  656. case 1103: return "SR Ammo";
  657. case 1104: return "SMG Ammo";
  658. case 1105: return "Pistol Ammo";
  659. case 1106: return "RPG Ammo";
  660. case 1109: return "Arrow";
  661. case 1201: return "Rifle Silencer";
  662. case 1202: return "SR Silence";
  663. case 1204: return "SMG Silencer";
  664. case 1211: return "Rifle Compensator";
  665. case 1212: return "SR Compensator";
  666. case 1213: return "SMG Compensator";
  667. case 1221: return "Rifle Flash Hider";
  668. case 1222: return "SR Flash Hider";
  669. case 1223: return "SMG Smoke Hider";
  670. case 1231: return "SG Choke";
  671. case 1241: return "Triangle Grip";
  672. case 1242: return "Vertical Foregrip";
  673. case 1251: return "Rifle QD-Mag";
  674. case 1252: return "Rifle EX-Mag";
  675. case 1253: return "Rifle EX-QD-Mag";
  676. case 1261: return "SR Cheek Pad";
  677. case 1262: return "Tactical Stock";
  678. case 1263: return "SG Bullet Loop";
  679. case 1264: return "SR EX-Mag";
  680. case 1265: return "SR QD-Mag";
  681. case 1266: return "SR EX-QD-Mag";
  682. case 1271: return "Red Dot Sight";
  683. case 1272: return "Holo-Sight";
  684. case 1273: return "2x Scope";
  685. case 1274: return "4x Scope";
  686. case 1275: return "8x Scope";
  687. case 1276: return "SMG QD-Mag";
  688. case 1277: return "SMG EX-Mag";
  689. case 1278: return "SMG QD-EX-Mag";
  690. case 1279: return "Collapsible Stock";
  691. case 1302: return "Damascus Knife";
  692. case 1303: return "Crowbar";
  693. case 1306: return "Frying Pan";
  694. case 1307: return "Rubber Chicken";
  695. case 1401: return "Grenade";
  696. case 1402: return "Stun Grenade";
  697. case 1403: return "Smoke Grenade";
  698. case 1404: return "Molotov Cocktail";
  699. case 1405: return "Chicken Grenade";
  700. case 1406: return "Flash Grenade";
  701.  
  702. default:return "No Name";
  703. break;
  704. }
  705. }
  706.  
  707.  
  708.  
  709. typedef DWORD(__thiscall *fDecrypt)(void* pthis, DWORD a1, int a3);
  710. fDecrypt oriDec;
  711.  
  712.  
  713. //{"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"}}}
  714. void DecryptCall()
  715. {
  716.  
  717. DWORD Modules = (DWORD)GetModuleHandleA(GameBase);
  718. pMainApp = (MainApp*)(Modules + OFFSET_MAINAPP);
  719. oriDec = (fDecrypt)(Modules + OFFSET_DCRYPTENTITY);
  720. }
  721.  
  722.  
  723. float aim_smooth = 1.0f;
  724. float aim_fov = 45.f;
  725. float heritage_fov = 25.0f;
  726. float teleport_fov = 5.0f;
  727.  
  728. class Bone
  729. {
  730. public:
  731.  
  732.  
  733. void draw3DBoxLines(D3DXVECTOR3 center, D3DXMATRIX mat, float x1, float y1, float z1, float x2, float y2, float z2, D3DCOLOR color)
  734. {
  735. D3DVECTOR pointPos1 = { center.x + x1, center.y + y1, center.z + z1 };
  736. D3DVECTOR pointPos2 = { center.x + x2, center.y + y2, center.z + z2 };
  737. D3DXVECTOR3 sxy1;
  738. sxy1.x = 0;
  739. sxy1.y = 0;
  740. D3DXVECTOR3 sxy2;
  741. sxy2.x = 0;
  742. sxy2.y = 0;
  743. int width = (int)Viewport.Width;
  744. int height = (int)Viewport.Height;
  745. if (ClientApp::WorldToScreen(pointPos1, sxy1, mat, width, height) && ClientApp::WorldToScreen(pointPos2, sxy2, mat, width, height)) {
  746. if (sxy1.x != 0 || sxy1.y != 0 || sxy2.x != 0 || sxy2.y != 0)
  747. DrawLine(pDevice,sxy1.x, sxy1.y, sxy2.x, sxy2.y, color);
  748. }
  749.  
  750. }
  751. void draw3DBOX(D3DXVECTOR3 center, D3DXMATRIX mat, float w, float h, D3DCOLOR color)
  752. {
  753. //bottom Line
  754. #define padding 12
  755. draw3DBoxLines(center, mat, -w, -w, 0, w, -w, 0, color);
  756. draw3DBoxLines(center, mat, -w, -w, h, w, -w, h, color); //BOTTOM BACK
  757.  
  758. //middle Line
  759. draw3DBoxLines(center, mat, -w, -w, 0, -w, -w, h, color);
  760. draw3DBoxLines(center, mat, w, -w, 0, w, -w, h, color);
  761.  
  762. //top Line
  763. draw3DBoxLines(center, mat, w, w + padding, 0, w, w + padding, h, color); // TOP
  764. draw3DBoxLines(center, mat, -w, w + padding, 0, -w, w + padding, h, color); //TOP
  765. draw3DBoxLines(center, mat, w, w + padding, 0, -w, w + padding, 0, color);// TOP
  766. draw3DBoxLines(center, mat, w, w + padding, h, -w, w + padding, h, color); // TOP
  767.  
  768. //SIDE
  769. draw3DBoxLines(center, mat, -w, -w, 0, -w, w + padding, 0, color); //SIDE
  770. draw3DBoxLines(center, mat, w, w + padding, 0, w, -w, 0, color); //SIDE
  771. draw3DBoxLines(center, mat, -w, -w, h, -w, w + padding, h, color); // RIGHT BACK SIDE
  772. draw3DBoxLines(center, mat, w, w + padding, h, w, -w, h, color); // LEFT BACK SIDE
  773. }
  774.  
  775. static D3DXVECTOR3 GetBonePosition( Model* pModel, int BoneID )
  776. {
  777. D3DXMATRIX result;
  778. D3DXMATRIX bone = pModel->m_pAnimator->m_Matrix->Bone[BoneID];
  779. if ( !D3DXMatrixIsIdentity( &bone ) )
  780. {
  781. D3DXMatrixMultiply( &result, &bone, &pModel->m_Position );
  782. return D3DXVECTOR3( result._41, result._42, result._43 );
  783. }
  784. }
  785.  
  786. static bool InternalW2S( D3DXVECTOR3 vLocal, D3DXVECTOR3& vOut )
  787. {
  788. GameMatrix* Matrix = World.GetMatrix();
  789. D3DXMATRIX ViewMatrix = Matrix->WorldMatrix;
  790. D3DXMATRIX temp;
  791. D3DXVECTOR3 vScreen;
  792. D3DXMatrixTranspose( &temp, &ViewMatrix );
  793.  
  794. D3DXVECTOR3 TranslationVector = D3DXVECTOR3( temp._41, temp._42, temp._43 );
  795. D3DXVECTOR3 Up = D3DXVECTOR3( temp._21, temp._22, temp._23 );
  796. D3DXVECTOR3 MRight = D3DXVECTOR3( temp._11, temp._12, temp._13 );
  797.  
  798. float w = D3DXVec3Dot( &TranslationVector, &vLocal ) + temp._44;
  799.  
  800. if ( w < 1.29f )
  801. {
  802. vScreen.x = 0;
  803. vScreen.y = 0;
  804. return false;
  805. }
  806.  
  807. float y = D3DXVec3Dot( &Up, &vLocal ) + temp._24;
  808. float x = D3DXVec3Dot( &MRight, &vLocal ) + temp._14;
  809.  
  810. vScreen.x = ( Viewport.Width / 2 ) * ( 1 + ( x / w ) );
  811. vScreen.y = ( Viewport.Height / 2 ) * ( 1 - ( y / w ) );
  812.  
  813. vOut.x = vScreen.x;
  814. vOut.y = vScreen.y;
  815.  
  816. return true;
  817. }
  818. };
  819. Bone* Jepoy = NULL;
  820.  
  821. D3DCOLOR FLOAT4TOD3DCOLOR(float Col[])
  822. {
  823. ImU32 col32_no_alpha = ImGui::ColorConvertFloat4ToU32(ImVec4(Col[0], Col[1], Col[2], Col[3]));
  824. float a = (col32_no_alpha >> 24) & 255;
  825. float r = (col32_no_alpha >> 16) & 255;
  826. float g = (col32_no_alpha >> 8) & 255;
  827. float b = col32_no_alpha & 255;
  828. return D3DCOLOR_ARGB((int)a, (int)b, (int)g, (int)r);
  829. }
  830. // esp renk checkbox default renk ayarlama
  831. float debugcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  832. float entitycolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  833. float heritagecolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  834.  
  835. float esplineplayercolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  836. float esplinebotcolor[] = { 0.0f, 255.45f, 0.0f, 1.00f };
  837. float espbonecolormale[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  838. float espbonecolorfemale[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  839. float espbonecolordroid[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  840. float esp3dcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  841. float espnamecolor[] = { 0.816f, 0.925f, 0.052f, 1.00f };
  842.  
  843. float espdistancecolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  844. float esp2dcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  845. float esppkcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  846. float espitemscolor[] = { 0.036f, 0.962f, 0.928, 1.00f };
  847. float espplanecolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  848. float espvehiclecolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  849. float espsbcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  850. float espdeadcolor[] = { 255.45f, 84.0f, 242.0f, 12.00f };
  851. float espfovcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  852. float teleportfov[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  853. float espweaponcolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  854. float espvehicledistancecolor[] = { 255.45f, 0.0f, 0.0f, 1.00f };
  855. HRESULT APIENTRY SetVertexShaderConstantF_hook(LPDIRECT3DDEVICE9 pDevice, UINT StartRegister, const float *pConstantData, UINT Vector4fCount)
  856. {
  857. if (pConstantData != NULL)
  858. {
  859. mStartregister = StartRegister;
  860. mVectorCount = Vector4fCount;
  861. }
  862.  
  863. return SetVertexShaderConstantF_orig(pDevice, StartRegister, pConstantData, Vector4fCount);
  864. }
  865.  
  866.  
  867. float GetDistancexyzxc(float Xx, float Yy, float xX, float yY)
  868. {
  869. return sqrt((yY - Yy) * (yY - Yy) + (xX - Xx) * (xX - Xx));
  870. }
  871.  
  872. D3DXVECTOR3 GetEnemyPos(Model* pModel)
  873. {
  874. D3DXMATRIX ResultPosition = pModel->m_Position;
  875. D3DXVECTOR3 GetPosition;
  876. GetPosition.x = ResultPosition._41;
  877. GetPosition.y = ResultPosition._42;
  878. GetPosition.z = ResultPosition._43;
  879. return GetPosition;
  880. }
  881.  
  882.  
  883. int GetTarget;
  884.  
  885.  
  886. int MyTarget()
  887. {
  888. int Result = -1;
  889. float ClosestPos = 99999.f;
  890. D3DXVECTOR3 OnWorld, Screen;
  891. GameMatrix* Matrix = World.GetMatrix();
  892. D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
  893. float ScreenCenterX = (Viewport.Width /2.0f);
  894. float ScreenCenterY = (Viewport.Height /2.0f);
  895. int width = (int)Viewport.Width;
  896. int height = (int)Viewport.Height;
  897.  
  898. DWORD Base = (DWORD)GetModuleHandleA(GameBase);
  899. auto usermodel = (ModelFactory*)(Base + OFFSET_MODELFACTORY);
  900. float radiusx = aim_fov * (ScreenCenterX / 100.0f);
  901. float radiusy = aim_fov * (ScreenCenterY / 100.0f);
  902.  
  903. if(usermodel->Models.size() != NULL)
  904. {
  905.  
  906. // for(int i = 0; i < usermodel->Models; i+=0x4)
  907. for(int i = 0; i < usermodel->Models.size(); i++)//pFactory->GetWorld()->m_pVisible.size(); i++)
  908. {
  909. Model* pModel = usermodel->Models.at(i);//Model * pModel = (Model*)*(DWORD*)(i + usermodel->skeletonList);//
  910. string Type = pModel->m_pAnimator->m_pModelName->m_pName;
  911. bool isMale = findnew(Type,DataMale);
  912. bool isFemale = findnew(Type,DataFemale);
  913. int Distance = GetDistance(MyLoCalPos(),GetEnemyPos(pModel),10);
  914.  
  915. if(isMale)
  916. {
  917. if(stack.aim.target == 1)GetTarget = 14;
  918. if(stack.aim.target == 2)GetTarget = 33;
  919. if(stack.aim.target == 3)GetTarget = 56;
  920. if(Distance > 1)
  921. {
  922. if(GetUserBoneInternal(pModel, OnWorld, GetTarget) && ClientApp::WorldToScreen(OnWorld, Screen, worldMatrix, width, height))
  923. {
  924. float Dist = GetDistance(Screen.x, Screen.y, ScreenCenterX, ScreenCenterY);
  925. if(Screen.x >= ScreenCenterX - radiusx && Screen.x <= ScreenCenterX + radiusx && Screen.y >= ScreenCenterY - radiusy && Screen.y <= ScreenCenterY + radiusy)
  926. if(Dist < ClosestPos)
  927. {
  928. ClosestPos = Dist;
  929. Result = i;
  930. }
  931. }
  932. }
  933. }else
  934. if(isFemale)
  935. {
  936. if(stack.aim.target == 1)GetTarget = 16;
  937. if(stack.aim.target == 2)GetTarget = 35;
  938. if(stack.aim.target == 3)GetTarget = 65;
  939. if(Distance > 1)
  940. {
  941. if(GetUserBoneInternal(pModel, OnWorld, GetTarget) && ClientApp::WorldToScreen(OnWorld, Screen, worldMatrix, width, height))
  942. {
  943. float Dist = GetDistance(Screen.x, Screen.y, ScreenCenterX, ScreenCenterY);
  944. if(Screen.x >= ScreenCenterX - radiusx && Screen.x <= ScreenCenterX + radiusx && Screen.y >= ScreenCenterY - radiusy && Screen.y <= ScreenCenterY + radiusy)
  945. if(Dist < ClosestPos)
  946. {
  947. ClosestPos = Dist;
  948. Result = i;
  949. }
  950. }
  951. }
  952. }
  953. }
  954. }
  955.  
  956. return Result;
  957. }
  958.  
  959. void* GetDictionaryObject(Entity* pObject, char *pType)
  960. {
  961. for (int i = 0; i < (*(PDWORD)pObject->mTable + 0x8); i++) {
  962. const auto table = pObject->mTable->m_PtrTable;
  963. const auto& entry = table[i];
  964. if (strcmp(entry.name->name, pType) == 0)
  965. {
  966. return (void*)entry.data;
  967. }
  968. }
  969. }
  970.  
  971.  
  972.  
  973.  
  974.  
  975. DWORD Distancetele(LPDIRECT3DDEVICE9 pDevice)
  976. {
  977. int maxdistance = 99999;
  978. DWORD Near = 0;
  979. DWORD BAddress = (DWORD)GetModuleHandleA(GameBase);
  980.  
  981.  
  982.  
  983. ListItem * CurentItem = pMainApp->m_ClientApp->m_pFirst->m_pStart;
  984.  
  985. while (CurentItem && CurentItem != pMainApp->m_ClientApp->m_pFirst->m_pEnd)
  986. {
  987.  
  988. DWORD IdObject = 0;
  989. DWORD ResultDcrypt = 0;
  990. DWORD AddLocalPlayer = 0;
  991. IdObject = CurentItem->m_ObjectId;
  992. ResultDcrypt = oriDec(pMainApp->m_ClientApp, IdObject, 0);
  993. AddLocalPlayer = *(DWORD*)(*(DWORD*)(BAddress + OFFSET_LOCAL));
  994. if (ResultDcrypt > 0 && AddLocalPlayer > 0)
  995. {
  996. CEntity* curEntity = (CEntity*)ResultDcrypt;
  997.  
  998.  
  999. string pMeta_str(curEntity->m_pMeta->pName);
  1000.  
  1001.  
  1002. bool isLocal = (std::string::npos != pMeta_str.find(PlayerAvatar));
  1003. bool isPlayer = (std::string::npos != pMeta_str.find(Avatar));
  1004. bool isBot = (std::string::npos != pMeta_str.find(Robot));
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012. if (isPlayer)
  1013. {
  1014. int teamplayer = curEntity->m_Table->pTable->m_TeamRow->mVal;
  1015. int poserow = curEntity->m_Table->pTable->m_PoseRow->mVal;
  1016. int playerhealth = curEntity->m_Table->pTable->m_HpRow->HP;
  1017. D3DXVECTOR3 EnemyPos = GetDecryptedPos(curEntity);
  1018. D3DXVECTOR3 MyPosition = MyLoCalPos();
  1019. if (playerhealth > 0)
  1020. {
  1021. /* if (localteam != teamplayer)
  1022. {
  1023. if (poserow != 3)
  1024. {*/
  1025.  
  1026.  
  1027. int distance = GetDistance(MyPosition, EnemyPos, 10);
  1028. if (distance < maxdistance)
  1029. {
  1030. maxdistance = distance;
  1031. Near = (DWORD)curEntity;
  1032. }
  1033. }
  1034. // }
  1035. //}
  1036.  
  1037.  
  1038. }
  1039.  
  1040. }
  1041.  
  1042. CurentItem = CurentItem->m_pNext;
  1043. }
  1044.  
  1045.  
  1046. return Near;
  1047.  
  1048. }
  1049.  
  1050. DWORD Distancecross(LPDIRECT3DDEVICE9 pDevice)
  1051. {
  1052. int maxdistance = 99999;
  1053. DWORD Near = 0;
  1054. DWORD BAddress = (DWORD)GetModuleHandleA(GameBase);
  1055. GameMatrix* Matrix = World.GetMatrix();
  1056. D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
  1057. D3DVIEWPORT9 viewP;
  1058. pDevice->GetViewport(&viewP);
  1059. DWORD width = viewP.Width;
  1060. DWORD height = viewP.Height;
  1061. float ScreenX = viewP.Width / 2;
  1062. float ScreenY = viewP.Height / 2;
  1063. float PosX = 0.0f, PosY = 0.0f;
  1064.  
  1065.  
  1066. ListItem * CurentItem = pMainApp->m_ClientApp->m_pFirst->m_pStart;
  1067.  
  1068. while (CurentItem && CurentItem != pMainApp->m_ClientApp->m_pFirst->m_pEnd)
  1069. {
  1070. /*for (auto cIdentity : EntityList2)
  1071. {*/
  1072.  
  1073. DWORD IdObject = 0;
  1074. DWORD ResultDcrypt = 0;
  1075. DWORD AddLocalPlayer = 0;
  1076. IdObject = CurentItem->m_ObjectId;
  1077. ResultDcrypt = oriDec(pMainApp->m_ClientApp, IdObject, 0);
  1078. AddLocalPlayer = *(DWORD*)(*(DWORD*)(BAddress + OFFSET_LOCAL));
  1079. if (ResultDcrypt > 0 && AddLocalPlayer > 0)
  1080. {
  1081. CEntity* curEntity = (CEntity*)ResultDcrypt;
  1082.  
  1083.  
  1084. string pMeta_str(curEntity->m_pMeta->pName);
  1085.  
  1086.  
  1087. bool isLocal = (std::string::npos != pMeta_str.find(PlayerAvatar));
  1088. bool isPlayer = (std::string::npos != pMeta_str.find(Avatar));
  1089. bool isBot = (std::string::npos != pMeta_str.find(Robot));
  1090.  
  1091.  
  1092. if (isPlayer || isBot)
  1093. {
  1094. int teamplayer = curEntity->m_Table->pTable->m_TeamRow->mVal;
  1095. int poserow = curEntity->m_Table->pTable->m_PoseRow->mVal;
  1096. D3DXVECTOR3 EnemyPos = GetDecryptedPos(curEntity);
  1097. D3DXVECTOR3 MyPosition = MyLoCalPos();
  1098. int distance = GetDistance(MyPosition, EnemyPos, 10);
  1099. D3DXVECTOR3 vHeadScreen;
  1100. D3DXVECTOR3 eHead(EnemyPos.x, EnemyPos.y + 16.5f, EnemyPos.z);
  1101. if (ClientApp::WorldToScreen(eHead, vHeadScreen, worldMatrix, width, height))
  1102. {
  1103. int playerhealth = curEntity->m_Table->pTable->m_HpRow->HP;
  1104. if (playerhealth > 0)
  1105. {
  1106. /*int localteam = LocalTeam();
  1107. if (localteam != teamplayer)
  1108. {
  1109.  
  1110. if (poserow != 3)
  1111. {*/
  1112. if(poserow == 3)
  1113. if (playerhealth > 0)
  1114. {
  1115. PosX = vHeadScreen.x > ScreenX ? vHeadScreen.x - ScreenX : ScreenX - vHeadScreen.x;
  1116. PosY = vHeadScreen.y > ScreenY ? vHeadScreen.y - ScreenY : ScreenY - vHeadScreen.y;
  1117. float Tmp1 = sqrt(PosX*PosX + PosY*PosY);
  1118. if (Tmp1 < maxdistance)
  1119. {
  1120. maxdistance = Tmp1;
  1121. Near = (DWORD)curEntity;
  1122. }
  1123. }
  1124. }
  1125.  
  1126. }
  1127. }
  1128. }
  1129.  
  1130. CurentItem = CurentItem->m_pNext;
  1131. }
  1132.  
  1133. return Near;
  1134.  
  1135. }
  1136.  
  1137. void PlayerTelekill( LPDIRECT3DDEVICE9 pDevice)
  1138. {
  1139. DWORD BAddress = (DWORD)GetModuleHandleA(GameBase);
  1140. GameMatrix* Matrix = World.GetMatrix();
  1141. D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
  1142. DWORD fnClLocalPlayer = (DWORD)(BAddress + OFFSET_LOCAL);
  1143.  
  1144. DWORD tmp = *(PDWORD)*(PDWORD)(fnClLocalPlayer);
  1145.  
  1146. D3DXVECTOR3 MyPos = MyLoCalPos();
  1147.  
  1148. bool teleported = false;
  1149. DWORD HOTKEY = NULL;
  1150. if(stack.teleport.hotkey == 1) HOTKEY = VK_SHIFT;
  1151. if(stack.teleport.hotkey == 2) HOTKEY = 'G';
  1152. if(stack.teleport.hotkey == 3) HOTKEY = 'T';
  1153. if(stack.teleport.hotkey == 4) HOTKEY = VK_CAPITAL;
  1154. if(stack.teleport.hotkey == 5) HOTKEY = 'V';
  1155. if (stack.teleport.telekill)
  1156. {
  1157.  
  1158.  
  1159. if (GetAsyncKeyState(HOTKEY)) teleported=!teleported;
  1160. {
  1161. if(teleported)
  1162. {
  1163. DWORD Neartele = 0;
  1164. if(stack.teleport.type == 1)Neartele = Distancetele(pDevice);
  1165. if(stack.teleport.type == 2)Neartele = Distancecross(pDevice);
  1166. //switch ((int)stack.teleport.type)
  1167. //{
  1168. //case 1: Neartele = Distancetele(pDevice); break;//Distance
  1169. //case 2: Neartele = Distancecross(pDevice); break;//Crosshair
  1170. //default: Neartele = Distancetele(pDevice);//Distance
  1171. //}
  1172.  
  1173. DWORD DecX = *(DWORD*)(Neartele + 0x10) ^ *(DWORD*)(*(DWORD*)(Neartele + 0x14));
  1174.  
  1175. DWORD DecY = *(DWORD*)(Neartele + 0x18) ^ *(DWORD*)(*(DWORD*)(Neartele + 0x1C));
  1176.  
  1177. DWORD DecZ = *(DWORD*)(Neartele + 0x20) ^ *(DWORD*)(*(DWORD*)(Neartele + 0x24));
  1178.  
  1179. float PosX1 = *reinterpret_cast<float*>(&DecX);
  1180.  
  1181. float PosY1 = *reinterpret_cast<float*>(&DecY);
  1182.  
  1183. float PosZ1 = *reinterpret_cast<float*>(&DecZ);
  1184.  
  1185. float PosX = PosX1 - 4.5;
  1186.  
  1187. float PosY = PosY1 - 2;
  1188.  
  1189. float PosZ = PosZ1 - 4.5;
  1190.  
  1191. DWORD PosX2 = *reinterpret_cast<DWORD*>(&PosX);
  1192.  
  1193. DWORD PosY2 = *reinterpret_cast<DWORD*>(&PosY);
  1194.  
  1195. DWORD PosZ2 = *reinterpret_cast<DWORD*>(&PosZ);
  1196.  
  1197. DWORD EncX = PosX2 ^ *(DWORD*)(*(DWORD*)(tmp + 0x14));
  1198.  
  1199. DWORD EncY = PosY2 ^ *(DWORD*)(*(DWORD*)(tmp + 0x1C));
  1200.  
  1201. DWORD EncZ = PosZ2 ^ *(DWORD*)(*(DWORD*)(tmp + 0x24));
  1202.  
  1203. *(DWORD*)(tmp + 0x10) = EncX;
  1204. *(DWORD*)(tmp + 0x18) = EncY;
  1205. *(DWORD*)(tmp + 0x20) = EncZ;
  1206. }
  1207. }
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213. }
  1214. }
  1215.  
  1216. int PosX = 10;
  1217. int PosY = 10;
  1218. int SizeRadar = 150;
  1219. D3DXVECTOR2 Coordinate(D3DXVECTOR3 Enemy, D3DXVECTOR3 Local, float Angle, int Dist, float PosX, float PosY)
  1220. {
  1221. D3DXVECTOR2 Coord, Return;
  1222.  
  1223. float dX = Enemy.x - Local.x;
  1224. float dY = Enemy.z - Local.z;
  1225.  
  1226. Coord.x = -(dX * (cos(Angle) * 2.5) - dY * (sin(Angle) * 2.5)) / SizeRadar;
  1227. Coord.y = (dX * (sin(Angle) * 2.5) + dY * (cos(Angle) * 2.5)) / SizeRadar;
  1228.  
  1229. Return.x = Coord.x + PosX + (SizeRadar / 2);
  1230. Return.y = Coord.y + PosY + (SizeRadar / 2);
  1231.  
  1232. if(Return.x > (PosX + SizeRadar))Return.x = (PosX + SizeRadar);
  1233. else if(Return.x < PosX)Return.x = PosX;
  1234.  
  1235. if(Return.y > (PosY + SizeRadar))Return.y = (PosY + SizeRadar);
  1236. else if(Return.y < PosY)Return.y = PosY;
  1237. return Return;
  1238. }
  1239. DWORD LocalTeam()
  1240. {
  1241. DWORD Myteamid;
  1242. DWORD BASE = (DWORD)GetModuleHandleA("ros.exe");
  1243. DWORD pBase = *(DWORD*)(BASE + OFFSET_LOCAL);
  1244. DWORD pBase1 = *(DWORD*)(pBase);
  1245. DWORD pBase2 = *(DWORD*)(pBase1 + 0x138);
  1246. DWORD pBase3 = *(DWORD*)(pBase2 + 0x14);
  1247. DWORD pBase4 = *(DWORD*)(pBase3 + 0x5F0);
  1248. if (pBase && pBase1 &&pBase2 &&pBase3 &&pBase4 &&pBase1)
  1249. {
  1250. Myteamid = *(DWORD*)(pBase4 + 0x8);
  1251. }
  1252. return Myteamid;
  1253. }
  1254. void RenderRadar(LPDIRECT3DDEVICE9 pDevice)
  1255. {
  1256. if(stack.d3d.radar)
  1257. {
  1258. //DrawBox(PosX, PosY, SizeRadar, SizeRadar, BOXCOL);
  1259. DrawBorder(PosX, PosY, SizeRadar, SizeRadar, 1, BLACK(255), pDevice);
  1260. FillRGB(PosX, PosY + (SizeRadar / 2) + 2 / SizeRadar, SizeRadar, 1, BLACK(255), pDevice);
  1261. FillRGB(PosX + (SizeRadar / 2) + 2 / SizeRadar, PosY, 1, SizeRadar, BLACK(255), pDevice);
  1262. FillRGB(PosX + (SizeRadar / 2) - 1, PosY + (SizeRadar / 2) - 1, 3, 3, WHITE(255), pDevice);
  1263. }
  1264. }
  1265. void esper(LPDIRECT3DDEVICE9 pDevice)
  1266. {
  1267.  
  1268. DWORD Modules = (DWORD)GetModuleHandleA(GameBase);
  1269. GameMatrix* Matrix = World.GetMatrix();
  1270. D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
  1271.  
  1272. int width = (int)Viewport.Width;
  1273. int height = (int)Viewport.Height;
  1274.  
  1275. int DrawX = (int)Viewport.Width / 2;
  1276. int DrawY = (int)Viewport.Height / 2;
  1277.  
  1278. float ScreenCenterX = (Viewport.Width / 2.0f);
  1279. float ScreenBottomY = (Viewport.Height);
  1280. ListItem * CurentItem = pMainApp->m_ClientApp->m_pFirst->m_pStart;
  1281.  
  1282. while (CurentItem && CurentItem != pMainApp->m_ClientApp->m_pFirst->m_pEnd)
  1283. {
  1284. DWORD IdObject = 0;
  1285. DWORD ResultDcrypt = 0;
  1286. DWORD AddLocalPlayer = 0;
  1287. IdObject = CurentItem->m_ObjectId;
  1288. ResultDcrypt = oriDec(pMainApp->m_ClientApp, IdObject, 0);
  1289. AddLocalPlayer = *(DWORD*)(*(DWORD*)(Modules + OFFSET_LOCAL));
  1290. if (ResultDcrypt > 0 && AddLocalPlayer > 0)
  1291. {
  1292. CEntity* curEntity = (CEntity*)ResultDcrypt;
  1293.  
  1294.  
  1295. CEntity* MyEntity = (CEntity*)AddLocalPlayer;
  1296. Entity* ent = (Entity*)ResultDcrypt;
  1297. D3DXVECTOR3 MyPos, EnemyPos;
  1298. D3DXVECTOR3 vScreen;
  1299. EnemyPos = GetDecryptedPos(curEntity);
  1300. MyPos = GetDecryptedPos(MyEntity);
  1301.  
  1302. int propID = curEntity->m_Table->pTable->Prop->mVal;
  1303. int pDistance = GetDistance(MyPos, EnemyPos, 10);
  1304. int Health = curEntity->m_Table->pTable->m_HpRow->HP;
  1305. int botHealth = curEntity->m_Table->pTable->m_Hpbot->HP;
  1306.  
  1307. D3DXVECTOR3 eHead(EnemyPos.x, EnemyPos.y + 21.5f, EnemyPos.z);
  1308. D3DXVECTOR3 pHead;
  1309.  
  1310. D3DXVECTOR3 eFoot(EnemyPos.x, EnemyPos.y + 12.5f, EnemyPos.z);
  1311. D3DXVECTOR3 pFoot;
  1312. D3DXVECTOR3 pRoot;
  1313. float entityHeight = 12.5; // 12.5 -> body
  1314.  
  1315. ClientApp::WorldToScreen(EnemyPos, pRoot, worldMatrix, width, height);
  1316. ClientApp::WorldToScreen(eFoot, pFoot, worldMatrix, width, height);
  1317. ClientApp::WorldToScreen(eHead, pHead, worldMatrix, width, height);
  1318. struct Rectangle
  1319. {
  1320. int width;
  1321. int height;
  1322. int X;
  1323. int Y;
  1324. };
  1325. Rectangle rect;
  1326. rect.width = (int)(700 / pDistance);
  1327. if (rect.width > 100)
  1328. {
  1329. rect.width = 100;
  1330. }
  1331. rect.height = (int)(pRoot.y - pHead.y);
  1332. rect.X = (int)pRoot.x - rect.width / 2;
  1333. rect.Y = (int)pRoot.y - rect.height;
  1334. if (pDistance > 25)
  1335. {
  1336. rect.Y = (int)pRoot.y - rect.height + 15;
  1337. }
  1338.  
  1339. string pMeta_str(curEntity->m_pMeta->pName);
  1340.  
  1341. bool Enemy = (std::string::npos != pMeta_str.find("BattleGroundAvatar"));
  1342. bool DumpLocal = (std::string::npos != pMeta_str.find("PlayerBattleGround"));
  1343. bool isLocal = (std::string::npos != pMeta_str.find(PlayerAvatar));
  1344. bool isPlayer = (std::string::npos != pMeta_str.find(Avatar));
  1345. bool isBot = (std::string::npos != pMeta_str.find(Robot));
  1346. bool isTeamMate = (std::string::npos != pMeta_str.find("Team"));
  1347. bool isItem = (std::string::npos != pMeta_str.find("DtsProp"));
  1348. bool isSupplyBox = (std::string::npos != pMeta_str.find("DtsPlayerHeritage"));
  1349. bool isPlane = (std::string::npos != pMeta_str.find("Plane"));
  1350. bool isWeapon = (std::string::npos != pMeta_str.find("ClientWeaponEntity"));
  1351. bool isCar = (std::string::npos != pMeta_str.find("LandCar"));
  1352. bool isBicycle = (std::string::npos != pMeta_str.find("LandBike"));
  1353. bool isLandCraft = (std::string::npos != pMeta_str.find("LandCraft"));
  1354. bool isExpress = (std::string::npos != pMeta_str.find("LandExpress"));
  1355. bool isMotor = (std::string::npos != pMeta_str.find("LandMotor"));
  1356. bool isGlider = (std::string::npos != pMeta_str.find("LandGlider"));
  1357. bool isBoat = (std::string::npos != pMeta_str.find("LandBoat"));
  1358. bool isHover = (std::string::npos != pMeta_str.find("LandHover"));
  1359. bool isBattleGround = (std::string::npos != pMeta_str.find("BattleGroundSpace"));
  1360. bool isSupportDroid = (std::string::npos != pMeta_str.find("PetUnit"));
  1361.  
  1362.  
  1363.  
  1364. auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
  1365. DWORD LocalPlayer = *(PDWORD)*(PDWORD)(uBase + OFFSET_LOCAL);
  1366.  
  1367. auto MyEntity = (CEntity*)LocalPlayer;
  1368. float myYaw = *(PFLOAT)(LocalPlayer + 0x90);
  1369.  
  1370.  
  1371. if(stack.d3d.radar)
  1372. {
  1373. if(isPlayer)
  1374. {
  1375. if(curEntity->m_Table->pTable->m_HpRow->HP > 0)
  1376. //if(GetHealth(Entity) > 0)
  1377. {
  1378. if(!LocalTeam())
  1379. {
  1380. float Angle = D3DXToRadian(D3DXToDegree(myYaw) + 180);
  1381. D3DXVECTOR2 Player = Coordinate(EnemyPos, MyPos, Angle, pDistance, PosX, PosY);
  1382. FillRGB(Player.x, Player.y, 3, 3, RED(255), pDevice);
  1383.  
  1384. char Dist[100];
  1385. sprintf(Dist, "%d", pDistance);
  1386. DrawCenteredString(Font, Player.x + 2, Player.y, PINK(255), Dist);
  1387. }
  1388. }
  1389. }else
  1390. if(Robot)
  1391. {
  1392. float Angle = D3DXToRadian(D3DXToDegree(myYaw) + 180);
  1393. D3DXVECTOR2 Player = Coordinate(EnemyPos, MyPos, Angle, pDistance, PosX, PosY);
  1394. FillRGB(Player.x, Player.y, 3, 3, GREEN(255), pDevice);
  1395. }
  1396. }
  1397. #pragma region TableDumper
  1398.  
  1399. // if(stack.server.two)
  1400. // {
  1401. // if(std::string(curEntity->m_pMeta->pName) == "BattleGroundAvatar")
  1402. // //if(findnew(pMeta_str,"BattleGroundAvatar"))
  1403. // {
  1404. // CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
  1405. //if(tbl && tbl->iPtrLog)
  1406. //for(int i = 1; i <= MAXTABLE; i++)
  1407. // {
  1408. //auto Address = (tbl + i);
  1409. //if(tbl->iPtrLog[i].pType==NULL)
  1410. //continue;
  1411. //if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
  1412. //continue;
  1413. //Log("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
  1414. ////pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
  1415. // }
  1416. // }
  1417. // }
  1418. //
  1419. if(stack.server.one)
  1420. {
  1421.  
  1422.  
  1423. if(isPlayer)
  1424. {
  1425. CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
  1426. if(tbl && tbl->iPtrLog)
  1427. for(int i = 1; i <= MAXTABLE; i++)
  1428. {
  1429. auto Address = (tbl + i);
  1430. if(tbl->iPtrLog[i].pType==NULL)
  1431. continue;
  1432. if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
  1433. continue;
  1434. pLog->MyLogger("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
  1435. }
  1436. }
  1437.  
  1438. }
  1439. /*
  1440. if(stack.server.three)
  1441. {
  1442. if(isBattleGround)
  1443. {
  1444. CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
  1445. if(tbl && tbl->iPtrLog)
  1446. for(int i = 1; i <= MAXTABLE; i++)
  1447. {
  1448. auto Address = (tbl + i);
  1449. if(tbl->iPtrLog[i].pType==NULL)
  1450. continue;
  1451. if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
  1452. continue;
  1453. pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
  1454. }
  1455. }
  1456. }
  1457. if(stack.server.four)
  1458. {
  1459. if(isBot)
  1460. {
  1461. CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
  1462. if(tbl && tbl->iPtrLog)
  1463. for(int i = 1; i <= MAXTABLE; i++)
  1464. {
  1465. auto Address = (tbl + i);
  1466. if(tbl->iPtrLog[i].pType==NULL)
  1467. continue;
  1468. if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
  1469. continue;
  1470. pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
  1471. }
  1472. }
  1473. }
  1474. if(stack.server.five)
  1475. {
  1476. if(isExpress)
  1477. {
  1478. CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
  1479. if(tbl && tbl->iPtrLog)
  1480. for(int i = 1; i <= MAXTABLE; i++)
  1481. {
  1482. auto Address = (tbl + i);
  1483. if(tbl->iPtrLog[i].pType==NULL)
  1484. continue;
  1485. if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
  1486. continue;
  1487. pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
  1488. }
  1489. }
  1490. }
  1491. if(stack.server.six)
  1492. {
  1493. if(isCar)
  1494. {
  1495. CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
  1496. if(tbl && tbl->iPtrLog)
  1497. for(int i = 1; i <= MAXTABLE; i++)
  1498. {
  1499. auto Address = (tbl + i);
  1500. if(tbl->iPtrLog[i].pType==NULL)
  1501. continue;
  1502. if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
  1503. continue;
  1504. pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
  1505. }
  1506. }
  1507. }
  1508. if(stack.server.seven)
  1509. {
  1510. if(isMotor)
  1511. {
  1512. CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
  1513. if(tbl && tbl->iPtrLog)
  1514. for(int i = 1; i <= MAXTABLE; i++)
  1515. {
  1516. auto Address = (tbl + i);
  1517. if(tbl->iPtrLog[i].pType==NULL)
  1518. continue;
  1519. if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
  1520. continue;
  1521. pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
  1522. }
  1523. }
  1524. }
  1525. if(stack.server.eight)
  1526. {
  1527. if(isSupportDroid)
  1528. {
  1529. CMyLogTable * tbl = (CMyLogTable*)curEntity->m_Table->pTable;
  1530. if(tbl && tbl->iPtrLog)
  1531. for(int i = 1; i <= MAXTABLE; i++)
  1532. {
  1533. auto Address = (tbl + i);
  1534. if(tbl->iPtrLog[i].pType==NULL)
  1535. continue;
  1536. if(tbl->iPtrLog[i].pType->lenght <= 0 || tbl->iPtrLog[i].pType->lenght > 100)
  1537. continue;
  1538. pLog->PlayerAvatar("[%d] [0x0%X] %s",i, (i * 0xC) + 8, tbl->iPtrLog[i].pType->OfsetName);
  1539. }
  1540. }
  1541. }
  1542.  
  1543. */
  1544. #pragma endregion
  1545.  
  1546.  
  1547. if(stack.d3d.radar)
  1548. {
  1549. float PosX = Viewport.Width / 2 - 500;
  1550. float PosY = Viewport.Height / 2 - 100;
  1551. if(isPlayer || isBot)
  1552. {
  1553. WorldToRadar(pDevice, curEntity, PosX, PosY, 150, 4);
  1554. }
  1555. }
  1556.  
  1557.  
  1558.  
  1559. if (isLocal)
  1560. continue;
  1561.  
  1562.  
  1563. bool banned = false;
  1564.  
  1565.  
  1566. if(GetTotalKills() == 10)
  1567. {
  1568. banned = true;
  1569. }
  1570. if (ClientApp::WorldToScreen(EnemyPos, vScreen, worldMatrix, width, height))
  1571. {
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578. if (stack.esp.box2d)
  1579. {
  1580. if (isPlayer || isBot)
  1581. {
  1582. Box2D(pHead, pRoot, FLOAT4TOD3DCOLOR(esp2dcolor), pDevice);
  1583. }
  1584. }
  1585. if (stack.esp.esptext)
  1586. {
  1587. if (isPlayer)
  1588. {
  1589.  
  1590.  
  1591. string Nicknames = curEntity->m_Table->pTable->m_NickRow->m_NickName;
  1592.  
  1593. char* chrNick = const_cast<char*>(Nicknames.c_str());
  1594. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espnamecolor), chrNick);
  1595. }
  1596. if (isBot)
  1597. {
  1598.  
  1599. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espnamecolor), bata);
  1600.  
  1601. }
  1602. if(isSupportDroid)
  1603. {
  1604. DrawCenteredString(Font,vScreen.x,vScreen.y,BLUE(255),"Support Droid");
  1605. }
  1606. }
  1607. if (stack.esp.box3d)
  1608. {
  1609. if (isPlayer || isBot)
  1610. {
  1611. //Jepoy->draw3DBOX(EnemyPos,Matrix->WorldMatrix,5,10,FLOAT4TOD3DCOLOR(esp3dcolor));
  1612. Box3D(pDevice, pHead.x, pHead.y, pRoot.x, pRoot.y, pDistance, FLOAT4TOD3DCOLOR(esp3dcolor));
  1613. }
  1614. }
  1615.  
  1616. if (stack.esp.line)
  1617. {
  1618. DWORD LineX;
  1619. DWORD LineY;
  1620. if (stack.esp.line == 1)
  1621. {
  1622. LineX = Viewport.Width / 2;
  1623. LineY = 0;
  1624. }
  1625. if (stack.esp.line == 2)
  1626. {
  1627. LineX = Viewport.Width / 2;
  1628. LineY = Viewport.Height / 2;
  1629. }
  1630. if (stack.esp.line == 3)
  1631. {
  1632. LineX = Viewport.Width / 2;
  1633. LineY = Viewport.Height;
  1634. }
  1635. if (isPlayer)
  1636. {
  1637.  
  1638. DrawLine(pDevice, LineX, LineY, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(esplineplayercolor));
  1639. }
  1640. if (isBot)
  1641. {
  1642.  
  1643. DrawLine(pDevice, LineX, LineY, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(esplinebotcolor));
  1644. }
  1645. }
  1646.  
  1647. if (stack.esp.espplane)
  1648. {
  1649. if (isPlane)
  1650. {
  1651. Box3D(pDevice, pHead.x, pHead.y, pRoot.x, pRoot.y, pDistance, FLOAT4TOD3DCOLOR(espplanecolor));
  1652. }
  1653. }
  1654.  
  1655.  
  1656. if (stack.esp.healthbar)
  1657. {
  1658. if (isPlayer)
  1659. {
  1660.  
  1661. Rainbowbar(pDevice,vScreen.x - 45,vScreen.y + 65,curEntity->m_Table->pTable->m_HpRow->HP);
  1662. //ResizingHealthbar(pDevice,pHead.y,pRoot.y,pDistance,Health,true);//(pHead, vScreen, Health, pDevice);
  1663. //CallImGuiHealth(D3DXVECTOR3(EnemyPos.x,EnemyPos.y,EnemyPos.z),D3DXVECTOR3(pHead.x,pHead.y,pHead.z),curEntity->m_Table->pTable->m_HpRow->HP,5);
  1664. }
  1665.  
  1666. if (isBot)
  1667. {
  1668. //ImGui::ProgressBar(Health,ImVec2(vScreen.x,vScreen.y),"FULL HP");
  1669. DrawHealthBars(pHead,vScreen,botHealth,pDevice);//Healthbar(pDevice,vScreen.x,vScreen.y,botHealth,1,pDistance);//(pHead, vScreen, botHealth, pDevice);
  1670. }
  1671.  
  1672. }
  1673. if (stack.esp.distance)
  1674. {
  1675. if (isPlayer || isBot)
  1676. {
  1677. char distbuff[1000];
  1678. sprintf(distbuff, "[ %d m ]", pDistance);
  1679. DrawCenteredString(Font, vScreen.x, vScreen.y + 17, FLOAT4TOD3DCOLOR(espdistancecolor), (PCHAR)distbuff);
  1680. }
  1681. }
  1682.  
  1683. if (stack.esp.distancevehicle)
  1684. {
  1685. if (isCar || isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
  1686. {
  1687. char distbuff[1000];
  1688. sprintf(distbuff, "[ %d m ]", pDistance);
  1689. DrawCenteredString(Font, vScreen.x, vScreen.y + 17, FLOAT4TOD3DCOLOR(espvehicledistancecolor), (PCHAR)distbuff);
  1690. }
  1691. }
  1692.  
  1693. if (stack.esp.playerkills)
  1694. {
  1695. if (isPlayer)
  1696. {
  1697. char killsbuff[1000];
  1698. sprintf(killsbuff, " Kills = %d", curEntity->m_Table->pTable->m_PlayerKill->mVal);
  1699. DrawCenteredString(Font, vScreen.x, vScreen.y + 34, FLOAT4TOD3DCOLOR(esppkcolor), (PCHAR)killsbuff);
  1700. }
  1701. }
  1702.  
  1703. if (stack.esp.items)
  1704. {
  1705. const char* items = getitemname(propID);
  1706. wchar_t* buff = (wchar_t*)getitemname(propID);
  1707. if (isItem)
  1708. {
  1709.  
  1710. 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)
  1711. //if(Level3Check(curEntity) && RareItem(curEntity))
  1712. {
  1713.  
  1714. DrawShadowString(buff,vScreen.x,vScreen.y,0,255,0,Font);
  1715. }
  1716. if(propID == 1 || propID == 2 || propID == 5 || propID == 6 || propID == 8 || propID == 9
  1717. || propID == 50 || propID == 101 || propID == 105 || propID == 1002 || propID == 1003 || propID == 1004 || propID == 1005
  1718. || propID == 1008 || propID == 1010 || propID == 1011 || propID == 102 || propID == 1013 || propID == 1014 || propID == 1015
  1719. || propID == 1017 || propID == 1018 || propID == 1019 || propID == 1020 || propID == 1021 || propID == 1022 || propID == 1023
  1720. || propID == 1024 || propID == 1025 || propID == 1026 || propID == 1027 || propID == 1031 || propID == 1040 || propID == 1406
  1721. || propID == 1104 || propID == 1105 || propID == 1106 || propID == 1109 || propID == 1202 || propID == 1204 || propID == 1211
  1722. || propID == 1212 || propID == 1213 || propID == 1221 || propID == 1222 || propID == 1223 || propID == 1231 || propID == 1241
  1723. || propID == 1242 || propID == 1251 || propID == 1252 || propID == 1261 || propID == 1262 || propID == 1263 || propID == 1265
  1724. || propID == 1266 || propID == 1271 || propID == 1272 || propID == 1276 || propID == 1277 || propID == 1278 || propID == 1279
  1725. || propID == 1302 || propID == 1303 || propID == 1306 || propID == 1307 || propID == 1401 || propID == 1402 || propID == 1403
  1726. || propID == 1404 || propID == 1405)
  1727. {
  1728.  
  1729. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espitemscolor), (PCHAR)items);
  1730. }
  1731. }
  1732. }
  1733.  
  1734. if (stack.esp.weapon)
  1735. {
  1736. if (isPlayer || isBot)
  1737. {
  1738. const char* items = getitemname(curEntity->m_Table->pTable->Prop->mVal);
  1739. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espweaponcolor), (PCHAR)items);
  1740. }
  1741. }
  1742.  
  1743. if (stack.esp.supplybox)
  1744. {
  1745. if (isSupplyBox)
  1746. {
  1747. if(curEntity->m_Table->pTable->m_HerRow->herLen > 0)
  1748. {
  1749. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espdeadcolor), "Loot");
  1750. }
  1751. else
  1752. {
  1753. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espsbcolor), "Supply Box");
  1754. }
  1755. }
  1756. }
  1757.  
  1758. if (stack.esp.vehicle)
  1759. {
  1760. if (isCar) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
  1761. {
  1762. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Car");
  1763. }
  1764. if (isBicycle) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
  1765. {
  1766. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Bicycle");
  1767. }
  1768. if (isExpress) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
  1769. {
  1770. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Express");
  1771. }
  1772. if (isMotor) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
  1773. {
  1774. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Motor");
  1775. }
  1776. if (isGlider) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
  1777. {
  1778. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Glider");
  1779. }
  1780. if (isBoat) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
  1781. {
  1782. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Boat");
  1783. }
  1784. if (isHover) //|| isBicycle || isExpress || isMotor || isGlider || isBoat || isHover)
  1785. {
  1786. DrawCenteredString(Font, vScreen.x, vScreen.y, FLOAT4TOD3DCOLOR(espvehiclecolor), "Hover");
  1787. }
  1788. }
  1789.  
  1790.  
  1791. POINT cr;
  1792. cr.x = width / 2;
  1793. cr.y = height / 2;
  1794.  
  1795. if(stack.esp.heritagefov)
  1796. {
  1797.  
  1798. float radiusx = heritage_fov * (ScreenCX / 100 );
  1799. float radiusy = heritage_fov * (ScreenCY / 100 );
  1800. float point = (radiusx + radiusy ) /2 ;
  1801. DrawFOV(pDevice,ScreenCX,ScreenCY,point,FLOAT4TOD3DCOLOR(heritagecolor));
  1802. }
  1803.  
  1804.  
  1805. D3DXVECTOR3 OnWorld, Screen;
  1806. float radiusx = heritage_fov * (ScreenCX / 100.0f);
  1807. float radiusy = heritage_fov * (ScreenCY / 100.0f);
  1808. float ClosestPos = 99999.f;
  1809. #pragma region ItemInside
  1810. if(stack.esp.heritage)
  1811. {
  1812.  
  1813. if (InsideCircleX(cr, 150, vScreen.x, vScreen.y)) {
  1814.  
  1815. auto dropsAddr = *(PDWORD)((DWORD)(curEntity->m_Table->pTable) + (0xC * 3) + 0x8);
  1816.  
  1817.  
  1818. int maxCount = *(PDWORD)(dropsAddr + 0x8);
  1819.  
  1820.  
  1821. auto itemTuple = *(PDWORD)(dropsAddr + 0x14);
  1822.  
  1823. int itemX = vScreen.x;
  1824. int itemY = vScreen.y + 30;
  1825.  
  1826. for (int index = 0; index < maxCount; index++) {
  1827. auto items = *(PDWORD)(itemTuple + (0xC * index) + 0x8);
  1828.  
  1829.  
  1830. auto itemData = *(PDWORD)(items + 0xC);
  1831.  
  1832. auto itemID = *(PDWORD)(itemData + 0x8);
  1833.  
  1834.  
  1835.  
  1836.  
  1837. /* char buffer[1000];
  1838. const char* Items = getnewitem(itemID);
  1839. sprintf(buffer,"%s",Items);*/
  1840. string item1 = getnewitem(itemID);
  1841. char* printitem = const_cast<char*>(item1.c_str());
  1842.  
  1843. if(isSupplyBox)
  1844. {
  1845.  
  1846. DrawCenteredString(Font, itemX, itemY, YELLOW(255),(PCHAR) printitem);
  1847.  
  1848. }
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854. itemY += 15;
  1855. }
  1856.  
  1857. }
  1858.  
  1859. }
  1860. #pragma endregion
  1861.  
  1862. /* DWORD KeyX = 0,KeyY=0,KeyZ=0,EncX=0,EncY=0,EncZ=0;
  1863. DWORD FinalX,FinalY,FinalZ;
  1864. KeyX = curEntity->XKey->Val;
  1865. KeyY = curEntity->YKey->Val;
  1866. KeyZ = curEntity->ZKey->Val;
  1867.  
  1868. EncX = curEntity->EncryptedX;
  1869. EncY = curEntity->EncryptedY;
  1870. EncZ = curEntity->EncryptedZ;*/
  1871. //30 = 5
  1872. //60 = 10
  1873. //90 = 15
  1874. //120 = 20
  1875. //150 = 25
  1876.  
  1877.  
  1878.  
  1879. /* if(stack.teleport.fov)
  1880. {
  1881.  
  1882. float radiusx = teleport_fov * (ScreenCX / 100 );
  1883. float radiusy = teleport_fov * (ScreenCY / 100 );
  1884. float point = (radiusx + radiusy ) /2 ;
  1885. DrawFOV(pDevice,ScreenCX,ScreenCY,point,FLOAT4TOD3DCOLOR(teleportfov));
  1886. }*/
  1887.  
  1888. /* D3DXVECTOR3 Screen1;
  1889. float radiusxx = teleport_fov * (ScreenCX / 100.0f);
  1890. float radiusyy = teleport_fov * (ScreenCY / 100.0f);
  1891. if(stack.teleport.telekill)
  1892. {
  1893. if(Screen1.x >= ScreenCenterX - radiusxx && Screen1.x <= ScreenCenterX + radiusxx && Screen1.y >= ScreenCY - radiusyy && Screen1.y <= ScreenCY + radiusyy)
  1894. {
  1895. if(pDistance < ClosestPos)
  1896. {
  1897. ClosestPos = pDistance;
  1898.  
  1899. }
  1900.  
  1901. if(isPlayer && Health != 0 )
  1902. {
  1903. if(GetAsyncKeyState(Hotkey)) teleported=!teleported;
  1904.  
  1905.  
  1906. if(teleported)
  1907. {
  1908.  
  1909. MyEntity->EncryptedX = EncX;
  1910. MyEntity->EncryptedY = EncY;
  1911. MyEntity->EncryptedZ = EncZ;
  1912.  
  1913. MyEntity->XKey->Val = KeyX;
  1914. MyEntity->YKey->Val = KeyY;
  1915. MyEntity->ZKey->Val = KeyZ;
  1916.  
  1917. if(stack.teleport.yesbot)
  1918. {
  1919. if(isBot)
  1920. {
  1921. MyEntity->EncryptedX = EncX;
  1922. MyEntity->EncryptedY = EncY;
  1923. MyEntity->EncryptedZ = EncZ;
  1924.  
  1925. MyEntity->XKey->Val = KeyX;
  1926. MyEntity->YKey->Val = KeyY;
  1927. MyEntity->ZKey->Val = KeyZ;
  1928. }
  1929. }
  1930. }
  1931.  
  1932.  
  1933. }
  1934. }
  1935. }*/
  1936.  
  1937. if (banned)
  1938. {
  1939. 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");
  1940.  
  1941. static DWORD lastTime = timeGetTime();
  1942. DWORD timePassed = timeGetTime() - lastTime;
  1943. if (timePassed>2000)
  1944. {
  1945.  
  1946. banned = false;
  1947. lastTime = timeGetTime();
  1948. }
  1949. }
  1950.  
  1951. }
  1952.  
  1953.  
  1954. }
  1955. CurentItem = CurentItem->m_pNext;
  1956. }
  1957. }
  1958.  
  1959.  
  1960. /*Present*/
  1961.  
  1962. HWND g_hFolderView;
  1963.  
  1964. ////////////////////////////////
  1965. // Find Desktop ListView, Part 1
  1966. ////////////////////////////////
  1967. //
  1968. //BOOL CALLBACK FindDLV(HWND hWndPM, LPARAM lParam)
  1969. //{
  1970. // HWND hWnd = FindWindowEx(hWndPM, NULL, ("SHELLDLL_DefView"), NULL);
  1971. //
  1972. // if (hWnd)
  1973. // {
  1974. // // Gotcha!
  1975. // HWND *phWnd = (HWND *)lParam;
  1976. // *phWnd = hWnd;
  1977. //
  1978. // return false;
  1979. // }
  1980. //
  1981. // return true;
  1982. //}
  1983. //
  1984. //////////////////////////////////
  1985. //// Find Desktop ListView, Part 2
  1986. //////////////////////////////////
  1987. //
  1988. //HWND FindDesktopListView()
  1989. //{
  1990. // HWND hWndPM = FindWindowEx(NULL, NULL, ("Progman"), NULL);
  1991. //
  1992. // if (!hWndPM)
  1993. // return NULL;
  1994. //
  1995. // HWND hWnd = FindWindowEx(hWndPM, NULL, ("SHELLDLL_DefView"), NULL);
  1996. //
  1997. // if (!hWnd)
  1998. // {
  1999. // EnumWindows(FindDLV, LPARAM((HWND *)&hWnd));
  2000. //
  2001. // // Strange, no Desktop ListView found!?
  2002. // if (!hWnd)
  2003. // return NULL;
  2004. // }
  2005. //
  2006. // HWND hWndLV = FindWindowEx(hWnd, NULL, ("SysListView32"), NULL);
  2007. //
  2008. // return hWndLV;
  2009. //}
  2010. //
  2011. //
  2012. //
  2013.  
  2014.  
  2015.  
  2016. //
  2017.  
  2018.  
  2019.  
  2020. void DrawBone(Model* pModel, int BoneIndexStart, int BoneIndexEnd,LPDIRECT3DDEVICE9 pDevice,float Color)
  2021. {
  2022. GameMatrix* Matrix = World.GetMatrix();
  2023. D3DXMATRIX cameraBase = Matrix->WorldMatrix;
  2024. int width = (int)Viewport.Width;
  2025. int height = (int)Viewport.Height;
  2026. D3DXVECTOR3 OnWorldA;
  2027. D3DXVECTOR3 OnWorldB;
  2028. D3DXVECTOR3 OnScreenA,OnScreenB;
  2029. OnScreenA.x=0;
  2030. OnScreenA.y=0;
  2031. OnScreenB.x=0;
  2032. OnScreenB.y=0;
  2033. if( GetUserBoneInternal(pModel,OnWorldA,BoneIndexStart) &&
  2034. GetUserBoneInternal(pModel,OnWorldB,BoneIndexEnd)&&
  2035. ClientApp::WorldToScreen(OnWorldA,OnScreenA,cameraBase,width,height)&&
  2036. ClientApp::WorldToScreen(OnWorldB,OnScreenB,cameraBase,width,height))
  2037. {
  2038.  
  2039. DrawLineBonz(pDevice,OnScreenA.x,OnScreenA.y,OnScreenB.x,OnScreenB.y,100,Color);
  2040. }
  2041. }
  2042.  
  2043. bool smooth = false;
  2044. void AimAtPos(float x, float y, LPDIRECT3DDEVICE9 pDevice)
  2045. {
  2046.  
  2047. int ScreenCenterY = (int)Viewport.Height * 0.5f;
  2048. int ScreenCenterX = (int)Viewport.Width * 0.5f;
  2049. float AimSpeed = 1;
  2050. float TargetX = 0;
  2051. float TargetY = 0;
  2052.  
  2053. //X Axis
  2054. if (x != 0)
  2055. {
  2056. if (x > ScreenCenterX)
  2057. {
  2058. TargetX = -(ScreenCenterX - x);
  2059. TargetX /= AimSpeed;
  2060. if (TargetX + ScreenCenterX > ScreenCenterX * 2) TargetX = 0;
  2061. }
  2062.  
  2063. if (x < ScreenCenterX)
  2064. {
  2065. TargetX = x - ScreenCenterX;
  2066. TargetX /= AimSpeed;
  2067. if (TargetX + ScreenCenterX < 0) TargetX = 0;
  2068. }
  2069. }
  2070.  
  2071. //Y Axis
  2072.  
  2073. if (y != 0)
  2074. {
  2075. if (y > ScreenCenterY)
  2076. {
  2077. TargetY = -(ScreenCenterY - y);
  2078. TargetY /= AimSpeed;
  2079. if (TargetY + ScreenCenterY > ScreenCenterY * 2) TargetY = 0;
  2080. }
  2081.  
  2082. if (y < ScreenCenterY)
  2083. {
  2084. TargetY = y - ScreenCenterY;
  2085. TargetY /= AimSpeed;
  2086. if (TargetY + ScreenCenterY < 0) TargetY = 0;
  2087. }
  2088. }
  2089.  
  2090. if (aim_smooth == 0)
  2091. {
  2092. mouse_event(MOUSEEVENTF_MOVE, (DWORD)(TargetX), (DWORD)(TargetY), NULL, NULL);
  2093. return;
  2094. }
  2095.  
  2096. TargetX /= 10;
  2097. TargetY /= 10;
  2098.  
  2099. //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.
  2100. if (fabs(TargetX) < 1)
  2101. {
  2102. if (TargetX > 0)
  2103. {
  2104. TargetX = 1;
  2105. }
  2106. if (TargetX < 0)
  2107. {
  2108. TargetX = -1;
  2109. }
  2110. }
  2111. if (fabs(TargetY) < 1)
  2112. {
  2113. if (TargetY > 0)
  2114. {
  2115. TargetY = 1;
  2116. }
  2117. if (TargetY < 0)
  2118. {
  2119. TargetY = -1;
  2120. }
  2121. }
  2122. mouse_event(MOUSEEVENTF_MOVE, TargetX, TargetY, NULL, NULL);
  2123. }
  2124.  
  2125.  
  2126. void DoAimBot2()
  2127. {
  2128.  
  2129. std::random_device rd; // obtain a random number from hardware
  2130. std::mt19937 eng(rd()); // seed the generator
  2131. std::uniform_int_distribution<> distr(25, 63); // define the range
  2132. int aimsens = 0;
  2133. GameMatrix* Matrix = World.GetMatrix();
  2134. D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
  2135. auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
  2136.  
  2137. auto usermodel = (ModelFactory*)(uBase +OFFSET_MODELFACTORY );
  2138.  
  2139.  
  2140. bool aiming = false;
  2141.  
  2142. if(stack.aim.aimbot)
  2143. {
  2144. float ScreenCenterX = (Viewport.Width /2.0f);
  2145. float ScreenCenterY = (Viewport.Height /2.0f);
  2146. int width = (int)Viewport.Width;
  2147. int height = (int)Viewport.Height;
  2148.  
  2149. D3DXVECTOR3 OnWorld, Screen;
  2150. int i = MyTarget();
  2151. if(i != NULL)
  2152. {
  2153. Model * pModel = usermodel->Models.at(i);//pFactory->GetWorld()->m_pVisible.at(Slot);
  2154. //Model* pModel = (Model*)*(DWORD*)(i + usermodel->skeletonList);
  2155. string Type = pModel->m_pAnimator->m_pModelName->m_pName;
  2156. bool isMale = findnew(Type,DataMale);
  2157. bool isFemale = findnew(Type,DataFemale);
  2158.  
  2159. if(isMale)
  2160. {
  2161. if(stack.aim.target == 1)GetTarget = 14;
  2162. if(stack.aim.target == 2)GetTarget = 33;
  2163. if(stack.aim.target == 3)GetTarget = 56;
  2164.  
  2165. if (aiming && stack.aim.target == 1)
  2166. {
  2167. int First = (int)(1804289383 % 10);
  2168. int second = (int)(First * 10);
  2169. int final = (int)(second + 3);
  2170. static DWORD lastTime = timeGetTime();
  2171. DWORD timePassed = timeGetTime() - lastTime;
  2172. if (timePassed>2000)
  2173. {
  2174. GetTarget = final;
  2175. aiming = false;
  2176. lastTime = timeGetTime();
  2177. }
  2178. }
  2179. else if(aiming && stack.aim.target == 2)
  2180. {
  2181. int First = (int)(1804289383 % 10);
  2182. int second = (int)(First + 11);
  2183.  
  2184. static DWORD lastTime = timeGetTime();
  2185. DWORD timePassed = timeGetTime() - lastTime;
  2186. if (timePassed>2000)
  2187. {
  2188. GetTarget = second;
  2189. aiming = false;
  2190. lastTime = timeGetTime();
  2191. }
  2192. }
  2193. else if(aiming && stack.aim.target == 3)
  2194. {
  2195. int First = (int)(1804289383 % 10);
  2196. int second = (int)(First * 10);
  2197. int final = (int)(second + 3);
  2198.  
  2199. static DWORD lastTime = timeGetTime();
  2200. DWORD timePassed = timeGetTime() - lastTime;
  2201. if (timePassed>2000)
  2202. {
  2203. GetTarget = final;
  2204. aiming = false;
  2205. lastTime = timeGetTime();
  2206. }
  2207. }
  2208.  
  2209. GetUserBoneInternal(pModel, OnWorld, GetTarget);
  2210. if(ClientApp::WorldToScreen(OnWorld, Screen, worldMatrix, width, height))
  2211. {
  2212. double DistX = Screen.x - ScreenCenterX;
  2213. double DistY = Screen.y - ScreenCenterY;
  2214.  
  2215.  
  2216. switch(MyGetScope())
  2217. {
  2218. case 1271: // Red Dot Sight
  2219. DistX /= 0.9f;
  2220. DistY /= 0.9f;
  2221.  
  2222. if(GetAsyncKeyState(VK_SHIFT))
  2223. {
  2224. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2225. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2226. aiming =true;
  2227. }
  2228. break;
  2229. case 1272: // Holo-Sight
  2230. DistX /= 0.9f;
  2231. DistY /= 0.9f;
  2232. if(GetAsyncKeyState(VK_SHIFT))
  2233. {
  2234. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2235. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2236. aiming =true;
  2237. }
  2238. break;
  2239. case 1273: // 2x Scope
  2240. DistX /= 1.086f;
  2241. DistY /= 1.086f;
  2242. if(GetAsyncKeyState(VK_SHIFT))
  2243. {
  2244. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2245. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2246. aiming =true;
  2247. }
  2248. break;
  2249. case 1274: // 4x Scope
  2250. DistX /= 1.245f;
  2251. DistY /= 1.245f;
  2252. if(GetAsyncKeyState(VK_SHIFT))
  2253. {
  2254. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2255. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2256. aiming =true;
  2257. }
  2258. break;
  2259. case 1275: // 8x Scope
  2260. DistX /= 1.504f;
  2261. DistY /= 1.504f;
  2262. if(GetAsyncKeyState(VK_SHIFT))
  2263. {
  2264. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2265. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2266. aiming =true;
  2267. }
  2268. break;
  2269. default:
  2270. DistX /= 0.9f;
  2271. DistY /= 0.9f;
  2272. if(GetAsyncKeyState(VK_SHIFT))
  2273. {
  2274. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2275. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2276. aiming =true;
  2277. }
  2278. break;
  2279.  
  2280. }
  2281. // DistX /= aim_smooth;
  2282. //DistY /= aim_smooth;
  2283. //
  2284. // if(GetAsyncKeyState(VK_SHIFT))
  2285. // {
  2286. // mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2287. // //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2288. // }
  2289. }
  2290. }else
  2291. if(isFemale)
  2292. {
  2293. if(stack.aim.target == 1)GetTarget = 16;
  2294. if(stack.aim.target == 2)GetTarget = 35;
  2295. if(stack.aim.target == 3)GetTarget = 65;
  2296.  
  2297. if (aiming && stack.aim.target == 1)
  2298. {
  2299. int First = (int)(1804289383 % 10);
  2300. int second = (int)(First * 10);
  2301. int final = (int)(second + 5);
  2302. static DWORD lastTime = timeGetTime();
  2303. DWORD timePassed = timeGetTime() - lastTime;
  2304. if (timePassed>2000)
  2305. {
  2306. GetTarget = final;
  2307. aiming = false;
  2308. lastTime = timeGetTime();
  2309. }
  2310. }
  2311. else if(aiming && stack.aim.target == 2)
  2312. {
  2313. int First = (int)(1804289383 % 10);
  2314. int second = (int)(First + 13);
  2315.  
  2316. static DWORD lastTime = timeGetTime();
  2317. DWORD timePassed = timeGetTime() - lastTime;
  2318. if (timePassed>2000)
  2319. {
  2320. GetTarget = second;
  2321. aiming = false;
  2322. lastTime = timeGetTime();
  2323. }
  2324. }
  2325. else if(aiming && stack.aim.target == 3)
  2326. {
  2327. int First = (int)(1804289383 % 10);
  2328. int second = (int)(First * 10);
  2329. int final = (int)(second + 5);
  2330.  
  2331. static DWORD lastTime = timeGetTime();
  2332. DWORD timePassed = timeGetTime() - lastTime;
  2333. if (timePassed>2000)
  2334. {
  2335. GetTarget = final;
  2336. aiming = false;
  2337. lastTime = timeGetTime();
  2338. }
  2339. }
  2340. GetUserBoneInternal(pModel, OnWorld, GetTarget);
  2341. if(ClientApp::WorldToScreen(OnWorld, Screen, worldMatrix, width, height))
  2342. {
  2343. double DistX = Screen.x - ScreenCenterX;
  2344. double DistY = Screen.y - ScreenCenterY;
  2345.  
  2346. /* DistX /= aim_smooth;
  2347. DistY /= aim_smooth;*/
  2348.  
  2349. switch(MyGetScope())
  2350. {
  2351. case 1271: // Red Dot Sight
  2352. DistX /= 0.850f;
  2353. DistY /= 0.850f;
  2354.  
  2355. if(GetAsyncKeyState(VK_SHIFT))
  2356. {
  2357. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2358. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2359. aiming =true;
  2360. }
  2361. break;
  2362. case 1272: // Holo-Sight
  2363. DistX /= 0.850f;
  2364. DistY /= 0.850f;
  2365. if(GetAsyncKeyState(VK_SHIFT))
  2366. {
  2367. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2368. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2369. aiming =true;
  2370. }
  2371. break;
  2372. case 1273: // 2x Scope
  2373. DistX /= 1.086f;
  2374. DistY /= 1.086f;
  2375. if(GetAsyncKeyState(VK_SHIFT))
  2376. {
  2377. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2378. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2379. aiming =true;
  2380. }
  2381. break;
  2382. case 1274: // 4x Scope
  2383. DistX /= 1.245f;
  2384. DistY /= 1.245f;
  2385. if(GetAsyncKeyState(VK_SHIFT))
  2386. {
  2387. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2388. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2389. aiming =true;
  2390. }
  2391. break;
  2392. case 1275: // 8x Scope
  2393. DistX /= 1.504f;
  2394. DistY /= 1.504f;
  2395. if(GetAsyncKeyState(VK_SHIFT))
  2396. {
  2397. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2398. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2399. aiming =true;
  2400. }
  2401. break;
  2402. default:
  2403. DistX /= 0.850f;
  2404. DistY /= 0.850f;
  2405. if(GetAsyncKeyState(VK_SHIFT))
  2406. {
  2407. //AimAtPos((float)Screen.x,(float)Screen.y -2.5,pDevice);
  2408. mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);
  2409. aiming =true;
  2410. }
  2411. break;
  2412.  
  2413. }
  2414.  
  2415.  
  2416. }
  2417. }
  2418. }
  2419. }
  2420. }
  2421.  
  2422. void DebugBones(LPDIRECT3DDEVICE9 pDevice)
  2423. {
  2424. auto ModelEntry = (ModelFactory*)(Basez + OFFSET_MODELFACTORY);
  2425.  
  2426. size_t count = ModelEntry->Models.size();;
  2427. for(size_t i = 0; i < count; i ++)
  2428. {
  2429. Model* pModel = ModelEntry->Models.at(i);
  2430. D3DXVECTOR3 vout,vScreen;
  2431. GameMatrix* Matrix = World.GetMatrix();
  2432. D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
  2433. int width = Viewport.Width;
  2434. int height = Viewport.Height;
  2435. int BoneCount = pModel->m_pAnimator->BoneCount;
  2436. auto animchar = pModel->m_pAnimator;
  2437. D3DXMATRIX m_Position = pModel->m_Position;
  2438. D3DXVECTOR3 GetPosition;
  2439. D3DXVECTOR3 outPosition;
  2440. GetPosition.x = m_Position._41;
  2441. GetPosition.y = m_Position._42;
  2442. GetPosition.z = m_Position._43;
  2443. D3DXVECTOR3 Head;
  2444. string Type(pModel->m_pAnimator->m_pModelName->m_pName);
  2445. bool isMale = findnew(Type,DataMale);
  2446. bool isFemale = findnew(Type,DataFemale);
  2447. bool isSupportDroid = findnew(Type,bata);
  2448. bool isCat = findnew(Type,pusa);
  2449. bool Anubis = findnew(Type,Anubiss);
  2450.  
  2451. if(stack.esp.bonedebug)
  2452. {
  2453. if(isMale || isFemale)
  2454. {
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460. for(size_t j = 0; j < 100; j++)//pModel->m_pAnimator->BoneCount
  2461. {
  2462.  
  2463.  
  2464.  
  2465. D3DXVECTOR3 bone,pos;
  2466. GetUserBoneInternal(pModel,pos,j);
  2467. if (ClientApp::WorldToScreen(pos,bone,worldMatrix,width,height))
  2468. {
  2469.  
  2470. char no[MAX_PATH];
  2471. sprintf(no, "%d", j);
  2472.  
  2473. DrawCenteredString(Font,bone.x,bone.y,RED(255),no);
  2474.  
  2475. }
  2476.  
  2477. }
  2478. }
  2479. //
  2480. }
  2481.  
  2482.  
  2483.  
  2484. }
  2485. }
  2486.  
  2487. void InteralBone(LPDIRECT3DDEVICE9 pDevice)
  2488. {
  2489.  
  2490. DWORD Base = (DWORD)GetModuleHandleA(GameBase);
  2491. auto pBigWorld = (ModelFactory*)(Base + OFFSET_MODELFACTORY);
  2492. GameMatrix* Matrix = World.GetMatrix();
  2493. D3DXMATRIX worldMatrix = Matrix->WorldMatrix;
  2494. int width = Viewport.Width;
  2495. int height = Viewport.Height;
  2496. size_t count = pBigWorld->Models.size();
  2497.  
  2498. //for(int i = 0; i < pBigWorld->visibleModels; i+=0x4)
  2499. for(size_t i = 0; i < count; i ++)
  2500. {
  2501. Model* pModel = pBigWorld->Models.at(i);
  2502. //Model* pModel = (Model*)*(DWORD*)(pBigWorld->skeletonList + i);
  2503.  
  2504. auto animchar = pModel->m_pAnimator;
  2505. string Type(pModel->m_pAnimator->m_pModelName->m_pName);
  2506. bool isMale = findnew(Type,DataMale);
  2507. bool isFemale = findnew(Type,DataFemale);
  2508. bool isSupportDroid = findnew(Type,bata);
  2509. bool isCat = findnew(Type,pusa);
  2510. bool Anubis = findnew(Type,Anubiss);
  2511.  
  2512. if (stack.aim.fov)
  2513. {
  2514. float radiusx = aim_fov * (ScreenCX / 100 );
  2515. float radiusy = aim_fov * (ScreenCY / 100 );
  2516. float point = (radiusx + radiusy ) /2 ;
  2517. DrawFOV(pDevice,ScreenCX,ScreenCY,point,FLOAT4TOD3DCOLOR(espfovcolor));
  2518.  
  2519. }
  2520. D3DXMATRIX ResultPosition = pModel->m_Position;
  2521. D3DXVECTOR3 GetPosition;
  2522. D3DXVECTOR3 outPosition;
  2523. GetPosition.x = ResultPosition._41;
  2524. GetPosition.y = ResultPosition._42;
  2525. GetPosition.z = ResultPosition._43;
  2526. D3DXVECTOR3 MyPos = MyLoCalPos();
  2527.  
  2528. int pDistance = GetDistance(MyPos,GetPosition,10);
  2529.  
  2530.  
  2531.  
  2532. if(ClientApp::WorldToScreen(GetPosition,outPosition,worldMatrix,width,height))
  2533. {
  2534.  
  2535.  
  2536. D3DXVECTOR3 Head;
  2537. D3DXVECTOR3 OnScreen;
  2538. float ScreenCenterX = (Viewport.Width /2.0f);
  2539. float ScreenCenterY = (Viewport.Height /2.0f);
  2540. int width = (int)Viewport.Width;
  2541. int height = (int)Viewport.Height;
  2542.  
  2543.  
  2544. if(stack.esp.bone)
  2545. {
  2546.  
  2547.  
  2548. if(isMale )
  2549. {
  2550. D3DXVECTOR3 Head, HeadPos,Neck,NeckPos;
  2551.  
  2552. if( GetUserBoneInternal(pModel, Head, 14) && GetUserBoneInternal(pModel, Neck, 33) && ClientApp::WorldToScreen(Head,HeadPos,worldMatrix,width,height) && ClientApp::WorldToScreen(Neck,NeckPos,worldMatrix,width,height))
  2553. {
  2554. D3DXVECTOR3 Box = NeckPos - HeadPos;
  2555. if (Box.y < 0) Box.y *= -1;
  2556. int HeadRadius = (int)Box.y * 1.5;
  2557. DrawFOV(pDevice,HeadPos.x,HeadPos.y - (HeadRadius + 2.3), 2.3 + HeadRadius,FLOAT4TOD3DCOLOR(espbonecolormale));
  2558.  
  2559.  
  2560. }
  2561. DrawBone(pModel,48,47,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2562. DrawBone(pModel,47,52,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2563. DrawBone(pModel,52,36,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2564. DrawBone(pModel,36,16,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2565. DrawBone(pModel,16,32,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2566. DrawBone(pModel,32,27,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2567. DrawBone(pModel,27,28,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2568. DrawBone(pModel,50,46,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2569. DrawBone(pModel,46,35,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2570. DrawBone(pModel,35,49,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2571. DrawBone(pModel,49,57,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2572. DrawBone(pModel,57,29,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2573. DrawBone(pModel,29,15,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2574. DrawBone(pModel,15,26,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2575. DrawBone(pModel,26,30,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2576. DrawBone(pModel,14,33,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2577. DrawBone(pModel,33,56,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2578. DrawBone(pModel,56,55,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2579. DrawBone(pModel,55,54,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2580. DrawBone(pModel,54,57,pDevice,FLOAT4TOD3DCOLOR(espbonecolormale));
  2581.  
  2582. }
  2583. if(isSupportDroid)
  2584. {
  2585. DrawBone(pModel, 33, 34, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2586. DrawBone(pModel,34, 2, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2587. DrawBone(pModel, 2, 5, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2588. DrawBone(pModel, 5, 6, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2589. DrawBone(pModel, 6, 3, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2590. DrawBone(pModel, 3, 23, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2591. DrawBone(pModel, 33, 35, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2592. DrawBone(pModel, 35, 12, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2593. DrawBone(pModel, 12, 15, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2594. DrawBone(pModel, 15, 16, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2595. DrawBone(pModel, 16, 13, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2596. DrawBone(pModel, 13, 26, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2597. DrawBone(pModel, 33, 21, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2598. DrawBone(pModel, 21, 0, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2599. DrawBone(pModel, 0, 7, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2600. DrawBone(pModel, 7, 1, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2601. DrawBone(pModel, 1, 4, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2602. DrawBone(pModel, 0, 17, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2603. DrawBone(pModel, 17, 11, pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2604. DrawBone(pModel, 11, 14,pDevice,FLOAT4TOD3DCOLOR(espbonecolordroid));
  2605. }
  2606.  
  2607. if(isFemale)
  2608. {
  2609. D3DXVECTOR3 Head, HeadPos,Neck,NeckPos;
  2610.  
  2611. if(GetUserBoneInternal(pModel, Head, 16)&& GetUserBoneInternal(pModel,Neck,35) && ClientApp::WorldToScreen(Head,HeadPos,worldMatrix,width,height) && ClientApp::WorldToScreen(Neck,NeckPos,worldMatrix,width,height))
  2612. {
  2613. D3DXVECTOR3 Box = NeckPos - HeadPos;
  2614. if (Box.y < 0) Box.y *= -1;
  2615. int HeadRadius = (int)Box.y * 1.5;
  2616. DrawFOV(pDevice,HeadPos.x,HeadPos.y - (HeadRadius + 2.3), 2.3 + HeadRadius,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2617.  
  2618. }
  2619. DrawBone(pModel,57,56,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2620. DrawBone(pModel,56,60,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2621. DrawBone(pModel,60,45,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2622. DrawBone(pModel,45,18,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2623. DrawBone(pModel,18,34,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2624. DrawBone(pModel,34,29,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2625. DrawBone(pModel,29,30,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2626. DrawBone(pModel,59,55,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2627. DrawBone(pModel,55,44,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2628. DrawBone(pModel,44,58,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2629. DrawBone(pModel,58,66,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2630. DrawBone(pModel,66,31,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2631. DrawBone(pModel,31,17,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2632. DrawBone(pModel,17,28,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2633. DrawBone(pModel,28,32,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2634. DrawBone(pModel,16,35,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2635. DrawBone(pModel,35,65,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2636. DrawBone(pModel,65,64,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2637. DrawBone(pModel,64,63,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2638. DrawBone(pModel,63,66,pDevice,FLOAT4TOD3DCOLOR(espbonecolorfemale));
  2639.  
  2640.  
  2641. }
  2642. }
  2643.  
  2644. }
  2645. }
  2646.  
  2647. }
  2648.  
  2649.  
  2650. //void WalkSpeedLoop()
  2651. //{
  2652. // DWORD Base = (DWORD)GetModuleHandleA(GameBase);
  2653. // bool HoldingA = (bool)GetAsyncKeyState(0x41);
  2654. // bool HoldingS = (bool)GetAsyncKeyState(0x53);
  2655. // bool HoldingD = (bool)GetAsyncKeyState(0x44);
  2656. // bool HoldingW = (bool)GetAsyncKeyState(0x57);
  2657. // __try
  2658. // {
  2659. //if(stack.player.speedhack)
  2660. //{
  2661. //if(!HoldingA && !HoldingS && !HoldingD && !HoldingW)
  2662. //{
  2663. // Sleep(100);
  2664. //}
  2665. //else
  2666. //{
  2667. // auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
  2668. // Physicss = (Physics_*)(uBase + Physics);
  2669. // float num2 = (float)(Physicss->ReadPhysics(0xAC) / 450.0f);
  2670. // float num3 = (float)(Physicss->ReadPhysics(0xB4) / 450.0f);
  2671. // float num4 = (float)Physicss->ReadPhysics(0x20);
  2672. // float num5 = (float)Physicss->ReadPhysics(0x28);
  2673. //
  2674. // float numwrite = (float)(num4 + num2);
  2675. // float numwrite1 = (float)(num5 + num3);
  2676. //
  2677. // (float)num4 = (float)numwrite;
  2678. // (float)num5 = (float)numwrite1;
  2679. //
  2680. ////int num = Memory::ReadMemory<int>(Base + Physics);
  2681. ////
  2682. ////num = Memory::ReadMemory<int>(num);
  2683. ////num = Memory::ReadMemory<int>(num + 16);
  2684. ////float num2 = Memory::ReadMemory<float>(num + 172) / 450.0f;
  2685. ////float num3 = Memory::ReadMemory<float>(num + 180) / 450.0f;
  2686. ////float num4 = Memory::ReadMemory<float>(num + 32);
  2687. ////float num5 = Memory::ReadMemory<float>(num + 40);
  2688. ////float numwrite = Memory::ReadMemory<float>(num4 + num2);
  2689. ////float numwrite1 = Memory::ReadMemory<float>(num5 + num3);
  2690. ////num4 = numwrite;
  2691. ////num5 = numwrite1;
  2692. ////Memory::WriteMemory<float>(num + 32);throw(num4 + num2);
  2693. //
  2694. //}
  2695. //}
  2696. //}
  2697. // __except(true){}
  2698. //}
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704. void DoEsp(LPDIRECT3DDEVICE9 pDevice)
  2705. {
  2706. __try
  2707. {
  2708. RenderRadar(pDevice);
  2709. DebugBones(pDevice);
  2710. InteralBone(pDevice);
  2711. }
  2712. _except(true){}
  2713. }
  2714.  
  2715.  
  2716.  
  2717. void DrawMenu()
  2718. {
  2719.  
  2720. ImGui_NewFrame();
  2721.  
  2722. if (bShowWindow)
  2723. {
  2724.  
  2725. DWORD dwFlag = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoResize ;
  2726. //2B0176EC
  2727.  
  2728.  
  2729.  
  2730. ImGui::SetNextWindowSize(ImVec2(100, 400));
  2731. ImGui::Begin(zNova, &bShowWindow, ImVec2(543, 300), 1.0f, dwFlag);
  2732. {
  2733.  
  2734.  
  2735. ImGui::TextColored(ImColor(44, 234, 86), Stats); ImGui::SameLine(130);
  2736. ImGui::TextColored(ImColor(44, 234, 86), fps); ImGui::SameLine(170);
  2737. ImGui::TextColored(ImColor(44, 234, 86), FPS(0)); ImGui::SameLine(320);
  2738. ImGui::TextColored(ImColor(44, 234, 86), url);
  2739.  
  2740. /*ImGui::TextColored(ImColor(44, 234, 86), "DATE :"); ImGui::SameLine();
  2741. ImGui::TextColored(ImColor(44, 234, 86), DATES()); ImGui::SameLine(350);
  2742. ImGui::TextColored(ImColor(44, 234, 86), TIME());*/
  2743.  
  2744.  
  2745. static int switchTabs = 10;
  2746.  
  2747. ImGui::BeginChild(Child, ImVec2(118, 249), true);
  2748.  
  2749.  
  2750. if (ImGui::Button(D3DFolder, ImVec2(100.0f, 35.0f)))
  2751. {
  2752. switchTabs = 0;
  2753. }
  2754.  
  2755. if (ImGui::Button(ESP, ImVec2(100.0f, 35.0f)))
  2756. {
  2757. switchTabs = 1;
  2758. }
  2759. //ImGui::SameLine(0.0, 2.0f);
  2760. if (ImGui::Button(AIMBOT, ImVec2(100.0f, 35.0f)))
  2761. {
  2762. switchTabs = 2;
  2763. }
  2764. //ImGui::SameLine(0.0, 2.0f);
  2765. if (ImGui::Button(PLAYER, ImVec2(100.0f, 35.0f)))
  2766. {
  2767. switchTabs = 3;
  2768. }
  2769. /*if (ImGui::Button("WEAPON", ImVec2(100.0f, 35.0f)))
  2770. {
  2771. switchTabs = 4;
  2772. }
  2773. if (ImGui::Button("SERVER", ImVec2(100.0f, 35.0f)))
  2774. {
  2775. switchTabs = 5;
  2776. }*/
  2777. if (ImGui::Button(TELEPORT, ImVec2(100.0f, 35.0f)))
  2778. {
  2779. switchTabs = 4;
  2780. }
  2781.  
  2782. if (ImGui::Button(WeaponCheat,ImVec2(100.0f,35.0f)))
  2783. {
  2784. switchTabs = 5;
  2785. }
  2786. //ImGui::SameLine(0.0, 2.0f);
  2787. /**/
  2788.  
  2789.  
  2790. ImGui::EndChild();
  2791.  
  2792. ImGui::SameLine();
  2793. ImGui::BeginChild(1, ImVec2(400, 249), true);
  2794.  
  2795.  
  2796.  
  2797. const char* teletype[] = {"OFF","CrossHair","Distance" };
  2798. const char* items[] = { "OFF","v1","v2","v3","v4","v5","v6","v7","v8","v9","v10","RainbowX", "CrossX","zNova", "zNovaX" };
  2799. const char* aimspot[] = {"OFF","HEAD","NECK","BODY"};
  2800. const char* lineposition[] = {"OFF", "TOP", "CENTER","BOTTOM"};
  2801. const char* chamitem[] = {"OFF","GREEN","BLUE","RED"};
  2802. const char* fovchoice[] = {"OFF","5","10","15","20","25"};
  2803. const char* carspeed[] = {"OFF","2x","3x","4x","5x"};
  2804. const char* telechoice[] = {"OFF","Shift","G","T","Capslock","V"};
  2805.  
  2806. //TO DO IMGUI COMBO
  2807. const char* muzzle1choice[] = {"OFF","Flash Hider","Compensator","Silencer"};
  2808. const char* muzzle2choice[] = {"OFF","Flash Hider","Compensator","Silencer"};
  2809.  
  2810. const char* mag1choice[] = {"OFF","QD-Mag","EX-Mag","EX-QD-Mag"};
  2811. const char* mag2choice[] = {"OFF","QD-Mag","EX-Mag","EX-QD-Mag"};
  2812.  
  2813. const char* scope1choice[] = {"OFF","Red Dot Sight","Holo-Sight","2x Scope","4x Scope","8x Scope"};
  2814. const char* scope2choice[] = {"OFF","Red Dot Sight","Holo-Sight","2x Scope","4x Scope","8x Scope"};
  2815. int iMenuTheme = 0;
  2816. switch (switchTabs) {
  2817. case 0:
  2818. ImGui::Checkbox(Radar, &stack.d3d.radar);
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824. ImGui::Checkbox(WallHack, &stack.d3d.wallhack);
  2825. ImGui::Checkbox(NoGrass, &stack.d3d.nograss);
  2826. // ImGui::Checkbox(RemoveFogging, &stack.d3d.nofog);
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840. ImGui::Combo(Chams,(PINT) &stack.d3d.cham, chamitem, 4);
  2841. ImGui::Combo(CrossHair,(PINT) &stack.d3d.crosshair, items, 15);
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847. break;
  2848. case 1:
  2849.  
  2850. ImGui::ColorEdit4((PlayerBox3D), esp3dcolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(PlayerBox3D, &stack.esp.box3d); ImGui::SameLine(200);
  2851. ImGui::ColorEdit4((ESP_Name), espnamecolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_Name, &stack.esp.esptext);
  2852.  
  2853. ImGui::ColorEdit4((ESP_PDist), espdistancecolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_PDist, &stack.esp.distance); ImGui::SameLine(200);
  2854. ImGui::ColorEdit4((ESP_Box2D), esp2dcolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_Box2D, &stack.esp.box2d);
  2855. ImGui::ColorEdit4((PKills), esppkcolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(PKills, &stack.esp.playerkills); ImGui::SameLine(200);
  2856.  
  2857. ImGui::ColorEdit4((ESP_Items), espitemscolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_Items, &stack.esp.items);
  2858. ImGui::ColorEdit4((ESP_Plane), espplanecolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_Plane, &stack.esp.espplane); ImGui::SameLine(200);
  2859. ImGui::ColorEdit4((ESP_Vehicle), espvehiclecolor); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(ESP_Vehicle, &stack.esp.vehicle);
  2860.  
  2861. ImGui::ColorEdit4((ESP_VDisColor), espvehicledistancecolor); ImGui::SameLine(0.0, 2.0f);
  2862.  
  2863. ImGui::Checkbox(ESP_VDist, &stack.esp.distancevehicle); ImGui::SameLine(200);
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869. ImGui::ColorEdit4((SupplyColor), espsbcolor); ImGui::SameLine(0.0, 2.0f);
  2870. ImGui::ColorEdit4((DeadPlayerColor), espdeadcolor); ImGui::SameLine(0.0, 2.0f);
  2871. ImGui::Checkbox(ESP_Supply, &stack.esp.supplybox);
  2872.  
  2873.  
  2874.  
  2875.  
  2876. ImGui::ColorEdit4((HeritageFOVColor), heritagecolor); ImGui::SameLine(0.0, 2.0f);
  2877.  
  2878. ImGui::Checkbox(HeritageFOV, &stack.esp.heritagefov); ImGui::SameLine(200); ImGui::Checkbox(SeeItemsInside, &stack.esp.heritage);
  2879.  
  2880. ImGui::ColorEdit4((MBoneColor), espbonecolormale); ImGui::SameLine(0.0, 2.0f);
  2881. ImGui::ColorEdit4((FBoneColor), espbonecolorfemale); ImGui::SameLine(0.0, 2.0f);
  2882. ImGui::ColorEdit4((SDroidColor), espbonecolordroid); ImGui::SameLine(0.0, 2.0f);
  2883. ImGui::Checkbox(ESP_Bone, &stack.esp.bone); ImGui::SameLine(200);
  2884. ImGui::Checkbox(ESP_Health, &stack.esp.healthbar);
  2885.  
  2886. ImGui::ColorEdit4((ESP_LinePColor), esplineplayercolor); ImGui::SameLine(0.0, 2.0f); //ImGui::Checkbox(ESP_Line, &stack.esp.line);
  2887. ImGui::ColorEdit4((ESP_LineBColor), esplinebotcolor); ImGui::SameLine(0.0, 2.0f);
  2888. ImGui::Combo(ESP_Line,(PINT) &stack.esp.line, lineposition, 4);
  2889. ImGui::SliderFloat(HeritageFOV, &heritage_fov, 0, 50);
  2890. ImGui::Checkbox("BoneCount ", &stack.esp.bonedebug);
  2891. // ImGui::Checkbox("Log Local", &stack.server.one);
  2892. /* ImGui::Checkbox("DumpLocal", &stack.weapon.bullet);
  2893.  
  2894. ImGui::Checkbox("Log curEntity", &stack.server.nine);
  2895. */
  2896.  
  2897. // ImGui::Checkbox("Dump Enemy", &stack.server.two);
  2898. /* ImGui::Checkbox("DumpBattleGround", &stack.server.three);
  2899. ImGui::Checkbox("DumpBot", &stack.server.four);
  2900. ImGui::Checkbox("DumpExpress", &stack.server.five);
  2901. ImGui::Checkbox("DumpCar", &stack.server.six);
  2902. ImGui::Checkbox("DumpMotor", &stack.server.seven);
  2903. ImGui::Checkbox("DumpSupportDroid", &stack.server.eight);*/
  2904. //ImGui::SameLine();
  2905. //ImGui::ColorEdit4(("ESP Color"), espcolor);
  2906. //ImGui::Checkbox("ESP Dead", &stack.esp.dead);
  2907. /* 1 Local
  2908. 2 Enemy
  2909. 3 BattleGround
  2910. 4 Bot
  2911. 5 Express
  2912. 6 Car
  2913. 7 Motor
  2914. 8 SupportDroid*/
  2915.  
  2916. // }
  2917. // stack.esp.dead
  2918.  
  2919. break;
  2920. case 2:
  2921. ImGui::Checkbox(FuncAimbot, &stack.aim.aimbot);
  2922. ImGui::Combo(Target,(PINT) &stack.aim.target, aimspot, 4);
  2923. ImGui::ColorEdit4((AimFOV), espfovcolor); ImGui::SameLine(0.0, 2.0f);
  2924. ImGui::Checkbox(AimFOV, &stack.aim.fov);
  2925. // ImGui::TextColored(ImColor(122, 145, 120, 100), "");
  2926. ImGui::SliderFloat(AimFOV, &aim_fov, 0, 120);
  2927. //ImGui::SliderFloat(AimSmooth, &aim_smooth, 0, 5);
  2928.  
  2929. //ImGui::Checkbox("No border1", &no_border);
  2930. break;
  2931. case 3:
  2932.  
  2933. ImGui::Checkbox(GMode, &stack.player.gravemode);
  2934. ImGui::Checkbox(Left, &stack.player.xleft);
  2935. ImGui::Checkbox(Right, &stack.player.xright);
  2936. ImGui::Checkbox(UP, &stack.player.yup);
  2937. ImGui::Checkbox(DOWN, &stack.player.ydown);
  2938. ImGui::Checkbox(FastDrop, &stack.player.fastdrop);
  2939. ImGui::Checkbox(UnderGroundWalk, &stack.player.underground);
  2940. ImGui::Checkbox(Flying, &stack.player.fly);
  2941. ImGui::Checkbox(ZeroGravity, &stack.player.zerogravity);
  2942. ImGui::Checkbox(SpeedHacking, &stack.player.speedhack);
  2943. ImGui::Checkbox(Sprint, &stack.player.sprint);
  2944. // ImGui::Checkbox(NoFalling, &stack.player.nfd);
  2945. // ImGui::Checkbox("Worm Hole", &stack.player.highjump);
  2946. // ImGui::SliderFloat("Player FOV", &value,0, 300);
  2947.  
  2948. // ImGui::Checkbox("GodMode", &stack.player.godmode);
  2949. // ImGui::Checkbox("Hide Name", &stack.player.HideName);
  2950. //// ImGui::Checkbox("High Jump", &stack.player.highjump);
  2951.  
  2952. /* ImGui::Checkbox(CScope, &stack.weapon.scope);
  2953. ImGui::Combo(CScopeType,(PINT) &stack.weapon.scope, scopechoice, 4);*/
  2954.  
  2955. ImGui::SliderFloat(JumpValue, &jumpvalue,0, 1000);
  2956. //ImGui::Checkbox("Car Wheel", &stack.car.wheel);
  2957.  
  2958. /* ImGui::Checkbox(NoReload, &stack.weapon.reload);
  2959. ImGui::Checkbox(UnliBullet, &stack.server.two);
  2960. ImGui::Checkbox(NoRecoilXY, &stack.server.teamsize);
  2961. ImGui::Checkbox(FastHeal, &stack.server.one);
  2962.  
  2963. ImGui::Checkbox(SpeedHacking, &stack.server.three);
  2964. ImGui::Checkbox(NoFallingDamage, &stack.server.four);
  2965. ImGui::Checkbox(WalkJumper, &stack.server.six);
  2966. ImGui::Checkbox(SuperKill, &stack.server.seven);
  2967. ImGui::Checkbox(STW, &stack.server.eight);
  2968.  
  2969. ImGui::Checkbox(Scope_High, &stack.server.nine);
  2970. ImGui::TextColored(ImColor(44, 234, 86),GGROSX);
  2971. ImGui::Checkbox(OPK, &stack.server.ten);*/
  2972. break;
  2973. // case 4:
  2974.  
  2975.  
  2976. //break;
  2977.  
  2978. /* case 5:
  2979. ImGui::SliderFloat("Teamsize", &Teamsize,0, 1000);
  2980. break;*/
  2981. case 4:
  2982. //ImGui::Checkbox("New NoClip", &stack.weapon.ammo);
  2983. ImGui::Checkbox(NoClipFunc, &stack.teleport.noclip);
  2984. ImGui::Checkbox(TeleKill, &stack.teleport.telekill);
  2985. // ImGui::ColorEdit3((Teleport_FOV), teleportfov); ImGui::SameLine(0.0, 2.0f); ImGui::Checkbox(Teleport_FOV, &stack.teleport.fov);
  2986.  
  2987. ImGui::Combo(Hotkeys,(PINT) &stack.teleport.hotkey, telechoice, 6);
  2988.  
  2989. // ImGui::TextColored(ImColor(44, 234, 86),Teletype);
  2990. ImGui::TextColored(ImColor(44, 234, 86),Teletype);
  2991. ImGui::RadioButton(CrossX, (PINT)&stack.teleport.type, 1); ImGui::SameLine(0.0f,1.0f);
  2992. ImGui::RadioButton(DistanceX, (PINT)&stack.teleport.type, 2);
  2993. // ImGui::Combo("Teletype",(PINT)&stack.teleport.type,teletype,3);
  2994. //ImGui::RadioButton(CrossX, (int*)&stack.teleport.type, 1); ImGui::SameLine(0.0f,1.0f);
  2995. //ImGui::RadioButton(DistanceX, (int*)&stack.teleport.type, 2);
  2996.  
  2997. /* ImGui::Checkbox("Include Bot", &stack.teleport.yesbot);*/
  2998. //ImGui::SliderFloat(Teleport_FOV, &teleport_fov,0, 25);
  2999.  
  3000. ImGui::TextColored(ImColor(44, 234, 86),TextTelemark);
  3001. /*if(Markpos.x && Markpos.y && Markpos.z == NULL)
  3002. {
  3003. ImGui::TextColored(ImColor(255,0,0),"MarkPos : %s, %s %s", Markpos.x, Markpos.y,Markpos.z);
  3004. }
  3005. else
  3006. {
  3007. ImGui::TextColored(ImColor(44,234,86),"MarkPos : %d, %d %d", Markpos.x, Markpos.y,Markpos.z);
  3008. }*/
  3009. ImGui::Checkbox(TeleMark, &stack.teleport.mark);
  3010.  
  3011.  
  3012.  
  3013. /*ImGui::Combo("CarSpeed",(PINT) &stack.car.speed, carspeed, 5);*/
  3014.  
  3015.  
  3016. //ImGui::ColorPicker3
  3017. // ImGui::Checkbox("GG ROS", &stack.teleport.opk);
  3018. // ImGui::SliderFloat("Height Value", &HeightValue,-100, 100);
  3019. break;
  3020. case 5:
  3021.  
  3022.  
  3023.  
  3024.  
  3025. ImGui::Checkbox("Change Muzzle", &stack.weapon.onmuz);
  3026.  
  3027. ImGui::ListBox("Weapon 1 Muzzle (CHOOSE ONE)", (PINT)&stack.weapon.muzzle, muzzle1choice, IM_ARRAYSIZE(muzzle1choice), 4);
  3028.  
  3029.  
  3030. ImGui::ListBox("Weapon 2 Muzzle (CHOOSE ONE)",(PINT) &stack.weapon.muzzle2, muzzle2choice, IM_ARRAYSIZE(muzzle2choice), 4);
  3031.  
  3032. //ImGui::Combo("Weapon 1 Muzzle",(PINT)&stack.weapon.muzzle,muzzle1choice,4);
  3033. //ImGui::Combo("Weapon 2 Muzzle",(PINT)&stack.weapon.muzzle2,muzzle2choice,4);
  3034.  
  3035. ImGui::Checkbox("Change Magazine", &stack.weapon.onmag);
  3036. ImGui::ListBox("Weapon 1 Magazine (CHOOSE ONE)", (PINT)&stack.weapon.mag, mag1choice, IM_ARRAYSIZE(mag1choice), 4);
  3037.  
  3038.  
  3039. ImGui::ListBox("Weapon 2 Magazine (CHOOSE ONE)",(PINT) &stack.weapon.mag2, mag2choice, IM_ARRAYSIZE(mag2choice), 4);
  3040. /*ImGui::Combo("Weapon 1 Magazine",(PINT)&stack.weapon.mag,mag1choice,4);
  3041. ImGui::Combo("Weapon 2 Magazine",(PINT)&stack.weapon.mag2,mag2choice,4);*/
  3042.  
  3043. ImGui::Checkbox("Change Scope", &stack.weapon.onscope);
  3044. ImGui::ListBox("Weapon 1 Scope (CHOOSE ONE)", (PINT)&stack.weapon.scope, scope1choice, IM_ARRAYSIZE(scope1choice), 6);
  3045.  
  3046.  
  3047. ImGui::ListBox("Weapon 2 Scope (CHOOSE ONE)",(PINT) &stack.weapon.scope2, scope2choice, IM_ARRAYSIZE(scope2choice), 6);
  3048. /* ImGui::Combo("Weapon 1 Scope",(PINT)&stack.weapon.scope,scope1choice,6);
  3049. ImGui::Combo("Weapon 2 Scope",(PINT)&stack.weapon.scope2,scope2choice,6);*/
  3050.  
  3051.  
  3052.  
  3053. break;
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059. /*if (ImGui::IsWindowFocused() && !ImGui::IsAnyItemActive())
  3060. {
  3061. ImGui::SetKeyboardFocusHere(keyboardFocus);
  3062. if(keyboardFocus)
  3063. {
  3064. ImGui::TextColored(ImColor(255,0,0),"username : "); ImGui::SameLine(0.0, 2.0f); ImGui::InputText("",(PCHAR)user.c_str(),sizeof(user));
  3065.  
  3066. ImGui::TextColored(ImColor(255,0,0),"password : "); ImGui::SameLine(0.0, 2.0f); ImGui::InputText("",(PCHAR)pass.c_str(),sizeof(pass));
  3067. }
  3068.  
  3069. }*/
  3070.  
  3071. }
  3072.  
  3073.  
  3074.  
  3075. /* */
  3076. }
  3077. /* ImGui::TextColored(ImColor(44, 234, 86), "DATE :" );
  3078. ImGui::SameLine();
  3079. ImGui::TextColored(ImColor(122, 145, 120,100), DATES());
  3080. ImGui::Separator();
  3081. ImGui::TextColored(ImColor(122,145 ,125.120),TIME());
  3082. ImGui::Separator();*/
  3083.  
  3084. ImGui::EndChild();
  3085. ImGui::End();
  3086.  
  3087. }
  3088.  
  3089. ImGui::Render();
  3090. }
  3091.  
  3092.  
  3093. void DoCrossHair(LPDIRECT3DDEVICE9 pDevice)
  3094. {
  3095. if(stack.d3d.crosshair == 1)
  3096. {
  3097. FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), pDevice);//Left line
  3098. FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), pDevice);//Right line
  3099. FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), pDevice);//Top line
  3100. FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), pDevice);//Bottom line
  3101.  
  3102. DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), pDevice);//Point
  3103. }
  3104. if(stack.d3d.crosshair == 2)
  3105. {
  3106. FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), pDevice);//Left line
  3107. FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), pDevice);//Right line
  3108. FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), pDevice);//Top line
  3109. FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), pDevice);//Bottom line
  3110. DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), pDevice);
  3111. }
  3112. if(stack.d3d.crosshair == 3)
  3113. {
  3114. FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);//Left line
  3115. FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);//Right line
  3116. FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);//Top line
  3117. FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);//Bottom line
  3118. DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);
  3119. }
  3120. if(stack.d3d.crosshair == 4)
  3121. {
  3122. FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);//Left line
  3123. FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);//Right line
  3124. FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);//Top line
  3125. FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);//Bottom line
  3126. DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
  3127. }
  3128. if(stack.d3d.crosshair == 5)
  3129. {
  3130. FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);//Left line
  3131. FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);//Right line
  3132. FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);//Top line
  3133. FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);//Bottom line
  3134. DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
  3135. }
  3136. if(stack.d3d.crosshair == 6)
  3137. {
  3138. FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);//Left line
  3139. FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);//Right line
  3140. FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);//Top line
  3141. FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);//Bottom line
  3142. DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
  3143. }
  3144. if(stack.d3d.crosshair == 7)
  3145. {
  3146. FillRGB(ScreenCX - 14, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 165, 0), pDevice);//Left line
  3147. FillRGB(ScreenCX + 5, ScreenCY, 10, 1, D3DCOLOR_ARGB(255, 255, 165, 0), pDevice);//Right line
  3148. FillRGB(ScreenCX, ScreenCY - 14, 1, 10, D3DCOLOR_ARGB(255, 255, 165, 0), pDevice);//Top line
  3149. FillRGB(ScreenCX, ScreenCY + 5, 1, 10, D3DCOLOR_ARGB(255, 255, 165, 0), pDevice);//Bottom line
  3150. DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
  3151. }
  3152. if(stack.d3d.crosshair == 8)
  3153. {
  3154. FillRGB(ScreenCX - 15, ScreenCY, 30, 1, RED(255), pDevice);//Diagonal line
  3155. FillRGB(ScreenCX, ScreenCY - 15, 1, 30, RED(255), pDevice);//Vertical line
  3156. }
  3157. if(stack.d3d.crosshair == 9)
  3158. {
  3159. FillRGB(ScreenCX - 17, ScreenCY, 10, 1, RED(255), pDevice);//Left line
  3160. FillRGB(ScreenCX + 9, ScreenCY, 10, 1, RED(255), pDevice); // Right line
  3161. FillRGB(ScreenCX, ScreenCY - 17, 1, 10, RED(255), pDevice);//Top line
  3162. FillRGB(ScreenCX, ScreenCY + 9, 1, 10, RED(255), pDevice);//Bottom line
  3163. }
  3164. if(stack.d3d.crosshair == 10)
  3165. {
  3166. FillRGB(ScreenCX - 13, ScreenCY, 10, 1, RED(255), pDevice);//Left line
  3167. FillRGB(ScreenCX + 4, ScreenCY, 10, 1, RED(255), pDevice);//Right line
  3168. FillRGB(ScreenCX, ScreenCY - 13, 1, 10, RED(255), pDevice);//Top line
  3169. FillRGB(ScreenCX, ScreenCY + 4, 1, 10, RED(255), pDevice);//Bottom line
  3170. DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);
  3171.  
  3172. }
  3173. if(stack.d3d.crosshair == 11)
  3174. {
  3175.  
  3176. FillRGB(ScreenCX - 20, ScreenCY, 40, 1, D3DCOLOR_ARGB(255, 125, 0, 255), pDevice);//Purple
  3177. FillRGB(ScreenCX, ScreenCY - 20, 1, 40, D3DCOLOR_ARGB(255, 125, 0, 255), pDevice);
  3178. FillRGB(ScreenCX - 17, ScreenCY, 34, 1, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);//Blue
  3179. FillRGB(ScreenCX, ScreenCY - 17, 1, 34, D3DCOLOR_ARGB(255, 0, 0, 255), pDevice);
  3180. FillRGB(ScreenCX - 14, ScreenCY, 28, 1, D3DCOLOR_ARGB(255, 000, 139, 200), pDevice);//Cyan
  3181. FillRGB(ScreenCX, ScreenCY - 14, 1, 28, D3DCOLOR_ARGB(255, 000, 139, 200), pDevice);
  3182. FillRGB(ScreenCX - 11, ScreenCY, 22, 1, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);//Green
  3183. FillRGB(ScreenCX, ScreenCY - 11, 1, 22, D3DCOLOR_ARGB(255, 0, 255, 0), pDevice);
  3184. FillRGB(ScreenCX - 9, ScreenCY, 18, 1, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);//Yellow
  3185. FillRGB(ScreenCX, ScreenCY - 9, 1, 18, D3DCOLOR_ARGB(255, 255, 255, 0), pDevice);
  3186. FillRGB(ScreenCX - 6, ScreenCY, 12, 1, D3DCOLOR_ARGB(255, 255, 132, 0), pDevice);//Orange
  3187. FillRGB(ScreenCX, ScreenCY - 6, 1, 12, D3DCOLOR_ARGB(255, 255, 132, 0), pDevice);
  3188. FillRGB(ScreenCX - 3, ScreenCY, 6, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);//Red
  3189. FillRGB(ScreenCX, ScreenCY - 3, 1, 6, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
  3190. }
  3191. if (stack.d3d.crosshair == 12)
  3192. {
  3193.  
  3194. FillRGB(ScreenCX - 20, ScreenCY, 40, 1, PURPLE(255), pDevice);//Purple
  3195. FillRGB(ScreenCX, ScreenCY - 20, 1, 40, PURPLE(255), pDevice);
  3196. FillRGB(ScreenCX - 17, ScreenCY, 34, 1, BLUE(255), pDevice);//Blue
  3197. FillRGB(ScreenCX, ScreenCY - 17, 1, 34, BLUE(255), pDevice);
  3198. FillRGB(ScreenCX - 14, ScreenCY, 28, 1, CYAN(255), pDevice);//Cyan
  3199. FillRGB(ScreenCX, ScreenCY - 14, 1, 28, CYAN(255), pDevice);
  3200. FillRGB(ScreenCX - 11, ScreenCY, 22, 1, GREEN(255), pDevice);//Green
  3201. FillRGB(ScreenCX, ScreenCY - 11, 1, 22, GREEN(255), pDevice);
  3202. FillRGB(ScreenCX - 9, ScreenCY, 18, 1, YELLOW(255), pDevice);//Yellow
  3203. FillRGB(ScreenCX, ScreenCY - 9, 1, 18, YELLOW(255), pDevice);
  3204. FillRGB(ScreenCX - 6, ScreenCY, 12, 1, ORANGE(255), pDevice);//Orange
  3205. FillRGB(ScreenCX, ScreenCY - 6, 1, 12, ORANGE(255), pDevice);
  3206. FillRGB(ScreenCX - 3, ScreenCY, 6, 1, RED(255), pDevice);//Red
  3207. FillRGB(ScreenCX, ScreenCY - 3, 1, 6, RED(255), pDevice);
  3208. DrawPoint(ScreenCX, ScreenCY, 1, 1, D3DCOLOR_ARGB(255, 255, 0, 0), pDevice);
  3209. DrawRect(pDevice, ScreenCX - 7, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
  3210. DrawRect(pDevice, ScreenCX + 7, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
  3211. DrawRect(pDevice, ScreenCX - 1, ScreenCY - 7, 3, 1, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
  3212. DrawRect(pDevice, ScreenCX - 1, ScreenCY + 7, 3, 1, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
  3213. }
  3214. if(stack.d3d.crosshair == 13)
  3215. {
  3216. DrawLine(pDevice, ScreenCX + 15, ScreenCY + 15, ScreenCX + 3, ScreenCY + 3, RED(255));
  3217. DrawLine(pDevice, ScreenCX - 15, ScreenCY + 15, ScreenCX - 3, ScreenCY + 3, RED(255));
  3218. DrawLine(pDevice, ScreenCX + 15, ScreenCY - 15, ScreenCX + 3, ScreenCY - 3, RED(255));
  3219. DrawLine(pDevice, ScreenCX - 15, ScreenCY - 15, ScreenCX - 3, ScreenCY - 3, RED(255));
  3220. }
  3221.  
  3222. if(stack.d3d.crosshair == 14)
  3223. {
  3224. DrawRect(pDevice, ScreenCX, ScreenCY - 5, 1, 11, D3DCOLOR_RGBA(0, 0, 000, 255));
  3225. DrawRect(pDevice, ScreenCX - 5, ScreenCY, 11, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
  3226. DrawRect(pDevice, ScreenCX - 1, ScreenCY - 6, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
  3227. DrawRect(pDevice, ScreenCX - 1, ScreenCY + 6, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
  3228. DrawRect(pDevice, ScreenCX - 1, ScreenCY - 8, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
  3229. DrawRect(pDevice, ScreenCX - 1, ScreenCY + 8, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
  3230. DrawRect(pDevice, ScreenCX - 2, ScreenCY - 8, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
  3231. DrawRect(pDevice, ScreenCX - 2, ScreenCY + 6, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
  3232. DrawRect(pDevice, ScreenCX + 2, ScreenCY - 8, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
  3233. DrawRect(pDevice, ScreenCX + 2, ScreenCY + 6, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
  3234. DrawRect(pDevice, ScreenCX - 6, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
  3235. DrawRect(pDevice, ScreenCX + 6, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
  3236. DrawRect(pDevice, ScreenCX - 8, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
  3237. DrawRect(pDevice, ScreenCX + 8, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(0, 0, 0, 255));
  3238. DrawRect(pDevice, ScreenCX - 8, ScreenCY - 2, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
  3239. DrawRect(pDevice, ScreenCX + 6, ScreenCY - 2, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
  3240. DrawRect(pDevice, ScreenCX - 8, ScreenCY + 2, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
  3241. DrawRect(pDevice, ScreenCX + 6, ScreenCY + 2, 3, 1, D3DCOLOR_RGBA(0, 0, 0, 255));
  3242. DrawRect(pDevice, ScreenCX - 7, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
  3243. DrawRect(pDevice, ScreenCX + 7, ScreenCY - 1, 1, 3, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
  3244. DrawRect(pDevice, ScreenCX - 1, ScreenCY - 7, 3, 1, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
  3245. DrawRect(pDevice, ScreenCX - 1, ScreenCY + 7, 3, 1, D3DCOLOR_RGBA(rand() % 255 + 0, rand() % 255 + 0, rand() % 255 + 0, 255));
  3246. }
  3247. }
  3248. HRESULT APIENTRY Present_hook(IDirect3DDevice9* pDevice, const RECT *pSourceRect, const RECT *pDestRect, HWND hDestWindowOverride, const RGNDATA *pDirtyRegion)
  3249. {
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255. pDevice->GetViewport(&Viewport);
  3256. ScreenCoords.X = Viewport.Width / 2;
  3257. ScreenCoords.Y = Viewport.Height / 2;
  3258. ScreenCX = (float)Viewport.Width / 2.0f;
  3259. ScreenCY = (float)Viewport.Height / 2.0f;
  3260.  
  3261. if (!Direct3DInitialize)
  3262. {
  3263. Direct3DInitialize = true;
  3264. CreateMyShader(&Front, pDevice, 255, 0, 0, 255);
  3265. CreateMyShader(&FGreen, pDevice, 0, 255, 0, 255);
  3266. CreateMyShader(&Back, pDevice, 255, 255, 0, 255);
  3267. CreateMyShader(&oldlShader, pDevice, 255, 0, 0, 255);
  3268. }
  3269.  
  3270. if (InBattle())
  3271. {
  3272. __try
  3273. {
  3274. DecryptCall();
  3275. esper(pDevice);
  3276. PlayerTelekill(pDevice);
  3277. DoAimBot2();
  3278. SpeedMain();
  3279. NewMem();
  3280. }
  3281. __except (true) {}
  3282. }
  3283.  
  3284.  
  3285. if(InBattle())
  3286. {
  3287. DoCrossHair(pDevice);
  3288. DoEsp(pDevice);
  3289. DoReplace();
  3290. DoTeleport();
  3291. }
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297. // memcpy((void*)(Basez + AntiSSCallAddy), (int*)(PBYTE)"\x90\x90\x90\x90\x90\x90\x90", 7);
  3298. //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);
  3299. //if(InBattle())
  3300. //{
  3301. // __try
  3302. // {
  3303. //OriginalMemoryHacks();
  3304. // }__except(true){}
  3305. //}
  3306.  
  3307. pDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, false);
  3308. pDevice->SetRenderState(D3DRS_ZENABLE, false);
  3309. pDevice->SetRenderState(D3DRS_STENCILENABLE, false);
  3310.  
  3311.  
  3312. ImGui_Init(hWnd, pDevice);
  3313.  
  3314.  
  3315.  
  3316. if (Create == false)
  3317. {
  3318.  
  3319.  
  3320. D3DXCreateLine(pDevice, &pLine);
  3321. D3DXCreateFontA(pDevice, 14, 0, FW_NORMAL, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Font);
  3322.  
  3323. m_pWindowProc = (WNDPROC)SetWindowLongPtr(hWnd, GWL_WNDPROC, (LONG_PTR)myWndProc);
  3324.  
  3325. Create = true;
  3326.  
  3327. }
  3328. else
  3329. {
  3330.  
  3331.  
  3332.  
  3333. DrawMenu();
  3334. //Rad.OnRender();
  3335.  
  3336. }
  3337.  
  3338.  
  3339.  
  3340. return Present_orig(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
  3341. }
  3342.  
  3343. HRESULT APIENTRY Reset_hook(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS *pPresentationParameters)
  3344. {
  3345.  
  3346.  
  3347. if (Font)
  3348. Font->OnLostDevice();
  3349.  
  3350. if (pLine)
  3351. pLine->OnLostDevice();
  3352.  
  3353. ImGui_InvalidateDeviceObjects();
  3354. HRESULT ResetReturn = Reset_orig(pDevice, pPresentationParameters);
  3355.  
  3356. if (SUCCEEDED(ResetReturn))
  3357. {
  3358.  
  3359. if (Font)
  3360. Font->OnResetDevice();
  3361. if (pLine)
  3362. pLine->OnResetDevice();
  3363.  
  3364. ImGui_CreateDeviceObjects();
  3365. }
  3366.  
  3367. return ResetReturn;
  3368. }
  3369.  
  3370.  
  3371. DWORD DetourCreate1(DWORD SrcVA, DWORD DstVA, DWORD Size)
  3372. {
  3373. #define SIZEOF_JMP_NEAR 5
  3374.  
  3375. if (SrcVA && DstVA && Size > 0)
  3376. {
  3377. DWORD DetourVA = (DWORD)
  3378. VirtualAlloc(NULL, Size + SIZEOF_JMP_NEAR,
  3379. MEM_COMMIT | MEM_TOP_DOWN, PAGE_EXECUTE_READWRITE);
  3380.  
  3381. if (DetourVA == 0)
  3382. return(0);
  3383.  
  3384. DWORD dwProtect;
  3385.  
  3386. if (VirtualProtect((PVOID)SrcVA, Size, PAGE_EXECUTE_READWRITE, &dwProtect))
  3387. {
  3388. for (DWORD i = 0; i < Size; i++) {
  3389. *(PBYTE)(DetourVA + i) = *(PBYTE)(SrcVA + i);
  3390. }
  3391.  
  3392. *(PBYTE)(DetourVA + Size + 0) = 0xE9;
  3393. *(PDWORD)(DetourVA + Size + 1) = (SrcVA - DetourVA - SIZEOF_JMP_NEAR);
  3394.  
  3395. *(PBYTE)(SrcVA + 0) = 0xE9;
  3396. *(PDWORD)(SrcVA + 1) = (DstVA - SrcVA - SIZEOF_JMP_NEAR);
  3397.  
  3398. VirtualProtect((PVOID)SrcVA, Size, dwProtect, &dwProtect);
  3399.  
  3400. VirtualProtect((PVOID)DetourVA, Size + SIZEOF_JMP_NEAR, PAGE_EXECUTE_READ, &dwProtect);
  3401.  
  3402. return DetourVA;
  3403. }
  3404. }
  3405. return(NULL);
  3406. }
  3407.  
  3408. PVOID D3Ddiscover(void *tbl, int size)
  3409. {
  3410. //HWND hWnd;
  3411. VOID *pInterface = NULL;
  3412. D3DPRESENT_PARAMETERS d3dpp;
  3413.  
  3414. if ((Hand = (HMODULE)CreateWindowEx(NULL, WC_DIALOG, (LPCWSTR)"", WS_OVERLAPPED, 0, 0, 50, 50, NULL, NULL, NULL, NULL)) == NULL)
  3415. return FALSE;
  3416.  
  3417. ShowWindow((HWND)Hand, SW_HIDE);
  3418. LPDIRECT3D9 pD3D;
  3419. LPDIRECT3DDEVICE9 pD3Ddev;
  3420.  
  3421. if ((pD3D = Direct3DCreate9(D3D_SDK_VERSION)) != NULL)
  3422. {
  3423. ZeroMemory(&d3dpp, sizeof(d3dpp));
  3424. d3dpp.Windowed = TRUE;
  3425. d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
  3426. d3dpp.hDeviceWindow = (HWND)Hand;
  3427. d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
  3428. d3dpp.BackBufferWidth = d3dpp.BackBufferHeight = 600;
  3429. pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, (HWND)Hand, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pD3Ddev);
  3430. if (pD3Ddev) {
  3431. pInterface = (PDWORD)*(DWORD *)pD3Ddev;
  3432. memcpy(tbl, (void *)pInterface, size);
  3433. pD3Ddev->Release();
  3434. }
  3435. pD3D->Release();
  3436. }
  3437. DestroyWindow((HWND)Hand);
  3438. return pInterface;
  3439. }
  3440.  
  3441. UINT WINAPI D3D(VOID *)
  3442. {
  3443. HINSTANCE hD3D; DWORD vTable[105];
  3444. hD3D = NULL;
  3445.  
  3446. do {
  3447. hD3D = GetModuleHandleA("d3d9.dll");
  3448. if (!hD3D) Sleep(10);
  3449. } while (!hD3D);
  3450.  
  3451. if (D3Ddiscover((PVOID)&vTable[0], 420) == 0) return NULL;
  3452. {
  3453. Reset_orig = (Reset_t)DetourCreate1((DWORD)vTable[16], (DWORD)Reset_hook, 5);
  3454. Present_orig = (Present_t)DetourCreate1((DWORD)vTable[17], (DWORD)Present_hook, 5);
  3455. SetStreamSource_orig = (SetStreamSource_t)DetourCreate1((DWORD)vTable[100], (DWORD)SetStreamSource_hook,5);
  3456. SetTexture_orig = (SetTexture_t)DetourCreate1((DWORD)vTable[65], (DWORD)SetTexture_hook,5);
  3457. SetVertexShaderConstantF_orig = (SetVertexShaderConstantF_t)DetourCreate1((DWORD)vTable[94],(DWORD)SetVertexShaderConstantF_hook,5);//DetourCreate1((DWORD)SetVertexShaderConstantF_orig, (PBYTE)SetVertexShaderConstantF_hook);
  3458. Sleep(100);
  3459. }
  3460. return FALSE;
  3461. }
  3462. // MODULE //
  3463.  
  3464. //DWORD WINAPI Loop(__in LPVOID lpParameter)//unsigned __stdcall
  3465. //{
  3466. // HMODULE dDll = NULL;
  3467. // while (!dDll)
  3468. // {
  3469. // dDll = GetModuleHandleA("d3d9.dll");
  3470. // Sleep(100);
  3471. // }
  3472. // CloseHandle(dDll);
  3473. //
  3474. //// IDirect3D9* d3d = NULL;
  3475. //
  3476. // IDirect3DDevice9* d3ddev = NULL;
  3477. //
  3478. // HWND tmpWnd = CreateWindowA("BUTTON", "RosD3D", WS_SYSMENU | WS_MINIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, NULL, NULL, Hand, NULL);
  3479. // if (tmpWnd == NULL)
  3480. // {
  3481. //
  3482. // return 0;
  3483. // }
  3484. // LPDIRECT3D9 d3d ;
  3485. // d3d = Direct3DCreate9(D3D_SDK_VERSION);
  3486. // if (d3d == NULL)
  3487. // {
  3488. // DestroyWindow(tmpWnd);
  3489. //
  3490. // return 0;
  3491. // }
  3492. //
  3493. // D3DPRESENT_PARAMETERS d3dpp;
  3494. // ZeroMemory(&d3dpp, sizeof(d3dpp));
  3495. // d3dpp.Windowed = TRUE;
  3496. // d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
  3497. // d3dpp.hDeviceWindow = tmpWnd;
  3498. // d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
  3499. //
  3500. // HRESULT result = d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &d3ddev);
  3501. // if (result != D3D_OK)
  3502. // {
  3503. // d3d->Release();
  3504. // DestroyWindow(tmpWnd);
  3505. //
  3506. // return 0;
  3507. // }
  3508. //
  3509. //#if defined _M_X64
  3510. // DWORD64* dVtable = (DWORD64*)d3ddev;
  3511. // dVtable = (DWORD64*)dVtable[0];
  3512. //#elif defined _M_IX86
  3513. // DWORD* dVtable = (DWORD*)d3ddev;
  3514. // dVtable = (DWORD*)dVtable[0];
  3515. //#endif
  3516. //
  3517. // //cContext pContext = cContext::GetInstance();
  3518. //
  3519. // //if(pContext.ApplyDetour<oPresent>(oPresent,oPresent,oPresent))
  3520. // if (MH_Initialize() != MH_OK) { return 1; }
  3521. // if (MH_CreateHook((DWORD_PTR*)dVtable[17], &Present_hook, reinterpret_cast<void**>(&Present_orig)) != MH_OK) { return 1; }
  3522. // if (MH_EnableHook((DWORD_PTR*)dVtable[17]) != MH_OK) { return 1; }
  3523. //
  3524. // if (MH_CreateHook((DWORD_PTR*)dVtable[100], &SetStreamSource_hook, reinterpret_cast<void**>(&SetStreamSource_orig)) != MH_OK) { return 1; }
  3525. // if (MH_EnableHook((DWORD_PTR*)dVtable[100]) != MH_OK) { return 1; }
  3526. // if (MH_CreateHook((DWORD_PTR*)dVtable[65], &SetTexture_hook, reinterpret_cast<void**>(&SetTexture_orig)) != MH_OK) { return 1; }
  3527. // if (MH_EnableHook((DWORD_PTR*)dVtable[65]) != MH_OK) { return 1; }
  3528. // if (MH_CreateHook((DWORD_PTR*)dVtable[16], &Reset_hook, reinterpret_cast<void**>(&Reset_orig)) != MH_OK) { return 1; }
  3529. // if (MH_EnableHook((DWORD_PTR*)dVtable[16]) != MH_OK) { return 1; }
  3530. //
  3531. // //if(MH_CreateHook((LPVOID)DecryptCall,(LPVOID)(&Nigger), (LPVOID*)(&FakeReturn))){ return 1;}
  3532. // //if (MH_EnableHook((LPVOID)DecryptCall) != MH_OK) { return 1; }
  3533. //
  3534. //
  3535. // //d3ddev->Release();
  3536. // //d3d->Release();
  3537. // //DestroyWindow(tmpWnd);
  3538. //
  3539. // return 1;
  3540. //
  3541. //}
  3542.  
  3543. inline bool HideThread(HANDLE hThread)
  3544. {
  3545. typedef NTSTATUS(NTAPI *pNtSetInformationThread) (HANDLE, UINT, PVOID, ULONG);
  3546. NTSTATUS Status;
  3547. pNtSetInformationThread NtSIT = (pNtSetInformationThread)GetProcAddress(GetModuleHandle(TEXT("ntdll.dll")), "NtSetInformationThread");
  3548.  
  3549. if (NtSIT == NULL)
  3550. return false;
  3551.  
  3552. if (hThread == NULL)
  3553. Status = NtSIT(GetCurrentThread(), 0x11, 0, 0);
  3554. else
  3555. Status = NtSIT(hThread, 0x11, 0, 0);
  3556.  
  3557. if (Status != 0x00000000)
  3558. return false;
  3559. else
  3560. return true;
  3561. }
  3562.  
  3563. void DebugSelf()
  3564. {
  3565. HANDLE hProcess = NULL;
  3566. DEBUG_EVENT de;
  3567. PROCESS_INFORMATION pi;
  3568. STARTUPINFO si;
  3569. ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
  3570. ZeroMemory(&si, sizeof(STARTUPINFO));
  3571. ZeroMemory(&de, sizeof(DEBUG_EVENT));
  3572. GetStartupInfo(&si);
  3573. CreateProcess(NULL, GetCommandLine(), NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi);
  3574. ContinueDebugEvent(pi.dwProcessId, pi.dwThreadId, DBG_CONTINUE);
  3575. WaitForDebugEvent(&de, INFINITE);
  3576. }
  3577. typedef NTSTATUS(NTAPI *pfnNtSetInformationThread)(_In_ HANDLE ThreadHandle, _In_ ULONG ThreadInformationClass, _In_ PVOID ThreadInformation, _In_ ULONG ThreadInformationLength);
  3578. const ULONG ThreadHideFromDebuggerrr = 0x11;
  3579. void HideFromDebugger()
  3580. {
  3581. HMODULE hNtDll = LoadLibrary(TEXT("ntdll.dll"));
  3582. pfnNtSetInformationThread NtSetInformationThread = (pfnNtSetInformationThread)GetProcAddress(hNtDll, "NtSetInformationThread");
  3583. NTSTATUS status = NtSetInformationThread(GetCurrentThread(), ThreadHideFromDebuggerrr, NULL, 0);
  3584. }
  3585.  
  3586. inline void ErasePeKrds(HMODULE hModz)
  3587. {
  3588. DWORD OldProtect = 0;
  3589. char *pBaseAddr = (char*)hModz;
  3590. VirtualProtect(pBaseAddr, 2096, PAGE_READWRITE, &OldProtect);
  3591.  
  3592. // Erase the header
  3593. ZeroMemory(pBaseAddr, 2096);
  3594. }
  3595. void EraseHeaders(HINSTANCE hModule)
  3596. {
  3597. PIMAGE_DOS_HEADER pDoH;
  3598. PIMAGE_NT_HEADERS pNtH;
  3599. DWORD i, ersize, protect;
  3600.  
  3601. if (!hModule) return;
  3602.  
  3603. pDoH = (PIMAGE_DOS_HEADER)(hModule);
  3604. pNtH = (PIMAGE_NT_HEADERS)((LONG)hModule + ((PIMAGE_DOS_HEADER)hModule)->e_lfanew);
  3605.  
  3606. ersize = sizeof(IMAGE_DOS_HEADER);
  3607. if (VirtualProtect(pDoH, ersize, PAGE_READWRITE, &protect))
  3608. {
  3609. for (i = 0; i < ersize; i++)
  3610. *(BYTE*)((BYTE*)pDoH + i) = 0;
  3611. }
  3612.  
  3613. ersize = sizeof(IMAGE_NT_HEADERS);
  3614. if (pNtH && VirtualProtect(pNtH, ersize, PAGE_READWRITE, &protect))
  3615. {
  3616. for (i = 0; i < ersize; i++)
  3617. *(BYTE*)((BYTE*)pNtH + i) = 0;
  3618. }
  3619. return;
  3620. }
  3621. typedef struct _LDR_MODULE
  3622. {
  3623. LIST_ENTRY InLoadOrderModuleList;
  3624. LIST_ENTRY InMemoryOrderModuleList;
  3625. LIST_ENTRY InInitializationOrderModuleList;
  3626. PVOID BaseAddress;
  3627. PVOID EntryPoint;
  3628. ULONG SizeOfImage;
  3629. }LDR_MODULE, *PLDR_MODULE;
  3630.  
  3631. typedef struct _PEB_LDR_DATA
  3632. {
  3633. ULONG Length;
  3634. BOOLEAN Initialized;
  3635. PVOID SsHandle;
  3636. LIST_ENTRY InLoadOrderModuleList;
  3637. LIST_ENTRY InMemoryOrderModuleList;
  3638. LIST_ENTRY InInitializationOrderModuleList;
  3639. }PEB_LDR_DATA, *PPEB_LDR_DATA;
  3640.  
  3641. typedef struct _PEB
  3642. {
  3643. BYTE Reserved1[2];
  3644. BYTE BeingDebugged;
  3645. BYTE Reserved2[1];
  3646. PVOID Reserved3[2];
  3647. PPEB_LDR_DATA Ldr;
  3648. }PEB, *PPEB;
  3649.  
  3650. void HideModule(HINSTANCE hModule)
  3651. {
  3652. PEB* peb;
  3653. LDR_MODULE* ldr;
  3654.  
  3655. peb = (PEB*)__readfsdword(0x30);
  3656.  
  3657. ldr = (LDR_MODULE*)peb->Ldr->InLoadOrderModuleList.Flink;
  3658.  
  3659. while (ldr->BaseAddress != 0)
  3660. {
  3661. if (ldr->BaseAddress == hModule)
  3662. {
  3663. if (ldr->InLoadOrderModuleList.Blink != 0)
  3664. (ldr->InLoadOrderModuleList.Blink)->Flink = ldr->InLoadOrderModuleList.Flink;
  3665.  
  3666. if (ldr->InLoadOrderModuleList.Blink != 0)
  3667. (ldr->InLoadOrderModuleList.Flink)->Blink = ldr->InLoadOrderModuleList.Blink;
  3668.  
  3669. if (ldr->InInitializationOrderModuleList.Blink != 0)
  3670. (ldr->InInitializationOrderModuleList.Blink)->Flink = ldr->InInitializationOrderModuleList.Flink;
  3671.  
  3672. if (ldr->InInitializationOrderModuleList.Flink != 0)
  3673. (ldr->InInitializationOrderModuleList.Flink)->Blink = ldr->InInitializationOrderModuleList.Blink;
  3674.  
  3675. if (ldr->InMemoryOrderModuleList.Flink != 0)
  3676. (ldr->InMemoryOrderModuleList.Blink)->Flink = ldr->InMemoryOrderModuleList.Flink;
  3677.  
  3678. if (ldr->InMemoryOrderModuleList.Flink != 0)
  3679. (ldr->InMemoryOrderModuleList.Flink)->Blink = ldr->InMemoryOrderModuleList.Blink;
  3680. }
  3681. ldr = (LDR_MODULE*)ldr->InLoadOrderModuleList.Flink;
  3682.  
  3683.  
  3684.  
  3685. }
  3686. }
  3687.  
  3688.  
  3689. string dsasd = "https://deepspace.rf.gd/";
  3690. //string url = "https://pastebin.com/Acqq8wKd";
  3691. //#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
  3692. //int CheckTrial(char *url1,char *url2,char *url3){
  3693. //char output[15000];
  3694. //HINTERNET hInternet;
  3695. //HINTERNET hFile;
  3696. //DWORD ReadSize;
  3697. //BOOL bResult;
  3698. //hInternet = InternetOpenA(url2, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, NULL);
  3699. //hFile = InternetOpenUrlA(hInternet, url1, NULL, NULL, INTERNET_FLAG_RELOAD, NULL);
  3700. //ReadSize = 15;
  3701. //bResult = InternetReadFile(hFile, output, 15, &ReadSize);
  3702. //output[ReadSize] = '\0';
  3703. //if(strcmp(url3, output)==0){
  3704. // MessageBoxA(0,"Activated !","Enjoy",0);
  3705. //
  3706. //Beep(1000, 100);
  3707. //}else{
  3708. //ExitProcess(0);
  3709. //Sleep(10);
  3710. //ShellExecuteA(0,"open",dsasd.c_str(),0,0,SW_SHOWNORMAL);
  3711. ////system("start url");
  3712. //}
  3713. //return 0;
  3714. //}
  3715.  
  3716. int trial(char *urll){
  3717. char output[16];
  3718. HINTERNET hInternet;HINTERNET hFile;DWORD ReadSize; BOOL bResult;
  3719. hInternet = InternetOpenA("Some USER-AGENT",INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,NULL);
  3720. hFile = InternetOpenUrlA(hInternet,urll,NULL,NULL,INTERNET_FLAG_RELOAD,NULL);
  3721. ReadSize = 15;bResult = InternetReadFile(hFile,output,15,&ReadSize);output[ReadSize]='\0';
  3722. if(strcmp("ACTIVE",output)==0){
  3723. MessageBoxA(0, "SUCCESSFULLY INJECTED","testing", MB_OK | MB_ICONINFORMATION);
  3724.  
  3725.  
  3726. }else{
  3727. MessageBoxA(0, "ERROR","testing", MB_OK | MB_ICONINFORMATION);
  3728.  
  3729. }
  3730. return 0;
  3731. }
  3732.  
  3733.  
  3734. void __stdcall CheckFile(){
  3735. trial("https://pastebin.com/raw/2ryNFhT5");
  3736. }
  3737.  
  3738. void AntiDebug1()
  3739. {
  3740.  
  3741.  
  3742. CONTEXT ctx = {};
  3743. ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
  3744. if (GetThreadContext(GetCurrentThread(), &ctx))
  3745. {
  3746. if (ctx.Dr0 != 0 || ctx.Dr1 != 0 || ctx.Dr2 != 0 || ctx.Dr3 != 0)
  3747. {
  3748. std::cout << "Stop debugging program!" << std::endl;
  3749. exit(-1);
  3750. }
  3751. }
  3752. }
  3753.  
  3754. void AntiDebug2()
  3755. {
  3756.  
  3757. BOOL isDebugged = TRUE;
  3758. __try
  3759. {
  3760. __asm
  3761. {
  3762. pushfd
  3763. or dword ptr[esp], 0x100 // set the Trap Flag
  3764. popfd // Load the value into EFLAGS register
  3765. nop
  3766. }
  3767. }
  3768. __except (EXCEPTION_EXECUTE_HANDLER)
  3769. {
  3770. // If an exception has been raised – debugger is not present
  3771. isDebugged = FALSE;
  3772. }
  3773. if (isDebugged)
  3774. {
  3775. std::cout << "Stop debugging program!" << std::endl;
  3776. exit(-1);
  3777. }
  3778. }
  3779.  
  3780. void AntiDebug3()
  3781. {
  3782. CONTEXT ctx = {};
  3783. ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
  3784. if (GetThreadContext(GetCurrentThread(), &ctx))
  3785. {
  3786. if (ctx.Dr0 != 0 || ctx.Dr1 != 0 || ctx.Dr2 != 0 || ctx.Dr3 != 0)
  3787. {
  3788. std::cout << "Stop debugging program!" << std::endl;
  3789. exit(-1);
  3790. }
  3791. }
  3792. }
  3793.  
  3794. BOOL APIENTRY DllMain(
  3795. _In_ HINSTANCE _1,
  3796. _In_ DWORD _2,
  3797. _In_ LPVOID _3) {
  3798. DWORD ROS = (DWORD)GetModuleHandleA(GameBase);
  3799. DisableThreadLibraryCalls(_1);
  3800. switch (_2) {
  3801. case DLL_PROCESS_ATTACH:
  3802. /*OutputDebugString(TEXT("%s%s%s%s%s%s%s%s%s%s%s")
  3803. TEXT("%s%s%s%s%s%s%s%s%s%s%s%s%s")
  3804. TEXT("%s%s%s%s%s%s%s%s%s%s%s%s%s")
  3805. TEXT("%s%s%s%s%s%s%s%s%s%s%s%s%s"));*/
  3806.  
  3807. ErasePeKrds(_1);
  3808. HideThread(_1);
  3809. HideFromDebugger();
  3810. DebugSelf();
  3811. AntiDebug1();
  3812. AntiDebug2();
  3813. AntiDebug3();
  3814. //HideModule(_1);
  3815. //EraseHeaders(_1);
  3816.  
  3817. //while (!(hWnd = FindWindowA(0, "Rules of Survival 1.189032.190946")))
  3818. // Sleep(200);
  3819.  
  3820. Hand = _1;
  3821.  
  3822. hWnd = FindWindowA(0, "Rules of Survival 1.228147.229724");//
  3823. //
  3824. SetWindowTextA(hWnd,"Rules of zNova");
  3825.  
  3826. //(HMODULE)hWnd;
  3827. //_beginthreadex(0,0,CallBypass,0,0,0);
  3828.  
  3829.  
  3830.  
  3831.  
  3832. //CreateThread(0,0,(LPTHREAD_START_ROUTINE)CheckFile,0,0,0);
  3833.  
  3834. CreateThread(0, 0, (LPTHREAD_START_ROUTINE)NoClip, 0, 0, 0);
  3835. CreateThread(0, 0, (LPTHREAD_START_ROUTINE)D3D, 0, 0, 0);//_beginthreadex
  3836.  
  3837.  
  3838.  
  3839. //CreateThread(0,0,(LPTHREAD_START_ROUTINE)GetAddress,0,0,0);
  3840.  
  3841. break;
  3842.  
  3843. case DLL_PROCESS_DETACH:
  3844. //SetWindowLongPtr(FindWindowA(0, "Rules of Survival 1.189032.190946"), GWL_WNDPROC, (LONG_PTR)m_pWindowProc);//1.186978.188496
  3845. break;
  3846. }
  3847. return TRUE;
  3848. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement