View previous topic :: View next topic |
Author |
Message |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Tue Apr 12, 2016 7:24 am Post subject: Mission changes to nothing problem. Please help. |
|
|
I have a script for a racing game in which there are small missions to complete like do 10 barrel rolls or drift 2000 m and this is the script:
Code: |
label(originalcode)
label(back2top)
label(setbig)
label(setsmall)
1stCompare:
cmp [ecx+000000A0],9C40
jl setsmall
jge setbig
originalcode:
mov eax,[ecx+000000A0]
jmp back2top
setbig:
mov [ecx+000000A0],3938700
jmp originalcode
setsmall:
mov [ecx+000000A0],00
jmp originalcode
Mission_Slot1_Finish_Quick:
jmp 1stCompare
nop
back2top:
|
now the issue is there are versus races and the missions for those are "finish in 1st place with the Honda S2000" etc. now the value for these missions are smaller then 40000 and it sets the mission to 0 that being nothing at all so there is no possible way to complete it. is there a way to compare [ecx+000000A0] to a set of bytes? because I found out that the mission in versus races have the same bytes so I want it to compare [ecx+000000A0] to those bytes and if its equal nothing happens and if its not equal it will jump to "setsmall"
|
|
Back to top |
|
 |
Cake-san Grandmaster Cheater
Reputation: 8
Joined: 18 Dec 2014 Posts: 541 Location: Semenanjung
|
|
Back to top |
|
 |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Tue Apr 12, 2016 7:40 am Post subject: |
|
|
Ye that's the issue. it says that it can not be compiled
|
|
Back to top |
|
 |
Cake-san Grandmaster Cheater
Reputation: 8
Joined: 18 Dec 2014 Posts: 541 Location: Semenanjung
|
|
Back to top |
|
 |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Tue Apr 12, 2016 7:57 am Post subject: |
|
|
well here is the full thing I don't know what you will do with the 1st and last part of it just to cmp [ecx+000000A0],//bytes.
Code: |
aobscanmodule(Mission_set,8B 81 A0 00 00 00 89 44 24 74)
registersymbol(Mission_set)
alloc(1stCompare,$1000)
1stCompare:
cmp [ecx+000000A0],9C40
jl setsmall
jge setbig
originalcode:
mov eax,[ecx+000000A0]
jmp back2top
setbig:
mov [ecx+000000A0],3938700
jmp originalcode
setsmall:
mov [ecx+000000A0],00
jmp originalcode
Mission_set:
jmp 1stCompare
nop
back2top:
[DISABLE]
Mission_set:
db 8B 81 A0 00 00 00
unregistersymbol(Mission_set)
dealloc(1stCompare)
|
|
|
Back to top |
|
 |
Cake-san Grandmaster Cheater
Reputation: 8
Joined: 18 Dec 2014 Posts: 541 Location: Semenanjung
|
Posted: Tue Apr 12, 2016 8:00 am Post subject: |
|
|
I don't see any problem except for [enable]
Here's the fix, just change the bytes to your liking.
Code: |
[ENABLE]
aobscanmodule(Mission_set,Asphalt8_w8.exe,8B 81 A0 00 00 00 89 44 24 74)
registersymbol(Mission_set)
alloc(1stCompare,$1000)
1stCompare:
cmp [ecx+000000A0],9C40
jl setsmall
jge setbig
originalcode:
mov eax,[ecx+000000A0]
jmp back2top
setbig:
mov [ecx+000000A0],3938700
jmp originalcode
setsmall:
cmp [ecx+000000A0],02 // your bytes
je originalcode
mov [ecx+000000A0],00
jmp originalcode
Mission_set:
jmp 1stCompare
nop
back2top:
[DISABLE]
Mission_set:
db 8B 81 A0 00 00 00
unregistersymbol(Mission_set)
dealloc(1stCompare)
|
_________________
... |
|
Back to top |
|
 |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Tue Apr 12, 2016 8:14 am Post subject: |
|
|
ye but the thing is for example the mission is "barrel roll: 2"
and in versus the values are mostly from 1 - 30
so if I were to cmp [ecx+000000A0],1 - 30 and if its equal make it do nothing then barrel rolls will also stay at 2 sins 2 is in the range from 1 - 30 but if I make it: if equal mov [ecx+000000A0],0 then sure barrel rolls will be 0 but so will the versus race missions (and missions wont be possible to complete sins it will show nothing). so what I am trying to do is to make barrel rolls 0 but in versus keep it being 1 - 30. I don't know if you will understand what I am saying but let me continue... in versus there is a string which is constant:
"1st-Place Finish with This Car: #FF9600"
and in AOB it is:
"31 73 74 2D 50 6C 61 63 65 20 46 69 6E 69 73 68 20 77 69 74 68 20 54 68 69 73 20 43 61 72 3A 20 23 46 46 39 36 30 30"
so I want it to... I don't know maybe read the aob
"31 73 74 2D 50 6C 61 63 65 20 46 69 6E 69 73 68 20 77 69 74 68 20 54 68 69 73 20 43 61 72 3A 20 23 46 46 39 36 30 30"
and if its not the correct aob then it will mov [ecx+000000A0],0.
|
|
Back to top |
|
 |
Cake-san Grandmaster Cheater
Reputation: 8
Joined: 18 Dec 2014 Posts: 541 Location: Semenanjung
|
|
Back to top |
|
 |
hhhuut Grandmaster Cheater
Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Tue Apr 12, 2016 8:35 am Post subject: |
|
|
My brain is about to explode trying to understand you, but what if you try to find a difference (kind of an ID) between the versus race missions and the other things (like barrell rolls) and set the value accordingly?
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue Apr 12, 2016 8:45 am Post subject: |
|
|
You need to use a filter. If you find a value that can determine which mission/level type you are on, you can incorporate that in to your script and perform a check with conditional jump that will allow you to set the barrel roll count, based on the level/mission that you're on.
If you haven't completed the tutorial, I recommend doing so. The last step covering data structure dissection may help, but you're likely to have to use a second injection point here.
|
|
Back to top |
|
 |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Tue Apr 12, 2016 9:07 am Post subject: |
|
|
Actually I forgot about data structures xD I found out that all the values related to versus at 9C they are all value 13 but barrel rolls and all the other stuff is 0. Ehhhh... damn it... I completely blanked on data structures.
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue Apr 12, 2016 9:13 am Post subject: |
|
|
Don't mention it.
|
|
Back to top |
|
 |
|