[Lua] Teleport script ready for use
Posted: Wed May 14, 2025 8:47 pm
Teleport Script:
only change the addresses if your address 2AC23981 add 0x before the address will be like this 0x2AC23981 - your address [player_base]+0C just past it like that and don't delete the " " marks and if you have a pointer just use the Print Offsets tool
Print Offsets:
viewtopic.php?f=23&t=34922
you can change the hotkeys if you like in the end of script
only change the addresses if your address 2AC23981 add 0x before the address will be like this 0x2AC23981 - your address [player_base]+0C just past it like that and don't delete the " " marks and if you have a pointer just use the Print Offsets tool
Print Offsets:
viewtopic.php?f=23&t=34922
you can change the hotkeys if you like in the end of script
Spoiler
{$lua}
[ENABLE]
local xExpr = "Adress for x"
local yExpr = "Adress for y"
local zExpr = "Adress for z"
local savedPosition = {x = 0, y = 0, z = 0}
function savePosition()
savedPosition.x = readFloat(xExpr)
savedPosition.y = readFloat(yExpr)
savedPosition.z = readFloat(zExpr)
end
function loadPosition()
writeFloat(xExpr, savedPosition.x)
writeFloat(yExpr, savedPosition.y)
writeFloat(zExpr, savedPosition.z)
end
createHotkey(savePosition, VK_F5) -- you can change hot keys from here
createHotkey(loadPosition, VK_F6) -- you can change hot keys from here
[DISABLE]
[ENABLE]
local xExpr = "Adress for x"
local yExpr = "Adress for y"
local zExpr = "Adress for z"
local savedPosition = {x = 0, y = 0, z = 0}
function savePosition()
savedPosition.x = readFloat(xExpr)
savedPosition.y = readFloat(yExpr)
savedPosition.z = readFloat(zExpr)
end
function loadPosition()
writeFloat(xExpr, savedPosition.x)
writeFloat(yExpr, savedPosition.y)
writeFloat(zExpr, savedPosition.z)
end
createHotkey(savePosition, VK_F5) -- you can change hot keys from here
createHotkey(loadPosition, VK_F6) -- you can change hot keys from here
[DISABLE]