Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help with some scripting

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
HelloBuddySup :-)
How do I cheat?
Reputation: 0

Joined: 09 Feb 2014
Posts: 8

PostPosted: Wed Feb 26, 2014 3:58 pm    Post subject: Help with some scripting Reply with quote

Hello my friends, I'm in need of your help...
I can't figure what this code does...
Code:

Values = {}
noclip = false
--
function Search(ind)
local tab = Values[ind]
local scan = createMemScan(true)
memscan_returnOnlyOneResult(scan, true)
memscan_firstScan(scan, soExactValue, vtByteArray, rtTruncated, table.concat(tab[1], " "), nil, 0x00000000, 0x05F00000, "", fsmNotAligned, nil, false, false, false, false)
memscan_waitTillDone(scan)
local result = memscan_getOnlyResult(scan)
if (result == nil) then return nil end
result = result + tab[2]
result = string.format("%x", result)
result = string.rep("0", 8-#result) .. result
return result
end
--
debugger_onBreakpoint = function()
if EIP == tonumber(gclip,"16") then
EIP = EIP + 0x7
return 1
end
end
--
function AddHack(hex, offset)
table.insert(Values, {hex, offset}) --this stuff puts the hex and offsets in the values right?
end
--
AddHack({0x56, 0x8B, 0xf1, 0x83, 0xf8, 0x18}, 12)
--
for i,v in pairs(Values) do
local hack = Search(i)
if readBytes(tonumber(hack,"16"),1,false) == 255 then -- this turns the offsets and hex into a number I'm guessing? I still can't figure it out...
gclip = hack
end
--
function nc()
if noclip == false then
noclip = true
debug_setBreakpoint(gclip) -- toggle breakpoints
else
noclip = false
debug_removeBreakpoint(gclip) -- toggle breakpoints
end
end
--
createHotkey(nc,VK_NUMPAD5)

I was wondering if someone could explain how this worked and what it does, it still works I just want to know how it does.
I just can't understand it.
let me know if there are some missing parts. :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites