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 


aob results with freeze not working

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

Joined: 12 Apr 2021
Posts: 7

PostPosted: Sun Jul 10, 2022 8:25 am    Post subject: aob results with freeze not working Reply with quote

hi all
i want to freeze all results . this code down here I Found in the fourms
it only writs but without freezing values

can some one help pleae . if its possible edit it for me

thanks in advance


[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
{$lua}
-- some lua code


resultList = AOBScan("4E 20 00 00 00 00 03 xx", "+W*X-C")
if (resultList) then
lngt = resultList.getCount()
for x=0, lngt-1, 1 do
writeBytes(resultList[x], 0x4E, 0x20,0x00, 0x00,0x00, 0x00,0x03, 0x05)
end
resultList.Destroy()
resultList = nil
end

[DISABLE]
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 32

Joined: 16 Feb 2017
Posts: 1253

PostPosted: Sun Jul 10, 2022 9:50 am    Post subject: Reply with quote

Dark Byte wrote:
Easiest is to just create a timer with an interval of 200 ms or less, (not too low) where you call writeBytes(thataddressinstringform, 00, 00)

Alternatively, add this address to the addresslist, and set the memrec to frozen


If this is delayed I can give the option to freeze all results by pushing them to the address list.

Code:
[ENABLE]

{$Lua}
if syntaxcheck then return end

local replace_table = {}
local aobTbl = {}

if frzTim1 then frzTim1.Destroy() frzTim1=nil end
frzTim1=createTimer() frzTim1.Interval=150 frzTim1.Enabled=false

frzTim1.OnTimer=function()
 for i,k in pairs(aobTbl) do
  address = tostring(k)
  writeBytes(address, replace_table);
 end
end

function FreezeAobs(from,to)

 for byte in string.gfind(to, "[^%s]+") do
   table.insert(replace_table, tonumber('0x'..byte))
 end

  local aob = AOBScan(from, "+W*X-C")
  cnt = aob.Count-1

  if (aob ~= nil) then
    for i=0,aob.Count-1 do aobTbl[i+1] = aob[i]
     if cnt==i then
      frzTim1.Enabled=true
      aob.Destroy()
     end
    end
    else
   showMessage("Code not found..")
  end
end

FreezeAobs("4E 20 00 00 00 00 03 ??","4E 20 00 00 00 00 03 05")

{$asm}

[DISABLE]

{$Lua}
frzTim1.Destroy()

_________________
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
darkhiyoo
How do I cheat?
Reputation: 0

Joined: 12 Apr 2021
Posts: 7

PostPosted: Sun Jul 10, 2022 12:42 pm    Post subject: Hi Reply with quote

its working very well



I have been trying to fix for days now

thank you so very much indeed
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