Jump to content
  • 0

1 TCG When he choose a song


itsmeyoe

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   1
  • Joined:  05/19/12
  • Last Seen:  

If a player use the npc he can choose a song before it plays he needs to pay 1 tcg before after that other players can use the npc after 1 minute.

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;
    }
}
Edited by Emistry
Please use CODEBOX.
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   348
  • Joined:  02/26/12
  • Last Seen:  

something like that? (not tested)

7227 i do not know, maybe i'm wrong and this is not tcg card, find id of tcg card and replace by yourself.

prontera,119,199,4	script	DJ Test	116,{
	
	if ( gettimetick(0) < .npc_delay )
	{
		mes "You can't talk to me in next 60 seconds. Please try at next time";
		close;
	}

	mes "What Song Would you like to play?";
	switch (select("Still Worth Fighting For:Move your Body:Make a Move:None")) {
		case 1:
			if ( countitem(7227) == 0 ) {
				mes "You need" + getitemname(7227) + " 1x";
				close;
			}
			if ( countitem(7227) > 0 ) {
				delitem 7227, 1;
				playBGMall "002", "prontera";
				.npc_delay = gettimetick(0) + 60;
			}
			break;
		case 2:
			if ( countitem(7227) == 0 ) {
				mes "You need" + getitemname(7227) + " 1x";
				close;
			}
			if ( countitem(7227) > 0 ) {
				delitem 7227, 1;
				playBGMall "003", "prontera";
				.npc_delay = gettimetick(0) + 60;
			}
			break;
		case 3:
			if ( countitem(7227) == 0 ) {
				mes "You need" + getitemname(7227) + " 1x";
				close;
			}
			if ( countitem(7227) > 0 ) {
				delitem 7227, 1;
				playBGMall "004", "prontera";
				.npc_delay = gettimetick(0) + 60;
			}
			break;
		case 4:
			if ( countitem(7227) == 0 ) {
				mes "You need" + getitemname(7227) + " 1x";
				close;
			}
			if ( countitem(7227) > 0 ) {
				delitem 7227, 1;
				mes "Okay Bye Cya Later";
				.npc_delay = gettimetick(0) + 60;
			}
			break;
	}
	close;
}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   1
  • Joined:  05/19/12
  • Last Seen:  

Hi guys i just want this npc to be like this one they will pay silver coin id 675 before the song play and the npc will not be used for 1 minute after a player use it

 



prontera,163,184,4 script Yoesic 116,{
mes "What Song Would you like to play?";
switch(select("Streamside:Move your Body:Make a Move:None")) {
case 1:
playBGMall "12","prontera";
announce "Now playing Streamside ~ "+strcharinfo(0)+" ",bc_all,0xFFFF00;
close;
case 2:
playBGMall "13","prontera";
close;
case 3:
playBGMall "14","prontera";
close;
case 4:
mes "Okay Bye Cya Later";
close;
}
}

Edited by Emistry
Please use CODEBOX.
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  520
  • Reputation:   64
  • Joined:  11/19/11
  • Last Seen:  

Try this post if you encounter error.

prontera,163,184,4	script	Yoesic	116,{
	mes "What Song Would you like to play?";
	switch(select("Streamside:Move your Body:Make a Move:None")) {
		case 1:
			if(countitem(.req) < .num) goto noo_noo;
			playBGMall "12","prontera";
			announce "Now playing Streamside ~ "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem .req, .num;
			close;
		case 2:
			if(countitem(.req) < .num) goto noo_noo;
			playBGMall "13","prontera";
			delitem .req, .num;
			close;
		case 3:
			if(countitem(.req) < .num) goto noo_noo;
			playBGMall "14","prontera";
			delitem .req, .num;
			close;
		case 4:
			mes "Okay Bye Cya Later";
			close;
	}
	noo_noo:
		mes "No item";
		close;

	OnInit:
		set .req, 675; // item requirement
		set .num, 1; // quantity
		end;
}
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...