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 write 3 bytes values?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 202

PostPosted: Thu May 17, 2018 3:02 am    Post subject: How to write 3 bytes values? Reply with quote

How to write 3 bytes values? I want to type 3 byte value in the edit box and push Enter button, and after that 3 byte value,will be written to 3-byte address. How to do this? CE version 6.5.

Last edited by Razi on Thu May 17, 2018 3:28 am; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu May 17, 2018 3:09 am    Post subject: Reply with quote

Code:

local temptable=dwordToByteTable(1122867)
table.remove(temptable,4)
writeBytes(address,temptable)


No idea if it works on 6.5, we don't give any support on that version anymore

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 202

PostPosted: Thu May 17, 2018 7:14 am    Post subject: Reply with quote

Thank you very much, it works on 6.5 version. I thought next code can help,
Code:
bAnd(0xFFFFFF, writeInteger('00A3F45F',0x020202))

but it writes 0x00 to fourth byte. Are there any other methods to write 3 byte value? It's just interesting to know all the existing methods.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu May 17, 2018 9:43 am    Post subject: Reply with quote

something like
writeInteger(address, bOr(bAnd(readInteger(address),0xff000000), 0x020202)

---

or what also works for 6.6+
writeInteger(address, (readInteger(address) & 0xff000000) | 0x202020)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

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 -> 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