TATATATRATATATA

Untitled

May 14th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. --- HOW TO USE:
  2. --- https://i.imgur.com/xZMqzTc.gifv
  3. --- 1. Open Cheat table as usuall and enter your career.
  4. --- 2. In Cheat Engine click on "Memory View" button.
  5. --- 3. Press "CTRL + L" to open lua engine
  6. --- 4. Then press "CTRL + O" and open this script
  7. --- 5. Click on 'Execute' button to execute script and wait for 'done' message box.
  8.  
  9. --- AUTHOR: ARANAKTU
  10.  
  11. require 'lua/GUI/forms/playerseditorform/consts';
  12.  
  13. local comp_desc = get_components_description_player_edit()
  14.  
  15. -- list of attributes
  16. local attributes_to_randomize = {
  17. "Potential"
  18. }
  19.  
  20. -- players table
  21. local sizeOf = 100 -- Size of one record in players database table (0x64)
  22.  
  23. -- iterate over all players in 'players' database table
  24. local i = 0
  25. local current_playerid = 0
  26. while true do
  27. local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID'])
  28. 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))
  29. if current_playerid == 0 then
  30. break
  31. end
  32.  
  33. writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf)
  34.  
  35. -- get ovr_formula for player primiary position
  36. local ovr_formula = deepcopy(OVR_FORMULA[ADDR_LIST.getMemoryRecordByID(comp_desc['PreferredPosition1CB']['id']).Value])
  37.  
  38. -- Randomize Attributes
  39. local new_ovr = 0
  40. for j=1, #attributes_to_randomize do
  41. local new_attr_val = 98
  42. local attr_name = attributes_to_randomize[j] .. 'Edit'
  43. for attr, perc in pairs(ovr_formula) do
  44. if attr == attr_name then
  45. new_ovr = new_ovr + (new_attr_val * perc)
  46. end
  47. end
  48. ovr_formula[attr_name] = nil
  49.  
  50. ADDR_LIST.getMemoryRecordByID(comp_desc[attr_name]['id']).Value = new_attr_val
  51. end
  52.  
  53.  
  54. i = i + 1
  55. end
  56.  
  57. showMessage("Done")
Add Comment
Please, Sign In to add comment