Skip to content

Instantly share code, notes, and snippets.

@DenimTornado
Last active November 15, 2018 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DenimTornado/eeb5594126c2e02b23fa34e8f069aac6 to your computer and use it in GitHub Desktop.
Save DenimTornado/eeb5594126c2e02b23fa34e8f069aac6 to your computer and use it in GitHub Desktop.
Lua script for fm stats
function edit (a, b, c)
gg.clearResults(a)
gg.searchNumber(a, gg.TYPE_DWORD);
gg.searchNumber(b, gg.TYPE_DWORD);
local t = gg.getResults(200)
for i,v in ipairs(t) do
local add = 0
local tr = {}
for j = 1, 45, 1 do
if j == 1 then
add = v['address'] --set first address in the list
end
local val = {}
val[1] = {}
val[1].address = add
val[1].flags = gg.TYPE_DWORD
local val2 = gg.getValues(val)
tr[j] = {}
tr[j].address = add
tr[j].flags = gg.TYPE_DWORD
if val2[1].value == 0 then --if the value is 0 dont schange it
tr[j].value = 0
elseif val2[1].value <= 5 then --set 5 stars to week foot
tr[j].value = 5
elseif val2[1].value >= 140 then --if the value is bigger then 140 dont schange it
tr[j].value = val2[1].value
else
if c == nil then
tr[j].value = 140
else
tr[j].value = 1 --if we need to downgrade stats
end
end
add = add + 4
end
gg.setValues(tr)
end
end
-- edit('86;63;66;83;85;54;75::29', 86) -- Lemar 81
edit('60;85;79;55;44;61;91;53::29', 60) -- Mina 80
edit('67;79;79;78;62;69;82;72::29', 67) -- Stones 80
edit('82;59;25;83;79;75;74::29', 82) -- Ronaldo 82
edit('44;18;12;20;14;13;11;29::29', 44, 1) -- Courtois 81
edit('83;53;37;86;72;87;66;74::29', 83) -- Neymar 80
edit('82;50;30;86;79;87;72;73::29', 82) -- Dybala 80
edit('75;79;78;85;82;56;87::29', 75) -- Jorginho 80
edit('77;73;80;86;79;55;80::29', 77) -- Fred 80
-- edit('65;88;83;73;63;68;72;77::29', 65) -- Luiz Gustavo 81
-- edit('71;82;82;69;67;60;81;69::29', 71) -- Gabriel Paulista 81
-- edit('71;44;70;84;72;87;55;76::29', 71)-- Rafinha 80
-- edit('68;73;75;83;70;82;58;80::29', 68) -- Arthur 80
-- edit('79;65;59;86;80;84;78;80::29', 79) -- Talisca 82
edit('68;73;72;84;80;83;49;87::29', 68) -- Banega 80
edit('36;22;26;17;25;10;18;40::29', 36) -- Kepa 80
edit('64;86;84;66;52;62;80;69::29', 64) -- Koscielny 80
edit('62;97;79;86;77;94;73::29', 62) -- Felliani 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment