Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Varibles --
- local apiname = "TSCL"
- local apiversion = "0.02"
- -- Functions --
- function fileRead(jFile)
- fs.open(jFile, "r")
- end
- function rsOn(jSide)
- rs.setOutput(jSide, true)
- end
- function rsOff(_jSide)
- rs.setOutput(jSide, false)
- end
- function say(msg)
- print(msg)
- end
- function id()
- return os.getComputerID()
- end
- function getLabel()
- return os.getComputerLabel()
- end
- function setCompLabel(label)
- os.setComputerLabel(label)
- end
- function setDiskLabel(jSide, label)
- shell.run("label", "set", jSide, label)
- end
- function getDiskLabel(jSide)
- shell.run("label", "get", jSide)
- end
- function help()
- print("Functions in the TSCL Api: ")
- tscllist = {"TSCL.setCompLabel\n", "TSCL.getCompLabel\n", "TSCL.setDiskLabel\n", "TSCL.getDiskLabel\n",
- "TSCL.say\n", "TSCL.rsOn\n", "TSCL.rsOff\n", "TSCL.readFile\n", "TSCL.id\n", "TSCL.saySlow" }
- textutils.pagedTabulate(tscllist)
- end
- function saySlow(msg)
- textutils.slowPrint(msg)
- end
- function sayTable(table)
- textutils.pagedTabulate(table)
- end
- function add(a, b)
- c = a + b
- return c
- end
- function subtract(d, e)
- f = d - e
- end
- function multiply(g, h)
- i = g * h
- return i
- end
- function divide(j, k)
- l = j / k
- return l
- end
- function square(m)
- m = m * m
- return m
- end
Add Comment
Please, Sign In to add comment