Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[This uses a turtle to break and replace the cable and growth accelerator
- for the most part, this is useless to someone who doesn't know the proper format for the blocks/cables
- CCC
- C AT
- CAWA
- A
- T = Turtle w/ pickaxe
- A = Accelerator
- C = Fluix cable
- W = Water
- That is the side view of the format you must have, if you want to redstone control it,
- it uses the bottom to control the rs signal]]--
- local interval = 60 --Interval to wait in seconds, 60 works fine
- local fluixInterval = 10 --Interval to wait for fluix crystals, required components go in slots 14, 15, and 16
- local seed = 1 --Slot the seeds will be in
- local cable = 2 --Slot the fluix cable with be in
- local accel = 3 --Slot the Crystal Growth Accelerator will be in
- local output = 4 --Output slot
- local message = "seed" --Required message to start the "seed" process
- local message2 = "fluix" --Required message to start the "fluix" process
- local storage = "Left" --Storage if you desire to have it, also the required message to start the "store" process
- --[[Do not edit anything below this]]--
- if peripheral.getType("right") == "modem" then rednet.open("right") end
- if peripheral.getType("left") == "modem" then rednet.open("left") end
- function create()
- turtle.select(seed)
- turtle.dropDown()
- end
- function replace()
- turtle.up()
- turtle.select(accel)
- turtle.placeDown()
- turtle.back()
- turtle.select(cable)
- turtle.place()
- end
- function pickup()
- turtle.select(cable)
- turtle.dig()
- turtle.suck()
- turtle.forward()
- turtle.select(accel)
- turtle.digDown()
- turtle.down()
- turtle.select(output)
- turtle.suckDown()
- turtle.up()
- end
- if rednet.isOpen("right") or rednet.isOpen("left") then print("Waiting for message") senderID, msg = rednet.receive() end
- if msg == message then
- print("Message received: "..msg)
- create()
- replace()
- rs.setOutput("bottom", true)
- print("Waiting for "..interval.." seconds")
- for i = 1, interval do
- print(i)
- sleep(1)
- end
- rs.setOutput("bottom", false)
- pickup()
- end
- if msg == "storeLeft" then
- print("Message received: "..msg)
- turtle.turnLeft()
- for i = 1, 16 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.turnRight()
- end
- if msg == "storeRight" then
- print("Message received: "..msg)
- turtle.turnRight()
- for i = 1, 16 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.turnLeft()
- end
- if msg == "retrieveLeft" then
- print("Message received: "..msg)
- turtle.turnLeft()
- for i = 1, 16 do
- turtle.select(i)
- turtle.suck()
- end
- if turtle.getItemCount(3) == 0 then
- turtle.select(2)
- turtle.transferTo(3)
- turtle.select(1)
- turtle.transferTo(2)
- end
- turtle.turnRight()
- end
- if msg == "retrieveRight" then
- print("Message received: "..msg)
- turtle.turnRight()
- for i = 1, 16 do
- turtle.select(i)
- turtle.suck()
- end
- if turtle.getItemCount(3) == 0 then
- turtle.select(2)
- turtle.transferTo(3)
- turtle.select(1)
- turtle.transferTo(2)
- end
- turtle.turnleft()
- end
- if msg == message2 then
- print("Message received: "..msg)
- turtle.select(14)
- turtle.dropDown()
- turtle.select(15)
- turtle.dropDown()
- turtle.select(16)
- turtle.dropDown()
- turtle.down()
- sleep(fluixInterval)
- turtle.select(14)
- turtle.suckDown()
- turtle.select(15)
- turtle.suckDown()
- turtle.select(16)
- turtle.suckDown()
- turtle.up()
- end
- rednet.broadcast("fuel: "..turtle.getFuelLevel())
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement