Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function a()
- --shell.run("LTAPI.lua")
- daten = ltapi.laden()
- end
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function laden()
- file = fs.open("daten.dat","r")
- if file ~= nil then
- datei = file.readAll()
- file.close()
- --daten = textutils.unserialise(datei)
- return textutils.unserialise(datei)
- end
- end
- function speichern(daten)
- file = fs.open("daten.dat","w")
- file.write(textutils.serialise(daten))
- file.close()
- end
- function farben()
- a()
- term.setBackgroundColor(daten.hfarbe)
- term.setTextColor(daten.tfarbe)
- end
- function writeCentered(text,y)
- x = term.getSize()
- x = (x/2)-(#text/2)
- term.setCursorPos(x,y)
- term.write(text)
- end
- function writeCenteredAS(text,y)
- x = term.getSize()
- x = (x/2)-(#text/2)
- term.setCursorPos(x,y)
- ltapi.pas(text)
- end
- function pas(text)
- a()
- present = false
- if peripheral.getType("right") == "speaker" then
- present = true
- speaker = peripheral.wrap("right")
- elseif peripheral.getType("left") == "speaker" then
- present = true
- speaker = peripheral.wrap("left")
- end
- if present == true then
- speaker.speak(text)
- end
- print(text)
- end
- function psw(text)
- ltapi.pas(text)
- os.pullEvent("mouse_click")
- end
- function version()
- file = fs.open("version.dat","r")
- versionsinfos = textutils.unserialise(file.readAll())
- file.close()
- return versionsinfos.version
- end
- function pastebincode()
- file = fs.open("version.dat","r")
- versionsinfos = textutils.unserialise(file.readAll())
- file.close()
- return versionsinfos.pastebincode
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement