|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
bolav How do I cheat? Reputation: 0
Joined: 13 Jan 2012 Posts: 7
|
Posted: Mon Jan 23, 2012 9:23 pm Post subject: Cheat Engine Trainer Form |
|
|
Hi,
When I create an EXE trainer, is there a way to disable the form, and just have the forms I create with Lua, or should I create the form in the designer and use that.
Also I want to know if I there is a way to check if a DLL is injected, so that I don't try to inject it twice.
I also want to check if this is BP when running a function in the DLL from Lua:
Code: | injectDLL("y:\\dev\\mydll.dll");
reinitializeSymbolhandler();
autoAssemble(
"globalalloc(tempfunc, 1024)\n" ..
"tempfunc:\n" ..
"mov eax, my_init\n" ..
"call eax\n" ..
"ret\n"
);
autoAssemble( "CreateThread(tempfunc)\n" ); |
If I pack the DLL in the EXE what is the path to the DLL, that I should use with injectDLL?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Jan 23, 2012 9:55 pm Post subject: |
|
|
Just create your own form and write the script that is usually automatically generated for you manually (The trainerscript generator is as it's name says, just a simple script generator based on the config you give)
Just make sure that your script when executed at least shows one form (CE picks the icon of the first visible form for the taskbar)
as for checking if a dll is injected try to keep track of that yourself (e.g a global variable that when injected is true)
also, it's not really a problem if a dll gets injected multiple times, loading a dll a second time just increases it's reference count
(alternatively, run an aa script that accesses a dll export and check if it fails or not)
You can add the dll as a tablefile which you can extract when loaded.
Code: |
yourdllTF=findTableFile('yourdll.dll')
tablefile_saveToFile(yourdllTF, "Pathtodllextraction\\yourdll.dll")
injectdll("Pathtodllextraction\\yourdll.dll")
|
You can make use of getCheatEngineDir() if you wish to write it to the place CE's exe is
tip:
You can make use of [[ ]] as strings
e.g:
Code: |
autoAssemble([[
globalalloc(tempfunc, 1024)
tempfunc:
mov eax, my_init
call eax
ret
]]);
|
as for
Quote: |
I also want to check if this is BP when running a function in the DLL from Lua
|
No idea what you mean with BP (breakpoint?)
(tip2: No need to set eax to the address of my_init, you can directly call my_init)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
bolav How do I cheat? Reputation: 0
Joined: 13 Jan 2012 Posts: 7
|
Posted: Mon Jan 23, 2012 10:01 pm Post subject: |
|
|
Thanks for the help.
Quote: | as for checking if a dll is injected try to keep track of that yourself (e.g a global variable that when injected is true)
also, it's not really a problem if a dll gets injected multiple times, loading a dll a second time just increases it's reference count
|
I was thinking more if my trainer was restarted, and the game is not. The game crashes, but that is probably because of my init then. I could fix the DLL to not run init if it is already inited.
Quote: | Not really sure what you mean with that. |
Just if this is the preferred way to call a function in the DLL from Lua.
|
|
Back to top |
|
|
|
|
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
|
|