Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- activator=15
- wrench=16
- tool=1
- ran=2
- if turtle.getItemCount(1)==0 then
- noItem=true
- end
- function organize()
- for i=1,16 do
- turtle.select(i)
- s1=turtle.getItemDetail()
- if s1 and s1.name=="ThermalExpansion:Device" then
- turtle.transferTo(15)
- end
- if s1 and s1.name=="BuildCraft|Core:wrenchItem"
- then
- turtle.transferTo(16)
- end
- end
- end
- function Orient()
- shell.run("go bk")
- turtle.select(activator)
- turtle.place()
- turtle.select(ran)
- while turtle.drop(1)==false do
- turtle.select(wrench)
- turtle.place()
- turtle.select(ran)
- end
- turtle.select(tool)
- turtle.drop()
- turtle.select(ran)
- while turtle.suck(1)==false do
- turtle.select(wrench)
- turtle.place()
- turtle.select(ran)
- end
- end
- function use()
- rs.setAnalogOutput("front",15)
- sleep(1)
- rs.setAnalogOutput("front",0)
- end
- function restore()
- if not noItem then
- while turtle.suck()==false do
- turtle.select(wrench)
- turtle.place()
- turtle.select(tool)
- end
- turtle.dig()
- else
- turtle.dig()
- end
- end
- function doIt()
- Orient()
- sleep(1)
- use()
- sleep(3)
- restore()
- shell.run("go fd")
- end
- while true do
- axe = 0
- quicklime = 0
- time = os.time()
- if time > 2.000 then
- shell.run("go up 2")
- turtle.select(2)
- turtle.placeDown()
- for i = 1, 14 do
- turtle.select(i)
- item = turtle.getItemDetail()
- if item then
- if item.name == "minecraft:stone_axe" then
- axe = i
- print("Axe detected in slot ")
- end
- if item.name == "witchery:ingredient" and item.damage == 16 then
- quicklime = i
- print("Quicklime detected in slot ")
- end
- end
- end
- if axe == 0 or quicklime == 0 then
- print("ALERT: Out of supplies. Daytime imminent...")
- else
- turtle.select(axe)
- turtle.drop()
- turtle.select(quicklime)
- turtle.drop()
- organize()
- for i=2,2 and 15,16 do
- turtle.select(i)
- if turtle.getItemCount()<1 then
- break
- else
- doIt()
- end
- end
- turtle.digDown()
- shell.run("go down 2")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement