SHOW:
|
|
- or go back to the newest paste.
| 1 | - | rednet.open("right")
|
| 1 | + | rednet.open("left")
|
| 2 | ||
| 3 | - | local function panel() |
| 3 | + | local function sluchaj() |
| 4 | ||
| 5 | - | term.clear() |
| 5 | + | |
| 6 | - | term.setCursorPos(1,1) |
| 6 | + | |
| 7 | - | print("Remote Control Turtle v2.2")
|
| 7 | + | |
| 8 | - | term.setCursorPos(1,10) |
| 8 | + | |
| 9 | - | print("This turtle's ID is: "..os.getComputerID())
|
| 9 | + | |
| 10 | ||
| 11 | if msg == "back" then | |
| 12 | turtle.back() | |
| 13 | end | |
| 14 | ||
| 15 | - | local function handle() |
| 15 | + | |
| 16 | turtle.up() | |
| 17 | end | |
| 18 | ||
| 19 | if msg == "down" then | |
| 20 | turtle.down() | |
| 21 | end | |
| 22 | ||
| 23 | if msg == "right" then | |
| 24 | turtle.turnRight() | |
| 25 | end | |
| 26 | ||
| 27 | if msg == "left" then | |
| 28 | turtle.turnLeft() | |
| 29 | end | |
| 30 | ||
| 31 | if msg == "uturn" then | |
| 32 | turtle.turnRight() | |
| 33 | turtle.turnRight() | |
| 34 | end | |
| 35 | ||
| 36 | if msg == "dig" then | |
| 37 | turtle.dig() | |
| 38 | end | |
| 39 | ||
| 40 | if msg == "digdown" then | |
| 41 | turtle.digDown() | |
| 42 | end | |
| 43 | ||
| 44 | if msg == "digup" then | |
| 45 | turtle.digUp() | |
| 46 | end | |
| 47 | ||
| 48 | if msg == "place" then | |
| 49 | turtle.place() | |
| 50 | end | |
| 51 | ||
| 52 | if msg == "placedown" then | |
| 53 | turtle.placeDown() | |
| 54 | end | |
| 55 | ||
| 56 | if msg == "placeup" then | |
| 57 | turtle.placeUp() | |
| 58 | end | |
| 59 | ||
| 60 | if msg == "rsfront" then | |
| 61 | rs.setOutput("front",true)
| |
| 62 | sleep(3) | |
| 63 | rs.setOutput("front",false)
| |
| 64 | end | |
| 65 | ||
| 66 | if msg == "rsup" then | |
| 67 | rs.setOutput("top",true)
| |
| 68 | sleep(3) | |
| 69 | rs.setOutput("top",false)
| |
| 70 | end | |
| 71 | ||
| 72 | if msg == "rsdown" then | |
| 73 | rs.setOutput("bottom",true)
| |
| 74 | sleep(3) | |
| 75 | rs.setOutput("bottom",false)
| |
| 76 | end | |
| 77 | ||
| 78 | if msg == "inv1" then | |
| 79 | turtle.select(1) | |
| 80 | end | |
| 81 | ||
| 82 | if msg == "inv2" then | |
| 83 | turtle.select(2) | |
| 84 | end | |
| 85 | ||
| 86 | if msg == "inv3" then | |
| 87 | turtle.select(3) | |
| 88 | end | |
| 89 | ||
| 90 | if msg == "inv4" then | |
| 91 | turtle.select(4) | |
| 92 | end | |
| 93 | ||
| 94 | if msg == "inv5" then | |
| 95 | turtle.select(5) | |
| 96 | end | |
| 97 | ||
| 98 | if msg == "inv6" then | |
| 99 | turtle.select(6) | |
| 100 | end | |
| 101 | ||
| 102 | if msg == "inv7" then | |
| 103 | turtle.select(7) | |
| 104 | end | |
| 105 | ||
| 106 | if msg == "inv8" then | |
| 107 | turtle.select(8) | |
| 108 | end | |
| 109 | ||
| 110 | if msg == "inv9" then | |
| 111 | turtle.select(9) | |
| 112 | end | |
| 113 | ||
| 114 | if msg == "inv10" then | |
| 115 | turtle.select(10) | |
| 116 | end | |
| 117 | ||
| 118 | if msg == "inv11" then | |
| 119 | turtle.select(11) | |
| 120 | end | |
| 121 | ||
| 122 | if msg == "inv12" then | |
| 123 | turtle.select(12) | |
| 124 | end | |
| 125 | ||
| 126 | if msg == "inv13" then | |
| 127 | turtle.select(13) | |
| 128 | end | |
| 129 | ||
| 130 | if msg == "inv14" then | |
| 131 | turtle.select(14) | |
| 132 | end | |
| 133 | ||
| 134 | if msg == "inv15" then | |
| 135 | turtle.select(15) | |
| 136 | end | |
| 137 | ||
| 138 | if msg == "inv16" then | |
| 139 | turtle.select(16) | |
| 140 | end | |
| 141 | ||
| 142 | if msg == "refuel" then | |
| 143 | turtle.select(16) | |
| 144 | turtle.refuel(1) | |
| 145 | end | |
| 146 | end | |
| 147 | ||
| 148 | print("ID: "..os.getComputerID())
| |
| 149 | while true do | |
| 150 | sluchaj() | |
| 151 | ||
| 152 | end |