Advertisement
Guest User

sueloversion2.0

a guest
May 26th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. contadorx = 0
  2. contadory = 0
  3. term.setTextColor(colors.orange)
  4. term.setBackgroundColor(colors.white)
  5. textutils.slowPrint("longitud")
  6. largo = tonumber(read())
  7. term.setTextColor(colors.orange)
  8. term.setBackgroundColor(colors.white)
  9. textutils.slowPrint("ancho")
  10. ancho = tonumber(read())
  11. vuelve = ancho
  12. while contadorx < ancho do
  13. turtle.placeDown()
  14. turtle.forward()
  15. contadory = contadory + 1
  16. if contadory == largo then
  17. while contadory > 0 do
  18. turtle.back()
  19. contadory = contadory - 1
  20. end
  21. contadory = 0
  22. turtle.turnRight()
  23. turtle.forward()
  24. turtle.turnLeft()
  25. contadorx = contadorx + 1
  26. end
  27. if contadorx == ancho then
  28. turtle.turnLeft()
  29. while vuelve > 0 do
  30. turtle.forward()
  31. vuelve = vuelve - 1
  32. end
  33. end
  34. end
  35. turtle.turnRight()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement