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 


Why and How?

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

Joined: 10 Jul 2014
Posts: 5

PostPosted: Wed May 25, 2016 6:01 pm    Post subject: Why and How? Reply with quote

Why do I get an address like this 2C5EED16250 in some games
and how do I use this address in Lua to get the integer
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4700

PostPosted: Wed May 25, 2016 6:23 pm    Post subject: Reply with quote

...because that's an address? If you don't know what an address is, it's an integer usually in hexadecimal that represents the location of a byte in a process's memory. The only thing I see that's vaguely different is that it's more than 2^32, which is indicative that the process is 64-bit. Even then, you'd still treat it the same way you would with any other address:
Code:
readInteger(0x2C5EED16250)
-- or:
readInteger("2C5EED16250")

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Drakefreeman
How do I cheat?
Reputation: 0

Joined: 10 Jul 2014
Posts: 5

PostPosted: Wed May 25, 2016 6:41 pm    Post subject: Reply with quote

Sorry I was not trying to be sarcastic or anything I was just confused, I have a script I made and whenever I use it on any other game like with 32bit it works fine but this one will not trigger the mouse click I see it turning to 1 in cheat engine but still will not turn to 1 in this

getAutoAttachList().add("Thegame")
form_show(CRT)

function CloseClick()
closeCE()
return caFree
end

function TBChange(sender)
if (checkbox_getState(CRT.TB) == 1) then
timer_setEnabled(CRT.CETimer1, true)
else
timer_setEnabled(CRT.CETimer1, false)
end
end
function CETimer1Timer(sender)
if readInteger(0x2C5EED16250) == 1 then
doKeyPress(VK_LBUTTON)
end
end
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4700

PostPosted: Wed May 25, 2016 6:55 pm    Post subject: Reply with quote

Stop using deprecated functions, embed your code in a code tag, and properly indent your code.
Code:
getAutoAttachList().add("Thegame")
CRT.show()

function CloseClick()
  closeCE()
  return caFree
end

function TBChange(sender)
  CRT.CETimer1.Enabled = CRT.TB.Checked
end

function CETimer1Timer(sender)
  if readInteger(0x2C5EED16250) == 1 then
    doKeyPress(VK_LBUTTON)
  end
end

If that doesn't work, then the address might be wrong, you may not have assigned the checkbox's OnChange event properly, the timer may not exist, something may not be named properly, etc.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Drakefreeman
How do I cheat?
Reputation: 0

Joined: 10 Jul 2014
Posts: 5

PostPosted: Wed May 25, 2016 7:04 pm    Post subject: Reply with quote

Thank you for your help Smile
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed May 25, 2016 9:39 pm    Post subject: Reply with quote

ParkourPenguin wrote:
embed your code in a code tag, and properly indent your code.
Very Happy
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 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