Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.68 KB | None | 0 0
  1. #include "Resolver.h"
  2. #include "Ragebot.h"
  3. #include "Hooks.h"
  4.  
  5. enum MENUS
  6. {
  7. MENU_NONE = 0,
  8. MENU_AIMBOT,
  9. MENU_TRIGGERBOT,
  10. MENU_ESP,
  11. MENU_MISC,
  12. MENU_PLAYERLIST,
  13. MENU_ABOUT,
  14. MENU_LEGITBOT
  15. };
  16.  
  17. enum TYPES
  18. {
  19. Float = 0,
  20. Double,
  21. Integer,
  22. Bool,
  23. Byte,
  24. Char
  25. };
  26.  
  27. #define OVERLAY_OFFSETX 0
  28. #define OVERLAY_OFFSETY 0
  29.  
  30. #define OVERLAY_OFFSETX 250
  31. #define OVERLAY_OFFSETY 50
  32.  
  33.  
  34. #define TEXTBOX_HEIGHT 16
  35. #define TEXTBOX_SCROLL_WIDTH 15
  36. #define TEXTBOX_SCROLL_HEIGHT 7
  37. #define CHECKBOX_WIDTH 10
  38. #define CHECKBOX_HEIGHT 10
  39. #define MENU_BUTTON_WIDTH 70
  40. #define MENU_BUTTON_HEIGHT 32
  41.  
  42. #define Centered 1
  43. #define NotCentered 0
  44. #define CheckedOff 0
  45. #define CheckedOn 1
  46. #define NotPressed 0
  47. #define IsPressed 1
  48. #define NotHighlighted 0
  49. #define IsHighlighted 1
  50. #define INDEX_ZERO 0
  51. #define FADE_ZERO 0.0f
  52. #define NOT_FADED 0
  53. #define IsFaded 1
  54. #define IsNotFaded 0
  55. #define IsDisabled 1
  56. #define IsNotDisabled 0
  57.  
  58.  
  59. char *WDresolverstr = new char[12]{ 45, 62, 90, 40, 31, 9, 21, 22, 12, 31, 8, 0 }; /*WD Resolver*/
  60.  
  61. struct Textbox
  62. {
  63. Vector2D ScreenPos;
  64. Vector2D IncScreenPos;
  65. Vector2D DecScreenPos;
  66. MENUS Menu;
  67. bool OffsetFromCenter;
  68. void* CallOnSet;
  69. int Width;
  70. TYPES Type;
  71. char* Label;
  72. double dbMin;
  73. double dbMax;
  74. char Value[128];
  75. float flValue;
  76. double dbValue;
  77. int iValue;
  78. BYTE bValue;
  79. bool Fade;
  80. bool Disabled;
  81. };
  82.  
  83.  
  84. Textbox WhaleDongTxt = { Vector2D(40 - OVERLAY_OFFSETX, 190 - OVERLAY_OFFSETY), Vector2D(95 - OVERLAY_OFFSETX, 185 - OVERLAY_OFFSETY), Vector2D(95 - OVERLAY_OFFSETX, 200 - OVERLAY_OFFSETY), MENU_MISC, Centered, nullptr, 50, TYPES::Integer, WDresolverstr, 0.0, 64.0, "0", 0.0f, 0.0, 0, 0, IsFaded, IsNotDisabled };
  85.  
  86.  
  87. void PitchCorrection()
  88. {
  89.  
  90. for (int i = 0; i < Interfaces::Engine->GetMaxClients(); ++i)
  91. {
  92. IClientEntity* pLocal = hackManager.pLocal();
  93. IClientEntity *player = (IClientEntity*)Interfaces::EntList->GetClientEntity(i);
  94.  
  95. if (!player || player->IsDormant() || player->GetHealth() < 1 || (DWORD)player == (DWORD)pLocal)
  96. continue;
  97.  
  98. if (!player)
  99. continue;
  100.  
  101. if (pLocal)
  102. continue;
  103.  
  104. if (pLocal && player && pLocal->IsAlive())
  105. {
  106. if (Menu::Window.RageBotTab.AdvancedResolver.GetState())
  107. {
  108. Vector* eyeAngles = player->GetEyeAnglesXY();
  109. if (eyeAngles->x < -179.f) eyeAngles->x += 360.f;
  110. else if (eyeAngles->x > 90.0 || eyeAngles->x < -90.0) eyeAngles->x = 89.f;
  111. else if (eyeAngles->x > 89.0 && eyeAngles->x < 91.0) eyeAngles->x -= 90.f;
  112. else if (eyeAngles->x > 179.0 && eyeAngles->x < 181.0) eyeAngles->x -= 180;
  113. else if (eyeAngles->x > -179.0 && eyeAngles->x < -181.0) eyeAngles->x += 180;
  114. else if (fabs(eyeAngles->x) == 0) eyeAngles->x = std::copysign(89.0f, eyeAngles->x);
  115. }
  116. }
  117. }
  118. }
  119.  
  120.  
  121.  
  122. float OldLowerBodyYaw[64];
  123. float YawDelta[64];
  124. float reset[64];
  125. float Delta[64];
  126. float Resolved_angles[64];
  127. int iSmart;
  128. static int jitter = -1;
  129. float LatestLowerBodyYaw[64];
  130. bool LbyUpdated[64];
  131. float YawDifference[64];
  132. float OldYawDifference[64];
  133. float LatestLowerBodyYawUpdateTime[64];
  134. float OldDeltaY;
  135. float tolerance = 20.f;
  136.  
  137. Vector vecZero = Vector(0.0f, 0.0f, 0.0f);
  138. QAngle angZero = QAngle(0.0f, 0.0f, 0.0f);
  139.  
  140. #define M_RADPI 57.295779513082f
  141.  
  142. QAngle CalcAngle(Vector src, Vector dst)
  143. {
  144. Vector delta = src - dst;
  145. if (delta == vecZero)
  146. {
  147. return angZero;
  148. }
  149.  
  150. float len = delta.Length();
  151.  
  152. if (delta.z == 0.0f && len == 0.0f)
  153. return angZero;
  154.  
  155. if (delta.y == 0.0f && delta.x == 0.0f)
  156. return angZero;
  157.  
  158. QAngle angles;
  159. angles.x = (asinf(delta.z / delta.Length()) * M_RADPI);
  160. angles.y = (atanf(delta.y / delta.x) * M_RADPI);
  161. angles.z = 0.0f;
  162. if (delta.x >= 0.0f) { angles.y += 180.0f; }
  163.  
  164.  
  165.  
  166. return angles;
  167. }
  168.  
  169. void ResoSetup::OldY(IClientEntity* pEntity)
  170. {
  171.  
  172. float flInterval = Interfaces::Globals->interval_per_tick;
  173.  
  174. if (pEntity->GetLowerBodyYaw() > 130 && pEntity->GetLowerBodyYaw() < -130)
  175. {
  176. StoreThings(pEntity);
  177. }
  178. else
  179. {
  180. pEntity->GetLowerBodyYaw() - 100 - rand() % 30;
  181.  
  182. if (Resolver::didhitHS && pEntity->GetHealth() > 60)
  183. pEntity->GetLowerBodyYaw() - 90;
  184. }
  185.  
  186.  
  187. }
  188.  
  189. /// People wanted Mutiny stuff, so here it is. I will let you make the resolver yourself.
  190. //--------------------------------------------//
  191.  
  192. float Vec2Ang(Vector Velocity)
  193. {
  194. if (Velocity.x == 0 || Velocity.y == 0)
  195. return 0;
  196. float rise = Velocity.x;
  197. float run = Velocity.y;
  198. float value = rise / run;
  199. float theta = atan(value);
  200. theta = RAD2DEG(theta) + 90;
  201. if (Velocity.y < 0 && Velocity.x > 0 || Velocity.y < 0 && Velocity.x < 0)
  202. theta *= -1;
  203. else
  204. theta = 180 - theta;
  205. return theta;
  206. }
  207. void clamp(float &value)
  208. {
  209. while (value > 180)
  210. value -= 360;
  211. while (value < -180)
  212. value += 360;
  213. }
  214. float clamp2(float value)
  215. {
  216. while (value > 180)
  217. value -= 360;
  218. while (value < -180)
  219. value += 360;
  220. return value;
  221. }
  222.  
  223. float difference(float first, float second)
  224. {
  225. clamp(first);
  226. clamp(second);
  227. float returnval = first - second;
  228. if (first < -91 && second> 91 || first > 91 && second < -91)
  229. {
  230. double negativedifY = 180 - abs(first);
  231. double posdiffenceY = 180 - abs(second);
  232. returnval = negativedifY + posdiffenceY;
  233. }
  234. return returnval;
  235. }
  236.  
  237.  
  238. float mean(float real[scanstrength], int slots)
  239. {
  240. float total = 0;
  241. for (int i = 0; i < slots; i++)
  242. {
  243. total += real[i];
  244. }
  245. return total / slots;
  246. }
  247.  
  248. float SD(float real[scanstrength], float mean, int slots)
  249. {
  250. float total = 0;
  251. for (int i = 0; i < slots; i++)
  252. {
  253. total += (real[i] - mean)*(real[i] - mean);
  254. }
  255. total /= slots;
  256. return sqrt(total);
  257. }
  258. float accuracy = 10;
  259. bool checkStatic(float real[scanstrength], float meanvalue, int slots)
  260. {
  261. meanvalue = mean(real, slots);
  262. if (SD(real, meanvalue, slots) < accuracy)
  263. {
  264. return true;
  265. }
  266. return false;
  267. }
  268.  
  269.  
  270.  
  271. #define SETANGLE 180 // basically zeus resolver
  272.  
  273. bool checkJitter(float real[scanstrength], int ticks[scanstrength], float &meanvalue, int &level, int slots)
  274. {
  275. float dif[scanstrength - 1];
  276.  
  277. int ticks2[scanstrength - 1];
  278. float dif2[scanstrength - 2];
  279.  
  280. for (int i = 0; i < slots - 1; i++)
  281. {
  282. ticks2[i] = abs(ticks[i + 1] - ticks[i]);
  283. if (ticks2[i] == 1)
  284. ticks2[i] = 1;
  285.  
  286. dif[i] = clamp2(abs(difference(real[i], real[i + 1]) / (ticks2[i])));
  287. }
  288. meanvalue = mean(dif, slots - 1);
  289. if (SD(dif, meanvalue, slots - 1) < accuracy)
  290. {
  291. level = 1;
  292. return true;
  293. }
  294.  
  295.  
  296. for (int i = 0; i < slots - 2; i++)
  297. {
  298. int ticks = abs(ticks2[i + 1] - ticks2[i]);
  299. if (ticks == 0)
  300. ticks = 1;
  301.  
  302. dif2[i] = clamp2(abs(difference(dif[i], dif[i + 1]) / (ticks)));
  303. }
  304. meanvalue = mean(dif2, slots - 2);
  305. if (SD(dif2, meanvalue, slots - 2) < accuracy)
  306. {
  307. level = 2;
  308. return true;
  309. }
  310.  
  311. return false;
  312. }
  313.  
  314.  
  315. bool checkSpin(float real[scanstrength], int ticks[scanstrength], float &meanvalue, int &level, int slots)
  316. {
  317. float dif[scanstrength - 1];
  318.  
  319. int ticks2[scanstrength - 1];
  320. float dif2[scanstrength - 2];
  321.  
  322. for (int i = 0; i < slots - 1; i++)
  323. {
  324. ticks2[i] = abs(ticks[i + 1] - ticks[i]);
  325. if (ticks2[i] == 1)
  326. ticks2[i] = 1;
  327. dif[i] = clamp2(difference(real[i], real[i + 1]) / (ticks2[i]));
  328. }
  329. meanvalue = mean(dif, slots - 1);
  330. if (SD(dif, meanvalue, slots - 1) < accuracy)
  331. {
  332. level = 1;
  333. return true;
  334. }
  335.  
  336.  
  337. for (int i = 0; i < slots - 2; i++)
  338. {
  339. int ticks = abs(ticks2[i + 1] - ticks2[i]);
  340. if (ticks == 0)
  341. ticks = 1;
  342.  
  343. dif2[i] = clamp2(difference(dif[i], dif[i + 1]) / (ticks));
  344. }
  345. meanvalue = mean(dif2, slots - 2);
  346. if (SD(dif2, meanvalue, slots - 2) < accuracy)
  347. {
  348. level = 2;
  349. return true;
  350. }
  351.  
  352. return false;
  353. }
  354.  
  355.  
  356. struct BruteforceInfo
  357. {
  358. enum BruteforceStep : unsigned int {
  359. BF_STEP_YAW_STANDING,
  360. BF_STEP_YAW_FAKEWALK,
  361. BF_STEP_YAW_AIR,
  362. BF_STEP_YAW_DUCKED,
  363. BF_STEP_YAW_PITCH,
  364. BF_STEP_COUNT,
  365. };
  366.  
  367. unsigned char step[BF_STEP_COUNT];
  368. bool changeStep[BF_STEP_COUNT];
  369. bool missedBySpread;
  370. int missedCount;
  371. int spentBullets;
  372. };
  373.  
  374. int GetEstimatedServerTickCount(float latency)
  375. {
  376. return (int)floorf((float)((float)(latency) / (float)((uintptr_t)&Interfaces::Globals->interval_per_tick)) + 0.5) + 1 + (int)((uintptr_t)&Interfaces::Globals->tickcount);
  377. }
  378. inline float RandomFloat(float min, float max)
  379. {
  380. static auto fn = (decltype(&RandomFloat))(GetProcAddress(GetModuleHandle("vstdlib.dll"), "RandomFloat"));
  381. return fn(min, max);
  382. }
  383.  
  384. bool HasFakeHead(IClientEntity* pEntity)
  385. {
  386. //lby should update if distance from lby to eye angles exceeds 35 degrees
  387. return abs(pEntity->GetEyeAnglesXY()->y - pEntity->GetLowerBodyYaw()) > 35;
  388. }
  389. bool Lbywithin35(IClientEntity* pEntity) {
  390. //lby should update if distance from lby to eye angles less than 35 degrees
  391. return abs(pEntity->GetEyeAnglesXY()->y - pEntity->GetLowerBodyYaw()) < 35;
  392. }
  393. bool IsMovingOnGround(IClientEntity* pEntity) {
  394. //Check if player has a velocity greater than 0 (moving) and if they are onground.
  395. return pEntity->GetVelocity().Length2D() > 45.f && pEntity->GetFlags() & FL_ONGROUND;
  396. }
  397. bool IsMovingOnInAir(IClientEntity* pEntity) {
  398. //Check if player has a velocity greater than 0 (moving) and if they are onground.
  399. return !(pEntity->GetFlags() & FL_ONGROUND);
  400. }
  401. bool OnGround(IClientEntity* pEntity) {
  402. //Check if player has a velocity greater than 0 (moving) and if they are onground.
  403. return pEntity->GetFlags() & FL_ONGROUND;
  404. }
  405. bool IsFakeWalking(IClientEntity* pEntity) {
  406. //Check if a player is moving, but at below a velocity of 36
  407. return IsMovingOnGround(pEntity) && pEntity->GetVelocity().Length2D() < 36.0f;
  408. }
  409.  
  410. //--------------------------------------------//
  411.  
  412. void ResoSetup::Resolve(IClientEntity* pEntity, int CurrentTarget) // int + currenttarget = bad
  413. {
  414. IClientEntity* pLocal = hackManager.pLocal();
  415. bool isAlive;
  416.  
  417. float angletolerance;
  418. angletolerance = pEntity->GetEyeAnglesXY()->y + 180.0;
  419. float consider;
  420. float v24;
  421. double v20;
  422.  
  423. int rnd = rand() % 360;
  424. if (rnd < 30)
  425. rnd = 30;
  426.  
  427. if (Interfaces::Engine->IsConnected() & pLocal->IsPlayer())
  428. {
  429. if (pLocal->IsAlive())
  430. {
  431. #define RandomInt(nMin, nMax) (rand() % (nMax - nMin + 1) + nMin);
  432. std::string aa_info[64];
  433.  
  434.  
  435. //------bool------//
  436.  
  437. std::vector<int> HitBoxesToScan;
  438.  
  439.  
  440.  
  441. bool Prediction; //Func: Prediction
  442. bool MeetsLBYReq;
  443. bool maybefakehead = 0;
  444. bool shouldpredict;
  445. //------bool------//
  446.  
  447. //------float------//
  448. float org_yaw;
  449. float server_time = pLocal->GetTickBase() * Interfaces::Globals->interval_per_tick;
  450.  
  451. //------float------//
  452.  
  453.  
  454. //------Statics------//
  455. static Vector Skip[65];
  456. static float StaticHeadAngle = 0;
  457.  
  458. static bool GetEyeAngles[65]; //Resolve: Frame EyeAngle
  459. static bool GetLowerBodyYawTarget[65]; //Resolve: LowerBody
  460. static bool isLBYPredictited[65];
  461. static bool switch2;
  462.  
  463. static float OldLowerBodyYaws[65];
  464. static float OldYawDeltas[65];
  465. static float oldTimer[65];
  466.  
  467. bool badresolverlmao;
  468.  
  469. if (Globals::Shots >= 4)
  470. {
  471. if (pEntity->GetHealth() >= ResoSetup::storedhealth[pEntity->GetIndex()] -10) // lets compensate for nades n shit ghetto style
  472. badresolverlmao = true;
  473. }
  474.  
  475.  
  476.  
  477. auto new_yaw = org_yaw;
  478. ResoSetup::storedhp[pEntity->GetIndex()] = pEntity->GetHealth();
  479. ResoSetup::NewANgles[pEntity->GetIndex()] = *pEntity->GetEyeAnglesXY();
  480. ResoSetup::newlby[pEntity->GetIndex()] = pEntity->GetLowerBodyYaw();
  481. ResoSetup::newsimtime = pEntity->GetSimulationTime();
  482. ResoSetup::newdelta[pEntity->GetIndex()] = pEntity->GetEyeAnglesXY()->y;
  483. ResoSetup::newlbydelta[pEntity->GetIndex()] = pEntity->GetLowerBodyYaw();
  484. ResoSetup::finaldelta[pEntity->GetIndex()] = ResoSetup::newdelta[pEntity->GetIndex()] - ResoSetup::storeddelta[pEntity->GetIndex()];
  485. ResoSetup::finallbydelta[pEntity->GetIndex()] = ResoSetup::newlbydelta[pEntity->GetIndex()] - ResoSetup::storedlbydelta[pEntity->GetIndex()];
  486. if (newlby == storedlby)
  487. ResoSetup::lbyupdated = false;
  488. else
  489. ResoSetup::lbyupdated = true;
  490. StoreThings(pEntity);
  491.  
  492. IClientEntity* player = (IClientEntity*)pLocal;
  493. IClientEntity* pLocal = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  494. INetChannelInfo *nci = Interfaces::Engine->GetNetChannelInfo();
  495. Vector* eyeAngles = player->GetEyeAnglesXY();
  496.  
  497. if (pEntity->GetFlags() & FL_ONGROUND)
  498. MeetsLBYReq = true;
  499. else
  500. MeetsLBYReq = false;
  501.  
  502. StoreFGE(pEntity);
  503.  
  504. float Delta[64];
  505. float OldLowerBodyYaw;
  506. float Resolved_angles[64];
  507. static Vector vLast[65];
  508. static bool bShotLastTime[65];
  509. static bool bJitterFix[65];
  510.  
  511. float prevlby = 0.f;
  512. int avg = 1;
  513. int count = 1;
  514. static float LatestLowerBodyYawUpdateTime[55];
  515. static float LatestLowerBodyYawUpdateTime1[55];
  516.  
  517. static float time_at_update[65];
  518. float kevin[64];
  519. static bool bLowerBodyIsUpdated = false;
  520.  
  521. if (pEntity->GetLowerBodyYaw() != kevin[pEntity->GetIndex()])
  522. bLowerBodyIsUpdated = true;
  523. else
  524. bLowerBodyIsUpdated = false;
  525.  
  526. if (pEntity->GetVelocity().Length2D() > 0.1)
  527. {
  528. kevin[pEntity->GetIndex()] = pEntity->GetLowerBodyYaw();//storing their moving lby for later
  529. LatestLowerBodyYawUpdateTime[pEntity->GetIndex()] = pEntity->GetSimulationTime() + 0.22;
  530.  
  531. }
  532. bool bHasAA;
  533. bool bSpinbot;
  534.  
  535.  
  536. bool IsMoving;
  537.  
  538. if (pEntity->GetVelocity().Length2D() >= 1)
  539. IsMoving = true;
  540. else
  541. IsMoving = false;
  542.  
  543. bool tolerantLBY;
  544. if (!MeetsLBYReq)
  545. if (pEntity->GetLowerBodyYawTarget() + 35)
  546. tolerantLBY = true;
  547. else
  548. tolerantLBY = false;
  549.  
  550. bool IsBreathing;
  551. {
  552. bool idk = 0;
  553. {
  554. if (pEntity->GetEyePosition().y)
  555. idk = true;
  556. else
  557. idk = false;
  558. }
  559.  
  560. server_time >= idk;
  561. if (server_time >= idk + 0.705f)
  562. {
  563. IsBreathing = true;
  564. }
  565. else
  566. IsBreathing = false;
  567.  
  568. }
  569.  
  570. float breakcomp = pEntity->GetEyeAnglesXY()->y - (pEntity->GetLowerBodyYaw() - 35);
  571.  
  572. float healthbase = pEntity->GetHealth();
  573. float rnde = rand() % 160;
  574. if (rnde < 30)
  575. rnde = 30;
  576.  
  577.  
  578. bool IsStatic;
  579. {
  580. bool breathing = false;
  581. if (IsBreathing)
  582. {
  583. pEntity->GetEyePosition();
  584. IsStatic = true;
  585. }
  586. else
  587. IsStatic = false;
  588. }
  589.  
  590. bool wrongsideleft;
  591.  
  592. bool wrongsideright;
  593.  
  594. float panicflip = ResoSetup::panicangle[pEntity->GetIndex()] + 30;
  595. bool shouldpanic;
  596.  
  597. pEntity->GetChokedTicks();
  598.  
  599. /*
  600. static float LastLBYUpdateTime = 0;
  601. IClientEntity* pLocal = hackManager.pLocal();
  602. float server_time = pLocal->GetTickBase() * Interfaces::Globals->interval_per_tick;
  603. if (server_time >= LastLBYUpdateTime)
  604. {
  605. LastLBYUpdateTime = server_time + 1.125f;
  606.  
  607. */
  608.  
  609.  
  610. bool faketolerance;
  611. {
  612. if (!IsMoving)
  613. {
  614. if (MeetsLBYReq)
  615. {
  616. pEntity->GetLowerBodyYaw();
  617. }
  618. StoreFGE(pEntity);
  619. if (!lbyupdated)
  620. {
  621. if (server_time >= StaticHeadAngle + 1.805f)
  622. {
  623. ResoSetup::storedlby[pEntity->GetIndex()] = maybefakehead;
  624. }
  625. if (maybefakehead = OldLowerBodyYaw)
  626. {
  627. if (tolerantLBY = maybefakehead & Resolver::didhitHS)
  628. {
  629. if (Resolver::didhitHS & pEntity->GetHealth() > ResoSetup::storedhealth[pEntity->GetIndex()])
  630. faketolerance = true;
  631. else
  632. faketolerance = false;
  633. }
  634. }
  635.  
  636. }
  637. }
  638.  
  639.  
  640. float yaw = pEntity->GetLowerBodyYaw();
  641.  
  642.  
  643.  
  644.  
  645.  
  646. bool IsFast;
  647.  
  648. if (pEntity->GetFlags() & FL_ONGROUND & pEntity->GetVelocity().Length2D() >= 170.5)
  649. IsFast = true;
  650. else
  651. IsFast = false;
  652.  
  653.  
  654. int flip = (int)floorf(Interfaces::Globals->curtime / 0.34) % 3;
  655. static bool bFlipYaw;
  656. float flInterval = Interfaces::Globals->interval_per_tick;
  657.  
  658. if (ResoSetup::storedlby[pEntity->GetIndex()] > yaw + 150)
  659. lbyupdated = true;
  660.  
  661.  
  662.  
  663. if (Menu::Window.RageBotTab.AimbotResolver.GetIndex() == 0)
  664. {
  665.  
  666. }
  667. else if (Menu::Window.RageBotTab.AimbotResolver.GetIndex() == 1)
  668. {
  669. int baim = rand() % 130;
  670. if (baim < 30)
  671. baim = 30;
  672.  
  673. pEntity->GetEyeAnglesXY()->y - 45;
  674.  
  675.  
  676.  
  677. if (pEntity->IsMoving()) pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw();
  678. else
  679. {
  680. switch (Globals::Shots % 6)
  681. {
  682. case 0: pEntity->GetEyeAnglesXY()->y -= 170; break; case 1: pEntity->GetEyeAnglesXY()->y += 170; break;
  683. case 2: pEntity->GetEyeAnglesXY()->y += 145; break; case 3: pEntity->GetEyeAnglesXY()->y -= 145; break;
  684. case 4: pEntity->GetEyeAnglesXY()->y -= 115; break; case 5: pEntity->GetEyeAnglesXY()->y += baim; break;
  685. }
  686. }
  687. }
  688. else if (Menu::Window.RageBotTab.AimbotResolver.GetIndex() == 2)
  689. {
  690.  
  691.  
  692.  
  693. pEntity->GetEyeAnglesXY()->y + 35.f;
  694.  
  695. if (pEntity->IsAlive() & pEntity->GetHealth())
  696. StoreFGE(pEntity);
  697.  
  698. CUserCmd* pCmd;
  699. for (int i = 0; i < Interfaces::Engine->GetMaxClients(); ++i)
  700. {
  701. IClientEntity* pLocal = hackManager.pLocal();
  702. IClientEntity *player = (IClientEntity*)Interfaces::EntList->GetClientEntity(i);
  703.  
  704. if (!player || player->IsDormant() || player->GetHealth() < 1 || (DWORD)player == (DWORD)pLocal)
  705. continue;
  706.  
  707. if (!player)
  708. continue;
  709.  
  710. if (pLocal)
  711. continue;
  712.  
  713. if (pLocal && player && pLocal->IsAlive())
  714. {
  715.  
  716. Vector* eyeAngles = player->GetEyeAnglesXY();
  717.  
  718. if (eyeAngles->x > 90.0 || eyeAngles->x < 60.0) eyeAngles->x = -88.9f;
  719. else if (eyeAngles->x > 60.0 && eyeAngles->x < 20.0) eyeAngles->x = 50.f;
  720. else if (eyeAngles->x > 20.0 && eyeAngles->x < -30.0) eyeAngles->x = 0.f;
  721. else if (eyeAngles->x < -30.0 && eyeAngles->x < 60.0) eyeAngles->x = 55.f;
  722.  
  723.  
  724.  
  725. }
  726. else
  727. {
  728. eyeAngles->x = 88;
  729. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw();
  730. }
  731. }
  732. if (LatestLowerBodyYawUpdateTime[pEntity->GetIndex()] < pEntity->GetSimulationTime() || bLowerBodyIsUpdated)
  733. {
  734. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw();
  735. LatestLowerBodyYawUpdateTime[pEntity->GetIndex()] = pEntity->GetSimulationTime() + 1.1;
  736. }
  737. else
  738. {
  739. if (IsMoving && MeetsLBYReq)
  740. {
  741. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw();
  742. switch (Globals::Shots % 4)
  743. {
  744. case 0: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw(); break;
  745. case 1: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 30; break;
  746. case 2: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 30; break;
  747. case 3: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw(); break;
  748. }
  749. }
  750. else if (Lbywithin35(pEntity) && LatestLowerBodyYawUpdateTime[pEntity->GetIndex()] != pEntity->GetSimulationTime() + 1.1 && pEntity->GetVelocity().Length2D() > 1 && pEntity->GetVelocity().Length2D() <= 110)
  751. {
  752. switch (Globals::missedshots % 5)
  753. {
  754. case 0:
  755. pEntity->GetEyeAnglesXY()->y = OldLowerBodyYaw;
  756. break;
  757. case 1:
  758. pEntity->GetEyeAnglesXY()->y + OldLowerBodyYaw;
  759. break;
  760. case 2:
  761. pEntity->GetEyeAnglesXY()->y = *pEntity->GetLowerBodyYawTarget();
  762. break;
  763. case 3:
  764. pEntity->GetEyeAnglesXY()->y = breakcomp + 180;
  765. break;
  766. case 4:
  767. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 130;
  768. break;
  769. case 5:
  770. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 130;
  771. break;
  772. }
  773. }
  774. else if (MeetsLBYReq && IsFakeWalking(pEntity))
  775. {
  776. HitBoxesToScan.clear();
  777. HitBoxesToScan.push_back((int)CSGOHitboxID::Chest);
  778. HitBoxesToScan.push_back((int)CSGOHitboxID::Stomach);
  779. HitBoxesToScan.push_back((int)CSGOHitboxID::Pelvis);
  780. HitBoxesToScan.push_back((int)CSGOHitboxID::LowerChest);
  781. HitBoxesToScan.push_back((int)CSGOHitboxID::UpperChest);
  782.  
  783. }
  784. else if (IsMoving && MeetsLBYReq)
  785. {
  786. switch (Globals::Shots % 7)
  787. {
  788. case 0: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw(); break;
  789. case 1: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 40; break;
  790. case 2: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 40;
  791. case 3: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw(); break;
  792. case 4: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 75; break;
  793. case 5: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 75; break;
  794. case 6: pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + (160 + rand() % 40); break;
  795. }
  796. }
  797. else if (faketolerance && !IsMoving && MeetsLBYReq)
  798. {
  799. breakcomp;
  800.  
  801. if (LatestLowerBodyYawUpdateTime[pEntity->GetIndex()] = pEntity->GetSimulationTime() + 1.1)
  802. {
  803. if (Lbywithin35(pEntity))
  804. {
  805. switch (Globals::missedshots % 6)
  806. {
  807. case 0:
  808. pEntity->GetEyeAnglesXY()->y = *pEntity->GetLowerBodyYawTarget() - 160;
  809. break;
  810. case 1:
  811. pEntity->GetEyeAnglesXY()->y = *pEntity->GetLowerBodyYawTarget() + 160;
  812. break;
  813. case 2:
  814. pEntity->GetEyeAnglesXY()->y + breakcomp;
  815. break;
  816. case 3:
  817. pEntity->GetEyeAnglesXY()->y = breakcomp - 60;
  818. break;
  819. case 4:
  820. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 110;
  821. break;
  822. case 5:
  823. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 110;
  824. break;
  825. }
  826. }
  827. else
  828. {
  829. switch (Globals::missedshots % 6)
  830. {
  831. case 0:
  832. pEntity->GetEyeAnglesXY()->y = *pEntity->GetLowerBodyYawTarget() - 50;
  833. break;
  834. case 1:
  835. pEntity->GetEyeAnglesXY()->y = *pEntity->GetLowerBodyYawTarget() + 50;
  836. break;
  837. case 2:
  838. pEntity->GetEyeAnglesXY()->y = breakcomp;
  839. break;
  840. case 3:
  841. pEntity->GetEyeAnglesXY()->y = (breakcomp - 55);
  842. break;
  843. case 4:
  844. pEntity->GetEyeAnglesXY()->y = (breakcomp + 55);
  845. break;
  846. case 5:
  847. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + (160 + rand() % 40);
  848. break;
  849. }
  850. }
  851. }
  852. }
  853. else if (HasFakeHead(pEntity))
  854. {
  855. pEntity->GetEyeAnglesXY()->y = pEntity->GetEyeAnglesXY()->y - pEntity->GetLowerBodyYaw();
  856. switch (Globals::missedshots % 4)
  857. {
  858. case 0:
  859. pEntity->GetEyeAnglesXY()->y = pEntity->GetEyeAnglesXY()->y - pEntity->GetLowerBodyYaw();
  860. break;
  861. case 1:
  862. pEntity->GetEyeAnglesXY()->y = pEntity->GetEyeAnglesXY()->y - pEntity->GetLowerBodyYaw();
  863. break;
  864. case 2:
  865. pEntity->GetEyeAnglesXY()->y = breakcomp;
  866. break;
  867. case 3:
  868. pEntity->GetEyeAnglesXY()->y = breakcomp - 60;
  869. break;
  870. }
  871. }
  872. else if (badresolverlmao)
  873. {
  874. pEntity->GetEyeAnglesXY()->y = *pEntity->GetLowerBodyYawTarget() - 155;
  875. }
  876.  
  877. }
  878. }
  879.  
  880.  
  881.  
  882. else if (Menu::Window.RageBotTab.AimbotResolver.GetIndex() == 3)
  883. {
  884.  
  885. if (LatestLowerBodyYawUpdateTime[pEntity->GetIndex()] < pEntity->GetSimulationTime() || bLowerBodyIsUpdated)
  886. {
  887. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw();
  888. LatestLowerBodyYawUpdateTime[pEntity->GetIndex()] = pEntity->GetSimulationTime() + 1.1;
  889. }
  890. else {
  891.  
  892. if (IsMovingOnGround(pEntity))
  893. {
  894. if (IsFakeWalking(pEntity))
  895. {
  896. HitBoxesToScan.clear();
  897. HitBoxesToScan.push_back((int)CSGOHitboxID::Chest);
  898. HitBoxesToScan.push_back((int)CSGOHitboxID::Stomach);
  899. HitBoxesToScan.push_back((int)CSGOHitboxID::Pelvis);
  900. HitBoxesToScan.push_back((int)CSGOHitboxID::LowerChest);
  901. HitBoxesToScan.push_back((int)CSGOHitboxID::UpperChest);
  902. }
  903. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw();
  904. }
  905. else if (IsMovingOnInAir(pEntity))
  906. {
  907. switch (Globals::Shots % 6)
  908. {
  909. case 0:
  910. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 40;
  911. break;
  912. case 1:
  913. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 40;
  914. break;
  915. case 2:
  916. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 80;
  917. break;
  918. case 3:
  919. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 110;
  920. break;
  921. case 4:
  922. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 110;
  923. break;
  924. case 5:
  925. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 180;
  926. break;
  927.  
  928. }
  929. }
  930. else
  931. {
  932. if (HasFakeHead(pEntity))
  933. {
  934. pEntity->GetEyeAnglesXY()->y = pEntity->GetEyeAnglesXY()->y - pEntity->GetLowerBodyYaw();
  935. }
  936.  
  937. if (IsMovingOnGround(pEntity))
  938. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw();
  939. else if (MeetsLBYReq && !IsMoving && pEntity->GetHealth() >= ResoSetup::storedhealth[pEntity->GetIndex()])
  940. {
  941. if ((pEntity->GetEyeAnglesXY()->y + 180.0) <= 180.0)
  942. {
  943. if (angletolerance < -180.0)
  944. angletolerance = angletolerance + 360.0;
  945. }
  946. else
  947. {
  948. angletolerance = angletolerance - 360.0;
  949. }
  950.  
  951. consider = angletolerance - pEntity->GetLowerBodyYaw();
  952.  
  953. if (consider <= 180.0)
  954. {
  955. if (consider < -180.0)
  956. consider = consider + 360.0;
  957. }
  958. else
  959. {
  960. consider = consider - 360.0;
  961. }
  962. if (consider >= 0.0)
  963. v24 = RandomFloat(0.0, consider / 2);
  964. else
  965. v24 = RandomFloat(consider / 2, 0.0);
  966. v20 = v24 + pEntity->GetEyeAnglesXY()->y;
  967. pEntity->GetEyeAnglesXY()->y = v20;
  968. }
  969.  
  970. else
  971. {
  972. if (Lbywithin35(pEntity))
  973. {
  974. switch (Globals::missedshots % 5)
  975. {
  976. case 0:
  977. pEntity->GetEyeAnglesXY()->y = *pEntity->GetLowerBodyYawTarget() - 175;
  978. break;
  979. case 1:
  980. pEntity->GetEyeAnglesXY()->y = *pEntity->GetLowerBodyYawTarget() + 175;
  981. break;
  982. case 2:
  983. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 50;
  984. break;
  985. case 3:
  986. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 50;
  987. break;
  988. case 4:
  989. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 110;
  990. break;
  991. case 5:
  992. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 110;
  993. break;
  994. }
  995. }
  996. }
  997. }
  998. }
  999. }
  1000. else if (Menu::Window.MiscTab.OtherSafeMode.GetState() == false && Menu::Window.RageBotTab.AimbotResolver.GetIndex() == 4)
  1001. {
  1002. float pitch = pEntity->GetEyeAnglesXY()->x;
  1003. float yaw = pEntity->GetEyeAnglesXY()->y;
  1004. float lby = pEntity->GetLowerBodyYaw();
  1005. float z_ang = pEntity->GetEyeAnglesXY()->z;
  1006. float health = pEntity->GetHealth();
  1007. StoreThings(pEntity);
  1008. StoreExtra(pEntity);
  1009. StoreFGE(pEntity);
  1010.  
  1011. bool isfake;
  1012.  
  1013. CUserCmd* pCmd;
  1014. for (int i = 0; i < Interfaces::Engine->GetMaxClients(); ++i)
  1015. {
  1016. IClientEntity* pLocal = hackManager.pLocal();
  1017. IClientEntity *player = (IClientEntity*)Interfaces::EntList->GetClientEntity(i);
  1018.  
  1019. if (!player || player->IsDormant() || player->GetHealth() < 1 || (DWORD)player == (DWORD)pLocal)
  1020. continue;
  1021.  
  1022. if (!player)
  1023. continue;
  1024.  
  1025. if (pLocal)
  1026. continue;
  1027.  
  1028. if (pLocal && player && pLocal->IsAlive())
  1029. {
  1030. if (pitch < -40)
  1031. pitch = 160;
  1032. else if (pitch <= 40 && pitch >= -40)
  1033. pitch = 91;
  1034. else if (pitch > 40)
  1035. pitch = -160;
  1036. else pitch = -91;
  1037. if (z_ang > 20)
  1038. {
  1039. z_ang = 0;
  1040. }
  1041. else if (z_ang < -20)
  1042. {
  1043. z_ang = 0;
  1044. }
  1045. else
  1046. z_ang = 0;
  1047.  
  1048. if (Globals::Shots % 3 && pEntity->GetHealth() > ResoSetup::storedhealth[pEntity->GetIndex()])
  1049. isfake = true;
  1050. else isfake = false;
  1051.  
  1052. if (isfake)
  1053. yaw - 120;
  1054. }
  1055. else
  1056. {
  1057. pitch = 0;
  1058. }
  1059. }
  1060.  
  1061.  
  1062. if (MeetsLBYReq && !IsMoving)
  1063. {
  1064.  
  1065. if (health > 45)
  1066. {
  1067. switch (Globals::Shots % 14)
  1068. {
  1069. case 0: yaw - 180; break;
  1070. case 1: lby = OldLowerBodyYaw; break;
  1071. case 2: yaw = 90; break;
  1072. case 3: yaw = -90; break;
  1073. case 4: lby - 50; break;
  1074. case 5: lby - 70; break;
  1075. case 6: lby = -155; break;
  1076. case 7: lby -= 0; break;
  1077. case 8: lby = 160; break;
  1078. case 9: lby = 50; break;
  1079. case 10: lby = -55; break;
  1080. case 11: (yaw - 45) - (lby - 30); break;
  1081. case 12: (yaw + 45) + (lby + 30); break;
  1082. case 13: (yaw = lby) + rand() % 360; break;
  1083. }
  1084. }
  1085. else
  1086. {
  1087. switch (Globals::Shots % 14)
  1088. {
  1089. case 0: yaw - 110; break;
  1090. case 1: yaw + 110; break;
  1091. case 2: yaw = 180; break;
  1092. case 3: yaw = -90; break;
  1093. case 4: yaw = 90; break;
  1094. case 5: (yaw = lby) - 50; break;
  1095. case 6: (yaw = lby) + 100; break;
  1096. case 7: (lby = 0); yaw = 35; break;
  1097. case 8: (lby = 0); yaw = -35; break;
  1098. case 9: (lby = 180); yaw = -155; break;
  1099. case 10: (lby = 180); yaw = 155; break;
  1100. case 11: (yaw - 65) - (lby - 50); break;
  1101. case 12: (yaw + 95) + (lby + 60); break;
  1102. case 13: (yaw = lby) - rand() % 360; break;
  1103. }
  1104. }
  1105. }
  1106. else
  1107. {
  1108.  
  1109. switch (Globals::Shots % 14)
  1110. {
  1111. case 0: yaw = lby; break;
  1112. case 1: lby = OldLowerBodyYaw; break;
  1113. case 2: (yaw = lby) - 35; break;
  1114. case 3: (yaw = lby) - 75; break;
  1115. case 4: (yaw = lby) + 115; break;
  1116. case 5: (yaw = lby) + 115; break;
  1117. case 6: (yaw = lby) + 65; break;
  1118. case 7: (yaw = lby) - 180; break;
  1119. case 8: lby = 160; break;
  1120. case 9: (yaw = lby) + 30 + (rand() % 360); break;
  1121. case 10: lby = -180; break;
  1122. case 11: (yaw - 85) - (lby - 100); break;
  1123. case 12: (yaw + 45) + (lby + 30); break;
  1124. case 13: (yaw = lby) + rand() % 360; break;
  1125. }
  1126.  
  1127. }
  1128. }
  1129. else
  1130. {
  1131. CUserCmd* pCmd;
  1132. for (int i = 0; i < Interfaces::Engine->GetMaxClients(); ++i)
  1133. {
  1134. IClientEntity* pLocal = hackManager.pLocal();
  1135. IClientEntity *player = (IClientEntity*)Interfaces::EntList->GetClientEntity(i);
  1136.  
  1137. if (!player || player->IsDormant() || player->GetHealth() < 1 || (DWORD)player == (DWORD)pLocal)
  1138. continue;
  1139.  
  1140. if (!player)
  1141. continue;
  1142.  
  1143. if (pLocal)
  1144. continue;
  1145.  
  1146. if (pLocal && player && pLocal->IsAlive())
  1147. {
  1148. pEntity->GetEyeAnglesXY()->x = 88;
  1149. }
  1150. pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 90;
  1151. }
  1152.  
  1153. }
  1154.  
  1155. }
  1156. }
  1157. }
  1158. }
  1159.  
  1160.  
  1161. void ResoSetup::StoreFGE(IClientEntity* pEntity)
  1162. {
  1163. ResoSetup::storedanglesFGE = pEntity->GetEyeAnglesXY()->y;
  1164. ResoSetup::storedlbyFGE = pEntity->GetLowerBodyYaw();
  1165. ResoSetup::storedsimtimeFGE = pEntity->GetSimulationTime();
  1166. }
  1167.  
  1168. void ResoSetup::StoreThings(IClientEntity* pEntity)
  1169. {
  1170. ResoSetup::StoredAngles[pEntity->GetIndex()] = *pEntity->GetEyeAnglesXY();
  1171. ResoSetup::storedlby[pEntity->GetIndex()] = pEntity->GetLowerBodyYaw();
  1172. ResoSetup::storedsimtime = pEntity->GetSimulationTime();
  1173. ResoSetup::storeddelta[pEntity->GetIndex()] = pEntity->GetEyeAnglesXY()->y;
  1174. ResoSetup::storedlby[pEntity->GetIndex()] = pEntity->GetLowerBodyYaw();
  1175. }
  1176.  
  1177. void ResoSetup::anglestore(IClientEntity * pEntity)
  1178. {
  1179. ResoSetup::badangle[pEntity->GetIndex()] = pEntity->GetLowerBodyYaw();
  1180.  
  1181. }
  1182.  
  1183. void ResoSetup::StoreExtra(IClientEntity * pEntity)
  1184. {
  1185. ResoSetup::storedpanic[pEntity->GetIndex()] = pEntity->GetLowerBodyYaw();
  1186. ResoSetup::panicangle[pEntity->GetIndex()] = pEntity->GetEyeAnglesXY()->y - 30;
  1187. ResoSetup::storedhp[pEntity->GetIndex()] = pEntity->GetHealth();
  1188. }
  1189.  
  1190. void ResoSetup::CM(IClientEntity* pEntity)
  1191. {
  1192. for (int x = 1; x < Interfaces::Engine->GetMaxClients(); x++)
  1193. {
  1194.  
  1195. pEntity = (IClientEntity*)Interfaces::EntList->GetClientEntity(x);
  1196.  
  1197. if (!pEntity
  1198. || pEntity == hackManager.pLocal()
  1199. || pEntity->IsDormant()
  1200. || !pEntity->IsAlive())
  1201. continue;
  1202.  
  1203. ResoSetup::StoreThings(pEntity);
  1204. }
  1205. }
  1206.  
  1207. void ResoSetup::FSN(IClientEntity* pEntity, ClientFrameStage_t stage)
  1208. {
  1209. if (stage == ClientFrameStage_t::FRAME_NET_UPDATE_POSTDATAUPDATE_START)
  1210. {
  1211. for (int i = 1; i < Interfaces::Engine->GetMaxClients(); i++)
  1212. {
  1213.  
  1214. pEntity = (IClientEntity*)Interfaces::EntList->GetClientEntity(i);
  1215.  
  1216. if (!pEntity
  1217. || pEntity == hackManager.pLocal()
  1218. || pEntity->IsDormant()
  1219. || !pEntity->IsAlive())
  1220. continue;
  1221.  
  1222. ResoSetup::Resolve(pEntity, stage);
  1223. }
  1224. }
  1225. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement