View previous topic :: View next topic |
Author |
Message |
mw3137 How do I cheat? Reputation: 0
Joined: 15 Jul 2014 Posts: 6
|
Posted: Tue Jul 15, 2014 7:12 pm Post subject: [Easy question]Changing an address with Lua |
|
|
Hello,
I've been pulling my hair out for over 4 hours now on one of the simplest things you can do with Lua, tried so many different ways, looked up tutorials and other threads both on CEF and google, but no luck. So I gave up and made an account, I hope my dumb question won't bother anyone.
Could someone tell me how to change an address' value with an Lua script? I'm pretty sure it's as simple as "writeBytes(address,byte) but I just couldn't get it to work. I think the problem here comes from the address: I literally could not figure out what to put there, it would always return me an error or do nothing at all.
The goal I'm trying to achieve here is to make it so a certain value changes when I open a CE table, so I would put it in the table Lua script of course.
Thank you! |
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Wed Jul 16, 2014 6:53 am Post subject: |
|
|
Went to cheat engine search page.
Wrote 3 words (Lua change value)
In first page found the solution. _________________
|
|
Back to top |
|
|
mw3137 How do I cheat? Reputation: 0
Joined: 15 Jul 2014 Posts: 6
|
Posted: Wed Jul 16, 2014 10:28 am Post subject: |
|
|
DaSpamer wrote: | Went to cheat engine search page.
Wrote 3 words (Lua change value)
In first page found the solution. |
These are the exact keywords I used, and while I did find results that seemed to fit what I want I'm too dumb to get them to work somehow on my table, even though they're basically pre-made.
As I've said, the part that doesn't seem to work whatever I do is the address, and unsurprisingly it seems I'm the only one silly enough to not figure it out on my own, which is why I was looking for more of a personal aid there.
Sorry for being kind of thick. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Wed Jul 16, 2014 11:33 am Post subject: |
|
|
are you changing code or data ?
If it's code you may have to make it writable fist _________________
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 |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Wed Jul 16, 2014 12:16 pm Post subject: |
|
|
Code: | writeInteger("Address or 48F129",1) |
_________________
|
|
Back to top |
|
|
mw3137 How do I cheat? Reputation: 0
Joined: 15 Jul 2014 Posts: 6
|
Posted: Wed Jul 16, 2014 9:26 pm Post subject: |
|
|
Dark Byte wrote: | are you changing code or data ?
If it's code you may have to make it writable fist |
I think it's just data. I'm trying to change the code for equipped weapons in the game, to get one that is locked, but that means it'll reset every time I boot the game, which is why I'm trying to make the script run when starting up the table.
Which brings me to DaSpamer's code which seems to work fine when I execute it manually as a Lua script but can't find a way to make it autorun as the table opens. I had taken the wild guess that putting it in the table Lua script would make that happen somehow but I believe I'm mistaken on that.
Thank you again for your help! |
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Thu Jul 17, 2014 5:09 am Post subject: |
|
|
save your script as .lua and place it in the auto run dir. _________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Thu Jul 17, 2014 7:02 am Post subject: |
|
|
make your lua script target the process.
If you have no process open, you can't write to it _________________
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 |
|
|
mw3137 How do I cheat? Reputation: 0
Joined: 15 Jul 2014 Posts: 6
|
Posted: Thu Jul 17, 2014 10:55 pm Post subject: |
|
|
DaSpamer wrote: | save your script as .lua and place it in the auto run dir. |
That wouldn't stick to the table though, which is what I'm trying to do.
Dark Byte wrote: | make your lua script target the process.
If you have no process open, you can't write to it |
On a standalone script or the table lua script?
If table, I already have an autoattach to the process of the game, is that not enough? |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Fri Jul 18, 2014 2:32 am Post subject: |
|
|
Autoattach just registers the processname to be opened when CE feels like it.
It doesn't mean the process will be open right after that line
Use the onOpenProcess callack function, or use a timer that checks if the process is open,or call openProcess yourself _________________
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 |
|
|
mw3137 How do I cheat? Reputation: 0
Joined: 15 Jul 2014 Posts: 6
|
Posted: Sat Jul 19, 2014 6:39 am Post subject: |
|
|
Dark Byte wrote: | Autoattach just registers the processname to be opened when CE feels like it.
It doesn't mean the process will be open right after that line
Use the onOpenProcess callack function, or use a timer that checks if the process is open,or call openProcess yourself |
Thank you so much, it finally worked! |
|
Back to top |
|
|
|