local arg = {...} function printTable(tbl) for i,j in pairs(tbl) do print(i..":"..j) end end if arg[1] == null then term.setTextColor(colors.red) print("ERROR: Invalid argument type 'network help' for list of arguments!") term.setTextColor(colors.white) end ----------Listing Of Arguments---------- if arg[1] == "help" and arg[2] == null then term.clear() term.setCursorPos(1, 1) print(" Page 1 of 1") print("") print("") print("help:Information about specific arguments and list") print("peripheral:Information about connected peripherals") print("energy:") end if arg[1] == "help" and arg[2] == "peripheral" then term.clear() term.setCursorPos(1, 1) print(" Peripheral Help") print("") print("") print("list:Lists all connected peripherals") print("methods:Lists all methods of specified peripheral") end ----------Peripheral Control---------- if arg[1] == "peripheral" then if arg[2] == "list" then names = peripheral.getNames() term.setCursorPos(1,1) term.clear() print(" Connected peripherals") print("") print("") printTable(names) else if arg[2] == "methods" then if arg[3] == null then term.setTextColor(colors.red) print("ERROR: Invalid peripheral, type network list for list of peripheral names") term.setTextColor(colors.white) else method = peripheral.getMethods(arg[3]) term.setCursorPos(1,1) term.clear() print(" Methods for "..arg[3]) print("") print("") printTable(method) end end end end ----------Fuel Helper---------- if arg[1] == "energy" then if arg[2] == "Coal" then term.clear() term.setCursorPos(1,1) print(" Fuel:"..arg[2].." Amount:"..arg[3]) print("") print("") print("Generator:"..arg[3] * 4000 .." EU, 4000 per piece") print("Steam Engine:"..arg[3] * 4800 .." MJ, 4800 per piece") print("Solid Firebox:"..arg[3] * 3.2 .."k Heat, 3.2k per piece") print("Hobbyist's Engine:") --Math = 1.6 MJ/t for 8000 ticks print("Stirling Engine:") --Math = 1 MJ/t for 1600 ticks end if arg[2] == "Charcoal" then term.clear() term.setCursorPos(1,1) print(" Fuel:"..arg[2].." Amount:"..arg[3]) print("") print("") print("Generator:"..arg[3] * 4000 .." EU, 4000 per piece") print("Steam Engine:"..arg[3] * 3200 .." MJ, 3200 per piece") print("Solid Firebox:"..arg[3] * 1.6 .."k Heat, 1.6k per piece") print("Hobbyist's Engine:") --Math = 1.6 MJ/t for 4000 ticks print("Stirling Engine:") --Math = 1 MJ/t for 1600 ticks end if arg[2] == "CoalCoke" then term.clear() term.setCursorPos(1,1) print(" Fuel:"..arg[2].." Amount:"..arg[3]) print("") print("") print("Generator:"..arg[3] * 16000 .." EU, 16000 EU per piece") print("Steam Engine:"..arg[3] * 9600 .." MJ, 9600 per piece") print("Solid Firebox:"..arg[3] * 6.4 .."k Heat, 6.4k heat per pieces") print("Hobbyist's Engine:") --Math = 1.6 MJ/t for 16000 ticks print("Stirling Engine:") --Math = 1 MJ/t for 6400 ticks end end