newcat

CC-Drawer

Jun 27th, 2014
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. x = 0
  2. y = 0
  3.  
  4. print("Please select a picture")
  5. picname = io.read()
  6. h = fs.open(picname, "r")
  7.  
  8. width = tonumber(h.readLine())
  9. height = tonumber(h.readLine())
  10. print(width)
  11. print(height)
  12.  
  13. et = (width * height) * 2
  14. print("Estimated Time:")
  15. print(et)
  16.  
  17. for y = 0, height, 1 do
  18.     for x = 0, width, 1 do
  19.         as = tonumber(h.readLine())
  20.         turtle.select(as)
  21.         if turtle.getItemCount(as) == 0 then
  22.             io.read()
  23.         end
  24.         turtle.placeDown()
  25.         turtle.forward()
  26.     end
  27.     turtle.turnRight()
  28.     turtle.forward()
  29.     turtle.turnLeft()
  30.     for z = 0, width do
  31.         turtle.back()
  32.     end
  33. end
  34. print("Success!")
Advertisement
Add Comment
Please, Sign In to add comment