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 convert 0x494 to '94 04 00 00'

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Y.A.K.E
Advanced Cheater
Reputation: 0

Joined: 15 Jul 2019
Posts: 51

PostPosted: Tue Apr 19, 2022 11:14 am    Post subject: How to convert 0x494 to '94 04 00 00' Reply with quote

Code:

local offset= getAddressSafe('Player.runAcceleration')
--offset = 0x494


local aob_str = [[D8 88 ]] .. '94 04 00 00' .. [[ D9 98 ]] .. '94 04 00 00'



Terraria.Player::Update+578B: D8 88 94 04 00 00 - fmul dword ptr [eax+00000494]
Terraria.Player::Update+5791: D9 98 94 04 00 00 - fstp dword ptr [eax+00000494]



20220420011225.jpg
 Description:
struct
 Filesize:  29.63 KB
 Viewed:  1216 Time(s)

20220420011225.jpg


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Tue Apr 19, 2022 11:49 am    Post subject: Reply with quote

Search for "little endian"
example:
Code:
local array = dwordToByteTable(0x494)

for i,v in ipairs(array) do
  print(('%d: %02X'):format(i,v))
end

--[[ output:
1: 94
2: 04
3: 00
4: 00
]]

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Y.A.K.E
Advanced Cheater
Reputation: 0

Joined: 15 Jul 2019
Posts: 51

PostPosted: Wed Apr 20, 2022 2:15 am    Post subject: Reply with quote

ParkourPenguin wrote:
Search for "little endian"
example:
Code:
local array = dwordToByteTable(0x494)

for i,v in ipairs(array) do
  print(('%d: %02X'):format(i,v))
end

--[[ output:
1: 94
2: 04
3: 00
4: 00
]]


thanks
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