Jump to content
  • 0

1 TCG When he choose a song


Question

Posted (edited)

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.

3 answers to this question

Recommended Posts

  • 0
Posted

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;
}
  • 0
Posted

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;
}
  • 0
Posted (edited)
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.

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