TATATATRATATATA

patch13

Mar 11th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.80 KB | None | 0 0
  1. --- This script will update head models in your current save.
  2. --- Head models added in Patches 5,6,7,8,9,10,11,12,13
  3.  
  4. --- HOW TO USE:
  5. --- https://i.imgur.com/xZMqzTc.gifv
  6. --- 1. Open Cheat table as usuall and enter your career.
  7. --- 2. In Cheat Engine click on "Memory View" button.
  8. --- 3. Press "CTRL + L" to open lua engine
  9. --- 4. Then press "CTRL + O" and open this script
  10. --- 5. Click on 'Execute' button to execute script and wait for 'done' message box.
  11.  
  12. --- AUTHOR: ARANAKTU
  13.  
  14. require 'lua/GUI/forms/playerseditorform/consts';
  15. require 'lua/consts';
  16.  
  17. local comp_desc = get_components_description_player_edit()
  18.  
  19. -- Players with updated head models
  20. -- http://soccergaming.com/index.php?threads/list-of-all-new-faces-added-in-title-update-6-tutorial-to-enable-faces.6467431/
  21. local new_headmodels = {
  22. 53050,
  23. 116308,
  24. 140293,
  25. 152997,
  26. 156519,
  27. 156616,
  28. 163050,
  29. 164491,
  30. 167665,
  31. 167943,
  32. 169078,
  33. 169607,
  34. 170719,
  35. 171378,
  36. 172143,
  37. 173434,
  38. 176930,
  39. 177896,
  40. 177937,
  41. 178566,
  42. 179605,
  43. 179731,
  44. 180818,
  45. 182837,
  46. 182879,
  47. 183569,
  48. 183900,
  49. 184274,
  50. 186116,
  51. 186143,
  52. 188154,
  53. 188289,
  54. 189099,
  55. 189177,
  56. 189357,
  57. 189388,
  58. 190362,
  59. 190752,
  60. 191488,
  61. 192317,
  62. 192449,
  63. 192546,
  64. 193141,
  65. 193849,
  66. 196069,
  67. 198904,
  68. 199151,
  69. 199383,
  70. 199827,
  71. 200746,
  72. 200807,
  73. 200855,
  74. 201155,
  75. 201368,
  76. 201519,
  77. 201953,
  78. 202017,
  79. 202541,
  80. 204131,
  81. 204193,
  82. 204210,
  83. 204738,
  84. 204936,
  85. 205941,
  86. 206152,
  87. 206517,
  88. 207439,
  89. 207763,
  90. 207863,
  91. 207935,
  92. 208268,
  93. 208808,
  94. 209660,
  95. 209744,
  96. 210828,
  97. 210881,
  98. 210985,
  99. 211382,
  100. 212214,
  101. 212300,
  102. 212715,
  103. 212878,
  104. 213260,
  105. 213591,
  106. 213619,
  107. 213620,
  108. 214131,
  109. 214153,
  110. 214378,
  111. 214404,
  112. 214659,
  113. 214770,
  114. 214781,
  115. 214971,
  116. 214989,
  117. 215079,
  118. 215135,
  119. 215162,
  120. 216054,
  121. 216433,
  122. 217710,
  123. 218208,
  124. 218464,
  125. 218731,
  126. 219455,
  127. 219754,
  128. 219797,
  129. 219806,
  130. 219841,
  131. 219914,
  132. 220197,
  133. 220597,
  134. 220702,
  135. 221363,
  136. 221564,
  137. 221982,
  138. 222319,
  139. 222358,
  140. 222404,
  141. 222994,
  142. 223113,
  143. 223243,
  144. 223885,
  145. 224065,
  146. 224367,
  147. 225028,
  148. 225236,
  149. 225252,
  150. 225356,
  151. 225423,
  152. 225435,
  153. 225647,
  154. 225659,
  155. 225748,
  156. 225793,
  157. 225878,
  158. 226078,
  159. 226110,
  160. 226162,
  161. 226215,
  162. 226265,
  163. 226501,
  164. 226646,
  165. 226753,
  166. 226783,
  167. 226797,
  168. 226798,
  169. 226911,
  170. 226912,
  171. 226913,
  172. 226915,
  173. 226917,
  174. 226922,
  175. 226923,
  176. 226927,
  177. 226929,
  178. 227145,
  179. 227222,
  180. 227274,
  181. 227394,
  182. 227678,
  183. 228251,
  184. 228618,
  185. 228682,
  186. 228687,
  187. 229582,
  188. 229749,
  189. 230598,
  190. 230613,
  191. 230829,
  192. 231292,
  193. 231478,
  194. 231507,
  195. 231743,
  196. 231979,
  197. 232363,
  198. 232381,
  199. 232425,
  200. 232757,
  201. 232758,
  202. 234221,
  203. 234236,
  204. 234906,
  205. 235123,
  206. 235569,
  207. 235889,
  208. 235926,
  209. 236401,
  210. 236441,
  211. 237183,
  212. 237242,
  213. 237388,
  214. 237604,
  215. 238067,
  216. 238114,
  217. 239097,
  218. 239322,
  219. 239380,
  220. 239454,
  221. 239461,
  222. 239681,
  223. 239838,
  224. 239961,
  225. 240060,
  226. 241376,
  227. 241461,
  228. 241711,
  229. 242437,
  230. 242444,
  231. 242479,
  232. 242491,
  233. 243249,
  234. 243384,
  235. 243386,
  236. 243812,
  237. 244288,
  238. 244363,
  239. 244558,
  240. 244987,
  241. 245061,
  242. 245237,
  243. 245725,
  244. 246104,
  245. 246861,
  246. 247393,
  247. 249119,
  248. 249179,
  249. 249224,
  250. 251804,
  251. 252238,
  252. 252454,
  253. 252460,
  254. 252466,
  255. 23174,
  256. 169321,
  257. 187208,
  258. 192922,
  259. 210374,
  260. 210653,
  261. 213444,
  262. 214718,
  263. 220945,
  264. 222645,
  265. 224151,
  266. 225722,
  267. 228729,
  268. 229699,
  269. 233493,
  270. 235732,
  271. 242118,
  272. 244835,
  273. 162409,
  274. 190720
  275. }
  276.  
  277. function has_new(playerid)
  278. for j=1, #new_headmodels do
  279. if (new_headmodels[j] == playerid) then
  280. table.remove(new_headmodels, j)
  281. return true
  282. end
  283. end
  284. return false
  285. end
  286.  
  287. -- players table
  288. local sizeOf = 112 -- Size of one record in players database table (0x64)
  289.  
  290. -- iterate over all players in 'players' database table
  291. local i = 0
  292. local current_playerid = 0
  293. local updated_players = 0
  294. while true do
  295. local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID'])
  296. 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))
  297. if current_playerid == 0 then
  298. break
  299. end
  300.  
  301. writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf)
  302.  
  303. if has_new(current_playerid) then
  304. if (
  305. tonumber(ADDR_LIST.getMemoryRecordByID(comp_desc['HasHighQualityHeadCB']['id']).Value) ~= 1 or
  306. tonumber(ADDR_LIST.getMemoryRecordByID(comp_desc['HeadClassCodeEdit']['id']).Value) ~= 0 or
  307. tonumber(ADDR_LIST.getMemoryRecordByID(comp_desc['HeadAssetIDEdit']['id']).Value) ~= current_playerid
  308. ) then
  309. updated_players = updated_players + 1
  310. ADDR_LIST.getMemoryRecordByID(comp_desc['HasHighQualityHeadCB']['id']).Value = 1
  311. ADDR_LIST.getMemoryRecordByID(comp_desc['HeadClassCodeEdit']['id']).Value = 0
  312. ADDR_LIST.getMemoryRecordByID(comp_desc['HeadAssetIDEdit']['id']).Value = current_playerid
  313. end
  314. end
  315.  
  316. i = i + 1
  317. if i >= 26000 then
  318. break
  319. end
  320. end
  321.  
  322. showMessage(string.format("Done\nUpdated head models: %d", updated_players))
Add Comment
Please, Sign In to add comment