Jump to content
  • 0

I need timer 1 minute to this npc


itsmeyoe

Question


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

prontera,159,184,3    script    Disc Jockey::dj    756,{


    emotion e_ho, 1;
    mes "[ Disc Jockey ]";
    mes "You can choose any song you desire for only 1 Bronze Coin.";
    menu "Yes",-,"No",end2;
    if (countitem(673) < 1 ) goto L_NOTENOUGH;
    next;


    mes "What Song Would you like to play?";
    switch(select("Ignition:Trap Queen:Closer - The Chainsmokers:PPAP:GDFR:Worth It:Nobody's Better:Toxicity:Courtesy Call:Better Days:Song for the Suspect:Californication:7 Years:None")) {
    case 1:
        playBGMall "001";
        announce "[ Now playing Ignition ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 2:
        playBGMall "002";
        announce "Now playing [ Trap Queen ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 3:
        playBGMall "003";
        announce "Now playing [ Closer ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 4:
        playBGMall "004";
        announce "Now playing [ PPAP ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 5:
        playBGMall "005";
        announce "Now playing [ GDFR ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 6:
        playBGMall "006";
        announce "Now playing [ Worth IT ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;


    case 7:
        playBGMall "007";
        announce "Now playing [ Nobody's Better ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 8:
        playBGMall "008Toxicity";
        announce "Now playing [ Toxicity ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 9:
        playBGMall "009Courtesy Call";
        announce "Now playing [ Courtesy Call ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 10:
        playBGMall "010Better days";
        announce "Now playing [ Better Days ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 11:
        playBGMall "013Song For The Suspect";
        announce "Now playing [ Song for the Suspect ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 12:
        playBGMall "015Californication";
        announce "Now playing [ Californication ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;

    case 13:
        playBGMall "0167 years";
        announce "Now playing [ 7 Years ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
        delitem 673,1;
        close;


    case 14:
        mes "Okay Bye Cya Later";
        close;

end2:
next;
    mes "[ Disc Jockey ]";
    mes "Okay...Maybe next time!~";
    mes "Come back again.";
    close;
L_NOTENOUGH:
    next;
    mes "[ Disc Jockey ]";
    mes "You need Bronze Coin if you want your song to be played.";
        close;
        }


    }

morocc,171,99,4    duplicate(dj)    Disc Jockey    756

 

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

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  153
  • Reputation:   8
  • Joined:  07/01/14
  • Last Seen:  

Give me more details of what you want to do with the timer, where you wanna put it and why if you will.

Edited by Fratini
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:  

Players are abusing the use of this npc so i want it to make with timeout

1 minute before a player can use it again. 

Edited by itsmeyoe
Link to comment
Share on other sites

  • 0

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

prontera,159,184,3	script	Disc Jockey::dj	756,{

	if(.cooldown > gettimetick(0)) {
		mes "[ Disc Jockey ]";
		mes "Cooldown : "+ .cooldown - gettimetick(0) + " seconds. Please wait.";
		end;
	}

	emotion e_ho, 1;
	mes "[ Disc Jockey ]";
	mes "You can choose any song you desire for only 1 Bronze Coin.";

	if( select("Yes","No") == 2 ) {
		next;
		mes "[ Disc Jockey ]";
		mes "Okay...Maybe next time!~";
		mes "Come back again.";
		close;
	}
	
	if (!countitem(673)) {
		next;
		mes "[ Disc Jockey ]";
		mes "You need Bronze Coin if you want your song to be played.";
		close;
	}

	next;
	mes "What Song Would you like to play?";

	switch( select( "Ignition",
					"Trap Queen",
					"Closer - The Chainsmokers",
					"PPAP",
					"GDFR",
					"Worth It",
					"Nobody's Better",
					"Toxicity",
					"Courtesy Call",
					"Better Days",
					"Song for the Suspect",
					"Californication",
					"7 Years",
					"None")) 
	{
		case 1:
			playBGMall "001";
			announce "[ Now playing Ignition ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 2:
			playBGMall "002";
			announce "Now playing [ Trap Queen ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 3:
			playBGMall "003";
			announce "Now playing [ Closer ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 4:
			playBGMall "004";
			announce "Now playing [ PPAP ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 5:
			playBGMall "005";
			announce "Now playing [ GDFR ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 6:
			playBGMall "006";
			announce "Now playing [ Worth IT ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 7:
			playBGMall "007";
			announce "Now playing [ Nobody's Better ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 8:
			playBGMall "008Toxicity";
			announce "Now playing [ Toxicity ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 9:
			playBGMall "009Courtesy Call";
			announce "Now playing [ Courtesy Call ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 10:
			playBGMall "010Better days";
			announce "Now playing [ Better Days ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 11:
			playBGMall "013Song For The Suspect";
			announce "Now playing [ Song for the Suspect ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 12:
			playBGMall "015Californication";
			announce "Now playing [ Californication ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 13:
			playBGMall "0167 years";
			announce "Now playing [ 7 Years ] - "+strcharinfo(0)+" ",bc_all,0xFFFF00;
			delitem 673,1;
			.cooldown = gettimetick(0) + 60; // +60 seconds cooldown after NPC usage.
			break;
		case 14:
			mes "Okay Bye Cya Later";
			break;
	}
	close;
}

morocc,171,99,4	duplicate(dj)	Disc Jockey	756

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

http://pastebin.com/VwfnTMWG

Don't remove the author and whatnot please thanks

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