|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
rog9001 Expert Cheater Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Sat Nov 19, 2016 12:28 pm Post subject: Is this possible? |
|
|
Is it possible to make a value be constantly updated on a label?
Not the best question but what I mean is.. lets say that this instruction holds your characters x position
Code: |
mov ecx,[rsi+00000094]
|
and this one the y position
Code: |
mov ecx,[rsi+00000098]
|
now from this if I make the script something like this (just so I see my position)
Code: |
[ENABLE]
aobscan(XandY,8B ?? ?? ?? 00 00 00)
alloc(Mem,16)
globalalloc(XYPos,4)
Mem:
reader:
mov [XYPos],rsi
mov ecx,[rsi+00000094]
jmp return
return:
jmp Mem
registersymbol(XandY)
[DISABLE]
XandY:
db 8B 2C 94 00 00 00 00
unregistersymbol(XandY)
|
and then make pointers "XYPos+94" and "XYPos+98" I will see my position after activating the above script.
But from here what I would like is so the number which is being held in [XYPos+94] and [XYPos+98] will be displayed in Label1 and Label2 on my form so it would look something like this.
---------------------------------------------------
Game Trainer V0.1 - - - - - - - - [-] - [=] - [x]
---------------------------------------------------
Players Position
X: -21.33245 Y: 0.47932321
F1 Unlimited HP
F2 Unlimited MP
F3 Max Ability
---------------------------------------------------
is this possible?
hope fully I was able to explain everything....
This might make it a little bit more understandable...
So you can do this:
Code: |
function Checkbox1Change(sender)
if(checkbox_getState(Form1.Checkbox1) == 1) then
Form1.Label1.Caption = "Hello World!"
else
Form1.Label1.Caption = "Bye World!"
end
end
|
I want it the same way but something like
Code: |
function Checkbox1Change(sender)
if(checkbox_getState(Form1.Checkbox1) == 1) then
autoAssemble([[
aobscan(XandY,8B ?? ?? ?? 00 00 00)
alloc(Mem,16)
globalalloc(XYPos,4)
Mem:
reader:
mov [XYPos],rsi
mov ecx,[rsi+00000094]
jmp return
return:
jmp Mem
registersymbol(XandY)
]])
Form1.Label1.Caption="[XYPos+94]" <<<<< this is what I want somehow.
Form1.Label2.Caption="[XYPos+98]"
else
autoAssemble([[
XandY:
db 8B 2C 94 00 00 00 00
unregistersymbol(XandY)
]])
end
end |
|
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 54
Joined: 01 Oct 2008 Posts: 941
|
Posted: Sat Nov 19, 2016 12:56 pm Post subject: |
|
|
Make a timer to update the Label Caption with reading from the addresses?
eg.(not test)
Code: |
local lbl = YourForm.YourLabelName
if lbl.ComponentCount==0 then -- timer not attached yet
local tm = createTimer(lbl)
tm.Interval = 1000
tm.OnTimer = function(tm)
local fmt,X,Y = string.format
if Form1.Checkbox1==nil or Form1.Checkbox1.Checked then
X,Y = readFloat"[XYPos]+94",readFloat"[XYPos]+98"
end
X = X and fmt("%7.2f",X) or '??'
Y = Y and fmt("%7.2f",Y) or '??'
tm.Owner.Caption = fmt("X:%7s , Y:%7s",X,Y)
end
end
-- to toggle the timer
local lbl = YourForm.YourLabelName
local tm = lbl.ComponentCount>0 and lbl.Component[0]
if tm and tm.ClassName == 'TTimer' then
tm.Enabled = not tm.Enabled
end
-- to set a fixed size font for the label display string
local lbl = YourForm.YourLabelName
lbl.Font.Name = 'Courier New'
|
bye~
UPDATE:
fix address, thx mgr.inz.Player's~
_________________
- Retarded.
Last edited by panraven on Sat Nov 19, 2016 1:33 pm; edited 4 times in total |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Nov 19, 2016 12:59 pm Post subject: |
|
|
Code: | local X,Y = readFloat"[XYPos]+94",readFloat"[XYPos]+98" |
I also created example code:
Code: | autoAssemble([[your script here]])
function Checkbox1Change(sender)
if sender.Checked then
PositionTimer.Enabled = true
else
PositionTimer.Enabled = false
end
end
function GUI_playerPosition()
local text = string.format("Player position: X=%10.2f, Y=%10.2f",readFloat("[XYPos]+94") or 0,readFloat("[XYPos]+98") or 0)
Form1.Label1.Caption = text
end
if PositionTimer~=nil then PositionTimer.destroy() PositionTimer=nil end
PositionTimer = createTimer(Form1,false)
PositionTimer.Interval = 100
PositionTimer.OnTimer = GUI_playerPosition |
_________________
|
|
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
|
|