sciencefreak74

turtle_updateLocation

May 3rd, 2022 (edited)
834
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. local args = { ... }
  2.  
  3. if #args ~= 1 then
  4.     print("Usage: setPosition {x,y,z,direction}")
  5.     return
  6. end
  7.  
  8. local position = textutils.unserialize(args[1])
  9. if #position ~= 4 then
  10.     print("You haven't specified current location correctly you moron")
  11.     return
  12. end
  13. os.loadAPI("betterTurtle")
  14.  
  15. betterTurtle.setLocation(position)
  16. pos = betterTurtle.retrieveLocation()
  17. print(textutils.serialize(pos))
Advertisement
Add Comment
Please, Sign In to add comment