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 


(NEED HELP) automatically activate options upon open

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

Joined: 01 Aug 2014
Posts: 5

PostPosted: Tue Jun 26, 2018 3:55 am    Post subject: (NEED HELP) automatically activate options upon open Reply with quote

Hi Pals,

Please see if you can help me with this, here's my case, I have a cheat table, which has about 100 options in it, I need, for example, half of them to be automatically activated once I open it, otherwise, it costs me minutes to do it manually every time I start cheat engine.

Hope I express myself clearly, please kindly provide some simple tutorial if you have the answer to my question, thanks a lot!!
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Tue Jun 26, 2018 7:54 am    Post subject: Reply with quote

if they're not all nested under different things then simply put the ones you want activated all together and click the first then scroll down and shift+click the last and press space.

If that's not reasonable then afaik you'll have to fall back to lua, you can create a new AA script and put something like this in it

Code:
{$lua}
local memrecsToActivate = {
  'name of an option',
  'another name of an option',
  ' ... ',
}
[ENABLE]
for _, name in ipairs(memrecsToActivate) do
  AddressList.getMemoryRecordByDecription(name).Active = true
end

[DISABLE]
for _, name in ipairs(memrecsToActivate) do
  AddressList.getMemoryRecordByDecription(name).Active = false
end


Of course with a bit of knowledge and thinking you could do something a bit different like renaming the ones you want to activate at launch with something like ** in front then check each to see if they have a ** and if so activate them eg. (note the disable section also does a bit more in the case that the game has been closed since the disable section of a script may not be running when the game has closed and therefore it calls disableWithoutExecute)
Code:
{$lua}
-- simplified regex like pattern matching see https://www.lua.org/pil/20.2.html
local activatePattern = '^%*%* ' -- starts with ** and a space
[ENABLE]
for i=0, AddressList.Count-1 do
  if AddressList[i].Description:match(activatePattern) then
    AddressList[i].Active = true
  end
end

[DISABLE]
if readInteger(process) ~= nil then -- if game is still running
  for i=0, AddressList.Count-1 do
    if AddressList[i].Description:match(activatePattern) then
      AddressList[i].Active = false
    end
  end
else
  for i=0, AddressList.Count-1 do
    if AddressList[i].Description:match(activatePattern) then
      AddressList[i].disableWithoutExecute()
    end
  end
end
This allows you (or someone else) to change which get activated without editing code, simply changing the name and saving.
_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
chunjin
How do I cheat?
Reputation: 0

Joined: 01 Aug 2014
Posts: 5

PostPosted: Wed Jun 27, 2018 7:35 am    Post subject: Reply with quote

Thanks buddy, it's really detailed, and I need take some time to study......
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