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 


[HELP] Enable script crash

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Amami De Kaito
Expert Cheater
Reputation: 5

Joined: 06 Feb 2013
Posts: 110
Location: 3/44

PostPosted: Tue May 07, 2013 7:23 am    Post subject: [HELP] Enable script crash Reply with quote

Help look my script game Torchlight 2.

Code:
[ENABLE]
assert("Torchlight2.exe"+114919,D9 86 7C 05 00 00 8B CE D9 9C 24 84 00 00 00 E8 D3 BA FF FF E9 4F FF FF FF 85 DB) // Mana
assert("Torchlight2.exe"+11EED6,01 96 8C 05 00 00 83 BE 8C 05 00 00 00 7D 0A C7 86 8C 05 00 00 00 00 00 00 6A 1C 8B CE) // XP

alloc(MyScript,$1000)
label(returnhere_Mana)
label(returnhere_XP)
label(originalcode_Mana)
label(originalcode_XP)
label(exit_Mana)
label(exit_XP)

label(Mana)
label(XP)

label(iMana)
label(iXP)
registersymbol(iMana)
registersymbol(iXP)

//==============================================================================
MyScript:
//==============================================================================

iMana:
  dd 0
iXP:
  dd 0

//==============================================================================

Mana:
  cmp [iMana],1
  jne originalcode_Mana
  mov dword ptr [esi+57C],(float)9999.0

originalcode_Mana:
  fld dword ptr [esi+0000057C]

exit_Mana:
  jmp returnhere_Mana

"Torchlight2.exe"+114919:
  jmp Mana
  nop
returnhere_Mana:

//==============================================================================

XP:
  cmp [iXP],1
  jne originalcode_XP
  add [esi+58C],#1000000

originalcode_XP:
  add [esi+0000058C],edx

exit_XP:
  jmp returnhere_XP

"Torchlight2.exe"+11EED6:
  jmp XP
  nop
returnhere_XP:

//==============================================================================

[DISABLE]
dealloc(newmem)
unregistersymbol(iMana)
unregistersymbol(iXP)

"Torchlight2.exe"+114919:
  db D9 86 7C 05 00 00

"Torchlight2.exe"+11EED6:
  db 01 96 8C 05 00 00


At first I put the code mana script working. But I put the code XP and

enable script game is crash. Please help.
Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 472

Joined: 09 May 2003
Posts: 25870
Location: The netherlands

PostPosted: Tue May 07, 2013 7:39 am    Post subject: Reply with quote

not sure. Only thing i can guess is that XP might go too high too fast causing a crash
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Amami De Kaito
Expert Cheater
Reputation: 5

Joined: 06 Feb 2013
Posts: 110
Location: 3/44

PostPosted: Tue May 07, 2013 7:50 am    Post subject: Reply with quote

might too high? too fast Question
Back to top
View user's profile Send private message Send e-mail
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue May 07, 2013 8:35 am    Post subject: Reply with quote

Code:

XP:
  cmp [iXP],1
  jne originalcode_XP
  add [esi+58C],#1000000


#1000000 is very big...that, and you're adding it, not moving it. Maybe change this and test.
Back to top
View user's profile Send private message
Amami De Kaito
Expert Cheater
Reputation: 5

Joined: 06 Feb 2013
Posts: 110
Location: 3/44

PostPosted: Tue May 07, 2013 9:09 am    Post subject: Reply with quote

How to fix? or decrease value?
Back to top
View user's profile Send private message Send e-mail
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue May 07, 2013 11:47 am    Post subject: Reply with quote

Maybe try this, first:

Code:

XP:
cmp [iXP],1
jne originalcode_XP
add edx,#100
add [esi+58C],edx
jmp returnhere_XP


If that works, maybe try a higher value etc.:
Code:

XP:
cmp [iXP],1
jne originalcode_XP
add edx,#1000
add [esi+58C],edx
jmp returnhere_XP
Back to top
View user's profile Send private message
Amami De Kaito
Expert Cheater
Reputation: 5

Joined: 06 Feb 2013
Posts: 110
Location: 3/44

PostPosted: Tue May 07, 2013 9:24 pm    Post subject: Reply with quote

GNIREENIGNE wrote:
Maybe try this, first:

Code:

XP:
cmp [iXP],1
jne originalcode_XP
add edx,#100
add [esi+58C],edx
jmp returnhere_XP


If that works, maybe try a higher value etc.:
Code:

XP:
cmp [iXP],1
jne originalcode_XP
add edx,#1000
add [esi+58C],edx
jmp returnhere_XP


Test script is game crash too.
Back to top
View user's profile Send private message Send e-mail
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed May 08, 2013 9:55 am    Post subject: Reply with quote

In that case, start from the beginning. Check your script and injection points. Check to see if you are injecting your code at the proper location, test your script by jumping to code cave at XP instruction, and just running original code. If it crashes, you are either injecting at incorrect location, or the game is performing some integrity check. If it doesn't crash with original code, continue by checking that you are comparing a proper offset, and that the instruction is not accessing any other addresses with this compare, other than your XP address.

If all of that doesn't work, you may need to inject at a different location - perhaps a different instruction that accesses your XP.
Back to top
View user's profile Send private message
Amami De Kaito
Expert Cheater
Reputation: 5

Joined: 06 Feb 2013
Posts: 110
Location: 3/44

PostPosted: Wed May 08, 2013 10:26 am    Post subject: Reply with quote

GNIREENIGNE wrote:
In that case, start from the beginning. Check your script and injection points. Check to see if you are injecting your code at the proper location, test your script by jumping to code cave at XP instruction, and just running original code. If it crashes, you are either injecting at incorrect location, or the game is performing some integrity check. If it doesn't crash with original code, continue by checking that you are comparing a proper offset, and that the instruction is not accessing any other addresses with this compare, other than your XP address.

If all of that doesn't work, you may need to inject at a different location - perhaps a different instruction that accesses your XP.


Thank you very much Smile
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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