Advertisement
TATATATRATATATA

Untitled

Sep 28th, 2019
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. --- This script will edit all players in your Career Mode save.
  2. --- All players 17 yo
  3.  
  4. --- Because it's iterating over around 20k records it can take a while
  5. --- on my PC it needs around 15 seconds
  6.  
  7. --- HOW TO USE:
  8. --- 1. While in game main menu open Live Editor
  9. --- 2. Activate "FIFA Database Tables" script
  10. --- 3. Load your career mode save.
  11. --- 4. In Cheat Engine click on "Memory View" button.
  12. --- 5. Press "CTRL + L" to open lua engine
  13. --- 6. Then press "CTRL + O" and open this script
  14. --- 7. Click on 'Execute' button to execute script and wait for 'done' message box.
  15.  
  16. --- AUTHOR: ARANAKTU
  17.  
  18. require 'lua/consts';
  19.  
  20. start_time = os.time()
  21.  
  22. -- players table
  23. local sizeOf = 112 -- Size of one record in players database table (0x70)
  24.  
  25. -- iterate over all players in 'players' database table
  26. local i = 0
  27. local current_playerid = 0
  28.  
  29. while true do
  30. local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID'])
  31. local current_playerid = bAnd(bShr(readInteger(string.format('[%s]+%X', 'firstPlayerDataPtr', playerid_record.getOffset(0)+(i*sizeOf))), playerid_record.Binary.Startbit), (bShl(1, playerid_record.Binary.Size) - 1))
  32. if current_playerid == 0 then
  33. break
  34. end
  35.  
  36. writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf)
  37.  
  38.  
  39. --- 17 yo
  40. --- 8 May 2002
  41. --- https://www.timeanddate.com/date/durationresult.html?y1=1582&m1=10&d1=15&y2=2002&m2=5&d2=8&ti=on
  42. ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['BIRTHDATE']).Value = 153243
  43.  
  44. i = i + 1
  45. if i >= 26000 then
  46. break
  47. end
  48. end
  49. elapsed_time = os.difftime(os.time(),start_time)
  50. print(elapsed_time)
  51. showMessage("Done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement