123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- rickIndex = 0;
- sound_category_master = sound.getCategory("master");
- sound_flute = sound.get("block.note_block.flute");
- sound_harp = sound.get("block.note_block.harp");
- sound_pling = sound.get("block.note_block.pling");
- playing = false;
- RickRollSounds = list.new();
- list.add(RickRollSounds, math.pow(2, -6 / 12));//6
- list.add(RickRollSounds, math.pow(2, -4 / 12));//8
- list.add(RickRollSounds, math.pow(2, -1 / 12));//11
- list.add(RickRollSounds, math.pow(2, -4 / 12));//8
- list.add(RickRollSounds, math.pow(2, 3 / 12));//15
- list.add(RickRollSounds, math.pow(2, 3 / 12));//15
- list.add(RickRollSounds, math.pow(2, 1 / 12));//13
- list.add(RickRollSounds, math.pow(2, -6 / 12));//6
- list.add(RickRollSounds, math.pow(2, -4 / 12));//8
- list.add(RickRollSounds, math.pow(2, -1 / 12));//11
- list.add(RickRollSounds, math.pow(2, -4 / 12));//8
- list.add(RickRollSounds, math.pow(2, 1 / 12));//13
- list.add(RickRollSounds, math.pow(2, 1 / 12));//13
- list.add(RickRollSounds, math.pow(2, -1 / 12));//11
- list.add(RickRollSounds, math.pow(2, -2 / 12));//10
- list.add(RickRollSounds, math.pow(2, -4 / 12));//8
- list.add(RickRollSounds, math.pow(2, -6 / 12));//6
- list.add(RickRollSounds, math.pow(2, -4 / 12));//8
- list.add(RickRollSounds, math.pow(2, -1 / 12));//11
- list.add(RickRollSounds, math.pow(2, -4 / 12));//8
- list.add(RickRollSounds, math.pow(2, -1 / 12));//11
- list.add(RickRollSounds, math.pow(2, 1 / 12));//13
- list.add(RickRollSounds, math.pow(2, -2 / 12));//10
- list.add(RickRollSounds, math.pow(2, -4 / 12));//8
- list.add(RickRollSounds, math.pow(2, -6 / 12));//6
- list.add(RickRollSounds, math.pow(2, -6 / 12));//6
- list.add(RickRollSounds, math.pow(2, -6 / 12));//6
- list.add(RickRollSounds, math.pow(2, 1 / 12));//13
- list.add(RickRollSounds, math.pow(2, -1 / 12));//11
- //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
- RickRollSoundDists = list.new();
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 6);//3
- list.add(RickRollSoundDists, 6);//3
- list.add(RickRollSoundDists, 12);//6
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 6);//3
- list.add(RickRollSoundDists, 6);//3
- list.add(RickRollSoundDists, 6);//3
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 6);//3
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 8);//4
- list.add(RickRollSoundDists, 4);//2
- list.add(RickRollSoundDists, 6);//3
- list.add(RickRollSoundDists, 2);//1
- list.add(RickRollSoundDists, 4);//2
- list.add(RickRollSoundDists, 4);//2
- list.add(RickRollSoundDists, 6);//3
- list.add(RickRollSoundDists, 8);//4
- list.add(RickRollSoundDists, 2);//1
- //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
- event.load("player_toss");
- List_Max = list.getSize(RickRollSoundDists);
- @wait
- wait();
- name = player.getName(player);
- if(name == "SirTerence7"){
- if(!playing){
- playing = true;
- rickIndex = 0;
- goto("Music_play");
- }
- }
- goto("wait");
- @Music_play
- if(rickIndex < List_Max) {
- pitch = list.getIndex(RickRollSounds, rickIndex);
- RickSound(pitch);
- ticks = 2 + list.getIndex(RickRollSoundDists, rickIndex);
- sgoto(ticks, "Music_play");
- }
- rickIndex++;
- playing = false;
- goto("wait");
- function RickSound(pitch) {
- //iter = list.iterator(players.toList());
- //while(hasNext(iter)) {
- //online_player = player.get(next(iter));
- online_player = player.get(player.getUuid("SirTerence7"));
- if(online_player == null) {
- continue;
- }
- sound.spawnForPlayer(online_player, $sound_flute, $sound_category_master, 1, pitch);
- sound.spawnForPlayer(online_player, $sound_harp, $sound_category_master, 1, pitch);
- sound.spawnForPlayer(online_player, $sound_pling, $sound_category_master, 1, pitch);
- //}
- }
|