Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tpimg = paintutils.loadImage("file.img")
- btmimg = paintutils.loadImage("file2.img")
- --ws, err = http.websocket("put ip here")
- --if err ~= nil then
- -- print("OOPSIE WOOPSIE!!!!!!")
- -- error()
- --end
- paintutils.drawImage(tpimg, 1, 1)
- file = io.open("PPDATA.DTA", "r")
- file:write("")
- file:flush()
- if file:read("a") == "" then
- term.setCursorPos(3, 17)
- print("oh u dont hab username, i fixx. type username")
- term.setCursorPos(3, 18)
- user = io.read()
- file = io.open("PPDATA.DTA", "a")
- file:write(user)
- file:flush()
- end
- file = io.open("PPDATA.DTA", "r")
- user = file:read("*all")
- paintutils.drawImage(tpimg, 1, 1)
- place = 2
- local function padstring(lr, text)
- length = string.len(text)
- UNlength = string.len(user)
- bth = length + UNlength + 2
- if bth <= lr -2 then
- place = place +1
- return(user..": "..text)
- else
- term.setCursorPos(3, 17)
- print("excuse me pls type less!!!!!")
- sleep(1.5)
- paintutils.drawImage(btmimg, 1, 9)
- end
- end
- while true do
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.white)
- term.setCursorPos(3, 17)
- uinput = io.read()
- if place >= 7 then
- paintutils.drawImage(tpimg, 1, 1)
- place = 2
- else
- paintutils.drawImage(btmimg, 1, 9)
- end
- term.setCursorPos(2, place)
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.white)
- print(padstring(51, uinput))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement