Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- if #tArgs ~= 2 then
- print("Invalid Arguments: " .. shell.getRunningProgram() .. " <side> <drop/suck>")
- return
- end
- local side = tArgs[1]
- local action = tArgs[2]
- if side == "bottom" then
- side = "down"
- elseif side == "top" then
- side = "up"
- end
- if side ~= "up" and side ~= "down" and side ~= "front" then
- print("Invalid Side: up/top,down/bottom,front")
- return
- end
- if action ~= "drop" and action ~= "suck" then
- print("Invalid Action: suck,drop")
- return
- end
- for i, v in ipairs(rs.getSides()) do
- if peripheral.getType(v) == "LogisticsPipes:Crafting" then
- peripheral.wrap(v).setTurtleConnect(true)
- end
- end
- s = fs.open("startup","w")
- s.writeLine("shell.run(\""..shell.getRunningProgram().."\",\""..side.."\",\""..action.."\")")
- s.close()
- while true do
- for i=1,16 do
- turtle.select(i)
- if side == "up" then
- if action == "suck" then
- turtle.suckUp()
- else
- turtle.dropUp()
- end
- elseif side == "down" then
- if action == "suck" then
- turtle.suckDown()
- else
- turtle.dropDown()
- end
- else
- if action == "suck" then
- turtle.suck()
- else
- turtle.drop()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment