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 


get AOB Address [ help ]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Sun Apr 08, 2018 4:50 am    Post subject: get AOB Address [ help ] Reply with quote

how to make when button is pressed
then it will aobscan and then do
UDF1.CEMemo.Lines.Add(getaobaddress)

thanks

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sun Apr 08, 2018 8:05 am    Post subject: Reply with quote

Code:
FormName.ButtonName.OnClicked = function()
  local res = AOBScan('...') --or AOBScan(0x..,...) -- (non-byte = wildcard)
  if res then
    for i=0,res.Count-1 do
      UDF1.CEMemo.Lines.Add(res[i])
    end
    res.destroy()
  end
end


might be OnClick instead of OnClicked, can't remember off the top of my head

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Sun Apr 08, 2018 8:07 am    Post subject: This post has 1 review(s) Reply with quote

Try this :

Code:
function getByteString(address, bytecount)
 local bytes = readBytes(address, bytecount, true)
 if bytes then
 local result = ""
 for i = 1, #bytes do
 if #result > 0 then result = result .. " " end
 result = result .. string.format("%02X", bytes[i]) end
 return result end
end

function aobResult(aobStr)
 res = AOBScan(aobStr)
 j = 0
 cnt = 1
 if (res~=nil) then
 print("Results found: "..res.Count)
 while j < res.Count do
 a = getByteString(res[j], 12)
 --print("Address "..cnt.." = "..res[j].." --> AOB :  "..a)
 UDF1.CEMemo1.append("Address "..cnt.." = "..res[j].." --> AOB :  "..a)
 j=j+1
 cnt = cnt+1
 end
 res.destroy()
 res=nil
 else
 print("No results found")
 end
end

function CEButton1Click(sender)
UDF1.CEMemo1.Clear()
UDF1.CEMemo1.ScrollBars='ssVertical'
aobResult("24 01 62 07")    --- example, put your AOB here
end

UDF1.Show()

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Tue Apr 10, 2018 7:11 am    Post subject: Reply with quote

Thxxxx Corroder and FreeEr
_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Fri Aug 02, 2019 10:36 am    Post subject: Reply with quote

Corroder wrote:
Try this :

Code:
function getByteString(address, bytecount)
 local bytes = readBytes(address, bytecount, true)
 if bytes then
 local result = ""
 for i = 1, #bytes do
 if #result > 0 then result = result .. " " end
 result = result .. string.format("%02X", bytes[i]) end
 return result end
end

function aobResult(aobStr)
 res = AOBScan(aobStr)
 j = 0
 cnt = 1
 if (res~=nil) then
 print("Results found: "..res.Count)
 while j < res.Count do
 a = getByteString(res[j], 12)
 --print("Address "..cnt.." = "..res[j].." --> AOB :  "..a)
 UDF1.CEMemo1.append("Address "..cnt.." = "..res[j].." --> AOB :  "..a)
 j=j+1
 cnt = cnt+1
 end
 res.destroy()
 res=nil
 else
 print("No results found")
 end
end

function CEButton1Click(sender)
UDF1.CEMemo1.Clear()
UDF1.CEMemo1.ScrollBars='ssVertical'
aobResult("24 01 62 07")    --- example, put your AOB here
end

UDF1.Show()



I've been looking for this code for a week.
It works great, thank you.
Arrow +1

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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