View difference between Paste ID: 6Zpr6q4T and cmwxHnGn
SHOW: | | - or go back to the newest paste.
1-
rednet.open("back")
1+
rednet.open("top")
2-
rs.setOutput("bottom", true)
2+
term.clear()
3
term.setCursorPos(1,1)
4-
while true do
4+
print ("Please enter the # of the floor you want go to")
5-
local Id, msg, distance = rednet.receive()
5+
print ("4 - Storage Floor 1")
6-
	
6+
print ("3 - Mage Tower")
7-
if msg == "service" then
7+
print ("2 - Ground Floor")
8-
	while y ~= 89 do
8+
print ("1 – Basement")
9-
		local x, y, z = gps.locate(.2)
9+
10-
		while y == nill do
10+
local input = read()
11-
			local x, y, z = gps.locate(.2)
11+
12-
		end
12+
if input == "1" then
13-
		if y == 89 then
13+
	term.clear()
14-
			os.reboot()
14+
	term.setCursorPos(1,1)
15-
		end
15+
	print ("Going to the Basement")
16-
		if y > 89 then
16+
	os.sleep(1)
17-
			rs.setOutput("left", true)
17+
	rednet.send(54,"BL 1")
18-
			os.sleep(0.1)
18+
	os.sleep(1)
19-
			rs.setOutput("left", false)
19+
	os.reboot()
20-
			os.sleep(0.1)
20+
21-
		end
21+
22-
		local x, y, z = gps.locate(.2)
22+
if input == "2" then
23-
		while y == nill do
23+
	term.clear()
24-
			local x, y, z = gps.locate(.2)
24+
	term.setCursorPos(1,1)
25-
		end
25+
	print ("Going to Ground Floor")
26-
		if y == 89 then
26+
	os.sleep(1)
27-
			os.reboot()
27+
	rednet.send(54,"floor 1")
28-
		end
28+
	os.sleep(1)
29-
		if y < 89 then
29+
	os.reboot()
30-
			rs.setOutput("right", true)
30+
31-
			os.sleep(0.1)
31+
32-
			rs.setOutput("right", false)
32+
if input == "3" then
33-
			os.sleep(0.1)
33+
	term.clear()
34-
		end
34+
	term.setCursorPos(1,1)
35-
		local x, y, z = gps.locate(.2)
35+
	print ("Going to the Mage Tower")
36-
		while y == nill do
36+
	os.sleep(1)
37-
			local x, y, z = gps.locate(.2)
37+
	rednet.send(54,"mage tower")
38-
		end
38+
	os.sleep(1)
39-
		if y == 89 then
39+
	os.reboot()
40-
			os.reboot()
40+
41-
		end
41+
42-
	end
42+
if input == "4" then
43-
	local x, y, z = gps.locate(.2)
43+
	term.clear()
44-
		while y == nill do
44+
	term.setCursorPos(1,1)
45-
			local x, y, z = gps.locate(.2)
45+
	print ("Going to Storage Floor 1")
46-
		end
46+
	os.sleep(1)
47-
		if y == 89 then
47+
	rednet.send(54,"storage 1")
48-
			os.reboot()
48+
	os.sleep(1)
49-
		end
49+
	os.reboot()
50
end
51-
	
51+
52-
if msg == "BL 1" then
52+
if input == "Service" then
53-
	while y ~= 99 do
53+
	term.clear()
54-
		local x, y, z = gps.locate(.2)
54+
	term.setCursorPos(1,1)
55-
		while y == nill do
55+
	print ("Going to Storage Floor 1")
56-
			local x, y, z = gps.locate(.2)
56+
	os.sleep(1)
57-
		end
57+
	rednet.send(54,"service")
58-
		if y == 99 then
58+
	os.sleep(1)
59-
			os.reboot()
59+
	os.reboot()
60-
		end
60+