| View previous topic :: View next topic |
| Author |
Message |
Jase How do I cheat?
Reputation: 0
Joined: 15 Jun 2010 Posts: 2
|
Posted: Tue Jun 15, 2010 8:40 am Post subject: IF THEN in c.e? |
|
|
Hello, new here, longtime C.E user. Never really tried using many of the options that come with C.E since i'm a bit noobish when it comes to languages, but i'm prepared to learn any if necessary.
Well, the question is, is there a way to do "If" and "Then" sort of commands in C.E? Say I have Address 00599220 which has the value of 55, Is it possible for C.E to detect that 00599220 is 55, then start running a script that forces a different address to change value to yet ANOTHER address? Im really making my question complicated... I'll just write my scenario.
In the game I am hacking, i'm trying to make it so when my character is performing a certain move, it will make another object to constantly position onto my player, until he isn't performing the move anymore. Is this easy/possible to do? If so, any guides?
I am sorry for being such a prick by coming on here and immediately asking for help... I suppose it's not all bad since im not directly asking for hacks for a game, but rather to learn how to do it myself. I dunno, thanks in advance guys!
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 472
Joined: 09 May 2003 Posts: 25875 Location: The netherlands
|
Posted: Tue Jun 15, 2010 9:04 am Post subject: |
|
|
Do a code injection in the game at an often called routine (e.g render routine or even in the routine that changes the initial value) and in there do the value change.
e.g:
| Code: |
alloc(yourcode,1024)
label(originalcode)
label(jumpback)
hookedroutine:
jmp yourcode
nop
nop
jumpback:
yourcode:
cmp [00599220],#55 //is the value 55 ?
jne originalcode //if not, exit the injection
mov [anotheraddress],#100000 //else set another address to 100000
originalcode:
db 11 22 33 44 55 66 77
jmp jumpback
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Jase How do I cheat?
Reputation: 0
Joined: 15 Jun 2010 Posts: 2
|
Posted: Tue Jun 15, 2010 4:13 pm Post subject: |
|
|
| Dark Byte wrote: | Do a code injection in the game at an often called routine (e.g render routine or even in the routine that changes the initial value) and in there do the value change.
e.g:
| Code: |
alloc(yourcode,1024)
label(originalcode)
label(jumpback)
hookedroutine:
jmp yourcode
nop
nop
jumpback:
yourcode:
cmp [00599220],#55 //is the value 55 ?
jne originalcode //if not, exit the injection
mov [anotheraddress],#100000 //else set another address to 100000
originalcode:
db 11 22 33 44 55 66 77
jmp jumpback
|
|
Thanks for reply! Helps tonns!
Sorry to be inept, but i'm struggling still... Generally, get confused on what bits and pieces to replace and alter. Sorry for knowing nothing, but I really want to learn.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 472
Joined: 09 May 2003 Posts: 25875 Location: The netherlands
|
Posted: Wed Jun 16, 2010 12:39 pm Post subject: |
|
|
It's easiest to just to the code injection template in the auto assembler window, it fills in most of the stuff you need
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
bhpianist Cheater
Reputation: 1
Joined: 17 Apr 2010 Posts: 38
|
Posted: Tue Jun 22, 2010 10:50 pm Post subject: |
|
|
| Jase wrote: |
Thanks for reply! Helps tonns!
Sorry to be inept, but i'm struggling still... Generally, get confused on what bits and pieces to replace and alter. Sorry for knowing nothing, but I really want to learn. |
| Code: | cmp [00599220],#55 //is the value 55 ?
jne originalcode //if not, exit the injection |
That checks to see if the value at 00599220 is equal to 55 . The jne means, if it's not equal then jump to "originalcode" which is below. If it is equal, then it'll continue and:
| Code: | | mov [anotheraddress],#100000 //else set another address to 100000 |
move 100000 into another address, but both paths will eventually trickle down to the "originalcode", which jumps back to the original code.
|
|
| Back to top |
|
 |
Teh1337Bix Cheater
Reputation: 3
Joined: 22 Mar 2010 Posts: 37 Location: Australia
|
Posted: Sun Jun 27, 2010 2:20 am Post subject: |
|
|
| originalcode doesn't jump back. jmp jumpback does. Original code just holds the code that was overwritten to get fit the jmp to the injection in.
|
|
| Back to top |
|
 |
|