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 


hi there im a new user
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
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1247

PostPosted: Sun Oct 02, 2022 11:38 am    Post subject: Reply with quote

This is possible by first searching and getting the correct address (with a Unique AOB code or Address).

What we need is to generate a unique Aob code with the numbers in it (There must be two codes to copy and paste) and specify the range to be copied and pasted and repeat it with a timer

Do you have your Aob codes ready with the numbers of "Special_" and "_aim"? And mark in which range the numbers we need are in.

_________________
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
friedeggs912
Cheater
Reputation: 0

Joined: 25 Sep 2022
Posts: 25

PostPosted: Sun Oct 02, 2022 2:05 pm    Post subject: Reply with quote

AylinCE wrote:
This is possible by first searching and getting the correct address (with a Unique AOB code or Address).

What we need is to generate a unique Aob code with the numbers in it (There must be two codes to copy and paste) and specify the range to be copied and pasted and repeat it with a timer

Do you have your Aob codes ready with the numbers of "Special_" and "_aim"? And mark in which range the numbers we need are in.


Thanks AylinCE for Replying
actually yes i have both AOB and Code injections for both Special_ and Aim_ and they are unique so far and the values are working in 4 bytes

and will post the code injection too of how i named it ..i watched a video on youtube for that

Another question ... so is it possible to be done with a code injection script too like Lua ? i donno if the question is Right or wrong ;p



Aim_ Code inj.PNG
 Description:
in Code injection too i defined _aim
 Filesize:  24.93 KB
 Viewed:  1629 Time(s)

Aim_ Code inj.PNG



_special Code inj.PNG
 Description:
in Code injection too i defined _special
 Filesize:  25.14 KB
 Viewed:  1629 Time(s)

_special Code inj.PNG



Aim_.PNG
 Description:
i have this Unique too with ?? and stuff
im just demonstraing where the change happends
and maybe u get the size ? im a beginner so i dont get the size thing
 Filesize:  16.3 KB
 Viewed:  1630 Time(s)

Aim_.PNG



_Special AOB.PNG
 Description:
so here is _Special Aob (i have it unique with ?? and stuff) so a copy from here and paste it where Aim_ at
 Filesize:  16.09 KB
 Viewed:  1630 Time(s)

_Special AOB.PNG


Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1247

PostPosted: Mon Oct 03, 2022 11:40 am    Post subject: Reply with quote

I have no chance to try the code.
Take the code shown in the picture with wildcards and put the code to be copied into "aob2" and the code to be changed into "aob1".

The 3 bytes you marked in the code (I got 4 bytes) are followed by the 64th byte. This string and hex are set to "40". It will take that memory range and paste it into other code.
EDIT: 128 byte = 80 hex

The loop was set to 1 second. (Edit the interval to 500 for half a second and 5000 for 5 seconds.)
Again it starts and stops with "F8".

Note: If the addresses crash in the game or the page is refreshed; Run the script again to start the loop over. (chk must be=1)

Code:
--_aim
local aob1 = "E8 03 00 00" --Put here the unique code that will change.
--spesial_
local aob2 = "E8 03 00 00" --Put here the unique code to be copied.
local findAddr = {}
local chk = 1
local Addr1 = ""
local Addr2 = ""

if repTim then repTim.Destroy() repTim=nil end
repTim = createTimer() repTim.Interval=1000
repTim.Enabled=false

function MyAob(code,byt)
repTim.Enabled=false
local res = ""
result=AOBScan(code, '+W*X-C')
  if result~=nil then
    res = result[0] .. "+" .. byt
  else
   print("Code " .. chk .. " not found! The cycle has been stopped!")
   chk = 3
  end
result.Destroy()
chk = tonumber(chk) + 1
repTim.Enabled=true
 return res
end

repTim.OnTimer=function()
  if chk==1 then
   Addr1 = MyAob(aob1,"40") -- 40 = 64 bytes (format hex: print(string.format("%02X",64)) --> 40 or 128 = 80)
  end
  if chk==2 then
   Addr2 = MyAob(aob2,"40")
  end
  if chk==3 then
   fnd = readInteger(Addr2)
   writeInteger(Addr1,fnd)
  end
  if chk==4 then
   print("Cycle stoped!")
   repTim.Enabled=false
  end
end

function start()
sleep(300)
  if repTim.Enabled==false then
   repTim.Enabled=true
  else
   repTim.Enabled=false
  end
end
if pKey then pKey.Destroy() pKey = nil end

pKey = createHotkey(start, VK_F8)

_________________
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


