Guest User

Untitled

a guest
May 28th, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1.  x = 1
  2.  function up()
  3.   x = x+1
  4.  end
  5.  function down()
  6.   x = x-1
  7.   end
  8.  
  9.  
  10. while true do
  11.  if x == 1 then
  12.   term.setCursorPos(0,0)
  13.  term.setBackGroundColor(colors.blue)
  14.  print("Wither Skeletons: "..wstat)
  15.   else
  16.    term.setCursorPos(0,0)
  17.    term.setBackGroundColor(colors.black)
  18.    print("Wither Skeletons: "..wstat)
  19.   end
  20.   if x == 2 then
  21.    term.setCursorPos(0,1)
  22.    term.setBackGroundColor(colors.blue)
  23.    print("Zombie Pigmen: "..zpstat)
  24.   else
  25.    term.setCursorPos(0,1)
  26.    term.setBackGroundColor(colors.black)
  27.    print("Zombie Pigmen: "..zpstat)
  28.   end
  29.   if x == 3 then
  30.    term.setCursorPos(0,2)
  31.    term.setBackGroundColor(colors.blue)
  32.    print("Blazes: "..blstat)
  33.   else
  34.    term.setCursorPos(0,2)
  35.    term.setBackGroundColor(colors.black)
  36.    print("Blazes: "..blstat)
  37.   end
  38.  
  39.  
  40.    
  41.    
  42.  
  43.  local event, key = os.pullEvent("key")
  44.   if key == 38 then
  45.    up()
  46.   end
  47.   if key == 40 then
  48.    down()
  49.   end
  50.   if x == 1 and key == 13 then
  51.    wsstat = not wsstat
  52.    rs.setOutput("back", wsstat)
  53.   elseif x == 2 and key == 13 then
  54.   zpstat = not zpstat
  55.    rs.setOutput("top", zpstat)
  56.   elseif x == 3 and key == 13 then
  57.    blstat = not blstat
  58.    rs.setOutput("left", blstat)
  59.  
  60.  end
  61.  end
Advertisement
Add Comment
Please, Sign In to add comment