Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Miner by Block Change--
- --Global Var--
- t = turtle
- base = t.inspect()
- --Functions--
- function mine()
- if not (t.inspect() == base) then
- t.dig()
- return true
- else
- return false
- end
- end
- function store()
- --select and place chest-
- t.select(1)
- t.placeUp()
- --store all besides first 2 slots--
- for i=16,3,-1 do
- t.select(i)
- t.dropUp()
- end
- --select chest slot, get chest--
- t.select(1)
- t.digUp()
- end
- function replace()
- --select and place chest--
- t.select(2)
- t.placeUp()
- --select item slot and get item--
- t.select(3)
- t.suckUp(1)
- --replace item--
- t.place()
- --select chest slot--
- t.select(2)
- --get chest--
- t.digUp()
- end
- function cycle()
- if mine() then
- store()
- replace()
- end
- end
- --Main--
- function main()
- while true do
- cycle()
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment