Advertisement
vacanickel

Untitled

Sep 4th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. local w,h = term.getSize()
  2. local health = 20
  3. local happyTama = {"O O", " O O ", " O O ", " O O ", " O "}
  4. local tamaEyes = {" O O "," X X "," v v "}
  5.  
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. print("Health:")
  9. while true do
  10. if health > 15 then
  11. --Happy
  12. print("\n\n\n\n\n\n\n Dodo?")
  13. term.setTextColor(colors.lime)
  14. term.setCursorPos(21,5)
  15. term.clearLine()
  16. print(tamaEyes[1])
  17. term.setCursorPos(21,7)
  18. term.clearLine()
  19. print(happyTama[1])
  20. term.setCursorPos(21,8)
  21. print(happyTama[2])
  22. term.setCursorPos(21,9)
  23. print(happyTama[3])
  24. term.setCursorPos(21,10)
  25. print(happyTama[4])
  26. term.setCursorPos(21,11)
  27. term.clearLine()
  28. print(happyTama[5])
  29. term.setCursorPos(1,2)
  30. elseif health > 10 and health < 15 then
  31. --Meh
  32. term.setTextColor(colors.yellow)
  33. term.setCursorPos(21,5)
  34. term.clearLine()
  35. print(tamaEyes[1])
  36. term.setCursorPos(21,7)
  37. term.clearLine()
  38. term.setCursorPos(21,8)
  39. term.clearLine()
  40. term.setCursorPos(1,2)
  41. elseif health > 5 and health < 10 then
  42. --Sad
  43. term.setTextColor(colors.orange)
  44. term.setCursorPos(21,5)
  45. term.clearLine()
  46. print(tamaEyes[1])
  47. term.setCursorPos(21,7)
  48. term.clearLine()
  49. term.setCursorPos(21,8)
  50. term.clearLine()
  51. print(sadTama[2])
  52. term.setCursorPos(1,2)
  53. elseif health > 1 and health < 5 then
  54. --Mad
  55. term.setTextColor(colors.red)
  56. term.setCursorPos(21,5)
  57. term.clearLine()
  58. print(tamaEyes[3])
  59. term.setCursorPos(21,7)
  60. term.clearLine()
  61. term.setCursorPos(21,8)
  62. term.clearLine()
  63. print(sadTama[2])
  64. term.setCursorPos(1,2)
  65. end
  66. print(string.rep("|",health))
  67. event,button=os.pullEvent("mouse_click")
  68. if sleep(500) then
  69. health = health - 1
  70. if button == 1 and health > 1 then
  71. health = health + 1
  72. term.setCursorPos(1,2)
  73. term.clearLine()
  74. else
  75. --Dead
  76. term.setCursorPos(21,5)
  77. term.clearLine()
  78. print(tamaEyes[2])
  79. term.setCursorPos(21,7)
  80. term.clearLine()
  81. print(mehTama[1])
  82. term.setCursorPos(21,8)
  83. term.clearLine()
  84. sleep(3)
  85. term.clear()
  86. term.setCursorPos(1,1)
  87. break
  88. end
  89. end
  90. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement