Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Install a chest on the backside from Shearing Turtle!
- local maxitem = 3 -- MaxItems in Slot -> Chest
- local sfreq = 1.5 -- Shearing Frequenz (seconds)
- local switch = "bottom" -- ON/OFF Switch; H = OFF, L = ON
- -----------------------------------------------------------
- function _rotate() -- rotate Turtle 180°
- turtle.turnRight()
- turtle.turnRight()
- end
- function _drop() -- Drop Items[Index/slot(s)] to chest
- _rotate()
- for k = 1, 16, 1 do
- while turtle.getItemCount(k) >= 1 do
- turtle.select(k)
- turtle.drop()
- end
- end
- _rotate()
- end
- function _shearing()
- for i = 1, 10, 1 do -- Low Overhead ->
- turtle.attack() -- shearing
- sleep(sfreq)
- end -- <- Low Overhead
- end
- function _checkslots()
- for j = 1 ,16, 1 do -- check Slots
- if turtle.getItemCount(j) > maxitem then
- _drop()
- end
- end
- turtle.select(1)
- end
- while true do
- if rs.getInput(switch) == false then
- _shearing()
- _checkslots()
- else
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment