Advertisement
Guest User

startup

a guest
Jan 24th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. local i = 1
  2.  
  3. function activer()
  4.  
  5. term.redirect(peripheral.wrap("back"))
  6. term.setBackgroundColor(colors.black)
  7. term.clear()
  8. images = paintutils.loadImage("testy"..tostring(i))
  9.  
  10. paintutils.drawImage(images, 1, 1)
  11.  
  12. if i == 2 then
  13.   i = 1
  14.  else
  15.  i=i+1
  16. end
  17. end
  18.  
  19. function eteind()
  20. term.redirect(peripheral.wrap("back"))
  21. term.setCursorPos(1, 1)
  22. term.clear()
  23. term.write("c'est eteind")
  24. end
  25.  
  26.  
  27. for k = 1, 999999999999999999999999999999999999999 do
  28. if rs.getInput("right") == true then
  29.  
  30. sleep(3)
  31. repeat
  32. sleep(2.5)
  33. if rs.getInput("right") == true then
  34.   activer()
  35.  else
  36.  eteind()
  37. end
  38. until i < 0
  39. k = 1
  40. else
  41. sleep(0.001)
  42. k = 1
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement