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 display this value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Roman012
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 25 Dec 2022
Posts: 37

PostPosted: Mon Feb 03, 2025 7:20 am    Post subject: how to display this value Reply with quote

Tell me please
how to display this value

Code:
function Trainer_TimerTimer(sender)
Trainer.Label1.Caption = readBytes('[[[[[[["--.exe"+036C8F80]+EB4]+40]+244]+164]+0]+348]+278')
end



201033.jpg
 Description:
 Filesize:  197.1 KB
 Viewed:  9303 Time(s)

201033.jpg


Back to top
View user's profile Send private message
xxhehe
Expert Cheater
Reputation: 0

Joined: 11 Mar 2015
Posts: 154

PostPosted: Mon Feb 03, 2025 7:33 am    Post subject: Re: how to display this value Reply with quote

Roman012 wrote:
Tell me please
how to display this value

Code:
function Trainer_TimerTimer(sender)
Trainer.Label1.Caption = readBytes('[[[[[[["--.exe"+036C8F80]+EB4]+40]+244]+164]+0]+348]+278')
end

readPointer
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Feb 03, 2025 8:02 am    Post subject: Reply with quote

or give the record a unique description and use
Code:

Trainer.Label1.Caption=AddressList['unique description'].Value

_________________
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
Roman012
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 25 Dec 2022
Posts: 37

PostPosted: Mon Feb 03, 2025 8:29 am    Post subject: Reply with quote

Dark Byte wrote:
or give the record a unique description and use
Code:

Trainer.Label1.Caption=AddressList['unique description'].Value

So it's not possible?
Code:
Trainer.Label1.Caption = readPointer('[[[[[[["--.exe"+036C8F80]+EB4]+40]+244]+164]+0]+348]+278')

Only this way
Code:
Trainer.Label1.Caption=AddressList['unique description'].Value



212019.jpg
 Description:
 Filesize:  79.81 KB
 Viewed:  9281 Time(s)

212019.jpg



211827.jpg
 Description:
 Filesize:  70.27 KB
 Viewed:  9281 Time(s)

211827.jpg


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Feb 03, 2025 10:12 am    Post subject: Reply with quote

it's possible, but I'll let someone else explain it to you, or see it as an exercise in programming in lua
Razz

_________________
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
Azuki
Newbie cheater
Reputation: 0

Joined: 18 Feb 2025
Posts: 10

PostPosted: Tue Feb 18, 2025 5:15 pm    Post subject: Reply with quote

there's a post similar to this over here, in which there already is an answer, thread id 620733.

in your case this should work out. %016X for x64 style addresses, %08X for x86 style addresses
Code:

Trainer.Label1.Caption = ("%016X"):format(readPointer('[[[[[[["--.exe"+036C8F80]+EB4]+40]+244]+164]+0]+348]+278'))
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 36

Joined: 16 Feb 2017
Posts: 1511

PostPosted: Tue Feb 18, 2025 8:29 pm    Post subject: Reply with quote

Here is an example that parses the value given by @DB
Quote:
Code:
AddressList['unique description'].Value


Code:
function bytefromhex(str1, reverse)
    local atbl, aword = {}, ""
    for word in str1:gmatch("%w%w") do table.insert(atbl, word) end
    if reverse then
        for i = #atbl, 1, -1 do aword = aword .. atbl[i] end
    else
        for i = 1, #atbl do aword = aword .. atbl[i] end
    end
    local num = (tonumber(aword, 16) + 2^31) % 2^32 - 2^31
    return math.floor(num)
end

function processHexSequence(hexSequence, reverse)
    local results = {}
    local chunks = hexSequence:gsub(" ", ""):gmatch("(%x%x%x%x%x%x%x%x)")

    for chunk in chunks do
        local result = bytefromhex(chunk, reverse)
        table.insert(results, result)
    end
    return results
end

-- use:
-- local hexSequence = AddressList['unique description'].Value
-- reverse: A1090000 = true .. 000009A1 = false

local hexSequence = "000009A1000009A1"
local results = processHexSequence(hexSequence, false)
print(results[1] .. "\n" .. results[2] .. "\n")

local hexSequence1 = "E8 03 00 00 A1 09 00 00"
local results = processHexSequence(hexSequence1, true)
print(results[1] .. "\n" .. results[2])

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website 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