Advertisement
Guest User

mobctrl3

a guest
Jul 10th, 2014
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.79 KB | None | 0 0
  1. --DonEnzo 10/07/2014
  2. --Panneau de controle de la ferme a mob v.3
  3.  
  4. mon = peripheral.wrap("back")
  5. mon.setTextColor(colors.white)
  6. mon.setBackgroundColor(colors.black)
  7. mon.clear()
  8. rs.setBundledOutput("right",64)
  9. sleep(1)
  10. rs.setBundledOutput("right",0)
  11.  
  12. while true do
  13. mon.setBackgroundColor(colors.blue)
  14. mon.setCursorPos(18,1)
  15. mon.write("Mobatorture 3000")
  16. mon.setBackgroundColor(colors.cyan)
  17. mon.setCursorPos(3,4)
  18. mon.write("Mob:    Slime    Hostile    Passif    Hostile ")
  19. mon.setCursorPos(3,5)
  20. mon.write("               (Overworld)            (Nether)")
  21. mon.setCursorPos(3,7)
  22. mon.write("Etat:")
  23. mon.setCursorPos(3,11)
  24. mon.write("RF Power:")
  25. mon.setCursorPos(41,11)
  26. mon.write("Conso.:")
  27.  
  28. os.pullEvent("redstone")
  29.     i=0
  30.     j=" RF/t"
  31.     mob1 = rs.testBundledInput("bottom",1) --slime
  32.     mob2 = rs.testBundledInput("bottom",2) --hostile
  33.     mob3 = rs.testBundledInput("bottom",4) --passif
  34.     mob4 = rs.testBundledInput("bottom",8) --blaze/ghast
  35.     rfp1 = rs.testBundledInput("bottom",16)
  36.     stop1 = rs.testBundledInput("bottom",32)
  37.     mon.setBackgroundColor(colors.black)
  38.     mon.clear()
  39.      
  40.       if mob1==true or stop1==true then
  41.       mon.setBackgroundColor(colors.red)
  42.       mon.setCursorPos(12,7)
  43.       mon.write("OFF")
  44.       else
  45.       i=i+10200
  46.       mon.setBackgroundColor(colors.green)
  47.       mon.setCursorPos(12,7)
  48.       mon.write("ON")
  49.       end
  50.       if mob2==true or stop1==true then
  51.       mon.setBackgroundColor(colors.red)
  52.       mon.setCursorPos(22,7)
  53.       mon.write("OFF")
  54.       else
  55.       i=i+8800
  56.       mon.setBackgroundColor(colors.green)
  57.       mon.setCursorPos(22,7)
  58.       mon.write("ON")
  59.       end
  60.       if mob3==true or stop1==true then
  61.       mon.setBackgroundColor(colors.red)
  62.       mon.setCursorPos(32,7)
  63.       mon.write("OFF")
  64.       else
  65.       i=i+12600
  66.       mon.setBackgroundColor(colors.green)
  67.       mon.setCursorPos(32,7)
  68.       mon.write("ON")
  69.       end
  70.       if mob4==true or stop1==true then
  71.       mon.setBackgroundColor(colors.red)
  72.       mon.setCursorPos(42,7)
  73.       mon.write("OFF")
  74.       else
  75.       i=i+1200
  76.       mon.setBackgroundColor(colors.green)
  77.       mon.setCursorPos(42,7)
  78.       mon.write("ON")
  79.       end
  80.       if stop1==true then
  81.       i=0
  82.       mon.setBackgroundColor(colors.gray)
  83.       mon.setCursorPos(19,12)
  84.       mon.write("ARRET D'URGENCE")
  85.       else
  86.       mon.setBackgroundColor(colors.red)
  87.       mon.setCursorPos(19,12)
  88.       mon.write("ARRET D'URGENCE")
  89.       end
  90.       mon.setBackgroundColor(colors.blue)
  91.       mon.setCursorPos(41,12)
  92.       mon.write(i..j)
  93.       if rfp1==true then
  94.       mon.setCursorPos(6,12)
  95.       mon.setBackgroundColor(colors.green)
  96.       mon.write("ON")
  97.       else
  98.       mon.setCursorPos(6,12)
  99.       mon.setBackgroundColor(colors.red)
  100.       mon.write("OFF")
  101.       end
  102. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement