Jump to content

Question

Posted (edited)

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

5 answers to this question

Recommended Posts

Posted

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
Posted

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>
Posted

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;
}

 

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...