Jump to content
  • 0
Sign in to follow this  
Nash

Music Player NPC / DJ

Question

hi guys,
i made this script dunno y its not playing music

 

prontera,119,199,4	script	DJ Test	116,{	mes "What Song Would you like to play?";	switch(select("Still Worth Fighting For:Move your Body:Make a Move:None")) {	case 1:		playBGMall "002","prontera";		close;	case 2:		playBGMall "003","prontera";		close;	case 3:		playBGMall "004","prontera";		close;	case 4:		mes "Okay Bye Cya Later";		close;	}}

Regards,|
Nash

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.