Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Mission changes to nothing problem. Please help.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
rog9001
Expert Cheater
Reputation: 2

Joined: 22 Dec 2015
Posts: 214
Location: Jupiter

PostPosted: Tue Apr 12, 2016 7:24 am    Post subject: Mission changes to nothing problem. Please help. Reply with quote

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
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Tue Apr 12, 2016 7:36 am    Post subject: Reply with quote

Don't know Confused
Code:

setsmall:
  cmp [ecx+000000A0],02 // your bytes
  je originalcode
  mov [ecx+000000A0],00
  jmp originalcode

_________________
...
Back to top
View user's profile Send private message
rog9001
Expert Cheater
Reputation: 2

Joined: 22 Dec 2015
Posts: 214
Location: Jupiter

PostPosted: Tue Apr 12, 2016 7:40 am    Post subject: Reply with quote

Ye that's the issue. it says that it can not be compiled Confused
Back to top
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Tue Apr 12, 2016 7:47 am    Post subject: Reply with quote

rog9001 wrote:
Ye that's the issue. it says that it can not be compiled Confused


How should I know if I'm not seeing the whole script -_-

I'm not some psychic people who can mind read ,though.

_________________
...
Back to top
View user's profile Send private message
rog9001
Expert Cheater
Reputation: 2

Joined: 22 Dec 2015
Posts: 214
Location: Jupiter

PostPosted: Tue Apr 12, 2016 7:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Tue Apr 12, 2016 8:00 am    Post subject: Reply with quote

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
View user's profile Send private message
rog9001
Expert Cheater
Reputation: 2

Joined: 22 Dec 2015
Posts: 214
Location: Jupiter

PostPosted: Tue Apr 12, 2016 8:14 am    Post subject: Reply with quote

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. Confused
Back to top
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Tue Apr 12, 2016 8:28 am    Post subject: Reply with quote

Sorry, I understand nothing because I don't have the game and my brain hurts when trying to process your problem. -_-

Should wait for others people's answer ,maybe Confused

Edited
Can't you compare others value/register/variable ?

or make separated script ?

_________________
...


Last edited by Cake-san on Tue Apr 12, 2016 8:36 am; edited 1 time in total
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Tue Apr 12, 2016 8:35 am    Post subject: Reply with quote

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
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Apr 12, 2016 8:45 am    Post subject: Reply with quote

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
View user's profile Send private message
rog9001
Expert Cheater
Reputation: 2

Joined: 22 Dec 2015
Posts: 214
Location: Jupiter

PostPosted: Tue Apr 12, 2016 9:07 am    Post subject: Reply with quote

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
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Apr 12, 2016 9:13 am    Post subject: Reply with quote

Don't mention it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites