Advertisement
sidewinder5675

LIME BUTTONS

Jun 20th, 2015
1,307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.78 KB | None | 0 0
  1. --[[Key: WITH TEXT WRITTEN OUTSIDE OF WHILE TRUE
  2.           AND COORDINATES FIXED TO >=
  3.         white=manyullyn
  4.         black=Alumite
  5.         gray=steel
  6.         yellow=gold
  7.         red=iron
  8.         pink=obsidian
  9.                   --]]
  10.  
  11. mon = peripheral.wrap("left")
  12.  
  13.  
  14.   mon.setBackgroundColor(colors.black)
  15.   mon.clear()
  16.   mon.setTextScale(1)
  17.   mon.setCursorPos(1,2)
  18.   mon.setTextColor(colors.white)
  19.   mon.write("Manyullyn")
  20.  
  21.   mon.setCursorPos(1,4)
  22.   mon.write("Alumite")
  23.  
  24.   mon.setCursorPos(1,6)
  25.   mon.write("Steel")
  26.  
  27.   mon.setCursorPos(1,8)
  28.   mon.write("Gold")
  29.  
  30.   mon.setCursorPos(1,10)
  31.   mon.write("Iron")
  32.  
  33.   mon.setCursorPos(1,12)
  34.   mon.write("Obsidian")
  35.  
  36.   mon.setCursorPos(20,2)
  37.   mon.setTextColor(colors.red)
  38.   mon.write("Clear Tank")
  39.  
  40.  while true do
  41. --Touch screen function?
  42.    event, side, x, y = os.pullEvent("monitor_touch")
  43.  
  44. --Clear Function
  45.  if x >= 20 and x <= 30 and y == 2 then
  46.    print("cleared")
  47.    rs.setBundledOutput("back",0)
  48.    rs.setOutput("bottom",true)
  49.  end
  50.  
  51.   if x >= 1 and x <= 10 and y == 2 then
  52.     rs.setBundledOutput("back",colors.white)
  53.     rs.setOutput("bottom", false)
  54.     print("manny")
  55.   end
  56.   if x >= 1 and x <= 10 and y == 2 then
  57.     mon.setCursorPos(1,2)
  58.     mon.setTextColor(colors.lime)
  59.     mon.write("Manyullyn-")
  60.   end
  61.  
  62.   if x >= 1 and x <= 10 and y == 4 then
  63.     print("Alumite")
  64.     rs.setOutput("bottom", false)
  65.     rs.setBundledOutput("back",colors.black)
  66.  end
  67.   if x >= 1 and x <= 10 and y == 4 then
  68.    mon.setCursorPos(1,4)
  69.    mon.setTextColor(colors.lime)
  70.    mon.write("Alumite-")
  71.  end
  72. --steel gray
  73.    if x >= 1 and x <= 10 and y == 6 then
  74.    print("steel")
  75.    rs.setOutput("bottom", false)
  76.    rs.setBundledOutput("back",colors.gray)
  77.    
  78. end
  79.    if x >= 1 and x <= 10 and y == 6 then
  80.    mon.setCursorPos(1,6)
  81.    mon.setTextColor(colors.lime)
  82.    mon.write("Steel-")
  83. end
  84.  
  85.  if x >= 1 and x <= 10 and y == 8 then --yellow=gold y @ 8
  86.   print("Gold")
  87.   rs.setOutput("bottom", false)
  88.   rs.setBundledOutput("back",colors.yellow)
  89.  
  90.  end
  91.  if x >= 1 and x <= 10 and y == 8 then --yellow=gold y @ 8
  92.   mon.setCursorPos(1,8)
  93.   mon.setTextColor(colors.lime)
  94.   mon.write("Gold-")
  95.  end
  96.  
  97.  if x >= 1 and x <= 10 and y == 10 then --iron=red y==10
  98.   print("iron")
  99.   rs.setOutput("bottom", false)
  100.   rs.setBundledOutput("back",colors.red)
  101. end
  102.  if x >= 1 and x <= 10 and y == 10 then --iron=red y==10
  103.   mon.setCursorPos(1,10)
  104.   mon.setTextColor(colors.lime)
  105.   mon.write("Iron-")
  106.  end
  107.  if x >= 1 and x <= 10 and y == 12 then --obsidian=pink y==12
  108.   print("Obsidian")
  109.   mon.setOutput("bottom", false)
  110.   mon.setBundledOutput("back",colors.pink)
  111. end
  112.  if x >= 1 and x <= 10 and y == 12 then --obsidian=pink y==12
  113.   rs.setCursorPos(1,12)
  114.   mon.setTextColor(color.lime)
  115.   mon.write("Obsidian-")
  116. end
  117.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement