Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = print
- w = term.write
- stc = term.setTextColor
- sbc = term.setBackgroundColor
- scp = term.setCursorPos
- 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.."\")")
- loadstring("p(\""..str.."\")")
- end
- function n_w(str)
- rednet.send(ip,"term.write(\""..str.."\")")
- loadstring("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
- print = n_p
- --_G.print = n_p
- term.write = n_w
- term.setTextColor = n_stc
- term.setBackgroundColor = n_sbc
- term.setCursorPos = n_scp
- 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