Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'lua/GUI/forms/playerseditorform/consts';
- require 'lua/consts';
- local comp_desc = get_components_description_player_edit()
- -- players table
- local sizeOf = 112 -- Size of one record in players database table (0x64)
- -- iterate over all players in 'players' database table
- local i = 0
- local current_playerid = 0
- local new_bd = 0
- while true do
- local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID'])
- 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))
- if current_playerid == 0 then
- break
- end
- writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf)
- new_bd = tonumber(ADDR_LIST.getMemoryRecordByID(comp_desc['AgeEdit']['id']).Value) + 1095
- ADDR_LIST.getMemoryRecordByID(comp_desc['AgeEdit']['id']).Value = new_bd
- i = i + 1
- end
- showMessage("Done")
Add Comment
Please, Sign In to add comment