Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function emptyInv()
- for i=1,16 do
- turtle.select(i)
- e=64
- while e ~= 0 do
- turtle.dropDown()
- e = turtle.getItemCount(i)
- print("Items in slot "..i..":"..e)
- end
- end
- end
- function wellPickup()
- turtle.select(1)
- e=64
- while e ~= 0 do
- turtle.dropDown()
- sleep(2)
- e = turtle.getItemCount(1)
- print("Items in slot 1:"..e)
- end
- turtle.dig()
- local m = peripheral.wrap("right")
- m.transmit(2,2,"ready")
- end
- function waitForMove()
- print("Waiting for response if frame move finished")
- x = os.clock()
- local m = peripheral.wrap("right")
- m.open(3)
- x=0
- while x==0 do
- local event,modemside,senderchannel,replychannel,message,senderdistance = os.pullEvent("modem_message")
- if (senderchannel==3) then
- x = message
- print("Frame move done")
- y = os.clock()-x
- print("seconds: "..y)
- else
- x = 0
- end
- end
- end
- function wellPlace()
- turtle.select(1)
- turtle.place()
- sleep(1)
- end
- for i=1,32 do
- if turtle.detect()==false then
- wellPlace()
- end
- emptyInv()
- wellPickup()
- waitForMove()
- wellPlace()
- if (i==32) then
- print("laatste run")
- exit()
- else
- print("sleep...")
- sleep(10)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment