Hadn69

Untitled

Oct 21st, 2020 (edited)
995
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local monitor = peripheral.wrap("monitor_2")
  2. local modem = peripheral.wrap("modem_0")
  3. local minNumber = 11
  4. local maxNumber = 999
  5. local bigNumbers = { 25 , 50 , 75 , 100 }
  6. local littleNumbers = { 1 , 1 , 2 , 2 , 3 , 3 , 4 , 4 , 5 , 5 , 6 , 6 , 7 , 7 , 8 , 8 , 9 , 9 , 10 , 10 }
  7.  
  8. local function targetGen()
  9.     return math.random(minNumber,maxNumber)
  10. end
  11.  
  12. local function numberGen(arg1)
  13.     local numbers = {}
  14.     if arg1 > 0 then
  15.         for i = 1, arg1, 1 do
  16.             local random = math.random(1,4)
  17.             numbers[i] = bigNumbers[random]
  18.         end
  19.     end
  20.     for i = 6 - arg1, 6, 1 do
  21.         local random = math.random(1,20)
  22.         numbers[i] = littleNumbers[random]
  23.     end
  24.     return numbers
  25. end
  26.  
  27. term.redirect(monitor)
  28.  
  29. local numbers = numberGen(1)
  30.  
  31. monitor.setTextScale(2)
  32.  
  33. term.setBackgroundColor(colors.lightBlue)
  34. term.clear()
  35. term.setCursorPos(1,1)
  36. paintutils.drawBox(3,2,3+8,2,colors.blue)
  37. paintutils.drawBox(3,4,3+8,4,colors.blue)
  38. term.setCursorPos(3,2)
  39. term.write("Gnomecast")
  40. term.setCursorPos(3,3)
  41. term.write(targetGen())
  42. term.setCursorPos(3,4)
  43. for i = 1, 6, 1 do
  44.     term.write(numbers[i])
  45. end
  46.  
  47. term.redirect(term.native())
  48.  
  49.  
  50.  
  51.  
RAW Paste Data