Advertisement
Scarjit

UU-Matter Glasses Startup 2.1

Feb 24th, 2014
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.02 KB | None | 0 0
  1. rednet.open("right")
  2. tank1 = peripheral.wrap('openblocks_tank_1')
  3. tank2 = peripheral.wrap('openblocks_tank_2')
  4. tank3 = peripheral.wrap('openblocks_tank_3')
  5. tank4 = peripheral.wrap('openblocks_tank_4')
  6. while true do
  7. amount = 0
  8. --  Tank 1
  9. tank1table = tank1.getTankInfo("right")
  10. if tank1table[1]["amount"] ~= nil then do
  11. amount = amount + tank1table[1]["amount"]
  12. write(tostring(amount))
  13. end
  14. end
  15. --  Tank 2
  16. tank2table = tank2.getTankInfo("right")
  17. if tank2table[1]["amount"] ~= nil then do
  18. amount = amount + tank2table[1]["amount"]
  19. write(tostring(amount))
  20. end
  21. end
  22. --  Tank 3
  23. tank3table = tank3.getTankInfo("right")
  24. if tank3table[1]["amount"] ~= nil then do
  25. amount = amount + tank3table[1]["amount"]
  26. write(tostring(amount))
  27. end
  28. end
  29. --  Tank 4
  30. tank4table = tank4.getTankInfo("right")
  31. if tank4table[1]["amount"] ~= nil then do
  32. amount = amount + tank4table[1]["amount"]
  33. write(tostring(amount))
  34. end
  35. end
  36.  
  37. --Other Funktions
  38. rednet.broadcast(amount.."xuutanks")
  39. os.sleep(10)
  40. term.clear()
  41. term.setCursorPos(1,1)
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement