| View previous topic :: View next topic |
| Author |
Message |
Montycarlo Expert Cheater
Reputation: 0
Joined: 10 Jan 2007 Posts: 124
|
Posted: Sun Apr 13, 2008 5:27 am Post subject: Problem with Trainer buttons |
|
|
Hey,
Just reccently I've wanted to have a little fun and attempted at edditing some values in cs1.6, I've found a few (Cash, Pistol Ammo & Primary Ammo) and I've put them in the trainer. I've made buttons & assigned them each a seperate hack.
Here is my video on my first Trainer
http://www.youtube.com/watch?v=4rVVLnBkF6c
Now, all the hotkeys for the hacks work, but the buttons don't.
(yes, I did put in the input text field: 'ignitiate hack 0' Or whatever it is)
Anyway, do the buttons only toggle scripts or can it freeze the value too?
When a script is executed, does it run through once?
Or does it execute at the fps?
I am using Cheat Engine 5.4 to make the Trainer.
Thanks,
-Montycarlo
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 475
Joined: 09 May 2003 Posts: 26027 Location: The netherlands
|
Posted: Sun Apr 13, 2008 6:15 am Post subject: |
|
|
scripts execute only once . First time the enable, 2nd time the disable.
If you want to run it continuesly use createthread in the script which loops
The buttons should work, they activate a cheat and don't make a distinction between script and freeze. They just call the routine for that cheat. (Perhaps you clicked them twice? )
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Montycarlo Expert Cheater
Reputation: 0
Joined: 10 Jan 2007 Posts: 124
|
Posted: Mon Apr 14, 2008 4:27 am Post subject: |
|
|
| Dark Byte wrote: | scripts execute only once ...
....Perhaps you clicked them twice? |
No, I've checked them at least a dozen times now. There must be something wrong with my computer, it's pretty messed up right now.
It doesn't really matter, since the hotkeys still work.
Thanks for your help again!
I'm not sure on the correct format of a simple AA script that would add a number to a pointer. I've tried a few things, and none of them worked.
That would make the following code effect that pointer, right?
But what if I had just
on it's own? Because it should just increse the value of the pointer by 1.
But It won't execute.
| Code: |
[ENABLE]
03E31BF8+1cc:
inc [03E31BF8+1cc]
[DISABLE]
|
That executes, but doesn't do anything.
Do I need to allocate memory?
|
|
| Back to top |
|
 |
24653187 Expert Cheater
Reputation: 0
Joined: 19 Aug 2007 Posts: 214 Location: 218.255.97.194/61.18.170.???
|
Posted: Tue Apr 15, 2008 12:11 am Post subject: |
|
|
you need to write something after disable...
_________________
newbies post these threads:
1. all capital letters
2. lots of exclamation marks
and these posts:
1. no punctuation marks
2. not enough information
3. post on wrong forum
and these attitudes:
1. unformal words
2. say "thanks" in 90% post
3. angry when got pissed |
|
| Back to top |
|
 |
Montycarlo Expert Cheater
Reputation: 0
Joined: 10 Jan 2007 Posts: 124
|
Posted: Tue Apr 15, 2008 4:29 am Post subject: |
|
|
| 24653187 wrote: | | you need to write something after disable... |
Could you go into a little more detail please?
What I'm trying to do is just increase the value of a pointer.
|
|
| Back to top |
|
 |
