Jump to content
  • 0

R>BGM Changer NPC


PandaLovesHamster

Question


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

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.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   344
  • Joined:  10/17/12
  • Last Seen:  

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
Link to comment
Share on other sites


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

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.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

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>
Link to comment
Share on other sites


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

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