Advertisement
Guest User

Programm LUA

a guest
Dec 10th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. rednet.open("top")
  2. while true do
  3. fo = 0
  4. sleep(0.01)
  5. furnace = rs.getAnalogInput("left")
  6. if furnace == 0 then
  7. fo=15
  8. else
  9. if furnace == 1 then
  10. fo=14
  11. else
  12. if furnace == 2 then
  13. fo=13
  14. else
  15. if furnace == 3 then
  16. fo=12
  17. else
  18. if furnace == 4 then
  19. fo=11
  20. else
  21. if furnace == 5 then
  22. fo=10
  23. else
  24. if furnace == 6 then
  25. fo=9
  26. else
  27. if furnace == 7 then
  28. fo=8
  29. else
  30. if furnace == 8 then
  31. fo=7
  32. else
  33. if furnace == 9 then
  34. fo=6
  35. else
  36. if furnace == 10 then
  37. fo=5
  38. else
  39. if furnace == 11 then
  40. fo=4
  41. else
  42. if furnace == 12 then
  43. fo=3
  44. else
  45. if furnace == 13 then
  46. fo=2
  47. else
  48. if furnace == 14 then
  49. fo=1
  50. else
  51. fo = 0
  52. end
  53. end
  54. end
  55. end
  56. end
  57. end
  58. end
  59. end
  60. end
  61. end
  62. end
  63. end
  64. end
  65. end
  66. end
  67. rednet.broadcast("fo")
  68. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement