Advertisement
Guest User

Happy

a guest
Jul 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. monside = "back"
  2. mon = peripheral.wrap(monside)
  3.  
  4. local xMax,yMax = mon.getSize()
  5. Apfelcounter = 0
  6. while true do
  7.  
  8. mon.clear()
  9. mon.setCursorPos(1,1)
  10. mon.setTextColor(colors.white)
  11. mon.write("made by ")
  12. sleep(0.4)
  13. mon.setTextColor(colors.orange)
  14. mon.write("Nike622000")
  15. sleep(3)
  16. mon.clear()
  17.  
  18. for i = 0,800,1 do
  19. c = math.random(15)
  20. x = math.random(xMax)
  21. y = math.random(yMax)
  22. w = math.random(4)
  23. mon.setCursorPos(x,y)
  24. c=2^c
  25.  
  26. if Apfelcounter == 300 then
  27. Apfelcounter = 0
  28. end
  29.  
  30. mon.setTextColor(c)
  31. if w == 1 then
  32. mon.write("Apfel")
  33. Apfelcounter = Apfelcounter+1
  34. term.setCursorPos(1,2)
  35. term.setTextColor(colors.lime)
  36. print("Apfelcounter: "..Apfelcounter)
  37. end
  38. if w == 2 then
  39. mon.write("Baum")
  40. end
  41. if w == 3 then
  42. mon.write("Birne")
  43. end
  44. if w == 4 then
  45. mon.write("Banane")
  46. end
  47. mon.setCursorPos(1,2)
  48. mon.write("momentane Farbe                ")
  49. mon.setCursorPos(1,1)
  50. mon.setTextColor(colors.white)
  51. mon.write("Woerter-Counter: "..i.."     ")
  52. sleep(1)
  53. end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement