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 With A Script ( 99% Done )

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
inudragon
How do I cheat?
Reputation: 0

Joined: 10 Oct 2016
Posts: 4

PostPosted: Mon Oct 10, 2016 1:40 am    Post subject: Help With A Script ( 99% Done ) Reply with quote

Hey Guys I'm Trying To Figure Out What Is Wrong With My Script, It's All Functioning Properly Except For 1 Part.

I Need The "Kill Boost 1, Kill Boost 2, And Kill Boost 3" To All Be Able To Function Together When Each Is Used With Each Other.

Example : When I Use Kill Boost 1 + 2 They Add Together, When I Use 1 + 3, And 2 + 3, Awel As 1 + 2 + 3.

Everything Is Working Properly In My Script EXCEPT 1+3, 2+3 And 1+2+3.
1+2 Is Working Just Fine I Can't Get The 3rd One To Link Properly And I Can't Seem To Figure Out what I Am Doing Wrong.

Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(applied)
label(applied2)
label(applied3)
label(lv60nokill)
label(newmem2)
label(newmem2r)

newmem:
pushad
mov ebx,[edi+1758]
cmp ebx,0
je newmem2r
cmp byte ptr [ebx+48],1 // guildrank
JNE newmem2r
popad
add eax,(int)10 // kill from guild rank
jmp newmem2

newmem2r:
popad

newmem2:
cmp byte ptr [edi+58bc],0 // kill boost 1
jne applied
cmp byte ptr [edi+58c4],0 // kill boost 2
jne applied2
cmp byte ptr [edi+0ab4],0 // kill boost 3
jne applied3

originalcode:
add eax,(int)100 // normal amount of kills
mov [esi],eax
jmp returnhere

applied:
add eax,(int)25 // kill boost 1
mov [esi],eax
cmp byte ptr [edi+58c4],0 // kill boost 2
jne applied2
cmp byte ptr [edi+0ab4],0 // kill boost 3
je applied3
jmp originalcode

applied2:
add eax,(int)25 // kill boost 2
mov [esi],eax
cmp byte ptr [edi+0ab4],0 // kill boost 3
je applied3
jmp originalcode

applied3:
add eax,(int)25 // kill boost 3
mov [esi],eax
jmp originalcode



lv60nokill:
mov [esi],eax
jmp returnhere

"ps_game.exe"+5AF71:
jmp newmem
returnhere:

[DISABLE]
dealloc(newmem)

"ps_game.exe"+5AF71:
add eax,01
mov [esi],eax
Back to top
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Mon Oct 10, 2016 2:48 am    Post subject: Reply with quote

Code:
cmp byte ptr [edi+0ab4],0 // kill boost 3
je applied3


this line? i presume [edi+0ab4] set to 1 is kill boost 3 enabled? so it should be jne instead of je? there are two of them under //applied and //applied2

so all the combinations that involved a +3 did not work.
Back to top
View user's profile Send private message
inudragon
How do I cheat?
Reputation: 0

Joined: 10 Oct 2016
Posts: 4

PostPosted: Mon Oct 10, 2016 3:21 am    Post subject: Reply with quote

Yeah, I've tried that ( And just now again to be sure ), And When I do That, It makes the "Kill Boost 1, And Kill Boost 2 ( While activated alone or activated together 1+2 ) Function as if Kill boost 3 was activated with them. @.@
Back to top
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Mon Oct 10, 2016 4:10 am    Post subject: Reply with quote

Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(applied)
label(applied2)
label(applied3)
label(lv60nokill)
label(newmem2)
label(newmem2r)

newmem:
pushad
mov ebx,[edi+1758]
cmp ebx,0
je newmem2r
cmp byte ptr [ebx+48],1 // guildrank
JNE newmem2r
popad
add eax,(int)10 // kill from guild rank
jmp newmem2

newmem2r:
popad

newmem2:
cmp byte ptr [edi+58bc],0 // kill boost 1
jne applied
cmp byte ptr [edi+58c4],0 // kill boost 2
jne applied2
cmp byte ptr [edi+0ab4],0 // kill boost 3
jne applied3

originalcode:
add eax,(int)100 // normal amount of kills
mov [esi],eax
jmp returnhere

applied:
add eax,(int)25 // kill boost 1
mov [esi],eax
cmp byte ptr [edi+58c4],0 // kill boost 2
jne applied2
cmp byte ptr [edi+0ab4],0 // kill boost 3
jne applied3
jmp originalcode

applied2:
add eax,(int)25 // kill boost 2
mov [esi],eax
cmp byte ptr [edi+0ab4],0 // kill boost 3
jne applied3
jmp originalcode

applied3:
add eax,(int)25 // kill boost 3
mov [esi],eax
jmp originalcode



lv60nokill:
mov [esi],eax
jmp returnhere

"ps_game.exe"+5AF71:
jmp newmem
returnhere:

[DISABLE]
dealloc(newmem)

"ps_game.exe"+5AF71:
add eax,01
mov [esi],eax


set a breakpoint at
Code:
cmp byte ptr [edi+0ab4]
check if [edi+0ab4] is set to 1 or 0. maybe [edi] was pointing to a different address set to 1 even though the old address was set to 0.
Back to top
View user's profile Send private message
inudragon
How do I cheat?
Reputation: 0

Joined: 10 Oct 2016
Posts: 4

PostPosted: Mon Oct 10, 2016 4:32 am    Post subject: Reply with quote

Setting it to 1 doesn't help either.

When I Use the kill boost 3 ALONE, it works perfectly fine, It only doesn't work when paired with 1, or 2.

1 and 2 are working together just fine.
Back to top
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Mon Oct 10, 2016 4:54 am    Post subject: Reply with quote

the logic of the script after changing je to jne is correct as far as i can tell. you can manually break and step over each instruction from the start of the script to make sure it is. if by the end of your script [esi] is correctly modified but the game doesn't show it as that value, then [esi] is probably being modified by some other instruction elsewhere (i.e. not "ps_game.exe"+5AF71).
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 62

Joined: 01 Oct 2008
Posts: 958

PostPosted: Mon Oct 10, 2016 7:21 am    Post subject: Reply with quote

The flow is reformed, hopefully working?

Code:

[ENABLE]
alloc(newmem,2048)
label(returnhere)
//label(originalcode)
//label(applied)
//label(applied2)
//label(applied3)
label(lv60nokill)
//label(newmem2)
//label(newmem2r)

newmem:
push ebx  // only need to push ebx

mov  ebx,[edi+1758]
cmp  ebx,0
je   @f
cmp  byte ptr [ebx+48],1 // guildrank
JNE  @f

  add eax,(int)10 // kill from guild rank

@@:

//   pop ebx  // alternative pop ebx here

cmp  byte ptr [edi+58bc],0 // test kill boost 1
je   @f  // skip boost 1

  add eax,(int)25 // kill boost 1

@@:

cmp  byte ptr [edi+58c4],0 // test kill boost 2
je   @f  // skip boost 2

  add eax,(int)25 // kill boost 2

@@:

cmp  byte ptr [edi+0ab4],0 // test kill boost 3
je   @f  // skip boost 3

  add eax,(int)25 // kill boost 3

@@:

// original code ?
add eax,(int)100 // normal amount of kills

mov [esi],eax   // applied final kills


pop ebx         // pop ebx here

  jmp returnhere
///  done cave


//  no where go here
  lv60nokill:
  mov [esi],eax
  jmp returnhere
//

"ps_game.exe"+5AF71:
jmp newmem
returnhere:

[DISABLE]
dealloc(newmem)

"ps_game.exe"+5AF71:
add eax,01
mov [esi],eax

_________________
- Retarded.
Back to top
View user's profile Send private message
inudragon
How do I cheat?
Reputation: 0

Joined: 10 Oct 2016
Posts: 4

PostPosted: Mon Oct 10, 2016 8:06 am    Post subject: Reply with quote

Thank you so much my friend. It turned out that the 3rd code I was using wasn't compatible with the code and i ended up using another code and it ended up working fine with the way i had the script ( with the exception that I changed the JE to Jne like you said )

Also I tested out your script and it works perfectly well too, and I really thank you for taking the time to assist me. I think I might just actually use your script since the code is smaller and easier to read.

Thankyou again
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 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