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 


Newbie - help with a script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
MechanicumAC30
How do I cheat?
Reputation: 0

Joined: 29 Jul 2018
Posts: 2

PostPosted: Sun Jul 29, 2018 12:15 pm    Post subject: Newbie - help with a script Reply with quote

Greetings

Could someone help me with one idea ?

I have found address that i need to modify but there is some encryption or something that im not sure what exactly it is but value on that address is always (256 * 256 *256 *256) + "what I actualy want here" so if i want to have for example 100Hps i need to write 4294967296 + 100 there

I have this address in my cheat entries in table but I wanted to ask if there would be some option to make some script ? or something for having only cheat entry where i could write 100 and it would write 4294967296 + 100 as i mention before in example
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sun Jul 29, 2018 12:36 pm    Post subject: Reply with quote

I would check to see how the game accesses the address to see if it's a small value size. But "256 * 256 * 256 * 256" = "0x100000000", so set the address to "show as signed" it may always be negative.

But you can use "registerCustomTypeLua" to calculate the value when read or written to.
Here is an example for one where: stored value / 2 = display value
Code:
local TypeName = 'Int / 2'
local ByteCount = 4
local IsFloat = false

local function bytesToValue( ... )
   local bytes = { ... }
   return (byteTableToDword({ bytes[1], bytes[2], bytes[3], bytes[4] }) / 2)
end
local function valueToBytes(value)
   local bytes = dwordToByteTable(value * 2)
   return bytes[1], bytes[2], bytes[3], bytes[4]
end

registerCustomTypeLua(TypeName, ByteCount, bytesToValue, valueToBytes, IsFloat)

_________________
Back to top
View user's profile Send private message Visit poster's website
MechanicumAC30
How do I cheat?
Reputation: 0

Joined: 29 Jul 2018
Posts: 2

PostPosted: Sun Jul 29, 2018 1:10 pm    Post subject: Reply with quote

Thanks for tip it was my mistake on that side value was indeed int not long I was confused since its 64bit app and all values are long with few exceptions and this was one of them thx again
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 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