Advertisement
1ng0

CC - Liquid Control

Nov 28th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.93 KB | None | 0 0
  1. --
  2. -- https://www.youtube.com/watch?v=97gSDBouzpI
  3. --
  4. --[[Key: WITH TEXT WRITTEN OUTSIDE OF WHILE TRUE
  5.           AND COORDINATES FIXED TO >=
  6.         white=bedrockium
  7.         black=cobalt
  8.         gray=steel
  9.         yellow=gold
  10.         red=iron
  11.         pink=obsidian
  12.                   --]]
  13.  
  14. mon = peripheral.wrap("right")
  15. rs.setOutput("bottom",false)
  16.  
  17.   mon.setBackgroundColor(colors.black)
  18.   mon.clear()
  19.   mon.setTextScale(1)
  20.   mon.setCursorPos(1,2)
  21.   mon.setTextColor(colors.white)
  22.   mon.write("Bedrockium")
  23.  
  24.   mon.setCursorPos(1,4)
  25.   mon.write("Cobalt")
  26.  
  27.   mon.setCursorPos(1,6)
  28.   mon.write("Steel")
  29.  
  30.   mon.setCursorPos(1,8)
  31.   mon.write("Gold")
  32.  
  33.   mon.setCursorPos(1,10)
  34.   mon.write("Iron")
  35.  
  36.   mon.setCursorPos(1,12)
  37.   mon.write("Obsidian")
  38.  
  39.   mon.setCursorPos(20,2)
  40.   mon.setTextColor(colors.red)
  41.   mon.write("Clear Tank")
  42.  
  43.  while true do
  44. --Touch screen function?
  45.    event, side, x, y = os.pullEvent("monitor_touch")
  46.  
  47. --Clear Function
  48.  if x >= 20 and x <= 30 and y == 2 then
  49.    print("cleared")
  50.    rs.setBundledOutput("back",0)
  51.    rs.setOutput("bottom",true)
  52.    mon.setBackgroundColor(colors.black)
  53.    mon.clear()
  54.    mon.setTextScale(1)
  55.    mon.setCursorPos(1,2)
  56.    mon.setTextColor(colors.white)
  57.    mon.write("Bedrockium")
  58.    mon.setCursorPos(1,4)
  59.    mon.write("Cobalt")
  60.    mon.setCursorPos(1,6)
  61.    mon.write("Steel")
  62.    mon.setCursorPos(1,8)
  63.    mon.write("Gold")
  64.    mon.setCursorPos(1,10)
  65.    mon.write("Iron")
  66.    mon.setCursorPos(1,12)
  67.    mon.write("Obsidian")
  68.    mon.setCursorPos(20,2)
  69.    mon.setTextColor(colors.lime)
  70.    mon.write("Clear Tank")
  71.  else
  72.    rs.setOutput("bottom",false)
  73.  end
  74.  
  75.   if x >= 1 and x <= 10 and y == 2 then
  76.     rs.setBundledOutput("back",colors.white)
  77.     rs.setOutput("bottom", false)
  78.     print("Bedrockium")
  79.   end
  80.   if x >= 1 and x <= 10 and y == 2 then
  81.     mon.setCursorPos(1,2)
  82.     mon.setTextColor(colors.lime)
  83.     mon.write("Bedrockium-")
  84.     mon.setCursorPos(20,2)
  85.     mon.setTextColor(colors.red)
  86.     mon.write("Clear Tank")
  87.   end
  88.  
  89.   if x >= 1 and x <= 10 and y == 4 then
  90.     print("Cobalt")
  91.     rs.setOutput("bottom", false)
  92.     rs.setBundledOutput("back",colors.black)
  93.  end
  94.   if x >= 1 and x <= 10 and y == 4 then
  95.    mon.setCursorPos(1,4)
  96.    mon.setTextColor(colors.lime)
  97.    mon.write("Cobalt-")
  98.    mon.setCursorPos(20,2)
  99.    mon.setTextColor(colors.red)
  100.    mon.write("Clear Tank")
  101.  end
  102. --steel gray
  103.    if x >= 1 and x <= 10 and y == 6 then
  104.    print("steel")
  105.    rs.setOutput("bottom", false)
  106.    rs.setBundledOutput("back",colors.gray)
  107.    
  108.  end
  109.    if x >= 1 and x <= 10 and y == 6 then
  110.    mon.setCursorPos(1,6)
  111.    mon.setTextColor(colors.lime)
  112.    mon.write("Steel-")
  113.    mon.setCursorPos(20,2)
  114.    mon.setTextColor(colors.red)
  115.    mon.write("Clear Tank")
  116.  end
  117.  
  118.  if x >= 1 and x <= 10 and y == 8 then --yellow=gold y @ 8
  119.   print("Gold")
  120.   rs.setOutput("bottom", false)
  121.   rs.setBundledOutput("back",colors.yellow)
  122.  
  123.  end
  124.  if x >= 1 and x <= 10 and y == 8 then --yellow=gold y @ 8
  125.   mon.setCursorPos(1,8)
  126.   mon.setTextColor(colors.lime)
  127.   mon.write("Gold-")
  128.   mon.setCursorPos(20,2)
  129.   mon.setTextColor(colors.red)
  130.   mon.write("Clear Tank")
  131.  end
  132.  
  133.  if x >= 1 and x <= 10 and y == 10 then --iron=red y==10
  134.   print("iron")
  135.   rs.setOutput("bottom", false)
  136.   rs.setBundledOutput("back",colors.red)
  137.  end
  138.  if x >= 1 and x <= 10 and y == 10 then --iron=red y==10
  139.   mon.setCursorPos(1,10)
  140.   mon.setTextColor(colors.lime)
  141.   mon.write("Iron-")
  142.   mon.setCursorPos(20,2)
  143.   mon.setTextColor(colors.red)
  144.   mon.write("Clear Tank")
  145.  end
  146.  if x >= 1 and x <= 10 and y == 12 then --obsidian=pink y==12
  147.   print("Obsidian")
  148.   rs.setOutput("bottom", false)
  149.   rs.setBundledOutput("back",colors.pink)
  150.  end
  151.   if x >= 1 and x <= 10 and y == 12 then --obsidian=pink y==12
  152. --   mon.setCursorPos(1,12)
  153. --   mon.setTextColor(color.lime)
  154. --   mon.write("Obsidian-")
  155.    mon.setCursorPos(20,2)
  156.    mon.setTextColor(colors.red)
  157.    mon.write("Clear Tank")
  158.   end
  159. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement