Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- local args = {...}
- local idet = peripheral.wrap("right")
- oreF = 0
- oreB = 0
- oreT = 0
- function oreList()
- t = { 0,1,2,3,4,5,12,13,17,20,24,49,87,88 }
- end
- function table.contains(table, element)
- for _, value in pairs(table) do
- if value == element then
- return true
- end
- end
- return false
- end
- --[[
- function oreVein()
- while p == true do
- blockFront = idet.IDetect()
- blockTop = idet.IDetectUp()
- blockBottom = ider.IDetectDown()
- if not table.contains(t,blockFront) then
- turtle.dig()
- turtle.forward()
- oreVein()
- elseif not table.contains(t,blockTop) then
- turtle.digUp()
- turtle.up()
- oreVein()
- elseif not table.contains(t,blockTop) then
- turtle.digDown()
- turtle.down()
- oreVein()
- end
- end
- end
- --]]
- function orecheck()
- blockFront = idet.IDetect()
- blockTop = idet.IDetectUp()
- blockBottom = idet.IDetectDown()
- if not table.contains(t,blockFront) and oreF not == 1 then
- turtle.dig()
- oreF = 1
- print("mined front")
- orecheck()
- elseif not table.contains(t,blockTop) then
- turtle.digUp()
- oreT = 1
- print("mined top")
- orecheck()
- elseif not table.contains(t,blockBottom) then
- turtle.digDown()
- oreB = 1
- print("mined bottom")
- orecheck()
- elseif table.contains(t,blockFront) then
- end
- end
- oreList()
- orecheck()
- print(oreF)
- print(oreB)
- print(oreT)
Advertisement
Add Comment
Please, Sign In to add comment