├── .gitignore ├── FIFA 19 - CM Cheat Table ├── lua │ ├── GUI │ │ ├── forms │ │ │ ├── mainform │ │ │ │ ├── consts.lua │ │ │ │ ├── helpers.lua │ │ │ │ └── events.lua │ │ │ ├── updateform │ │ │ │ ├── consts.lua │ │ │ │ ├── helpers.lua │ │ │ │ └── events.lua │ │ │ ├── matchscheduleeditorform │ │ │ │ ├── events.lua │ │ │ │ └── helpers.lua │ │ │ ├── settingsform │ │ │ │ ├── helpers.lua │ │ │ │ └── events.lua │ │ │ ├── matchfixingform │ │ │ │ ├── events.lua │ │ │ │ └── helpers.lua │ │ │ ├── transferplayersform │ │ │ │ ├── events.lua │ │ │ │ └── helpers.lua │ │ │ └── playerseditorform │ │ │ │ ├── consts.lua │ │ │ │ └── events.lua │ │ ├── helpers.lua │ │ └── consts.lua │ ├── consts.lua │ ├── loc.lua │ ├── fut_requests.lua │ ├── commons.lua │ ├── requirements │ │ ├── LIP.lua │ │ └── json.lua │ └── main.lua ├── logs │ └── log_1970-01-01.txt ├── offsets.ini ├── tmp │ ├── crest_notfound.png │ └── heads_notfound.png ├── cache │ ├── crest │ │ └── notfound.png │ └── heads │ │ └── notfound.png ├── create_dirs.bat ├── LICENSE └── users lua scripts │ ├── is_retiring=0.lua │ ├── medium_socklenghtcode.lua │ ├── untuck_shirts.lua │ ├── make everyone 16 (or any other age).lua │ ├── randomize.lua │ └── randomize_shoe_models.lua ├── changelog.txt └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | README.txt -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/mainform/consts.lua: -------------------------------------------------------------------------------- 1 | # CONSTS -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/updateform/consts.lua: -------------------------------------------------------------------------------- 1 | # CONSTS -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/logs/log_1970-01-01.txt: -------------------------------------------------------------------------------- 1 | [ INFO ] 02/22/19 18:47:41 - New session started 2 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/offsets.ini: -------------------------------------------------------------------------------- 1 | [offsets] 2 | AOB_DatabaseRead=DE056A0 3 | AOB_codeGameDB=19DC274 4 | AOB_screenID=1391618 5 | 6 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/tmp/crest_notfound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAranaktu/FIFA-19---Career-Mode-Cheat-Table/HEAD/FIFA 19 - CM Cheat Table/tmp/crest_notfound.png -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/tmp/heads_notfound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAranaktu/FIFA-19---Career-Mode-Cheat-Table/HEAD/FIFA 19 - CM Cheat Table/tmp/heads_notfound.png -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/cache/crest/notfound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAranaktu/FIFA-19---Career-Mode-Cheat-Table/HEAD/FIFA 19 - CM Cheat Table/cache/crest/notfound.png -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/cache/heads/notfound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAranaktu/FIFA-19---Career-Mode-Cheat-Table/HEAD/FIFA 19 - CM Cheat Table/cache/heads/notfound.png -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/create_dirs.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | ECHO Creating Cheat Table folder in Documents\FIFA 19 3 | SET fifa_docs = %HOMEDRIVE%\Users\%USERNAME%\Documents\FIFA 19\ 4 | SET ct_path=%fifa_docs%Cheat Table\ 5 | mkdir "%ct_path%data\" 6 | ECHO A | xcopy cache "%ct_path%cache" /E /i -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/consts.lua: -------------------------------------------------------------------------------- 1 | -- FIFA Edition 2 | FIFA = "19" 3 | 4 | -- PROCESS BASE ADDRESS - Updated after attach 5 | BASE_ADDRESS = nil 6 | 7 | -- Size of FIFA module 8 | FIFA_MODULE_SIZE = nil 9 | 10 | -- CHEAT TABLE ADDRESS LIST 11 | ADDR_LIST = getAddressList() 12 | 13 | -- SOME CHEAT TABLE MEMORY RECORDS 14 | CT_MEMORY_RECORDS = { 15 | HEADTYPECODE = 37, 16 | BIRTHDATE = 45, 17 | PLAYERID = 93, 18 | HAIRCOLORCODE = 2080, 19 | TEAMID = 2769, 20 | GUI_SCRIPT = 2892, 21 | CURRDATE = 2908, 22 | SCHEDULEEDITOR_SCRIPT = 2974, 23 | INJURY_TYPE = 2459, 24 | MATCHFIXING_SCRIPT = 3511 25 | } 26 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Aranaktu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/users lua scripts/is_retiring=0.lua: -------------------------------------------------------------------------------- 1 | --- This script sets is_retiring on 0 for all players. 2 | --- It may take a few mins. Cheat Engine will stop responding and it's normal behaviour. Wait until you get 'Done' message. 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 | 16 | local comp_desc = get_components_description_player_edit() 17 | 18 | -- players table 19 | local sizeOf = 100 -- Size of one record in players database table (0x64) 20 | 21 | -- iterate over all players in 'players' database table 22 | local i = 0 23 | local current_playerid = 0 24 | while true do 25 | local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']) 26 | 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)) 27 | if current_playerid == 0 then 28 | break 29 | end 30 | 31 | writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf) 32 | ADDR_LIST.getMemoryRecordByID(comp_desc['IsRetiringCB']['id']).Value = 0 33 | 34 | i = i + 1 35 | end 36 | 37 | showMessage("Done") -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/users lua scripts/medium_socklenghtcode.lua: -------------------------------------------------------------------------------- 1 | --- This script change socks length on medium 2 | --- It may take a few mins. Cheat Engine will stop responding and it's normal behaviour. Wait until you get 'Done' message. 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 | 16 | local comp_desc = get_components_description_player_edit() 17 | 18 | -- players table 19 | local sizeOf = 100 -- Size of one record in players database table (0x64) 20 | 21 | -- iterate over all players in 'players' database table 22 | local i = 0 23 | local current_playerid = 0 24 | while true do 25 | local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']) 26 | 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)) 27 | if current_playerid == 0 then 28 | break 29 | end 30 | 31 | writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf) 32 | ADDR_LIST.getMemoryRecordByID(comp_desc['socklengthEdit']['id']).Value = 0 33 | 34 | i = i + 1 35 | end 36 | 37 | showMessage("Done") -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/users lua scripts/untuck_shirts.lua: -------------------------------------------------------------------------------- 1 | --- This script change jersey style code of all players. Means that all players will wear untucked shirts 2 | --- It may take a few mins. Cheat Engine will stop responding and it's normal behaviour. Wait until you get 'Done' message. 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 | 16 | local comp_desc = get_components_description_player_edit() 17 | 18 | -- players table 19 | local sizeOf = 100 -- Size of one record in players database table (0x64) 20 | 21 | -- iterate over all players in 'players' database table 22 | local i = 0 23 | local current_playerid = 0 24 | while true do 25 | local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']) 26 | 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)) 27 | if current_playerid == 0 then 28 | break 29 | end 30 | 31 | writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf) 32 | ADDR_LIST.getMemoryRecordByID(comp_desc['JerseyStyleEdit']['id']).Value = 1 33 | 34 | i = i + 1 35 | end 36 | 37 | showMessage("Done") -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/loc.lua: -------------------------------------------------------------------------------- 1 | require 'lua/commons'; 2 | 3 | function create_loc_file(lang) 4 | local scripts = getAddressList().getMemoryRecordByDescription('Scripts') -- Parent containing all scripts 5 | if scripts == nil then return end 6 | 7 | local path = string.format("loc/%s.csv", lang) 8 | local current_loc = {} 9 | if file_exists(path) then 10 | current_loc = load_loc_file(lang)[1] 11 | end 12 | local f = io.open(path, "w+") 13 | write_to_loc_file(scripts, f, {}, current_loc) 14 | io.close(f) 15 | print("GOTOWE") 16 | end 17 | 18 | function write_to_loc_file(record, f, keys, current_loc) 19 | local key = "" 20 | for i=0, record.Count-1 do 21 | key = record.Child[i].Description 22 | if current_loc[key] ~= nil then 23 | f:write(string.format("%s;%s", key, current_loc[key]), "\n") 24 | elseif keys[key] == nil then 25 | f:write(string.format("%s;%s", key, key), "\n") 26 | end 27 | keys[key] = key 28 | if record.Child[i].Count > 0 then 29 | write_to_loc_file(record.Child[i], f, keys, current_loc) 30 | end 31 | end 32 | end 33 | 34 | function load_loc_file(lang) 35 | local path = string.format("loc/%s.csv", lang) 36 | local loc = {} 37 | local reverse_loc = {} 38 | 39 | local splited_line = {} 40 | for line in io.lines(path) do 41 | splited_line = split(line, ";") 42 | loc[splited_line[1]] = splited_line[2] 43 | reverse_loc[splited_line[2]] = splited_line[1] 44 | end 45 | return {loc, reverse_loc} 46 | end 47 | 48 | create_loc_file('eng') 49 | loc = load_loc_file('eng')[1] 50 | print(loc['preferredposition4']) -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/matchscheduleeditorform/events.lua: -------------------------------------------------------------------------------- 1 | require 'lua/helpers'; 2 | require 'lua/GUI/consts'; 3 | require 'lua/GUI/helpers'; 4 | require 'lua/GUI/forms/matchscheduleeditorform/helpers' 5 | 6 | -- Make window dragable 7 | function MatchScheduleTopPanelMouseDown(sender, button, x, y) 8 | MatchScheduleEditorForm.dragNow() 9 | end 10 | 11 | -- EVENTS 12 | 13 | function MatchScheduleMinimizeClick(sender) 14 | MatchScheduleEditorForm.WindowState = "wsMinimized" 15 | end 16 | function MatchScheduleExitClick(sender) 17 | clear_match_containers() 18 | MatchScheduleEditorForm.close() 19 | MainWindowForm.show() 20 | end 21 | function MatchScheduleSyncImageClick(sender) 22 | clear_match_containers() 23 | create_match_containers() 24 | end 25 | function MatchScheduleSettingsClick(sender) 26 | SettingsForm.show() 27 | end 28 | 29 | function ScheduleEditorApplyChangesBtnClick(sender) 30 | apply_change_match_date() 31 | end 32 | function ScheduleEditorApplyChangesLabelClick(sender) 33 | apply_change_match_date() 34 | end 35 | 36 | function MatchScheduleFormClose(sender) 37 | destroy_hotkeys_schedule_edit() 38 | return caHide 39 | end 40 | 41 | function MatchScheduleFormShow(sender) 42 | if not ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['SCHEDULEEDITOR_SCRIPT']).Active then 43 | ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['SCHEDULEEDITOR_SCRIPT']).Active = true 44 | -- local txt = string.format( 45 | -- 'To use schedule editor you need to activate %s script first', 46 | -- ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['SCHEDULEEDITOR_SCRIPT']).Description 47 | -- ) 48 | -- do_log(txt, 'ERROR') 49 | -- MatchScheduleExitClick(sender) 50 | -- return 51 | end 52 | 53 | clear_match_containers() 54 | create_match_containers(games_in_current_month) 55 | -- Create Hotkeys 56 | create_hotkeys_schedule_edit() 57 | end -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/settingsform/helpers.lua: -------------------------------------------------------------------------------- 1 | function ActivateSection(index) 2 | local Panels = { 3 | 'GeneralSettingsPanel', 4 | 'PlayerEditorSettingsPanel', 5 | 'AutoActivationSettingsPanel', 6 | 'CTUpdatesSettingsPanel' 7 | } 8 | SettingsForm.SettingsSectionsListBox.setItemIndex(index) 9 | for i=1, #Panels do 10 | if index == i-1 then 11 | SettingsForm[Panels[i]].Visible = true 12 | else 13 | SettingsForm[Panels[i]].Visible = false 14 | end 15 | end 16 | end 17 | 18 | function FillScriptsTree(record, tn) 19 | local next_node = nil 20 | for i=0, record.Count-1 do 21 | if record.Child[i].Type == 0 or record.Child[i].Type == 11 then 22 | -- print(record.Child[i].Description) 23 | next_node = tn.add(record.Child[i].Description) 24 | next_node.Data = record.Child[i].ID 25 | if record.Child[i].Active then 26 | next_node.MultiSelected = true 27 | end 28 | else 29 | next_node = tn 30 | end 31 | if record.Child[i].Count > 0 then 32 | next_node.hasChildren = true 33 | if record.Child[i].Active then 34 | next_node.Expanded = true 35 | end 36 | FillScriptsTree(record.Child[i], next_node) 37 | end 38 | end 39 | end 40 | 41 | function save_changes_in_settingsform(new_cfg_data) 42 | CFG_DATA = new_cfg_data 43 | 44 | if new_cfg_data.directories.cache_dir ~= CACHE_DIR then 45 | local old_cache = string.gsub(CACHE_DIR, "/","\\"):sub(1,-2) 46 | local copy_cmd = string.format( 47 | 'xcopy /s "%s" "%s"', 48 | old_cache, 49 | string.gsub(new_cfg_data.directories.cache_dir, "/","\\"):sub(1,-2) 50 | ) 51 | 52 | execute_cmd(copy_cmd) 53 | delete_directory(old_cache) 54 | end 55 | 56 | save_cfg() 57 | end -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/fut_requests.lua: -------------------------------------------------------------------------------- 1 | json = require 'lua/requirements/json'; 2 | 3 | FUT_URLS = { 4 | card_bg = 'https://www.easports.com/fifa/ultimate-team/web-app/content/7D49A6B1-760B-4491-B10C-167FBC81D58A/2019/fut/items/images/backgrounds/itemCompanionBGs/large/cards_bg_e_1_', 5 | display = 'https://www.easports.com/fifa/ultimate-team/api/fut/display', 6 | player_search = 'https://www.easports.com/fifa/ultimate-team/api/fut/item?jsonParamObject=' 7 | } 8 | 9 | function encodeURI(str) 10 | if (str) then 11 | str = string.gsub (str, "\n", "\r\n") 12 | str = string.gsub (str, "([^%w ])", 13 | function (c) return string.format ("%%%02X", string.byte(c)) end) 14 | str = string.gsub (str, " ", "+") 15 | end 16 | return str 17 | end 18 | 19 | function fut_get_rarity_display() 20 | local r = getInternet() 21 | local request = FUT_URLS['display'] 22 | local reply = r.getURL(request) 23 | if reply == nil then 24 | do_log('No internet connection? No reply from: ' .. request, 'ERROR') 25 | return nil 26 | end 27 | 28 | local response = json.decode( 29 | reply 30 | ) 31 | r.destroy() 32 | 33 | return response 34 | end 35 | 36 | function fut_find_player(player_data, page) 37 | -- print(fut_find_player('ronaldo')['items'][1]['age']) 38 | if string.match(player_data, '[0-9]') then 39 | -- TODO player name from playerid 40 | end 41 | 42 | if page == nil then 43 | page = 1 44 | end 45 | 46 | local request = FUT_URLS['player_search'] .. encodeURI(string.format( 47 | '{"name":"%s", "page": "%d"}', 48 | player_data, page 49 | )) 50 | 51 | local r = getInternet() 52 | local reply = r.getURL(request) 53 | if reply == nil then 54 | do_log('No internet connection? No reply from: ' .. request, 'ERROR') 55 | return nil 56 | end 57 | 58 | local response = json.decode( 59 | reply 60 | ) 61 | r.destroy() 62 | 63 | return response 64 | end 65 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/updateform/helpers.lua: -------------------------------------------------------------------------------- 1 | function check_for_ct_update() 2 | if CFG_DATA.flags.check_for_update then 3 | local new_version_is_available = false 4 | local r = getInternet() 5 | 6 | local patrons_version = r.getURL("https://pastebin.com/raw/RUstCP9N") 7 | local free_version = r.getURL("https://pastebin.com/raw/fN0RXF7V") 8 | r.destroy() 9 | 10 | -- no internet? 11 | if (patrons_version == nil) or (free_version == nil) then 12 | do_log("CT Update check failed. No internet?", 'INFO') 13 | return false 14 | end 15 | 16 | do_log(string.format('Patrons ver - %s, free ver - %s', patrons_version, free_version)) 17 | 18 | local ipatronsver, _ = string.gsub( 19 | patrons_version, '%.', '' 20 | ) 21 | ipatronsver = tonumber(ipatronsver) 22 | 23 | local ifreever, _ = string.gsub( 24 | free_version, '%.', '' 25 | ) 26 | ifreever = tonumber(ifreever) 27 | 28 | local current_ver = get_ct_version() 29 | local icurver, _ = string.gsub( 30 | current_ver, '%.', '' 31 | ) 32 | icurver = tonumber(icurver) 33 | 34 | if CFG_DATA.flags.only_check_for_free_update then 35 | if CFG_DATA.other.ignore_update == free_version then 36 | return false 37 | end 38 | if ifreever > icurver then 39 | return { 40 | current_ver = current_ver, 41 | patrons_version = patrons_version, 42 | free_version = free_version, 43 | free_update = ifreever > icurver, 44 | patron_update = ipatronsver > icurver 45 | } 46 | end 47 | else 48 | if (ifreever > icurver) or (ipatronsver > icurver) then 49 | if CFG_DATA.other.ignore_update == patrons_version then 50 | return false 51 | end 52 | 53 | return { 54 | current_ver = current_ver, 55 | patrons_version = patrons_version, 56 | free_version = free_version, 57 | free_update = ifreever > icurver, 58 | patron_update = ipatronsver > icurver 59 | } 60 | end 61 | end 62 | end 63 | 64 | return false 65 | end 66 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/users lua scripts/make everyone 16 (or any other age).lua: -------------------------------------------------------------------------------- 1 | --- This script will make every player in your career 16. Make a backup save before you apply this just to be safe. Join this discord for help: https://discord.gg/QFyHUxe 2 | --- It may take a few mins. Cheat Engine will stop responding and it's normal behaviour. Wait until you get 'Done' message. 3 | 4 | --- How do you change which age gets applied to everyone? Just edit "locale new_bd_value = 152991" change the value (152991) to whatever age you want. 5 | --- Age codes can be found here: https://www.fifermods.com/fifa-19-age-codes and an age calculator can be found here: https://www.timeanddate.com/date/durationresult.html?y1=1582&m1=10&d1=15&y2=2017&m2=9&d2=29&ti=on 6 | 7 | --- HOW TO USE: 8 | --- https://i.imgur.com/xZMqzTc.gifv 9 | --- 1. Open Cheat table as usuall and enter your career. 10 | --- 2. In Cheat Engine click on "Memory View" button. 11 | --- 3. Press "CTRL + L" to open lua engine 12 | --- 4. Then press "CTRL + O" and open this script 13 | --- 5. Click on 'Execute' button to execute script and wait for 'done' message box. It may take a few minutes, and the cheat engine will stop responding. 14 | 15 | --- AUTHOR: FIFER 16 | 17 | require 'lua/GUI/forms/playerseditorform/consts'; 18 | 19 | -- EDIT THIS. CHANGE 0 (or the value next to locale season =) TO THE SEASON YOU ARE IN (0 being first, 1 being second, etc) 20 | local season = 0 21 | 22 | local comp_desc = get_components_description_player_edit() 23 | 24 | -- players table 25 | local sizeOf = 100 -- Size of one record in players database table (0x64) 26 | 27 | -- iterate over all players in 'players' database table 28 | local i = 0 29 | local current_playerid = 0 30 | local new_bd_value = 152991 + (season * 365) 31 | while true do 32 | local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']) 33 | 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)) 34 | if current_playerid == 0 then 35 | break 36 | end 37 | 38 | writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf) 39 | ADDR_LIST.getMemoryRecordByID(comp_desc['AgeEdit']['id']).Value = new_bd_value 40 | 41 | i = i + 1 42 | end 43 | 44 | showMessage("Done. All players should now be 16.") -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/commons.lua: -------------------------------------------------------------------------------- 1 | function getProcessNameFromProcessID(iProcessID) 2 | if iProcessID < 1 then return 0 end 3 | local plist = createStringlist() 4 | getProcesslist(plist) 5 | for i=1, strings_getCount(plist)-1 do 6 | local process = strings_getString(plist, i) 7 | local offset = string.find(process,'-') 8 | local pid = tonumber('0x'..string.sub(process,1,offset-1)) 9 | local pname = string.sub(process,offset+1) 10 | if pid == iProcessID then return pname end 11 | end 12 | return 0 13 | end 14 | 15 | function getOpenedProcessName() 16 | local process = getOpenedProcessID() 17 | if process ~= 0 and getProcessIDFromProcessName(DefaultProccessName) == getOpenedProcessID() then 18 | if checkOpenedProcess(DefaultProccessName) == true then return DefaultProccessName end 19 | return 0 20 | end 21 | return getProcessNameFromProcessID(getOpenedProcessID()) 22 | end 23 | 24 | function deepcopy(orig) 25 | local orig_type = type(orig) 26 | local copy 27 | if orig_type == 'table' then 28 | copy = {} 29 | for orig_key, orig_value in next, orig, nil do 30 | copy[deepcopy(orig_key)] = deepcopy(orig_value) 31 | end 32 | setmetatable(copy, deepcopy(getmetatable(orig))) 33 | else -- number, string, boolean, etc 34 | copy = orig 35 | end 36 | return copy 37 | end 38 | 39 | function delete_directory(dir) 40 | execute_cmd(string.format('rmdir /s /q "%s"', dir)) 41 | end 42 | 43 | function getfield (f) 44 | local v = _G -- start with the table of globals 45 | if v == nil then 46 | do_log(string.format("No globals... field: %s", f), "ERROR") 47 | assert(false) 48 | end 49 | for w in string.gmatch(f, "[%w_]+") do 50 | v = v[w] 51 | end 52 | return v 53 | end 54 | 55 | function setfield (f, v) 56 | local t = _G -- start with the table of globals 57 | for w, d in string.gmatch(f, "([%w_]+)(.?)") do 58 | if d == "." then -- not last field? 59 | t[w] = t[w] or {} -- create table if absent 60 | t = t[w] -- get the table 61 | else -- last field 62 | t[w] = v -- do the assignment 63 | end 64 | end 65 | end 66 | 67 | function split(s, delimiter) 68 | result = {}; 69 | for match in (s..delimiter):gmatch("(.-)"..delimiter) do 70 | table.insert(result, match); 71 | end 72 | return result; 73 | end 74 | 75 | function toBits(num) 76 | local t={} -- will contain the bits 77 | local bits=32 78 | for b=bits,1,-1 do 79 | rest=math.floor((math.fmod(num,2))) 80 | t[b]=rest 81 | num=(num-rest)/2 82 | end 83 | return string.reverse(table.concat(t)) 84 | end 85 | 86 | function file_exists(name) 87 | local f=io.open(name,"r") 88 | if f~=nil then io.close(f) return true else return false end 89 | end -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/mainform/helpers.lua: -------------------------------------------------------------------------------- 1 | -- MAIN FORM HELPERS 2 | 3 | function set_ce_mem_scanner_state() 4 | -- Hide/show mem scanner 5 | local main_form = getMainForm() 6 | 7 | -- local min_h = 378 -- default one 8 | 9 | main_form.Panel5.Constraints.MinHeight = 65 10 | main_form.Panel5.Height = 65 11 | 12 | local comps = { 13 | "Label6", "foundcountlabel", "sbOpenProcess", "lblcompareToSavedScan", 14 | "ScanText", "lblScanType", "lblValueType", "SpeedButton2", "btnNewScan", 15 | "gbScanOptions", "Panel2", "Panel3", "Panel6", "Panel7", "Panel8", 16 | "btnNextScan", "ScanType", "VarType", "ProgressBar", "UndoScan", 17 | "scanvalue", "btnFirst", "btnNext", "LogoPanel", "pnlScanValueOptions", 18 | "Panel9", "Panel10", "Foundlist3", "SpeedButton3", "UndoScan" 19 | } 20 | 21 | for i=1, #comps do 22 | main_form[comps[i]].Visible = false 23 | end 24 | 25 | -- main_form.Label6.Visible = not main_form.Label6.Visible 26 | -- main_form.foundcountlabel.Visible = not main_form.foundcountlabel.Visible 27 | -- main_form.sbOpenProcess.Visible = not main_form.sbOpenProcess.Visible 28 | -- main_form.lblcompareToSavedScan.Visible = not main_form.lblcompareToSavedScan.Visible 29 | -- main_form.ScanText.Visible = main_form.ScanText.Visible 30 | 31 | -- main_form.lblScanType.Visible = state 32 | -- main_form.lblValueType.Visible = state 33 | -- main_form.SpeedButton2.Visible = state 34 | -- main_form.btnNewScan.Visible = state 35 | -- main_form.gbScanOptions.Visible = state 36 | -- main_form.Panel2.Visible = state 37 | -- main_form.Panel3.Visible = state 38 | -- main_form.Panel6.Visible = state 39 | -- main_form.Panel7.Visible = state 40 | -- main_form.Panel8.Visible = state 41 | -- main_form.btnNextScan.Visible = state 42 | -- main_form.ScanType.Visible = state 43 | -- main_form.VarType.Visible = state 44 | -- main_form.ProgressBar.Visible = state 45 | -- main_form.UndoScan.Visible = state 46 | -- main_form.scanvalue.Visible = state 47 | -- main_form.btnFirst.Visible = state 48 | -- main_form.btnNext.Visible = state 49 | -- main_form.LogoPanel.Visible = state 50 | -- main_form.pnlScanValueOptions.Visible = state 51 | -- main_form.Panel9.Visible = state 52 | -- main_form.Panel10.Visible = state 53 | 54 | -- main_form.Foundlist3.Visible = state 55 | -- main_form.SpeedButton3.Visible = state 56 | -- main_form.UndoScan.Visible = state 57 | end 58 | 59 | function update_status_label(text) 60 | MainWindowForm.LabelStatus.Caption = text 61 | end 62 | 63 | function deactive_all(record) 64 | for i=0, record.Count-1 do 65 | if record[i].Active then record[i].Active = false end 66 | if record.Child[i].Count > 0 then 67 | deactive_all(record.Child[i]) 68 | end 69 | end 70 | end 71 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/updateform/events.lua: -------------------------------------------------------------------------------- 1 | require 'lua/GUI/consts'; 2 | require 'lua/GUI/forms/updateform/consts'; 3 | require 'lua/GUI/forms/updateform/helpers'; 4 | -- UpdateForm Events 5 | 6 | -- Make window dragable 7 | function UpdateTopPanelMouseDown(sender, button, x, y) 8 | UpdateForm.dragNow() 9 | end 10 | 11 | -- onShow 12 | function UpdateFormShow(sender) 13 | MainWindowForm.hide() 14 | 15 | UpdateForm.BorderStyle = bsNone 16 | 17 | local current_ver = CHECK_CT_UPDATE['current_ver'] 18 | local patrons_version = CHECK_CT_UPDATE['patrons_version'] 19 | local free_version = CHECK_CT_UPDATE['free_version'] 20 | local free_update = CHECK_CT_UPDATE['free_update'] 21 | local patron_update = CHECK_CT_UPDATE['patron_update'] 22 | 23 | UpdateForm.curVerLabel.Caption = string.gsub( 24 | UpdateForm.curVerLabel.Caption, 'x.x.x', current_ver 25 | ) 26 | 27 | UpdateForm.patronVerLabel.Caption = string.gsub( 28 | UpdateForm.patronVerLabel.Caption, 'x.x.x', patrons_version 29 | ) 30 | 31 | UpdateForm.freeVerLabel.Caption = string.gsub( 32 | UpdateForm.freeVerLabel.Caption, 'x.x.x', free_version 33 | ) 34 | 35 | if free_update then 36 | UpdateForm.DownloadBtnFree.Visible = true 37 | end 38 | 39 | if patron_update then 40 | UpdateForm.DownloadBtnPatron.Visible = true 41 | end 42 | end 43 | 44 | -- Minimize 45 | function UpdateMinimizeClick(sender) 46 | UpdateForm.WindowState = "wsMinimized" 47 | end 48 | 49 | -- Close 50 | function UpdateExitClick(sender) 51 | UpdateForm.close() 52 | MainWindowForm.show() 53 | before_start() 54 | end 55 | 56 | function ChangelogLabelLinkClick(sender) 57 | shellExecute("https://raw.githubusercontent.com/xAranaktu/FIFA-19---Career-Mode-Cheat-Table/master/changelog.txt") 58 | end 59 | function ReleaseScheduleLabelLinkClick(sender) 60 | shellExecute("https://docs.google.com/spreadsheets/d/1EsYf4I4oDD6kw5jTGTFsv7rR1qL-Oausd1ZRbbSWm84/edit") 61 | end 62 | function DownloadBtnPatronClick(sender) 63 | shellExecute(string.format( 64 | "https://www.patreon.com/xAranaktu/posts?tag=v%s", CHECK_CT_UPDATE['patrons_version'] 65 | )) 66 | end 67 | function DownloadBtnFreeClick(sender) 68 | shellExecute(string.format( 69 | "https://www.patreon.com/xAranaktu/posts?tag=v%s", CHECK_CT_UPDATE['free_version'] 70 | )) 71 | end 72 | function DontShowAgainCBChange(sender) 73 | CFG_DATA.flags.check_for_update = sender.State == 0 74 | save_cfg() 75 | end 76 | function IgnoreBtnClick(sender) 77 | if CHECK_CT_UPDATE['free_update'] then 78 | CFG_DATA.other.ignore_update = CHECK_CT_UPDATE['free_version'] 79 | elseif CHECK_CT_UPDATE['patron_update'] then 80 | CFG_DATA.other.ignore_update = CHECK_CT_UPDATE['patrons_version'] 81 | end 82 | save_cfg() 83 | UpdateForm.close() 84 | MainWindowForm.show() 85 | before_start() 86 | end 87 | 88 | function NotNowBtnClick(sender) 89 | UpdateForm.close() 90 | MainWindowForm.show() 91 | before_start() 92 | end 93 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/requirements/LIP.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Copyright (c) 2012 Carreras Nicolas 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | --]] 22 | --- Lua INI Parser. 23 | -- It has never been that simple to use INI files with Lua. 24 | --@author Dynodzzo 25 | 26 | local LIP = {}; 27 | 28 | --- Returns a table containing all the data from the INI file. 29 | --@param fileName The name of the INI file to parse. [string] 30 | --@return The table containing all data from the INI file. [table] 31 | function LIP.load(fileName) 32 | assert(type(fileName) == 'string', 'Parameter "fileName" must be a string.'); 33 | local file = assert(io.open(fileName, 'r'), 'Error loading file : ' .. fileName); 34 | local data = {}; 35 | local section; 36 | for line in file:lines() do 37 | local tempSection = line:match('^%[([^%[%]]+)%]$'); 38 | if(tempSection)then 39 | section = tonumber(tempSection) and tonumber(tempSection) or tempSection; 40 | 41 | data[section] = data[section] or {}; 42 | end 43 | local param, value = line:match('^([%w|_]+)%s-=%s-(.+)$'); 44 | if(param and value ~= nil)then 45 | if section == 'offsets' then 46 | -- treat offsets as strings ffs! 47 | elseif(tonumber(value))then 48 | value = tonumber(value); 49 | elseif(value == 'true')then 50 | value = true; 51 | elseif(value == 'false')then 52 | value = false; 53 | end 54 | if(tonumber(param))then 55 | param = tonumber(param); 56 | end 57 | data[section][param] = value; 58 | end 59 | end 60 | file:close(); 61 | return data; 62 | end 63 | 64 | --- Saves all the data from a table to an INI file. 65 | --@param fileName The name of the INI file to fill. [string] 66 | --@param data The table containing all the data to store. [table] 67 | function LIP.save(fileName, data) 68 | assert(type(fileName) == 'string', 'Parameter "fileName" must be a string.'); 69 | assert(type(data) == 'table', 'Parameter "data" must be a table.'); 70 | local file = assert(io.open(fileName, 'w+b'), 'Error loading file :' .. fileName); 71 | local contents = ''; 72 | for section, param in pairs(data) do 73 | contents = contents .. ('[%s]\n'):format(section); 74 | for key, value in pairs(param) do 75 | contents = contents .. ('%s=%s\n'):format(key, tostring(value)); 76 | end 77 | contents = contents .. '\n'; 78 | end 79 | file:write(contents); 80 | file:close(); 81 | end 82 | 83 | return LIP; -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/main.lua: -------------------------------------------------------------------------------- 1 | -- requirements section 2 | 3 | -- Lua INI Parser 4 | -- https://github.com/Dynodzzo/Lua_INI_Parser 5 | LIP = require 'lua/requirements/LIP'; 6 | 7 | 8 | -- CONSTS 9 | require 'lua/consts'; 10 | 11 | -- Helper functions 12 | require 'lua/helpers'; 13 | 14 | -- GUI Events 15 | require 'lua/GUI/forms/mainform/events'; 16 | require 'lua/GUI/forms/playerseditorform/events'; 17 | require 'lua/GUI/forms/matchscheduleeditorform/events'; 18 | require 'lua/GUI/forms/settingsform/events'; 19 | require 'lua/GUI/forms/transferplayersform/events'; 20 | require 'lua/GUI/forms/updateform/events'; 21 | require 'lua/GUI/forms/matchfixingform/events'; 22 | 23 | -- Check Updates 24 | require 'lua/GUI/forms/updateform/helpers'; 25 | 26 | do_log('New session started', 'INFO') 27 | 28 | -- DEFAULT GLOBALS, better leave it as is 29 | HOMEDRIVE = os.getenv('HOMEDRIVE') or os.getenv('SystemDrive') or 'C:' 30 | 31 | FIFA_SETTINGS_DIR = string.format( 32 | "%s/Users/%s/Documents/FIFA %s/", 33 | HOMEDRIVE, os.getenv('USERNAME'), FIFA 34 | ); 35 | DATA_DIR = FIFA_SETTINGS_DIR .. 'Cheat Table/data/'; 36 | CONFIG_FILE_PATH = DATA_DIR .. 'config.ini'; --> 'path to config.ini file 37 | OFFSETS_FILE_PATH = DATA_DIR .. 'offsets.ini'; --> 'path to offsets.ini file 38 | FORMS = { 39 | MainWindowForm, PlayersEditorForm, MatchScheduleEditorForm, 40 | SettingsForm, TransferPlayersForm, UpdateForm, MatchFixingForm 41 | } 42 | SETTINGS_INDEX = 0 43 | -- DEFAULT GLOBALS, better leave it as is 44 | 45 | 46 | -- DEFAULT GLOBALS, may be overwritten in load_cfg() 47 | CACHE_DIR = FIFA_SETTINGS_DIR .. 'Cheat Table/cache/'; 48 | DEBUG_MODE = false 49 | 50 | -- end 51 | 52 | -- start code 53 | -- Activate "GUI" script 54 | MainWindowForm.LoadingPanel.Visible = true 55 | MainWindowForm.LoadingPanel.Caption = 'Loading data...' 56 | update_status_label("Waiting for FIFA 19...") 57 | ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['GUI_SCRIPT']).Active = true 58 | 59 | -- Check version of Cheat Table and Cheat Engine 60 | check_ce_version() 61 | check_ct_version() 62 | 63 | AOB_DATA = load_aobs() 64 | CFG_DATA = load_cfg() 65 | OFFSETS_DATA = load_offsets() 66 | 67 | CHECK_CT_UPDATE = check_for_ct_update() 68 | 69 | if CHECK_CT_UPDATE then 70 | function newMainOnShow(sender) 71 | pcall(DEFAULT_ON_SHOW, sender) 72 | UpdateForm.FormStyle = "fsSystemStayOnTop" 73 | end 74 | 75 | DEFAULT_ON_SHOW = getMainForm().OnShow 76 | getMainForm().OnShow = newMainOnShow 77 | UpdateForm.show() 78 | else 79 | before_start() 80 | end 81 | 82 | -- After attach 83 | function start() 84 | update_status_label("Attached to the game process.") 85 | -- "FIFA19.exe"+06267F98 86 | -- MM_TAB_HOME 87 | -- MM_TAB_PLAY 88 | -- MM_TAB_ONLINE 89 | local screenid_aob = tonumber(get_validated_address('AOB_screenID'), 16) 90 | SCREEN_ID_PTR = byteTableToDword(readBytes(screenid_aob+4, 4, true)) + screenid_aob + 8 91 | logScreenID() 92 | 93 | -- Don't activate too early 94 | do_log("Waiting for valid screen") 95 | -- if getScreenID() == nil then 96 | -- print("Cheat Engine is waiting until you enter main menu in game. It may stop responding until you do that. Please, don't report this problem. It's working that way on purpose") 97 | -- sleep(5000) 98 | -- end 99 | 100 | while getScreenID() == nil do 101 | ShowMessage('You are not in main menu in game. Enter there and close this window') 102 | sleep(1500) 103 | end 104 | logScreenID() 105 | 106 | -- update_offsets() 107 | save_cfg() 108 | autoactivate_scripts() 109 | 110 | for i = 1, #FORMS do 111 | local form = FORMS[i] 112 | -- remove borders 113 | form.BorderStyle = bsNone 114 | 115 | -- update opacity 116 | form.AlphaBlend = true 117 | form.AlphaBlendValue = CFG_DATA.gui.opacity or 255 118 | end 119 | MainFormRemoveLoadingPanel() 120 | do_log('Ready to use.', 'INFO') 121 | update_status_label("Program is ready to use.") 122 | end 123 | -- end 124 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/users lua scripts/randomize.lua: -------------------------------------------------------------------------------- 1 | --- This script will Randomize age, attributes, potential of all players. 2 | --- New attribute will be a value between 21 and 99 3 | --- New potential will be a value between 21 and 99 (but not lower that player ovr) 4 | --- New Age can be lower than current age by 10 years to higher than current age by 10 years 5 | --- It may take a few mins. Cheat Engine will stop responding and it's normal behaviour. Wait until you get 'Done' message. 6 | 7 | --- HOW TO USE: 8 | --- https://i.imgur.com/xZMqzTc.gifv 9 | --- 1. Open Cheat table as usuall and enter your career. 10 | --- 2. In Cheat Engine click on "Memory View" button. 11 | --- 3. Press "CTRL + L" to open lua engine 12 | --- 4. Then press "CTRL + O" and open this script 13 | --- 5. Click on 'Execute' button to execute script and wait for 'done' message box. 14 | 15 | --- AUTHOR: ARANAKTU 16 | 17 | require 'lua/GUI/forms/playerseditorform/consts'; 18 | 19 | local comp_desc = get_components_description_player_edit() 20 | 21 | -- list of attributes 22 | local attributes_to_randomize = { 23 | "Potential", 24 | "Crossing", 25 | "Finishing", 26 | "HeadingAccuracy", 27 | "ShortPassing", 28 | "Volleys", 29 | "Marking", 30 | "StandingTackle", 31 | "SlidingTackle", 32 | "Dribbling", 33 | "Curve", 34 | "FreeKickAccuracy", 35 | "LongPassing", 36 | "BallControl", 37 | "GKDiving", 38 | "GKHandling", 39 | "GKKicking", 40 | "GKPositioning", 41 | "GKReflex", 42 | "ShotPower", 43 | "Jumping", 44 | "Stamina", 45 | "Strength", 46 | "LongShots", 47 | "Acceleration", 48 | "SprintSpeed", 49 | "Agility", 50 | "Reactions", 51 | "Balance", 52 | "Aggression", 53 | "Composure", 54 | "Interceptions", 55 | "AttackPositioning", 56 | "Vision", 57 | "Penalties", 58 | } 59 | 60 | -- players table 61 | local sizeOf = 100 -- Size of one record in players database table (0x64) 62 | 63 | -- iterate over all players in 'players' database table 64 | local i = 0 65 | local current_playerid = 0 66 | while true do 67 | local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']) 68 | 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)) 69 | if current_playerid == 0 then 70 | break 71 | end 72 | 73 | writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf) 74 | 75 | -- get ovr_formula for player primiary position 76 | local ovr_formula = deepcopy(OVR_FORMULA[ADDR_LIST.getMemoryRecordByID(comp_desc['PreferredPosition1CB']['id']).Value]) 77 | 78 | -- Randomize Attributes 79 | local new_ovr = 0 80 | for j=1, #attributes_to_randomize do 81 | local new_attr_val = math.random(19, 98) 82 | local attr_name = attributes_to_randomize[j] .. 'Edit' 83 | for attr, perc in pairs(ovr_formula) do 84 | if attr == attr_name then 85 | new_ovr = new_ovr + (new_attr_val * perc) 86 | end 87 | end 88 | ovr_formula[attr_name] = nil 89 | 90 | ADDR_LIST.getMemoryRecordByID(comp_desc[attr_name]['id']).Value = new_attr_val 91 | end 92 | 93 | -- Update OVR 94 | new_ovr = math.floor(new_ovr) 95 | ADDR_LIST.getMemoryRecordByID(comp_desc['OverallEdit']['id']).Value = new_ovr 96 | 97 | -- Keep potential higher than ovr 98 | local new_pot = tonumber(ADDR_LIST.getMemoryRecordByID(comp_desc['PotentialEdit']['id']).Value) 99 | if new_pot < new_ovr then 100 | if new_ovr >= 94 then 101 | ADDR_LIST.getMemoryRecordByID(comp_desc['PotentialEdit']['id']).Value = 99 102 | else 103 | ADDR_LIST.getMemoryRecordByID(comp_desc['PotentialEdit']['id']).Value = new_ovr + 5 104 | end 105 | end 106 | 107 | -- Randomize Age 108 | local bd_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['BIRTHDATE']) 109 | local current_age = tonumber(bd_record.Value) 110 | if math.random() >= 0.50 then 111 | -- younger 112 | bd_record.Value = current_age + (math.random(0, 10) * 365) 113 | else 114 | -- older 115 | bd_record.Value = current_age - (math.random(0, 10) * 365) 116 | end 117 | 118 | i = i + 1 119 | end 120 | 121 | showMessage("Done") -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/mainform/events.lua: -------------------------------------------------------------------------------- 1 | require 'lua/GUI/consts'; 2 | require 'lua/GUI/forms/mainform/consts'; 3 | require 'lua/GUI/forms/mainform/helpers'; 4 | -- MainForm Events 5 | 6 | -- Make window dragable 7 | function MainTopPanelMouseDown(sender, button, x, y) 8 | MainWindowForm.dragNow() 9 | end 10 | 11 | -- SHOW CE 12 | SHOW_CE = true 13 | 14 | -- Make window resizeable 15 | RESIZE_MAIN_WINDOW = { 16 | allow_resize = false 17 | } 18 | function MainWindowResizeMouseDown(sender, button, x, y) 19 | RESIZE_MAIN_WINDOW = { 20 | allow_resize = true, 21 | w = MainWindowForm.Width, 22 | h = MainWindowForm.Height, 23 | mx = x, 24 | my = y 25 | } 26 | end 27 | 28 | function MainWindowResizeMouseMove(sender, x, y) 29 | if RESIZE_MAIN_WINDOW['allow_resize'] then 30 | RESIZE_MAIN_WINDOW['w'] = x - RESIZE_MAIN_WINDOW['mx'] + MainWindowForm.Width 31 | RESIZE_MAIN_WINDOW['h'] = y - RESIZE_MAIN_WINDOW['my'] + MainWindowForm.Height 32 | end 33 | end 34 | function MainWindowResizeMouseUp(sender, button, x, y) 35 | RESIZE_MAIN_WINDOW['allow_resize'] = false 36 | MainWindowForm.Width = RESIZE_MAIN_WINDOW['w'] 37 | MainWindowForm.Height = RESIZE_MAIN_WINDOW['h'] 38 | end 39 | 40 | -- stay on top 41 | function MainWindowAlwaysOnTopClick(sender) 42 | if MainWindowForm.FormStyle == "fsNormal" then 43 | MainWindowForm.AlwaysOnTop.Visible = false 44 | MainWindowForm.AlwaysOnTopOn.Visible = true 45 | MainWindowForm.FormStyle = "fsSystemStayOnTop" 46 | else 47 | MainWindowForm.AlwaysOnTop.Visible = true 48 | MainWindowForm.AlwaysOnTopOn.Visible = false 49 | MainWindowForm.FormStyle = "fsNormal" 50 | end 51 | end 52 | 53 | -- OnShow -> MainMenuForm 54 | function MainMenuFormShow(sender) 55 | if HIDE_CE_SCANNER then 56 | set_ce_mem_scanner_state() 57 | end 58 | 59 | -- Load Img if attached to the game process 60 | if BASE_ADDRESS then 61 | local stream = load_headshot( 62 | tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']).Value), 63 | tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['HEADTYPECODE']).Value), 64 | tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['HAIRCOLORCODE']).Value) 65 | ) 66 | MainWindowForm.PlayersEditorImg.Picture.LoadFromStream(stream) 67 | stream.destroy() 68 | end 69 | end 70 | 71 | function MainFormRemoveLoadingPanel() 72 | MainWindowForm.LoadingPanel.Visible = false 73 | 74 | -- load headshot 75 | local stream = load_headshot( 76 | tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']).Value), 77 | tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['HEADTYPECODE']).Value), 78 | tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['HAIRCOLORCODE']).Value) 79 | ) 80 | MainWindowForm.PlayersEditorImg.Picture.LoadFromStream(stream) 81 | stream.destroy() 82 | end 83 | 84 | 85 | -- Minimize 86 | function MainMinimizeClick(sender) 87 | MainWindowForm.WindowState = "wsMinimized" 88 | end 89 | 90 | -- Close 91 | function MainExitClick(sender) 92 | -- Deactivate scripts on Exit while in DEBUG MODE 93 | if DEBUG_MODE then 94 | deactive_all(getAddressList().getMemoryRecordByDescription('Scripts')) 95 | end 96 | 97 | -- Deactivate "GUI" script 98 | ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['GUI_SCRIPT']).Active = false 99 | end 100 | 101 | -- Show Settings Form 102 | function MainSettingsClick(sender) 103 | SETTINGS_INDEX = 0 104 | SettingsForm.show() 105 | end 106 | 107 | -- Hide/Show CE 108 | function CEClick(sender) 109 | SHOW_CE = not SHOW_CE 110 | getMainForm().Visible = SHOW_CE 111 | end 112 | 113 | -- Show Players Editor Form 114 | function PlayersEditorBtnClick(sender) 115 | MainWindowForm.hide() 116 | PlayersEditorForm.show() 117 | end 118 | function PlayersEditorLabelClick(sender) 119 | MainWindowForm.hide() 120 | PlayersEditorForm.show() 121 | end 122 | function PlayersEditorImgClick(sender) 123 | MainWindowForm.hide() 124 | PlayersEditorForm.show() 125 | end 126 | 127 | -- Show Schedule Editor Form 128 | function ScheduleEditorImgClick(sender) 129 | MainWindowForm.hide() 130 | MatchScheduleEditorForm.show() 131 | end 132 | function ScheduleEditorLabelClick(sender) 133 | MainWindowForm.hide() 134 | MatchScheduleEditorForm.show() 135 | end 136 | function ScheduleEditorBtnClick(sender) 137 | MainWindowForm.hide() 138 | MatchScheduleEditorForm.show() 139 | end 140 | 141 | -- Show Transfer Players Form 142 | function PlayersTransferImgClick(sender) 143 | MainWindowForm.hide() 144 | TransferPlayersForm.show() 145 | end 146 | function PlayersTransferBtnClick(sender) 147 | MainWindowForm.hide() 148 | TransferPlayersForm.show() 149 | end 150 | function PlayersTransferLabelClick(sender) 151 | MainWindowForm.hide() 152 | TransferPlayersForm.show() 153 | end 154 | 155 | -- Show Match-fixing Form 156 | function MatchFixingImgClick(sender) 157 | MainWindowForm.hide() 158 | MatchFixingForm.show() 159 | end 160 | function MatchFixingBtnClick(sender) 161 | MainWindowForm.hide() 162 | MatchFixingForm.show() 163 | end 164 | function MatchFixingLabelClick(sender) 165 | MainWindowForm.hide() 166 | MatchFixingForm.show() 167 | end 168 | 169 | -- Patreon Button 170 | function PatreonClick(sender) 171 | shellExecute("https://www.patreon.com/xAranaktu") 172 | end 173 | 174 | -- Discord Button 175 | function DiscordClick(sender) 176 | shellExecute("https://discord.gg/Nb3HX2W") 177 | end 178 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/users lua scripts/randomize_shoe_models.lua: -------------------------------------------------------------------------------- 1 | --- This script will edit players shoes. 2 | --- By default only Black/White shoes will be replaced by a random shoe model from the "shoe_id_list" with random color. 3 | --- You can set 'randomize_all' variable to true if you want to randoize all shoes. 4 | --- It may take a few mins. Cheat Engine will stop responding and it's normal behaviour. Wait until you get 'Done' message. 5 | 6 | --- HOW TO USE: 7 | --- https://i.imgur.com/xZMqzTc.gifv 8 | --- 1. Open Cheat table as usuall and enter your career. 9 | --- 2. In Cheat Engine click on "Memory View" button. 10 | --- 3. Press "CTRL + L" to open lua engine 11 | --- 4. Then press "CTRL + O" and open this script 12 | --- 5. Click on 'Execute' button to execute script and wait for 'done' message box. 13 | 14 | --- AUTHOR: ARANAKTU 15 | 16 | require 'lua/GUI/forms/playerseditorform/consts'; 17 | 18 | local comp_desc = get_components_description_player_edit() 19 | 20 | local shoe_id_list = { 21 | 15, 22 | 16, 23 | 17, 24 | 18, 25 | 19, 26 | 20, 27 | 21, 28 | 22, 29 | 23, 30 | 24, 31 | 25, 32 | 26, 33 | 27, 34 | 28, 35 | 29, 36 | 30, 37 | 31, 38 | 32, 39 | 33, 40 | 34, 41 | 35, 42 | 36, 43 | 37, 44 | 38, 45 | 39, 46 | 40, 47 | 41, 48 | 42, 49 | 43, 50 | 44, 51 | 45, 52 | 46, 53 | 47, 54 | 48, 55 | 49, 56 | 50, 57 | 51, 58 | 52, 59 | 53, 60 | 54, 61 | 55, 62 | 56, 63 | 57, 64 | 58, 65 | 59, 66 | 60, 67 | 61, 68 | 62, 69 | 63, 70 | 64, 71 | 65, 72 | 66, 73 | 67, 74 | 68, 75 | 69, 76 | 70, 77 | 71, 78 | 72, 79 | 73, 80 | 74, 81 | 75, 82 | 76, 83 | 77, 84 | 78, 85 | 79, 86 | 80, 87 | 81, 88 | 82, 89 | 83, 90 | 84, 91 | 85, 92 | 86, 93 | 87, 94 | 88, 95 | 89, 96 | 90, 97 | 91, 98 | 92, 99 | 93, 100 | 94, 101 | 95, 102 | 96, 103 | 97, 104 | 98, 105 | 99, 106 | 100, 107 | 101, 108 | 102, 109 | 103, 110 | 104, 111 | 105, 112 | 106, 113 | 107, 114 | 108, 115 | 109, 116 | 110, 117 | 111, 118 | 112, 119 | 113, 120 | 114, 121 | 115, 122 | 116, 123 | 117, 124 | 118, 125 | 119, 126 | 120, 127 | 121, 128 | 122, 129 | 123, 130 | 124, 131 | 125, 132 | 126, 133 | 127, 134 | 128, 135 | 130, 136 | 131, 137 | 132, 138 | 133, 139 | 134, 140 | 135, 141 | 136, 142 | 137, 143 | 138, 144 | 139, 145 | 140, 146 | 141, 147 | 142, 148 | 165, 149 | 166, 150 | 167, 151 | 168, 152 | 169, 153 | 170, 154 | 171, 155 | 172, 156 | 173, 157 | 174, 158 | 175, 159 | 176, 160 | 177, 161 | 178, 162 | 179, 163 | 180, 164 | 181, 165 | 182, 166 | 183, 167 | 184, 168 | 185, 169 | 186, 170 | 192, 171 | 193, 172 | 194, 173 | 195, 174 | 197, 175 | 198, 176 | 199, 177 | 200, 178 | 201, 179 | 204, 180 | 205, 181 | 206, 182 | 209, 183 | 210, 184 | 211, 185 | 216, 186 | 217, 187 | 218, 188 | 219, 189 | 220, 190 | 227, 191 | 228, 192 | 231, 193 | 232, 194 | 233, 195 | 234, 196 | 235, 197 | 237, 198 | 238, 199 | 239, 200 | 255, 201 | 256, 202 | 257, 203 | 258, 204 | 259, 205 | 260, 206 | 261, 207 | 262, 208 | 263, 209 | 264, 210 | 265, 211 | 266, 212 | 267, 213 | 271, 214 | 272, 215 | 275, 216 | 276, 217 | 277, 218 | 278, 219 | 279, 220 | 280, 221 | 282, 222 | 283, 223 | 284, 224 | 285, 225 | 338, 226 | 339, 227 | 340, 228 | 341, 229 | 342, 230 | 343, 231 | 344, 232 | 345, 233 | 346, 234 | 347, 235 | 348, 236 | 349, 237 | 350, 238 | 351, 239 | 352, 240 | 353, 241 | 354 242 | } 243 | 244 | function inTable(tbl, item) 245 | for key, value in pairs(tbl) do 246 | if value == item then return key end 247 | end 248 | return false 249 | end 250 | 251 | -- players table 252 | local sizeOf = 100 -- Size of one record in players database table (0x64) 253 | 254 | -- iterate over all players in 'players' database table 255 | local i = 0 256 | local current_playerid = 0 257 | 258 | -- false - Randomize only Black/White Boots 259 | -- true - Randomize all shoes 260 | local randomize_all = false 261 | while true do 262 | local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']) 263 | 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)) 264 | if current_playerid == 0 then 265 | break 266 | end 267 | 268 | writeQword('playerDataPtr', readPointer('firstPlayerDataPtr') + i*sizeOf) 269 | 270 | local current_shoe = tonumber(ADDR_LIST.getMemoryRecordByID(comp_desc['shoetypeEdit']['id']).Value) 271 | 272 | if randomize_all or not inTable(shoe_id_list, current_shoe) then 273 | -- Random Shoe 274 | local new_shoe_id = shoe_id_list[math.random(#shoe_id_list)] 275 | 276 | -- Random shoecolorcode1 277 | local new_color_one = math.random(0, 31) 278 | 279 | -- Random shoecolorcode2 280 | local new_color_two = math.random(0, 31) 281 | 282 | ADDR_LIST.getMemoryRecordByID(comp_desc['shoedesignEdit']['id']).Value = 0 283 | ADDR_LIST.getMemoryRecordByID(comp_desc['shoetypeEdit']['id']).Value = new_shoe_id 284 | ADDR_LIST.getMemoryRecordByID(comp_desc['shoecolorEdit1']['id']).Value = new_color_one 285 | ADDR_LIST.getMemoryRecordByID(comp_desc['shoecolorEdit2']['id']).Value = new_color_two 286 | 287 | end 288 | 289 | i = i + 1 290 | end 291 | 292 | showMessage("Done") -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/matchscheduleeditorform/helpers.lua: -------------------------------------------------------------------------------- 1 | function value_to_match_date(value) 2 | -- Convert value from the game to human readable form (format: DD/MM/YYYY) 3 | -- ex. 20180908 -> 08/09/2018 4 | local to_string = string.format('%d', value) 5 | return string.format( 6 | '%s/%s/%s', 7 | string.sub(to_string, 7), 8 | string.sub(to_string, 5, 6), 9 | string.sub(to_string, 1, 4) 10 | ) 11 | end 12 | 13 | function match_date_to_value(match_date) 14 | local m_date, _ = string.gsub(match_date, '%D', '') 15 | if string.len(m_date) ~= 8 then 16 | local txt = string.format('Invalid date format: %s', match_date) 17 | do_log(txt, 'ERROR') 18 | return false 19 | end 20 | m_date = string.format( 21 | '%s%s%s', 22 | string.sub(m_date, 5), 23 | string.sub(m_date, 3, 4), 24 | string.sub(m_date, 1, 2) 25 | ) 26 | return tonumber(m_date) 27 | end 28 | 29 | function apply_change_match_date() 30 | for i=0, MatchScheduleEditorForm.SchedulesScroll.ComponentCount-1 do 31 | local container = MatchScheduleEditorForm.SchedulesScroll.Component[i] 32 | for j=0, container.ComponentCount-1 do 33 | if string.sub(container.Component[j].Name, 0, 18) == 'MatchDateAddrLabel' then 34 | local new_val = match_date_to_value( 35 | container[string.format('MatchDateEdit%d', i+1)].Text 36 | ) 37 | if not new_val then 38 | break 39 | end 40 | 41 | writeInteger( 42 | tonumber(container.Component[j].Caption, 16) + 0x14, 43 | new_val 44 | ) 45 | end 46 | end 47 | end 48 | ShowMessage('Done.') 49 | end 50 | 51 | function clear_match_containers() 52 | for i=0, MatchScheduleEditorForm.SchedulesScroll.ComponentCount-1 do 53 | MatchScheduleEditorForm.SchedulesScroll.Component[0].destroy() 54 | end 55 | end 56 | 57 | function create_match_containers() 58 | local games_in_current_month = readInteger('fixturesData+8') 59 | if games_in_current_month == nil or games_in_current_month <= 0 then 60 | local txt = 'Open the in-game calendar in a month that contains matches. You can also try to exit calendar and enter there again' 61 | do_log(txt, 'ERROR') 62 | MatchScheduleExitClick(sender) 63 | end 64 | -- Fill GUI 65 | for i=0, games_in_current_month-1 do 66 | local m_index = readInteger(string.format('fixturesData+%X', 12+i*4)) * 0x28 67 | 68 | local fixtureList = readMultilevelPointer(readPointer('fixturesData'), {0x18, 0x58}) 69 | local standingsList = readMultilevelPointer(readPointer('fixturesData'), {0x18, 0x80, 0x30}) 70 | local fixture = readMultilevelPointer(fixtureList, {0x30}) + m_index 71 | local hometeam = standingsList + (readSmallInteger(fixture + 0x1A) * 0x28) -- HOMETEAM 72 | local awayteam = standingsList + (readSmallInteger(fixture + 0x1E) * 0x28) -- AWAYTEAM 73 | 74 | -- Container 75 | local panel_match_container = createPanel(MatchScheduleEditorForm.SchedulesScroll) 76 | panel_match_container.Name = string.format('MatchContainerPanel%d', i+1) 77 | panel_match_container.BevelOuter = bvNone 78 | panel_match_container.Caption = '' 79 | 80 | panel_match_container.Color = '0x00302825' 81 | panel_match_container.Width = 280 82 | panel_match_container.Height = 80 83 | panel_match_container.Left = 10 84 | panel_match_container.Top = 10 + 90*i 85 | 86 | -- Addr for apply changes 87 | local hidden_label = createLabel(panel_match_container) 88 | hidden_label.Name = string.format('MatchDateAddrLabel%d', i+1) 89 | hidden_label.Visible = false 90 | hidden_label.Caption = string.format('%X', fixture) 91 | 92 | 93 | -- Match Date Edit 94 | local match_date = createEdit(panel_match_container) 95 | match_date.Name = string.format('MatchDateEdit%d', i+1) 96 | match_date.Hint = 'Date format: DD/MM/YYYY' 97 | match_date.BorderStyle = bsNone 98 | match_date.Text = value_to_match_date(readInteger(fixture + 0x14)) 99 | match_date.Color = '0x003A302C' 100 | match_date.Top = 0 101 | match_date.Left = 75 102 | match_date.Width = 130 103 | match_date.Font.Size = 14 104 | match_date.Font.Color = '0xFFFBF0' 105 | 106 | -- VS LABEL 107 | local vslabel = createLabel(panel_match_container) 108 | vslabel.Name = string.format('MatchLabel%d', i+1) 109 | vslabel.Caption = 'Vs.' 110 | vslabel.AutoSize = false 111 | vslabel.Width = 60 112 | vslabel.Height = 42 113 | vslabel.Left = 110 114 | vslabel.Top = 38 115 | vslabel.Font.Size = 26 116 | vslabel.Font.Color = '0xC0C0C0' 117 | 118 | -- Home Team Badge 119 | local badgeimg = createImage(panel_match_container) 120 | local ss_c = load_crest(readInteger(hometeam + 0x14)) 121 | badgeimg.Picture.LoadFromStream(ss_c) 122 | ss_c.destroy() 123 | 124 | badgeimg.Name = string.format('MatchImageHT%d', i+1) 125 | badgeimg.Left = 0 126 | badgeimg.Top = 5 127 | badgeimg.Height = 75 128 | badgeimg.Width = 75 129 | badgeimg.Stretch = true 130 | 131 | -- Away Team Badge 132 | local badgeimg = createImage(panel_match_container) 133 | local ss_c = load_crest(readInteger(awayteam + 0x14)) 134 | badgeimg.Picture.LoadFromStream(ss_c) 135 | ss_c.destroy() 136 | 137 | badgeimg.Name = string.format('MatchImageAT%d', i+1) 138 | badgeimg.Left = 205 139 | badgeimg.Top = 5 140 | badgeimg.Height = 75 141 | badgeimg.Width = 75 142 | badgeimg.Stretch = true 143 | end 144 | end 145 | 146 | SCHEDULEEDIT_HOTKEYS_OBJECTS = {} 147 | function create_hotkeys_schedule_edit() 148 | destroy_hotkeys_schedule_edit() 149 | if CFG_DATA.hotkeys.sync_with_game then 150 | table.insert(SCHEDULEEDIT_HOTKEYS_OBJECTS, createHotkey(MatchScheduleSyncImageClick, _G[CFG_DATA.hotkeys.sync_with_game])) 151 | end 152 | end 153 | 154 | function destroy_hotkeys_schedule_edit() 155 | for i=1,#SCHEDULEEDIT_HOTKEYS_OBJECTS do 156 | SCHEDULEEDIT_HOTKEYS_OBJECTS[i].destroy() 157 | end 158 | SCHEDULEEDIT_HOTKEYS_OBJECTS = {} 159 | end 160 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/matchfixingform/events.lua: -------------------------------------------------------------------------------- 1 | require 'lua/helpers'; 2 | require 'lua/GUI/consts'; 3 | require 'lua/GUI/helpers'; 4 | require 'lua/GUI/forms/matchfixingform/helpers' 5 | 6 | -- Make window dragable 7 | function MatchFixingTopPanelMouseDown(sender, button, x, y) 8 | MatchFixingForm.dragNow() 9 | end 10 | 11 | -- EVENTS 12 | function MatchFixingMinimizeClick(sender) 13 | MatchFixingForm.WindowState = "wsMinimized" 14 | end 15 | function MatchFixingExitClick(sender) 16 | MatchFixingForm.close() 17 | MainWindowForm.show() 18 | end 19 | function MatchFixingSettingsClick(sender) 20 | SettingsForm.show() 21 | end 22 | 23 | function MatchFixingFormClose(sender) 24 | return caHide 25 | end 26 | 27 | function MatchFixingSyncImageClick(sender) 28 | clear_fav_teams_containers() 29 | clear_match_fixing_containers() 30 | create_fav_teams_containers() 31 | create_match_fixing_containers() 32 | end 33 | 34 | function MatchFixingFormShow(sender) 35 | if not ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['MATCHFIXING_SCRIPT']).Active then 36 | ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['MATCHFIXING_SCRIPT']).Active = true 37 | end 38 | 39 | if readInteger("arr_fixedGamesAlwaysWin") == nil then 40 | MatchFixingForm.close() 41 | MainWindowForm.show() 42 | return 43 | end 44 | clear_fav_teams_containers() 45 | clear_match_fixing_containers() 46 | create_fav_teams_containers() 47 | create_match_fixing_containers() 48 | 49 | MatchFixingForm.FixingTypeListBox.setItemIndex(0) 50 | FixingTypeListBoxSelectionChange(MatchFixingForm.FixingTypeListBox) 51 | end 52 | 53 | function MatchFixingAddFavTeamLabelClick(sender) 54 | MatchFixingAddFavTeamBtnClick(sender) 55 | end 56 | function MatchFixingAddFavTeamBtnClick(sender) 57 | local fav_teams = readInteger("arr_fixedGamesAlwaysWin") 58 | if fav_teams >= 60 then 59 | do_log("Add Fav team\nReach maximum number of favourite teams. 60 is the limit.", 'ERROR') 60 | return 61 | end 62 | 63 | local teamid = inputQuery("Add Fav team", "Enter teamid:", "0") 64 | if not teamid or tonumber(teamid) <= 0 then 65 | do_log(string.format("Add Fav team\nEnter Valid TeamID\n %s is invalid.", teamid), 'ERROR') 66 | return 67 | end 68 | do_log(string.format("New fav team: %s", teamid), 'INFO') 69 | 70 | writeInteger("arr_fixedGamesAlwaysWin", fav_teams + 1) 71 | 72 | writeInteger( 73 | string.format('arr_fixedGamesAlwaysWin+%s', string.format('%X', (fav_teams) * 4 + 4)), 74 | teamid 75 | ) 76 | 77 | create_fav_teams_container(fav_teams, teamid) 78 | 79 | if type(CFG_DATA.fav_teams) == 'table' then 80 | table.insert(CFG_DATA.fav_teams, tonumber(teamid)) 81 | else 82 | CFG_DATA.fav_teams = { tonumber(teamid) } 83 | end 84 | save_cfg() 85 | 86 | do_log(string.format("Success ID: %d", fav_teams + 1), 'INFO') 87 | end 88 | 89 | function MatchFixingNewMatchFixLabelClick(sender) 90 | MatchFixingNewMatchFixBtnClick(sender) 91 | end 92 | function MatchFixingNewMatchFixBtnClick(sender) 93 | if need_match_fixing_sync() then 94 | ShowMessage("Close this and try again after 2s.") 95 | clear_match_fixing_containers() 96 | create_match_fixing_containers() 97 | return 98 | end 99 | 100 | local fixed_games = readInteger("arr_fixedGamesData") 101 | if fixed_games >= 60 then 102 | do_log("Add Fixed Match\nReach maximum number of fixed games. 60 is the limit.", 'ERROR') 103 | return 104 | end 105 | 106 | local home_teamid = inputQuery("Match Fixing", "Enter home teamid:\nLeave 0 for any team.", "0") 107 | if (home_teamid == "0" or home_teamid == '') then 108 | home_teamid = 4294967295 109 | elseif tonumber(home_teamid) == nil then 110 | do_log(string.format("Value must be a number, %s is invalid", home_teamid), 'ERROR') 111 | return 112 | end 113 | 114 | local away_teamid = inputQuery("Match Fixing", "Enter away teamid:\nLeave 0 for any team.", "0") 115 | if (away_teamid == "0" or away_teamid == '') then 116 | away_teamid = 4294967295 117 | elseif tonumber(away_teamid) == nil then 118 | do_log(string.format("Value must be a number, %s is invalid", away_teamid), 'ERROR') 119 | return 120 | end 121 | 122 | local home_score = inputQuery("Match Fixing", "Enter num of goals scored by home team", "0") 123 | if tonumber(home_score) == nil then 124 | do_log(string.format("Value must be a number, %s is invalid", home_score), 'ERROR') 125 | return 126 | end 127 | 128 | local away_score = inputQuery("Match Fixing", "Enter num of goals scored by away team", "0") 129 | if tonumber(away_score) == nil then 130 | do_log(string.format("Value must be a number, %s is invalid", away_score), 'ERROR') 131 | return 132 | end 133 | 134 | do_log(string.format("New match fixing: %s %s:%s %s", home_teamid, home_score, away_score, away_teamid), 'INFO') 135 | 136 | writeInteger("arr_fixedGamesData", fixed_games + 1) 137 | 138 | writeInteger( 139 | string.format('arr_fixedGamesData+%s', string.format('%X', (fixed_games) * 16 + 4)), 140 | home_teamid 141 | ) 142 | writeInteger( 143 | string.format('arr_fixedGamesData+%s', string.format('%X', (fixed_games) * 16 + 8)), 144 | away_teamid 145 | ) 146 | writeInteger( 147 | string.format('arr_fixedGamesData+%s', string.format('%X', (fixed_games) * 16 + 12)), 148 | home_score 149 | ) 150 | writeInteger( 151 | string.format('arr_fixedGamesData+%s', string.format('%X', (fixed_games) * 16 + 16)), 152 | away_score 153 | ) 154 | create_match_fixing_container(fixed_games) 155 | do_log(string.format("Success ID: %d", fixed_games + 1), 'INFO') 156 | end 157 | 158 | function FixingTypeListBoxSelectionChange(sender, user) 159 | local Panels = { 160 | 'MatchFixingContainer', 161 | 'MatchFixingFavContainer', 162 | } 163 | for i=1, #Panels do 164 | if sender.ItemIndex == i-1 then 165 | MatchFixingForm[Panels[i]].Visible = true 166 | else 167 | MatchFixingForm[Panels[i]].Visible = false 168 | end 169 | end 170 | end 171 | 172 | function MatchFixingFavTeamHelpClick(sender) 173 | ShowMessage([[ 174 | Favourite teams 175 | 176 | Teams defined as a favourite will always win their games by 3:0. 177 | 178 | If you got more than one favourite team and these teams will meet each other then the home team will always win. 179 | 180 | You can only define 60 favourite teams at this moment. 181 | ]]) 182 | end -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/settingsform/events.lua: -------------------------------------------------------------------------------- 1 | 2 | require 'lua/GUI/forms/settingsform/helpers'; 3 | require 'lua/GUI/forms/mainform/helpers'; 4 | -- MainForm Events 5 | 6 | local new_cfg_data = {} 7 | 8 | local HAS_UNSAVED_SETTINGS_CHANGES = false 9 | -- Make window dragable 10 | function SettingsFormTopPanelMouseDown(sender, button, x, y) 11 | SettingsForm.dragNow() 12 | end 13 | 14 | 15 | function SettingsAlwaysOnTopOnClick(sender) 16 | if sender.FormStyle == "fsNormal" then 17 | sender.AlwaysOnTop.Visible = false 18 | sender.AlwaysOnTopOn.Visible = true 19 | sender.FormStyle = "fsSystemStayOnTop" 20 | else 21 | sender.AlwaysOnTop.Visible = true 22 | sender.AlwaysOnTopOn.Visible = false 23 | sender.FormStyle = "fsNormal" 24 | end 25 | end 26 | function SettingsResizeMouseDown(sender, button, x, y) 27 | 28 | end 29 | function SettingsResizeMouseMove(sender, x, y) 30 | 31 | end 32 | function SettingsResizeMouseUp(sender, button, x, y) 33 | 34 | end 35 | 36 | function SettingsFormShow(sender) 37 | new_cfg_data = deepcopy(CFG_DATA) 38 | -- Fill General 39 | SettingsForm.SelectCacheDirectoryDialog.InitialDir = string.gsub(CACHE_DIR, "/","\\") 40 | SettingsForm.CacheFilesDirEdit.Hint = CACHE_DIR 41 | SettingsForm.CacheFilesDirEdit.Text = CACHE_DIR 42 | SettingsForm.GUIOpacityEdit.Text = CFG_DATA.gui.opacity 43 | 44 | SettingsForm.SyncWithGameHotkeyEdit.Text = CFG_DATA.hotkeys.sync_with_game 45 | SettingsForm.SearchPlayerByIDHotkeyEdit.Text = CFG_DATA.hotkeys.search_player_by_id 46 | 47 | if CFG_DATA.flags then 48 | if CFG_DATA.flags.hide_ce_scanner == nil then 49 | CFG_DATA.flags.hide_ce_scanner = true 50 | end 51 | 52 | if CFG_DATA.flags.hide_ce_scanner then 53 | SettingsForm.HideCEMemScannerCB.State = 1 54 | end 55 | 56 | if CFG_DATA.flags.check_for_update == nil then 57 | CFG_DATA.flags.check_for_update = true 58 | 59 | end 60 | 61 | if CFG_DATA.flags.check_for_update then 62 | SettingsForm.SettingsCheckForUpdateCB.State = 1 63 | end 64 | 65 | if CFG_DATA.flags.only_check_for_free_update == nil then 66 | CFG_DATA.flags.only_check_for_free_update = false 67 | end 68 | 69 | if CFG_DATA.flags.only_check_for_free_update then 70 | SettingsForm.SettingsCheckForFreeUpdateCB.State = 1 71 | end 72 | end 73 | 74 | -- Fill Auto Activation 75 | SettingsForm.CTTreeview.Items.clear() 76 | local root = SettingsForm.CTTreeview.Items.Add('Scripts') 77 | root.hasChildren = true 78 | root.Expanded = true 79 | FillScriptsTree(ADDR_LIST.getMemoryRecordByDescription('Scripts'), root) 80 | 81 | -- Show correct panel 82 | ActivateSection(SETTINGS_INDEX) 83 | end 84 | 85 | function SettingsSectionsListBoxSelectionChange(sender, user) 86 | ActivateSection(sender.getItemIndex()) 87 | end 88 | function CacheFilesDirEditClick(sender) 89 | SettingsForm.SelectCacheDirectoryDialog.execute() 90 | end 91 | 92 | 93 | function SettingsMinimizeClick(sender) 94 | SettingsForm.WindowState = "wsMinimized" 95 | end 96 | function SettingsExitClick(sender) 97 | SettingsForm.hide() 98 | end 99 | function SettingsSaveSettingsClick(sender) 100 | -- Auto activate script ids 101 | local scripts_ids = {2995} -- Always expand 'Scripts' 102 | for i=0, SettingsForm.CTTreeview.Items.Count-1 do 103 | local is_selected = SettingsForm.CTTreeview.Items[i].MultiSelected 104 | if is_selected then 105 | table.insert(scripts_ids, SettingsForm.CTTreeview.Items[i].Data) 106 | end 107 | end 108 | 109 | new_cfg_data.auto_activate = scripts_ids 110 | 111 | new_cfg_data.hotkeys.sync_with_game = SettingsForm.SyncWithGameHotkeyEdit.Text 112 | new_cfg_data.hotkeys.search_player_by_id = SettingsForm.SearchPlayerByIDHotkeyEdit.Text 113 | 114 | new_cfg_data.flags.hide_ce_scanner = SettingsForm.HideCEMemScannerCB.State == 1 115 | 116 | new_cfg_data.flags.check_for_update = SettingsForm.SettingsCheckForUpdateCB.State == 1 117 | new_cfg_data.flags.only_check_for_free_update = SettingsForm.SettingsCheckForFreeUpdateCB.State == 1 118 | 119 | save_changes_in_settingsform(new_cfg_data) 120 | showMessage('Settings has been saved.') 121 | end 122 | 123 | -- Editables 124 | function update_unsaved_settings(sender) 125 | HAS_UNSAVED_SETTINGS_CHANGES = true 126 | end 127 | 128 | function SelectCacheDirectoryDialogShow(sender) 129 | HAS_UNSAVED_SETTINGS_CHANGES = true 130 | local dir = string.gsub(SettingsForm.SelectCacheDirectoryDialog.FileName, '\\', '/') 131 | SettingsForm.CacheFilesDirEdit.Hint = dir 132 | SettingsForm.CacheFilesDirEdit.Text = dir 133 | 134 | new_cfg_data.directories.cache_dir = dir .. '/' 135 | end 136 | 137 | function GUIOpacityEditChange(sender) 138 | HAS_UNSAVED_SETTINGS_CHANGES = true 139 | local opacity = tonumber(sender.Text) 140 | if not opacity then return end 141 | 142 | if opacity < 100 then 143 | opacity = 100 144 | sender.Text = opacity 145 | elseif opacity > 255 then 146 | opacity = 255 147 | sender.Text = opacity 148 | end 149 | 150 | for i = 1, #FORMS do 151 | local form = FORMS[i] 152 | 153 | -- Update opacity of all forms 154 | form.AlphaBlend = true 155 | form.AlphaBlendValue = opacity 156 | end 157 | 158 | new_cfg_data.gui.opacity = opacity 159 | end 160 | 161 | -- CheckBox 162 | function HideCEMemScannerCBChange(sender) 163 | if sender.State == 1 then 164 | HIDE_CE_SCANNER = true 165 | else 166 | HIDE_CE_SCANNER = false 167 | end 168 | set_ce_mem_scanner_state() 169 | end 170 | 171 | -- Buttons 172 | function RestoreDefaultSettingsButtonClick(sender) 173 | if messageDialog("Are you sure you want to restore default settings?\nThis will also clear your cached files\nCheat Table and FIFA restart will be required.", mtInformation, mbYes,mbNo) == mrNo then 174 | return 175 | end 176 | do_log('Restore Default Settings') 177 | delete_directory(string.gsub(DATA_DIR, "/","\\"):sub(1,-2)) 178 | delete_directory(string.gsub(CACHE_DIR, "/","\\"):sub(1,-2)) 179 | showMessage('Default settings restored. Please, restart FIFA and Cheat Engine.') 180 | end 181 | 182 | function ClearCacheButtonClick(sender) 183 | if messageDialog("Are you sure you want to delete all cached files?", mtInformation, mbYes,mbNo) == mrNo then 184 | return 185 | end 186 | do_log('Clear Cached Files') 187 | delete_directory(string.gsub(CACHE_DIR, "/","\\"):sub(1,-2)) 188 | 189 | create_dirs() 190 | 191 | showMessage('All cached files has been deleted.') 192 | end -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/transferplayersform/events.lua: -------------------------------------------------------------------------------- 1 | require 'lua/GUI/forms/transferplayersform/helpers'; 2 | 3 | function TransferPlayersNewTransferBtnClick(sender) 4 | new_custom_transfer() 5 | end 6 | function TransferPlayersNewTransferLabelClick(sender) 7 | TransferPlayersNewTransferBtnClick(sender) 8 | end 9 | function TransferPlayersExitClick(sender) 10 | TransferPlayersForm.close() 11 | MainWindowForm.show() 12 | end 13 | 14 | function TransferPlayersSettingsClick(sender) 15 | SettingsForm.show() 16 | end 17 | 18 | function TransferPlayersSyncImageClick(sender) 19 | fill_custom_transfers() 20 | end 21 | 22 | function TransferPlayersMinimizeClick(sender) 23 | TransferPlayersForm.WindowState = "wsMinimized" 24 | end 25 | 26 | function TransferPlayersTopPanelMouseDown(sender, button, x, y) 27 | TransferPlayersForm.dragNow() 28 | end 29 | 30 | function TransferTypeListBoxSelectionChange(sender, user) 31 | 32 | end 33 | 34 | local FillTransferPlayersFormTimer = createTimer(nil) 35 | function TransferPlayersFormShow(sender) 36 | TransferPlayersForm.TransferTypeListBox.setItemIndex(0) 37 | -- Load Data 38 | timer_onTimer(FillTransferPlayersFormTimer, fill_transfers_on_show) 39 | timer_setInterval(FillTransferPlayersFormTimer, 100) 40 | timer_setEnabled(FillTransferPlayersFormTimer, true) 41 | end 42 | 43 | function fill_transfers_on_show() 44 | timer_setEnabled(FillTransferPlayersFormTimer, false) 45 | fill_custom_transfers() 46 | end 47 | 48 | function reload_team_to_crest(sender) 49 | local teamid = tonumber(sender.Text) 50 | if not teamid or teamid == 0 then 51 | return 52 | end 53 | 54 | local comp_id = string.gsub(sender.Name, "ToTeamId", "") 55 | local ToCrestImg = TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('ToCrestImage%d', comp_id)] 56 | local ss_c = load_crest(teamid) 57 | ToCrestImg.Picture.LoadFromStream(ss_c) 58 | ss_c.destroy() 59 | end 60 | 61 | function reload_team_from_crest(sender) 62 | local teamid = tonumber(sender.Items[sender.ItemIndex]) 63 | if not teamid or teamid == 0 then 64 | return 65 | end 66 | 67 | local comp_id = string.gsub(sender.Name, "FromTeamId", "") 68 | comp_id = tonumber(comp_id) 69 | local FromCrestImg = TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('FromCrestImage%d', comp_id)] 70 | local ss_c = load_crest(teamid) 71 | FromCrestImg.Picture.LoadFromStream(ss_c) 72 | ss_c.destroy() 73 | end 74 | 75 | function confirm_transfer(sender) 76 | if not ADDR_LIST.getMemoryRecordByID(3034).Active then ADDR_LIST.getMemoryRecordByID(3034).Active = true end 77 | local comp_id = nil 78 | if sender.ClassName == 'TCEImage' then 79 | comp_id = string.gsub(sender.Name, "ConfirmBtnImage", "") 80 | else 81 | comp_id = string.gsub(sender.Name, "ConfirmBtnLabel", "") 82 | end 83 | comp_id = tonumber(comp_id) 84 | TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('ConfirmBtnLabel%d', comp_id)].Visible = false 85 | TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('ConfirmBtnImage%d', comp_id)].Visible = false 86 | 87 | local num_of_transfers = readInteger('arr_NewTransfers') 88 | writeInteger('arr_NewTransfers', num_of_transfers + 1) 89 | 90 | -- append 91 | local playerid = tonumber(TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('PlayerIDLabel%d', comp_id)].Caption) 92 | 93 | local current_teamid_comp = TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('FromTeamId%d', comp_id)] 94 | local current_teamid = nil 95 | if current_teamid_comp.ClassName == 'TEdit' or current_teamid_comp.ClassName == 'TCEEdit' then 96 | current_teamid = tonumber(current_teamid_comp.Text) 97 | else 98 | current_teamid = tonumber(current_teamid_comp.Items[current_teamid_comp.ItemIndex]) 99 | end 100 | local new_teamid = tonumber(TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('ToTeamId%d', comp_id)].Text) 101 | local release_clause = tonumber(TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('ReleaseClauseValue%d', comp_id)].Text) or 0 102 | local contract_length = (tonumber(TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('ContractLengthCombo%d', comp_id)].ItemIndex) + 1) * 12 103 | 104 | writeInteger( 105 | string.format('arr_NewTransfers+%s', string.format('%X', (num_of_transfers) * 20 + 4)), 106 | playerid 107 | ) 108 | writeInteger( 109 | string.format('arr_NewTransfers+%s', string.format('%X', (num_of_transfers) * 20 + 8)), 110 | new_teamid 111 | ) 112 | writeInteger( 113 | string.format('arr_NewTransfers+%s', string.format('%X', (num_of_transfers) * 20 + 12)), 114 | current_teamid 115 | ) 116 | writeInteger( 117 | string.format('arr_NewTransfers+%s', string.format('%X', (num_of_transfers) * 20 + 16)), 118 | release_clause 119 | ) 120 | writeInteger( 121 | string.format('arr_NewTransfers+%s', string.format('%X', (num_of_transfers) * 20 + 20)), 122 | contract_length 123 | ) 124 | do_log(string.format("Confirm transfer. PlayerID: %d, CurrentTeamID: %d, NewTeamID: %d, Clause: %d, Length: %d", playerid, current_teamid, new_teamid, release_clause, contract_length), 'INFO') 125 | if not ADDR_LIST.getMemoryRecordByID(3034).Active then 126 | do_log("Script -> Transfer players between teams is not active. Transfer will not be finalized", "ERROR") 127 | end 128 | end 129 | 130 | function delete_transfer(sender) 131 | local comp_id = nil 132 | if sender.ClassName == 'TCEImage' then 133 | comp_id = string.gsub(sender.Name, "DeleteBtnImage", "") 134 | else 135 | comp_id = string.gsub(sender.Name, "DeleteBtnLabel", "") 136 | end 137 | comp_id = tonumber(comp_id) 138 | 139 | for i=comp_id, TransferPlayersForm.TransfersScroll.ComponentCount-1 do 140 | TransferPlayersForm.TransfersScroll.Component[i].Top = TransferPlayersForm.TransfersScroll.Component[i].Top - TransferPlayersForm.TransfersScroll.Component[i].Height 141 | end 142 | 143 | local num_of_transfers = readInteger('arr_NewTransfers') 144 | local playerid = tonumber(TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('PlayerIDLabel%d', comp_id)].Caption) 145 | local current_teamid_comp = TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('FromTeamId%d', comp_id)] 146 | local current_teamid = nil 147 | if current_teamid_comp.ClassName == 'TEdit' or current_teamid_comp.ClassName == 'TCEEdit' then 148 | current_teamid = tonumber(current_teamid_comp.Text) 149 | else 150 | current_teamid = tonumber(current_teamid_comp.Items[current_teamid_comp.ItemIndex]) 151 | end 152 | local new_teamid = tonumber(TransferPlayersForm.TransfersScroll[string.format('NewTransferContainerPanel%d', comp_id)][string.format('ToTeamId%d', comp_id)].Text) 153 | 154 | do_log(string.format("Delete Transfer. PlayerID: %d, CurrentTeamID: %d, NewTeamID: %d", playerid, current_teamid, new_teamid), 'INFO') 155 | 156 | rewrite_transfers = {} 157 | local transfer_is_in_queue = false 158 | for i=0, num_of_transfers do 159 | local pid = readInteger(string.format('arr_NewTransfers+%s', string.format('%X', i * 20 + 4))) 160 | local ntid = readInteger(string.format('arr_NewTransfers+%s', string.format('%X', i * 20 + 8))) 161 | local ctid = readInteger(string.format('arr_NewTransfers+%s', string.format('%X', i * 20 + 12))) 162 | local rl_clause = readInteger(string.format('arr_NewTransfers+%s', string.format('%X', i * 20 + 16))) 163 | local cl = readInteger(string.format('arr_NewTransfers+%s', string.format('%X', i * 20 + 20))) 164 | if pid == playerid and ctid == current_teamid and ntid == new_teamid then 165 | transfer_is_in_queue = true 166 | else 167 | table.insert(rewrite_transfers, pid) 168 | table.insert(rewrite_transfers, ctid) 169 | table.insert(rewrite_transfers, ntid) 170 | table.insert(rewrite_transfers, rl_clause) 171 | table.insert(rewrite_transfers, cl) 172 | end 173 | end 174 | 175 | if transfer_is_in_queue then 176 | do_log("^Transfer in queue", 'INFO') 177 | for i=1, #rewrite_transfers do 178 | writeInteger( 179 | string.format('arr_NewTransfers+%s', string.format('%X', i * 4)), 180 | rewrite_transfers[i] 181 | ) 182 | end 183 | writeInteger('arr_NewTransfers', num_of_transfers - 1) 184 | end 185 | 186 | sender.Owner.Visible = false 187 | CUSTOM_TRANSFERS = CUSTOM_TRANSFERS - 1 188 | end -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/helpers.lua: -------------------------------------------------------------------------------- 1 | -- GUI Helpers 2 | require 'lua/helpers'; 3 | 4 | local ComponentsExtraData = {} 5 | 6 | function UpdateCBComponentHint(sender) 7 | sender.Hint = sender.Items[sender.ItemIndex] 8 | end 9 | 10 | function SaveOriginalWidth(sender) 11 | if ComponentsExtraData[sender.Name] == nil then 12 | ComponentsExtraData[sender.Name] = { 13 | Width = sender.Width 14 | } 15 | end 16 | end 17 | 18 | function MakeComponentWider(sender) 19 | if ComponentsExtraData[sender.Name] == nil then return end 20 | 21 | if sender.Width <= ComponentsExtraData[sender.Name]['Width'] then 22 | sender.bringToFront() 23 | sender.Width = sender.Width + 60 24 | end 25 | end 26 | 27 | function MakeComponentShorter(sender) 28 | if ComponentsExtraData[sender.Name] == nil then return end 29 | 30 | if sender.Width > ComponentsExtraData[sender.Name]['Width'] then 31 | sender.sendToBack() 32 | sender.Width = sender.Width - 60 33 | end 34 | end 35 | 36 | -- Make window resizeable 37 | RESIZER= { 38 | allow_resize = false 39 | } 40 | function ResizerMouseDown(sender, button, x, y) 41 | RESIZER = { 42 | allow_resize = true, 43 | w = sender.Owner.Width, 44 | h = sender.Owner.Height, 45 | mx = x, 46 | my = y 47 | } 48 | end 49 | 50 | function ResizerMouseMove(sender, x, y) 51 | if RESIZER['allow_resize'] then 52 | RESIZER['w'] = x - RESIZER['mx'] + sender.Owner.Width 53 | RESIZER['h'] = y - RESIZER['my'] + sender.Owner.Height 54 | end 55 | end 56 | function ResizerMouseUp(sender, button, x, y) 57 | RESIZER['allow_resize'] = false 58 | sender.Owner.Width = RESIZER['w'] 59 | sender.Owner.Height = RESIZER['h'] 60 | end 61 | 62 | -- stay on top 63 | function AlwaysOnTopClick(sender) 64 | if sender.Owner.FormStyle == "fsNormal" then 65 | sender.Owner.AlwaysOnTop.Visible = false 66 | sender.Owner.AlwaysOnTopOn.Visible = true 67 | sender.Owner.FormStyle = "fsSystemStayOnTop" 68 | else 69 | sender.Owner.AlwaysOnTop.Visible = true 70 | sender.Owner.AlwaysOnTopOn.Visible = false 71 | sender.Owner.FormStyle = "fsNormal" 72 | end 73 | end 74 | 75 | 76 | -- load player head 77 | -- return string stream 78 | function load_headshot(playerid, headtypecode, haircolorcode) 79 | if not playerid then 80 | return load_img('heads/notfound.png', 'https://fifatracker.net/static/img/assets/common/heads/notfound.png') 81 | end 82 | 83 | local fpath = nil 84 | local iplayerid = tonumber(playerid) 85 | 86 | if iplayerid < 280000 then 87 | -- heads 88 | fpath = string.format('heads/p%d.png', playerid) 89 | else 90 | -- youthheads 91 | if headtypecode == 0 then 92 | fpath = string.format('youthheads/p%d.png', haircolorcode) 93 | else 94 | fpath = string.format('youthheads/p%d%02d.png', headtypecode, haircolorcode) 95 | end 96 | end 97 | local url = string.format('https://fifatracker.net/static/img/assets/%d/%s', FIFA, fpath) 98 | local img_ss = load_img(fpath, url) 99 | 100 | -- If file is not a png file use notfound.png 101 | if not img_ss then return load_img('heads/notfound.png', 'https://fifatracker.net/static/img/assets/common/heads/notfound.png') end 102 | 103 | return img_ss 104 | end 105 | 106 | function load_crest(teamid) 107 | local fpath = string.format('crest/l%d.png', teamid) 108 | local url = string.format('https://fifatracker.net/static/img/assets/%d/%s', FIFA, fpath) 109 | 110 | local img_ss = load_img(fpath, url) 111 | 112 | -- If file is not a png file use notfound.png 113 | if not img_ss then return load_img('crest/notfound.png', 'https://fifatracker.net/static/img/assets/common/crest/notfound.png') end 114 | 115 | return img_ss 116 | end 117 | 118 | function get_btn_img() 119 | return { 120 | [["1754506F727461626C654E6574776F726B47726170686963EF06000089504E47 121 | 0D0A1A0A0000000D49484452000000A10000003808060000009538983D000000 122 | 06624B4744003400380043684F013B000000097048597300000B1300000B1301 123 | 009A9C180000000774494D4507E20C17101611F568A45B0000001D6954587443 124 | 6F6D6D656E7400000000004372656174656420776974682047494D50642E6507 125 | 000006534944415478DAED9CCB6EDB461486FF2147BE418ED216E80304685114 126 | 419779892EB269BA2CFA127D893E491FA0AFD15D964552340810A78E2D4B8C6C 127 | 5DC8D38586D2703437522265CBE70084645EADE177AE431E808565CF221AEE27 128 | 78E8581C4281BF374446C2278CEF0C228B0F40B2004875215C81F6EC9BE7DF12 129 | 91E8F7073FA652FE2C44F21CC0298F777B2E89026E871C1680EE816520604254 130 | BCCEF3FC8F6C74FD2744426FFF7EFDC607A3F48C470220C9F35C0E9E7EF55B9A 131 | CA5F1895EE7C58681B35384F5DA5A09A0AA494E04C88E445229317E7832F7FB8 132 | 195EFE0E200550A865E3D48907C01480ECF7072F1940568AD0BE647C2700692A 133 | 7FEDF79FBE54C62ED578133E082B0002384965EFA7EAA977B9F87E826B9F5DEB 134 | 3C4B9B227BBD57004E2C205ADD71997C94101E03384B12F15D37FA460DF66913 135 | 4411792D61D92EB408CDFC7C64B1AE10DF0338B35899D5A049CB8826007A8ADE 136 | 7321C4093BA4BAFB5144B2D845AA439EF5A293944688E404C0B98A07732D3624 137 | D3129A56F048D13B608772684A447BF02A180098AB65614048B6C4446A103EE1 138 | 9BC9B20379A2783A527CE975E74A90685AC2A5196D922BC4EC678D0E38E73850 139 | 39C7B2B67C644B4E5C898954109E6D952BC482D53688AE3028B40D815089B051 140 | 2463B1CA994A74A5E2AB62095D898954C9C9F141854754735B8C32EC4A716C79 141 | 842FB74020F1BE5F4A71AC78D2215CFD121784AB5A216D317E75C7E2511B93A6 142 | D322D4E0F836126FE1F5303DCD0D3B2DA130EEBF1E1F06F1A01D1A88B6C34101 143 | 7B45CF358EAC340D15A6AA1C254BC23664AEB9632D3EECBAC6651678017B4DCB 144 | 15B8F90235021963B06D299C5A1E0104BC6DAC02ED59614CEB277C108AC890BC 145 | E3008E22D56E5768D54506081786E33188CDD3EAFECA2ECD88E39AD601906069 146 | C137B970DA57EDC9655B2962BFD84C68BD9DFC5C4643C80FAE1EA4A2C4DAD618 147 | CFB2BB87C912BE412CFB168690852164610927261411EF86C2505FE18DA7BB18 148 | C25612C35DAD6F33518C4922434AC20A740F207CC889626C12197B4CDB0AE37B 149 | 80FB817B1959FFAEB90AB0B6C7D95DFB77F764EFC1284CD3B9D12E6BF340A3FA 150 | BCAC6F38FCEF370BF5B9FE3FAAFB95A5CC72026DFD7F9215C7D8776CAB7FDB94 151 | 2166445DD381AEA2ED23578C186F423B80B00BE5AD3B2917DE8F6A8E585589D6 152 | C891B10769A89277C6DA87B03B400DF95FD433310FE4252B9EB6DBC2C36D33A3 153 | 1DDE23EEEA2E9BBF46982A0A150A239B6574B10AC4101EB4D2C42A40F36770DB 154 | 7BBA978BD52C7B178690852164616108591E008475FA1A35F9AC13FBB21CA434 155 | 98318948D1829F2A9D276C1615C857646E50EB8A7D95D25711E7099DBD40D8F2 156 | F3E81DCE41592F65A1901CC0974A41A18BECE8DDBCD08C27B05DFDFA215AC282 157 | 284F84480F4BF7EABE47472D9CB3C665C9A63CDA7732BD880B7AD7F60604473E 158 | 8D44459E877E78121A82F97C366487711F95872C81BBEB7B687B6CF0AF2DE44A 159 | 0EB0DE4684F9ACC20FC52626FA598B4976F3AEAD3EADBE3C0711EBB887D27D54 160 | 92EA9DC8B2D1BF58B782B3867989E3685207E6D9F8E67D361E5EECF7A7D8D76D 161 | A9CB5B3537AEDB588C62BCED8121391A0D3F64E3E17BAC1B645A6FA3B48C55A1 162 | 1DB48010F9D5E5C53F7777B7E8F7075F1C1D9FF49224E1EE173520EB12C49850 163 | 2DA6E6D0B430901705CDA677F36C3CBCFA9C8DDE2669BAC0B239A6D9A5954210 164 | 96074EAF2E3FFC05E0D9F0FABFCF00BEC6B2EBE629D68DB01BD64E580E4C3F73 165 | C5CD2D801B001F01BC03F006C0148E2EAD00485A3C5B09E114C004400660A44E 166 | 5CB68A9B63DD694930841C082A08E78A991BB58C143F13C5D32264094973C333 167 | 45F418C035803E965D36A14E56B67E6508597408671A841F015C2A7EC68AA799 168 | E696BD31E1423BD908C0270DC0995AA7439830848F1EC2C28070A400BC50FC8C 169 | D4FA99E2CB6A09CB15858568A9019829AB788A6AE3438690212CDDF1ADE2E45A 170 | 01F8497134312CE10A445762320770A79570F480B3EC3FCC31218B2D262C7389 171 | B1964B8C154F732331B1C684BA359C6A7F9701E710CB86EAA615640819C2C200 172 | F156313351004E6D56D0660961048D6498D9236CF61FE6120D435872A38338D3 173 | 96B24EB89194B8E031DA05AFBAF9A7067C0C208B0BC442836E81CD22358520D4 174 | D7EB300AC3FD72234D169B5BD6DD3321306F1C03900923183E96088BE87A4CC7 175 | 0B1922610403C812092242F06D031303C8521744AFFC0F3D137F292D74570B00 176 | 00000049454E44AE426082"]] 177 | } 178 | end 179 | 180 | -- load img 181 | -- return string stream 182 | function load_img(path, url) 183 | local img = nil 184 | 185 | local f=io.open(CACHE_DIR .. path, "rb") 186 | if f ~= nil then 187 | -- load from cache_dir 188 | img = f:read("*a") 189 | io.close(f) 190 | else 191 | -- load from internet and save in cache_dir 192 | local int=getInternet() 193 | img=int.getURL(url) 194 | int.destroy() 195 | -- If file is not a png file 196 | if img == nil or string.sub(img, 2, 4) ~= 'PNG' then 197 | return false 198 | end 199 | f, err=io.open(CACHE_DIR .. path, "w+b") 200 | if f then 201 | f:write(img) 202 | io.close(f) 203 | else 204 | do_log('Error opening img file: ' .. CACHE_DIR .. path) 205 | if err then 206 | do_log('Error - ' .. err) 207 | end 208 | end 209 | end 210 | return createStringStream(img) 211 | end 212 | 213 | function convert_from_days(days) 214 | if not days then return nil end 215 | 216 | local result = FIFA_EPOCH_TIME + (tonumber(days)*24*60*60) 217 | if result < 1 then 218 | -- For very old players return 1 (age around 50) 219 | result = 1 220 | end 221 | 222 | return result 223 | end 224 | 225 | function days_to_date(args) 226 | local comp_desc = args['comp_desc'] 227 | 228 | local fifa_date_rec_id = comp_desc['id'] 229 | return os.date("%d/%m/%Y", convert_from_days(ADDR_LIST.getMemoryRecordByID(fifa_date_rec_id).Value)) 230 | end 231 | 232 | function convert_to_days(date) 233 | return math.floor((date - FIFA_EPOCH_TIME) / (24*60*60)) 234 | end 235 | 236 | function date_to_days(args) 237 | local component = args['component'] 238 | local d, m, y = string.match(component.Text, "(%d+)/(%d+)/(%d+)") 239 | if (not d) or (not m) or (not y) then 240 | do_log(string.format("Invalid date format in %s component: %s doesn't match DD/MM/YYYY pattern", component.Name, component.Text), 'ERROR') 241 | return 157195 -- 03/03/2013 242 | end 243 | 244 | local new_date = os.time{ 245 | year=tonumber(y), 246 | month=tonumber(m), 247 | day=tonumber(d) 248 | } 249 | return convert_to_days(new_date) 250 | end -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/matchfixingform/helpers.lua: -------------------------------------------------------------------------------- 1 | -- Match fixing 2 | function clear_match_fixing_containers() 3 | for i=0, MatchFixingForm.MatchFixingScroll.ComponentCount-1 do 4 | MatchFixingForm.MatchFixingScroll.Component[0].destroy() 5 | end 6 | end 7 | 8 | function need_match_fixing_sync() 9 | if readInteger("arr_fixedGamesData") == MatchFixingForm.MatchFixingScroll.ComponentCount then 10 | return false 11 | end 12 | return true 13 | end 14 | 15 | local CallAfterDeleteFixedMatchTimer = createTimer(nil) 16 | function call_after_delete_fixed_match() 17 | timer_setEnabled(CallAfterDeleteFixedMatchTimer, false) 18 | clear_match_fixing_containers() 19 | create_match_fixing_containers() 20 | end 21 | 22 | function delete_match_fix(sender) 23 | if need_match_fixing_sync() then 24 | ShowMessage("Close this and try again after 2s.") 25 | timer_onTimer(CallAfterDeleteFixedMatchTimer, call_after_delete_fixed_match) 26 | timer_setInterval(CallAfterDeleteFixedMatchTimer, 250) 27 | timer_setEnabled(CallAfterDeleteFixedMatchTimer, true) 28 | return 29 | end 30 | 31 | if messageDialog("Are you sure you want to delete this match fix?", mtInformation, mbYes,mbNo) == mrNo then 32 | return 33 | end 34 | 35 | local num_of_fixed_fixtures = readInteger("arr_fixedGamesData") 36 | local id, _ = string.gsub(sender.Name, "%D", '') 37 | id = tonumber(id) 38 | 39 | local bytecount = ((num_of_fixed_fixtures - id) * 16) + 16 40 | local bytes = readBytes(string.format('arr_fixedGamesData+%s', string.format('%X', id * 16 + 4)), bytecount, true) 41 | writeBytes(string.format('arr_fixedGamesData+%s', string.format('%X', (id-1) * 16 + 4)), bytes) 42 | 43 | writeInteger("arr_fixedGamesData", num_of_fixed_fixtures-1) 44 | timer_onTimer(CallAfterDeleteFixedMatchTimer, call_after_delete_fixed_match) 45 | timer_setInterval(CallAfterDeleteFixedMatchTimer, 250) 46 | timer_setEnabled(CallAfterDeleteFixedMatchTimer, true) 47 | end 48 | 49 | 50 | function create_match_fixing_container(i) 51 | local max_in_row = 3 52 | -- Container 53 | local caption = "" 54 | local row = i//max_in_row 55 | local row_i = (i - max_in_row * row) 56 | 57 | local match_fix_container = createPanel(MatchFixingForm.MatchFixingScroll) 58 | match_fix_container.Name = string.format('MatchFixContainerPanel%d', i+1) 59 | match_fix_container.BevelOuter = bvNone 60 | match_fix_container.Caption = '' 61 | 62 | match_fix_container.Color = '0x00302825' 63 | match_fix_container.Width = 250 64 | match_fix_container.Height = 125 65 | match_fix_container.Left = 10 + 250*row_i 66 | match_fix_container.Top = 60 + 125*row 67 | match_fix_container.OnClick = delete_match_fix 68 | 69 | -- Home Team Badge 70 | local home_teamid = readInteger(string.format('arr_fixedGamesData+%s', string.format('%X', i * 16 + 4))) 71 | 72 | local home_badgeimg = createImage(match_fix_container) 73 | local ss_c = load_crest(home_teamid) 74 | home_badgeimg.Picture.LoadFromStream(ss_c) 75 | ss_c.destroy() 76 | 77 | home_badgeimg.Name = string.format('FixingHomeTeamImage%d', i+1) 78 | home_badgeimg.Left = 10 79 | home_badgeimg.Top = 10 80 | home_badgeimg.Height = 75 81 | home_badgeimg.Width = 75 82 | home_badgeimg.Stretch = true 83 | home_badgeimg.OnClick = delete_match_fix 84 | 85 | -- Home TeamID Label 86 | local home_teamid_label = createLabel(match_fix_container) 87 | 88 | if home_teamid == 4294967295 then 89 | caption = 'Any' 90 | else 91 | caption = home_teamid 92 | end 93 | home_teamid_label.Name = string.format('FixingHomeTeamIDLabel%d', i+1) 94 | home_teamid_label.Visible = true 95 | home_teamid_label.Caption = caption 96 | home_teamid_label.AutoSize = false 97 | home_teamid_label.Width = 75 98 | home_teamid_label.Height = 19 99 | home_teamid_label.Left = 10 100 | home_teamid_label.Top = 95 101 | home_teamid_label.Font.Size = 11 102 | home_teamid_label.Font.Color = '0xC0C0C0' 103 | home_teamid_label.Alignment = 'taCenter' 104 | home_teamid_label.OnClick = delete_match_fix 105 | 106 | -- Away Team Badge 107 | local away_teamid = readInteger(string.format('arr_fixedGamesData+%s', string.format('%X', i * 16 + 8))) 108 | 109 | local away_badgeimg = createImage(match_fix_container) 110 | local ss_c = load_crest(away_teamid) 111 | away_badgeimg.Picture.LoadFromStream(ss_c) 112 | ss_c.destroy() 113 | 114 | away_badgeimg.Name = string.format('FixingAwayTeamImage%d', i+1) 115 | away_badgeimg.Left = 165 116 | away_badgeimg.Top = 10 117 | away_badgeimg.Height = 75 118 | away_badgeimg.Width = 75 119 | away_badgeimg.Stretch = true 120 | away_badgeimg.OnClick = delete_match_fix 121 | 122 | -- Away TeamID Label 123 | local away_teamid_label = createLabel(match_fix_container) 124 | if away_teamid == 4294967295 then 125 | caption = 'Any' 126 | else 127 | caption = away_teamid 128 | end 129 | 130 | away_teamid_label.Name = string.format('FixingAwayTeamIDLabel%d', i+1) 131 | away_teamid_label.Visible = true 132 | away_teamid_label.Caption = caption 133 | away_teamid_label.AutoSize = false 134 | away_teamid_label.Width = 75 135 | away_teamid_label.Height = 19 136 | away_teamid_label.Left = 165 137 | away_teamid_label.Top = 95 138 | away_teamid_label.Font.Size = 11 139 | away_teamid_label.Font.Color = '0xC0C0C0' 140 | away_teamid_label.Alignment = 'taCenter' 141 | away_teamid_label.OnClick = delete_match_fix 142 | 143 | -- Score Label 144 | local home_goals = readInteger(string.format('arr_fixedGamesData+%s', string.format('%X', i * 16 + 12))) 145 | local away_goals = readInteger(string.format('arr_fixedGamesData+%s', string.format('%X', i * 16 + 16))) 146 | local score_label = createLabel(match_fix_container) 147 | score_label.Name = string.format('FixingScoreResultLabel%d', i+1) 148 | score_label.Visible = true 149 | score_label.Caption = string.format("%d:%d", home_goals, away_goals) 150 | score_label.AutoSize = false 151 | score_label.Width = 60 152 | score_label.Height = 19 153 | score_label.Left = 95 154 | score_label.Top = 40 155 | score_label.Font.Size = 12 156 | score_label.Font.Color = '0xC0C0C0' 157 | score_label.Alignment = 'taCenter' 158 | score_label.OnClick = delete_match_fix 159 | end 160 | 161 | function create_match_fixing_containers() 162 | local num_of_fixed_fixtures = readInteger("arr_fixedGamesData") 163 | 164 | if num_of_fixed_fixtures <= 0 then 165 | return 166 | end 167 | 168 | for i=0, num_of_fixed_fixtures-1 do 169 | create_match_fixing_container(i) 170 | end 171 | end 172 | 173 | -- Fav Teams 174 | 175 | function clear_fav_teams_containers() 176 | for i=0, MatchFixingForm.MatchFixingFavScroll.ComponentCount-1 do 177 | MatchFixingForm.MatchFixingFavScroll.Component[0].destroy() 178 | end 179 | end 180 | 181 | local CallAfterDeleteTimer = createTimer(nil) 182 | function call_after_delete() 183 | timer_setEnabled(CallAfterDeleteTimer, false) 184 | clear_fav_teams_containers() 185 | create_fav_teams_containers() 186 | do_log("Deleted team for favourite teams", "INFO") 187 | end 188 | 189 | function delete_fav_team(sender) 190 | if messageDialog("Are you sure you want to delete this team from your favourite teams?", mtInformation, mbYes,mbNo) == mrNo then 191 | return 192 | end 193 | 194 | local fav_teams = readInteger("arr_fixedGamesAlwaysWin") 195 | local id, _ = string.gsub(sender.Name, "%D", '') 196 | id = tonumber(id) 197 | 198 | if type(CFG_DATA.fav_teams) == 'table' then 199 | local tid = tonumber( 200 | MatchFixingForm.MatchFixingFavScroll[string.format('FavTeamContainerPanel%d', id)][string.format('FavTeamIDLabel%d', id)].Caption 201 | ) 202 | local new_fav_teams = {} 203 | for i, val in ipairs(CFG_DATA.fav_teams) do 204 | if val ~= tid then 205 | table.insert(new_fav_teams, val) 206 | end 207 | end 208 | CFG_DATA.fav_teams = new_fav_teams 209 | save_cfg() 210 | end 211 | 212 | local bytecount = ((fav_teams - id) * 4) + 4 213 | local bytes = readBytes(string.format('arr_fixedGamesAlwaysWin+%s', string.format('%X', id * 4 + 4)), bytecount, true) 214 | writeBytes(string.format('arr_fixedGamesAlwaysWin+%s', string.format('%X', id * 4)), bytes) 215 | 216 | writeInteger("arr_fixedGamesAlwaysWin", fav_teams-1) 217 | timer_onTimer(CallAfterDeleteTimer, call_after_delete) 218 | timer_setInterval(CallAfterDeleteTimer, 250) 219 | timer_setEnabled(CallAfterDeleteTimer, true) 220 | end 221 | 222 | function create_fav_teams_container(i, teamid) 223 | local max_in_row = 8 224 | -- Container 225 | local row = i//max_in_row 226 | local row_i = (i - max_in_row * row) 227 | 228 | local fav_team_container = createPanel(MatchFixingForm.MatchFixingFavScroll) 229 | fav_team_container.Name = string.format('FavTeamContainerPanel%d', i+1) 230 | fav_team_container.BevelOuter = bvNone 231 | fav_team_container.Caption = '' 232 | 233 | fav_team_container.Color = '0x00302825' 234 | fav_team_container.Width = 100 235 | fav_team_container.Height = 100 236 | fav_team_container.Left = 10 + 100*row_i 237 | fav_team_container.Top = 60 + 110*row 238 | fav_team_container.OnClick = delete_fav_team 239 | 240 | -- Team Badge 241 | if teamid == nil then 242 | teamid = readInteger(string.format('arr_fixedGamesAlwaysWin+%s', string.format('%X', i * 4 + 4))) 243 | end 244 | 245 | local badgeimg = createImage(fav_team_container) 246 | local ss_c = load_crest(teamid) 247 | badgeimg.Picture.LoadFromStream(ss_c) 248 | ss_c.destroy() 249 | 250 | badgeimg.Name = string.format('FavTeamImage%d', i+1) 251 | badgeimg.Left = 12 252 | badgeimg.Top = 0 253 | badgeimg.Height = 75 254 | badgeimg.Width = 75 255 | badgeimg.Stretch = true 256 | badgeimg.OnClick = delete_fav_team 257 | 258 | -- TeamID 259 | local teamid_label = createLabel(fav_team_container) 260 | teamid_label.Name = string.format('FavTeamIDLabel%d', i+1) 261 | teamid_label.Visible = true 262 | teamid_label.Caption = teamid 263 | teamid_label.AutoSize = false 264 | teamid_label.Width = 100 265 | teamid_label.Height = 19 266 | teamid_label.Left = 0 267 | teamid_label.Top = 80 268 | teamid_label.Font.Size = 11 269 | teamid_label.Font.Color = '0xC0C0C0' 270 | teamid_label.Alignment = 'taCenter' 271 | teamid_label.OnClick = delete_fav_team 272 | end 273 | function create_fav_teams_containers() 274 | local fav_teams = readInteger("arr_fixedGamesAlwaysWin") 275 | 276 | if fav_teams <= 0 then 277 | return 278 | end 279 | 280 | for i=0, fav_teams-1 do 281 | create_fav_teams_container(i) 282 | end 283 | end 284 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | FIFA 19 - Career mode Cheat Table 2 | 3 | Changelog: 4 | 5 | v1.0.0: 6 | - Scripts in this version: https://trello.com/b/olhWeL54/v100 7 | - Changes since FIFA 18 - Career mode Cheat Table: 8 | - I've added dropdown selection options for values inside database tables. 9 | - 3 new fields in Players Table -> 'faceposerpreset', 'skillmoveslikelihood', 'headassetid' 10 | - 1 new field in Manager Table -> 'faceposerpreset' 11 | - Fixed popup when you release a player for free. It should display 0€ now. 12 | - "Unlock edit player" should work in player career mode now 13 | - Scouts Management -> refactored (https://i.imgur.com/AORZsOZ.png). Added detailed info about each scout available for hire. 14 | - Teamkits Table - 4 new fields -> 'chestbadge', 'captainarmband', 'jerseyleftsleevebadge', 'jerseyrightsleevebadge' 15 | - Added some sections to teamkits table. 16 | 17 | v1.0.1: 18 | - Added filter for manager table (It should be possible to edit managerhead via game news panel) 19 | - Added Youth Academy (There is still problem with '100% chance for 5* skill moves' will be fixed later...) 20 | - Added Unlimited Training Sessions 21 | - Added Training Everyday 22 | 23 | v1.0.2: 24 | - Added Side Changer (Just remember that you need to change Controller ID from '0' to '4' if you are playing on keyboard) 25 | - Added '5 star skill moves'. To 'In-Game Hacks' 26 | - Added Player Contract (same as last year) 27 | - Added Transfer HUB (same as last year) 28 | - Added Transfer Window Configuration (Changes in transfer.ini and transfers.ini has been made by EA, we need to wait for FrostyTool) 29 | - Added More efficient training (Edit script to match your preferences, by default it's only slightly better than EA config.) 30 | 31 | v1.0.3: 32 | - Fixed 'MIN_PLAYER_AGE_FOR_PROMOTION = 12' 33 | - Fixed trait names 34 | - Added Unlimited Substitutions/Disable Substitutions 35 | - Added script for maniuplating Match score 36 | - Added 'Home/Away Team Injured players' 37 | - Added pointers for player name and birthdate to "Edit Player" 38 | - Added "Edit Job Offer" 39 | - Added "career_managerpref Table" & "teamstadiumlinks Table" 40 | - Added "Change Stadium", "Half Length", "Weather" to "Match Settings" 41 | - Added "More efficient training (10x)" 42 | 43 | v1.0.4: 44 | - Fixed editing player name (Pointer shouldn't point on nullbyte anymore) 45 | - Added "More efficient training (x100)" 46 | - Added "More efficient training (x9999)" 47 | - Added "board.ini" to "Manager" section (Not sure if it's working) 48 | - Added "Manager Rating - 99" to "Manager" section 49 | - Added "seasoncount = 1" to "Manager" section (it's for unlimited career mode) 50 | - Added "joboffer.ini" to "Job Offer" section 51 | - Renamed "Edit Job Offers" script to "Edit Existing Job Offers" and moved it to "Job Offer" section. 52 | - Added "Youth Player Retire At Age = 30" to "Youth Academy" section 53 | - Added "teamplayerlinks Table" to "FIFA Database" 54 | - Added "Unique Player Movement" 55 | - Added "Alt + Tab Disconnect bypass" and now it's called "Dont Pause Game on AltTab" 56 | 57 | v1.0.5: 58 | - Fixed Following scripts: 59 | - Dont Pause Game on AltTab 60 | - Morale 61 | - Unlock "Edit Player" in career menu 62 | 63 | v1.0.6: 64 | - Added "Regens" -> "Disable Player Regens" 65 | - Fixed Following scripts: 66 | - Training Everyday 67 | - Unlimited Training Sessions 68 | - Edit Existing Job Offers 69 | 70 | v1.0.7: 71 | - Game will not longer crash after activating Training Everyday script 72 | - Fixed Following scripts: 73 | - Free & Unlimited Releasing Players 74 | - Edit Player 75 | - Unique Sprint Style 76 | 77 | v1.0.8: 78 | - Fixed Following scripts: 79 | - Free & Unlimited Releasing Players 80 | - Match Settings -> Half Length 81 | - In-Game Hacks -> Match score 82 | 83 | v1.0.9: 84 | - Fixed Following scripts: 85 | - Morale 86 | 87 | v1.0.10: 88 | - Added FIFA Database -> Database Tables -> Teams Table 89 | - Fixed Following scripts: 90 | - Edit Player 91 | - Edit Existing Job Offers 92 | - Unique Sprint Style 93 | 94 | v1.0.11: 95 | - Fixed Following scripts: 96 | - Edit Player 97 | - Edit Existing Job Offers 98 | - Unique Sprint Style 99 | - In-Game Hacks 100 | - Added 'Non-CM Related' section. Here will be all scripts which are not strict related to career mode only. 101 | - Added 'CreatePlayerMax = 999' to 'Non-CM Related'. This should allow you to create 999 players, instead of 30. 102 | - Moved 'Dont Pause Game on AltTab' to 'Non-CM Related' 103 | - Added missing 'Salah' bodytype to dropdown options 104 | - Added missing hair colors to dropdown options 105 | - Added all nationalities to dropdown options 106 | - Added pointer for "Jersey Number" to "Editing Player"->"Edit Player" 107 | - Added 'Form' -> 'Disable form' (Didn't tested) 108 | 109 | v1.1.0: 110 | - Added GUI 111 | - Removed unnecessary 'More efficient training' scripts. 112 | 113 | v1.1.2: 114 | - Offsets with numbers only are now converted to string. 115 | - Fixed problem in LIP with parsing some hex offsets to '1.#INF' 116 | 117 | v1.1.3: 118 | - Added 'Head Class Code' to GUI 119 | - Another fix in LIP (invalid interpetation of offsets) 120 | - Added hotkey for 'Search player by ID'. It's 'Enter' be default, can be changed in settings. 121 | - Added 'Clear Cached Files' and 'Restore Default Settings' buttons to main settings. 122 | 123 | v1.1.4: 124 | - Game will not longer crash after deactivating "Dont Pause Game on AltTab" script 125 | - You don't need to be in main menu to activate cheat table anymore. You can run cheat table even before you run FIFA. 126 | 127 | v1.1.5: 128 | - Fixed bug causing not displaying minifaces of a players with headtypecode == 0 129 | - Added icons bodytypecodes to the dropdown 130 | - Detecting if cheat table is not unziped (error will be displayed) 131 | 132 | v1.1.6: 133 | - Minor bug fixes 134 | 135 | v1.1.7: 136 | - Fixed "Database Tables" Script. 137 | 138 | v1.1.8: 139 | - Added Cheat Table installer. 140 | - Added 'Play As Player' Section. All scripts for player career mode will be added here for now. 141 | - Added 'Positive decision on transfer request' script to 'Play As Player'. 142 | - Added 'Edit Transfer Bid' script to 'Play As Player'. 143 | - Fixed '100% chance for 5* skill moves' script. 144 | - Added 'users lua scripts' folder with 'randomize.lua' and 'untuck_shirts.lua' 145 | 146 | v1.1.9: 147 | - Added 'cmsettings.ini', You can increase max size of your squad. Use at your own risk. 148 | - Added 'Multiplier' to 'More efficient training' 149 | 150 | v1.2.0: 151 | - Fixed 'Transfer.ini & Transfers.ini' script 152 | - Added 'Time Of Day' to 'Match Settings' 153 | - Added 'Disable player growth and decline' script. 154 | - Added 'make everyone 16 (or any other age).lua' to 'users lua scripts' 155 | - Added 'all regens (makes everyone retire).lua' to 'users lua scripts' 156 | - 'cmsettings.ini' contains default settings now. 157 | 158 | v1.2.1: 159 | - Fixed 'Half Length' script 160 | - Removed 'all regens (makes everyone retire).lua' script. (It was causing game crashes on 2nd season) 161 | 162 | v1.2.2: 163 | - Fixed 'PRIMARY_ATTRIBUTES_RANGE' script. 164 | 165 | v1.2.3: 166 | - Added "FIXTURE EDITOR" (HOW TO USE: http://bit.ly/schedule-editor-19) 167 | - Added 'Pin' icon to all GUI forms. Use to make window stay always on top 168 | - Added 'Resize' icon to all GUI forms (bottom right corner). You can resize any form. 169 | - Fixed calulating player ovr in GUI (replaced math.floor with math.round Im still not including int. rep.) 170 | 171 | v1.2.4: 172 | - Added 'randomize_shoe_models.lua' script to 'users lua scripts' 173 | - Fixed: Player current age will not be reset anymore if you 'Apply changes' in GUI. 174 | 175 | v1.2.5: 176 | - Added description in all scripts. To see it you need to right click on script -> 'Change Script'. 177 | - Minor bug fixes in GUI 178 | 179 | v1.2.6: 180 | - Fixed in Schedule Editor: 181 | - League games are now displayed correctly if the month contains national team games. 182 | - Form is not pinned by default anymore 183 | 184 | v1.2.7: 185 | - Added 'Clone' option to player editor (You can copy data from FUT card to any of your CM players) 186 | 187 | v1.2.8: 188 | - Added 'Generate players with custom ID' script to 'Youth Academy' section 189 | 190 | v1.2.9: 191 | - Added 'Free Fly Camera' script to 'Non-CM Related' section 192 | 193 | v1.3.0: 194 | - 'Free Fly Camera' is also working with gamepad now. 195 | - Fixed bug in player editor. Now you can edit players through GUI even if you don't have internet connection. 196 | 197 | v1.3.1: 198 | - CE 6.8.3 is now required to use Cheat Table. 199 | - Added 'Generate new report' script to 'Youth Academy' section 200 | - Added pagination to FUT Clone 201 | - Added "Don't copy attributes" checkbox to FUT Clone 202 | - 'randomize_shoe_models.lua' script will not also set shoedesigncode on 0. 203 | - Added 'medium_socklenghtcode.lua' to 'users lua scripts' 204 | - Minor bug fixes in GUI 205 | 206 | v1.3.2: 207 | - Cheat Table is again working with older CE versions (For sure 6.8.1 and above) 208 | - Added 'Tranfer Players' feature. 209 | - Fixed 'Free fly camera' script. 210 | - Minor bug fixes in GUI & lua code... 211 | 212 | v1.3.3: 213 | - Added info about player injury and stamina to GUI ("Player Editor" -> "Player Info") 214 | - Added info about player total stats to GUI ("Player Editor" -> "Attributes") 215 | - Minor bug fixes in GUI & lua code. 216 | 217 | v1.3.4: 218 | - Fixed "Unique Player Movement" scripts 219 | - Added more players to "Unique Player Movement" -> "Unique Sprint Style" 220 | - Added option letting you change birthdate year in player career mode to "Play As Player" section 221 | - Added accomplishments to "Play As Player". 222 | - Added 'is_retiring=0.lua' to 'users lua scripts' 223 | 224 | v1.3.5: 225 | - Added info about player form and option to edit it through GUI. Only for players in your team ("Player Editor" -> "Player Info") 226 | - Added info about player morale and option to edit it through GUI. Only for players in your team ("Player Editor" -> "Player Info") 227 | - Added info about player release clause and option to add/remove/edit it through GUI. ("Player Editor" -> "Player Info") 228 | - Added "Mass edit players form in team" script to "Form" section. 229 | 230 | v1.3.6: 231 | - Added option to show/hide main window of cheat engine 232 | - Cheat engine memory scanner is now hidden by default 233 | - Minor bug fixes in GUI 234 | 235 | v1.3.7: 236 | - Added check for new updates of the cheat table at startup 237 | 238 | v1.3.8: 239 | - Added option to edit score of simulated games. (Match-fixing in GUI) 240 | - Minor bug fixes and imporovements... 241 | 242 | v1.3.9: 243 | - Added "Create Transfer Offer" script to "Play As Player" section 244 | 245 | v1.4.0: 246 | - Fixed "release clause" in "Player Editor" -> "Player Info" 247 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/requirements/json.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- json.lua 3 | -- 4 | -- Copyright (c) 2019 rxi 5 | -- 6 | -- Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | -- this software and associated documentation files (the "Software"), to deal in 8 | -- the Software without restriction, including without limitation the rights to 9 | -- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 10 | -- of the Software, and to permit persons to whom the Software is furnished to do 11 | -- so, subject to the following conditions: 12 | -- 13 | -- The above copyright notice and this permission notice shall be included in all 14 | -- copies or substantial portions of the Software. 15 | -- 16 | -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | -- SOFTWARE. 23 | -- 24 | 25 | local json = { _version = "0.1.1" } 26 | 27 | ------------------------------------------------------------------------------- 28 | -- Encode 29 | ------------------------------------------------------------------------------- 30 | 31 | local encode 32 | 33 | local escape_char_map = { 34 | [ "\\" ] = "\\\\", 35 | [ "\"" ] = "\\\"", 36 | [ "\b" ] = "\\b", 37 | [ "\f" ] = "\\f", 38 | [ "\n" ] = "\\n", 39 | [ "\r" ] = "\\r", 40 | [ "\t" ] = "\\t", 41 | } 42 | 43 | local escape_char_map_inv = { [ "\\/" ] = "/" } 44 | for k, v in pairs(escape_char_map) do 45 | escape_char_map_inv[v] = k 46 | end 47 | 48 | 49 | local function escape_char(c) 50 | return escape_char_map[c] or string.format("\\u%04x", c:byte()) 51 | end 52 | 53 | 54 | local function encode_nil(val) 55 | return "null" 56 | end 57 | 58 | 59 | local function encode_table(val, stack) 60 | local res = {} 61 | stack = stack or {} 62 | 63 | -- Circular reference? 64 | if stack[val] then error("circular reference") end 65 | 66 | stack[val] = true 67 | 68 | if rawget(val, 1) ~= nil or next(val) == nil then 69 | -- Treat as array -- check keys are valid and it is not sparse 70 | local n = 0 71 | for k in pairs(val) do 72 | if type(k) ~= "number" then 73 | error("invalid table: mixed or invalid key types") 74 | end 75 | n = n + 1 76 | end 77 | if n ~= #val then 78 | error("invalid table: sparse array") 79 | end 80 | -- Encode 81 | for i, v in ipairs(val) do 82 | table.insert(res, encode(v, stack)) 83 | end 84 | stack[val] = nil 85 | return "[" .. table.concat(res, ",") .. "]" 86 | 87 | else 88 | -- Treat as an object 89 | for k, v in pairs(val) do 90 | if type(k) ~= "string" then 91 | error("invalid table: mixed or invalid key types") 92 | end 93 | table.insert(res, encode(k, stack) .. ":" .. encode(v, stack)) 94 | end 95 | stack[val] = nil 96 | return "{" .. table.concat(res, ",") .. "}" 97 | end 98 | end 99 | 100 | 101 | local function encode_string(val) 102 | return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"' 103 | end 104 | 105 | 106 | local function encode_number(val) 107 | -- Check for NaN, -inf and inf 108 | if val ~= val or val <= -math.huge or val >= math.huge then 109 | error("unexpected number value '" .. tostring(val) .. "'") 110 | end 111 | return string.format("%.14g", val) 112 | end 113 | 114 | 115 | local type_func_map = { 116 | [ "nil" ] = encode_nil, 117 | [ "table" ] = encode_table, 118 | [ "string" ] = encode_string, 119 | [ "number" ] = encode_number, 120 | [ "boolean" ] = tostring, 121 | } 122 | 123 | 124 | encode = function(val, stack) 125 | local t = type(val) 126 | local f = type_func_map[t] 127 | if f then 128 | return f(val, stack) 129 | end 130 | error("unexpected type '" .. t .. "'") 131 | end 132 | 133 | 134 | function json.encode(val) 135 | return ( encode(val) ) 136 | end 137 | 138 | 139 | ------------------------------------------------------------------------------- 140 | -- Decode 141 | ------------------------------------------------------------------------------- 142 | 143 | local parse 144 | 145 | local function create_set(...) 146 | local res = {} 147 | for i = 1, select("#", ...) do 148 | res[ select(i, ...) ] = true 149 | end 150 | return res 151 | end 152 | 153 | local space_chars = create_set(" ", "\t", "\r", "\n") 154 | local delim_chars = create_set(" ", "\t", "\r", "\n", "]", "}", ",") 155 | local escape_chars = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u") 156 | local literals = create_set("true", "false", "null") 157 | 158 | local literal_map = { 159 | [ "true" ] = true, 160 | [ "false" ] = false, 161 | [ "null" ] = nil, 162 | } 163 | 164 | 165 | local function next_char(str, idx, set, negate) 166 | for i = idx, #str do 167 | if set[str:sub(i, i)] ~= negate then 168 | return i 169 | end 170 | end 171 | return #str + 1 172 | end 173 | 174 | 175 | local function decode_error(str, idx, msg) 176 | local line_count = 1 177 | local col_count = 1 178 | for i = 1, idx - 1 do 179 | col_count = col_count + 1 180 | if str:sub(i, i) == "\n" then 181 | line_count = line_count + 1 182 | col_count = 1 183 | end 184 | end 185 | error( string.format("%s at line %d col %d", msg, line_count, col_count) ) 186 | end 187 | 188 | 189 | local function codepoint_to_utf8(n) 190 | -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa 191 | local f = math.floor 192 | if n <= 0x7f then 193 | return string.char(n) 194 | elseif n <= 0x7ff then 195 | return string.char(f(n / 64) + 192, n % 64 + 128) 196 | elseif n <= 0xffff then 197 | return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128) 198 | elseif n <= 0x10ffff then 199 | return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128, 200 | f(n % 4096 / 64) + 128, n % 64 + 128) 201 | end 202 | error( string.format("invalid unicode codepoint '%x'", n) ) 203 | end 204 | 205 | 206 | local function parse_unicode_escape(s) 207 | local n1 = tonumber( s:sub(3, 6), 16 ) 208 | local n2 = tonumber( s:sub(9, 12), 16 ) 209 | -- Surrogate pair? 210 | if n2 then 211 | return codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000) 212 | else 213 | return codepoint_to_utf8(n1) 214 | end 215 | end 216 | 217 | 218 | local function parse_string(str, i) 219 | local has_unicode_escape = false 220 | local has_surrogate_escape = false 221 | local has_escape = false 222 | local last 223 | for j = i + 1, #str do 224 | local x = str:byte(j) 225 | 226 | if x < 32 then 227 | decode_error(str, j, "control character in string") 228 | end 229 | 230 | if last == 92 then -- "\\" (escape char) 231 | if x == 117 then -- "u" (unicode escape sequence) 232 | local hex = str:sub(j + 1, j + 5) 233 | if not hex:find("%x%x%x%x") then 234 | decode_error(str, j, "invalid unicode escape in string") 235 | end 236 | if hex:find("^[dD][89aAbB]") then 237 | has_surrogate_escape = true 238 | else 239 | has_unicode_escape = true 240 | end 241 | else 242 | local c = string.char(x) 243 | if not escape_chars[c] then 244 | decode_error(str, j, "invalid escape char '" .. c .. "' in string") 245 | end 246 | has_escape = true 247 | end 248 | last = nil 249 | 250 | elseif x == 34 then -- '"' (end of string) 251 | local s = str:sub(i + 1, j - 1) 252 | if has_surrogate_escape then 253 | s = s:gsub("\\u[dD][89aAbB]..\\u....", parse_unicode_escape) 254 | end 255 | if has_unicode_escape then 256 | s = s:gsub("\\u....", parse_unicode_escape) 257 | end 258 | if has_escape then 259 | s = s:gsub("\\.", escape_char_map_inv) 260 | end 261 | return s, j + 1 262 | 263 | else 264 | last = x 265 | end 266 | end 267 | decode_error(str, i, "expected closing quote for string") 268 | end 269 | 270 | 271 | local function parse_number(str, i) 272 | local x = next_char(str, i, delim_chars) 273 | local s = str:sub(i, x - 1) 274 | local n = tonumber(s) 275 | if not n then 276 | decode_error(str, i, "invalid number '" .. s .. "'") 277 | end 278 | return n, x 279 | end 280 | 281 | 282 | local function parse_literal(str, i) 283 | local x = next_char(str, i, delim_chars) 284 | local word = str:sub(i, x - 1) 285 | if not literals[word] then 286 | decode_error(str, i, "invalid literal '" .. word .. "'") 287 | end 288 | return literal_map[word], x 289 | end 290 | 291 | 292 | local function parse_array(str, i) 293 | local res = {} 294 | local n = 1 295 | i = i + 1 296 | while 1 do 297 | local x 298 | i = next_char(str, i, space_chars, true) 299 | -- Empty / end of array? 300 | if str:sub(i, i) == "]" then 301 | i = i + 1 302 | break 303 | end 304 | -- Read token 305 | x, i = parse(str, i) 306 | res[n] = x 307 | n = n + 1 308 | -- Next token 309 | i = next_char(str, i, space_chars, true) 310 | local chr = str:sub(i, i) 311 | i = i + 1 312 | if chr == "]" then break end 313 | if chr ~= "," then decode_error(str, i, "expected ']' or ','") end 314 | end 315 | return res, i 316 | end 317 | 318 | 319 | local function parse_object(str, i) 320 | local res = {} 321 | i = i + 1 322 | while 1 do 323 | local key, val 324 | i = next_char(str, i, space_chars, true) 325 | -- Empty / end of object? 326 | if str:sub(i, i) == "}" then 327 | i = i + 1 328 | break 329 | end 330 | -- Read key 331 | if str:sub(i, i) ~= '"' then 332 | decode_error(str, i, "expected string for key") 333 | end 334 | key, i = parse(str, i) 335 | -- Read ':' delimiter 336 | i = next_char(str, i, space_chars, true) 337 | if str:sub(i, i) ~= ":" then 338 | decode_error(str, i, "expected ':' after key") 339 | end 340 | i = next_char(str, i + 1, space_chars, true) 341 | -- Read value 342 | val, i = parse(str, i) 343 | -- Set 344 | res[key] = val 345 | -- Next token 346 | i = next_char(str, i, space_chars, true) 347 | local chr = str:sub(i, i) 348 | i = i + 1 349 | if chr == "}" then break end 350 | if chr ~= "," then decode_error(str, i, "expected '}' or ','") end 351 | end 352 | return res, i 353 | end 354 | 355 | 356 | local char_func_map = { 357 | [ '"' ] = parse_string, 358 | [ "0" ] = parse_number, 359 | [ "1" ] = parse_number, 360 | [ "2" ] = parse_number, 361 | [ "3" ] = parse_number, 362 | [ "4" ] = parse_number, 363 | [ "5" ] = parse_number, 364 | [ "6" ] = parse_number, 365 | [ "7" ] = parse_number, 366 | [ "8" ] = parse_number, 367 | [ "9" ] = parse_number, 368 | [ "-" ] = parse_number, 369 | [ "t" ] = parse_literal, 370 | [ "f" ] = parse_literal, 371 | [ "n" ] = parse_literal, 372 | [ "[" ] = parse_array, 373 | [ "{" ] = parse_object, 374 | } 375 | 376 | 377 | parse = function(str, idx) 378 | local chr = str:sub(idx, idx) 379 | local f = char_func_map[chr] 380 | if f then 381 | return f(str, idx) 382 | end 383 | decode_error(str, idx, "unexpected character '" .. chr .. "'") 384 | end 385 | 386 | 387 | function json.decode(str) 388 | if type(str) ~= "string" then 389 | error("expected argument of type string, got " .. type(str)) 390 | end 391 | local res, idx = parse(str, next_char(str, 1, space_chars, true)) 392 | idx = next_char(str, idx, space_chars, true) 393 | if idx <= #str then 394 | decode_error(str, idx, "trailing garbage") 395 | end 396 | return res 397 | end 398 | 399 | 400 | return json 401 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/consts.lua: -------------------------------------------------------------------------------- 1 | -- CONSTANTS USED IN FORMS 2 | 3 | -- OVR Calculation formula 4 | -- key - position_id 5 | -- - key - attribute (component name in GUI) 6 | -- - value - percent of the ovr 7 | OVR_FORMULA = { 8 | ["0"]= { 9 | ReactionsEdit = 0.11, 10 | GKDivingEdit = 0.21, 11 | GKHandlingEdit = 0.21, 12 | GKKickingEdit = 0.05, 13 | GKReflexEdit = 0.21, 14 | GKPositioningEdit = 0.21, 15 | }, 16 | ["2"]= { 17 | AccelerationEdit = 0.04, 18 | SprintSpeedEdit = 0.06, 19 | StaminaEdit = 0.10, 20 | InterceptionsEdit = 0.12, 21 | BallControlEdit = 0.08, 22 | CrossingEdit = 0.12, 23 | DribblingEdit = 0.04, 24 | ShortPassingEdit = 0.10, 25 | MarkingEdit = 0.07, 26 | StandingTackleEdit = 0.08, 27 | SlidingTackleEdit = 0.11, 28 | }, 29 | ["3"]= { 30 | AccelerationEdit = 0.05, 31 | SprintSpeedEdit = 0.07, 32 | StaminaEdit = 0.08, 33 | ReactionsEdit = 0.08, 34 | InterceptionsEdit = 0.12, 35 | BallControlEdit = 0.07, 36 | CrossingEdit = 0.09, 37 | HeadingAccuracyEdit = 0.04, 38 | ShortPassingEdit = 0.07, 39 | MarkingEdit = 0.08, 40 | StandingTackleEdit = 0.11, 41 | SlidingTackleEdit = 0.14, 42 | }, 43 | ["4"]= { 44 | SprintSpeedEdit = 0.02, 45 | JumpingEdit = 0.03, 46 | StrengthEdit = 0.10, 47 | ReactionsEdit = 0.05, 48 | AggressionEdit = 0.07, 49 | InterceptionsEdit = 0.13, 50 | BallControlEdit = 0.04, 51 | HeadingAccuracyEdit = 0.10, 52 | ShortPassingEdit = 0.05, 53 | MarkingEdit = 0.14, 54 | StandingTackleEdit = 0.17, 55 | SlidingTackleEdit = 0.10, 56 | }, 57 | ["5"]= { 58 | SprintSpeedEdit = 0.02, 59 | JumpingEdit = 0.03, 60 | StrengthEdit = 0.10, 61 | ReactionsEdit = 0.05, 62 | AggressionEdit = 0.07, 63 | InterceptionsEdit = 0.13, 64 | BallControlEdit = 0.04, 65 | HeadingAccuracyEdit = 0.10, 66 | ShortPassingEdit = 0.05, 67 | MarkingEdit = 0.14, 68 | StandingTackleEdit = 0.17, 69 | SlidingTackleEdit = 0.10, 70 | }, 71 | ["6"]= { 72 | SprintSpeedEdit = 0.02, 73 | JumpingEdit = 0.03, 74 | StrengthEdit = 0.10, 75 | ReactionsEdit = 0.05, 76 | AggressionEdit = 0.07, 77 | InterceptionsEdit = 0.13, 78 | BallControlEdit = 0.04, 79 | HeadingAccuracyEdit = 0.10, 80 | ShortPassingEdit = 0.05, 81 | MarkingEdit = 0.14, 82 | StandingTackleEdit = 0.17, 83 | SlidingTackleEdit = 0.10, 84 | }, 85 | ["7"]= { 86 | AccelerationEdit = 0.05, 87 | SprintSpeedEdit = 0.07, 88 | StaminaEdit = 0.08, 89 | ReactionsEdit = 0.08, 90 | InterceptionsEdit = 0.12, 91 | BallControlEdit = 0.07, 92 | CrossingEdit = 0.09, 93 | HeadingAccuracyEdit = 0.04, 94 | ShortPassingEdit = 0.07, 95 | MarkingEdit = 0.08, 96 | StandingTackleEdit = 0.11, 97 | SlidingTackleEdit = 0.14, 98 | }, 99 | ["8"]= { 100 | AccelerationEdit = 0.04, 101 | SprintSpeedEdit = 0.06, 102 | StaminaEdit = 0.10, 103 | InterceptionsEdit = 0.12, 104 | BallControlEdit = 0.08, 105 | CrossingEdit = 0.12, 106 | DribblingEdit = 0.04, 107 | ShortPassingEdit = 0.10, 108 | MarkingEdit = 0.07, 109 | StandingTackleEdit = 0.08, 110 | SlidingTackleEdit = 0.11, 111 | }, 112 | ["9"]= { 113 | StaminaEdit = 0.06, 114 | StrengthEdit = 0.04, 115 | ReactionsEdit = 0.07, 116 | AggressionEdit = 0.05, 117 | InterceptionsEdit = 0.14, 118 | VisionEdit = 0.04, 119 | BallControlEdit = 0.10, 120 | LongPassingEdit = 0.10, 121 | ShortPassingEdit = 0.14, 122 | MarkingEdit = 0.09, 123 | StandingTackleEdit = 0.12, 124 | SlidingTackleEdit = 0.05, 125 | }, 126 | ["10"] = { 127 | StaminaEdit = 0.06, 128 | StrengthEdit = 0.04, 129 | ReactionsEdit = 0.07, 130 | AggressionEdit = 0.05, 131 | InterceptionsEdit = 0.14, 132 | VisionEdit = 0.04, 133 | BallControlEdit = 0.10, 134 | LongPassingEdit = 0.10, 135 | ShortPassingEdit = 0.14, 136 | MarkingEdit = 0.09, 137 | StandingTackleEdit = 0.12, 138 | SlidingTackleEdit = 0.05, 139 | }, 140 | ["11"] = { 141 | StaminaEdit = 0.06, 142 | StrengthEdit = 0.04, 143 | ReactionsEdit = 0.07, 144 | AggressionEdit = 0.05, 145 | InterceptionsEdit = 0.14, 146 | VisionEdit = 0.04, 147 | BallControlEdit = 0.10, 148 | LongPassingEdit = 0.10, 149 | ShortPassingEdit = 0.14, 150 | MarkingEdit = 0.09, 151 | StandingTackleEdit = 0.12, 152 | SlidingTackleEdit = 0.05, 153 | }, 154 | ["12"] = { 155 | AccelerationEdit = 0.07, 156 | SprintSpeedEdit = 0.06, 157 | StaminaEdit = 0.05, 158 | ReactionsEdit = 0.07, 159 | AttackPositioningEdit = 0.08, 160 | VisionEdit = 0.07, 161 | BallControlEdit = 0.13, 162 | CrossingEdit = 0.10, 163 | DribblingEdit = 0.15, 164 | FinishingEdit = 0.06, 165 | LongPassingEdit = 0.05, 166 | ShortPassingEdit = 0.11, 167 | }, 168 | ["13"] = { 169 | StaminaEdit = 0.06, 170 | ReactionsEdit = 0.08, 171 | InterceptionsEdit = 0.05, 172 | AttackPositioningEdit = 0.06, 173 | VisionEdit = 0.13, 174 | BallControlEdit = 0.14, 175 | DribblingEdit = 0.07, 176 | FinishingEdit = 0.02, 177 | LongPassingEdit = 0.13, 178 | ShortPassingEdit = 0.17, 179 | LongShotsEdit = 0.04, 180 | StandingTackleEdit = 0.05, 181 | }, 182 | ["14"] = { 183 | StaminaEdit = 0.06, 184 | ReactionsEdit = 0.08, 185 | InterceptionsEdit = 0.05, 186 | AttackPositioningEdit = 0.06, 187 | VisionEdit = 0.13, 188 | BallControlEdit = 0.14, 189 | DribblingEdit = 0.07, 190 | FinishingEdit = 0.02, 191 | LongPassingEdit = 0.13, 192 | ShortPassingEdit = 0.17, 193 | LongShotsEdit = 0.04, 194 | StandingTackleEdit = 0.05, 195 | }, 196 | ["15"] = { 197 | StaminaEdit = 0.06, 198 | ReactionsEdit = 0.08, 199 | InterceptionsEdit = 0.05, 200 | AttackPositioningEdit = 0.06, 201 | VisionEdit = 0.13, 202 | BallControlEdit = 0.14, 203 | DribblingEdit = 0.07, 204 | FinishingEdit = 0.02, 205 | LongPassingEdit = 0.13, 206 | ShortPassingEdit = 0.17, 207 | LongShotsEdit = 0.04, 208 | StandingTackleEdit = 0.05, 209 | }, 210 | ["16"] = { 211 | AccelerationEdit = 0.07, 212 | SprintSpeedEdit = 0.06, 213 | StaminaEdit = 0.05, 214 | ReactionsEdit = 0.07, 215 | AttackPositioningEdit = 0.08, 216 | VisionEdit = 0.07, 217 | BallControlEdit = 0.13, 218 | CrossingEdit = 0.10, 219 | DribblingEdit = 0.15, 220 | FinishingEdit = 0.06, 221 | LongPassingEdit = 0.05, 222 | ShortPassingEdit = 0.11, 223 | }, 224 | ["17"] = { 225 | AccelerationEdit = 0.04, 226 | SprintSpeedEdit = 0.03, 227 | AgilityEdit = 0.03, 228 | ReactionsEdit = 0.07, 229 | AttackPositioningEdit = 0.09, 230 | VisionEdit = 0.14, 231 | BallControlEdit = 0.15, 232 | DribblingEdit = 0.13, 233 | FinishingEdit = 0.07, 234 | LongPassingEdit = 0.04, 235 | ShortPassingEdit = 0.16, 236 | LongShotsEdit = 0.05, 237 | }, 238 | ["18"] = { 239 | AccelerationEdit = 0.04, 240 | SprintSpeedEdit = 0.03, 241 | AgilityEdit = 0.03, 242 | ReactionsEdit = 0.07, 243 | AttackPositioningEdit = 0.09, 244 | VisionEdit = 0.14, 245 | BallControlEdit = 0.15, 246 | DribblingEdit = 0.13, 247 | FinishingEdit = 0.07, 248 | LongPassingEdit = 0.04, 249 | ShortPassingEdit = 0.16, 250 | LongShotsEdit = 0.05, 251 | }, 252 | ["19"] = { 253 | AccelerationEdit = 0.04, 254 | SprintSpeedEdit = 0.03, 255 | AgilityEdit = 0.03, 256 | ReactionsEdit = 0.07, 257 | AttackPositioningEdit = 0.09, 258 | VisionEdit = 0.14, 259 | BallControlEdit = 0.15, 260 | DribblingEdit = 0.13, 261 | FinishingEdit = 0.07, 262 | LongPassingEdit = 0.04, 263 | ShortPassingEdit = 0.16, 264 | LongShotsEdit = 0.05, 265 | }, 266 | ["20"] = { 267 | AccelerationEdit = 0.05, 268 | SprintSpeedEdit = 0.05, 269 | ReactionsEdit = 0.09, 270 | AttackPositioningEdit = 0.13, 271 | VisionEdit = 0.08, 272 | BallControlEdit = 0.15, 273 | DribblingEdit = 0.14, 274 | FinishingEdit = 0.11, 275 | HeadingAccuracyEdit = 0.02, 276 | ShortPassingEdit = 0.09, 277 | ShotPowerEdit = 0.05, 278 | LongShotsEdit = 0.04, 279 | }, 280 | ["21"] = { 281 | AccelerationEdit = 0.05, 282 | SprintSpeedEdit = 0.05, 283 | ReactionsEdit = 0.09, 284 | AttackPositioningEdit = 0.13, 285 | VisionEdit = 0.08, 286 | BallControlEdit = 0.15, 287 | DribblingEdit = 0.14, 288 | FinishingEdit = 0.11, 289 | HeadingAccuracyEdit = 0.02, 290 | ShortPassingEdit = 0.09, 291 | ShotPowerEdit = 0.05, 292 | LongShotsEdit = 0.04, 293 | }, 294 | ["22"] = { 295 | AccelerationEdit = 0.05, 296 | SprintSpeedEdit = 0.05, 297 | ReactionsEdit = 0.09, 298 | AttackPositioningEdit = 0.13, 299 | VisionEdit = 0.08, 300 | BallControlEdit = 0.15, 301 | DribblingEdit = 0.14, 302 | FinishingEdit = 0.11, 303 | HeadingAccuracyEdit = 0.02, 304 | ShortPassingEdit = 0.09, 305 | ShotPowerEdit = 0.05, 306 | LongShotsEdit = 0.04, 307 | }, 308 | ["23"] = { 309 | AccelerationEdit = 0.07, 310 | SprintSpeedEdit = 0.06, 311 | AgilityEdit = 0.03, 312 | ReactionsEdit = 0.07, 313 | AttackPositioningEdit = 0.09, 314 | VisionEdit = 0.06, 315 | BallControlEdit = 0.14, 316 | CrossingEdit = 0.09, 317 | DribblingEdit = 0.16, 318 | FinishingEdit = 0.10, 319 | ShortPassingEdit = 0.09, 320 | LongShotsEdit = 0.04, 321 | }, 322 | ["24"] = { 323 | AccelerationEdit = 0.04, 324 | SprintSpeedEdit = 0.05, 325 | StrengthEdit = 0.05, 326 | ReactionsEdit = 0.08, 327 | AttackPositioningEdit = 0.13, 328 | BallControlEdit = 0.10, 329 | DribblingEdit = 0.07, 330 | FinishingEdit = 0.18, 331 | HeadingAccuracyEdit = 0.10, 332 | ShortPassingEdit = 0.05, 333 | ShotPowerEdit = 0.10, 334 | LongShotsEdit = 0.03, 335 | VolleysEdit = 0.02, 336 | }, 337 | ["25"] = { 338 | AccelerationEdit = 0.04, 339 | SprintSpeedEdit = 0.05, 340 | StrengthEdit = 0.05, 341 | ReactionsEdit = 0.08, 342 | AttackPositioningEdit = 0.13, 343 | BallControlEdit = 0.10, 344 | DribblingEdit = 0.07, 345 | FinishingEdit = 0.18, 346 | HeadingAccuracyEdit = 0.10, 347 | ShortPassingEdit = 0.05, 348 | ShotPowerEdit = 0.10, 349 | LongShotsEdit = 0.03, 350 | VolleysEdit = 0.02, 351 | }, 352 | ["26"] = { 353 | AccelerationEdit = 0.04, 354 | SprintSpeedEdit = 0.05, 355 | StrengthEdit = 0.05, 356 | ReactionsEdit = 0.08, 357 | AttackPositioningEdit = 0.13, 358 | BallControlEdit = 0.10, 359 | DribblingEdit = 0.07, 360 | FinishingEdit = 0.18, 361 | HeadingAccuracyEdit = 0.10, 362 | ShortPassingEdit = 0.05, 363 | ShotPowerEdit = 0.10, 364 | LongShotsEdit = 0.03, 365 | VolleysEdit = 0.02, 366 | }, 367 | ["27"] = { 368 | AccelerationEdit = 0.07, 369 | SprintSpeedEdit = 0.06, 370 | AgilityEdit = 0.03, 371 | ReactionsEdit = 0.07, 372 | AttackPositioningEdit = 0.09, 373 | VisionEdit = 0.06, 374 | BallControlEdit = 0.14, 375 | CrossingEdit = 0.09, 376 | DribblingEdit = 0.16, 377 | FinishingEdit = 0.10, 378 | ShortPassingEdit = 0.09, 379 | LongShotsEdit = 0.04, 380 | }, 381 | } 382 | 383 | 384 | -- Min and max value that attribute/potential/overall can be. 385 | ATTRIBUTE_BOUNDS = { 386 | min = 1, 387 | max = 99, 388 | } 389 | 390 | 391 | -- FIFA epoch time 392 | -- os.time{year=1582, month=10, day=14, hour=0, min=0, sec=0} = -12219379200 393 | FIFA_EPOCH_TIME = -12219379200 -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/transferplayersform/helpers.lua: -------------------------------------------------------------------------------- 1 | 2 | 3 | CUSTOM_TRANSFERS = 0 4 | 5 | function fill_custom_transfers() 6 | for i=0, TransferPlayersForm.TransfersScroll.ComponentCount-1 do 7 | TransferPlayersForm.TransfersScroll.Component[0].destroy() 8 | end 9 | CUSTOM_TRANSFERS = 0 10 | local num_of_transfers = readInteger('arr_NewTransfers') - 1 11 | for i=0, num_of_transfers do 12 | local pid = readInteger(string.format('arr_NewTransfers+%s', string.format('%X', i * 20 + 4))) 13 | local ntid = readInteger(string.format('arr_NewTransfers+%s', string.format('%X', i * 20 + 8))) 14 | local ctid = readInteger(string.format('arr_NewTransfers+%s', string.format('%X', i * 20 + 12))) 15 | local rl_clause = readInteger(string.format('arr_NewTransfers+%s', string.format('%X', i * 20 + 16))) 16 | if rl_clause == 0 then rl_clause = 'None' end 17 | 18 | local cl = readInteger(string.format('arr_NewTransfers+%s', string.format('%X', i * 20 + 20))) // 12 19 | local is_confirmed_by_user = true 20 | new_custom_transfer(pid, {ctid}, ntid, rl_clause, cl, is_confirmed_by_user) 21 | end 22 | end 23 | 24 | function new_custom_transfer(playerid, current_team_ids, teamid, clause, contract_length, is_confirmed_by_user) 25 | if not playerid then 26 | playerid = inputQuery("Queue Player Transfer", "Enter playerid:", "0") 27 | if not playerid or tonumber(playerid) <= 0 then 28 | ShowMessage("Enter Valid PlayerID") 29 | return 30 | end 31 | playerid = tonumber(playerid) 32 | end 33 | 34 | if not teamid then 35 | teamid = inputQuery("Queue Player Transfer", "Enter new teamid:", "0") 36 | if not teamid or tonumber(teamid) <= 0 then 37 | ShowMessage("Enter Valid TeamID") 38 | return 39 | end 40 | teamid = tonumber(teamid) 41 | end 42 | 43 | if (not is_confirmed_by_user) or (is_confirmed_by_user and playerid >= 280000) then 44 | if not find_player_by_id(playerid) then 45 | do_log("Player with ID: " .. playerid .. " doesn't exists in your current CM save", 'ERROR') 46 | return 47 | end 48 | end 49 | 50 | if not current_team_ids then 51 | current_team_ids = {} 52 | for key, value in pairs(PlayerTeamContext) do 53 | if value['team_type'] ~= 'national' then 54 | table.insert(current_team_ids, tonumber(key)) 55 | end 56 | end 57 | 58 | if #current_team_ids <= 0 then 59 | do_log("Player with ID: " .. playerid .. " don't have any current team...", 'ERROR') 60 | elseif #current_team_ids > 1 then 61 | current_team_ids = {} 62 | for key, value in pairs(PlayerTeamContext) do 63 | if value['team_type'] == 'club' then 64 | table.insert(current_team_ids, tonumber(key)) 65 | end 66 | end 67 | 68 | if #current_team_ids <= 0 then 69 | current_team_ids = {} 70 | for key, value in pairs(PlayerTeamContext) do 71 | if value['team_type'] == 'all_stars' then 72 | table.insert(current_team_ids, tonumber(key)) 73 | end 74 | end 75 | end 76 | end 77 | end 78 | 79 | local player = { 80 | playerid = playerid, 81 | headtypecode = tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['HEADTYPECODE']).Value), 82 | haircolorcode = tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['HAIRCOLORCODE']).Value) 83 | } 84 | 85 | if not clause then 86 | clause = 'None' 87 | end 88 | 89 | if not contract_length then 90 | contract_length = 3 91 | end 92 | 93 | create_player_transfer_comp(player, current_team_ids, teamid, clause, contract_length, is_confirmed_by_user) 94 | end 95 | 96 | function create_player_transfer_comp(player, current_team_ids, teamid, clause, contract_length, is_confirmed_by_user) 97 | CUSTOM_TRANSFERS = CUSTOM_TRANSFERS + 1 98 | local name = string.format('NewTransferContainerPanel%d', CUSTOM_TRANSFERS) 99 | local reindex = false 100 | local deleted = 0 101 | for i=0, TransferPlayersForm.TransfersScroll.ComponentCount-1 do 102 | -- Delete deleted transfers 103 | if not TransferPlayersForm.TransfersScroll.Component[i-deleted].Visible then 104 | TransferPlayersForm.TransfersScroll.Component[i-deleted].destroy() 105 | deleted = deleted + 1 106 | reindex = true 107 | end 108 | end 109 | 110 | -- reindex 111 | if reindex then 112 | for i=0, TransferPlayersForm.TransfersScroll.ComponentCount-1 do 113 | local comp = TransferPlayersForm.TransfersScroll.Component[i] 114 | comp.Name = string.gsub(comp.Name, '%d', i+1) 115 | for j=0, comp.ComponentCount-1 do 116 | comp.Component[j].Name = string.gsub(comp.Component[j].Name, '%d', i+1) 117 | end 118 | end 119 | end 120 | 121 | local panel_player_transfer_container = createPanel(TransferPlayersForm.TransfersScroll) 122 | panel_player_transfer_container.Name = name 123 | panel_player_transfer_container.BevelOuter = bvNone 124 | panel_player_transfer_container.Caption = '' 125 | 126 | panel_player_transfer_container.Color = '0x00302825' 127 | panel_player_transfer_container.Width = 780 128 | panel_player_transfer_container.Height = 160 129 | panel_player_transfer_container.Left = 10 130 | 131 | if CUSTOM_TRANSFERS == 1 then 132 | panel_player_transfer_container.Top = 70 133 | else 134 | panel_player_transfer_container.Top = 160*(CUSTOM_TRANSFERS-1) + 85 135 | end 136 | 137 | -- Player miniface 138 | local playerimg = createImage(panel_player_transfer_container) 139 | local ss_p = load_headshot( 140 | player['playerid'], 141 | player['headtypecode'], 142 | player['haircolorcode'] 143 | ) 144 | playerimg.Picture.LoadFromStream(ss_p) 145 | ss_p.destroy() 146 | 147 | playerimg.Name = string.format('PlayerImage%d', CUSTOM_TRANSFERS) 148 | playerimg.Left = 20 149 | playerimg.Top = 25 150 | playerimg.Height = 90 151 | playerimg.Width = 90 152 | playerimg.Stretch = true 153 | 154 | -- PlayerID 155 | local PlayerIDLabel = createLabel(panel_player_transfer_container) 156 | 157 | PlayerIDLabel.Name = string.format('PlayerIDLabel%d', CUSTOM_TRANSFERS) 158 | PlayerIDLabel.AutoSize = false 159 | PlayerIDLabel.Left = 20 160 | PlayerIDLabel.Height = 14 161 | PlayerIDLabel.Top = 125 162 | PlayerIDLabel.Width = 90 163 | PlayerIDLabel.Alignment = "taCenter" 164 | PlayerIDLabel.Caption = player['playerid'] 165 | 166 | -- From 167 | local FromLabel = createLabel(panel_player_transfer_container) 168 | 169 | FromLabel.Name = string.format('FromTeamLabel%d', CUSTOM_TRANSFERS) 170 | FromLabel.AutoSize = false 171 | FromLabel.Left = 135 172 | FromLabel.Height = 14 173 | FromLabel.Top = 0 174 | FromLabel.Width = 90 175 | FromLabel.Alignment = "taCenter" 176 | FromLabel.Caption = "From:" 177 | 178 | -- From Crest 179 | local FromCrestImg = createImage(panel_player_transfer_container) 180 | local ss_c = load_crest(current_team_ids[1]) 181 | FromCrestImg.Picture.LoadFromStream(ss_c) 182 | ss_c.destroy() 183 | 184 | FromCrestImg.Name = string.format('FromCrestImage%d', CUSTOM_TRANSFERS) 185 | FromCrestImg.Left = 135 186 | FromCrestImg.Top = 25 187 | FromCrestImg.Height = 90 188 | FromCrestImg.Width = 90 189 | FromCrestImg.Stretch = true 190 | 191 | -- From Edit/Combo 192 | if #current_team_ids == 1 then 193 | -- If only one team 194 | local FromTeamId = createEdit(panel_player_transfer_container) 195 | FromTeamId.Name = string.format('FromTeamId%d', CUSTOM_TRANSFERS) 196 | FromTeamId.BorderStyle = "bsNone" 197 | FromTeamId.ParentFont = false 198 | FromTeamId.Color = 5653320 199 | FromTeamId.Font.CharSet = "EASTEUROPE_CHARSET" 200 | FromTeamId.Font.Color = 12632256 -- clCream 201 | FromTeamId.Font.Height = -12 202 | FromTeamId.Font.Name = "Verdana" 203 | FromTeamId.AutoSize = false 204 | FromTeamId.Left = 135 205 | FromTeamId.Height = 14 206 | FromTeamId.Top = 124 207 | FromTeamId.Width = 90 208 | FromTeamId.Alignment = "taCenter" 209 | FromTeamId.Text = current_team_ids[1] 210 | FromTeamId.ReadOnly = true 211 | else 212 | -- If multiple teams 213 | local FromTeamId = createComboBox(panel_player_transfer_container) 214 | for i = 1, #current_team_ids do 215 | FromTeamId.items.add(current_team_ids[i]) 216 | end 217 | FromTeamId.ItemIndex = 0 218 | FromTeamId.Name = string.format('FromTeamId%d', CUSTOM_TRANSFERS) 219 | FromTeamId.AutoSize = false 220 | FromTeamId.Left = 135 221 | FromTeamId.Height = 22 222 | FromTeamId.Top = 124 223 | FromTeamId.Width = 90 224 | FromTeamId.Style = "csDropDownList" 225 | FromTeamId.OnChange = reload_team_from_crest 226 | end 227 | 228 | -- To 229 | local ToLabel = createLabel(panel_player_transfer_container) 230 | 231 | ToLabel.Name = string.format('ToTeamLabel%d', CUSTOM_TRANSFERS) 232 | ToLabel.AutoSize = false 233 | ToLabel.Left = 265 234 | ToLabel.Height = 14 235 | ToLabel.Top = 0 236 | ToLabel.Width = 90 237 | ToLabel.Alignment = "taCenter" 238 | ToLabel.Caption = "To:" 239 | 240 | -- To Crest 241 | local ToCrestImg = createImage(panel_player_transfer_container) 242 | local ss_c = load_crest(teamid) 243 | ToCrestImg.Picture.LoadFromStream(ss_c) 244 | ss_c.destroy() 245 | 246 | ToCrestImg.Name = string.format('ToCrestImage%d', CUSTOM_TRANSFERS) 247 | ToCrestImg.Left = 265 248 | ToCrestImg.Top = 25 249 | ToCrestImg.Height = 90 250 | ToCrestImg.Width = 90 251 | ToCrestImg.Stretch = true 252 | 253 | -- To Edit 254 | local ToTeamId = createEdit(panel_player_transfer_container) 255 | ToTeamId.Name = string.format('ToTeamId%d', CUSTOM_TRANSFERS) 256 | ToTeamId.BorderStyle = "bsNone" 257 | ToTeamId.Color = 5653320 258 | ToTeamId.ParentFont = false 259 | ToTeamId.Font.CharSet = "EASTEUROPE_CHARSET" 260 | ToTeamId.Font.Color = 15793151 261 | ToTeamId.Font.Height = -12 262 | ToTeamId.Font.Name = "Verdana" 263 | ToTeamId.AutoSize = false 264 | ToTeamId.Alignment = "taCenter" 265 | ToTeamId.Left = 265 266 | ToTeamId.Height = 14 267 | ToTeamId.Top = 124 268 | ToTeamId.Width = 90 269 | ToTeamId.Text = teamid 270 | ToTeamId.OnChange = reload_team_to_crest 271 | 272 | -- Release Clause Label 273 | local RCLabel = createLabel(panel_player_transfer_container) 274 | 275 | RCLabel.Name = string.format('RCLabel%d', CUSTOM_TRANSFERS) 276 | RCLabel.AutoSize = false 277 | RCLabel.Left = 375 278 | RCLabel.Height = 14 279 | RCLabel.Top = 25 280 | RCLabel.Width = 110 281 | RCLabel.Alignment = "taCenter" 282 | RCLabel.Caption = "Release Clause:" 283 | 284 | -- Release Clause Edit 285 | local RCValue = createEdit(panel_player_transfer_container) 286 | RCValue.Name = string.format('ReleaseClauseValue%d', CUSTOM_TRANSFERS) 287 | RCValue.BorderStyle = "bsNone" 288 | RCValue.Color = 5653320 289 | RCValue.ParentFont = false 290 | RCValue.Font.CharSet = "EASTEUROPE_CHARSET" 291 | RCValue.Font.Color = 15793151 292 | RCValue.Font.Height = -12 293 | RCValue.Font.Name = "Verdana" 294 | RCValue.AutoSize = false 295 | RCValue.Alignment = "taCenter" 296 | RCValue.Left = 495 297 | RCValue.Height = 14 298 | RCValue.Top = 29 299 | RCValue.Width = 100 300 | RCValue.Text = clause 301 | 302 | -- Contract Length Label 303 | local CLLabel = createLabel(panel_player_transfer_container) 304 | 305 | CLLabel.Name = string.format('CLLabel%d', CUSTOM_TRANSFERS) 306 | CLLabel.AutoSize = false 307 | CLLabel.Left = 375 308 | CLLabel.Height = 14 309 | CLLabel.Top = 65 310 | CLLabel.Width = 110 311 | CLLabel.Alignment = "taCenter" 312 | CLLabel.Caption = "Contract Length:" 313 | 314 | -- Contract Length Combo 315 | local CLCombo = createComboBox(panel_player_transfer_container) 316 | local contract_length_values = { 317 | '1 year', '2 years', '3 years', '4 years', '5 years' 318 | } 319 | for i = 1, #contract_length_values do 320 | CLCombo.items.add(contract_length_values[i]) 321 | end 322 | 323 | CLCombo.ItemIndex = contract_length - 1 324 | CLCombo.Name = string.format('ContractLengthCombo%d', CUSTOM_TRANSFERS) 325 | CLCombo.AutoSize = false 326 | CLCombo.Left = 495 327 | CLCombo.Height = 22 328 | CLCombo.Top = 63 329 | CLCombo.Width = 100 330 | CLCombo.Style = "csDropDownList" 331 | 332 | -- Confirm Btn 333 | if not is_confirmed_by_user then 334 | local ConfirmImg = createImage(panel_player_transfer_container) 335 | ConfirmImg.Picture.LoadFromStream(findTableFile('btn.png').Stream) 336 | 337 | ConfirmImg.Name = string.format('ConfirmBtnImage%d', CUSTOM_TRANSFERS) 338 | ConfirmImg.Left = 605 339 | ConfirmImg.Top = 20 340 | ConfirmImg.Height = 56 341 | ConfirmImg.Width = 161 342 | ConfirmImg.OnClick = confirm_transfer 343 | 344 | local ConfirmLabel = createLabel(panel_player_transfer_container) 345 | ConfirmLabel.Name = string.format('ConfirmBtnLabel%d', CUSTOM_TRANSFERS) 346 | ConfirmLabel.AnchorSideLeft.Control = ConfirmImg 347 | ConfirmLabel.AnchorSideTop.Control = ConfirmImg 348 | ConfirmLabel.AnchorSideRight.Control = ConfirmImg 349 | ConfirmLabel.AnchorSideRight.Side = "asrBottom" 350 | ConfirmLabel.AnchorSideBottom.Control = ConfirmImg 351 | ConfirmLabel.AnchorSideBottom.Side = "asrBottom" 352 | ConfirmLabel.Anchors = "[akTop, akLeft, akRight, akBottom]" 353 | ConfirmLabel.Alignment = "taCenter" 354 | ConfirmLabel.AutoSize = false 355 | ConfirmLabel.BorderSpacing.Top = 13 356 | ConfirmLabel.Caption = 'Confirm' 357 | ConfirmLabel.Font.CharSet = "EASTEUROPE_CHARSET" 358 | ConfirmLabel.Font.Color = 12632256 -- clSilver 359 | ConfirmLabel.Font.Height = -15 360 | ConfirmLabel.Font.Name = 'Verdana' 361 | ConfirmLabel.ParentColor = false 362 | ConfirmLabel.ParentFont = false 363 | ConfirmLabel.OnClick = confirm_transfer 364 | end 365 | 366 | -- Delete Btn 367 | local DeleteImg = createImage(panel_player_transfer_container) 368 | DeleteImg.Picture.LoadFromStream(findTableFile('btn.png').Stream) 369 | 370 | DeleteImg.Name = string.format('DeleteBtnImage%d', CUSTOM_TRANSFERS) 371 | DeleteImg.Left = 605 372 | DeleteImg.Top = 81 373 | DeleteImg.Height = 56 374 | DeleteImg.Width = 161 375 | DeleteImg.OnClick = delete_transfer 376 | 377 | local DeleteLabel = createLabel(panel_player_transfer_container) 378 | DeleteLabel.Name = string.format('DeleteBtnLabel%d', CUSTOM_TRANSFERS) 379 | DeleteLabel.AnchorSideLeft.Control = DeleteImg 380 | DeleteLabel.AnchorSideTop.Control = DeleteImg 381 | DeleteLabel.AnchorSideRight.Control = DeleteImg 382 | DeleteLabel.AnchorSideRight.Side = "asrBottom" 383 | DeleteLabel.AnchorSideBottom.Control = DeleteImg 384 | DeleteLabel.AnchorSideBottom.Side = "asrBottom" 385 | DeleteLabel.Anchors = "[akTop, akLeft, akRight, akBottom]" 386 | DeleteLabel.Alignment = "taCenter" 387 | DeleteLabel.BorderSpacing.Top = 13 388 | DeleteLabel.Caption = 'Delete' 389 | DeleteLabel.Font.CharSet = "EASTEUROPE_CHARSET" 390 | DeleteLabel.Font.Color = 12632256 391 | DeleteLabel.Font.Height = -15 392 | DeleteLabel.Font.Name = 'Verdana' 393 | DeleteLabel.ParentColor = false 394 | DeleteLabel.ParentFont = false 395 | DeleteLabel.OnClick = delete_transfer 396 | end 397 | 398 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FIFA 19 - CM Cheat Table 2 | 3 | This is a brief walk-through tutorial that illustrates how to use mine Cheat Table for FIFA 19. Before you start using it, I'd recommend you to make a __backup of your current career mode save__ and regular backups of your further progress. Trust me, you don't want to start a new career after 5 seasons because something will screw up. You need to know that this cheat table is designed for __manager career mode__. Scripts may or may not work in player career mode, especially if you are using player created by your own. I don't care about the journey mode, sorry. Also - as last year - cracked version is not supported and no, it doesn't mean that cheat table is not working with cracked version. Just if something is not working then it's because you are using cracked version. I hope it's clear now. 4 | And the last thing but not least, __tick checkboxes only when you are activating scripts or opening header__. If you tick checkbox near attributes (like 'headid' in manager table) it will freeze the value and it will be applied to all other players/maangers/etc., which is probably not something that you want. 5 | 6 | ![](https://i.imgur.com/U5HpWO6.png) 7 | 8 | # Become a Patron 9 | [Become a Patron](https://www.patreon.com/xAranaktu) 10 | 11 | # Table of Contents 12 | * [Release Schedule](#release-schedule) 13 | * [Roadmap](#roadmap) 14 | * [Video Tutorials](#video-tutorials) 15 | * [Getting Started](#getting-started) 16 | * [Frequently asked questions](#faq) 17 | * [Auto activating scripts](#auto-activating-scripts) 18 | * [FIFA 19 IDs](#fifa-19-ids) 19 | * [GUI](#gui) 20 | * [Schedule Editor](#schedule-editor) 21 | * [Permanent Stadium Change](#permanent-stadium-change) 22 | * [Changing Player Head Model](#changing-player-head-model) 23 | * [Changing Manager Head Model](#changing-manager-head-model) 24 | * [Removing injury from a player](#removing-injury-from-a-player) 25 | * [Contract Negotiation](#contract-negotiation) 26 | 27 | 28 | ## Release Schedule 29 | When new version will be released? Answer is here: [Release Schedule](https://docs.google.com/spreadsheets/d/1EsYf4I4oDD6kw5jTGTFsv7rR1qL-Oausd1ZRbbSWm84/edit?usp=sharing) 30 | 31 | ## Roadmap 32 | [Here you can find what and when will be added](https://trello.com/b/rJNRwIP2/fifa-19-ct-roadmap) 33 | 34 | ## Video Tutorials 35 | 36 | [Video Tutorials by UC Nerd](http://bit.ly/CM-Cheat-Table-19) 37 | 38 | [Video Tutorials by FIFER](https://www.youtube.com/channel/UCLeUj4JLawrik11Ch9uoU_Q) 39 | 40 | 41 | ## Getting Started 42 | * Download necessary software (if you don't have any of those): 43 | * [Newest version of cheat engine](https://www.cheatengine.org/downloads.php) 44 | * [Newest version of cheat table](https://mega.nz/#F!QIlRHIRD!NWSxbzysLhTzgvQeuFg0mg) 45 | * [Winrar](https://www.rarlab.com/download.htm) or [7zip](https://www.7-zip.org/) 46 | 47 | * Install Cheat Engine 48 | * Unzip Cheat Table with Winrar/7zip (doesn't matter where it's up to you.) 49 | * Run FIFA and go to main menu (https://i.imgur.com/Jnq60Hf.jpg) 50 | * Run Cheat Engine 51 | * Allow Cheat Engine to execute Lua scripts (https://i.imgur.com/oOdOq7M.gifv) 52 | * Open Cheat Table in Cheat Engine (https://i.imgur.com/pb0GIC1.gifv) 53 | * if you have latest Cheat table then just wait a few seconds until it will connect with the game and GUI will be shown (as on gif) 54 | * if you have cheat table version from v1.0.0 to v1.0.11 then press 'CTRL+P' and open 'FIFA19.exe' process (https://i.imgur.com/RjGdB8B.png) 55 | * Activate your favourite scripts and load career save. :) 56 | 57 | ## F.A.Q 58 | 59 | * __Can you make a cheat for FUT/Pro Clubs?__ 60 | - No, I can't. Stop asking about that. 61 | 62 | 63 | * __Can you add X/Y/Z ?__ 64 | - Depends on what it is. If you have got a request write [here](https://github.com/xAranaktu/FIFA-19---Career-Mode-Cheat-Table/labels/enhancement) and maybe one day you will see it added to the table. 65 | 66 | 67 | * __It's possible to make X/Y/Z?__ 68 | - It's my favourite question. Guys, basically everything is possible, but not everything is worth doing. Do you want to play as Mario? Sure, it's possible, but I'll not spend 5 years on trying to import Mario model to the game just because one crazy guy wants to replace Messi with Italian plumber. If you have got a request write [here](https://github.com/xAranaktu/FIFA-19---Career-Mode-Cheat-Table/labels/enhancement) and maybe one day you will see it added to the table. 69 | 70 | 71 | * __How can I edit age of a player?__ 72 | - "Editing Player->Edit Player" and change "Birth Year". Or change player age through GUI 73 | 74 | 75 | * __How can I edit player traits?__ 76 | - "FIFA Database->Database Tables->Players Table->Traits". As far as I know there is no limit, so your player can have all traits. 77 | 78 | 79 | * __Why cracked version is not supported?__ 80 | - Cracked version is not supported because I've got original game copy bought on Origin. Most probably my game version and your game version will differ because I've got the newest patch, and you not. So, ingame functions are different, addresses are different, after a few patches we will probably play a different game. 81 | 82 | 83 | * __After activating function nothing happens, what's wrong?__ 84 | - Try to restart the game and cheat engine, or maybe even your PC, also make sure you have started FIFA before cheat engine and you are attached to the game process. If it's not helping try to use older versions of cheat table. 85 | 86 | 87 | * __My game is crashing.__ 88 | - It's a right time to use your save backup. :) 89 | 90 | * __How to keep options in cheat table activated permanently?__ 91 | - [Auto activating scripts](#auto-activating-scripts) 92 | 93 | * __What's "Transfer.ini & Transfers.ini"?__ 94 | - This script is allowing to edit some settings from these .ini files. Generally, it can be used to make transfer window more active. This script is using default settings, you need to edit it to see any difference in the game. Right-click -> Change script -> Edit what you want to edit (Just change value after "#".) -> Ok -> Activate script -> Load your career save. 95 | 96 | 97 | * __How to use "Send scout to any country"?__ 98 | - Choose scout -> Set up a Scouting Network -> In CE activate "Send scout to any country" and change "Nationality ID" -> Back to FIFA window and send scout on a mission (doesn't matter which country you pick). Nationality ID's list is available [here](https://docs.google.com/spreadsheets/d/1eYx5j7FZwlaPKymv3_G-ezZKtfWmQ6hwjXukAfqYoto/edit?usp=sharing) 99 | 100 | 101 | * __How to replace generic manager with real one?__ 102 | - [Changing Manager Head Model](#changing-manager-head-model) 103 | 104 | * __How can I make my player to run exactly the same as 'Ronaldo'?__ 105 | - I've written short guide how to do that on the soccergaming forum. -> [How to run like Ronaldo](http://soccergaming.com/index.php?threads/fifa-18-career-mode-cheat-table.6459576/page-17#post-6488623) 106 | 107 | * __How to edit data in career_managerpref/career_managerinfo/career_users/career_calendar Table?__ 108 | 109 | Same as in FIFA 18. :) 110 | 111 | - In Cheat Engine Settings change debugger method to "VEH Debugger" (https://i.imgur.com/z4Q94Hn.png) 112 | - Activate "Database Tables" script 113 | - Load your career save to initialize pointers. 114 | - Exit career 115 | - In Cheat Engine go to "Memory Viewer" -> Press "CTRL + G" -> Go to address "INJECT_DatabaseRead" -> Follow jmp (https://i.imgur.com/gPHckIj.png) -> Scroll down until you will see "mov [usersDataPtr],r8" instruction -> Set breakpoint there (https://i.imgur.com/QZCd8ZO.png) 116 | - Load your career save, when game will freeze do the changes in database tables. 117 | - After you edit what you want go back to memory Viewer and delete breakpoint (https://i.imgur.com/o7YrN2V.png) 118 | - press 'F9' to unfreeze the game (https://i.imgur.com/jMBAnGd.png) 119 | 120 | * __Can I buy player who “recently joined a club”?__ 121 | - Yes, you need to edit "playerjointeamdate". Value "158229" should be fine. You will find it in "FIFA Database->Database Tables->Players table->Player Info". 122 | 123 | * __How can I change player name?__ 124 | 125 | - [Watch on YT](https://youtu.be/oUZuT4ZRx_c) 126 | 127 | * __Does the table work with player career?__ 128 | 129 | - The cheat table was designed for manager career, so for player career some things will work, and some won't. The only way to make stats/tattoos/etc permanent is to tick the red box on what you want applied, but then it will apply to your whole team. If you want your stats to permanently be applied, you have to change them at the end of the season (after the last match) or you can use some of the training scripts to increase your attributes. 130 | 131 | * __What does the primary and secondary attributes range do?__ 132 | 133 | With this script you can controll base attributes of the players that your youth scout brings you. When the game is generating new player it's using these ranges to define how good player will be at the beginning of his career. Which attributes are primary and which are secondary depends on what type of players your scout is trying to find. 134 | For example for "attack minded" type, primary attributes are: 135 | - DRIBBLING 136 | - SHOT POWER 137 | - VISION 138 | - INTERCEPTIONS 139 | - MARKING 140 | - CURVE 141 | 142 | secondary: 143 | - STAMINA 144 | - ACCELERATION 145 | - BALANCE 146 | - SPRINT SPEED 147 | 148 | so, when you have set PRIMARY_ATTRIBUTES_RANGE = [10, 20] and now when game is generating new attack minded player with 60 dribbling it will also add a random number from range 10-20 to this 60 dribbling. So he may end up with 70-80 dribbling. 149 | 150 | **WARNING!** In FIFA 18 I've noticed that this script is reponsible for generating regens with very high ovr. In my career Ronaldo regen had ~88 ovr at 16 yo, same with Buffon and other good players. 151 | 152 | ## Auto activating scripts 153 | Because cheat table contains a lot of scripts, you may want to let cheat engine to activate it for you. 154 | * For latest cheat table version 155 | * Go to settings (https://i.imgur.com/y7AnsA3.png) 156 | * Select scripts which will be activated and save (https://i.imgur.com/P27Gji5.gifv) 157 | * Next time when you run Cheat Table selected scripts will be automatically activate by cheat engine 158 | 159 | * For cheat table version from 1.0.0 to 1.0.11 160 | * You can use lua to make your life easier. Press "CTRL+ALT+L" in cheat engine to open Cheat Table Lua script. [here](http://fearlessrevolution.com/viewtopic.php?f=4&t=4976&p=21649#p21608) you can read how to use autoattach.lua script. 161 | 162 | 163 | ## FIFA 19 IDs 164 | 165 | List of FIFA 19 IDs is available here -> [Google Drive](https://docs.google.com/spreadsheets/d/1eYx5j7FZwlaPKymv3_G-ezZKtfWmQ6hwjXukAfqYoto/edit?usp=sharing) 166 | 167 | ## GUI 168 | GUI ([graphical user interface](https://en.wikipedia.org/wiki/Graphical_user_interface)) was added in v1.1.2. 169 | ![](https://i.imgur.com/Y3IMna3.png) 170 | 171 | With GUI editing players is easier and faster than before. 172 | 173 | **Main features:** 174 | 175 | - Automatic OVR relaculation on attributes/position change (Not including player international reputation) 176 | - You can search for players by their ID 177 | 178 | ![](https://i.imgur.com/sevnhWG.gif) 179 | - "Best At" section will help you to assing player to this best position. 180 | 181 | ![](https://i.imgur.com/wyFpxsR.png) 182 | - Date fields are automatically converted to human readable form. You don't need online calculators to calculate player age. 183 | 184 | ![](https://i.imgur.com/6xglehD.png) 185 | - Randomizing player attributes 186 | 187 | ![](https://i.imgur.com/XQyQdw0.gif) 188 | 189 | - Live preview on youth player headshot image while editing his headtype or haircolor. 190 | 191 | ![](https://i.imgur.com/lLWZM9e.gif) 192 | 193 | ## Schedule editor 194 | 195 | Three important games within 5 days? Sounds familiar? With Schedule Editor you can now edit date of the match! 196 | 197 | [gif](https://i.imgur.com/PfiTVdf.gif) 198 | 199 | 200 | **HOW TO EDIT FIXTURES :** 201 | 1. Load your career save 202 | 1. Activate 'Fixture Edit' script 203 | 2. Open 'Calendar' in-game 204 | 3. In Cheat table GUI open 'Schedule editor'. It should load matches that are currently display in in-game calendar 205 | 4. Change date -> Press 'Apply Changes' 206 | 207 | To edit match date in other months just switch month in in-game calendar and refresh schedule editor (by pressing on refresh icon for example) 208 | 209 | If you can't activate 'Fixture Edit' script. 210 | 1. Press "Memory View" button in CE 211 | 2. In Memory Viewer window press "View" -> "Enumerate Dlls and Symbols" 212 | 3. Close it 213 | 4. Close "Memory Viewer" 214 | 5. Try to activate script again 215 | 216 | Some basic rules that imo. you should stick to: 217 | 0. MAKE BACKUP OF YOUR SAVE!!! Your changes may cause game crashes. 218 | 1. Don't edit match date on match day. 219 | 2. Don't move match date to your current date. 220 | 221 | ## Permanent Stadium Change 222 | How to change your home stadium permanently. 223 | On example I'm changing AC Milan Home Stadium from 'San Siro' (ID: 5) to 'Old Trafford' (ID: 1) 224 | 1. In cheat table activate "career_managerpref Table" and "teamstadiumlinks Table" 225 | 2. You need to have an __upcoming match on your home stadium__ 226 | 227 | ![](https://i.imgur.com/GdlyMZT.png) 228 | 229 | 3. Press 'Play Match' and go to 'Match Preview' screen 230 | 231 | ![](https://i.imgur.com/VAmtWVS.jpg) 232 | 233 | 4. Back to cheat table and edit __'stadiumid'__ in __career_managerpref Table__ and __'stadiumid'__ in __teamstadiumlinks Table__. Dunno if it's necessary, but for safety, I also recommend you to change 'stadiumname' in teamstadiumlinks Table. 234 | 235 | ![](https://i.imgur.com/0GSyosR.png) 236 | 237 | 5. Now just play this match (you will play it on old stadium) or simulate it and the next home match will be played on the new stadium. Saving and reloading career save at this point may also work, so playing match on old stadium will be not needed. 238 | 239 | ![](https://i.imgur.com/nmVhcn8.jpg) 240 | 241 | ## Changing Player Head Model 242 | __List of Head IDs can be found on [FIFA 19 IDs](https://docs.google.com/spreadsheets/d/1eYx5j7FZwlaPKymv3_G-ezZKtfWmQ6hwjXukAfqYoto/edit?usp=sharing) list__ 243 | 244 | Now in __FIFA Database->Database Tables->Players table__ set: 245 | 246 | 1. Has High Quality Head to __1__ 247 | 2. Head Class Code to __0__ 248 | 3. Head Asset ID to __ID you want to use (i.e 1198)__ 249 | 4. Head Variation to __0__ 250 | 251 | ![](https://i.imgur.com/bMTnNbg.png) 252 | 253 | __Effect__ 254 | 255 | ![Before](https://i.imgur.com/t8pm49W.jpg) 256 | ![After](https://i.imgur.com/PFVjDjy.jpg) 257 | 258 | ## Changing Manager Head Model 259 | __List of Head IDs can be found on [FIFA 19 IDs](https://docs.google.com/spreadsheets/d/1eYx5j7FZwlaPKymv3_G-ezZKtfWmQ6hwjXukAfqYoto/edit?usp=sharing) list__ 260 | 261 | [Method 1 (RDBM 19)](https://docs.google.com/document/d/1LUM2z1cO_RcS2k91Jpea04lhQW33cjOO1-2BXeE-CSM/edit?usp=sharing) 262 | 263 | [Method 2 (Dunno who is the author of this)](https://docs.google.com/document/d/e/2PACX-1vTwIl5tMySFCSqymJsBXtAOSKFNmyv7kUfembGp7EFbXFJzcjmnAGh9N8LHKU5GBl8rfSJU2cckiCyA/pub) 264 | 265 | Method 3 (my method and not recommended): 266 | 1. Activate "Manager Table" 267 | 2. Activate "Filter" 268 | 3. In "Team ID Filter" put ID of your team. From sofifa for example or from [FIFA 19 IDs](https://docs.google.com/spreadsheets/d/1eYx5j7FZwlaPKymv3_G-ezZKtfWmQ6hwjXukAfqYoto/edit?usp=sharing). 269 | 4. Activate "Team ID Filter" 270 | 5. Go to "News" in-game. 271 | 6. If teamid in manager table will be your teamid - 1 (as on screen below) then you can make your changes. 272 | ![](https://i.imgur.com/hxxc0EW.png) 273 | 7. Put any Head Model id from [FIFA 19 IDs](https://docs.google.com/spreadsheets/d/1eYx5j7FZwlaPKymv3_G-ezZKtfWmQ6hwjXukAfqYoto/edit?usp=sharing) in 'headid' field to change head model of your manager. 274 | 275 | __If condition from point 6. is not met you need to find a news which will query manager database. Just click randomly on different tabs and news until you will have same situation as on screen above.__ 276 | 277 | 278 | ## Removing injury from a player 279 | 280 | - Activate "Players Injuries" script 281 | - Go to "Transfers" -> "Search Players" in-game 282 | 283 | ![](https://i.imgur.com/NsH5CM1.jpg) 284 | 285 | - Find injured player 286 | 287 | ![](https://i.imgur.com/Hx8JCuv.png) 288 | 289 | - Click on him 290 | 291 | ![](https://i.imgur.com/iKa2bbS.png) 292 | 293 | - Now in Cheat Engine change following values: playerid to '4294967295', Recovery Date to '20080101' and set the rest to '0' 294 | 295 | ![](https://i.imgur.com/IhY8W8c.png) 296 | 297 | - Done. Injury has been removed 298 | 299 | ![](https://i.imgur.com/c6w3wvm.png) 300 | 301 | 302 | ## Contract Negotiation 303 | Any terms you set here will be accepted by the player during contract negotiations. 304 | 305 | [Contract Negotiation - Video Tutorial by Und3rcov3r Nerd 306 | ](https://youtu.be/Y9t2QilaC8M?t=65) 307 | 308 | * **Contract Negotiation** 309 | - Wage - Self-explanatory. It's 500 by default. 310 | - Contract Length - Self-explanatory. It's 72 by default (6 years). 311 | - Release Clause - Self-explanatory. It's 0 by default, so a player will not have a release clause. 312 | - Squad Role - It's 5 by default. 5 = Prospect, 4 = Sporadic, 3 = Rotation, 2 = Important, 1 = Crucial 313 | - Signing Bonus - It's 0 by default. 314 | - Bonus Type - It's 0 by default. 0 = Appearances, 1 = Clean Sheets, 2 = Goals scored 315 | - Bonus Type - Count - It's 50 by default. 316 | - Bonus Type - Sum - It's 5 by default. You will pay 5$ after player will reach bonus type count. 317 | -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/playerseditorform/consts.lua: -------------------------------------------------------------------------------- 1 | 2 | -- Components description 3 | -- id - unique id of the memory record in cheat table 4 | -- modifier - value to be added to the value of the memory record 5 | -- valFromFunc - this func will be called to fill the value of the component 6 | -- components_inheriting_value - these components will have the same value as the parent 7 | -- depends_on - components used to calc new value for the parent 8 | -- group - player attribute group 9 | -- events - component events 10 | function get_components_description_player_edit() 11 | return { 12 | PlayerIDEdit = {id = CT_MEMORY_RECORDS['PLAYERID'], modifier = 0}, 13 | TeamIDEdit = {id = CT_MEMORY_RECORDS['TEAMID'], modifier = 1}, 14 | OverallEdit = {id = 102, modifier = 1}, 15 | PotentialEdit = {id = 24, modifier = 1}, 16 | AgeEdit = { 17 | id = CT_MEMORY_RECORDS['BIRTHDATE'], 18 | current_date_rec_id = CT_MEMORY_RECORDS['CURRDATE'], 19 | modifier = 0, 20 | valFromFunc = birthdate_to_age, 21 | onApplyChanges = age_to_birthdate 22 | }, 23 | FirstNameIDEdit = {id = 38, modifier = 0}, 24 | LastNameIDEdit = {id = 59, modifier = 0}, 25 | CommonNameIDEdit = {id = 111, modifier = 0}, 26 | JerseyNameIDEdit = {id = 108, modifier = 0}, 27 | NationalityCB = {id = 84, modifier = 0}, 28 | ContractValidUntilEdit = {id = 30, modifier = 0}, 29 | PlayerJoinTeamDateEdit = { 30 | id = 81, 31 | current_date_rec_id = 2908, 32 | modifier = 0, 33 | valFromFunc = days_to_date, 34 | onApplyChanges = date_to_days 35 | }, 36 | JerseyNumberEdit = {id = 2766, modifier = 1}, 37 | GKSaveTypeEdit = {id = 7, modifier = 0}, 38 | GKKickStyleEdit = {id = 91, modifier = 0}, 39 | 40 | PreferredPosition1CB = {id = 46, modifier = 0}, 41 | PreferredPosition2CB = {id = 42, modifier = -1}, 42 | PreferredPosition3CB = {id = 13, modifier = -1}, 43 | PreferredPosition4CB = {id = 115, modifier = -1}, 44 | 45 | AttackingWorkRateCB = {id = 67, modifier = 0}, 46 | DefensiveWorkRateCB = {id = 83, modifier = 0}, 47 | SkillMovesCB = {id = 64, modifier = 0}, 48 | WeakFootCB = {id = 87, modifier = 1}, 49 | 50 | IsRetiringCB = {id = 18, modifier = 0}, 51 | InternationalReputationCB = {id = 60, modifier = 1}, 52 | PreferredFootCB = {id = 85, modifier = 1}, 53 | GenderCB = {id = 120, modifier = 0}, 54 | 55 | AttackTrackBar = { 56 | valFromFunc = AttributesTrackBarVal, 57 | group = 'Attack', 58 | components_inheriting_value = { 59 | "AttackValueLabel", 60 | }, 61 | depends_on = { 62 | "CrossingEdit", "FinishingEdit", "HeadingAccuracyEdit", 63 | "ShortPassingEdit", "VolleysEdit" 64 | }, 65 | events = { 66 | OnChange = AttributesTrackBarOnChange, 67 | }, 68 | }, 69 | CrossingEdit = { 70 | id = 23, 71 | modifier = 1, 72 | group = 'Attack', 73 | events = { 74 | OnChange = AttrOnChange, 75 | }, 76 | }, 77 | FinishingEdit = { 78 | id = 32, 79 | modifier = 1, 80 | group = 'Attack', 81 | events = { 82 | OnChange = AttrOnChange, 83 | }, 84 | }, 85 | HeadingAccuracyEdit = { 86 | id = 71, 87 | modifier = 1, 88 | group = 'Attack', 89 | events = { 90 | OnChange = AttrOnChange, 91 | }, 92 | }, 93 | ShortPassingEdit = { 94 | id = 62, 95 | modifier = 1, 96 | group = 'Attack', 97 | events = { 98 | OnChange = AttrOnChange, 99 | }, 100 | }, 101 | VolleysEdit = { 102 | id = 116, 103 | modifier = 1, 104 | group = 'Attack', 105 | events = { 106 | OnChange = AttrOnChange, 107 | }, 108 | }, 109 | 110 | DefendingTrackBar = { 111 | valFromFunc = AttributesTrackBarVal, 112 | group = 'Defending', 113 | components_inheriting_value = { 114 | "DefendingValueLabel", 115 | }, 116 | depends_on = { 117 | "MarkingEdit", "StandingTackleEdit", "SlidingTackleEdit", 118 | }, 119 | events = { 120 | OnChange = AttributesTrackBarOnChange, 121 | }, 122 | }, 123 | MarkingEdit = { 124 | id = 94, 125 | modifier = 1, 126 | group = 'Defending', 127 | events = { 128 | OnChange = AttrOnChange, 129 | }, 130 | }, 131 | StandingTackleEdit = { 132 | id = 11, 133 | modifier = 1, 134 | group = 'Defending', 135 | events = { 136 | OnChange = AttrOnChange, 137 | }, 138 | }, 139 | SlidingTackleEdit = { 140 | id = 34, 141 | modifier = 1, 142 | group = 'Defending', 143 | events = { 144 | OnChange = AttrOnChange, 145 | }, 146 | }, 147 | 148 | SkillTrackBar = { 149 | valFromFunc = AttributesTrackBarVal, 150 | group = 'Skill', 151 | components_inheriting_value = { 152 | "SkillValueLabel", 153 | }, 154 | depends_on = { 155 | "DribblingEdit", "CurveEdit", "FreeKickAccuracyEdit", 156 | "LongPassingEdit", "BallControlEdit", 157 | }, 158 | events = { 159 | OnChange = AttributesTrackBarOnChange, 160 | }, 161 | }, 162 | DribblingEdit = { 163 | id = 33, 164 | modifier = 1, 165 | group = 'Skill', 166 | events = { 167 | OnChange = AttrOnChange, 168 | }, 169 | }, 170 | CurveEdit = { 171 | id = 3, 172 | modifier = 1, 173 | group = 'Skill', 174 | events = { 175 | OnChange = AttrOnChange, 176 | }, 177 | }, 178 | FreeKickAccuracyEdit = { 179 | id = 63, 180 | modifier = 1, 181 | group = 'Skill', 182 | events = { 183 | OnChange = AttrOnChange, 184 | }, 185 | }, 186 | LongPassingEdit = { 187 | id = 14, 188 | modifier = 1, 189 | group = 'Skill', 190 | events = { 191 | OnChange = AttrOnChange, 192 | }, 193 | }, 194 | BallControlEdit = { 195 | id = 47, 196 | modifier = 1, 197 | group = 'Skill', 198 | events = { 199 | OnChange = AttrOnChange, 200 | }, 201 | }, 202 | 203 | GoalkeeperTrackBar = { 204 | valFromFunc = AttributesTrackBarVal, 205 | group = 'Goalkeeper', 206 | components_inheriting_value = { 207 | "GoalkeeperValueLabel", 208 | }, 209 | depends_on = { 210 | "GKDivingEdit", "GKHandlingEdit", "GKKickingEdit", 211 | "GKPositioningEdit", "GKReflexEdit", 212 | }, 213 | events = { 214 | OnChange = AttributesTrackBarOnChange, 215 | }, 216 | }, 217 | GKDivingEdit = { 218 | id = 20, 219 | modifier = 1, 220 | group = 'Goalkeeper', 221 | events = { 222 | OnChange = AttrOnChange, 223 | }, 224 | }, 225 | GKHandlingEdit = { 226 | id = 76, 227 | modifier = 1, 228 | group = 'Goalkeeper', 229 | events = { 230 | OnChange = AttrOnChange, 231 | }, 232 | }, 233 | GKKickingEdit = { 234 | id = 58, 235 | modifier = 1, 236 | group = 'Goalkeeper', 237 | events = { 238 | OnChange = AttrOnChange, 239 | }, 240 | }, 241 | GKPositioningEdit = { 242 | id = 96, 243 | modifier = 1, 244 | group = 'Goalkeeper', 245 | events = { 246 | OnChange = AttrOnChange, 247 | }, 248 | }, 249 | GKReflexEdit = { 250 | id = 25, 251 | modifier = 1, 252 | group = 'Goalkeeper', 253 | events = { 254 | OnChange = AttrOnChange, 255 | }, 256 | }, 257 | 258 | PowerTrackBar = { 259 | valFromFunc = AttributesTrackBarVal, 260 | group = 'Power', 261 | components_inheriting_value = { 262 | "PowerValueLabel", 263 | }, 264 | depends_on = { 265 | "ShotPowerEdit", "JumpingEdit", "StaminaEdit", 266 | "StrengthEdit", "LongShotsEdit", 267 | }, 268 | events = { 269 | OnChange = AttributesTrackBarOnChange, 270 | }, 271 | }, 272 | ShotPowerEdit = { 273 | id = 48, 274 | modifier = 1, 275 | group = 'Power', 276 | events = { 277 | OnChange = AttrOnChange, 278 | }, 279 | }, 280 | JumpingEdit = { 281 | id = 88, 282 | modifier = 1, 283 | group = 'Power', 284 | events = { 285 | OnChange = AttrOnChange, 286 | }, 287 | }, 288 | StaminaEdit = { 289 | id = 92, 290 | modifier = 1, 291 | group = 'Power', 292 | events = { 293 | OnChange = AttrOnChange, 294 | }, 295 | }, 296 | StrengthEdit = { 297 | id = 43, 298 | modifier = 1, 299 | group = 'Power', 300 | events = { 301 | OnChange = AttrOnChange, 302 | }, 303 | }, 304 | LongShotsEdit = { 305 | id = 19, 306 | modifier = 1, 307 | group = 'Power', 308 | events = { 309 | OnChange = AttrOnChange, 310 | }, 311 | }, 312 | 313 | MovementTrackBar = { 314 | valFromFunc = AttributesTrackBarVal, 315 | group = 'Movement', 316 | components_inheriting_value = { 317 | "MovementValueLabel", 318 | }, 319 | depends_on = { 320 | "AccelerationEdit", "SprintSpeedEdit", "AgilityEdit", 321 | "ReactionsEdit", "BalanceEdit", 322 | }, 323 | events = { 324 | OnChange = AttributesTrackBarOnChange, 325 | }, 326 | }, 327 | AccelerationEdit = { 328 | id = 70, 329 | modifier = 1, 330 | group = 'Movement', 331 | events = { 332 | OnChange = AttrOnChange, 333 | }, 334 | }, 335 | SprintSpeedEdit = { 336 | id = 39, 337 | modifier = 1, 338 | group = 'Movement', 339 | events = { 340 | OnChange = AttrOnChange, 341 | }, 342 | }, 343 | AgilityEdit = { 344 | id = 5, 345 | modifier = 1, 346 | group = 'Movement', 347 | events = { 348 | OnChange = AttrOnChange, 349 | }, 350 | }, 351 | ReactionsEdit = { 352 | id = 27, 353 | modifier = 1, 354 | group = 'Movement', 355 | events = { 356 | OnChange = AttrOnChange, 357 | }, 358 | }, 359 | BalanceEdit = { 360 | id = 55, 361 | modifier = 1, 362 | group = 'Movement', 363 | events = { 364 | OnChange = AttrOnChange, 365 | }, 366 | }, 367 | 368 | MentalityTrackBar = { 369 | valFromFunc = AttributesTrackBarVal, 370 | group = 'Mentality', 371 | components_inheriting_value = { 372 | "MentalityValueLabel", 373 | }, 374 | depends_on = { 375 | "AggressionEdit", "ComposureEdit", "InterceptionsEdit", 376 | "AttackPositioningEdit", "VisionEdit", "PenaltiesEdit", 377 | }, 378 | events = { 379 | OnChange = AttributesTrackBarOnChange, 380 | }, 381 | }, 382 | AggressionEdit = { 383 | id = 69, 384 | modifier = 1, 385 | group = 'Mentality', 386 | events = { 387 | OnChange = AttrOnChange, 388 | }, 389 | }, 390 | ComposureEdit = { 391 | id = 28, 392 | modifier = 1, 393 | group = 'Mentality', 394 | events = { 395 | OnChange = AttrOnChange, 396 | }, 397 | }, 398 | InterceptionsEdit = { 399 | id = 21, 400 | modifier = 1, 401 | group = 'Mentality', 402 | events = { 403 | OnChange = AttrOnChange, 404 | }, 405 | }, 406 | AttackPositioningEdit = { 407 | id = 8, 408 | modifier = 1, 409 | group = 'Mentality', 410 | events = { 411 | OnChange = AttrOnChange, 412 | }, 413 | }, 414 | VisionEdit = { 415 | id = 29, 416 | modifier = 1, 417 | group = 'Mentality', 418 | events = { 419 | OnChange = AttrOnChange, 420 | }, 421 | }, 422 | PenaltiesEdit = { 423 | id = 15, 424 | modifier = 1, 425 | group = 'Mentality', 426 | events = { 427 | OnChange = AttrOnChange, 428 | }, 429 | }, 430 | 431 | LongThrowInCB = {id = 1809,}, 432 | PowerFreeKickCB = {id = 2079,}, 433 | InjuryProneCB = {id = 1812,}, 434 | SolidPlayerCB = {id = 1813,}, 435 | LeadershipCB = {id = 1822,}, 436 | EarlyCrosserCB = {id = 1820,}, 437 | FinesseShotCB = {id = 1819,}, 438 | FlairCB = {id = 1818,}, 439 | SpeedDribblerCB = {id = 1823,}, 440 | GKLongthrowCB = {id = 1829,}, 441 | PowerheaderCB = {id = 1828,}, 442 | GiantthrowinCB = {id = 1832,}, 443 | OutsitefootshotCB = {id = 1833,}, 444 | SwervePassCB = {id = 1835,}, 445 | SecondWindCB = {id = 1834,}, 446 | SkilledDribblingCB = {id = 1299,}, 447 | FlairPassesCB = {id = 1838,}, 448 | ChippedPenaltyCB = {id = 1842,}, 449 | BicycleKicksCB = {id = 1841,}, 450 | GKFlatKickCB = {id = 1845,}, 451 | OneClubPlayerCB = {id = 1846,}, 452 | TeamPlayerCB = {id = 1847,}, 453 | RushesOutOfGoalCB = {id = 1850,}, 454 | CautiousWithCrossesCB = {id = 1856,}, 455 | ComesForCrossessCB = {id = 1855,}, 456 | SaveswithFeetCB = {id = 1960,}, 457 | SetPlaySpecialistCB = {id = 1959,}, 458 | InflexibilityCB = {id = 1298,}, 459 | DiverCB = {id = 1811,}, 460 | AvoidsusingweakerfootCB = {id = 1814,}, 461 | TriestobeatdefensivelineCB = {id = 1816,}, 462 | SelfishCB = {id = 1817,}, 463 | ArguesWithRefereeCB = {id = 1821,}, 464 | GKupforcornersCB = {id = 1831,}, 465 | PuncherCB = {id = 1830,}, 466 | GKOneonOneCB = {id = 1827,}, 467 | FansfavouriteCB = {id = 1873,}, 468 | AcrobaticClearanceCB = {id = 1836,}, 469 | FancyFlicksCB = {id = 1844,}, 470 | StutterPenaltyCB = {id = 1843,}, 471 | DivingHeaderCB = {id = 1840,}, 472 | DrivenPassCB = {id = 1839,}, 473 | BacksBacksIntoPlayerCB = {id = 1851,}, 474 | HiddenSetPlaySpecialistCB = {id = 1852,}, 475 | TakesFinesseFreeKicksCB = {id = 1853,}, 476 | TargetForwardCB = {id = 1857,}, 477 | BlamesTeammatesCB = {id = 1961,}, 478 | TornadoSkillmoveCB = {id = 2078,}, 479 | DivesIntoTacklesCB = {id = 1815,}, 480 | LongPasserCB = {id = 1825,}, 481 | LongShotTakerCB = {id = 1824,}, 482 | PlaymakerCB = {id = 1826,}, 483 | ChipShotCB = {id = 1848,}, 484 | TechnicalDribblerCB = {id = 1849,}, 485 | 486 | HeightEdit = {id = 40, modifier = 130}, 487 | WeightEdit = {id = 51, modifier = 30}, 488 | BodyTypeCB = {id = 112, modifier = 1}, 489 | HeadTypeCodeCB = { 490 | id = CT_MEMORY_RECORDS['HEADTYPECODE'], 491 | modifier = 0, 492 | already_filled = true, 493 | events = { 494 | OnChange = HeadTypeCodeCBOnChange, 495 | OnDropDown = CommonCBOnDropDown, 496 | OnMouseEnter = CommonCBOnMouseEnter, 497 | OnMouseLeave = CommonCBOnMouseLeave, 498 | }, 499 | }, 500 | HeadTypeGroupCB = { 501 | valFromFunc = FillHeadTypeCB, 502 | events = { 503 | OnChange = HeadTypeGroupCBOnChange, 504 | OnDropDown = CommonCBOnDropDown, 505 | OnMouseEnter = CommonCBOnMouseEnter, 506 | OnMouseLeave = CommonCBOnMouseLeave, 507 | }, 508 | }, 509 | HairTypeEdit = {id = 10, modifier = 0}, 510 | HairStyleEdit = {id = 110, modifier = 0}, 511 | HairColorCB = { 512 | id = CT_MEMORY_RECORDS['HAIRCOLORCODE'], 513 | modifier = 0, 514 | events = { 515 | OnChange = HeadTypeCodeCBOnChange, 516 | OnDropDown = CommonCBOnDropDown, 517 | OnMouseEnter = CommonCBOnMouseEnter, 518 | OnMouseLeave = CommonCBOnMouseLeave, 519 | }, 520 | }, 521 | FacialHairTypeEdit = {id = 2, modifier = 0}, 522 | FacialHairColorEdit = {id = 118, modifier = 0}, 523 | SideburnsEdit = {id = 86, modifier = 0}, 524 | EyebrowEdit = {id = 73, modifier = 0}, 525 | EyeColorEdit = {id = 77, modifier = 0}, 526 | SkinTypeEdit = {id = 89, modifier = 0}, 527 | SkinColorCB = {id = 100, modifier = 1}, 528 | HasHighQualityHeadCB = {id = 52, modifier = 0}, 529 | HeadAssetIDEdit = {id = 57, modifier = 0}, 530 | HeadVariationEdit = {id = 97, modifier = 0}, 531 | HeadClassCodeEdit = {id = 82, modifier = 0}, 532 | TattooLeftArmEdit = {id = 9, modifier = 0}, 533 | TattooRightArmEdit = {id = 54, modifier = 0}, 534 | TattooLeftNeckEdit = {id = 103, modifier = 0}, 535 | TattooRightNeckEdit = {id = 90, modifier = 0}, 536 | TattooBackNeckEdit = {id = 12, modifier = 0}, 537 | JerseyStyleEdit = {id = 4, modifier = 0}, 538 | JerseyFitEdit = {id = 105, modifier = 0}, 539 | jerseysleevelengthEdit = {id = 78, modifier = 0}, 540 | hasseasonaljerseyEdit = {id = 41, modifier = 0}, 541 | shortstyleEdit = {id = 101, modifier = 0}, 542 | socklengthEdit = {id = 50, modifier = 0}, 543 | 544 | GKGloveTypeEdit = {id = 53, modifier = 0}, 545 | shoetypeEdit = {id = 44, modifier = 0}, 546 | shoedesignEdit = {id = 107, modifier = 0}, 547 | shoecolorEdit1 = {id = 109, modifier = 0}, 548 | shoecolorEdit2 = {id = 22, modifier = 0}, 549 | AccessoryEdit1 = {id = 80, modifier = 0}, 550 | AccessoryColourEdit1 = {id = 36, modifier = 0}, 551 | AccessoryEdit2 = {id = 106, modifier = 0}, 552 | AccessoryColourEdit2 = {id = 117, modifier = 0}, 553 | AccessoryEdit3 = {id = 35, modifier = 0}, 554 | AccessoryColourEdit3 = {id = 79, modifier = 0}, 555 | AccessoryEdit4 = {id = 6, modifier = 0}, 556 | AccessoryColourEdit4 = {id = 95, modifier = 0}, 557 | 558 | runningcodeEdit1 = {id = 114, modifier = 0}, 559 | runningcodeEdit2 = {id = 74, modifier = 0}, 560 | FinishingCodeEdit1 = {id = 26, modifier = 0}, 561 | FinishingCodeEdit2 = {id = 68, modifier = 0}, 562 | AnimFreeKickStartPosEdit = {id = 16, modifier = 0}, 563 | AnimPenaltiesStartPosEdit = {id = 113, modifier = 0}, 564 | AnimPenaltiesKickStyleEdit = {id = 17, modifier = 0}, 565 | AnimPenaltiesMotionStyleEdit = {id = 61, modifier = 0}, 566 | AnimPenaltiesApproachEdit = {id = 31, modifier = 0}, 567 | FacePoserPresetEdit = {id = 65, modifier = 0}, 568 | EmotionEdit = {id = 104, modifier = 0}, 569 | SkillMoveslikelihoodEdit = {id = 98, modifier = 0}, 570 | ModifierEdit = {id = 75, modifier = -5}, 571 | IsCustomizedEdit = {id = 72, modifier = 0}, 572 | UserCanEditNameEdit = {id = 66, modifier = 0}, 573 | } 574 | end 575 | 576 | 577 | HEAD_TYPE_GROUPS = { 578 | African_South_European = { 579 | 5000, 580 | 5001, 581 | 5002, 582 | 5003, 583 | 10500, 584 | 10501, 585 | 10502, 586 | }, 587 | African = { 588 | 1000, 589 | 1001, 590 | 1002, 591 | 1003, 592 | 1004, 593 | 1005, 594 | 1006, 595 | 1007, 596 | 1008, 597 | 1009, 598 | 1010, 599 | 1011, 600 | 1012, 601 | 1013, 602 | 1014, 603 | 1015, 604 | 1016, 605 | 1017, 606 | 1018, 607 | 1019, 608 | 1020, 609 | 1021, 610 | 1022, 611 | 1023, 612 | 1024, 613 | 1025, 614 | 1026, 615 | 1027, 616 | 6500, 617 | 6501, 618 | 6502, 619 | }, 620 | Eastern_European = { 621 | 2000, 622 | 2001, 623 | 2002, 624 | 2003, 625 | 2004, 626 | 2005, 627 | 2006, 628 | 2007, 629 | 2008, 630 | 2009, 631 | 2010, 632 | 2011, 633 | 2012, 634 | 2013, 635 | 2014, 636 | 2015, 637 | 2016, 638 | 2017, 639 | 2019, 640 | 2020, 641 | 2021, 642 | 2022, 643 | 2023, 644 | 2024, 645 | 2025, 646 | 2026, 647 | 2027, 648 | 2028, 649 | 2029, 650 | 2030, 651 | 7500, 652 | 7501, 653 | 7502, 654 | }, 655 | South_European = { 656 | 3500, 657 | 3501, 658 | 3502, 659 | 3503, 660 | 3504, 661 | 3505, 662 | 9000, 663 | 9001, 664 | 9002, 665 | }, 666 | Arabic = { 667 | 2500, 668 | 2501, 669 | 2502, 670 | 2503, 671 | 2504, 672 | 2505, 673 | 2506, 674 | 2507, 675 | 2508, 676 | 2509, 677 | 2510, 678 | 2511, 679 | 2512, 680 | 2513, 681 | 2514, 682 | 2515, 683 | 2516, 684 | 2517, 685 | 2518, 686 | 8000, 687 | 8001, 688 | 8002, 689 | }, 690 | Asian = { 691 | 500, 692 | 501, 693 | 502, 694 | 503, 695 | 504, 696 | 505, 697 | 506, 698 | 507, 699 | 508, 700 | 509, 701 | 510, 702 | 511, 703 | 512, 704 | 513, 705 | 514, 706 | 515, 707 | 516, 708 | 517, 709 | 518, 710 | 519, 711 | 520, 712 | 521, 713 | 522, 714 | 523, 715 | 524, 716 | 525, 717 | 526, 718 | 527, 719 | 528, 720 | 529, 721 | 530, 722 | 531, 723 | 532, 724 | 533, 725 | 534, 726 | 535, 727 | 536, 728 | 537, 729 | 538, 730 | 539, 731 | 540, 732 | 541, 733 | 542, 734 | 543, 735 | 544, 736 | 545, 737 | 546, 738 | 547, 739 | 548, 740 | 549, 741 | 550, 742 | 551, 743 | 552, 744 | 553, 745 | 554, 746 | 555, 747 | 556, 748 | 557, 749 | 558, 750 | 559, 751 | 560, 752 | 561, 753 | 562, 754 | 6000, 755 | 6001, 756 | 6002, 757 | 6003, 758 | 6004, 759 | 6005, 760 | 6006, 761 | 6007, 762 | 6008, 763 | 6009, 764 | }, 765 | Caucasian = { 766 | 0, 767 | 1, 768 | 2, 769 | 3, 770 | 4, 771 | 5, 772 | 6, 773 | 7, 774 | 8, 775 | 9, 776 | 10, 777 | 11, 778 | 12, 779 | 13, 780 | 14, 781 | 15, 782 | 16, 783 | 17, 784 | 18, 785 | 19, 786 | 20, 787 | 21, 788 | 22, 789 | 23, 790 | 24, 791 | 25, 792 | 5500, 793 | 5501, 794 | 5502, 795 | 5503, 796 | 5504, 797 | 5505, 798 | }, 799 | Latin = { 800 | 1500, 801 | 1501, 802 | 1502, 803 | 1503, 804 | 1504, 805 | 1505, 806 | 1506, 807 | 1507, 808 | 1508, 809 | 1509, 810 | 1510, 811 | 1511, 812 | 1512, 813 | 1513, 814 | 1514, 815 | 1515, 816 | 1516, 817 | 1517, 818 | 1518, 819 | 1519, 820 | 1520, 821 | 1521, 822 | 1522, 823 | 1523, 824 | 1524, 825 | 1525, 826 | 1526, 827 | 1527, 828 | 1528, 829 | 7000, 830 | 7001, 831 | 7002, 832 | 7003, 833 | 7004, 834 | 7005, 835 | 7006, 836 | 7007, 837 | 7008, 838 | 7009, 839 | 7010, 840 | 7011, 841 | }, 842 | African_South = { 843 | 3000, 844 | 3001, 845 | 3002, 846 | 3003, 847 | 3004, 848 | 3005, 849 | 8500, 850 | 8501, 851 | 8502, 852 | }, 853 | North_European = { 854 | 4000, 855 | 4001, 856 | 4002, 857 | 4003, 858 | 9500, 859 | 9501, 860 | 9502, 861 | }, 862 | African_North = { 863 | 4500, 864 | 4501, 865 | 4502, 866 | 4525, 867 | 10000, 868 | 10001, 869 | 10002, 870 | } 871 | } -------------------------------------------------------------------------------- /FIFA 19 - CM Cheat Table/lua/GUI/forms/playerseditorform/events.lua: -------------------------------------------------------------------------------- 1 | require 'lua/GUI/consts'; 2 | require 'lua/GUI/helpers'; 3 | require 'lua/GUI/forms/playerseditorform/consts'; 4 | require 'lua/GUI/forms/playerseditorform/helpers'; 5 | require 'lua/fut_requests' 6 | 7 | -- Make window dragable 8 | function PlayerEditTopPanelMouseDown(sender, button, x, y) 9 | PlayersEditorForm.dragNow() 10 | end 11 | 12 | -- EVENTS 13 | 14 | local FillPlayerEditTimer = createTimer(nil) 15 | 16 | -- OnShow - Player Edit Form 17 | function PlayerEditFormShow(sender) 18 | COMPONENTS_DESCRIPTION_PLAYER_EDIT = get_components_description_player_edit() 19 | HAS_UNAPPLIED_PLAYER_CHANGES = false 20 | 21 | local playerid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']) 22 | 23 | -- Don't update anything if we don't have players table addr 24 | if playerid_record == nil then 25 | do_log("playerid_record is nil. Activate 'Database Tables' script and reload your career save.", 'ERROR') 26 | PlayersEditorForm.hide() 27 | MainWindowForm.show() 28 | return 29 | elseif playerid_record.Value == '??' then 30 | do_log("playerid_record.Value is '??'. Activate 'Database Tables' script and reload your career save.", 'ERROR') 31 | PlayersEditorForm.hide() 32 | MainWindowForm.show() 33 | return 34 | end 35 | 36 | -- or teamplayerlinks table addr 37 | local teamid_record = ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['TEAMID']) 38 | if teamid_record == nil then 39 | do_log("teamid_record is nil", 'ERROR') 40 | PlayersEditorForm.hide() 41 | MainWindowForm.show() 42 | return 43 | elseif teamid_record.Value == '??' then 44 | do_log("teamid_record.Value is '??'. Activate 'Database Tables' script and reload your career save.", 'ERROR') 45 | PlayersEditorForm.hide() 46 | MainWindowForm.show() 47 | return 48 | end 49 | 50 | -- Show Loading panel 51 | PlayersEditorForm.FindPlayerByID.Visible = false 52 | PlayersEditorForm.SearchPlayerByID.Visible = false 53 | PlayersEditorForm.WhileLoadingPanel.Visible = true 54 | 55 | -- Load Data 56 | timer_onTimer(FillPlayerEditTimer, TruePlayerEditFormShow) 57 | timer_setInterval(FillPlayerEditTimer, 100) 58 | timer_setEnabled(FillPlayerEditTimer, true) 59 | end 60 | 61 | function TruePlayerEditFormShow() 62 | -- Disable Timer 63 | timer_setEnabled(FillPlayerEditTimer, false) 64 | 65 | -- Fill Form 66 | FillPlayerEditForm(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']).Value) 67 | 68 | -- Recalculate OVR (update "Best At") 69 | recalculate_ovr() 70 | 71 | -- Create Hotkeys 72 | create_hotkeys() 73 | 74 | -- Clone CM 75 | PlayersEditorForm.CopyCMFindPlayerByID.Text = 'Find player by ID...' 76 | 77 | -- FUT 78 | PlayersEditorForm.CloneFromListBox.setItemIndex(0) 79 | PlayersEditorForm.CardContainerPanel.Visible = false 80 | 81 | -- Hide Loading Panel and show components 82 | PlayerInfoTabClick() 83 | PlayersEditorForm.FindPlayerByID.Text = 'Find player by ID...' 84 | PlayersEditorForm.FindPlayerByID.Visible = true 85 | PlayersEditorForm.SearchPlayerByID.Visible = true 86 | PlayersEditorForm.WhileLoadingPanel.Visible = false 87 | end 88 | 89 | -- OnClose Players Editor Form 90 | function PlayersEditorFormClose(sender) 91 | check_if_has_unapplied_player_changes() 92 | destroy_hotkeys() 93 | return caHide 94 | end 95 | 96 | 97 | -- TOP BAR 98 | function PlayerEditMinimizeClick(sender) 99 | PlayersEditorForm.WindowState = "wsMinimized" 100 | end 101 | function PlayerEditExitClick(sender) 102 | PlayersEditorForm.close() 103 | MainWindowForm.show() 104 | end 105 | 106 | -- TABS 107 | 108 | -- Tab Clicks 109 | function PlayerInfoTabClick(sender) 110 | -- No action when tab is visible 111 | if PlayersEditorForm.PlayerInfoPanel.Visible then return end 112 | 113 | -- Set Colors 114 | PlayersEditorForm.PlayerInfoTab.Color = '0x001D1618' 115 | PlayersEditorForm.AttributesTab.Color = '0x0049363C' 116 | PlayersEditorForm.TraitsTab.Color = '0x0049363C' 117 | PlayersEditorForm.AppearanceTab.Color = '0x0049363C' 118 | PlayersEditorForm.AccessoriesTab.Color = '0x0049363C' 119 | PlayersEditorForm.OtherTab.Color = '0x0049363C' 120 | PlayersEditorForm.PlayerCloneTab.Color = '0x0049363C' 121 | 122 | -- Activate tab 123 | PlayersEditorForm.PlayerInfoPanel.Visible = true 124 | PlayersEditorForm.AttributesPanel.Visible = false 125 | PlayersEditorForm.TraitsPanel.Visible = false 126 | PlayersEditorForm.AppearancePanel.Visible = false 127 | PlayersEditorForm.AccessoriesPanel.Visible = false 128 | PlayersEditorForm.OtherPanel.Visible = false 129 | PlayersEditorForm.PlayerClonePanel.Visible = false 130 | end 131 | function AttributesTabClick(sender) 132 | if PlayersEditorForm.AttributesPanel.Visible then return end 133 | 134 | PlayersEditorForm.PlayerInfoTab.Color = '0x0049363C' 135 | PlayersEditorForm.AttributesTab.Color = '0x001D1618' 136 | PlayersEditorForm.TraitsTab.Color = '0x0049363C' 137 | PlayersEditorForm.AppearanceTab.Color = '0x0049363C' 138 | PlayersEditorForm.AccessoriesTab.Color = '0x0049363C' 139 | PlayersEditorForm.OtherTab.Color = '0x0049363C' 140 | PlayersEditorForm.PlayerCloneTab.Color = '0x0049363C' 141 | 142 | PlayersEditorForm.PlayerInfoPanel.Visible = false 143 | PlayersEditorForm.AttributesPanel.Visible = true 144 | PlayersEditorForm.TraitsPanel.Visible = false 145 | PlayersEditorForm.AppearancePanel.Visible = false 146 | PlayersEditorForm.AccessoriesPanel.Visible = false 147 | PlayersEditorForm.OtherPanel.Visible = false 148 | PlayersEditorForm.PlayerClonePanel.Visible = false 149 | end 150 | function TraitsTabClick(sender) 151 | if PlayersEditorForm.TraitsPanel.Visible then return end 152 | 153 | PlayersEditorForm.PlayerInfoTab.Color = '0x0049363C' 154 | PlayersEditorForm.AttributesTab.Color = '0x0049363C' 155 | PlayersEditorForm.TraitsTab.Color = '0x001D1618' 156 | PlayersEditorForm.AppearanceTab.Color = '0x0049363C' 157 | PlayersEditorForm.AccessoriesTab.Color = '0x0049363C' 158 | PlayersEditorForm.OtherTab.Color = '0x0049363C' 159 | PlayersEditorForm.PlayerCloneTab.Color = '0x0049363C' 160 | 161 | PlayersEditorForm.PlayerInfoPanel.Visible = false 162 | PlayersEditorForm.AttributesPanel.Visible = false 163 | PlayersEditorForm.TraitsPanel.Visible = true 164 | PlayersEditorForm.AppearancePanel.Visible = false 165 | PlayersEditorForm.AccessoriesPanel.Visible = false 166 | PlayersEditorForm.OtherPanel.Visible = false 167 | PlayersEditorForm.PlayerClonePanel.Visible = false 168 | end 169 | function AppearanceTabClick(sender) 170 | if PlayersEditorForm.AppearancePanel.Visible then return end 171 | 172 | PlayersEditorForm.PlayerInfoTab.Color = '0x0049363C' 173 | PlayersEditorForm.AttributesTab.Color = '0x0049363C' 174 | PlayersEditorForm.TraitsTab.Color = '0x0049363C' 175 | PlayersEditorForm.AppearanceTab.Color = '0x001D1618' 176 | PlayersEditorForm.AccessoriesTab.Color = '0x0049363C' 177 | PlayersEditorForm.OtherTab.Color = '0x0049363C' 178 | PlayersEditorForm.PlayerCloneTab.Color = '0x0049363C' 179 | 180 | PlayersEditorForm.PlayerInfoPanel.Visible = false 181 | PlayersEditorForm.AttributesPanel.Visible = false 182 | PlayersEditorForm.TraitsPanel.Visible = false 183 | PlayersEditorForm.AppearancePanel.Visible = true 184 | PlayersEditorForm.AccessoriesPanel.Visible = false 185 | PlayersEditorForm.OtherPanel.Visible = false 186 | PlayersEditorForm.PlayerClonePanel.Visible = false 187 | end 188 | function AccessoriesTabClick(sender) 189 | if PlayersEditorForm.AccessoriesPanel.Visible then return end 190 | 191 | PlayersEditorForm.PlayerInfoTab.Color = '0x0049363C' 192 | PlayersEditorForm.AttributesTab.Color = '0x0049363C' 193 | PlayersEditorForm.TraitsTab.Color = '0x0049363C' 194 | PlayersEditorForm.AppearanceTab.Color = '0x0049363C' 195 | PlayersEditorForm.AccessoriesTab.Color = '0x001D1618' 196 | PlayersEditorForm.OtherTab.Color = '0x0049363C' 197 | PlayersEditorForm.PlayerCloneTab.Color = '0x0049363C' 198 | 199 | PlayersEditorForm.PlayerInfoPanel.Visible = false 200 | PlayersEditorForm.AttributesPanel.Visible = false 201 | PlayersEditorForm.TraitsPanel.Visible = false 202 | PlayersEditorForm.AppearancePanel.Visible = false 203 | PlayersEditorForm.AccessoriesPanel.Visible = true 204 | PlayersEditorForm.OtherPanel.Visible = false 205 | PlayersEditorForm.PlayerClonePanel.Visible = false 206 | end 207 | function OtherTabClick(sender) 208 | if PlayersEditorForm.OtherPanel.Visible then return end 209 | 210 | PlayersEditorForm.PlayerInfoTab.Color = '0x0049363C' 211 | PlayersEditorForm.AttributesTab.Color = '0x0049363C' 212 | PlayersEditorForm.TraitsTab.Color = '0x0049363C' 213 | PlayersEditorForm.AppearanceTab.Color = '0x0049363C' 214 | PlayersEditorForm.AccessoriesTab.Color = '0x0049363C' 215 | PlayersEditorForm.OtherTab.Color = '0x001D1618' 216 | PlayersEditorForm.PlayerCloneTab.Color = '0x0049363C' 217 | 218 | PlayersEditorForm.PlayerInfoPanel.Visible = false 219 | PlayersEditorForm.AttributesPanel.Visible = false 220 | PlayersEditorForm.TraitsPanel.Visible = false 221 | PlayersEditorForm.AppearancePanel.Visible = false 222 | PlayersEditorForm.AccessoriesPanel.Visible = false 223 | PlayersEditorForm.OtherPanel.Visible = true 224 | PlayersEditorForm.PlayerClonePanel.Visible = false 225 | end 226 | 227 | function PlayerCloneTabClick(sender) 228 | if PlayersEditorForm.PlayerClonePanel.Visible then return end 229 | 230 | PlayersEditorForm.PlayerInfoTab.Color = '0x0049363C' 231 | PlayersEditorForm.AttributesTab.Color = '0x0049363C' 232 | PlayersEditorForm.TraitsTab.Color = '0x0049363C' 233 | PlayersEditorForm.AppearanceTab.Color = '0x0049363C' 234 | PlayersEditorForm.AccessoriesTab.Color = '0x0049363C' 235 | PlayersEditorForm.OtherTab.Color = '0x0049363C' 236 | PlayersEditorForm.PlayerCloneTab.Color = '0x001D1618' 237 | 238 | PlayersEditorForm.PlayerInfoPanel.Visible = false 239 | PlayersEditorForm.AttributesPanel.Visible = false 240 | PlayersEditorForm.TraitsPanel.Visible = false 241 | PlayersEditorForm.AppearancePanel.Visible = false 242 | PlayersEditorForm.AccessoriesPanel.Visible = false 243 | PlayersEditorForm.OtherPanel.Visible = false 244 | PlayersEditorForm.PlayerClonePanel.Visible = true 245 | 246 | end 247 | 248 | -- Hover 249 | function PlayerInfoTabMouseEnter(sender) 250 | if PlayersEditorForm.PlayerInfoPanel.Visible then return end 251 | 252 | PlayersEditorForm.PlayerInfoTab.Color = '0x00271D20' 253 | end 254 | function PlayerInfoTabMouseLeave(sender) 255 | if PlayersEditorForm.PlayerInfoPanel.Visible then return end 256 | 257 | PlayersEditorForm.PlayerInfoTab.Color = '0x0049363C' 258 | end 259 | function AttributesTabMouseEnter(sender) 260 | if PlayersEditorForm.AttributesPanel.Visible then return end 261 | 262 | PlayersEditorForm.AttributesTab.Color = '0x00271D20' 263 | end 264 | function AttributesTabMouseLeave(sender) 265 | if PlayersEditorForm.AttributesPanel.Visible then return end 266 | 267 | PlayersEditorForm.AttributesTab.Color = '0x0049363C' 268 | end 269 | function TraitsTabMouseEnter(sender) 270 | if PlayersEditorForm.TraitsPanel.Visible then return end 271 | 272 | PlayersEditorForm.TraitsTab.Color = '0x00271D20' 273 | end 274 | function TraitsTabMouseLeave(sender) 275 | if PlayersEditorForm.TraitsPanel.Visible then return end 276 | 277 | PlayersEditorForm.TraitsTab.Color = '0x0049363C' 278 | end 279 | function AppearanceTabMouseEnter(sender) 280 | if PlayersEditorForm.AppearancePanel.Visible then return end 281 | 282 | PlayersEditorForm.AppearanceTab.Color = '0x00271D20' 283 | end 284 | function AppearanceTabMouseLeave(sender) 285 | if PlayersEditorForm.AppearancePanel.Visible then return end 286 | 287 | PlayersEditorForm.AppearanceTab.Color = '0x0049363C' 288 | end 289 | function AccessoriesTabMouseEnter(sender) 290 | if PlayersEditorForm.AccessoriesPanel.Visible then return end 291 | 292 | PlayersEditorForm.AccessoriesTab.Color = '0x00271D20' 293 | end 294 | function AccessoriesTabMouseLeave(sender) 295 | if PlayersEditorForm.AccessoriesPanel.Visible then return end 296 | 297 | PlayersEditorForm.AccessoriesTab.Color = '0x0049363C' 298 | end 299 | function OtherTabMouseEnter(sender) 300 | if PlayersEditorForm.OtherPanel.Visible then return end 301 | 302 | PlayersEditorForm.OtherTab.Color = '0x00271D20' 303 | end 304 | function OtherTabMouseLeave(sender) 305 | if PlayersEditorForm.OtherPanel.Visible then return end 306 | 307 | PlayersEditorForm.OtherTab.Color = '0x0049363C' 308 | end 309 | function PlayerCloneTabMouseEnter(sender) 310 | if PlayersEditorForm.PlayerClonePanel.Visible then return end 311 | 312 | PlayersEditorForm.PlayerCloneTab.Color = '0x00271D20' 313 | end 314 | function PlayerCloneTabMouseLeave(sender) 315 | if PlayersEditorForm.PlayerClonePanel.Visible then return end 316 | 317 | PlayersEditorForm.PlayerCloneTab.Color = '0x0049363C' 318 | end 319 | 320 | -- Apply Changes Click 321 | function ApplyChangesBtnClick(sender) 322 | ApplyChanges() 323 | end 324 | function ApplyChangesLabelClick(sender) 325 | ApplyChanges() 326 | end 327 | 328 | 329 | -- Randomize Attributes 330 | function RandomMentalityAttrClick(sender) 331 | roll_random_attributes({ 332 | "AggressionEdit", "ComposureEdit", "InterceptionsEdit", 333 | "AttackPositioningEdit", "VisionEdit", "PenaltiesEdit", 334 | }) 335 | end 336 | function RandomMovementAttrClick(sender) 337 | roll_random_attributes({ 338 | "AccelerationEdit", "SprintSpeedEdit", "AgilityEdit", 339 | "ReactionsEdit", "BalanceEdit", 340 | }) 341 | end 342 | function RandomPowerAttrClick(sender) 343 | roll_random_attributes({ 344 | "ShotPowerEdit", "JumpingEdit", "StaminaEdit", 345 | "StrengthEdit", "LongShotsEdit", 346 | }) 347 | end 348 | function RandomGKAttrClick(sender) 349 | roll_random_attributes({ 350 | "GKDivingEdit", "GKHandlingEdit", "GKKickingEdit", 351 | "GKPositioningEdit", "GKReflexEdit", 352 | }) 353 | end 354 | function RandomSkillAttrClick(sender) 355 | roll_random_attributes({ 356 | "DribblingEdit", "CurveEdit", "FreeKickAccuracyEdit", 357 | "LongPassingEdit", "BallControlEdit", 358 | }) 359 | end 360 | function RandomDefendingAttrClick(sender) 361 | roll_random_attributes({ 362 | "MarkingEdit", "StandingTackleEdit", "SlidingTackleEdit", 363 | }) 364 | end 365 | function RandomAttackAttrClick(sender) 366 | roll_random_attributes({ 367 | "CrossingEdit", "FinishingEdit", "HeadingAccuracyEdit", 368 | "ShortPassingEdit", "VolleysEdit" 369 | }) 370 | end 371 | 372 | function PlayerEditorSettingsClick(sender) 373 | SETTINGS_INDEX = 0 374 | SettingsForm.show() 375 | end 376 | function FindPlayerByIDClick(sender) 377 | create_hotkeys() 378 | sender.Text = '' 379 | end 380 | 381 | function SyncImageClick(sender) 382 | local playerid = tonumber(PlayersEditorForm.FindPlayerByID.Text) 383 | local playerid_ct = tonumber(ADDR_LIST.getMemoryRecordByID(93).Value) 384 | if playerid == playerid_ct then return end 385 | 386 | PlayerTeamContext = {} 387 | check_if_has_unapplied_player_changes() 388 | PlayersEditorForm.FindPlayerByID.Text = 'Find player by ID...' 389 | FillPlayerEditForm() 390 | recalculate_ovr() 391 | end 392 | function SearchPlayerByIDClick(sender) 393 | local playerid = tonumber(PlayersEditorForm.FindPlayerByID.Text) 394 | if playerid == nil then return end 395 | 396 | check_if_has_unapplied_player_changes() 397 | FillPlayerEditForm(playerid) 398 | PlayersEditorForm.FindPlayerByID.Text = playerid 399 | recalculate_ovr() 400 | end 401 | 402 | function HeadshotMouseMove(sender, x, y) 403 | if ( 404 | (x >= sender.Width - PlayersEditorForm.Crest64x64.Width) and 405 | (y <= PlayersEditorForm.Crest64x64.Height) 406 | ) then 407 | PlayersEditorForm.Crest64x64.bringToFront() 408 | else 409 | PlayersEditorForm.Crest64x64.sendToBack() 410 | end 411 | end 412 | 413 | function Crest64x64Click(sender) 414 | 415 | local team_ids = {} 416 | for key, value in pairs(PlayerTeamContext) do 417 | table.insert(team_ids, tonumber(key)) 418 | end 419 | if #team_ids <= 1 then return end 420 | 421 | 422 | -- switch context 423 | local current_teamid = tonumber(PlayersEditorForm.TeamIDEdit.Text) 424 | table.sort(team_ids) 425 | local index = nil 426 | for i=1, #team_ids do 427 | if team_ids[i] == current_teamid then 428 | index = i 429 | break 430 | end 431 | end 432 | if index == nil then return end 433 | 434 | 435 | local next_team_index = index + 1 436 | if next_team_index > #team_ids then 437 | next_team_index = 1 438 | end 439 | 440 | writeQword('ptrTeamplayerlinks', PlayerTeamContext[team_ids[next_team_index]]['addr']) 441 | FillPlayerEditForm() 442 | end 443 | 444 | function Crest64x64MouseLeave(sender) 445 | sender.sendToBack() 446 | end 447 | 448 | function HeadTypeCodeCBOnChange(sender) 449 | -- OnChange for headtypecode or haircolorcode 450 | local playerid = tonumber(PlayersEditorForm.PlayerIDEdit.Text) 451 | if playerid >= 280000 then 452 | local headtypecode = tonumber( 453 | PlayersEditorForm.HeadTypeCodeCB.Items[PlayersEditorForm.HeadTypeCodeCB.ItemIndex] or 454 | ADDR_LIST.getMemoryRecordByID(COMPONENTS_DESCRIPTION_PLAYER_EDIT['HeadTypeCodeCB']['id']).Value 455 | ) 456 | 457 | local haircolorcode = PlayersEditorForm.HairColorCB.ItemIndex 458 | if haircolorcode < 0 then 459 | haircolorcode = tonumber(ADDR_LIST.getMemoryRecordByID(COMPONENTS_DESCRIPTION_PLAYER_EDIT['HairColorCB']['id']).Value) 460 | end 461 | 462 | local ss_hs = load_headshot( 463 | playerid, 464 | headtypecode, 465 | haircolorcode 466 | ) 467 | PlayersEditorForm.Headshot.Picture.LoadFromStream(ss_hs) 468 | ss_hs.destroy() 469 | end 470 | CommonCBOnChange(sender) 471 | end 472 | 473 | function AttributesTrackBarOnChange(sender) 474 | local comp_desc = COMPONENTS_DESCRIPTION_PLAYER_EDIT[sender.Name] 475 | 476 | local new_val = sender.Position 477 | 478 | local lbl = PlayersEditorForm[comp_desc['components_inheriting_value'][1]] 479 | local diff = new_val - tonumber(lbl.Caption) 480 | if comp_desc['depends_on'] then 481 | for i=1, #comp_desc['depends_on'] do 482 | local new_attr_val = tonumber(PlayersEditorForm[comp_desc['depends_on'][i]].Text) + diff 483 | if new_attr_val > ATTRIBUTE_BOUNDS['max'] then 484 | new_attr_val = ATTRIBUTE_BOUNDS['max'] 485 | elseif new_attr_val < ATTRIBUTE_BOUNDS['min'] then 486 | new_attr_val = ATTRIBUTE_BOUNDS['min'] 487 | end 488 | -- save onchange event function 489 | local onchange_event = PlayersEditorForm[comp_desc['depends_on'][i]].OnChange 490 | -- tmp disable onchange event 491 | PlayersEditorForm[comp_desc['depends_on'][i]].OnChange = nil 492 | -- update value 493 | PlayersEditorForm[comp_desc['depends_on'][i]].Text = new_attr_val 494 | -- restore onchange event 495 | PlayersEditorForm[comp_desc['depends_on'][i]].OnChange = onchange_event 496 | end 497 | end 498 | 499 | lbl.Caption = new_val 500 | sender.SelEnd = new_val 501 | recalculate_ovr(true) 502 | end 503 | 504 | function IsInjuredCBChange(sender) 505 | is_injured_visibility(sender.ItemIndex) 506 | end 507 | 508 | function ReleaseClauseEditChange(sender) 509 | return 510 | end 511 | 512 | -- Common events 513 | function CommonEditOnChange(sender) 514 | HAS_UNAPPLIED_PLAYER_CHANGES = true 515 | end 516 | 517 | function CommonCBOnChange(sender) 518 | HAS_UNAPPLIED_PLAYER_CHANGES = true 519 | UpdateCBComponentHint(sender) 520 | end 521 | 522 | function CommonCBOnDropDown(sender) 523 | MakeComponentWider(sender) 524 | end 525 | 526 | function CommonCBOnMouseEnter(sender) 527 | SaveOriginalWidth(sender) 528 | end 529 | 530 | function CommonCBOnMouseLeave(sender) 531 | MakeComponentShorter(sender) 532 | end 533 | 534 | function AttrOnChange(sender) 535 | if sender.Text == '' then return end 536 | HAS_UNAPPLIED_PLAYER_CHANGES = true 537 | local new_val = tonumber(sender.Text) 538 | 539 | if new_val == nil then 540 | -- only numbers 541 | new_val = math.random(ATTRIBUTE_BOUNDS['min'],ATTRIBUTE_BOUNDS['max']) 542 | elseif new_val > ATTRIBUTE_BOUNDS['max'] then 543 | new_val = ATTRIBUTE_BOUNDS['max'] 544 | elseif new_val < ATTRIBUTE_BOUNDS['min'] then 545 | new_val = ATTRIBUTE_BOUNDS['min'] 546 | end 547 | sender.Text = new_val 548 | 549 | update_trackbar(sender) 550 | -- recalculate player ovr 551 | recalculate_ovr(true) 552 | end 553 | 554 | function HeadTypeGroupCBOnChange(sender) 555 | PlayersEditorForm.HeadTypeCodeCB.clear() 556 | local dropdown_selected_value = sender.Items[sender.ItemIndex] 557 | for key, value in pairs(HEAD_TYPE_GROUPS) do 558 | local group = string.gsub(key, '_', ' ') 559 | if group == dropdown_selected_value then 560 | for j = 1, #value do 561 | PlayersEditorForm.HeadTypeCodeCB.items.add(value[j]) 562 | end 563 | break 564 | end 565 | end 566 | CommonCBOnChange(sender) 567 | end 568 | 569 | -- COPY CM 570 | COPY_FROM_CM_PLAYER_ID = nil 571 | function CopyCMFindPlayerByIDClick(sender) 572 | create_hotkeys({ 573 | sender = sender 574 | }) 575 | COPY_FROM_CM_PLAYER_ID = nil 576 | PlayersEditorForm.CopyCMImage.Visible = false 577 | sender.Text = '' 578 | end 579 | 580 | function CopyCMSearchPlayerByIDClick(sender) 581 | COPY_FROM_CM_PLAYER_ID = nil 582 | local playerid = tonumber(PlayersEditorForm.CopyCMFindPlayerByID.Text) 583 | if playerid == nil then 584 | PlayersEditorForm.CopyCMImage.Visible = false 585 | return 586 | end 587 | 588 | local org_players = readQword('playerDataPtr') 589 | local org_tplinks = readQword('ptrTeamplayerlinks') 590 | 591 | COPY_FROM_CM_PLAYER_ID = { 592 | org_players = org_players, 593 | keep_original = { 594 | always = { 595 | comps = { 596 | PlayerIDEdit = PlayersEditorForm.PlayerIDEdit.Text, 597 | TeamIDEdit = PlayersEditorForm.TeamIDEdit.Text, 598 | ContractValidUntilEdit = PlayersEditorForm.ContractValidUntilEdit.Text, 599 | PlayerJoinTeamDateEdit = PlayersEditorForm.PlayerJoinTeamDateEdit.Text, 600 | JerseyNumberEdit = PlayersEditorForm.JerseyNumberEdit.Text 601 | } 602 | }, 603 | age = { 604 | cb = PlayersEditorForm.CMCopyAgeCB, 605 | comps = { 606 | AgeEdit = PlayersEditorForm.JerseyNumberEdit.Text 607 | } 608 | }, 609 | headmodel = { 610 | cb = PlayersEditorForm.CMCopyHeadModelCB, 611 | comps = { 612 | HeadClassCodeEdit = PlayersEditorForm.HeadClassCodeEdit.Text, 613 | HeadAssetIDEdit = PlayersEditorForm.HeadAssetIDEdit.Text, 614 | HeadVariationEdit = PlayersEditorForm.HeadVariationEdit.Text, 615 | HairTypeEdit = PlayersEditorForm.HairTypeEdit.Text, 616 | HairStyleEdit = PlayersEditorForm.HairStyleEdit.Text, 617 | FacialHairTypeEdit = PlayersEditorForm.FacialHairTypeEdit.Text, 618 | FacialHairColorEdit = PlayersEditorForm.FacialHairColorEdit.Text, 619 | SideburnsEdit = PlayersEditorForm.SideburnsEdit.Text, 620 | EyebrowEdit = PlayersEditorForm.EyebrowEdit.Text, 621 | EyeColorEdit = PlayersEditorForm.EyeColorEdit.Text, 622 | SkinTypeEdit = PlayersEditorForm.SkinTypeEdit.Text, 623 | SkinColorCB = PlayersEditorForm.SkinColorCB.ItemIndex, 624 | HasHighQualityHeadCB = PlayersEditorForm.HasHighQualityHeadCB.ItemIndex, 625 | HairColorCB = PlayersEditorForm.HairColorCB.ItemIndex, 626 | HeadTypeCodeCB = PlayersEditorForm.HeadTypeCodeCB.Items[PlayersEditorForm.HeadTypeCodeCB.ItemIndex] 627 | } 628 | }, 629 | nameids = { 630 | cb = PlayersEditorForm.CMCopyNameCB, 631 | comps = { 632 | FirstNameIDEdit = PlayersEditorForm.FirstNameIDEdit.Text, 633 | LastNameIDEdit = PlayersEditorForm.LastNameIDEdit.Text, 634 | JerseyNameIDEdit = PlayersEditorForm.JerseyNameIDEdit.Text, 635 | CommonNameIDEdit = PlayersEditorForm.CommonNameIDEdit.Text 636 | } 637 | } 638 | } 639 | } 640 | 641 | find_player_by_id(playerid) 642 | COPY_FROM_CM_PLAYER_ID['players'] = readQword('playerDataPtr') 643 | 644 | -- load headshot 645 | local stream = load_headshot( 646 | tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['PLAYERID']).Value), 647 | tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['HEADTYPECODE']).Value), 648 | tonumber(ADDR_LIST.getMemoryRecordByID(CT_MEMORY_RECORDS['HAIRCOLORCODE']).Value) 649 | ) 650 | PlayersEditorForm.CopyCMImage.Picture.LoadFromStream(stream) 651 | stream.destroy() 652 | 653 | -- Restore org player in CT 654 | writeQword('playerDataPtr', org_players) 655 | writeQword('ptrTeamplayerlinks', org_tplinks) 656 | 657 | if not PlayersEditorForm.CopyCMImage.Visible then 658 | PlayersEditorForm.CopyCMImage.Visible = true 659 | end 660 | end 661 | 662 | function CopyCMPlayerLabelClick(sender) 663 | CopyCMPlayerBtnClick(sender) 664 | end 665 | 666 | function CopyCMPlayerBtnClick(sender) 667 | if not COPY_FROM_CM_PLAYER_ID then 668 | do_log('Find player first', 'ERROR') 669 | return 670 | end 671 | 672 | writeQword('playerDataPtr', COPY_FROM_CM_PLAYER_ID['players']) 673 | FillPlayerEditForm() 674 | 675 | local org = COPY_FROM_CM_PLAYER_ID['keep_original'] 676 | 677 | for key, value in pairs(org) do 678 | if key == 'always' then 679 | for c, v in pairs(org['always']['comps']) do 680 | PlayersEditorForm[c].Text = v 681 | end 682 | else 683 | if org[key]['cb'].State == 1 then 684 | for c, v in pairs(org[key]['comps']) do 685 | if PlayersEditorForm[c].ClassName == 'TCEEdit' then 686 | PlayersEditorForm[c].Text = v 687 | elseif PlayersEditorForm[c].ClassName == 'TCEComboBox' then 688 | if type(v) == 'number' then 689 | PlayersEditorForm[c].ItemIndex = v 690 | elseif type(v) == 'string' then 691 | FillHeadTypeCB({ 692 | headtypecode = tonumber(v) 693 | }) 694 | end 695 | end 696 | end 697 | end 698 | end 699 | end 700 | 701 | -- Load Img 702 | local ss_hs = load_headshot( 703 | tonumber(PlayersEditorForm.PlayerIDEdit.Text), 704 | tonumber(PlayersEditorForm.HeadTypeCodeCB.Items[PlayersEditorForm.HeadTypeCodeCB.ItemIndex]), 705 | tonumber(PlayersEditorForm.HairColorCB.ItemIndex) 706 | ) 707 | PlayersEditorForm.Headshot.Picture.LoadFromStream(ss_hs) 708 | ss_hs.destroy() 709 | 710 | recalculate_ovr() 711 | writeQword('playerDataPtr', COPY_FROM_CM_PLAYER_ID['org_players']) 712 | ShowMessage('Player data has been copied to GUI.\nTo see the changes in game you need to "Apply Changes"') 713 | end 714 | 715 | -- FUT 716 | function FUTChemStyleCBChange(sender) 717 | sender.Hint = sender.Items[sender.ItemIndex] 718 | 719 | -- Labels on card 720 | local selected = PlayersEditorForm.FUTPickPlayerListBox.ItemIndex + 1 721 | local player = FOUND_FUT_PLAYERS['items'][selected] 722 | if not player then return end 723 | 724 | fut_fill_attributes(player) 725 | end 726 | 727 | function FindPlayerByNameFUTEditClick(sender) 728 | create_hotkeys({ 729 | sender = sender 730 | }) 731 | sender.Text = '' 732 | end 733 | 734 | FOUND_FUT_PLAYERS = nil 735 | function SearchPlayerByNameFUTBtnClick(sender) 736 | if PlayersEditorForm.FindPlayerByNameFUTEdit.Text == '' then return end 737 | if PlayersEditorForm.FindPlayerByNameFUTEdit.Text == 'Enter player name you want to find' then return end 738 | fut_search_player(PlayersEditorForm.FindPlayerByNameFUTEdit.Text, 1) 739 | end 740 | 741 | function FUTPickPlayerListBoxSelectionChange(sender, user) 742 | local selected = PlayersEditorForm.FUTPickPlayerListBox.ItemIndex + 1 743 | local player = FOUND_FUT_PLAYERS['items'][selected] 744 | if not player then return end 745 | -- Create CARD in GUI 746 | fut_create_card(player) 747 | 748 | if not PlayersEditorForm.CardContainerPanel.Visible then 749 | PlayersEditorForm.CardContainerPanel.Visible = true 750 | end 751 | end 752 | function CloneFromListBoxSelectionChange(sender, user) 753 | local Panels = { 754 | 'CloneFromFUTPanel', 755 | 'CloneFromCMPanel', 756 | } 757 | for i=1, #Panels do 758 | if sender.ItemIndex == i-1 then 759 | PlayersEditorForm[Panels[i]].Visible = true 760 | else 761 | PlayersEditorForm[Panels[i]].Visible = false 762 | end 763 | end 764 | end 765 | 766 | function PrevPageClick(sender) 767 | if FUT_API_PAGE == 1 then return end 768 | 769 | FUT_API_PAGE = FUT_API_PAGE - 1 770 | if FUT_API_PAGE < 1 then 771 | FUT_API_PAGE = 1 772 | end 773 | fut_search_player(PlayersEditorForm.FindPlayerByNameFUTEdit.Text, FUT_API_PAGE) 774 | end 775 | function NextPageClick(sender) 776 | FUT_API_PAGE = FUT_API_PAGE + 1 777 | fut_search_player(PlayersEditorForm.FindPlayerByNameFUTEdit.Text, FUT_API_PAGE) 778 | end 779 | 780 | function FUTCopyPlayerLabelClick(sender) 781 | FUTCopyPlayerBtnClick(sender) 782 | end 783 | 784 | function FUTCopyPlayerBtnClick(sender) 785 | local selected = PlayersEditorForm.FUTPickPlayerListBox.ItemIndex + 1 786 | local player = FOUND_FUT_PLAYERS['items'][selected] 787 | 788 | if not player then 789 | do_log('Select player card first.', 'ERROR') 790 | return 791 | end 792 | 793 | fut_copy_card_to_gui(player) 794 | end --------------------------------------------------------------------------------