-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtunnel.lua
More file actions
32 lines (30 loc) · 761 Bytes
/
Copy pathtunnel.lua
File metadata and controls
32 lines (30 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- pastebin get
--local modem=peripheral.wrap("top")
--modem.open(159)
while true do
sleep(0.1)
term.clear()
term.setCursorPos(1,1)
print("Listening on port 80...")
local id, msg, distance = rednet.receive()
print("We've got a message from computer ID #"..id.."!")
print("The message is:")
print(msg)
print("This message was received from "..distance.." blocks away!")
if msg == "forward" then
turtle.forward()
elseif msg == "back" then
turtle.back()
elseif msg == "dig" then
turtle.dig()
elseif msg == "right" then
turtle.turnRight()
elseif msg == "left" then
turtle.turnLeft()
elseif msg == "down" then
turtle.down()
elseif msg == "up" then
turtle.up()
elseif msg == "exit" then
error()
end