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 


Change values only per description name

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

Joined: 29 Aug 2017
Posts: 4

PostPosted: Tue Aug 29, 2017 4:19 am    Post subject: Change values only per description name Reply with quote

hello,
I found 5 addresses per pointer , They change automatically after each death in game . They are currently in float But I can if you have to change them into 4 bytes....
I named them respectively:
1: cool1
2: cool2
3: cool3
4: cool4
5: cool5 .... In description. ex:
active description adress type value
____ cool1 p->37458960 float 54
now , this value change when zoom in game to 50 or 35 (arm scope)
cool1 p->37458960 float 50 .."You will understand dont freeze this "
simple lua script when value 54 appear -------->120
50 '' -------->101 ect.....but by "description" ex : cool1 or cool2 or cool3....Knowing that the address moves after death . is possible ? do you can help me ?
thanks
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Tue Aug 29, 2017 8:54 am    Post subject: Reply with quote

um, maybe something like this?

Code:

{$lua}
[ENABLE]
cool_timer = createTimer()
-- copy interval from timer that freezes values
cool_timer.Interval = getFreezeTimer().Interval

local records = 5
-- no real pattern so using a table for arbitrarily value pairing
local values = {
  ['50'] = 101,
  ['54'] = 120
}

local get = getAddressList().getMemoryRecordByDescription

cool_timer.OnTimer = function(t)
  for i=1, records do
    local mr = get('cool'..i)
    if not mr then
      print(('cool%i could not be found'):format(i))
    else
      local val = values[mr.Value]
      if val then mr.Value = val end
    end
  end
end
[DISABLE]
cool_timer.destroy()
Back to top
View user's profile Send private message
prouha
How do I cheat?
Reputation: 0

Joined: 29 Aug 2017
Posts: 4

PostPosted: Tue Aug 29, 2017 5:41 pm    Post subject: Reply with quote

FreeER wrote:
um, maybe something like this?

Code:

{$lua}
[ENABLE]
cool_timer = createTimer()
-- copy interval from timer that freezes values
cool_timer.Interval = getFreezeTimer().Interval

local records = 5
-- no real pattern so using a table for arbitrarily value pairing
local values = {
  ['50'] = 101,
  ['54'] = 120
}

local get = getAddressList().getMemoryRecordByDescription

cool_timer.OnTimer = function(t)
  for i=1, records do
    local mr = get('cool'..i)
    if not mr then
      print(('cool%i could not be found'):format(i))
    else
      local val = values[mr.Value]
      if val then mr.Value = val end
    end
  end
end
[DISABLE]
cool_timer.destroy()


thanks is very perfect !
and if i want add more values ?....tried but not work!
add other script with other values is a same....
thanks you Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Tue Aug 29, 2017 5:52 pm    Post subject: Reply with quote

just copy+paste the line for 50 and change the numbers...Without knowing what you tried I can't tell you what you did wrong...

If you meant more 'cool' records then change the 'local records = 5' line, could rewrite it to look at all memory records for anything that starts with cool but.
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 Lua Scripting 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