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 


Trainer autoscan

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

Joined: 16 Sep 2014
Posts: 7

PostPosted: Wed Sep 17, 2014 12:13 am    Post subject: Trainer autoscan Reply with quote

I have went form topic to the lua function list and found nothing that I need.

I do not want a link that sends me to a topic.

I want an auto scan set to Double, between values 60, and 60. Truncated preferred.

I want the values to be changed into the number in the text box.

Before changing the values, it does ANOTHER scan to double check that there all STILL 60. Then changes.
My first topic post.



1pic.png
 Description:
auto scan settings
 Filesize:  8.13 KB
 Viewed:  10630 Time(s)

1pic.png



display.CT
 Description:

Download
 Filename:  display.CT
 Filesize:  1.42 KB
 Downloaded:  627 Time(s)

Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Sep 18, 2014 5:10 am    Post subject: Reply with quote

this function does what you want:
Code:

function FindAndReplaceDouble(find, replace)
  ms=createMemScan()
  ms.firstScan(soValueBetween, vtDouble, rtTruncated, find,find,0,0xffffffffffffffff,'+W*X-C', fsmAligned,'4', false, false, false, false)
  fl=createFoundList(ms)
  ms.waitTillDone()
  fl.initialize()
  if fl.Count>0 then
    local i
    for i=0,fl.Count-1 do
      if readDouble(fl.Address[i])==find then
        writeDouble(fl.Address[i],replace)
      end
    end
  end

  fl.destroy()
  ms.destroy()
end


you can then call it with
FindAndReplaceDouble(60, 100)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
alphanote
How do I cheat?
Reputation: 0

Joined: 16 Sep 2014
Posts: 7

PostPosted: Thu Sep 18, 2014 7:49 am    Post subject: Ty! Reply with quote

Ty!!
Back to top
View user's profile Send private message
ErcHimA
Newbie cheater
Reputation: 0

Joined: 07 Oct 2013
Posts: 18
Location: In Your Heart :P

PostPosted: Wed Oct 08, 2014 11:07 am    Post subject: Reply with quote

Dark Byte wrote:
this function does what you want:
Code:

function FindAndReplaceDouble(find, replace)
  ms=createMemScan()
  ms.firstScan(soValueBetween, vtDouble, rtTruncated, find,find,0,0xffffffffffffffff,'+W*X-C', fsmAligned,'4', false, false, false, false)
  fl=createFoundList(ms)
  ms.waitTillDone()
  fl.initialize()
  if fl.Count>0 then
    local i
    for i=0,fl.Count-1 do
      if readDouble(fl.Address[i])==find then
        writeDouble(fl.Address[i],replace)
      end
    end
  end

  fl.destroy()
  ms.destroy()
end


you can then call it with
FindAndReplaceDouble(60, 100)

working for 4bytes, text and Array of Bytes?
Back to top
View user's profile Send private message
alphanote
How do I cheat?
Reputation: 0

Joined: 16 Sep 2014
Posts: 7

PostPosted: Wed Oct 08, 2014 2:51 pm    Post subject: Reply with quote

yes
Back to top
View user's profile Send private message
ErcHimA
Newbie cheater
Reputation: 0

Joined: 07 Oct 2013
Posts: 18
Location: In Your Heart :P

PostPosted: Thu Oct 09, 2014 5:09 am    Post subject: Reply with quote

thank you very much
how to make for 4bytes? text or other
Back to top
View user's profile Send private message
alphanote
How do I cheat?
Reputation: 0

Joined: 16 Sep 2014
Posts: 7

PostPosted: Thu Oct 09, 2014 6:53 am    Post subject: Reply with quote

idk sorry.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Oct 09, 2014 7:49 am    Post subject: Reply with quote

Change the vartype, and possibly alignment and change/ditch the second check
For aob you may wish to set the hexadecimal flag to true

Read main.lua for the parameter layout of memscan

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
alphanote
How do I cheat?
Reputation: 0

Joined: 16 Sep 2014
Posts: 7

PostPosted: Thu Oct 09, 2014 9:32 am    Post subject: Reply with quote

okay...
I might need the actual code tho.
Back to top
View user's profile Send private message
ErcHimA
Newbie cheater
Reputation: 0

Joined: 07 Oct 2013
Posts: 18
Location: In Your Heart :P

PostPosted: Thu Oct 09, 2014 12:12 pm    Post subject: Reply with quote

for Array of bytes
like this?
Code:
function FindAndReplaceAoB(AA BB CC DD, DD EE FF)
  ms=createMemScan()
  ms.firstScan(soValueBetween, vtaob, rtTruncated, find,find,0,0xffffffffffffffff,'+W*X-C', fsmAligned,'4', false, false, false, false)
  fl=createFoundList(ms)
  ms.waitTillDone()
  fl.initialize()
  if fl.Count>0 then
    local i
    for i=0,fl.Count-1 do
      if readtAoB(fl.Address[i])==find then
        writeAoB(fl.Address[i],replace)
      end
    end
  end

  fl.destroy()
  ms.destroy()
end
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