Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- info={}
- x,y=term.getSize()
- x=math.floor(x/2)
- y=math.floor(y/2)
- term.clear()
- while true do
- event,side,channel,id,message,bol = os.pullEvent()
- if event=="modem_message" then
- if message["char"]~=nil then
- term.setCursorPos(message["x"],message["y"])
- term.write(message["char"])
- end
- end
- if event=="key" then
- key=side
- if key==208 then
- char="v"
- y=y+1
- end
- if key==200 then
- char="^"
- y=y-1
- end
- if key==205 then
- char=">"
- x=x+1
- end
- if key==203 then
- char="<"
- x=x-1
- end
- info["char"]=char
- info["x"]=x
- info["y"]=y
- term.setCursorPos(x,y)
- term.write(char)
- rednet.broadcast(info)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement