------------ -- jduartedj -- teleport function -- special thx to: -- fobsauce -- fixed by Rock5 ------------ -- Usage: -- dX,dZ are coordinates, absolute true = abs coords, false = relative pos ------------ function teleport(dX,dZ, absolute) player:update() local address = memoryReadInt(getProc(), addresses.staticbase_char) + addresses.charPtr_offset local offsetX = { 0x4, 0xB0}; local offsetZ = { 0x4, 0xB8}; local pos = {player.X, player.Z}; if (not dX) or (not dZ) then printf("Must supply coordinates"); return; end if absolute == false then pos[1] = pos[1] + dX; pos[2] = pos[2] + dZ; else pos = {dX,dZ}; end memoryWriteFloatPtr(getProc(), address , offsetX, pos[1]); -- x value memoryWriteFloatPtr(getProc(), address , offsetZ, pos[2]); -- z value printf("Player Teleported to X: %d\tZ: %d\n",pos[1],pos[2]); yrest(100) player:update(); end