rickroll.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. rickIndex = 0;
  2. sound_category_master = sound.getCategory("master");
  3. sound_flute = sound.get("block.note_block.flute");
  4. sound_harp = sound.get("block.note_block.harp");
  5. sound_pling = sound.get("block.note_block.pling");
  6. playing = false;
  7. RickRollSounds = list.new();
  8. list.add(RickRollSounds, math.pow(2, -6 / 12));//6
  9. list.add(RickRollSounds, math.pow(2, -4 / 12));//8
  10. list.add(RickRollSounds, math.pow(2, -1 / 12));//11
  11. list.add(RickRollSounds, math.pow(2, -4 / 12));//8
  12. list.add(RickRollSounds, math.pow(2, 3 / 12));//15
  13. list.add(RickRollSounds, math.pow(2, 3 / 12));//15
  14. list.add(RickRollSounds, math.pow(2, 1 / 12));//13
  15. list.add(RickRollSounds, math.pow(2, -6 / 12));//6
  16. list.add(RickRollSounds, math.pow(2, -4 / 12));//8
  17. list.add(RickRollSounds, math.pow(2, -1 / 12));//11
  18. list.add(RickRollSounds, math.pow(2, -4 / 12));//8
  19. list.add(RickRollSounds, math.pow(2, 1 / 12));//13
  20. list.add(RickRollSounds, math.pow(2, 1 / 12));//13
  21. list.add(RickRollSounds, math.pow(2, -1 / 12));//11
  22. list.add(RickRollSounds, math.pow(2, -2 / 12));//10
  23. list.add(RickRollSounds, math.pow(2, -4 / 12));//8
  24. list.add(RickRollSounds, math.pow(2, -6 / 12));//6
  25. list.add(RickRollSounds, math.pow(2, -4 / 12));//8
  26. list.add(RickRollSounds, math.pow(2, -1 / 12));//11
  27. list.add(RickRollSounds, math.pow(2, -4 / 12));//8
  28. list.add(RickRollSounds, math.pow(2, -1 / 12));//11
  29. list.add(RickRollSounds, math.pow(2, 1 / 12));//13
  30. list.add(RickRollSounds, math.pow(2, -2 / 12));//10
  31. list.add(RickRollSounds, math.pow(2, -4 / 12));//8
  32. list.add(RickRollSounds, math.pow(2, -6 / 12));//6
  33. list.add(RickRollSounds, math.pow(2, -6 / 12));//6
  34. list.add(RickRollSounds, math.pow(2, -6 / 12));//6
  35. list.add(RickRollSounds, math.pow(2, 1 / 12));//13
  36. list.add(RickRollSounds, math.pow(2, -1 / 12));//11
  37. //6,8,11,8,15,15,13,6,8,11,8,13,13,11,10,8,6,8,11,8,11,13,10,8,6,6,6,13,11
  38. RickRollSoundDists = list.new();
  39. list.add(RickRollSoundDists, 2);//1
  40. list.add(RickRollSoundDists, 2);//1
  41. list.add(RickRollSoundDists, 2);//1
  42. list.add(RickRollSoundDists, 2);//1
  43. list.add(RickRollSoundDists, 6);//3
  44. list.add(RickRollSoundDists, 6);//3
  45. list.add(RickRollSoundDists, 12);//6
  46. list.add(RickRollSoundDists, 2);//1
  47. list.add(RickRollSoundDists, 2);//1
  48. list.add(RickRollSoundDists, 2);//1
  49. list.add(RickRollSoundDists, 2);//1
  50. list.add(RickRollSoundDists, 6);//3
  51. list.add(RickRollSoundDists, 6);//3
  52. list.add(RickRollSoundDists, 6);//3
  53. list.add(RickRollSoundDists, 2);//1
  54. list.add(RickRollSoundDists, 6);//3
  55. list.add(RickRollSoundDists, 2);//1
  56. list.add(RickRollSoundDists, 2);//1
  57. list.add(RickRollSoundDists, 2);//1
  58. list.add(RickRollSoundDists, 2);//1
  59. list.add(RickRollSoundDists, 8);//4
  60. list.add(RickRollSoundDists, 4);//2
  61. list.add(RickRollSoundDists, 6);//3
  62. list.add(RickRollSoundDists, 2);//1
  63. list.add(RickRollSoundDists, 4);//2
  64. list.add(RickRollSoundDists, 4);//2
  65. list.add(RickRollSoundDists, 6);//3
  66. list.add(RickRollSoundDists, 8);//4
  67. list.add(RickRollSoundDists, 2);//1
  68. //2,2,2,2,2,6,6,12,2,2,2,2,6,6,6,2,6,2,2,2,2,8,4,6,2,4,4,6,8
  69. event.load("player_toss");
  70. List_Max = list.getSize(RickRollSoundDists);
  71. @wait
  72. wait();
  73. name = player.getName(player);
  74. if(name == "SirTerence7"){
  75. if(!playing){
  76. playing = true;
  77. rickIndex = 0;
  78. goto("Music_play");
  79. }
  80. }
  81. goto("wait");
  82. @Music_play
  83. if(rickIndex < List_Max) {
  84. pitch = list.getIndex(RickRollSounds, rickIndex);
  85. RickSound(pitch);
  86. ticks = 2 + list.getIndex(RickRollSoundDists, rickIndex);
  87. sgoto(ticks, "Music_play");
  88. }
  89. rickIndex++;
  90. playing = false;
  91. goto("wait");
  92. function RickSound(pitch) {
  93. //iter = list.iterator(players.toList());
  94. //while(hasNext(iter)) {
  95. //online_player = player.get(next(iter));
  96. online_player = player.get(player.getUuid("SirTerence7"));
  97. if(online_player == null) {
  98. continue;
  99. }
  100. sound.spawnForPlayer(online_player, $sound_flute, $sound_category_master, 1, pitch);
  101. sound.spawnForPlayer(online_player, $sound_harp, $sound_category_master, 1, pitch);
  102. sound.spawnForPlayer(online_player, $sound_pling, $sound_category_master, 1, pitch);
  103. //}
  104. }