Code: Select all
--------------------------------------------------------------------------------
-- LUA SCRIPT FOR FOOTBALL MANAGER CHEAT TABLE VERSION 4.2
-- CREATED AT APRIL 28, 2019 BY TDG6661
-- EDITING MAY CAUSE SOME FUNCTION NOT WORK PROPERLY
--------------------------------------------------------------------------------
-- Auto Attach
getAutoAttachList().add('fm.exe')
speak('Cheat table activated!')
-- Arrays List
getDaysInMonthA = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
getDaysInMonthB = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
strMonths = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }
strInfo = {
msg0 = "Created by tdg6661, more info see Read Me! also visit official thread on FearLess Revolution!",
msg1 = "Press OVERVIEW more times on game screen if table shows wrong values!",
msg2 = "DO NOT edit anything outside the match!",
msg3 = "ADVANCED USER ONLY!",
opt1 = "This option sets your Balance, Transfer Budget (Season) and Transfer Budget (Rem.) to £999,999,999 and freeze it.\n\nNOTE: You can also edit the value by yourself.",
opt2 = "This option sets your Weekly Wage Budget to £999,999,999 and Highest Wage Allowed to £2,000,000 this option also freeze the value.\n\nNOTE: You can also edit the value by yourself.",
opt3 = "This option will allow you to buy any player without losing your budget or increasing expenditure, BUT you still need budget equal to player's price for transfer confirmation.",
opt4 = "Only work for your team, activate one day before match. This option will make your team incredibly insane on the pitch, try to test on a match. One thing, you will see your player fitness stuck at 69%, don't worry about that it will not affect your players, this happen because the game only process value at 1 - 10000 on the graphical bar.\n\nNOTE: You can also edit the value by yourself."
}
-- General Functions
local function getLeapYear(x)
return x % 4 == 0 and (x % 100 ~= 0 or x % 400 == 0)
end
function getFMDate(x, y)
z=1
strFMDate = ""
if getLeapYear(y)==true then
while x > getDaysInMonthA[z] do
x = x - getDaysInMonthB[z]
z=z+1
end
if x == 0 and z == 3 then
x = 29
z = 2
end
else
while x > getDaysInMonthA[z] do
x = x - getDaysInMonthA[z]
z=z+1
end
end
strFMDate = x.." "..strMonths[z].." "..y
return strFMDate
end
-- Compact View Mode
function cycleFullCompact(sender,force)
local state = not(compactmenuitem.Caption == 'Compact View Mode')
if force~=nil then state = not force end
compactmenuitem.Caption = state and 'Compact View Mode' or 'Full View Mode'
getMainForm().Splitter1.Visible = state
getMainForm().Panel4.Visible = state
getMainForm().Panel5.Visible = state
end
function addCompactMenu()
if compactmenualreadyexists then return end
local parent = getMainForm().Menu.Items
compactmenuitem = createMenuItem(parent)
parent.add(compactmenuitem)
compactmenuitem.Caption = 'Compact View Mode'
compactmenuitem.OnClick = cycleFullCompact
compactmenualreadyexists = 'yes'
end
-- Data Loader
function getGameDate(state)
strGameDate = ""
if state == true then
if readInteger("fm.exe") ~= nil then
if readSmallInteger("fm.exe+69D7C0E") < 256 or readSmallInteger("fm.exe+69D7C0E") > 366 then
x = tonumber(readBytes("fm.exe+69D7C0E"))
else
x = tonumber(readSmallInteger("fm.exe+69D7C0E"))
end
y = tonumber(readSmallInteger("fm.exe+69D7C10"))
strGameDate = getFMDate(x, y)
else
strGameDate = "Game Is Not Loaded Yet"
end
end
return strGameDate
end
function getMessageCounts(state)
strMessageCounts = ""
if state == true then
n = readSmallInteger('[basInbox]+AC')
if n ~= nil then
if n > 0 and n < 1000 then
strMessageCounts = " | "..n.." unread message(s)"
else
strMessageCounts = " | No unread message(s)"
end
end
end
return strMessageCounts
end
function getStuffName(state)
strStuffName = ""
if state == true then
if readInteger('[basClub]') ~= nil or readInteger('[basPerson]') ~= nil then
-- Club
if readInteger('[basClub]') ~= nil then
strStuffName = " | Loaded Club: "
x = readString('[[[basClub]+18]+B8]+4')
y = readInteger('[[basClub]+18]+C')
strStuffName = strStuffName..x.." (ID: "..y..")"
end
-- Person
if readInteger('[basPerson]') ~= nil and readInteger('[basPerson]+C') == readInteger("fm.exe+6ABDD88") then
strStuffName = " | Loaded Person: "
x = readString('[[[basPerson]+58]+0]+4')
y = readString('[[[basPerson]+60]+0]+4')
z = readInteger('[basPerson]+C')
strStuffName = strStuffName..x.." "..y.." (ID: "..z..")"
end
end
end
return strStuffName
end
function getScriptCounts(state)
strScriptCountsIni = ""
strScriptCountsFin = ""
if state == true then
strScriptCountsFin = " | Active Script(s): "
-- Club Check
if readInteger('indClub') ~= nil then
if readBytes('indClub') == 1 then
if strScriptCountsIni ~= "" then
strScriptCountsIni = strScriptCountsIni..", "
end
strScriptCountsIni = strScriptCountsIni.."CLU"
end
else
strScriptCountsIni = strScriptCountsIni..""
end
-- Nation Check
if readInteger('indNat') ~= nil then
if readBytes('indNat') == 1 then
if strScriptCountsIni ~= "" then
strScriptCountsIni = strScriptCountsIni..", "
end
strScriptCountsIni = strScriptCountsIni.."NAT"
end
else
strScriptCountsIni = strScriptCountsIni..""
end
-- Competition Check
if readInteger('indComp') ~= nil then
if readBytes('indComp') == 1 then
if strScriptCountsIni ~= "" then
strScriptCountsIni = strScriptCountsIni..", "
end
strScriptCountsIni = strScriptCountsIni.."COM"
end
else
strScriptCountsIni = strScriptCountsIni..""
end
-- Person Check
if readInteger('indPerson') ~= nil then
if readBytes('indPerson') == 1 then
if strScriptCountsIni ~= "" then
strScriptCountsIni = strScriptCountsIni..", "
end
strScriptCountsIni = strScriptCountsIni.."PER"
end
else
strScriptCountsIni = strScriptCountsIni..""
end
-- On Match Check
if readInteger('indOnMatch') ~= nil then
if readBytes('indOnMatch') == 1 then
if strScriptCountsIni ~= "" then
strScriptCountsIni = strScriptCountsIni..", "
end
strScriptCountsIni = strScriptCountsIni.."OnM"
end
else
strScriptCountsIni = strScriptCountsIni..""
end
-- None Active
if strScriptCountsIni == "" then
strScriptCountsIni = "None"
end
end
strScriptCountsFin = strScriptCountsFin..strScriptCountsIni
return strScriptCountsFin
end
-- Table Configurations
function setTableCaption(state)
strTableCaption = setProperty(MainForm, "Caption", "Cheat Engine "..getCEVersion())
if state == true then
if _GetGameDateState == true or _GetNumberOfMessagesState == true or _GetLoadedDataState == true or _GetActiveScriptsState == true then
strTableCaption = setProperty(MainForm, "Caption", strGameDate..strMessageCounts..strScriptCountsFin..strStuffName)
end
end
return strTableCaption
end
--------------------------------------------------------------------------------
-- LUA SCRIPT FOR GUI TOOLS
-- EDITING MAY CAUSE SOME FUNCTION NOT WORK PROPERLY
--------------------------------------------------------------------------------
-- Date Converter GUI
function tdg6661_DC_Convert(sender)
x = tonumber(getProperty(tdg6661_DC.DC_TextBox_1, "Text"))
y = tonumber(getProperty(tdg6661_DC.DC_TextBox_2, "Text"))
z = getFMDate(x, y)
return setProperty(tdg6661_DC.DC_TextBox_3, "Text", z)
end
-- Read Me! GUI
function tdg6661_RM_Info1(sender)
tdg6661_RM.RM_Memo_1.Scrollbars = ssAutoBoth
tdg6661_RM.RM_Memo_1.visible = true
tdg6661_RM.RM_Memo_2.visible = false
tdg6661_RM.RM_Memo_3.visible = false
tdg6661_RM.RM_Memo_4.visible = false
end
function tdg6661_RM_Info2(sender)
tdg6661_RM.RM_Memo_2.Scrollbars = ssAutoBoth
tdg6661_RM.RM_Memo_1.visible = false
tdg6661_RM.RM_Memo_2.visible = true
tdg6661_RM.RM_Memo_3.visible = false
tdg6661_RM.RM_Memo_4.visible = false
end
function tdg6661_RM_Info3(sender)
tdg6661_RM.RM_Memo_3.Scrollbars = ssAutoBoth
tdg6661_RM.RM_Memo_1.visible = false
tdg6661_RM.RM_Memo_2.visible = false
tdg6661_RM.RM_Memo_3.visible = true
tdg6661_RM.RM_Memo_4.visible = false
end
function tdg6661_RM_Info4(sender)
tdg6661_RM.RM_Memo_4.WordWrap = false
tdg6661_RM.RM_Memo_4.Scrollbars = ssAutoBoth
tdg6661_RM.RM_Memo_1.visible = false
tdg6661_RM.RM_Memo_2.visible = false
tdg6661_RM.RM_Memo_3.visible = false
tdg6661_RM.RM_Memo_4.visible = true
end
-- Footer Text Links
function tdg6661_GN_Link1(sender)
shellExecute("http://fearlessrevolution.com/viewtopic.php?f=4&t=8461")
end
function tdg6661_GN_Link2(sender)
shellExecute("https://www.cheatengine.org/")
end
-- END OF SCRIPT