View previous topic :: View next topic |
Author |
Message |
phoenix4231 How do I cheat? Reputation: 0
Joined: 19 Sep 2021 Posts: 4
|
Posted: Sun Sep 19, 2021 2:47 pm Post subject: MemoryRecord.Value only affects the entry value visually? |
|
|
Hello. I've been trying to make a teleportation script/trainer. I have pointers for the x/y/z coordinates on my table, which look like this: imgur. com/a/3IV1dzF
And then here is the script for "Home":
Code: |
{$lua}
if syntaxcheck then return end
[ENABLE]
getAddressList().getMemoryRecordByDescription("X").Value = 2736
getAddressList().getMemoryRecordByDescription("Y").Value = 1861
getAddressList().getMemoryRecordByDescription("Z").Value = 242
[DISABLE]
|
When I toggle my "Home" script, the values in the table successfully change to the values I provided, however it seems to only be a visual change. My character does not teleport and the X/Y/Z values go back to their previous values when I move my character.
Changing the X/Y/Z values manually in the table and writeFloat('address', value) both worked, so I'm not sure why .Value does not seem to work.
I'm thinking it might be related to X/Y/Z being Float types, or .Value is only a string representation and not the actual value? In either case, what might be the problem, and is there another way to solve this?
I'm trying to change my previous writeFloat solution because I have to manually change all of the address strings per location if I need to update the pointer. The whole thing is actually quite crude since it's the only solution I understand how to do, but if there's another way to do teleportation I would appreciate it.
Thank you! :)
|
|
Back to top |
|
|
LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1055 Location: 0x90
|
Posted: Mon Sep 20, 2021 1:54 am Post subject: |
|
|
Try this:
Code: |
function setMemValue(description, value)
local al = getAddressList()
local mr = al.getMemoryRecordByDescription(tostring(description))
if mr ~= nil then
mr.value = tonumber(value)
end
end
|
Use it like this:
Code: |
setMemValue('No description', 50)
|
The first parameter is the description of the table entry you want to change and the second parameter is the value you want to change it to.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Mon Sep 20, 2021 3:38 am Post subject: |
|
|
Did you recently rename the descriptions? Sometimes you have to rebuild the name cache after a rename if there's an overlap in names
_________________
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 |
|
|
phoenix4231 How do I cheat? Reputation: 0
Joined: 19 Sep 2021 Posts: 4
|
Posted: Mon Sep 20, 2021 9:22 am Post subject: |
|
|
LeFiXER wrote: | Try this:
Code: |
function setMemValue(description, value)
local al = getAddressList()
local mr = al.getMemoryRecordByDescription(tostring(description))
if mr ~= nil then
mr.value = tonumber(value)
end
end
|
Use it like this:
Code: |
setMemValue('No description', 50)
|
The first parameter is the description of the table entry you want to change and the second parameter is the value you want to change it to. |
Ah, it looks like it did the same. ;; It edits the value that I see on the table but it doesn't persist.
Dark Byte wrote: | Did you recently rename the descriptions? Sometimes you have to rebuild the name cache after a rename if there's an overlap in names |
Oh, I actually did! I replaced the previous X/Y/Z pointers very recently. How do I rebuild the name cache?
|
|
Back to top |
|
|
LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1055 Location: 0x90
|
Posted: Mon Sep 20, 2021 10:11 am Post subject: |
|
|
Just call:
Code: |
AddressList.rebuildDescriptionCache()
|
|
|
Back to top |
|
|
phoenix4231 How do I cheat? Reputation: 0
Joined: 19 Sep 2021 Posts: 4
|
Posted: Mon Sep 20, 2021 11:07 pm Post subject: |
|
|
LeFiXER wrote: | Just call:
Code: |
AddressList.rebuildDescriptionCache()
|
|
Oh, sadly this did not do the trick either. Still does the same. :(
However, I did (belatedly) realize I could simply set up a function for setting coordinates in the CT lua script instead of putting it in the individual scripts. (I did not know the auto assemble scripts could call a function from the CT lua script until now, my bad)
I still think the MemoryRecord.Value solution would have been better if I could make it work, though it looks like it really doesn't want to work... :(
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Tue Sep 21, 2021 12:13 am Post subject: |
|
|
So the the value stays the value in CE, until you change the character position ingame and then it changes back?
That sounds like the memoryrecord has the wrong address or you're changing it at the wrong time
You can try setting the .Active property to true before changing the 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 |
|
|
phoenix4231 How do I cheat? Reputation: 0
Joined: 19 Sep 2021 Posts: 4
|
Posted: Tue Sep 21, 2021 6:06 am Post subject: |
|
|
Dark Byte wrote: | So the the value stays the value in CE, until you change the character position ingame and then it changes back?
That sounds like the memoryrecord has the wrong address or you're changing it at the wrong time
You can try setting the .Active property to true before changing the value |
OH. Yup, that's what happened. It turned out the pointer in the table was not updated correctly after I restarted, and the address on my writeFloat was a different one and that's why that one still worked. Changed the pointer to the same one and .Value worked with rebuildDescriptionCache.
Thanks! :)
|
|
Back to top |
|
|
|