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 


whats wrong with this code?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Mon Feb 10, 2014 9:15 am    Post subject: whats wrong with this code? Reply with quote

Hi whats wrong with this code?
i have added "mycode" to this code
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
alloc(mycode,2048)
label(returnhere)
label(originalcode)
label(exit)

mycode:
add [ebx+00000480],9

newmem: //this is allocated memory, you have read,write,execute access
sub [ebx+00000480],1

originalcode:
//sub [ebx+00000480],eax

exit:
jmp returnhere

"Tutorial-i386.exe"+2551B:
jmp newmem
jmp mycode
nop
returnhere:



 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
dealloc(mecode)
"Tutorial-i386.exe"+2551B:
sub [ebx+00000480],eax
//Alt: db 29 83 80 04 00 00

_________________
Back to top
View user's profile Send private message
Matze500
Expert Cheater
Reputation: 8

Joined: 25 Jan 2012
Posts: 241
Location: Germany

PostPosted: Mon Feb 10, 2014 10:16 am    Post subject: Reply with quote

You will never reach your code because you jump to newmem then originalcode will be executed and finally the exit code.

Your jump to mycode will never be executed.

Code:
"Tutorial-i386.exe"+2551B:
jmp newmem //go to newmem
jmp mycode // Here is the failure
nop
returnhere: //return from newmem
[/code]
Back to top
View user's profile Send private message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Mon Feb 10, 2014 1:30 pm    Post subject: Thanks for answering Reply with quote

Thanks for answering but when i execute it it crashes!
what is its correct form?
and what nop effects to?
and i don't understand why mey code dose't execute?
where is the code that stops it from executing?
will it work?
Code:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
alloc(mycode,2048)
label(returnhere)
label(originalcode)
label(exit)

mycode:
add [ebx+00000480],9

newmem: //this is allocated memory, you have read,write,execute access
sub [ebx+00000480],1
jmp mycode

originalcode:
//sub [ebx+00000480],eax

exit:
jmp returnhere

"Tutorial-i386.exe"+2551B:
jmp newmem
nop
returnhere:



 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
dealloc(mecode)
"Tutorial-i386.exe"+2551B:
sub [ebx+00000480],eax
//Alt: db 29 83 80 04 00 00

i have read all tutorial for aa

_________________
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Feb 10, 2014 2:14 pm    Post subject: Reply with quote

This does nothing (value does not change):
Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)

newmem:
jmp returnhere

"Tutorial-i386.exe"+2551B:
jmp newmem
nop
returnhere:
 
[DISABLE]
dealloc(newmem)
"Tutorial-i386.exe"+2551B:
sub [ebx+00000480],eax

//Alt: db 29 83 80 04 00 00


This adds 9 to value (value + 9):
Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)

newmem:
add [ebx+00000480],9
jmp returnhere

"Tutorial-i386.exe"+2551B:
jmp newmem
nop
returnhere:
 
[DISABLE]
dealloc(newmem)
"Tutorial-i386.exe"+2551B:
sub [ebx+00000480],eax

//Alt: db 29 83 80 04 00 00


This moves 9 to value (value = 9 always):
Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)

newmem:
mov [ebx+00000480],9
jmp returnhere

"Tutorial-i386.exe"+2551B:
jmp newmem
nop
returnhere:
 
[DISABLE]
dealloc(newmem)
"Tutorial-i386.exe"+2551B:
sub [ebx+00000480],eax

//Alt: db 29 83 80 04 00 00
Back to top
View user's profile Send private message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Mon Feb 10, 2014 2:24 pm    Post subject: Reply with quote

i know these my problem is why this crashes??!!
_________________
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Feb 10, 2014 2:36 pm    Post subject: Reply with quote

Your script is crashing because you are caught in a loop:

Code:
mycode:
add [ebx+00000480],9

newmem:
sub [ebx+00000480],1
jmp mycode


You need a jump at mycode:

Code:
mycode:
add [ebx+00000480],9
jmp returnhere

newmem:
sub [ebx+00000480],1
jmp mycode


By the way, mycode is not needed. Everything can be done with newmem:

Code:
newmem:
sub [ebx+00000480],1
add [ebx+00000480],9
jmp returnhere
Back to top
View user's profile Send private message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Mon Feb 10, 2014 2:50 pm    Post subject: Reply with quote

i know i want just make my AA better!

Don't you know why it crashes??

_________________
Back to top
View user's profile Send private message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Wed Feb 19, 2014 1:28 am    Post subject: Please Reply with quote

Hi why this doesnt work?
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
alloc(mint,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
mov [mint],#16
mov [ebx+00000480],mint

originalcode:
//sub [ebx+00000480],eax

exit:
jmp returnhere

"Tutorial-i386.exe"+2551B:
jmp newmem
nop
returnhere:

mint:
 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
dealloc(mint)
"Tutorial-i386.exe"+2551B:
sub [ebx+00000480],eax
//Alt: db 29 83 80 04 00 00

look:
Code:
newmem: //this is allocated memory, you have read,write,execute access
mov [mint],#16
mov [ebx+00000480],mint

it gives me 02350800(its hex number) except of 16
what should i do?

_________________________________________________
because i cant double post i post my second post here!:

is this true? because it worked for me!

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
alloc(mint,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem:
mov [mint],#16
mov eax,[mint]
mov [ebx+00000480],eax

originalcode:
//sub [ebx+00000480],eax

exit:
jmp returnhere

"Tutorial-i386.exe"+2551B:
jmp newmem
nop
returnhere:

mint:
 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
dealloc(mint)
"Tutorial-i386.exe"+2551B:
sub [ebx+00000480],eax
//Alt: db 29 83 80 04 00 00

_________________
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Feb 19, 2014 3:13 am    Post subject: This post has 1 review(s) Reply with quote

Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)

newmem:
mov [ebx+00000480],#16
jmp returnhere

"Tutorial-i386.exe"+2551B:
jmp newmem
nop
returnhere:
 
[DISABLE]
dealloc(newmem)
"Tutorial-i386.exe"+2551B:
sub [ebx+00000480],eax

//Alt: db 29 83 80 04 00 00
Back to top
View user's profile Send private message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Wed Feb 19, 2014 4:46 am    Post subject: Reply with quote

do you know AA well?
_________________
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Feb 19, 2014 3:25 pm    Post subject: Reply with quote

Not really...just basics.
Back to top
View user's profile Send private message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Thu Feb 20, 2014 8:37 am    Post subject: Reply with quote

Any way you know much more than me!
_________________
Back to top
View user's profile Send private message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Thu Mar 06, 2014 7:32 am    Post subject: Reply with quote

what do you suggest me to make my AA better?
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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