Advertisement
Guest User

test2

a guest
Feb 7th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. --jet = peripheral.wrap("left")
  2. --for k,v in pairs(jet) do print(k) end
  3.  
  4.  
  5. modem = peripheral.wrap("left")
  6. name = modem.getNamesRemote()
  7.  
  8. turbine = {}
  9. cell = {}
  10. tCount = 0
  11. cCount = 0
  12.  
  13. for i = 1 , #name, 1 do
  14.   p = peripheral.wrap(name[i])
  15.  
  16.   if name[i]:match 'BigReactor' then
  17.     tCount = tCount + 1
  18.     turbine[tCount] = p
  19.   else
  20.     cCount = cCount + 1
  21.     cell[cCount] = p
  22.   end
  23. end
  24.  
  25. print(tCount," Turbines, ",cCount," Reactor connected.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement