Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wrap(peripheralName,peripheralVar)
- sides={"top","bottom","left","right","front","back"}
- for i=1,6 do
- if peripheral.getType(sides[i])==peripheralName then
- peripheralVar=peripheral.wrap(sides[i])
- end
- end
- end
- wrap("terminal_glasses_bridge", t)
- wrap("chat",c)
- t=peripheral.wrap("top")
- c=peripheral.wrap("left")
- chatLog={}
- for i=1,10 do
- chatLog[i]=" "
- end
- i=1
- while true do
- event, arg1, arg2, arg3 = os.pullEvent()
- if event=="chat" then
- if #chatLog >= 10 then
- for i=1, #chatLog do
- chatLog[i]=chatLog[i+1]
- end
- end
- chatLog[#chatLog+1]=arg1.." : "..arg2
- end
- if event=="chat_death" then
- if #chatLog >= 11 then
- for i=1, #chatLog do
- chatLog[i]=chatLog[i+1]
- end
- end
- chatLog[#chatLog+1]=arg1.." starb"
- end
- t.clear()
- for i=1,#chatLog do
- t.addBox(1,1,400,100,0x000000,0.1)
- t.addText(1,i*8,chatLog[i],0xffffff)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement