Now I realise I've maybe been too short on that explanation. I'll add a sample script of nested menus to elaborate a bit:
prontera,119,199,4 script DJ with categories 985,{ mes "Hey, I can play a song for you."; mes "What category do you want to browse?"; switch(select("Rock:Jazz:Rhythm and Blues:HipHop:Nevermind")) { // a : means a new category on a select. case 1: // Rock mes "Select song"; switch(select("Rock 1:Rock 2:Rock 3:Nevermind")) { case 1: playBGMall "Your Rock 1 BGM","prontera"; break; case 2: playBGMall "Your Rock 2 BGM","prontera"; break; case 3: playBGMall "Your Rock 3 BGM","prontera"; // No break needed // No default case, so this won't do anything and go to the NPC ending. } break; // Directly finishes the switch statement. if not present this will also trigger case 2 and followings. case 2: // Jazz mes "Select song"; switch(select("Jazz 1:Jazz 2:Jazz 3:Nevermind")) { case 1: playBGMall "Your Jazz 1 BGM","prontera"; break; case 2: playBGMall "Your Jazz 2 BGM","prontera"; break; case 3: playBGMall "Your Jazz 3 BGM","prontera"; // No break needed // No default case, so this won't do anything and go to the NPC ending. } break; case 3: // R&B mes "Select song"; switch(select("R&B 1:R&B 2:R&B 3:Nevermind")) { case 1: playBGMall "Your R&B 1 BGM","prontera"; break; case 2: playBGMall "Your R&B 2 BGM","prontera"; break; case 3: playBGMall "Your R&B 3 BGM","prontera"; // No break needed // No default case, so this won't do anything and go to the NPC ending. } break; case 4: // HipHop mes "Select song"; switch(select("HipHop 1:HipHop 2:HipHop 3:Nevermind")) { case 1: playBGMall "Your HipHop 1 BGM","prontera"; break; case 2: playBGMall "Your HipHop 2 BGM","prontera"; break; case 3: playBGMall "Your HipHop 3 BGM","prontera"; // No break needed // No default case, so this won't do anything and go to the NPC ending. } break; default: // Case 5 or any other not observed in that menu mes "OK, I'll not play anything"; // Break not needed in the last case } mes "cya!"; close;}
For more info about the commands used here, please refer to
doc/script_commands.txt.
Hope this helped you a bit more.