anakin23805

county

Mar 13th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.17 KB | None | 0 0
  1. mon = peripheral.wrap("right")
  2. note = peripheral.wrap("top")
  3.  
  4. mon.setCursorPos(1,1)
  5. mon.clear()
  6. mon.setTextScale(1)
  7. mon.setBackgroundColor(colors.black)
  8. mon.setTextColor(colors.white)
  9.  
  10. count = 0
  11. val1 = 0
  12. val2 = 0
  13. val3 = 0
  14. val4 = 0
  15. val5 = 0
  16. val6 = 0
  17. val7 = 0
  18. val8 = 0
  19. val9 = 0
  20. val10 = 0
  21. val11 = 0
  22. val12 = 0
  23. val13 = 0
  24. val14 = 0
  25. val15 = 0
  26. val16 = 0
  27. while true do
  28.     random = math.random(1,32768)
  29.     if random == 1 then
  30.         val1 = val1 + 1
  31.     elseif random == 2 then
  32.         val2 = val2 + 1
  33.     elseif 2 < random and random <= 4 then
  34.         val3 = val3 + 1
  35.     elseif 4 < random and random <= 8 then
  36.         val4 = val4 + 1
  37.     elseif 8 < random and random <=16 then
  38.         val5 = val5 + 1
  39.     elseif 16 < random and random <=32 then
  40.         val6 = val6 + 1
  41.     elseif 32 < random and random <=64 then
  42.         val7 = val7 + 1
  43.     elseif 64 < random and random <= 128 then
  44.         val8 = val8 + 1
  45.     elseif 128 < random and random <= 256 then
  46.         val9 = val9 + 1
  47.     elseif 256 < random and random <= 512 then
  48.         val10 = val10 + 1
  49.     elseif 512 < random and random <= 1024 then
  50.         val11 = val11 + 1
  51.     elseif 1024 < random and random <= 2048 then
  52.         val12 = val12 + 1
  53.     elseif 2048 < random and random <= 4096 then
  54.         val13 = val13 + 1
  55.     elseif 4096 < random and random <= 8192 then
  56.         val14 = val14 + 1
  57.     elseif 8192 < random and random <= 16384 then
  58.         val15 = val15 + 1
  59.     elseif 16384 < random and random <= 32768 then
  60.         val16 = val16 + 1
  61.     else
  62.         term.clear()
  63.         print("You did something terribly wrong")
  64.     end
  65.     mon.clear()
  66.     mon.setCursorPos(1,1)
  67.     mon.write("1 - ")
  68.     for i = 1, (val1/50) do
  69.         mon.write("#")
  70.     end
  71.     mon.setCursorPos(1,2)
  72.     mon.write("2 - ")
  73.     for i = 1, (val2/50) do
  74.         mon.write("#")
  75.     end
  76.     mon.setCursorPos(1,3)
  77.     mon.write("3 - ")
  78.     for i = 1, (val3/50) do
  79.         mon.write("#")
  80.     end
  81.     mon.setCursorPos(1,4)
  82.     mon.write("4 - ")
  83.     for i = 1, (val4/50) do
  84.         mon.write("#")
  85.     end
  86.     mon.setCursorPos(1,5)
  87.     mon.write("5 - ")
  88.     for i = 1, (val5/50) do
  89.         mon.write("#")
  90.     end
  91.     mon.setCursorPos(1,6)
  92.     mon.write("6 - ")
  93.     for i = 1, (val6/50) do
  94.         mon.write("#")
  95.     end
  96.     mon.setCursorPos(1,7)
  97.     mon.write("7 - ")
  98.     for i = 1, (val7/50) do
  99.         mon.write("#")
  100.     end
  101.     mon.setCursorPos(1,8)
  102.     mon.write("8 - ")
  103.     for i = 1, (val8/50) do
  104.         mon.write("#")
  105.     end
  106.     mon.setCursorPos(1,9)
  107.     mon.write("9 - ")
  108.     for i = 1, (val9/50) do
  109.         mon.write("#")
  110.     end
  111.     mon.setCursorPos(1,10)
  112.     mon.write("10 - ")
  113.     for i = 1, (val10/50) do
  114.             mon.write("#")
  115.     end
  116.     mon.setCursorPos(1,11)
  117.     mon.write("11 - ")
  118.     for i = 1, (val11/50) do
  119.             mon.write("#")
  120.     end
  121.     mon.setCursorPos(1,12)
  122.     mon.write("12 - ")
  123.     for i = 1, (val12/50) do
  124.             mon.write("#")
  125.     end
  126.     mon.setCursorPos(1,13)
  127.     mon.write("13 - ")
  128.     for i = 1, (val13/50) do
  129.             mon.write("#")
  130.     end
  131.     mon.setCursorPos(1,14)
  132.     mon.write("14 - ")
  133.     for i = 1, (val14/50) do
  134.             mon.write("#")
  135.     end
  136.     mon.setCursorPos(1,15)
  137.     mon.write("15 - ")
  138.     for i = 1, (val15/50) do
  139.             mon.write("#")
  140.     end
  141.     mon.setCursorPos(1,16)
  142.     mon.write("16 - ")
  143.     for i = 1, (val16/50) do
  144.         mon.write("#")
  145.     end
  146.     mon.setCursorPos(1,17)
  147.     mon.write("Count - " .. count)
  148.     mon.setCursorPos(1,18)
  149.     mon.write("Current Num - " .. random)
  150.     os.sleep(0.015)
  151.     mon.setCursorPos(1,19)
  152.     mon.write("# = 50 Picks")
  153. count = count + 1
  154. end
Advertisement
Add Comment
Please, Sign In to add comment