Last edited by AylinCE on Wed Oct 05, 2022 6:43 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
friedeggs912
Cheater
Reputation: 0

Joined: 25 Sep 2022
Posts: 25

PostPosted: Mon Oct 03, 2022 12:12 pm    Post subject: Reply with quote

AylinCE wrote:
I have no chance to try the code.
Take the code shown in the picture with wildcards and put the code to be copied into "aob2" and the code to be changed into "aob1".

The 3 bytes you marked in the code (I got 4 bytes) are followed by the 64th byte. This string and hex are set to "40". It will take that memory range and paste it into other code.

The loop was set to 1 second. (Edit the interval to 500 for half a second and 5000 for 5 seconds.)
Again it starts and stops with "F8".

Note: If the addresses crash in the game or the page is refreshed; Run the script again to start the loop over. (chk must be=1)

Code:
--_aim
local aob1 = "E8 03 00 00" --Put here the unique code that will change.
--spesial_
local aob2 = "E8 03 00 00" --Put here the unique code to be copied.
local findAddr = {}
local chk = 1
local Addr1 = ""
local Addr2 = ""

if repTim then repTim.Destroy() repTim=nil end
repTim = createTimer() repTim.Interval=1000
repTim.Enabled=false

function MyAob(code,byt)
repTim.Enabled=false
local res = ""
result=AOBScan(code, '+W*X-C')
  if result~=nil then
    res = result[0] .. "+" .. byt
  else
   print("Code " .. chk .. " not found! The cycle has been stopped!")
   chk = 3
  end
result.Destroy()
chk = tonumber(chk) + 1
repTim.Enabled=true
 return res
end

repTim.OnTimer=function()
  if chk==1 then
   Addr1 = MyAob(aob1,"40") -- 40 = 64 bytes
  end
  if chk==2 then
   Addr2 = MyAob(aob2,"40")
  end
  if chk==3 then
   fnd = readInteger(Addr2)
   writeInteger(Addr1,fnd)
  end
  if chk==4 then
   print("Cycle stoped!")
   repTim.Enabled=false
  end
end

function start()
sleep(300)
  if repTim.Enabled==false
   repTim.Enabled=true
  else
   repTim.Enabled=false
  end
end
if pKey then pKey.Destroy() pKey = nil end

pKey = createHotkey(start, VK_F8)





wow thank you so much i will try it and get back to you
Many Thanks

ok now i tried it and ther is an error i cant fix myself ;s

i tried and removed this line with the hotkey


function start()
sleep(300)
if repTim.Enabled==false
repTim.Enabled=true
else
repTim.Enabled=false
end
end
if pKey then pKey.Destroy() pKey = nil end

pKey = createHotkey(start, VK_F8)

and excuted the lua and it ddnt do anything



2.PNG
 Description:
 Filesize:  32.81 KB
 Viewed:  1571 Time(s)

2.PNG



1.PNG
 Description:
 Filesize:  18.89 KB
 Viewed:  1573 Time(s)

1.PNG


Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1247

PostPosted: Mon Oct 03, 2022 1:06 pm    Post subject: Reply with quote

Sorry it's my fault.

Change this function in code.

Searching for "then" in it.


Code:
function start()
sleep(300)
if repTim.Enabled==false then
repTim.Enabled=true
else
repTim.Enabled=false
end
end

_________________
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
friedeggs912
Cheater
Reputation: 0

Joined: 25 Sep 2022
Posts: 25

PostPosted: Mon Oct 03, 2022 1:12 pm    Post subject: Reply with quote

AylinCE wrote:
Sorry it's my fault.

Change this function in code.

Searching for "then" in it.


Code:
function start()
sleep(300)
if repTim.Enabled==false then
repTim.Enabled=true
else
repTim.Enabled=false
end
end



ok thanks
Changed it and i clicked on Execute but nothing happen , the code didn't copy from _special to _aim

I just copied the Unique Aobs(WildCards) where the Lables you set :S
is there something I did wrong ?
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1247

PostPosted: Mon Oct 03, 2022 1:58 pm    Post subject: Reply with quote

Try this code and test if it prints the correct results (where marked) from your existing aob code.

Also look at the integer value of the marked place of your code in CE.

Code:
--_aim
local aob1 = "E8 03 00 00" --Put here the unique code that will change.
--spesial_
local aob2 = "E8 03 00 00" --Put here the unique code to be copied.

fmtAobs = function(s) s1 = (string.format("%08x",s):reverse():gsub("(.)(.)","%2%1 ")) return (s1):upper() end

