Advertisement
UnitedMi

Tank v1.1

Dec 11th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. TankID = "tk01"
  2. TankCT = "Oil"
  3. TankCP = 6400
  4. TankSP = 4
  5. TankCR = -1
  6.  
  7. HQID = 2
  8.  
  9. rednet.open("top")
  10.  
  11. while (true) do
  12. local senderId, msg, protocol = rednet.receive()
  13.  
  14. if (msg == "tk01") then
  15. if (rs.testBundledInput("back", colors.red) == true) then
  16. TankCR = 0
  17. elseif (rs.testBundledInput("back", colors.orange) == true) then
  18. TankCR = 4
  19. elseif (rs.testBundledInput("back", colors.yellow) == true) then
  20. TankCR = 3
  21. elseif (rs.testBundledInput("back", colors.green) == true) then
  22. TankCR = 2
  23. elseif (rs.testBundledInput("back", colors.blue) == true) then
  24. TankCR = 1
  25. end
  26.  
  27. rednet.send(HQID, TankCR, "tanks")
  28. end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement