View difference between Paste ID: FFpY2V5c and BaBEfuc2
SHOW: | | - or go back to the newest paste.
1-
-- pastebin get BaBEfuc2 miner
1+
-- pastebin get FFpY2V5c worldeater
2
   
3-
yLevel = 0
3+
4
block = "false"
5
data = "false"
6
height = 0
7-
height = 55
7+
8-
 
8+
9
  height = 0
10
  while true do
11
    block,data = turtle.digDown()
12
      if data == "Unbreakable block detected" then
13
        break
14
      end
15
    while turtle.dig() do
16
    end
17
	height = height + 1
18
    turtle.down()
19
  end
20
end
21-
function empty() -- place enderchest and empty. this function is run after clear()
21+
22
function empty() -- place soryn chest and empty. this function is run after clear()
23
  while turtle.dig() do
24
    sleep(.2)
25
  end
26
  while turtle.digUp() do
27
	sleep(.2)
28
  end
29
  turtle.turnRight()
30
  turtle.turnRight()
31
  while turtle.dig() do
32-
  turtle.dig()
32+
    sleep(.3)
33
  end
34
  turtle.select(16)
35
  turtle.place()
36
  for i = 1, 14 do
37
    turtle.select(i)
38
    turtle.drop()
39
  end
40
  turtle.turnRight()
41-
function clear() -- check area for bedrock
41+
  turtle.turnRight()
42-
  for i = 1, 5 do
42+
43
  while turtle.dig() do
44
    sleep(.2)
45
  end
46-
  turtle.dig()
46+
47
  while turtle.dig() do
48
    sleep(.2)
49
  end
50
  turtle.forward()
51
end
52
53
-----------------------
54
function turtleRefuel()
55
  if turtle.getFuelLevel() < 5000 then
56
  for i=1,14 do
57
    turtle.select(i)
58
    turtle.refuel()
59
    turtle.select(1)
60
  end
61
  end
62
end
63
-----------------------
64
function lowFuel() -- checks for low fuel and waits if at top of loop
65
  if turtle.getFuelLevel() < 200 then
66-
  local i = turtle.getItemCount(15)-1
66+
67
  turtle.refuel(turtle.getItemCount(15)-1)
68-
  turtle.refuel(i)
68+
69
  print("WARNING: Low Fuel")
70
  if yLevel > height then
71
    print("Waiting for fuel")
72
    os.pullEvent("turtle_inventory")
73
  end
74
  end
75
end
76
---------------------
77
function self()
78
  turtleRefuel()
79
  lowFuel()
80
  lowFuel()
81
  turtle.getFuelLevel()
82
end
83
--------------------
84
function minerUp() -- bottom to top mining
85-
  for i=0,height do
85+
  for i=1,height do
86
  while turtle.digUp() do
87
    sleep(.2)
88
  end
89
  while turtle.dig() do
90
    sleep(.2)
91
  end
92
  turtle.up()
93
  end
94
end
95
-------------------
96
function inventory() -- check for fuel and enderchest
97
  print("fuel in slot 15")
98-
  print("enderchest in slot 16")
98+
  print("64x chests in slot 16")
99
  turtle.dig() --just in case it is placed before a restart
100
  while turtle.getItemCount(16) == 0 do
101
    os.pullEvent("turtle_inventory")
102
  end
103-
  while turtle.getItemDetail(16).name ~= "EnderStorage:enderChest" do
103+
104-
    print("ender chest in slot 16")
104+
105
-- Main function
106
-- start with going to bedrock
107
108
inventory()
109
-- the turtle miner is now ready
110
111
while turtle.getItemCount(16) > 1 do
112
bottom()
113
self()-- fuel check
114-
  print("Reached Bedrock")
114+
empty()-- place chest, empty, "leave" chest, move into postion
115-
  yLevel=0
115+
116
minerUp()
117
self()-- fuel check
118-
while true do
118+
empty()-- place chest, empty, "leave" chest, move into postion
119
  print("Mining Down")
120-
clear()-- making room for chest
120+