SHOW:
|
|
- or go back to the newest paste.
| 1 | local component = require("component")
| |
| 2 | local sides = require("sides")
| |
| 3 | local os = require("os")
| |
| 4 | local robot = require("robot")
| |
| 5 | local inv = component.inventory_controller | |
| 6 | local red = component.redstone | |
| 7 | local pulsetime = 0.25 | |
| 8 | ||
| 9 | - | local function pulse(PT) |
| 9 | + | |
| 10 | - | red.setOutput(sides.back,15) |
| 10 | + | local function drop(slot) |
| 11 | - | os.sleep(PT) |
| 11 | + | |
| 12 | - | red.setOutput(sides.back,0) |
| 12 | + | |
| 13 | robot.dropUp() | |
| 14 | - | local function dropcomparenot(slot,Target1,Target2) |
| 14 | + | |
| 15 | end | |
| 16 | - | if not robot.compareTo(Target1) and not robot.compareTo(Target2) and robot.count(slot)>0 then |
| 16 | + | |
| 17 | - | robot.dropDown() |
| 17 | + | |
| 18 | ||
| 19 | if red.getInput(sides.left)>1 then | |
| 20 | - | local function dropcompare(slot, Target) |
| 20 | + | os.sleep(0.5) |
| 21 | robot.swing() | |
| 22 | - | if robot.compareTo(Target) then |
| 22 | + | |
| 23 | - | robot.dropDown(1) |
| 23 | + | for i = 1, 16 do --dropping bucket |
| 24 | drop(i) | |
| 25 | end | |
| 26 | - | local function activate() |
| 26 | + | |
| 27 | - | for i = 1, 14 do --dropping seed |
| 27 | + | |
| 28 | - | dropcompare(i,15) |
| 28 | + | |
| 29 | - | end |
| 29 | + | os.sleep(0.6) |
| 30 | ||
| 31 | ||
| 32 | end |