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 


Create 2 scripts for one instruction

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
sandsmaster
Newbie cheater
Reputation: 1

Joined: 21 Jan 2021
Posts: 24

PostPosted: Sun Apr 11, 2021 9:59 am    Post subject: Create 2 scripts for one instruction Reply with quote

Hello to everyone.

I'm trying to hack the old-school Killing Floor 1.
I decided to create a full table for myself and a few friends, but the values for money and carry weight go through one instruction.

The problem is:
I want to create a separate cheat for money and for carry weight, so it's easy to use. But I can't, because when one is active, the other can't AOB scan for the instruction. Any help would be appreciated.



kfQuestionMoneyCarry2.png
 Description:
 Filesize:  936.89 KB
 Viewed:  1197 Time(s)

kfQuestionMoneyCarry2.png



_________________
I don't post too much. yet.
Back to top
View user's profile Send private message Send e-mail
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Sun Apr 11, 2021 10:46 am    Post subject: Reply with quote

From what I've seen most people solve this by combining the two scripts into one and toggling each with a flag.
Code:
aobscan(...)
alloc(newmem,2048)
label(cheat1)
label(cheat2)
registersymbol(cheat1)
registersymbol(cheat2)

newmem:
  mov ecx,[cheat1]
  test ecx,ecx
  je skipC1
  // code to do the first script
skipC1:
  mov ecx,[cheat2]
  test ecx,ecx
  je skipC2
  // code do do the second script
skipC2:
  // original code
  jmp return

  align 4 CC
// 0 = false, nonzero = true
cheat1:
  dd 0
cheat2:
  dd 0

...
[DISABLE]
unregistersymbol(cheat1)
unregistersymbol(cheat2)

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
sandsmaster
Newbie cheater
Reputation: 1

Joined: 21 Jan 2021
Posts: 24

PostPosted: Mon Apr 12, 2021 9:07 am    Post subject: Reply with quote

I really had no idea how to set both of them in the same time and still handle the rest of the values. Thanks a lot.
_________________
I don't post too much. yet.
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 -> 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