|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Crimson Viper Newbie cheater Reputation: 0
Joined: 15 May 2011 Posts: 18 Location: Norway
|
Posted: Tue Apr 12, 2016 8:12 am Post subject: Scripting question |
|
|
Question 1:
- What is the different between
[eax+000000f8],#1000 and/or
[eax+000000f8],(int)1000
Question 2:
- How do I freeze a script to ex: permanent value = 1000 ?
If I activate a script I have made, the value will not decrease, but it still increases. What to do to set a constant value without increase/decrease?
|
|
Back to top |
|
|
rog9001 Expert Cheater Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Tue Apr 12, 2016 8:25 am Post subject: |
|
|
well the answer to your first question there is no real big difference between #1000 and (int)1000 and for your second question I will need your script.
|
|
Back to top |
|
|
hhhuut Grandmaster Cheater Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Tue Apr 12, 2016 8:27 am Post subject: |
|
|
I specify: Between the lines of your first question there's absolutely no difference for the assembler.
|
|
Back to top |
|
|
Cake-san Grandmaster Cheater Reputation: 8
Joined: 18 Dec 2014 Posts: 541 Location: Semenanjung
|
|
Back to top |
|
|
Crimson Viper Newbie cheater Reputation: 0
Joined: 15 May 2011 Posts: 18 Location: Norway
|
Posted: Tue Apr 12, 2016 8:36 am Post subject: Here are the script |
|
|
{ Game : MM6.exe
Version:
Date : 2016-04-02
Author : Senok
This script does blah blah blah
}
[ENABLE]
aobscanmodule(Gold,MM6.exe,29 0D 50 8D 90 00) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
// sub [MM6.exe+508D50],ecx
mov [MM6.exe+508D50],#9999999 //Unlimited Money
jmp return
Gold:
jmp code
nop
return:
registersymbol(Gold)
[DISABLE]
Gold:
db 29 0D 50 8D 90 00
unregistersymbol(Gold)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: "MM6.exe"+87693
"MM6.exe"+8767C: C3 - ret
"MM6.exe"+8767D: 90 - nop
"MM6.exe"+8767E: 90 - nop
"MM6.exe"+8767F: 90 - nop
"MM6.exe"+87680: 8B 15 50 8D 90 00 - mov edx,[MM6.exe+508D50]
"MM6.exe"+87686: 33 C0 - xor eax,eax
"MM6.exe"+87688: 3B CA - cmp ecx,edx
"MM6.exe"+8768A: 76 07 - jna MM6.exe+87693
"MM6.exe"+8768C: A3 50 8D 90 00 - mov [MM6.exe+508D50],eax
"MM6.exe"+87691: EB 06 - jmp MM6.exe+87699
// ---------- INJECTING HERE ----------
"MM6.exe"+87693: 29 0D 50 8D 90 00 - sub [MM6.exe+508D50],ecx
// ---------- DONE INJECTING ----------
"MM6.exe"+87699: 0F BF 0D 9C B9 5F 00 - movsx ecx,word ptr [MM6.exe+1FB99C]
"MM6.exe"+876A0: 8B 15 5C 4C 94 00 - mov edx,[MM6.exe+544C5C]
"MM6.exe"+876A6: 50 - push eax
"MM6.exe"+876A7: C1 E1 05 - shl ecx,05
"MM6.exe"+876AA: 66 A3 A0 B9 5F 00 - mov [MM6.exe+1FB9A0],ax
"MM6.exe"+876B0: 50 - push eax
"MM6.exe"+876B1: 66 8B 4C 11 1A - mov cx,[ecx+edx+1A]
"MM6.exe"+876B6: 50 - push eax
"MM6.exe"+876B7: 50 - push eax
"MM6.exe"+876B8: 6A FF - push -01
}
____________________________________________________
It's a AOB Script for Might & Magic 6, but the Gold are still increasing,
but i wan't it to be a constant value set to Value = 9.999.999.
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue Apr 12, 2016 8:36 am Post subject: Re: Scripting question |
|
|
senoks wrote: | What to do to set a constant value without increase/decrease? | -Use the mov instruction:
Code: | mov [eax+000000f8],#1000 |
If the original instruction is something like this:
Code: | mov [eax+000000f8],edx |
then you would need to do something like this:
Code: | mov edx,#1000
mov [eax+000000f8],edx |
or...
Code: | mov [eax+000000f8],#1000
//mov [eax+000000f8],edx |
or, just replace the edx part with #1000 etc. etc..
EDIT:
If the gold is still increasing, then add the gold value to your table and right-click it to see what else is writing to it. From there, you can see which instruction is causing it to change.
Last edited by ++METHOS on Tue Apr 12, 2016 8:38 am; edited 1 time in total |
|
Back to top |
|
|
hhhuut Grandmaster Cheater Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Tue Apr 12, 2016 8:38 am Post subject: |
|
|
As you can see it's a sub command, so it (usually) only takes action is something is to be subtracted.
If your gold still increases that's just logical because somewhere there's another routine that adds gold which you'll have to modify as well.
If you want to only have to modify one address then look for one that is accessing your gold all the time (for example reading the display value) and try to freeze your gold with that.
What is wrong if the gold keeps increasing anyway?
|
|
Back to top |
|
|
Crimson Viper Newbie cheater Reputation: 0
Joined: 15 May 2011 Posts: 18 Location: Norway
|
Posted: Tue Apr 12, 2016 8:56 am Post subject: Thanx For all help |
|
|
To hhhuut:
- It must be a standard value because if the gold value get to high, the game will crash.
- It's the same problem with Experience value too. It will affect the game in a badly way, that your "reputation" will get negative reputation and everyone get hostile.
So, there are some limited values I need to be constant.
btw: Your answer are very understandable, so I'll try out your tips
______________________________________________________
++METHOS
Thank you for very useful answer,
This is the original code:
sub [MM6.exe+508D50],ecx
I'll try out your tips
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue Apr 12, 2016 9:02 am Post subject: Re: Thanx For all help |
|
|
senoks wrote: | This is the original code:
sub [MM6.exe+508D50],ecx | -My comment still stands. Using the mov instruction will solve your problem...however...it is likely that more than one instruction is writing to your gold value. Once you find it using the instructions above, you can either NOP it, or write a script that will do the same thing as the other script. So, for example, you may end up with two scripts, one that adds and one that subtracts your gold:
Code: | sub [MM6.exe+508D50],ecx |
Code: | add [MM6.exe+508D50],ecx |
Just change them both to something like this:
Code: | mov [MM6.exe+508D50],#1000
//sub [MM6.exe+508D50],ecx |
Code: | mov [MM6.exe+508D50],#1000
//add [MM6.exe+508D50],ecx |
As pointed out above, however, you could also just inject using an instruction that is 'accessing' your gold several times per second. If one exists, you can just use that and not have to worry about it...assuming that it is exclusive to your gold (nothing else) and only your gold (no one else).
|
|
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
|
|