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 


How to change Aob with 3 different codes?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
hondafrik
Advanced Cheater
Reputation: 0

Joined: 15 Jan 2014
Posts: 60
Location: Croatia

PostPosted: Tue May 05, 2015 9:49 am    Post subject: How to change Aob with 3 different codes? Reply with quote

How title say how to change AoB with 3 different codes?
For example i have
Code:
00 30 00 40 50 8b 75 98

and want change to
Code:
00 30 00 1c 50 8b 75 98
then to
Code:
00 30 00 1f 50 8b 75 98
then back to original
Code:
00 30 00 40 50 8b 75 98
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Tue May 05, 2015 11:18 am    Post subject: Reply with quote

Script 1: Activate to register AOB. Deactivate to revert to original code.
Code:
[ENABLE]
aobscan(myaob,00 30 00 40 50 8b 75 98)
registersymbol(myaob)
[DISABLE]
myaob:
db 00 30 00 40 50 8b 75 98
unregistersymbol(myaob)


Script 2: Activate to change to first value. Deactivate to change to second value.
Code:
[ENABLE]
myaob:
db 00 30 00 1c 50 8b 75 98
[DISABLE]
myaob:
db 00 30 00 1f 50 8b 75 98


edit: Oh, just realized this was in Lua forum:
Code:
[ENABLE]
{$lua}
if myaob == nil then
  local aob = AOBScan("00 30 00 40 50 8b 75 98")
  myaob = getAddress(aob[0])
  aob.Destroy()
  aob = nil
  myaobs = {
    { 0x00, 0x30, 0x00, 0x1c, 0x50, 0x8b, 0x75, 0x98 },
    { 0x00, 0x30, 0x00, 0x1f, 0x50, 0x8b, 0x75, 0x98 },
    { 0x00, 0x30, 0x00, 0x40, 0x50, 0x8b, 0x75, 0x98 }
  }
  myaobi = 1
end
writeBytes(myaob, unpack(myaobs[myaobi]))
myaobi = myaobi + 1
if myaobi > #myaobs then
  myaobi = 1
end
[DISABLE]
{$lua}
writeBytes(myaob, unpack(myaobs[myaobi]))
myaobi = myaobi + 1
if myaobi > #myaobs then
  myaobi = 1
end
Back to top
View user's profile Send private message
hondafrik
Advanced Cheater
Reputation: 0

Joined: 15 Jan 2014
Posts: 60
Location: Croatia

PostPosted: Tue May 05, 2015 12:12 pm    Post subject: Reply with quote

this not working my friend because script 1 change one Aob and script 2 second Aob,and last script change only first result only once,need something like this:
scan
Code:
00 30 00 40 50 8b 75 98
change value into
Code:
00 30 00 1c 50 8b 75 98
then change same again into
Code:
00 30 00 1f 50 8b 75 98
and for last time back to original
Code:
00 30 00 40 50 8b 75 98
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Sat May 09, 2015 12:13 am    Post subject: Reply with quote

maybe this should have. Not clear your mentioning .

I try understand and i get like this :
scan : 00 30 00 40 50 8b 75 98 will 3 results, then :
1st result change to : 00 30 00 1c 50 8b 75 98
2nd result change to : 00 30 00 1f 50 8b 75 98
and then back all code to original AOB : 00 30 00 40 50 8b 75 98

or

scan : 00 30 00 40 50 8b 75 98 will 3 results, then :
results change to : 00 30 00 1c 50 8b 75 98
and then this results change to 00 30 00 1f 50 8b 75 98
and then back to original AOB : 00 30 00 40 50 8b 75 98
only for code 00 30 00 1f 50 8b 75 98

little confuse here ???

and for first case above, maybe could help :

script 1 :
Code:

[ENABLE]
aobscan(myaob,00 30 00 40 50 8b 75 98)
registersymbol(myaob)
[DISABLE]
myaob:
db 00 30 00 1c 50 8b 75 98
unregistersymbol(myaob)


script 2 :
Code:

[ENABLE]
myaob:
db 00 30 00 40 50 8b 75 98
[DISABLE]
myaob:
db 00 30 00 1f 50 8b 75 98


script 3 :
Code:

resultList = AOBScan("00 30 00 1c 50 8b 75 98", "+W*X-C")
 if (resultList) then
   lngt = resultList.getCount()
   for x=0, lngt-1, 1 do
      writeBytes(resultList[x], 0x00, 0x30, 0x00, 0x40, 0x50, 0x8b, 0x75, 0x98)
  end
resultList.Destroy()
resultList = nil


script 4 :
Code:

resultList = AOBScan("00 30 00 1f 50 8b 75 98", "+W*X-C")
 if (resultList) then
   lngt = resultList.getCount()
   for x=0, lngt-1, 1 do
      writeBytes(resultList[x], 0x00, 0x30, 0x00, 0x40, 0x50, 0x8b, 0x75, 0x98)
  end
resultList.Destroy()
resultList = nil
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