 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
XaLeX Expert Cheater
Reputation: 0
Joined: 19 Aug 2008 Posts: 226
|
Posted: Wed Jun 30, 2010 4:14 pm Post subject: hotkey for script |
|
|
Hi everybody, i just took up cheating after realizing i had more free time than i could waste, but i'm kind of a perfectionist, so godmode/infinite $ isn't quite enough for me
So, i got plant tycoon (i remember i tried to hack it back when i started using ce, in 2008, but i couldn't go any further than just hacking money, health, water and stuff like that..xD) and analyzed the bases: item slots, tool slots and pots are all arrays of integers (perhaps structures).
Also, even though i'm not planning to create a table at the moment, i like making everything as general as possible, so i always try to find static pointers and stuff like that.
Now on to the problem: in order to to practice asm i'm trying to use it as much as possible. At the moment i'm trying to create a general function to set every pot's stats with a function, and i came up with:
| Code: | label(loopStart);
push eax
push ecx
mov eax,00ca21e8 //points to the first variable of the first pot
mov ecx,00
loopStart:
mov [eax+ecx*5600+04],0001
mov [eax+ecx*5600+08],0320
inc ecx
cmp ecx,16
jne loopStart
pop ecx
pop eax
|
now i may have misspelled something but i assure you it worked.. xD
anyway, i'd like to use it arbitrarily, that is, with an hotkey or a click, instead of injecting it in the code.
Is there anyway to do this? maybe by creating another thread? I guess i could mess with the game's event handling, but that sounds kinda hard for a beginner >.< |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 475
Joined: 09 May 2003 Posts: 25975 Location: The netherlands
|
Posted: Wed Jun 30, 2010 4:46 pm Post subject: |
|
|
You can assign the following script to a cheat table
then whenever the checkbox is ticked it will be executed
you can also set a hotkey to this table entry
| Code: |
globalalloc(routine,256)
label(loopStart)
createthread(routine)
routine:
push eax
push ecx
mov eax,00ca21e8 //points to the first variable of the first pot
mov ecx,00
loopStart:
mov [eax+ecx*5600+04],0001
mov [eax+ecx*5600+08],0320
inc ecx
cmp ecx,16
jne loopStart
pop ecx
pop eax
ret
[enable]
[disable]
|
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
XaLeX Expert Cheater
Reputation: 0
Joined: 19 Aug 2008 Posts: 226
|
Posted: Wed Jun 30, 2010 5:32 pm Post subject: |
|
|
I wasn't very familiar with this kind of scripting but i managed to make it work.. i guess i have a lot of things yet to study D:
anyway, thank you very much for your precious help and.. happy birthday! (it's your birthday, isn't it? CE told me! ) |
|
| 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
|
|