Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x,y = monitor.getSize()
- function centerText(text, yp)
- cx = math.ceil((x/2)-(string.len(text)/2))
- monitor.setCursorPos(cx,yp)
- monitor.write(text)
- end
- local time = os.time()
- time = textutils.formatTime(time,false)
- term.clear()
- term.setCursorPos(1,1)
- write("Please input status string!: ")
- inputString = read()
- term.setCursorPos(1,2)
- write("Status string input recieved! - '")
- write(inputString)
- write("'")
- term.setCursorPos(1,3)
- write("Text displayed! - ")
- write("[")
- write(time)
- write("]")
- term.setCursorPos(1,4)
- monitor = peripheral.wrap("*MonitorPos*")
- monitor.clear()
- monitor.setTextScale(1)
- centerText("Welcome to Mineland border", 1)
- centerText("checkpoint '*CheckpointName*'", 2)
- centerText(inputString, 4)
- --Use centerText_API!
Advertisement
Add Comment
Please, Sign In to add comment