function MyAob(code,byt)
local res = ""
result=AOBScan(code, '+W*X-C')
  if result~=nil then
    aa = result[0] .. "+" .. byt
    res = "Aobs: " .. fmtAobs(aa) .. " --  İnteger: " ..  readInteger(aa)
  else
   print("Code not found!")
  end
result.Destroy()
 return res
end

aa1 = MyAob(aob1,"40") -- aob1 and aob2 test
print(aa1)

_________________
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
friedeggs912
Cheater
Reputation: 0

Joined: 25 Sep 2022
Posts: 25

PostPosted: Mon Oct 03, 2022 3:37 pm    Post subject: Reply with quote

AylinCE wrote:
Try this code and test if it prints the correct results (where marked) from your existing aob code.

Also look at the integer value of the marked place of your code in CE.

Code:
--_aim
local aob1 = "E8 03 00 00" --Put here the unique code that will change.
--spesial_
local aob2 = "E8 03 00 00" --Put here the unique code to be copied.

fmtAobs = function(s) s1 = (string.format("%08x",s):reverse():gsub("(.)(.)","%2%1 ")) return (s1):upper() end

function MyAob(code,byt)
local res = ""
result=AOBScan(code, '+W*X-C')
  if result~=nil then
    aa = result[0] .. "+" .. byt
    res = "Aobs: " .. fmtAobs(aa) .. " --  İnteger: " ..  readInteger(aa)
  else
   print("Code not found!")
  end
result.Destroy()
 return res
end

aa1 = MyAob(aob1,"40") -- aob1 and aob2 test
print(aa1)



Ok, thanks for replying

ok i pasted my Aobs and it came up with this



1.PNG
 Description:
ok i pasted my Aobs and it came up with this Error
 Filesize:  32.31 KB
 Viewed:  1528 Time(s)

1.PNG


Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1247

PostPosted: Mon Oct 03, 2022 3:48 pm    Post subject: Reply with quote

As I said; I don't have a chance to try code and I'm sorry to leave this task to you. Smile

Here is the corrected version.

Code:

--_aim
local aob1 = "E8 03 00 00" --Put here the unique code that will change.
--spesial_
local aob2 = "E8 03 00 00" --Put here the unique code to be copied.

local fmtAobs = function(s) s1 = (string.format("%08x",s):reverse():gsub("(.)(.)","%2%1 ")) return (s1):upper() end

function MyAob(code,byt)
local res = ""
result=AOBScan(code, '+W*X-C')
  if result~=nil then
    aa = result[0] .. "+" .. byt
    res = "Aobs: " .. fmtAobs(tonumber(readInteger(aa))) .. " --  İnteger: " ..  readInteger(aa)
  else
   print("Code not found!")
  end
result.Destroy()
 return res
end

aa1 = MyAob(aob1,"40") -- aob1 and aob2 test
print(aa1)

_________________
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
friedeggs912
Cheater
Reputation: 0

Joined: 25 Sep 2022
Posts: 25

PostPosted: Mon Oct 03, 2022 3:55 pm    Post subject: Reply with quote

AylinCE wrote:
As I said; I don't have a chance to try code and I'm sorry to leave this task to you. Smile

Here is the corrected version.

Code:

--_aim
local aob1 = "E8 03 00 00" --Put here the unique code that will change.
--spesial_
local aob2 = "E8 03 00 00" --Put here the unique code to be copied.

local fmtAobs = function(s) s1 = (string.format("%08x",s):reverse():gsub("(.)(.)","%2%1 ")) return (s1):upper() end

function MyAob(code,byt)
local res = ""
result=AOBScan(code, '+W*X-C')
  if result~=nil then
    aa = result[0] .. "+" .. byt
    res = "Aobs: " .. fmtAobs(tonumber(readInteger(aa))) .. " --  İnteger: " ..  readInteger(aa)
  else
   print("Code not found!")
  end
result.Destroy()
 return res
end

aa1 = MyAob(aob1,"40") -- aob1 and aob2 test
print(aa1)


im really sorry :S i must be pain in the Ass to you :p

im just asking for your help bec i dont know the codes .. :S please last step to make it work

i tried the last code and it reads the _aim which is 0 its correct
and reading aob 2 now
i know we are close to get it done

here is the screenshot



2 (2).PNG
 Description:
now i added few lines and its working now for aob2
 Filesize:  106.99 KB
 Viewed:  1521 Time(s)

2 (2).PNG


Back to top
View user's profile Send private message
friedeggs912
Cheater
Reputation: 0

Joined: 25 Sep 2022
Posts: 25

PostPosted: Tue Oct 04, 2022 12:52 am    Post subject: Reply with quote

woww now its working many thanks to youuuu
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