summaryrefslogtreecommitdiff
path: root/npc/functions/music.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/music.txt')
-rw-r--r--npc/functions/music.txt87
1 files changed, 87 insertions, 0 deletions
diff --git a/npc/functions/music.txt b/npc/functions/music.txt
new file mode 100644
index 00000000..18a8fbe7
--- /dev/null
+++ b/npc/functions/music.txt
@@ -0,0 +1,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;
+}
+