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 


Changing few record's valueto constant numbers when I need

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

Joined: 07 Jul 2018
Posts: 12

PostPosted: Sat Jul 07, 2018 3:13 pm    Post subject: Changing few record's valueto constant numbers when I need Reply with quote

Hey there, I have a CE table, and there around 10 records with values, which depends of target I've choose, and I need to set record's values to a known values, to make few targets kinda same, if I'll froze the values, this will change any target I choise anytime, but I need kind of 'button' to change values when i want to. Is that hard to realize? And how can I?
- Excuse me for my poor english.
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sun Jul 08, 2018 2:12 pm    Post subject: Reply with quote

Code:
{$lua}
local names = {'record1', 'record2', ...}
local value = 'your_known_value'
[ENABLE]
for _, name in ipairs(names) do
  local mr = AddressList.getMemoryRecordByName(name)
  mr.Value = value
  mr.Active = true -- freeze
end
[DISABLE]
for _, name in ipairs(names) do
  local mr = AddressList.getMemoryRecordByName(name)
  mr.Active = false -- unfreeze
end


now you have a script that you can enable to set and freeze and disable to unfreeze.

To increase all their values by one you could use something like:

Code:
{$lua}
local names = {'record1', 'record2', ...}
[ENABLE]
for _, name in ipairs(names) do
  local mr = AddressList.getMemoryRecordByName(name)
  local value = tonumber(mr.Value)
  mr.Value = value+1
end

local t = createTimer()
t.Interval = 50 -- in 50 milliseconds
t.OnTimer = function(t)
  t.destroy() -- run once
  memrec.Active = false -- auto disable this script
end
[DISABLE]


You could also set a hotkey to enable it and each type you press the hotkey the values would increase by 1.

_________________
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 -> 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