| View previous topic :: View next topic |
| Author |
Message |
Firev2 How do I cheat?
Reputation: 0
Joined: 14 Mar 2012 Posts: 6
|
Posted: Wed Mar 14, 2012 10:38 pm Post subject: Problem with label, alloc |
|
|
hi all,
i have a problem with my script.
[enable]
label (mylabel)
3000000:
jmp mylabel
mylabel:
mov [eax],FFFFFFFF
jmp mylabel
[Disable]
3000000:
add [eax],al
it says "Error on line 2: "label(mylabel)": this instruction could not be compiled.
i gett the same error when using alloc/dealloc. I want my script to put -1 into the address and loop it to get a "freeze" effect. i cant see anything wrong with the script, i dont know why it wont compile. if it helps im on windows 7 64bit.
any help?
thanks
Last edited by Firev2 on Thu Mar 15, 2012 3:29 am; edited 2 times in total |
|
| Back to top |
|
 |
Freiza Grandmaster Cheater
Reputation: 22
Joined: 28 Jun 2010 Posts: 662
|
Posted: Thu Mar 15, 2012 1:39 am Post subject: |
|
|
1) There should be no space between label and (mylabel)
it should be label(mylabel) (at line 2)
2) You have created an infinite loop at line 9
3)add eax, al // this instruction can't be compiled. you should add registers/memory of equal size. (at line 13)
you can use
add eax, eax
4) At disable you should also specify address (here 3000000: )
| Code: |
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,500) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
originalcode:
mov dword ptr [eax],(int)-1
exit:
jmp returnhere
3000000:
jmp newmem
nop
nop
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
3000000:
add eax,eax
|
Is this what you want?
_________________
|
|
| Back to top |
|
 |
Firev2 How do I cheat?
Reputation: 0
Joined: 14 Mar 2012 Posts: 6
|
Posted: Thu Mar 15, 2012 3:24 am Post subject: |
|
|
sorry, forgot to put address in disable section. add eax,al is the addresses opcode at rest (original opcode).
basically the problem was that you arnt supposed to put a space between label and the name. thanks for the post ^^
this is my script now:
| Code: | [enable]
label(tumble)
342a72a0:
jmp tumble
tumble:
342a72a0:
mov [eax],FFFFFFFF
jmp tumble
[disable]
342a72a0:
add [eax],al |
but it still only puts -1 into the address once.
freezing the value at -1 acts as a no cooldown on the skill.
|
|
| Back to top |
|
 |
Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Thu Mar 15, 2012 6:38 am Post subject: |
|
|
you should alloc some space and then jump to the allocated space
| Code: | [enable]
alloc(tumble,24)
342a72a0:
call tumble
tumble:
mov [eax],FFFFFFFF
ret
[disable]
dealloc(tumble)
342a72a0:
add [eax],al |
also ... if the size of the original code is equal to your code do so
| Code: | [enable]
342a72a0:
mov [eax],FFFFFFFF
[disable]
342a72a0:
add [eax],al
/* but in this case it will not work because
mov [eax],FFFFFFFF
and
add [eax],al
have different bytes number */ |
_________________
... Fresco |
|
| Back to top |
|
 |
Freiza Grandmaster Cheater
Reputation: 22
Joined: 28 Jun 2010 Posts: 662
|
Posted: Thu Mar 15, 2012 7:40 am Post subject: |
|
|
tumble:
342a72a0:
mov [eax],FFFFFFFF
jmp tumble
this code will freeze complete thread of the game where you are injecting this code. I think this is not what you want.
If you want to freeze it through script use lua script.
_________________
|
|
| Back to top |
|
 |
biex How do I cheat?
Reputation: 0
Joined: 30 Jan 2012 Posts: 5
|
Posted: Fri Mar 16, 2012 4:13 am Post subject: |
|
|
What you are doing is completely unnecessary, all you wish to do is to have it at -1 while enabled..
this is all you need:
[enable]
342a72a0:
mov [eax],#-1
[disable]
342a72a0:
add [eax],al
|
|
| Back to top |
|
 |
Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Fri Mar 16, 2012 7:02 am Post subject: |
|
|
| biex wrote: | What you are doing is completely unnecessary, all you wish to do is to have it at -1 while enabled..
this is all you need:
[enable]
342a72a0:
mov [eax],#-1
[disable]
342a72a0:
add [eax],al |
not at all ... have you calculated the length of the instruction ?
"add [eax],al" have less bytes than "mov [eax],#-1" therefore when you enable the code some instructions after 342a72a0 will be replaced ... therefore the code i suggested works better, because it doesn't replace any of the original instructions
| Code: | [enable]
alloc(tumble,24)
342a72a0:
call tumble
tumble:
mov [eax],FFFFFFFF
ret
[disable]
dealloc(tumble)
342a72a0:
add [eax],al |
PS: for better code ... use auto assemble
anyways if you could give us 4 the instructio before and after 342a72a0: add [eax],al
that would help to make a real working code
_________________
... Fresco |
|
| Back to top |
|
 |
Firev2 How do I cheat?
Reputation: 0
Joined: 14 Mar 2012 Posts: 6
|
Posted: Sat Mar 17, 2012 1:11 pm Post subject: |
|
|
| biex wrote: | What you are doing is completely unnecessary, all you wish to do is to have it at -1 while enabled..
this is all you need:
[enable]
342a72a0:
mov [eax],#-1
[disable]
342a72a0:
add [eax],al |
this was the most obvious and first thing to try. it didnt work at all. all it does it put it in once.
|
|
| Back to top |
|
 |
Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Sat Mar 17, 2012 4:47 pm Post subject: |
|
|
just give us a few instructions before and after the code, so that we can help you develop your script.
_________________
... Fresco |
|
| Back to top |
|
 |
|