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]Scripting help with stopping an adress offset or value

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

Joined: 31 Mar 2019
Posts: 14

PostPosted: Thu Jul 11, 2019 3:47 pm    Post subject: [Help]Scripting help with stopping an adress offset or value Reply with quote

I don't know if there is a way to make a script to stop an adress value or freeze it when another adress value reach certain value, any hint will help me out!
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Fri Jul 12, 2019 4:45 pm    Post subject: Reply with quote

Code:
cmp [otheraddres], certain_value
je skipstuff
// otherwise do stuff to change address's value here
skipstuff:
// ... other stuff after possibly changing it


obviously with asm the exact code depends on the existing exact code used by the game and addresses etc.

With lua you could do something like
Code:

{$lua}
if syntaxcheck then return end -- don't run code when editing/saving
[ENABLE]
local control = AddressList.getMemoryRecordByDescription("Controlling record")
local trigger_value = 'the value' -- as a string
local controlled = AddressList.getMemoryRecordByDescription("Controlled")

control_timer = createTimer()
control_timer.Interval = 10
control_timer.OnTimer = function()
  -- (un)freeze based on control
  controlled.Active = control.Value == trigger_value
end
[DISABLE]
control_timer.destroy()

_________________
https://github.com/FreeER/ has a few CE related repos
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