summaryrefslogblamecommitdiff
path: root/npc/commands/music.txt
blob: 144dc059adb70d12fa43e6f1c980c3e2d4a2feb6 (plain) (tree)
1
2
3
4
5


                                               

                    



























                                                            
                             


        
                                                   

                                      









                                                                           


                                                               
 
// @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 fun

-	script	@music	32767,{
    end;

OnCall:
    if (!is_evtc())
    {
        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], " ");
    }

    changemusic .@map$, .@m$;
    end;

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

    .hash = htnew; // create hashtable
    htput(.hash, "forest",     "bartk - in the forest of the birches.ogg");
    htput(.hash, "adventure",  "bartk - the adventure begins.ogg");
    htput(.hash, "fun",        "eric matyas - ghoulish fun.ogg");
    htput(.hash, "surreal",    "eric matyas - surreal place.ogg");
    htput(.hash, "ocean",      "ezili - ocean sounds.ogg");
    htput(.hash, "magic",      "magick - real.ogg");
    htput(.hash, "forest2",    "dariunas - the forest.ogg");
    htput(.hash, "mythica",    "mythica.mp3");
    htput(.hash, "3b5",        "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");
}