Jump to content
  • 0

Add item requirements before can convert headgear.


Brahms

Question


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.02
  • Content Count:  149
  • Reputation:   3
  • Joined:  07/29/16
  • Last Seen:  

Asking for supports to anyone who have time to help me with this script.. i just wanted in this script to have a item requirements before players can convert their costume.

 

-Before players can convert a normal headgears into costume they have to pay 10 TCG first before the NPC took their headgears and convert it into costume. Same with the players who want to revert their costume headgears into normal headgear. They have to pay 10 TCG first before it happens..

 

Anyone please help. Thank you in advance..

 

 

costume.txt

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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

// -------------------------------------------------------------------------------
// 	Script Name : Headgear to Costume converter >> Costume to Headgear converter
// -------------------------------------------------------------------------------
// Description :
// - Allows a user to convert the equipped headgear (on Top, Mid or Low) into a
//   costume item. It will remove any card and refine of the Item.
// - Allows a user to restore the equipped costume headgear (on Top, Mid or Low)
//     into its original form. It will not return any card or refine of the item.
// -------------------------------------------------------------------------------
-	script	Costume Clown	-1,{
	mes "[Clown]";
	mes "Here you can convert your headgears into a Costume Headgear or restore to its Original form.";
	switch(select("I want to convert.:I want to restore.:No thanks.")) {
	case 1:
			next;
			mes "Please, select what to convert.";
			mes "Remember, cards and refine will be removed.";
			next;
				setarray .@Position$[1],"Top","Mid","Low","Garment";
				setarray .@Position[1],     EQI_HEAD_TOP,    EQI_HEAD_MID,   EQI_HEAD_LOW, EQI_GARMENT;
				set .@Menu$,"";
			for( set .@i, 1; .@i < 6; set .@i, .@i + 1 )
			{
				if( getequipisequiped(.@Position[.@i]) )
				set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
				set .@Menu$, .@Menu$ + ":";
			}
			set .@Part, .@Position[ select(.@Menu$) ];
			if( !getequipisequiped(.@Part) )
			{
				mes "[Clown]";
				mes "You are not wearing anything there."; 
				close;
			}
			mes "[Clown]";
			mes "You want to Costume your " + getitemname(getequipid(.@Part)) + "?";
			next;
			if( select("Yes, proceed:No, I am sorry.") == 2 )
			{
				mes "[Clown]";
				mes "Need some time to think about it, huh?";
				mes "Alright, I can understand.";
				close;
			}
			if( countitem(7227) >= 10 ) {
				delitem 7227,10; // remove 10 tcg cards
				costume .@Part; // Convert the Headgear
				mes "[Clown]";
				mes "Done, enjoy your costume headgear.";				
			} else {
				mes "You need "+ getitemname(7227) +" 10x";
			}
			close;
	case 2:
			next;
			mes "Please, select what to restore.";
			mes "Remember, I will only restore it back without refine and cards.";
			next;
				setarray .@Position$[1],"Top","Mid","Low", "Garment";
				setarray .@Position[1], EQI_COSTUME_HEAD_TOP, EQI_COSTUME_HEAD_MID, EQI_COSTUME_HEAD_LOW, EQI_COSTUME_GARMENT;
				set .@Menu$,"";
			for( set .@i, 1; .@i < 6; set .@i, .@i + 1 )
			{
				if( getequipisequiped(.@Position[.@i]) )
				set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
				set .@Menu$, .@Menu$ + ":";
			}
			set .@Part, .@Position[ select(.@Menu$) ];
			if( !getequipisequiped(.@Part) )
			{
				mes "[Clown]";
				mes "You are not wearing anything there.";
				close;
			}
			mes "[Clown]";
			mes "You want to restore your " + getitemname(getequipid(.@Part)) + "?";
			next;
			if( select("Yes, proceed:No, I am sorry.") == 2 )
			{
				mes "[Clown]";
				mes "Need some time to think about it, huh?";
				mes "Alright, I can understand.";
				close;
			}
			if( countitem(7227) >= 10 ) {
				.@a = getequipid(.@Part);			
				delitem .@a,1;
				getitem .@a,1;				
				delitem 7227,10; // remove 10 tcg cards
				costume .@Part; // Convert the Headgear
				mes "[Clown]";
				mes "Done, enjoy your restored headgear.";				
			} else {
				mes "You need "+ getitemname(7227) +" 10x";
			}
			close;
	case 3:
		mes "[Clown]";
		mes "Very well. Return at once if you seek my services.";
		close;
	}
}
// --------------------------------------------------------------------------
// Use duplicates to put your npc on different cities
// --------------------------------------------------------------------------
prontera,155,181,4	duplicate(Costume Clown)	Costume Clown#1	715

Here is raw: http://pastebin.com/zkGigtDW

Edited by Anacondaqq
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.02
  • Content Count:  149
  • Reputation:   3
  • Joined:  07/29/16
  • Last Seen:  

Thank you so much for this.. im going to try it. Thanks again..

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