View difference between Paste ID: qL9nfNc0 and d9CBNDCz
SHOW: | | - or go back to the newest paste.
1
--[[
2
	2013 (c) psychedelixx
3-
	Minecraft Turtle: Diagonal Hallway
3+
	Minecraft Turtle: Rescue Stairs
4
	2013-05-24
5
6-
	Digs a diagonal hallway and places missing ground blocks and torches.
6+
	Digs a 2x2 rescue stair straight up.
7
8
	Usage: 
9
	- use turtle and type "label set <name>" 
10
	  (to give your turtle an unique name so it remembers its programs)
11-
	- type "pastebin get d9CBNDCz diagonal"
11+
	- type "pastebin get qL9nfNc0 rescue"
12
	- place solid blocks in slot 16 (lower right corner)
13-
	- place torches in slot 15 (left of slot 16)
13+
	- type "rescue"
14-
	- type either "diagonal left ###" or "diagonal right ###" (replace ### with a number)
14+
15
16
function move()
17
        if turtle.getFuelLevel() < 2 then
18-
	print(turtle.getFuelLevel())
18+
19-
        if turtle.getFuelLevel() < 5 then
19+
20
        if fillGround and not turtle.detectDown() then 
21
                turtle.select(16)
22-
        if not turtle.detectDown() then 
22+
23
        end
24
 
25
        while not turtle.forward() do
26
                turtle.dig()
27
        end
28
        repeat
29
                turtle.digUp()
30
        until not turtle.detectUp()
31
end
32-
local args = { ... }
32+
33-
if #args < 2 then
33+
34-
  print( "Usage: diagonal <direction> (right / left) <limit>" )
34+
35-
  error()
35+
36
37-
dir = args[1]
37+
38-
limit = tonumber(args[2])
38+
39
else
40
	print("======== 2013 (c) psychedelixx ========")
41
	print("Let's go!")
42
43
	hollow = 0
44
	move()
45
	while turtle.getFuelLevel() > 0 and hollow < 6 do
46
		print("")
47
		print("Fuel: " .. turtle.getFuelLevel())
48
	
49
		move()
50
		turtle.up()
51-
	turtle.digUp()
51+
		if not turtle.detectUp() then 
52-
	if dir == "left" then
52+
			hollow = hollow + 1 
53
		end
54-
	else
54+
55-
		turtle.turnRight()
55+
56
	end
57
	repeat
58-
	turtle.digUp()
58+
59-
	if dir == "left" then
59+
		hollow = hollow - 1
60-
		turtle.turnRight()
60+
	until hollow <=0
61-
	else
61+