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 


Scan and replace very long AOB
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
usernotfound
Expert Cheater
Reputation: 0

Joined: 21 Feb 2016
Posts: 115

PostPosted: Thu Mar 09, 2017 12:36 am    Post subject: Reply with quote

Demadom wrote:
I cant get any of the above coeds to work. I keeps giveing me an error.
The error is
[string "[ENABLE]
....."]:1: unexpected symbol near '['
Never ran across this so wtf does it mean?


If you're trying to use AA in a Lua script then use autoAssemble, otherwise just add it like you would any other AA script
Back to top
View user's profile Send private message
Demadom
How do I cheat?
Reputation: 0

Joined: 15 Nov 2014
Posts: 8

PostPosted: Thu Mar 09, 2017 1:04 am    Post subject: Reply with quote

ok I dont understand. I have been using CC for a very long time. I just download what people post and use it and give tips for bug fixes when I can. But I have had an accident and my mind does not work as before. SO im stuck with only being able to download and use the great things that people do here. Im not able to do the coding anymore. Plz help a brother out and make a download plz. I cant even rember how to inject addresses manuly. And that pisses me off.
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Fri Mar 10, 2017 6:32 am    Post subject: Reply with quote

This code :

Code:
[ENABLE]
{$lua}
local pattern = "48 83 EC 28 E8 ?? ?? ?? ?? 48 83 C4 28 EB"
local replace = "?? ?? ?? ?? 90 90 90 90 90 ?? ?? ?? ?? ??"
aob_scan_results = AOBScan(pattern)
aob_backup_bytes = {}
local length = (#replace + 1) / 3
for i = 0, aob_scan_results.Count - 1 do
  local backup = readBytes(aob_scan_results[i], length, true)
  local bytes = {}
  for hex in string.gmatch(replace, "%S+") do
    local size = #bytes + 1
    if hex == "??" then
      bytes[size] = backup[size]
    else
      bytes[size] = tonumber(hex, 16)
    end
  end
  aob_backup_bytes[i] = backup
  writeBytes(aob_scan_results[i], bytes)
end
{$asm}
[DISABLE]
{$lua}
for i = 0, aob_scan_results.Count - 1 do
  writeBytes(aob_scan_results[i], aob_backup_bytes[i])
end
aob_scan_results.Destroy()
aob_scan_results = nil
aob_backup_bytes = nil


Delete this part :
Code:

[ENABLE]
{$lua}
..
..
..
{$asm}
[DISABLE]
{$lua}



if you writing (or copy) to Cheat Table Lua Script
But, you will not able to assign to current cheat table and no guarantee it will work via lua engine
Back to top
View user's profile Send private message
Demadom
How do I cheat?
Reputation: 0

Joined: 15 Nov 2014
Posts: 8

PostPosted: Sun Mar 12, 2017 10:20 pm    Post subject: Reply with quote

No does not work in lula for me. How would I create my own table to add this code in?
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Mon Mar 13, 2017 2:15 am    Post subject: Reply with quote

post your lua script here and let peoples see and understand what you are trying to do. Peoples will help you more easy then..
Back to top
View user's profile Send private message
Demadom
How do I cheat?
Reputation: 0

Joined: 15 Nov 2014
Posts: 8

PostPosted: Tue Mar 14, 2017 3:33 am    Post subject: Reply with quote

I got it, Someone kindly sent me a download and it works great. Now if i can get 8ball to stop lagging all the time Id be set!
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
Goto page Previous  1, 2
Page 2 of 2

 
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