Advertisement
downwind

gotopc.lua file for turtle movement in ComputerCraft

Oct 12th, 2013
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. -- Basic Waypoint app to make turtle go to a location, turn to face an object next to that location, and then print a confirmation.
  2. -- Written by Richard Reigens 10/12/2013
  3.  
  4. shell.run("goto.lua", "383", "62", "564")
  5. -- goto.lua is goto code from  PhyscoKillerMonkey post at http://www.computercraft.info/forums2/index.php?/topic/5665-wireless-goto-program-for-gps-turtles/page__fromsearch__1
  6. -- coordinates can be changed to anything
  7.  
  8. for i = 1, 4 do --Turns turtle to face the chest "or what ever item is in front of home position"
  9. if turtle.detect() == false then
  10.     turtle.turnRight()
  11.     else
  12.     break
  13.     end
  14. end
  15.  
  16. print("Connecting to Main Computer...")-- text can be any conformation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement