Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("left")
- modem.open(1)
- local success, data = turtle.inspectDown()
- local flag = true
- local i = 0
- function Term()
- term.setCursorPos(1,1)
- term.clear()
- end
- function back()
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 1, 10 do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
- while flag do
- success, data = turtle.inspectDown()
- if (success) then
- modem.transmit(1,1, data)
- print(data.name)
- print(data.metadata)
- print(data.state.age)
- else
- print("Null")
- end
- sleep(2)
- Term()
- i=i+1
- print(i)
- if (i==10) then
- flag = false
- i = 0
- end
- turtle.forward()
- end
- back()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement