Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --File Updated at 2012/09/15.
- --Update changes - Fixed all bugs, now it's working, I'm still going to make it better.
- --Mining Turtle Program for Tekkit, save this as startup.
- --It will mine till bedrock, and after that go up again, and dump all it's stuff on the place it started.
- --It will Mine 15 times one side, after that, he will end up same place where he started.
- --The mode "Skip Holes" will work same as Dig, but it will skip all 1 block deep holes.
- --Have fun, please don't remove my name from menu, show me some respect atleast :).
- --Mining Turtle Program for Tekkit, save this as startup.
- --It will mine till bedrock, and after that go up again, and dump all it's stuff on the place it started.
- --It will Mine 15 times one side, after that, he will end up same place where he started.
- --The mode "Skip Holes" will work same as Dig, but it will skip all 1 block deep holes.
- -- WARNING --
- -- THERE IS BETTER VERSION ON MY PROFILE CALLED Mining Turtle - Self-saving miner, IT STILL HAS SOME BUGS, BUT IT'S BETTER THAN THIS, IT EVEN SAVES POSITION, TRY IT ;).
- os.pullEvent = os.pullEventRaw
- term.clear()
- term.setCursorPos(1,3)
- x = 1
- y = 0
- p = 0
- while true do
- print(" +-----------------+")
- print(" : Miner :")
- print(" : :")
- print(" +-----------------+")
- print(" :1.Dig. :")
- print(" :2.Skip Holes. :")
- print(" :3.Exit. :")
- print(" +-----------------+")
- term.setCursorPos(1,3)
- event, param1, param2 = os.pullEvent()
- if event == "char" and param1 == "1" then func() end
- if event == "char" and param1 == "2" then bedres() end
- if event == "char" and param1 == "3" then iziet() end
- function bedres()
- for i=1,15 do
- start()
- x = x+1
- y = y+1
- dig()
- upward()
- back()
- drop()
- end
- end
- function func()
- for i=1,15 do
- start()
- x=x+1
- y=y+1
- mine()
- up()
- back()
- drop()
- end
- end
- function dig()
- if turtle.detectDown() == false then
- turtle.dig()
- turtle.forward()
- x = x+1
- y = y+1
- dig()
- elseif turtle.detectDown() == true then
- below()
- end
- end
- function upward()
- for i=1,60 do
- turtle.up()
- end
- end
- function back()
- turtle.turnRight()
- turtle.turnRight()
- for i=1,y do
- turtle.dig()
- turtle.forward()
- end
- end
- function below()
- for i=1,60 do
- turtle.digDown()
- turtle.down()
- for i=1,1 do
- down()
- end
- end
- end
- function drop()
- turtle.select(1)
- turtle.drop()
- turtle.select(2)
- turtle.drop()
- turtle.select(3)
- turtle.drop()
- turtle.select(4)
- turtle.drop()
- turtle.select(5)
- turtle.drop()
- turtle.select(6)
- turtle.drop()
- turtle.select(7)
- turtle.drop()
- turtle.select(8)
- turtle.drop()
- turtle.select(9)
- turtle.turnRight()
- turtle.turnRight()
- end
- function start()
- for i=1,x do
- turtle.dig()
- turtle.forward()
- end
- end
- function mine()
- for i=1,60 do
- turtle.digDown()
- turtle.down()
- end
- end
- function down()
- if turtle.detectDown() == true then
- turtle.digDown()
- p = p+1
- down()
- elseif turtle.digDown() == false then
- end
- end
- function up()
- for i=1,60 do
- turtle.up()
- end
- end
- function iziet()
- term.clear()
- term.setCursorPos(1,1)
- error()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement