Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.unloadAPI("mine")
- os.unloadAPI("mine2")
- os.unloadAPI("mine3")
- os.unloadAPI("mine4")
- os.unloadAPI("torch")
- os.loadAPI("mine")
- os.loadAPI("mine2")
- os.loadAPI("mine3")
- os.loadAPI("mine4")
- os.loadAPI("torch")
- score = 0
- fuel = turtle.getFuelLevel()
- term.clear()
- turtle.turnLeft()
- distance = 0
- local check = 0
- turtle.turnLeft()
- if turtle.detect() == true then
- chest = 1
- else
- chest = 2
- end
- h = fs.open("/stripmineprogramm/number","w")
- h.write(distance)
- h.close()
- mined = 0
- turtle.turnLeft()
- turtle.turnLeft()
- local tArgs = {...}
- if #tArgs < 2 == true or #tArgs > 2 == true then
- local er2 = 0
- print(" ERROR: Stripmine <Number> <number>")
- error()
- end
- input1 = tonumber(tArgs[1])
- input2 = tonumber(tArgs[2])
- if tonumber(input1) ~= nil or tonumber(input2) ~= nil then
- else
- print("ERROR: stripmine <Number> <Number>")
- error()
- end
- print("Calculate fuel ...")
- fuel = turtle.getFuelLevel()
- cal1 = ( input1*3 + input2 + input2 * 0.5 ) * 2
- block = input1 *3 * 2 + (input2 + input2) * 2 * input1
- print("Fuel needed :",cal1)
- print("Your FUEL: ",fuel)
- sleep(1.25)
- mineblock = 0
- if chest == 1 == true then
- term.clear()
- term.setCursorPos(1, 1)
- print("CHEST: ON")
- end
- if chest == 2 == true then
- term.clear()
- term.setCursorPos(1, 1)
- print("CHEST: OFF")
- end
- sleep(0.75)
- term.clear()
- term.setCursorPos(1, 1)
- fucoun = turtle.getFuelLevel()
- print("Fuel: ",fucoun)
- print("Mining Blocks: ",block)
- print("Mined Blocks: ",score)
- for i=1,input1 do
- mine2.mine()
- mine.bridge()
- score = score +1
- score = score+1
- term.clear()
- term.setCursorPos(1, 1)
- fucoun = turtle.getFuelLevel()
- print("Fuel: ",fucoun)
- print("Mining Blocks: ",block)
- print("Mined Blocks: ",score)
- mineblock = mineblock + 1
- mine2.mine()
- mine.bridge()
- score = score +1
- score = score+1
- term.clear()
- term.setCursorPos(1, 1)
- fucoun = turtle.getFuelLevel()
- print("Fuel: ",fucoun)
- print("Mining Blocks: ",block)
- print("Mined Blocks: ",score)
- mineblock = mineblock + 1
- mine2.mine()
- mine.bridge()
- score = score +1
- score = score+1
- term.clear()
- term.setCursorPos(1, 1)
- fucoun = turtle.getFuelLevel()
- print("Fuel: ",fucoun)
- print("Mining Blocks: ",block)
- print("Mined Blocks: ",score)
- mineblock = mineblock + 1
- if mineblock > 4 == true then
- torch.torch()
- mineblock = 0
- end
- turtle.turnLeft()
- for i=1,input2 do
- mine2.mine()
- mine.bridge()
- score = score +1
- score = score+1
- term.clear()
- term.setCursorPos(1, 1)
- fucoun = turtle.getFuelLevel()
- print("Fuel: ",fucoun)
- print("Mining Blocks: ",block)
- print("Mined Blocks: ",score)
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for i =1,input2 do
- mine2.mine()
- end
- for i=1,input2 do
- mine2.mine()
- mine.bridge()
- score = score +1
- score = score+1
- term.clear()
- term.setCursorPos(1, 1)
- fucoun = turtle.getFuelLevel()
- print("Fuel: ",fucoun)
- print("Mining Blocks: ",block)
- print("Mined Blocks: ",score)
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for i =1,input2 do
- mine2.mine()
- end
- distance = distance + 1
- h = fs.open("/stripmineprogramm/number","w")
- h.write(distance)
- h.close()
- turtle.turnRight()
- drop2 = 0
- for i =1,16 do
- drop2 = drop2 + 1
- turtle.select(drop2)
- count3 = turtle.getItemCount()
- if count3 >= 1 == true then
- item = turtle.getItemDetail()
- if item.name == "minecraft:torch" == false then
- item2 = turtle.getItemCount()
- mined = mined + item2
- end
- end
- end
- if chest == 1 == true then
- mine3.check()
- mine4.refuel()
- end
- end
- if chest == 1 == true then
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.up()
- te = input1*3
- for i = 1,te do
- mine2.mine2()
- end
- turtle.down()
- mine.clear()
- end
- term.clear()
- term.setCursorPos(1,1)
- print("Finish")
- print("Items Mined: ",score)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement