Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function center(str, width)
- local blank = string.rep(' ',math.floor((width-#str)/2))
- return blank .. str
- end
- function send()
- p11 = string.sub(p1,1,((string.len(p1)+1)/2))
- p12 = string.sub(p1,((string.len(p1)+1)/2))
- p21 = string.sub(p2,1,((string.len(p2)+1)/2))
- p22 = string.sub(p2,((string.len(p2)+1)/2))
- p31 = string.sub(p3,1,((string.len(p3)+1)/2))
- p32 = string.sub(p3,((string.len(p3)+1)/2))
- p41 = string.sub(p4,1,((string.len(p4)+1)/2))
- p42 = string.sub(p4,((string.len(p4)+1)/2))
- p51 = string.sub(p5,1,((string.len(p5)+1)/2))
- p52 = string.sub(p5,((string.len(p5)+1)/2))
- p61 = string.sub(p6,1,((string.len(p6)+1)/2))
- p62 = string.sub(p6,((string.len(p6)+1)/2))
- p71 = string.sub(p7,1,((string.len(p7)+1)/2))
- p72 = string.sub(p7,((string.len(p7)+1)/2))
- print("SetSign,"..p11..","..p21..","..p31..","..p41..","..p51..","..p61..","..p71)
- end
- function split(str, pat)
- local t = { }
- local fpat = "(.-)"..pat
- local last_end = 1
- local s, e, cap = str:find(fpat, 1)
- while s do
- if s ~= 1 or cap ~= "" then
- table.insert(t,cap)
- end
- last_end = e+1
- s, e, cap = str:find(fpat, last_end)
- end
- if last_end <= #str then
- cap = str:sub(last_end)
- table.insert(t, cap)
- end
- return t
- end
- function printc(stri,coordx,coordy)
- term.setCursorPos(coordx,coordy)
- write(stri)
- end
- function changetext()
- local w,h = term.getSize()
- term.clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement