Advertisement
Guest User

Untitled

a guest
May 24th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. void Telekill()
  2. {
  3. auto ros_base = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
  4. auto Ros_Client = (ClientApper*)(ros_base + OFFSET_CLIENT);
  5. auto mListItem = Ros_Client->m_pFirst->m_pStart;
  6. bool first = true;
  7. for (;;)
  8. {
  9. if (!first) mListItem = mListItem->m_pNext;
  10. first = false;
  11. if (mListItem == Ros_Client->m_pFirst->m_pEnd)
  12. break;
  13. auto entity_addy = (DWORD)(mListItem->m_pEntity ^ mListItem->m_EntityKey->Val);
  14. auto curEntity = (CEntity*)entity_addy;
  15.  
  16. DWORD MyEntity = (DWORD)(ros_base + OFFSET_LOCAL);
  17. D3DXVECTOR3 MyPosition;
  18. if ((DWORD)curEntity == MyEntity) {
  19. MyPosition = GetDecryptedPos(curEntity);
  20. D3DXVECTOR3 EnemyPosDec;
  21. CPlayerBase* pBase;
  22. EnemyPosDec = pBase->GetDecryptedEnemyPos(curEntity);
  23.  
  24. D3DXVECTOR3 EnemyPosEnc;
  25.  
  26. string pMeta_str(curEntity->m_pMeta->pName);
  27.  
  28. bool isPlayer = (std::string::npos != pMeta_str.find("Avatar"));
  29.  
  30. DWORD Hotkey = NULL;
  31. if (isPlayer || curEntity->m_Table->pTable->m_HpRow->HP< 0)
  32. {
  33. if (opt.teleport.hotkey == 1) Hotkey = VK_SHIFT;
  34. if (opt.teleport.tele || opt.teleport.hotkey || opt.teleport.fov || opt.teleport.target || opt.teleport.lock)
  35. {
  36. if (GetAsyncKeyState(opt.teleport.hotkey) & 1)
  37. {
  38. if (GetDistance(MyPosition, EnemyPosDec, 10) < 500)
  39. {
  40. EnemyPosEnc = GetEncryptedPosition(curEntity);
  41.  
  42. MyPosition.x = EnemyPosEnc.x;
  43. MyPosition.y = EnemyPosEnc.y;
  44. MyPosition.z = EnemyPosEnc.z;
  45.  
  46. }
  47. }
  48. }
  49. }
  50. }
  51. }
  52. }
  53.  
  54. void Telekill()
  55. {
  56. auto Module = reinterpret_cast<uintptr_t>(GetModuleHandle("ros.exe"));
  57. int World = *(int*)(Module + 0x20D8D08 + 0x410);
  58. int Visible = *(int*)(World + 0x270);
  59. int Skeleton = *(int*)(World + 0x288);
  60. for (int i = 0; i < Visible; i += 4)
  61. {
  62. int Model = Memory::ReadMemory<int>(Skeleton + i);
  63. D3DXMATRIX m_Position = Memory::ReadMemory<D3DXMATRIX>(Model + 0x3B0);
  64. Vector3 EnemyPos;
  65. EnemyPos.x = m_Position[12];
  66. EnemyPos.y = m_Position[13];
  67. EnemyPos.z = m_Position[14];
  68.  
  69. int m_pAnimator = Memory::ReadMemory<int>(Model + 0x328);
  70. string m_pModelName = Memory::ReadString(Memory::ReadMemory<int>(m_pAnimator + 0x528), 16);
  71. string str = m_pModelName;
  72. bool isPlayer = findnew(str, "character");
  73.  
  74. if (GetAsyncKeyState(VK_SHIFT) & 1)
  75. {
  76. if (isPlayer)
  77. {
  78. if (*(DWORD*)(*(DWORD*)(OFFSET_LOCAL + Module) + 0x10)); *(DWORD*)(*(DWORD*)(OFFSET_LOCAL + Module) + 0x10) = 0;
  79. if (*(DWORD*)(*(DWORD*)(OFFSET_LOCAL + Module) + 0x18)); *(DWORD*)(*(DWORD*)(OFFSET_LOCAL + Module) + 0x18) = 0;
  80. if (*(DWORD*)(*(DWORD*)(OFFSET_LOCAL + Module) + 0x20)); *(DWORD*)(*(DWORD*)(OFFSET_LOCAL + Module) + 0x20) = 0;
  81.  
  82. if (EnemyPos.x != 0) *(float*)(*(DWORD*)(OFFSET_LOCAL + Module) + 0x10) = EnemyPos.x - 10.0f;
  83. if (EnemyPos.y != 0) *(float*)(*(DWORD*)(OFFSET_LOCAL + Module) + 0x18) = EnemyPos.x - 7.0f;
  84. if (EnemyPos.z != 0) *(float*)(*(DWORD*)(OFFSET_LOCAL + Module) + 0x20) = EnemyPos.x - 10.0f;
  85. }
  86. }
  87. }
  88. }
  89.  
  90. //my call
  91. void DoTelekill(IDirect3DDevice9* pDevice)
  92. {
  93. __try {
  94. Telekill();
  95. }
  96. __except (EXCEPTION_EXECUTE_HANDLER) {}
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement