SHOW:
|
|
- or go back to the newest paste.
| 1 | --[[ Random Program (Shuffle) ]]-- | |
| 2 | --[[ Functions ]]-- | |
| 3 | - | fuel = false |
| 3 | + | |
| 4 | function shuffle(1) | |
| 5 | while 1=1 do | |
| 6 | turtle.turnRight() | |
| 7 | - | function fuel(true) |
| 7 | + | |
| 8 | - | if turtle.getFuelLevel() > 20 then |
| 8 | + | |
| 9 | - | fuel = true |
| 9 | + | |
| 10 | ||
| 11 | function shuffle(2) | |
| 12 | - | function fuel(false) |
| 12 | + | |
| 13 | - | if turtle.getFuelLevel() < 5 then |
| 13 | + | |
| 14 | - | print("Can Not Continue Dancing, I Need More Fuel!")
|
| 14 | + | |
| 15 | - | fuel = false |
| 15 | + | |
| 16 | turtle.turnRight() | |
| 17 | end | |
| 18 | ||
| 19 | - | while fuel = true do |
| 19 | + | |
| 20 | while 1=1 do | |
| 21 | turtle.up() | |
| 22 | turtle.down() | |
| 23 | end | |
| 24 | end | |
| 25 | end | |
| 26 | ||
| 27 | --[[ Code ]]-- | |
| 28 | ||
| 29 | print("Dance Master")
| |
| 30 | print("1.0")
| |
| 31 | ||
| 32 | write("Dance: ")
| |
| 33 | ||
| 34 | - | while fuel = true do |
| 34 | + | |
| 35 | help = read() | |
| 36 | ||
| 37 | if help == "/help" then | |
| 38 | print("Try: 1 or 2 or 3")
| |
| 39 | print("For Dancing")
| |
| 40 | sleep(2) | |
| 41 | os.reboot() | |
| 42 | end | |
| 43 | ||
| 44 | if input == "1" then | |
| 45 | print("Lets boogie!")
| |
| 46 | shuffle(1) | |
| 47 | elseif input == "2" then | |
| 48 | print("bust a move!")
| |
| 49 | shuffle(2) | |
| 50 | elseif input == "3" then | |
| 51 | print("Bout to get my swerve on!")
| |
| 52 | shuffle(3) | |
| 53 | else | |
| 54 | print("Unknown Dance Move!")
| |
| 55 | print("Please Teach Me It?!?!")
| |
| 56 | sleep(2) | |
| 57 | shell.run("shuffle")
| |
| 58 | end |