TATATATRATATATA

Untitled

Apr 8th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. require 'lua/GUI/forms/playerseditorform/consts';
  2. require 'lua/consts';
  3.  
  4. local comp_desc = get_components_description_player_edit()
  5.  
  6. -- players table
  7. local sizeOf = 112 -- Size of one record in players database table (0x64)
  8.  
  9. -- iterate over all players in 'players' database table
  10. local i = 0
  11. local current_playerid = 0
  12. local new_bd = 0
  13. while true do
  14. local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID'])
  15. 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))
  16. if current_playerid == 0 then
  17. break
  18. end
  19.  
  20. writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf)
  21. new_bd = tonumber(ADDR_LIST.getMemoryRecordByID(comp_desc['AgeEdit']['id']).Value) + 1095
  22. ADDR_LIST.getMemoryRecordByID(comp_desc['AgeEdit']['id']).Value = new_bd
  23.  
  24. i = i + 1
  25. end
  26.  
  27. showMessage("Done")
Add Comment
Please, Sign In to add comment