Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = print
- local w = term.write
- local stc = term.setTextColor
- local sbc = term.setBackgroundColor
- local scp = term.setCursorPos
- local c = term.clear
- local sc = term.scroll
- local cL = term.clearLine
- local args = {...}
- rednet.open(args[2])
- ip = tonumber(args[1])
- function com(tab)
- str = ""
- for k,v in ipairs(tab) do
- if str ~= "" then
- str = str .. "," .. v
- else
- str = str .. v
- end
- end
- return str
- end
- --_G.com = com
- function n_p(str)
- rednet.send(ip,"print(\""..str.."\")")
- p(str)
- end
- function n_sc(num)
- rednet.send(ip,"scroll("..num..")")
- sc(num)
- end
- function n_cL()
- rednet.send(ip,"term.clearLine()")
- cL()
- end
- function n_w(str)
- rednet.send(ip,"term.write(\""..str.."\")")
- w(str)
- end
- function n_stc(col)
- rednet.send(ip,"term.setTextColor("..col..")")
- stc(col)
- end
- function n_sbc(col)
- rednet.send(ip,"term.setBackgroundColor("..col..")")
- sbc(col)
- end
- function n_scp(x,y)
- rednet.send(ip,"term.setCursorPos("..com({x,y})..")")
- scp(x,y)
- end
- function n_c()
- rednet.send(ip,"term.clear()")
- c()
- end
- print = n_p
- --_G.print = n_p
- term.clearLine = n_cL
- term.write = n_w
- term.setTextColor = n_stc
- term.setBackgroundColor = n_sbc
- term.setTextColour = n_stc
- term.setBackgroundColour = n_sbc
- term.setCursorPos = n_scp
- term.clear = n_c
- term.scroll = n_sc
- error("Success!")
- --print = p
- --_G = p
- --term.write = w
- --term.setTextColor = stc
- --term.setBackgroundColor = sbc
- --term.setCursorPos = scp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement