Advertisement
Guest User

phase3

a guest
Nov 24th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. rednet.open("back")
  2.  
  3. text={}
  4.  
  5. while true do
  6.   id,chat,dist=rednet.receive()
  7.   fred=string.find(chat,"fred ")
  8.   fred1=string.find(chat,"fred1")
  9.   fred2=string.find(chat,"fred2")
  10.   fred3=string.find(chat,"fred3")
  11.   fred4=string.find(chat,"fred4")
  12.   fred5=string.find(chat,"fred5")
  13.   sap=string.find(chat,"sap")
  14.   relay1=string.find(chat,"relay1")
  15.  
  16.   size=8
  17.   freds={
  18.     fred,fred1,fred2,
  19.     fred3,fred4,fred5,
  20.     sap,relay1
  21.   }
  22.  
  23.   for c=1,size do
  24.     if not freds[c] then
  25.       freds[c]=0
  26.     end
  27.   end
  28.  
  29.   for c=1,size do
  30.     if freds[c]>0 then
  31.       text[c]=chat
  32.     end
  33.     if not text[c] then
  34.       text[c] = " "
  35.     end
  36.   end
  37.  
  38.   shell.run("clear")
  39.   for c=1,size do
  40.     --if text[c] ~= nil then
  41.       print(text[c])
  42.     --end
  43.   end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement