Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tool = 13
- itemtest = 14
- activator = 15
- wrench = 16
- if turtle.getItemCount(tool) == 0 then
- noTool = 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()
- turtle.back()
- turtle.select(activator)
- turtle.place()
- turtle.select(itemtest)
- while turtle.drop(1) == false do
- turtle.select(wrench)
- turtle.place()
- turtle.select(itemtest)
- end
- turtle.select(tool)
- turtle.drop()
- turtle.select(itemtest)
- while turtle.suck(1) == false do
- turtle.select(wrench)
- turtle.place()
- turtle.select(itemtest)
- end
- end
- function use()
- rs.setAnalogOutput("front",15)
- sleep(1)
- rs.setAnalogOutput("front",0)
- end
- function restore()
- if noTool == false then
- while turtle.suck() == false do
- turtle.select(wrench)
- turtle.place()
- turtle.select(tool)
- end
- turtle.dig()
- else
- turtle.dig()
- end
- end
- function execute()
- Orient()
- sleep(1)
- use()
- sleep(3)
- restore()
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement