View previous topic :: View next topic |
Author |
Message |
MechanicumAC30 How do I cheat? Reputation: 0
Joined: 29 Jul 2018 Posts: 2
|
Posted: Sun Jul 29, 2018 12:15 pm Post subject: Newbie - help with a script |
|
|
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 |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Jul 29, 2018 12:36 pm Post subject: |
|
|
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 |
|
|
MechanicumAC30 How do I cheat? Reputation: 0
Joined: 29 Jul 2018 Posts: 2
|
Posted: Sun Jul 29, 2018 1:10 pm Post subject: |
|
|
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 |
|
|
|