View difference between Paste ID: rWxdCdQ0 and ASa2uiTC
SHOW: | | - or go back to the newest paste.
1-
rednet.open("back")
1+
deviceFunction = nil
2-
term.clear()
2+
3-
term.setCursorPos(1, 1)
3+
	function start()
4-
version = 1.2
4+
5
	term.setTextColor(colors.cyan)
6-
 function startupClear()
6+
7-
    f = fs.open("startup", "w")
7+
	term.setCursorPos(1,1)	
8-
    f.write("shell.run('pastebin run ASa2uiTC')")
8+
	print("What is the function of this computer? [toggler,pocket,monitor,updater,smeltery]")
9-
    f.close()
9+
                write(">")
10-
                end
10+
                command = read()
11
                deviceFunction = command:lower()
12-
local function readCommand()
12+
                term.clear()
13-
        local command = read()
13+
		runCorrespondingProgram()
14-
        return command
14+
15-
end
15+
16
17-
function autoMode()
17+
18-
sender, message = rednet.receive()
18+
	function runCorrespondingProgram()
19
20-
	if message == "running" then
20+
		if deviceFunction == "pocket" then
21-
		term.setTextColor(colors.red)
21+
			shell.run("delete pocket")
22-
		print("UberMiner : AutoMode, is already running somewhere else")
22+
			shell.run("pastebin get ASa2uiTC pocket")
23
			shell.run("pocket")
24-
	else if message == true then
24+
25-
		term.setTextColor(colors.lime)
25+
		else if (deviceFunction == "toggler") then
26-
		print("UberMiner : AutoMode, now online!")
26+
			shell.run("delete toggler")
27
			shell.run("pastebin get J1ErE7pj toggler")
28
			shell.run("toggler")
29-
		term.setTextColor(colors.red)
29+
30-
		print("UberMiner : AutoMode, now offline.")
30+
		else if (deviceFunction == "smeltery") then
31
			shell.run("delete smeltery")
32-
end
32+
			shell.run("pastebin get 1xTMADeX smeltery")
33-
sleep(2)
33+
			shell.run("smeltery")
34-
end
34+
35
		else if (deviceFunction == "monitor") then
36-
local function processCommand(command)
36+
			shell.run("pastebin run ")
37-
	if command:lower() == "/help" then
37+
38-
		term.clear()
38+
		else if (deviceFunction == "updater") then
39-
		term.setCursorPos(1, 1)
39+
			shell.run("pastebin run ")
40-
		term.setTextColor(colors.red)
40+
41-
		print("List o' Commands:")
41+
42-
		term.setTextColor(colors.cyan)
42+
		print("Sorry deviceFunction set is not a function. [Type slower Elite]")
43-
		print("/wither | /w -- Spawns and Kills a Wither!")
43+
44-
		print("/autoMode | /am -- Puts UberMiner on/off AutoMode")
44+
	end
45-
		print("/forward | /f -- UberMiner Forward!")
45+
	end
46-
		print("/reboot | /r -- Reboot the computer to refresh the program")
46+
	end
47-
		print("/help -- List o' Commands (Obviously)")
47+
	end
48-
		term.setTextColor(colors.red)
48+
	end
49-
		print("Press any key to return to prompt")
49+
	end
50-
		os.pullEvent("key")
50+
51
	start()