0% found this document useful (0 votes)
2 views

Autowin Lua Code 2

The document is a Lua script designed for modifying a game by applying cheats such as 'Autowin' and 'Force Boss'. It defines functions to find a library base, apply cheat modifications to specific memory addresses, and presents a user interface for selecting options. The script utilizes the GameGuardian API to manipulate game memory and enhance gameplay experience.

Uploaded by

hhsys5133
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Autowin Lua Code 2

The document is a Lua script designed for modifying a game by applying cheats such as 'Autowin' and 'Force Boss'. It defines functions to find a library base, apply cheat modifications to specific memory addresses, and presents a user interface for selecting options. The script utilizes the GameGuardian API to manipulate game memory and enhance gameplay experience.

Uploaded by

hhsys5133
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

local libName = "libcocos2dcpp.

so"

function findLibraryBase(libName)
local libraries = gg.getRangesList(libName)
if #libraries == 0 then
gg.toast("Library not found: " .. libName)
os.exit()
end
return libraries[1].start
end

function applyAutowin()
local baseAddress = findLibraryBase(libName)
local autowin1Address = baseAddress + 0x7673C0
local autowin2Address = baseAddress + 0xD517FD
local autowin3Address = baseAddress + 0xD5180D
local autowin4Address = baseAddress + 0x135B15C

local autowin1Bytes = {0xBE, 0x14, 0x00, 0x00, 0x00, 0x41, 0x89, 0x74, 0x24,
0x38}
local autowin2Bytes = {0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90}
local autowin3Bytes = {0xC7, 0x01, 0x00, 0x00, 0x00, 0x00}
local autowin4Bytes = {0x90, 0x90, 0x90, 0x90}

gg.clearResults()
gg.setRanges(gg.REGION_C_BSS)
gg.searchNumber("3", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0)
local results = gg.getResults(100)
gg.editAll("0", gg.TYPE_FLOAT)

local modifications = {}
for i = 1, #autowin1Bytes do
table.insert(modifications, {
address = autowin1Address + (i - 1),
flags = gg.TYPE_BYTE,
value = autowin1Bytes[i]
})
end
for i = 1, #autowin2Bytes do
table.insert(modifications, {
address = autowin2Address + (i - 1),
flags = gg.TYPE_BYTE,
value = autowin2Bytes[i]
})
end
for i = 1, #autowin3Bytes do
table.insert(modifications, {
address = autowin3Address + (i - 1),
flags = gg.TYPE_BYTE,
value = autowin3Bytes[i]
})
end
for i = 1, #autowin4Bytes do
table.insert(modifications, {
address = autowin4Address + (i - 1),
flags = gg.TYPE_BYTE,
value = autowin4Bytes[i]
})
end
gg.setValues(modifications)
gg.toast("Autowin applied :)")
end

function applyForceBoss()
local baseAddress = findLibraryBase(libName)
local rankfetchOffset = 0xFD38E0
local legrankfetchOffset = 0xFEBED4
local editrankOffset = 0xF13920
local junkOffset = 0x10BA971

local newValues = {0xF3, 0x0F, 0x10, 0x80, 0xC0, 0x01, 0x00, 0x00}
local newValues2 = {0xE8, 0x4C, 0x70, 0x1A, 0x00, 0x90, 0x90, 0x90}
local newValues3 = {0x41, 0x8B, 0x46, 0x40, 0x83, 0x4B, 0x10, 0x08, 0x41, 0xC7,
0x86, 0xC0, 0x01, 0x00, 0x00, 0x33, 0x33, 0xC7, 0x42, 0x41, 0xC7, 0x86, 0x24, 0x04,
0x00, 0x00, 0x33, 0x33, 0xC7, 0x42, 0xC3}
local newValues4 = {0xF3, 0x0F, 0x10, 0x80, 0x24, 0x04, 0x00, 0x00}

local targetAddress = baseAddress + rankfetchOffset


local targetAddress2 = baseAddress + editrankOffset
local targetAddress3 = baseAddress + junkOffset
local targetAddress4 = baseAddress + legrankfetchOffset

local modifications = {}
for i = 1, #newValues do
table.insert(modifications, {
address = targetAddress + (i - 1),
flags = gg.TYPE_BYTE,
value = newValues[i]
})
end
for i = 1, #newValues2 do
table.insert(modifications, {
address = targetAddress2 + (i - 1),
flags = gg.TYPE_BYTE,
value = newValues2[i]
})
end
for i = 1, #newValues3 do
table.insert(modifications, {
address = targetAddress3 + (i - 1),
flags = gg.TYPE_BYTE,
value = newValues3[i]
})
end
for i = 1, #newValues4 do
table.insert(modifications, {
address = targetAddress4 + (i - 1),
flags = gg.TYPE_BYTE,
value = newValues4[i]
})
end
gg.setValues(modifications)
gg.toast("Force boss applied :)")
end

local choice = gg.choice({


"Enable Autowin",
"Enable Force Boss",
"Exit"
}, nil, "Made by Donuts, thanks to Lamepa for no movement.\nSelect an option:")

if choice == 1 then
applyAutowin()
elseif choice == 2 then
applyForceBoss()
elseif choice == 3 then
os.exit()
end

You might also like