24653187 Expert Cheater
Reputation: 0
Joined: 19 Aug 2007 Posts: 214 Location: 218.255.97.194/61.18.170.???
|
Posted: Tue Apr 15, 2008 5:32 am Post subject: |
|
|
| Montycarlo wrote: | | 24653187 wrote: | | you need to write something after disable... |
Could you go into a little more detail please?
What I'm trying to do is just increase the value of a pointer. |
just put in the original code...
_________________
newbies post these threads:
1. all capital letters
2. lots of exclamation marks
and these posts:
1. no punctuation marks
2. not enough information
3. post on wrong forum
and these attitudes:
1. unformal words
2. say "thanks" in 90% post
3. angry when got pissed |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 475
Joined: 09 May 2003 Posts: 26027 Location: The netherlands
|
Posted: Tue Apr 15, 2008 5:42 am Post subject: |
|
|
It's not really needed, but it's better
| Code: |
[enable]
alloc(mymem,1024)
createthread(mymem)
mymem:
mov eax,[03E31BF8]
add eax,1cc
inc [eax]
ret
[disable]
dealloc(mymem)
|
The disable in this part frees mymem. Only problem is that this means the user has to execute the script tree times for it to increase twice
If you know a place of memory not used by the game (a code cave) you can do it without the need of allocating memory, and no need to clean it up.
example: Let's say 00400500 is free for you to use:
| Code: |
[enable]
fullaccess(00400500,1024)
createthread(00400500)
00400500:
mov eax,[03E31BF8]
add eax,1cc
inc [eax]
ret
[disable]
fullaccess(00400500,1024)
createthread(00400500)
00400500:
mov eax,[03E31BF8]
add eax,1cc
inc [eax]
ret
|
Here both enable and disable do the same, increase the address
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Montycarlo Expert Cheater
Reputation: 0
Joined: 10 Jan 2007 Posts: 124
|
Posted: Tue Apr 15, 2008 5:50 am Post subject: |
|
|
| 24653187 wrote: | | Montycarlo wrote: | | 24653187 wrote: | | you need to write something after disable... |
Could you go into a little more detail please?
What I'm trying to do is just increase the value of a pointer. |
just put in the original code... |
| Code: |
[ENABLE]
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
03B1A6A4:
jmp newmem
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
inc [03B1A6A4]
originalcode:
pop eax
cmp [eax],eax
add [eax],al
exit:
jmp returnhere
[DISABLE]
dealloc(newmem)
|
That was my code, and it worked, but not with a pointer, so I'm guessing I need to assign a variable and use it in the inc command?
|
|
| Back to top |
|
 |
Chase Payne Grandmaster Cheater
Reputation: 1
Joined: 20 Mar 2008 Posts: 533
|
Posted: Tue Apr 15, 2008 1:44 pm Post subject: |
|
|
| Can somone show me an example with a pointer in AA?
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 475
Joined: 09 May 2003 Posts: 26027 Location: The netherlands
|
Posted: Tue Apr 15, 2008 2:00 pm Post subject: |
|
|
I already did
mov eax,[03E31BF8]
add eax,1cc
inc [eax]
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Chase Payne Grandmaster Cheater
Reputation: 1
Joined: 20 Mar 2008 Posts: 533
|
Posted: Tue Apr 15, 2008 2:10 pm Post subject: |
|
|
mov eax,[03E31BF8] <-- Pointer Adress?
add eax,1cc <--- Offset
inc [eax] <--- If so.... then how would I increase the value address by 2? Inc only does it by 1
|
|
| Back to top |
|
 |
Psy Grandmaster Cheater Supreme
Reputation: 1
Joined: 27 Mar 2008 Posts: 1366
|
Posted: Tue Apr 15, 2008 2:51 pm Post subject: |
|
|
Inc is the increments assembly instruction.
You would either use inc twice, lol, or use add.
So it would be "add <offset> 2".
Tapdancing man....tapdancing....
|
|
| Back to top |
|
 |
Chase Payne Grandmaster Cheater
Reputation: 1
Joined: 20 Mar 2008 Posts: 533
|
Posted: Tue Apr 15, 2008 3:14 pm Post subject: |
|
|
| Code: | nop
nop
mov eax,[00CED74C]
add eax 10,#256000000
ret |
I get an error and I did exaxtly what you did....
However this works.... thanks dark byte in phyc
| Code: | mov eax,[00CED74C]
add eax,10
add [eax],#2560000 |
END
| Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
0041A752:
jmp newmem
nop
returnhere:
newmem:
NOP
NOP
mov eax [00CED6C4]
ADD EAX,10
ADD [EAX],#256000
INC [EAX] //this is allocated memory, you have read,write,execute access
//place your code here
originalcode:
//mov [edx+10],eax
//mov ecx,[ebp-04]
exit:
jmp returnhere
[DISABLE]
DEALLOC(NEWMEM)
0041A752:
mov [edx+10],eax
mov ecx,[ebp-04]
//code from here till the end of the code will be used to disable the cheat |
Last edited by Chase Payne on Tue Apr 15, 2008 3:39 pm; edited 2 times in total |
|
| Back to top |
|
 |
Psy Grandmaster Cheater Supreme
Reputation: 1
Joined: 27 Mar 2008 Posts: 1366
|
Posted: Tue Apr 15, 2008 3:20 pm Post subject: |
|
|
| add eax 10,#256000000 what?
|
|
| Back to top |
|
 |
Chase Payne Grandmaster Cheater
Reputation: 1
Joined: 20 Mar 2008 Posts: 533
|
Posted: Tue Apr 15, 2008 3:23 pm Post subject: |
|
|
# means decimal value. Read my post above I fixed it
|
|
| Back to top |
|
 |
|