stjernan

mcSwag

Oct 6th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. G_ClientConnection = 0xEC4628
  2. CurMgrOffset = 0x462C
  3.  
  4. FirstObject = 0xCC
  5. NextObject = 0x34
  6. LocalGuid = 0xE8
  7.  
  8. TlsGuidOffset = 0x28; CurObject+TlsGuidoffset will return the GUID of desired object, can be used with CTM
  9.  
  10. //Only need to be read every screenload
  11. ObjectMgr = Read(read(BaseModuleAdress + G_ClientConnection) + CurMgrOffset)
  12.  
  13.  
  14. //With this you can read guid from BaseModuleAdress + PlayerGuid to get its object
  15.  
  16. function GetObjectFromGuid(uint64 guid){
  17. CurObject = Read(ObjectMgr + FirstObject)
  18.  
  19. while (CurObject <> 0) {
  20.  
  21. ;//If we match a guid in our objectMgr we can return the object and use it for all sorts of stuff, everthing has an guid
  22. if guid == read(CurObject+TlsGuidOffset) {
  23. return curObject; // <--
  24. }
  25.  
  26. //Next object, always at the end of loop
  27. CurObject = read(curObject+NextObject)
  28.  
  29. }
  30. }
  31.  
  32.  
  33. PlayerGuid = Read<uint64>(ObjectMgr+LocalGuid)
  34. PlayerObject = GetObjectFromGuid(PlayerGuid)
  35.  
  36.  
  37. //Get coords from object (Player and npc coords)
  38.  
  39. x = 0x838
  40. y = x + 0x4
  41. z = x + 0x8
  42. r = x + 0x10
  43.  
  44. read<float>(PlayerObject+x)
  45. read<float>(PlayerObject+y)
  46. read<float>(PlayerObject+z)
  47.  
  48. If you use any other PlayerObject that will also work, as long the returned object is an type of 5 (Player and npc)
Advertisement
Add Comment
Please, Sign In to add comment