Jump to content
  • 0

costume npc adding requirement HELP


Diss

Question


  • Group:  Members
  • Topic Count:  67
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   1
  • Joined:  05/01/13
  • 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";
				setarray .@Position[1],     1,    9,   10;
				set .@Menu$,"";
			for( set .@i, 1; .@i < 5; 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 "Your 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;
			}
			costume .@Part; // Convert the Headgear
			mes "[Clown]";
			mes "Done, enjoy your costume headgear.";
			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";
				setarray .@Position[1],     13,    12,   11;
				set .@Menu$,"";
			for( set .@i, 1; .@i < 5; 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 "Your 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;
			}
			a = getequipid(.@Part);			
			delitem a,1;
			getitem a,1;
			
			mes "[Clown]";
			mes "Done, enjoy your restored headgear.";
			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
// --------------------------------------------------------------------------

trinity,83,97,4	duplicate(Costume Clown)	Costume Clown#1	715 

hi guys this is a costume system npc how can i add requirement every use of this npc

 

thanks for the help

 

 
Edited by Diss
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  67
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   1
  • Joined:  05/01/13
  • Last Seen:  

Add after :

costume .@Part; // Convert the Headgear

this :

delitem 512,1;

 

its work fine now 

 

thanks to both of you guys !!

if (countitem(512) >= 1) goto L_Clown;
 
delitem 512,1;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

Hi,ill try to help

 

// -------------------------------------------------------------------------------
// 	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,{
		if (countitem(512) >= 1) goto L_Clown; // you need 1 apple to use the clown
	mes "[Clown]";
	mes "You don't have any requirements to use this";
	close;

L_Clown:	
	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";
				setarray .@Position[1],     1,    9,   10;
				set .@Menu$,"";
			for( set .@i, 1; .@i < 5; 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 "Your 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;
			}
			costume .@Part; // Convert the Headgear
			mes "[Clown]";
			mes "Done, enjoy your costume headgear.";
			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";
				setarray .@Position[1],     13,    12,   11;
				set .@Menu$,"";
			for( set .@i, 1; .@i < 5; 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 "Your 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;
			}
			a = getequipid(.@Part);			
			delitem a,1;
			getitem a,1;
			delitem 512,1;
			mes "[Clown]";
			mes "Done, enjoy your restored headgear.";
			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
// --------------------------------------------------------------------------

trinity,83,97,4	duplicate(Costume Clown)	Costume Clown#1	715 
Edited by Mr BrycE
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  67
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   1
  • Joined:  05/01/13
  • Last Seen:  

@Mr BrycE sir its not working they can passed the npc to make a costume item and still not get the specific requirement

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

i tested it working fine for me. 

the only thing i did not add is to delete the example requirement.(well i added it now to the previous post)

 

by any chance did you change the example item? :) because that's only an apple. xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  67
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   1
  • Joined:  05/01/13
  • Last Seen:  

i tested it working fine for me. 

the only thing i did not add is to delete the example requirement.(well i added it now to the previous post)

 

by any chance did you change the example item? :) because that's only an apple. xD

 its work thanks, but the apple does not delete i want is 1 apple per costume 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Add after :

costume .@Part; // Convert the Headgear

this :

delitem 512,1;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

don't use that system,

costume diff  will make useless every other costume gear that  have a function.

 

http://ratemyserver.net/index.php?page=re_item_db&item_type=5&item_class=202

Edited by iraciz
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...