Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local version = 1.0
- if _UD and _UD.su(version, "pbsqSiPh", {...}) then return end
- -- A cow in front of the turtle will be milked
- -- using buckets. An inventory containing only
- -- empty buckets needs to be available next to
- -- the turtle, as well as an inventory to
- -- drop filled buckets to. Change the following
- -- variables depending on your setup.
- -- (Script requires the BetterTurtleApi: https://pastebin.com/6XL8EYXe)
- -- direction where empty buckets will be sucked from
- local from = "top"
- -- direction where items will be dropped to
- local to = "bottom"
- -- seconds the turtle will wait between phases
- local pauseLength = 0.5
- term.clear()
- term.setCursorPos(2,2)
- if term.isColor() then
- term.setTextColor(colors.orange)
- end
- local versionString = tostring(version)
- if version == math.floor(version) then
- versionString = versionString..".0"
- end
- term.write("Euter Destroyer "..versionString)
- local function note(txt, color)
- term.setCursorPos(2,4)
- term.clearLine()
- if term.isColor() then
- term.setTextColor(color or colors.white)
- end
- term.write(txt)
- end
- while true do
- note("Droppe Inventar...", colors.yellow)
- for i=1,16 do
- turtle.select(i)
- turtle.dropDirection(to)
- while turtle.getItemCount() > 0 do
- sleep(1)
- turtle.dropDirection(to)
- end
- end
- sleep(pauseLength)
- note("Hole Eimer...", colors.lightBlue)
- turtle.select(1)
- turtle.suckDirection(from, 16)
- while turtle.getItemCount() == 0 do
- sleep(1)
- turtle.suckDirection(from, 16)
- end
- sleep(pauseLength)
- note("Sauge Milch ab...", colors.lime)
- for i=1,turtle.getItemCount() do
- turtle.place()
- end
- sleep(pauseLength)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement