Ajuda Visual Basic

hellsbad

Membro
Registrado
Julho 4, 2017
Mensagens
1
Pontos de reações
0
Idade
29
Como faço pra criar um arquivo executável?
Eu tenho isso aqui:
  1. Client = 0x1ED7418,
  2. Render = 0x1E82B68,
  3. SceneContext = 0x1CD54D0,
  4. LocalPlayer = 0x1ED77D4,
Big thanks to @N_FIDANzza

Reading entity

Code:
  1. private List<Entity> ReadAllEntity()
  2. {
  3. var EntityList = new List<Entity>();
  4. //Getting Game Object;
  5. var GameObject = GlobalUtil.MemUtil.ReadIntPtr((GlobalUtil.ProcessBaseAdress + (int)GameOffsets.Client)) +
  6. (int) GameOffsets.m_ppObjects;
  7. GameObject = GlobalUtil.MemUtil.ReadIntPtr(GameObject + 0x0);
  8. var pCurrentItem = GlobalUtil.MemUtil.ReadIntPtr(GlobalUtil.MemUtil.ReadIntPtr(GameObject+0x0)); // Point to the first object
  9. //Skip the first two object in the loop
  10. pCurrentItem = GlobalUtil.MemUtil.ReadIntPtr(pCurrentItem + 0x0);
  11. pCurrentItem = GlobalUtil.MemUtil.ReadIntPtr(pCurrentItem + 0x0);
  12. var End = GlobalUtil.MemUtil.ReadIntPtr(GameObject + 0x4); //aponta para o primeiro objeto, se for o mesmo chegamos ao fim.
  13. var i = 0;
  14. do
  15. {
  16. var Entity = GlobalUtil.MemUtil.ReadIntPtr(pCurrentItem + 0xC);
  17. var m_pMeta = GlobalUtil.MemUtil.ReadIntPtr(Entity + 0x4);
  18. var EntityType = GlobalUtil.MemUtil.ReadString(GlobalUtil.MemUtil.ReadIntPtr(m_pMeta + 0xC), 12);
  19. var Type = GlobalUtil.MemUtil.ReadInt32(Entity);
  20. var ObjectId = GlobalUtil.MemUtil.ReadInt32(Entity + 0xC);
  21. var Position = GlobalUtil.MemUtil.ReadVector3(Entity + 0x10);
  22. var Yaw = GlobalUtil.MemUtil.ReadFloat(Entity + 0x38);
  23. var Pitch = GlobalUtil.MemUtil.ReadFloat(Entity + 0x3C);
  24. var isPlayer = EntityType.Contains("Avatar") || EntityType.Contains("Robot");
  25. var isVehicle = EntityType.Contains("Land");
  26. EntityList.Add(new Entity(){PlayerName = "None", TypeName = EntityType, Type = Type, ObjectId = ObjectId, isPlayer = isPlayer, Coordinates = Position, Yaw = Yaw, Pitch = Pitch, isVehicle = isVehicle });
  27. pCurrentItem = GlobalUtil.MemUtil.ReadIntPtr(pCurrentItem + 0x0);
  28. i++;
  29. } while (pCurrentItem != End);
  30. return EntityList;
  31. }

WorldToScreen

Code:
  1. public static bool WorldToScreen(Vector3 pos, out Vector2 screen, int windowWidth, int windowHeight)
  2. {
  3. screen = new Vector2();
  4. GlobalUtil.MemUtil.ReadViewMatrix(GlobalUtil.MemUtil.ReadIntPtr(GlobalUtil.MemUtil.ReadIntPtr(GlobalUtil.ProcessBaseAdress + (int)GameOffsets.SceneContext)+0x4)+0xC4,out float[] Matriix);
  5. //Matrix-vector Product, multiplying world(eye) coordinates by projection matrix = clipCoords
  6. Vector4 clipCoords;
  7. clipCoords.X = pos.X * matrix[0] + pos.Y * matrix[4] + pos.Z * matrix[8] + matrix[12];
  8. clipCoords.Y = pos.X * matrix[1] + pos.Y * matrix[5] + pos.Z * matrix[9] + matrix[13];
  9. clipCoords.Z = pos.X * matrix[2] + pos.Y * matrix[6] + pos.Z * matrix[10] + matrix[14];
  10. clipCoords.W = pos.X * matrix[3] + pos.Y * matrix[7] + pos.Z * matrix[11] + matrix[15];
  11. if (clipCoords.W < 0.1f)
  12. return false;
  13. //perspective division, dividing by clip.W = Normalized Device Coordinates
  14. Vector3 NDC;
  15. NDC.X = clipCoords.X / clipCoords.W;
  16. NDC.Y = clipCoords.Y / clipCoords.W;
  17. NDC.Z = clipCoords.Z / clipCoords.W;
  18. //Transform to window coordinates
  19. screen.X = (windowWidth / 2 * NDC.X) + (NDC.X + windowWidth / 2);
  20. screen.Y = -(windowHeight / 2 * NDC.Y) + (NDC.Y + windowHeight / 2);
  21. return true;
  22. }
 

Hoax

Velha Guarda
Ex-Staff
Registrado
Junho 2, 2017
Mensagens
608
Pontos de reações
416
Movido para a área correta.
 

Membros que estão visualizando este tópico (Total: 1, membros: 0, visitantes: 1)

Topo