Aixler

aix working on turtle saving

Oct 9th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. function move(direction)            --turtle moving
  2.     if direction == up then
  3.         while not turtle.up() do
  4.             if not dig(up) then
  5.                 if turtle.attackUp() then
  6.                     attacked = attacked + 1
  7.                 end            
  8.             end
  9.         end
  10.         z = z + 1
  11.         save()
  12.  
  13. function save()             --saving position
  14.     s = fs.open("startup", "w")     --open startup in writemode
  15.     s.write("mine "..A.." "..B.." "..C.." "..x.." "..y.." "..z.." "..d.." "..mined.." "..attacked.." "..dropped.."")
  16.     s.close()
  17. end
Advertisement
Add Comment
Please, Sign In to add comment