summaryrefslogblamecommitdiff
path: root/npc/commands/music.txt
blob: 54d676c8fc505f13057b9143c2999ed79cd1a58e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11


                                               

                    





                         
                   




                               
                 











                                                            

                                                                     
                                                                                                               

                                 
     


        
                                                   

                                      

                                                                           
                                                                 
                                                                  
                                                    
                                                            
                                              
                                          
                                             


                                                               
 
// @music atcommand
// changes the music for all players on the map
//
// group lv: 80
// group char lv: 80
// log: True
//
// usage:
//    @music <short name>
//
// example:
//    @music forest

-	script	@music	32767,{
    end;

OnCall:
    if (!is_gm())
    {
        end;
    }

    // TODO: tmw-like argv splitter
    getmapxy .@map$, .@void, .@void, UNITTYPE_PC; // get map

    .@key$ = .@atcmd_parameters$[0];
    .@m$ = htget(.hash, .@key$, "Not found");

    if (.@m$ == "Not found")
    {
        //.@m$ = implode(.@atcmd_parameters$[0], " ");
        dispbottom "Invalid music key. Current accepted values are:";
        dispbottom "ship, city, ghoul, surreal, magic, forest, mythica, acid, misuse, prelude, sunrise, peace";
    } else {
        changemusic .@map$, .@m$;
    }
    end;

OnInit:
    bindatcmd "music", "@music::OnCall", 80, 80, 1;

    .hash = htnew; // create hashtable
    htput(.hash, "ship",       "bartk - in the forest of the birches.ogg");
    htput(.hash, "city",       "bartk - the adventure begins.ogg");
    htput(.hash, "ghoul",      "eric matyas - ghoulish fun.ogg");
    htput(.hash, "surreal",    "eric matyas - surreal place.ogg");
    htput(.hash, "magic",      "magick - real.ogg");
    htput(.hash, "forest",     "dariunas - the forest.ogg");
    htput(.hash, "mythica",    "mythica.ogg");
    htput(.hash, "acid",       "3b5.ogg");
    htput(.hash, "misuse",     "misuse.ogg");
    htput(.hash, "prelude",    "water_prelude.ogg");
    htput(.hash, "sunrise",    "tws_birds_in_the_sunrise.ogg");
    htput(.hash, "peace",      "peace.ogg");
}