|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
SS 4K Newbie cheater Reputation: 0
Joined: 21 Feb 2019 Posts: 21
|
Posted: Sun Dec 12, 2021 3:29 pm Post subject: |
|
|
Dark Byte wrote: | replace writeFloat AND readFloat with the bigendian versions |
i appreciate you being patient with me
i replaced writeFloat AND readFloat with the big endian
now it gives error
Code: |
{$lua}
if syntaxcheck then return end
[ENABLE]
function writeBigEndianFloat(address, number)
local bt=floatToByteTable(number)
local newbt={}
for i=1,4 do
newbt[5-i]=bt[i]
end
writeBytes(address,bytetable,true)
end
function readBigEndianFloat(address)
local bbt=readBytes(address,4)
local newbt={}
for i=1,4 do
newbt[5-i]=bbt[i]
end
return byteTableToFloat(newbt)
end
DoneState = false
local addr = 0x2C7F7F244
local val = 1
local function timer_tick(timer)
writeBigEndianFloat(addr, val + readBigEndianFloat(addr))
-- writeFloat(addr, val + readFloat(addr))
if DoneState == true then
timer.destroy()
end
end
local someTimer = createTimer(MainForm)
someTimer.Interval = 500
someTimer.OnTimer = timer_tick
[DISABLE]
DoneState = true
|
Description: |
|
Filesize: |
19.54 KB |
Viewed: |
1038 Time(s) |
|
Description: |
|
Filesize: |
55.86 KB |
Viewed: |
1038 Time(s) |
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun Dec 12, 2021 3:30 pm Post subject: |
|
|
change readBytes(address,4) to readBytes(address,4, true)
_________________
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 |
|
|
SS 4K Newbie cheater Reputation: 0
Joined: 21 Feb 2019 Posts: 21
|
Posted: Sun Dec 12, 2021 3:38 pm Post subject: |
|
|
Dark Byte wrote: | change readBytes(address,4) to readBytes(address,4, true) |
timer works now but the value keeps writing 0
Code: |
{$lua}
if syntaxcheck then return end
[ENABLE]
function writeBigEndianFloat(address, number)
local bt=floatToByteTable(number)
local newbt={}
for i=1,4 do
newbt[5-i]=bt[i]
end
writeBytes(address,bytetable,true)
end
function readBigEndianFloat(address)
local bbt=readBytes(address,4, true)
local newbt={}
for i=1,4 do
newbt[5-i]=bbt[i]
end
return byteTableToFloat(newbt)
end
DoneState = false
local addr = 0x2C7F7F244
local val = 4
local function timer_tick(timer)
writeBigEndianFloat(addr, val + readBigEndianFloat(addr))
-- writeFloat(addr, val + readFloat(addr))
if DoneState == true then
timer.destroy()
end
end
local someTimer = createTimer(MainForm)
someTimer.Interval = 500
someTimer.OnTimer = timer_tick
[DISABLE]
DoneState = true
|
AylinCE wrote: | Code: | local addr = 0x2C7F7F244
local val = -1
local function timer_tick(timer)
local result = writeBigEndianFloat(addr, val + readBigEndianFloat(addr))
--print("res: ".. result)
-- writeFloat(addr, val + readFloat(addr))
if DoneState == true then
timer.destroy()
end
return result
end
local someTimer = createTimer(MainForm)
someTimer.Interval = 500
someTimer.OnTimer = timer_tick
|
|
AylinCE it doesn't write any value with yours script
also i tried to change readBytes(address,4) to readBytes(address,4, true)
Code: |
{$lua}
if syntaxcheck then return end
[ENABLE]
function writeBigEndianFloat(address, number, format)
local bt="" --floatToByteTable(number)
if format == true then
bt=floatToByteTable(number)
end
if format == false then
bt={floatToByteTable(number)}
end
local newbt={}
for i=1,4 do
if format == true then
newbt[5-i]=bt[i] end
if format == false then
newbt[i]=bt[i]
--print(bt[i])
end
end
return writeBytes(address, newbt)
end
function readBigEndianFloat(address,format)
local bbt={readBytes(address,4)}
--for i,k in ipairs(bbt) do
--print("bbt:"..k) end
local newbt1={}
if format == true then
for i=1,4 do
newbt1[5-i]=bbt[i]
end
end
if format == false then
for i=1,4 do
newbt1[i]=bbt[i]
end
end
return byteTableToFloat(newbt1)
end
print("wf-f: "..writeBigEndianFloat(0x1E2EDFE4C0, 1200, false))
print("rf-f: "..readBigEndianFloat(0x1E2EDFE4C0, false))
print("wf-t: "..writeBigEndianFloat(0x1E2EDFE4C0, 1200, true))
print("rf-t: "..readBigEndianFloat(0x1E2EDFE4C0, true))
DoneState = false
local addr = 0x2C7F7F244
local val = 1
local function timer_tick(timer)
local result = writeBigEndianFloat(addr, val + readBigEndianFloat(addr))
--print("res: ".. result)
-- writeFloat(addr, val + readFloat(addr))
if DoneState == true then
timer.destroy()
end
return result
end
local someTimer = createTimer(MainForm)
someTimer.Interval = 500
someTimer.OnTimer = timer_tick
[DISABLE]
DoneState = true
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Dec 13, 2021 4:59 am Post subject: |
|
|
it's writeBytes(address,newbt)
_________________
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 |
|
|
SS 4K Newbie cheater Reputation: 0
Joined: 21 Feb 2019 Posts: 21
|
Posted: Mon Dec 13, 2021 11:19 am Post subject: |
|
|
Dark Byte wrote: | it's writeBytes(address,newbt) |
OMG thank you so much
it works now
give error at the start but i put space before newbt just like @LeFiXER post and it work now
now i just need one last thing to modify from this script is to write 4 Byte Big Endian instead Float Big Endian
what should I change from this 👇
Code: | {$lua}
if syntaxcheck then return end
[ENABLE]
function writeBigEndianFloat(address, number)
local bt=floatToByteTable(number)
local newbt={}
for i=1,4 do
newbt[5-i]=bt[i]
end
writeBytes(address, newbt)
end
function readBigEndianFloat(address)
local bbt=readBytes(address,4, true)
local newbt={}
for i=1,4 do
newbt[5-i]=bbt[i]
end
return byteTableToFloat(newbt)
end
DoneState = false
local addr = 0x2C7F7F244
local val = 1
local function timer_tick(timer)
writeBigEndianFloat(addr, val + readBigEndianFloat(addr))
-- writeFloat(addr, val + readFloat(addr))
if DoneState == true then
timer.destroy()
end
end
local someTimer = createTimer(MainForm)
someTimer.Interval = 500
someTimer.OnTimer = timer_tick
[DISABLE]
DoneState = true |
|
|
Back to top |
|
|
|
|
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
|
|