| View previous topic :: View next topic |
| Author |
Message |
careca777 Expert Cheater
Reputation: 0
Joined: 27 Jul 2013 Posts: 121
|
Posted: Sat Sep 18, 2021 3:45 am Post subject: Add offset to teleport script |
|
|
Hi, how would you add an offset to this teleport script?
When i teleport, i'd like to be a bit offset to the actual coordinates.
| Code: | [PlayerX]:
readmem([[["game.exe"+23F06C0]+38]+7E48]+90, 4)
[PlayerX]+4:
readmem([[["game.exe"+23F06C0]+38]+7E48]+94, 4)
[PlayerX]+8:
readmem([[["game.exe"+23F06C0]+38]+7E48]+98, 4) |
Thanks in advance
|
|
| Back to top |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Sat Sep 18, 2021 4:33 am Post subject: |
|
|
Let me explain:
| Code: |
readmem([[["game.exe"+23F06C0]+38]+7E48]+90, 4)
|
The code above reads and or writes 4-bytes at the address defined by the pointer chain:
| Code: |
[[["game.exe"+23F06C0]+38]+7E48]+90
|
There is likely to be another section or entry of the script or cheat able which is responsible for deciding which value to write.
|
|
| Back to top |
|
 |
Birdi Expert Cheater
Reputation: 0
Joined: 08 Jun 2020 Posts: 124 Location: Migrating
|
Posted: Sat Sep 18, 2021 4:42 am Post subject: |
|
|
Assuming that the symbol PlayerX is just an address you're storing and teleporting to (old location?), just add what you want to those values after using readmem.
In this, 'my_offset' can just be another symbol the end user may alter in the table, if that's your goal instead of a definition. If you just want a static amount, this should work fine.
You can also use sub/other definitions considering this is coordinate-based, do what you need.
| Code: |
define(my_offset,3E8) //+1000
...
add [PlayerX],my_offset
add [PlayerX+8],my_offset
add [PlayerX+10],my_offset
|
_________________
Trying to learn!
Add me on Discord if you want hands-on help:
Birdi. |
|
| Back to top |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Sat Sep 18, 2021 5:12 am Post subject: |
|
|
| Birdi, I believe the OP wants the value written to be a bit further. Not to be misconstrued with the actual term offset which is a value that is offset from a specific address. Only the OP can clarify on this since the post is somewhat ambiguous.
|
|
| Back to top |
|
 |
careca777 Expert Cheater
Reputation: 0
Joined: 27 Jul 2013 Posts: 121
|
Posted: Sat Sep 18, 2021 5:34 am Post subject: |
|
|
Hi experts, yes, i can see how it can be ambiguous.
I would like to add some points to the value itself in (float).
So instead of teleporting to, say Coord X 1000 float, i want to teleport always a couple more points to that, like 1000 + 30 float, this way i won't get stuck in the middle of stuff.
So i will try this
| Code: | | add [PlayerX],(float)30 |
and report back.
Thank you.
EDIT: adding
did the trick, don't know why i didn't think of this before.
Thank you for the help fellas
|
|
| Back to top |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Sat Sep 18, 2021 8:17 am Post subject: |
|
|
Glad you resolved it .
|
|
| Back to top |
|
 |
careca777 Expert Cheater
Reputation: 0
Joined: 27 Jul 2013 Posts: 121
|
Posted: Mon Sep 20, 2021 5:51 pm Post subject: |
|
|
Ended up using lua.
| Code: | local PlayerXCoord = getAddress"[PlayerX]"
local PegXCoord = getAddress"[PegCoords]"
writeFloat(PlayerXCoord, readFloat(PegXCoord)+2) | [/code]
|
|
| Back to top |
|
 |
|