summaryrefslogtreecommitdiff
path: root/npc/functions/music.txt
blob: 18a8fbe72b59959a93c9779780d35783d8d8d5a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// The Mana World Script
// Author:
//  Jesusalva
//  Gumi
//  Ledmitz
// Description:
//  Music functions
//
// NOTE: This NPC uses the new public/private function call system to avoid
//       the use of doevent.
// Syntax:
//      "jukebox"::HurnscaldPrompt(); → Makes a menuint for selecting hurns tracks
//      "jukebox"::JukeboxMusic(ID); → Changes music based on prompted ID
//      "jukebox"::BroadcastMusic(MAP, ID); → Changes music based on prompted ID
// TODO: Check if you have the music unlocked? Bitmask? Array?

-	script	jukebox	32767,{
    end;

// Helpers
public function JukeboxMusic {
    changeplayermusic $MUSIC_ARRAY$[getarg(0)] + ".ogg";
    return;
}

public function BroadcastMusic {
    changemusic getarg(0), $MUSIC_ARRAY$[getarg(1)] + ".ogg";
    return;
}

// public function listing
//  * Hurnscald

public function HurnscaldPrompt {
    menuint
        "Cancel", -1,
        "Johanne - Forest of Birches", 0,
        "Artis - Adventure Begins", 1,
        "Argaes - Dariunas' Forest", 20,
        "Hurnscald - Magick Real", 5;
    mes "";
    if (@menuret == -1)
        close;
    return @menuret;
}

// Initialize stuff which will be needed
OnInit:
    $MUSIC_ARRAY$[0] = "johanne";
    $MUSIC_ARRAY$[1] = "artis";
    $MUSIC_ARRAY$[2] = "ghoulish";
    $MUSIC_ARRAY$[3] = "surreal";
    $MUSIC_ARRAY$[4] = "ocean";
    $MUSIC_ARRAY$[5] = "real";
    $MUSIC_ARRAY$[6] = "academy";
    $MUSIC_ARRAY$[7] = "bandit";
    $MUSIC_ARRAY$[8] = "barbarians";
    $MUSIC_ARRAY$[9] = "botcheck";
    $MUSIC_ARRAY$[10] = "candor";
    $MUSIC_ARRAY$[11] = "cavesong";
    $MUSIC_ARRAY$[12] = "chilling";
    $MUSIC_ARRAY$[13] = "cloudcall";
    $MUSIC_ARRAY$[14] = "crypt";
    $MUSIC_ARRAY$[15] = "despair";
    $MUSIC_ARRAY$[16] = "dimond";
    $MUSIC_ARRAY$[17] = "explorer";
    $MUSIC_ARRAY$[18] = "faith";
    $MUSIC_ARRAY$[19] = "fire";
    $MUSIC_ARRAY$[20] = "forest";
    $MUSIC_ARRAY$[21] = "graveyard";
    $MUSIC_ARRAY$[22] = "hurns";
    $MUSIC_ARRAY$[23] = "marine";
    $MUSIC_ARRAY$[24] = "mystique";
    $MUSIC_ARRAY$[25] = "nightcall";
    $MUSIC_ARRAY$[26] = "nivalis";
    $MUSIC_ARRAY$[27] = "ocean";
    $MUSIC_ARRAY$[28] = "peace";
    $MUSIC_ARRAY$[29] = "reid";
    $MUSIC_ARRAY$[30] = "sewer";
    $MUSIC_ARRAY$[31] = "store";
    $MUSIC_ARRAY$[32] = "swamp";
    $MUSIC_ARRAY$[33] = "thunderstorm";
    $MUSIC_ARRAY$[34] = "waterlude";
    $MUSIC_ARRAY$[35] = "xmas";
    end;
}