Jump to content

Question

Posted

So the idea is that the NPC can cater to one player's request everytime it's not playing anything. So if it's playing a song it's gonna tell other players that they have to wait until the current song ends.

 

I saw this working on a server before, and I haven't really seen it ever since. I was also snooping around if there's any clue here but there's none so I decided to put this up, if there is please direct me to it.

Thanks in advance.

4 answers to this question

Recommended Posts

  • 1
Posted (edited)

sec i have this

 

Edit:

-	script	BGM		-1,{
OnBGMCmnd:
	mes "[BGM]";
	mes "Whats the file number";
	//todo create a list
	input .@bgm$;
	close2;
	playBGM .@bgm$;
end;
OnInit:
	bindatcmd("bgm","BGM::OnBGMCmnd",0,99);
	bindatcmd("BGM","BGM::OnBGMCmnd",0,99);
end;
}

found it, this will let players use @BGM / @bgm to change there currently playing song

they just input say 121 to play the song Outer Breath

Edited by Stolao
  • Upvote 1
  • Love 1
Posted

Thanks alot for replying! This will really help, just need to add the section where players can't play songs while someone is playing a song. Thanks so much, if someone can provide that little snippet, that would be great as well.

Thanks again. Cheers to you all.

Posted

you can try this


-	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;
}
@bgm <#number>
Posted (edited)

Thanks Emistry. More power to you guys!


Just a follow up question, does this change the other player's BGM as well? Or it's just mine?

 

And how do I manage to use the @bgm? I tried to use the @bgm in-game, as I have used Emistry's script, but it always results to the

"Please try again later" part.

Edited by PandaRapesHamster

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