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 


AOBScan with variable like registersymbol?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 475

Joined: 09 May 2003
Posts: 25974
Location: The netherlands

PostPosted: Thu Nov 01, 2012 2:30 pm    Post subject: Reply with quote

as yes, you're using readBytes
Try something like this for the rest as well
Code:

local KW1,KW2,KW3,KW4 = readBytes(getAddress("pKW"),4)


and then append those bytes 1 by one as well

Also, you need to convert those integers to hexadecimal strings

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
sir-gunny
Advanced Cheater
Reputation: 0

Joined: 15 Mar 2012
Posts: 84

PostPosted: Thu Nov 01, 2012 3:44 pm    Post subject: Reply with quote

Hi DarkByte

This function works:

Code:
function FindMarines()

local KW1,KW2,KW3,KW4 = readBytes(getAddress("pKW"),04)
local SKW = string.format("%02X %02X %02X %02X",KW1,KW2,KW3,KW4)
local IW1,IW2,IW3,IW4 = readBytes(getAddress("pIW"),4)
local SIW = string.format("%02X %02X %02X %02X",IW1,IW2,IW3,IW4)
local MW1,MW2,MW3,MW4 = readBytes(getAddress("pMW"),4)
local SMW = string.format("%02X %02X %02X %02X",MW1,MW2,MW3,MW4)
local HW1,HW2,HW3,HW4 = readBytes(getAddress("pHW"),4)
local SHW = string.format("%02X %02X %02X %02X",HW1,HW2,HW3,HW4)

local MarinesString = "01 00 00 00 00 01 "..SMW.." 01 "..SHW.." 01 "..SIW.." 01 "..SKW.." 01 00 00 00 00"

if (autoAssemble([[
  label(aobMarine)
  registersymbol(aobMarine)
  AOBScan(_aobMarine, ]]..MarinesString..[[ )
  _aobMarine:
  aobMarine:
]])) == false then
    print("Failure assembling this script. AOB scanned was "..MarinesString)
  end
end


But why does read "readBytes()" an int value???
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

Joined: 09 May 2003
Posts: 25974
Location: The netherlands

PostPosted: Thu Nov 01, 2012 4:20 pm    Post subject: Reply with quote

Because a byte is a 8 bit unsigned integer. Not a string
_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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