Computer_Craft_Coder

Shuffle (CC) (Turtle) (Dance)

Aug 7th, 2013
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | None | 0 0
  1. --[[ Random Program (Shuffle) ]]--
  2.  
  3. fuel = false
  4.  
  5. --[[ Functions ]]--
  6.  
  7. function fuel(true)
  8. if turtle.getFuelLevel() > 20 then
  9. fuel = true
  10. end
  11.  
  12. function fuel(false)
  13. if turtle.getFuelLevel() < 5 then
  14. print("Can Not Continue Dancing, I Need More Fuel!")
  15. fuel = false
  16. end
  17.  
  18. function shuffle(1)
  19. while fuel = true do
  20. turtle.turnRight()
  21. turtle.turnRight()
  22. turtle.forward()
  23. end
  24.  
  25. function shuffle(2)
  26. while true do
  27. turtle.turnRight()
  28. turtle.turnLeft()
  29. turtle.turnLeft()
  30. turtle.turnRight()
  31. end
  32.  
  33. function shuffle(3)
  34. while fuel = true do
  35. turtle.up()
  36. turtle.down()
  37. end
  38. end
  39. end
  40.  
  41. --[[ Code ]]--
  42.  
  43. print("Dance Master")
  44. print("1.0")
  45.  
  46. write("Dance: ")
  47.  
  48. input = read()
  49. help = read()
  50.  
  51. if help == "/help" then
  52. print("Try: 1 or 2 or 3")
  53. print("For Dancing")
  54. sleep(2)
  55. os.reboot()
  56. end
  57.  
  58. if input == "1" then
  59. shuffle(1)
  60. elseif input == "2" then
  61. shuffle(2)
  62. elseif input == "3" then
  63. shuffle(3)
  64. else
  65. print("Unknown Dance Move!")
  66. print("Please Teach Me It?!?!")
  67. sleep(2)
  68. shell.run("shuffle")
  69. end
Advertisement
Add Comment
Please, Sign In to add comment