Jump to content
  • 0

Loard MP3


ProtoMan

Question


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  97
  • Reputation:   0
  • Joined:  01/06/13
  • Last Seen:  

Hi, remember correctly, or is there a command to load a particular song by NPC?

A command like "loadmp3", loading a BMG in the server, you can do it?
 
(Sorry for my bad english)
 
Thanks in advance.
 
P.S. : Wrog title, was Load MP3*
Edited by ProtoMan
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

data/wav folder cange the .wav to youre song

 

You only hear it and people near to you.

soundeffect "title.wav",0;

All people in the map can hear it.

soundeffectall "title.wav",0;

test script,  cange the .wav tittles.

-	script	hyrican#MP3	-1,{
end;
OnMinute03: // For this script, I didn't use array to set the song timer. So, you can just roughly add the timer to play the next song.
OnMinute08:
OnMinute13:
OnMinute18:
OnMinute23:
OnMinute28:
OnMinute33:
OnMinute38:
OnMinute43:
OnMinute48:
OnMinute53:
OnMinute58:


switch(rand(1,3)) { // please edit this line if you're adding more songs. If you have 10 songs, then edit like this >> switch(rand(1,10)) {

case 1: 
announce "[HyricanRO MP3] : Now playing deadmau5 - Raise your weapon. Enjoy!",bc_all,0xDA70D6;
playBGMall "raiseurweapon";
break;

case 2:
announce "[HyricanRO MP3] : Now playing Kidz Bop - Starship. Enjoy!",bc_all,0xFFFF00;
playBGMall "kidzstarship";
break;

case 3:
announce "[HyricanRO MP3] : Now playing Maroon 5 - Payphone. Enjoy!",bc_all,0xDA70D6;
playBGMall "payphone";
break;

//case 4:
//announce "<YOUR ANNOUNCE HERE>",bc_all,0xDA70D6;
//playBGMall "<YOUR MP3 FILENAME>";
//break;

	}
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

This is actually great.

By chance, can it be made into an NPC where the player gets to choose which song will play?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

Script By Emistry

-	script	atcmd_example	-1,{
OnInit:
	bindatcmd "bgm",strnpcinfo(3)+"::OnAtcommand";
	end;
OnAtcommand:
	if ( .can_play ) {
		initnpctimer;
		.can_play = 0;
		playbgm .@atcmd_parameters$[0];
	}
	else {
		dispbottom "Please try again later.";
	}
	end;
	
OnTimer300000:	// 5 minute
	stopnpctimer;
	.can_play = 1;
	end;
}
use in game @bgm <#number>
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  97
  • Reputation:   0
  • Joined:  01/06/13
  • Last Seen:  

Frist script is great! Thank you.

For the second, in game I can't load it, I wrong anything? :
 

prontera,102,102,3 script atcmd_example 33,{
 
OnInit:
bindatcmd "bgm",strnpcinfo(3)+"::OnAtcommand";
end;
OnAtcommand:
if ( .can_play ) {
initnpctimer;
.can_play = 0;
playbgm .@atcmd_parameters$[0];
}
else {
dispbottom "Please try again later.";
}
close;
}

 

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

I too have trouble making it work. I always end up with the "Please try again later.".

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...