Guest User

Untitled

a guest
Dec 11th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.25 KB | None | 0 0
  1. -- Varibles --
  2. local apiname = "TSCL"
  3. local apiversion = "0.02"
  4. -- Functions --
  5. function fileRead(jFile)
  6. fs.open(jFile, "r")
  7. end
  8.  
  9. function rsOn(jSide)
  10. rs.setOutput(jSide, true)
  11. end
  12.  
  13. function rsOff(_jSide)
  14. rs.setOutput(jSide, false)
  15. end
  16.  
  17. function say(msg)
  18. print(msg)
  19. end
  20.  
  21. function id()
  22. return os.getComputerID()
  23. end
  24.  
  25. function getLabel()
  26. return os.getComputerLabel()
  27. end
  28.  
  29. function setCompLabel(label)
  30. os.setComputerLabel(label)
  31. end
  32.  
  33. function setDiskLabel(jSide, label)
  34. shell.run("label", "set", jSide, label)
  35. end
  36.  
  37. function getDiskLabel(jSide)
  38. shell.run("label", "get", jSide)
  39. end
  40.  
  41. function help()
  42. print("Functions in the TSCL Api: ")
  43. tscllist = {"TSCL.setCompLabel\n", "TSCL.getCompLabel\n", "TSCL.setDiskLabel\n", "TSCL.getDiskLabel\n",
  44.  "TSCL.say\n", "TSCL.rsOn\n", "TSCL.rsOff\n", "TSCL.readFile\n", "TSCL.id\n", "TSCL.saySlow" }
  45. textutils.pagedTabulate(tscllist)
  46. end
  47.  
  48. function saySlow(msg)
  49. textutils.slowPrint(msg)
  50. end
  51.  
  52. function sayTable(table)
  53. textutils.pagedTabulate(table)
  54. end
  55.  
  56. function add(a, b)
  57. c = a + b
  58. return c
  59. end
  60.  
  61. function subtract(d, e)
  62. f = d - e
  63. end
  64.  
  65. function multiply(g, h)
  66. i = g * h
  67. return i
  68. end
  69.  
  70. function divide(j, k)
  71. l = j / k
  72. return l
  73. end
  74.  
  75. function square(m)
  76. m = m * m
  77. return m
  78. end
Add Comment
Please, Sign In to add comment