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 


having problem with script
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
hondafrik
Advanced Cheater
Reputation: 0

Joined: 15 Jan 2014
Posts: 60
Location: Croatia

PostPosted: Wed Mar 18, 2015 4:31 am    Post subject: having problem with script Reply with quote

hello everyone
When i manul change code
from
Code:
mov eax,[ecx+38]
to
Code:
mov eax,[ecx+78]
cheat work awesome.


but when i try with trainer, flash player crash
Code:
alloc(newmem1,2048)
label(returnhere1)
label(originalcode1)
aobscan(repair1,8B 45 10 8B 08 8B 41 38 85 C0)
registersymbol(repair1)

newmem1:
mov eax,[ecx+78]
jmp returnhere1

originalcode1:
mov eax,[ecx+38]
test eax,eax
jmp returnhere1

repair1:
jmp newmem1
returnhere1:

I cant understand what i do wrong,i try already few combination to add "nop"
Code:
newmem1:
mov eax,[ecx+78]
nop
jmp returnhere1
but its still same, flash crash all time.
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Wed Mar 18, 2015 4:48 am    Post subject: Reply with quote

If you have a working code, just duplicate it w/ the script:

Code:

aobscan(repair1,8B 45 10 8B 08 8B 41 38 85 C0)

repair1:
db 8b 81 80 00 00 00 90

_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
hondafrik
Advanced Cheater
Reputation: 0

Joined: 15 Jan 2014
Posts: 60
Location: Croatia

PostPosted: Wed Mar 18, 2015 5:26 am    Post subject: Reply with quote

not working that bro justa_dude,flash player crash again.
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Wed Mar 18, 2015 9:50 am    Post subject: Reply with quote

Your wanted "mov" code is 6bytes long. A jump is only five, so you need to take the "je" instruction into your script too and add a "nop" after the "jump newmem1".

Code:
alloc(newmem1,2048)
label(returnhere1)
label(originalcode1)
aobscan(repair1,8B 45 10 8B 08 8B 41 38 85 C0)
registersymbol(repair1)

newmem1:
mov eax,[ecx+78]
jmp returnhere1

originalcode1:
mov eax,[ecx+38]
test eax,eax
je 07F590F0
jmp returnhere1

repair1:
jmp newmem1
nop
returnhere1:
Back to top
View user's profile Send private message
hondafrik
Advanced Cheater
Reputation: 0

Joined: 15 Jan 2014
Posts: 60
Location: Croatia

PostPosted: Wed Mar 18, 2015 10:17 am    Post subject: Reply with quote

now only problem is to that code
Code:
je 07F590F0
is different every time when i refresh game,do you have idea what to do now bro?

Edit: i add new
Code:
je code
and its say hack failed

Code:
alloc(newmem1,2048)
label(returnhere1)
label(originalcode1)
aobscan(repair1,8B 45 10 8B 08 8B 41 38 85 C0)
registersymbol(repair1)

newmem1:
mov eax,[ecx+78]
jmp returnhere1

originalcode1:
mov eax,[ecx+38]
test eax,eax
je 07ABAB5B
jmp returnhere1

repair1:
jmp newmem1
nop
returnhere1:
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Wed Mar 18, 2015 12:55 pm    Post subject: Reply with quote

no idea why you're keeping 'originalcode' while game never accesses it.
Just do this
Code:
alloc(newmem1,2048)
label(returnhere1)
aobscan(repair1,8B 45 10 8B 08 8B 41 38 85 C0)
registersymbol(repair1)

newmem1:
mov eax,[ecx+78]
jmp returnhere1

repair1:
jmp newmem1
nop
returnhere1:

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
hondafrik
Advanced Cheater
Reputation: 0

Joined: 15 Jan 2014
Posts: 60
Location: Croatia

PostPosted: Wed Mar 18, 2015 1:09 pm    Post subject: Reply with quote

thx DaSpamer but still flash player crash,dont have idea anymore what to do
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Wed Mar 18, 2015 2:27 pm    Post subject: Reply with quote

try to inject code one instruction above. That way you won't have to deal with the jump address that changes all the time ...

Btw: Why is it that AOB-Code: 8B 45 10 8B 08 8B 41 38 85 C0???

If I use the address from your screenshot in your first post, I get a different one ... 8B 41 68 85 c0 74 28 8b 50 08
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Wed Mar 18, 2015 2:33 pm    Post subject: Reply with quote

In the code that he posted that he manually injected that he says works, he is overwriting the test and the jump. I suspect the problem is that he's got an ambiguous aobscan.
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Wed Mar 18, 2015 2:38 pm    Post subject: Reply with quote

Same thought came to me as I saw the AOB ...
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Mar 18, 2015 7:15 pm    Post subject: Reply with quote

Yea, why manually create the script when CE does all the work for you?

In Auto assemble, select Template > AOB Injection

I suspect CE will generate something like the following for you:

Code:
[ENABLE]
aobscanmodule(repair1,8B 41 68 85 C0 74 * 8B 50 08)
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  mov eax,[ecx+78]
  test eax,eax
  jmp return

repair1:
  jmp code
return:
registersymbol(repair1)

[DISABLE]
repair1:
  db 8B 41 68 85 C0
unregistersymbol(repair1)
dealloc(newmem)
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Mar 18, 2015 7:30 pm    Post subject: Reply with quote

I second that of using the script templates.
Have you checked to see if the jump distance changes?
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Thu Mar 19, 2015 2:35 am    Post subject: Reply with quote

It's a short jump, so I'd say it always jumps 28 bytes which would be easy to calculate then...
Back to top
View user's profile Send private message
hondafrik
Advanced Cheater
Reputation: 0

Joined: 15 Jan 2014
Posts: 60
Location: Croatia

PostPosted: Thu Mar 19, 2015 3:39 am    Post subject: Reply with quote

i need Aob code because he is only static,everytime i refresh game address is changed so i cant use her,i try to add "nop" everywhere in hack,and yes i try AA adding Aob injection and still nothing,something is missing and i cant find it,my other hacks in same script work fine only this hack make me a problem.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Mar 19, 2015 1:08 pm    Post subject: Reply with quote

Did the script I posted not run?

It should have been exactly what you wanted.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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