Jump to content
  • 0

Color Name like Stylist NPC


Question

Posted

Hello can anyone help me how can i make a Colored Name NPC like Stylist

how to make this script 

 

New script commands:

set_color_nick(color group id);
get_color_nick();

7 answers to this question

Recommended Posts

  • 0
Posted
8 hours ago, Dev j said:

Hello can anyone help me how can i make a Colored Name NPC like Stylist

how to make this script 

 

New script commands:

set_color_nick(color group id);
get_color_nick();

I'll throw you treat, it's up to you how to figure out how to get the colors and set the colors.

prontera,155,186,5	script	Fashionista#name	845,{
	.@current = get_color_nick();
	setarray .@colors$,"C8B928","177ABD","F35BE6","D7ECB2","AE8B29"
					  ,"FBF79A","73558C","EB57B8","25B7EF","442BFB"
					  ,"D6E2F9","D7FE28","6A98B1","A764E0","14D5D4";
	for(.@i = 0; .@i < getarraysize(.@colors$); .@i++)
		.@menu$ += "^"+.@colors$[.@i]+""+strcharinfo(0)+"^000000:";
	.@select = select(.@menu$) - 1;
	.@color = .@select + 1;
	if(countitem(58503) < 1){
		message strcharinfo(0),"You do not have "+getitemname(58503)+"!";
		end;
	}
	menu "Buy this ^"+.@colors$[.@select]+"color?",-;
	if(.@current == .@color){
		message strcharinfo(0),"This is your current name color";
		end;
	}
	delitem 58503,1;
	set_color_nick(.@color);
	message strcharinfo(0),"Enjoy your new color!";
	end;
}

 

  • MVP 1
  • 0
Posted
On 11/30/2023 at 4:42 AM, Nyaniverse said:

I'll throw you treat, it's up to you how to figure out how to get the colors and set the colors.

prontera,155,186,5	script	Fashionista#name	845,{
	.@current = get_color_nick();
	setarray .@colors$,"C8B928","177ABD","F35BE6","D7ECB2","AE8B29"
					  ,"FBF79A","73558C","EB57B8","25B7EF","442BFB"
					  ,"D6E2F9","D7FE28","6A98B1","A764E0","14D5D4";
	for(.@i = 0; .@i < getarraysize(.@colors$); .@i++)
		.@menu$ += "^"+.@colors$[.@i]+""+strcharinfo(0)+"^000000:";
	.@select = select(.@menu$) - 1;
	.@color = .@select + 1;
	if(countitem(58503) < 1){
		message strcharinfo(0),"You do not have "+getitemname(58503)+"!";
		end;
	}
	menu "Buy this ^"+.@colors$[.@select]+"color?",-;
	if(.@current == .@color){
		message strcharinfo(0),"This is your current name color";
		end;
	}
	delitem 58503,1;
	set_color_nick(.@color);
	message strcharinfo(0),"Enjoy your new color!";
	end;
}

 

Thanks ill try this !

  • 0
Posted (edited)
On 11/30/2023 at 4:42 AM, Nyaniverse said:

I'll throw you treat, it's up to you how to figure out how to get the colors and set the colors.

prontera,155,186,5	script	Fashionista#name	845,{
	.@current = get_color_nick();
	setarray .@colors$,"C8B928","177ABD","F35BE6","D7ECB2","AE8B29"
					  ,"FBF79A","73558C","EB57B8","25B7EF","442BFB"
					  ,"D6E2F9","D7FE28","6A98B1","A764E0","14D5D4";
	for(.@i = 0; .@i < getarraysize(.@colors$); .@i++)
		.@menu$ += "^"+.@colors$[.@i]+""+strcharinfo(0)+"^000000:";
	.@select = select(.@menu$) - 1;
	.@color = .@select + 1;
	if(countitem(58503) < 1){
		message strcharinfo(0),"You do not have "+getitemname(58503)+"!";
		end;
	}
	menu "Buy this ^"+.@colors$[.@select]+"color?",-;
	if(.@current == .@color){
		message strcharinfo(0),"This is your current name color";
		end;
	}
	delitem 58503,1;
	set_color_nick(.@color);
	message strcharinfo(0),"Enjoy your new color!";
	end;
}

 

will try this too ty

 

Edited by GM Winter
  • 0
Posted
On 11/30/2023 at 3:42 AM, Nyaniverse said:

I'll throw you treat, it's up to you how to figure out how to get the colors and set the colors.

prontera,155,186,5	script	Fashionista#name	845,{
	.@current = get_color_nick();
	setarray .@colors$,"C8B928","177ABD","F35BE6","D7ECB2","AE8B29"
					  ,"FBF79A","73558C","EB57B8","25B7EF","442BFB"
					  ,"D6E2F9","D7FE28","6A98B1","A764E0","14D5D4";
	for(.@i = 0; .@i < getarraysize(.@colors$); .@i++)
		.@menu$ += "^"+.@colors$[.@i]+""+strcharinfo(0)+"^000000:";
	.@select = select(.@menu$) - 1;
	.@color = .@select + 1;
	if(countitem(58503) < 1){
		message strcharinfo(0),"You do not have "+getitemname(58503)+"!";
		end;
	}
	menu "Buy this ^"+.@colors$[.@select]+"color?",-;
	if(.@current == .@color){
		message strcharinfo(0),"This is your current name color";
		end;
	}
	delitem 58503,1;
	set_color_nick(.@color);
	message strcharinfo(0),"Enjoy your new color!";
	end;
}

 

hi, i've got this error.

image.thumb.png.d6c25c3ee66613d282259a7b82a45cb5.png

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