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 


Problem with Trainer buttons
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Montycarlo
Expert Cheater
Reputation: 0

Joined: 10 Jan 2007
Posts: 124

PostPosted: Sun Apr 13, 2008 5:27 am    Post subject: Problem with Trainer buttons Reply with quote

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 Very Happy
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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

Joined: 09 May 2003
Posts: 26027
Location: The netherlands

PostPosted: Sun Apr 13, 2008 6:15 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Montycarlo
Expert Cheater
Reputation: 0

Joined: 10 Jan 2007
Posts: 124

PostPosted: Mon Apr 14, 2008 4:27 am    Post subject: Reply with quote

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! Very Happy

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.

Code:

03E31BF8+1cc:

That would make the following code effect that pointer, right?

But what if I had just
Code:

inc [03E31BF8+1cc]


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
View user's profile Send private message
24653187
Expert Cheater
Reputation: 0

Joined: 19 Aug 2007
Posts: 214
Location: 218.255.97.194/61.18.170.???

PostPosted: Tue Apr 15, 2008 12:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Montycarlo
Expert Cheater
Reputation: 0

Joined: 10 Jan 2007
Posts: 124

PostPosted: Tue Apr 15, 2008 4:29 am    Post subject: Reply with quote

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
View user's profile Send private message
24653187
Expert Cheater
Reputation: 0

Joined: 19 Aug 2007
Posts: 214
Location: 218.255.97.194/61.18.170.???

PostPosted: Tue Apr 15, 2008 5:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

Joined: 09 May 2003
Posts: 26027
Location: The netherlands

PostPosted: Tue Apr 15, 2008 5:42 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Montycarlo
Expert Cheater
Reputation: 0

Joined: 10 Jan 2007
Posts: 124

PostPosted: Tue Apr 15, 2008 5:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Chase Payne
Grandmaster Cheater
Reputation: 1

Joined: 20 Mar 2008
Posts: 533

PostPosted: Tue Apr 15, 2008 1:44 pm    Post subject: Reply with quote

Can somone show me an example with a pointer in AA?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

Joined: 09 May 2003
Posts: 26027
Location: The netherlands

PostPosted: Tue Apr 15, 2008 2:00 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Chase Payne
Grandmaster Cheater
Reputation: 1

Joined: 20 Mar 2008
Posts: 533

PostPosted: Tue Apr 15, 2008 2:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Psy
Grandmaster Cheater Supreme
Reputation: 1

Joined: 27 Mar 2008
Posts: 1366

PostPosted: Tue Apr 15, 2008 2:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Chase Payne
Grandmaster Cheater
Reputation: 1

Joined: 20 Mar 2008
Posts: 533

PostPosted: Tue Apr 15, 2008 3:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Psy
Grandmaster Cheater Supreme
Reputation: 1

Joined: 27 Mar 2008
Posts: 1366

PostPosted: Tue Apr 15, 2008 3:20 pm    Post subject: Reply with quote

add eax 10,#256000000 what?
Back to top
View user's profile Send private message
Chase Payne
Grandmaster Cheater
Reputation: 1

Joined: 20 Mar 2008
Posts: 533

PostPosted: Tue Apr 15, 2008 3:23 pm    Post subject: Reply with quote

# means decimal value. Read my post above I fixed it Razz
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 All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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