 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
onvoloper Master Cheater
Reputation: 0
Joined: 05 Jul 2006 Posts: 294
|
Posted: Wed Jul 18, 2007 11:17 pm Post subject: Bit of script trouble |
|
|
Hey, I'm having trouble making my code injection script into one I can put on my CT. I've got it so I can put it on my table and enable it but I cant disable it...Here are the 2 scripts;
The CT one;
Code: | [ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
00502A83:
jmp newmem
nop
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
//place your code here, or edit the code below like I did xD
originalcode:
add [edx],a
jmp 00502a97
fld [ebx+08]
exit:
jmp returnhere
[DISABLE]
add [edx],eax
jmp 00502a97
fld [ebx+08]
dealloc(newmem,2048) |
The Code Injection One;
Code: | alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
00502A83:
jmp newmem
nop
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
//place your code here, or edit the code below like I did xD
originalcode:
add [edx],a
jmp 00502a97
fld [ebx+08]
exit:
jmp returnhere |
I'm gathering theres something wrong with my disable section...
These scripts are for Hit the Ball...a sample game from game maker. I thought it'd be a nice easy program to make my 1st script for
If you can help thanks
Edit: Could it be that it just won't turn off and the disable section is right? to make meh better at scripts.
AND do you have to have the game to help me cuz that would limit who could help...
One more thing can you say if theres nothing wrong with it?
|
|
Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6301
|
Posted: Thu Jul 19, 2007 8:34 am Post subject: |
|
|
You have dealloc in there wrong. You dont need to specify a size when deallocating. Also it can be at the end like you have it or beginning under disable. I found it makes no difference.
Also you need to put the address of the instructions that need to be written back to. If not it doesnt know where to write the code when disabled.
*Also the code is doing nothing, Because you didn't write anything to inject.
Fixed:
Code: | [ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
00502A83:
jmp newmem
nop
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
//place your code here, or edit the code below like I did xD
originalcode:
add [edx],a
jmp 00502a97
fld [ebx+08]
exit:
jmp returnhere
[DISABLE]
dealloc(newmem)<------Just deallocate like this.
00502A83:<--- Missing "it needs to know where to write original code back
add [edx],eax
jmp 00502a97
fld [ebx+08]
|
|
|
Back to top |
|
 |
onvoloper Master Cheater
Reputation: 0
Joined: 05 Jul 2006 Posts: 294
|
Posted: Fri Jul 20, 2007 6:47 pm Post subject: |
|
|
Thanks I'll try n do this to some other ones now.
yay
I didn't wanna just use urs so I tried to edit mine
Code: | [ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
00502A83:
jmp newmem
nop
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
//place your code here, or edit the code below like I did xD
originalcode:
add [edx],a
jmp 00502a97
fld [ebx+08]
exit:
jmp returnhere
[DISABLE]
dealloc(newmem)
00502a97:
add [edx],eax
jmp 00502a97
fld [ebx+08]
|
What happened with is that it kept saying error in line 2 then I fixed that...I had alloc in Disable section. BUT once I fixed that it said that back could not be compiled. So I got rid of it...I tried it and it worked but this time I disabled it and then I hit a ball and it just froze...
EDIT: I know whats wrong with my script I used in my Disable section instead of
|
|
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
|
|