SHOW:
|
|
- or go back to the newest paste.
| 1 | m = peripheral.find("modem")
| |
| 2 | m.open(200) | |
| 3 | ms = "" | |
| 4 | comn = {"forward","back","right","left","up","down"}
| |
| 5 | ||
| 6 | if fs.exists("AF") then
| |
| 7 | os.loadAPI("AF")
| |
| 8 | key = AF.getkey("123456789")
| |
| 9 | else | |
| 10 | shell.run("pastebin","get","KC7uE6ZP","AF")
| |
| 11 | os.loadAPI("AF")
| |
| 12 | - | if e[5] == "forward" then |
| 12 | + | key = AF.getkey("123456789")
|
| 13 | end | |
| 14 | ||
| 15 | - | elseif e[5] == "back" then |
| 15 | + | write("enter channel: ")
|
| 16 | inp = read() | |
| 17 | - | elseif e[5] == "left" then |
| 17 | + | |
| 18 | if type(tonumber(inp)) == "number" then | |
| 19 | - | elseif e[5] == "right" then |
| 19 | + | m.open(tonumber(inp)) |
| 20 | else | |
| 21 | - | elseif e[5] == "up" then |
| 21 | + | error("not value")
|
| 22 | ||
| 23 | - | elseif e[5] == "down" then |
| 23 | + | |
| 24 | ||
| 25 | - | elseif e[5] == "dig" then |
| 25 | + | |
| 26 | e = {os.pullEvent()}
| |
| 27 | - | elseif e[5] == "place" then |
| 27 | + | |
| 28 | --for i=1,#comn do | |
| 29 | - | elseif e[5] == "digDN" then |
| 29 | + | |
| 30 | --print(e[5]) | |
| 31 | - | elseif e[5] == "placeDN" then |
| 31 | + | ms = AF.decrypt(e[5],key) |
| 32 | if ms == "forward" then | |
| 33 | - | elseif e[5] == "digUP" then |
| 33 | + | |
| 34 | turtle.forward() | |
| 35 | - | elseif e[5] == "placeUP" then |
| 35 | + | elseif ms == "back" then |
| 36 | turtle.back() | |
| 37 | elseif ms == "left" then | |
| 38 | turtle.turnLeft() | |
| 39 | elseif ms == "right" then | |
| 40 | turtle.turnRight() | |
| 41 | elseif ms == "up" then | |
| 42 | turtle.up() | |
| 43 | elseif ms == "down" then | |
| 44 | turtle.down() | |
| 45 | elseif ms == "dig" then | |
| 46 | turtle.dig() | |
| 47 | elseif ms == "place" then | |
| 48 | turtle.place() | |
| 49 | elseif ms == "digDN" then | |
| 50 | turtle.digDown() | |
| 51 | elseif ms == "placeDN" then | |
| 52 | turtle.placeDown() | |
| 53 | elseif ms == "digUP" then | |
| 54 | turtle.digUp() | |
| 55 | elseif ms == "placeUP" then | |
| 56 | turtle.placeUp() | |
| 57 | end | |
| 58 | --end | |
| 59 | --end | |
| 60 | end | |
| 61 | sleep(0) | |
| 62 | end |