Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- build = 0
- slot = 1
- back = 0
- rednet.open("right")
- function fogad()
- kuldo, uzenet = rednet.receive(180)
- print(uzenet)
- if uzenet == "back" then
- for i = 1, 3 do
- turtle.back()
- end
- sleep(2)
- end
- build = read()
- end
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function slotc()
- if turtle.getItemCount(slot) < 1 then
- slot = slot + 1
- turtle.select(slot)
- print("Slot: ", slot)
- if turtle.getItemCount(9) < 1 then
- slot = 1
- build = 0
- turtle.select(slot)
- print("Slot ures")
- sleep(1)
- end
- end
- end
- function builder()
- fogad()
- build = build + 0
- if build > 0 then
- for i = 1, build do
- slotc() sleep(1)
- print("slot: ", slot)
- turtle.place()
- turtle.up()
- turtle.forward()
- sleep(1)
- back = back + 1
- print("back: ", back)
- end
- build = 0
- if build < 1 then
- for i = 1, back do
- print("Back: ", back)
- turtle.back()
- turtle.down()
- sleep(1)
- end
- end
- end
- end
- while true do
- builder()
- sleep(.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement