TATATATRATATATA

fix blm

Jun 25th, 2020
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. --- This script will remove the Black Live Matters from player shirts
  2.  
  3. --- HOW TO USE:
  4. --- https://i.imgur.com/xZMqzTc.gifv
  5. --- 1. Open Cheat table as usuall and enter your career.
  6. --- 2. In Cheat Engine click on "Memory View" button.
  7. --- 3. Press "CTRL + L" to open lua engine
  8. --- 4. Then press "CTRL + O" and open this script
  9. --- 5. Click on 'Execute' button to execute script and wait for 'done' message box.
  10.  
  11. --- AUTHOR: ARANAKTU
  12.  
  13. require 'lua/GUI/forms/playerseditorform/consts';
  14. require 'lua/consts';
  15.  
  16. local comp_desc = get_components_description_player_edit()
  17.  
  18. -- Might be different in your save, change if needed.
  19. local BLM_nameid = 34009
  20.  
  21. -- players table
  22. local sizeOf = 112
  23.  
  24. -- iterate over all players in 'players' database table
  25. local i = 0
  26. local current_playerjerseynameid = 0
  27. local updated_players = 0
  28. while true do
  29. local playerjerseynameid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERJERSEYNAMEID'])
  30. current_playerjerseynameid = bAnd(bShr(readInteger(string.format('[%s]+%X', 'firstPlayerDataPtr', playerjerseynameid_record.getOffset(0)+(i*sizeOf))), playerjerseynameid_record.Binary.Startbit), (bShl(1, playerjerseynameid_record.Binary.Size) - 1))
  31.  
  32. if (current_playerjerseynameid == BLM_nameid) then
  33. writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf)
  34. local commonnameid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['COMMONNAMEID'])
  35. local current_commonnameid = bAnd(bShr(readInteger(string.format('[%s]+%X', 'firstPlayerDataPtr', commonnameid_record.getOffset(0)+(i*sizeOf))), commonnameid_record.Binary.Startbit), (bShl(1, commonnameid_record.Binary.Size) - 1))
  36.  
  37. if ( current_commonnameid > 0) then
  38. --- Set playernamejerseyid equal to commonnameid
  39. ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERJERSEYNAMEID']).Value = current_commonnameid
  40. else
  41. --- Set playernamejerseyid equal to lastnameid
  42. local lastnameid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['LASTNAMEID'])
  43. local current_lastnameid = bAnd(bShr(readInteger(string.format('[%s]+%X', 'firstPlayerDataPtr', lastnameid_record.getOffset(0)+(i*sizeOf))), lastnameid_record.Binary.Startbit), (bShl(1, lastnameid_record.Binary.Size) - 1))
  44. ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERJERSEYNAMEID']).Value = current_lastnameid
  45. end
  46. updated_players = updated_players + 1
  47. end
  48.  
  49. i = i + 1
  50. if i >= 26000 then
  51. break
  52. end
  53. end
  54.  
  55. showMessage(string.format("Done\nFixed %d players", updated_players))
Add Comment
Please, Sign In to add comment