Jump to content
  • 0
hardelite

Stylist Limit

Question

Hi, how are you guys?
Could you help me with my npc stylist? Please.

If possible, I would like to limit hair styles, colors and clothing for VIP players.

Players lv: 1 (VIP)
Max cloth color: 450
Max hair style: 50
Max hair color: 80

Players lv: 0 (Normal)
Max cloth color: 150
Max hair style: 20
Max hair color: 30

Script:
 

Spoiler
prontera,164,232,1	script	Estilista#custom_stylist	2_M_DYEINGER,{
OnProgressbarEnd:
	setarray .@max[1], 
		// paletas de casamento só chegam a 77
		checkoption(0x1000) ? 77 : getbattleflag("max_cloth_color"),
		getbattleflag("max_hair_style"),
		getbattleflag("max_hair_color");
	setarray .@Look[1],LOOK_CLOTHES_COLOR,LOOK_HAIR,LOOK_HAIR_COLOR;
	
	if (@autoscroll) {
		set @autoscroll, 0;
	} else {
		set @s, select(" - Cor da roupa (^0055FF"+getlook(LOOK_CLOTHES_COLOR)+"^000000): - Penteado (^0055FF"+getlook(LOOK_HAIR)+"^000000): - Cor do penteado (^0055FF"+getlook(LOOK_HAIR_COLOR)+"^000000)");
		set @Revert, getlook(.@Look[@s]);
	}
	set .@Style, getlook(.@Look[@s]);
	
	while(1) {
		set .@menu$, (.@previous ? (": - Anterior (^0055FF"+((.@Style>1)?.@Style-1:.@max[@s])+"^000000): - Próxima (^0055FF"+((.@Style<.@max[@s])?.@Style+1:1)+"^000000)") 
		           : (" - Próxima (^0055FF"+((.@Style<.@max[@s])?.@Style+1:1)+"^000000): - Anterior (^0055FF"+((.@Style>1)?.@Style-1:.@max[@s])+"^000000):")) 
		           + ": - Próxima ^008000(auto rolagem)^000000: - Anterior ^008000(auto rolagem)^000000:"
		           + " - Pule para...: - Reverter para o original (^0055FF"+@Revert+"^000000)";
		switch(select(.@menu$)) {
			case 1:
			case 3:
				set .@previous,0;
				set .@Style, ((.@Style<.@max[@s])?.@Style+1:1);
				break;
			case 2:
				set .@previous,1;
				set .@Style, ((.@Style>1)?.@Style-1:.@max[@s]);
				break;
				
			case 4:
				mes "[^008000Estilista^000000]";
				mes "Clique em Fechar para iniciar a rolagem automática...";
				mes " ";
				mes "Clique em qualquer lugar da tela para parar a rolagem automática.";
				close2;
				set @autoscroll, 1;
				addtimer 1,strnpcinfo(3)+"::OnProgressbarEnd";
				while (1) {
					set .@Style, ((.@Style<.@max[@s])?.@Style+1:1);
					setlook .@Look[@s], .@Style;
					message strcharinfo(0),"This is style #"+.@Style+".";
					progressbar "FFFF00",1;
				}
				end;
			case 5:
				mes "[^008000Estilista^000000]";
				mes "Clique em Fechar para iniciar a rolagem automática...";
				mes " ";
				mes "Clique em qualquer lugar da tela para parar a rolagem automática.";
				close2;
				set @autoscroll, 1;
				addtimer 1,strnpcinfo(3)+"::OnProgressbarEnd";
				while (1) {
					set .@Style, ((.@Style>1)?.@Style-1:.@max[@s]);
					setlook .@Look[@s], .@Style;
					message strcharinfo(0),"This is style #"+.@Style+".";
					progressbar "FFFF00",1;
				}
				end;
			
			case 6: message strcharinfo(0),"Choose a style between 1 - "+.@max[@s]+".";
				input .@Style,0,.@max[@s];
				if (!.@Style) set .@Style, rand(1,.@max[@s]);
				break;
			case 7: set .@Style, @Revert; setlook .@Look[@s], @Revert; break;
		}
		setlook .@Look[@s], .@Style;
		message strcharinfo(0),"This is style #"+.@Style+".";
	}
}

 

Thank you very much. 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Thank you all for your help.
I don't have any active VIP system, so I think the '' vip_status '' command doesn't work well for me, or maybe it's my trunk version.

I used another way, and it seems to be working well for me.
I'll leave it below for anyone who has the same problem as mine.

 

	if(getgmlevel() >= 1)
	setarray .@max[1],450,50,80;
	else
	setarray .@max[1],150,20,30;
	setarray .@Look[1],LOOK_CLOTHES_COLOR,LOOK_HAIR,LOOK_HAIR_COLOR;

SOLVED!

Share this post


Link to post
Share on other sites
  • 0

here..

prontera,164,232,1	script	Estilista#custom_stylist	2_M_DYEINGER,{
OnProgressbarEnd:
	if (vip_status(1)){
	setarray [email protected][1],450,50,80;
	}else
	setarray [email protected][1],150,20,30;
	setarray [email protected][1],LOOK_CLOTHES_COLOR,LOOK_HAIR,LOOK_HAIR_COLOR;
	
	if (@autoscroll) {
		set @autoscroll, 0;
	} else {
		set @s, select(" - Cor da roupa (^0055FF"+getlook(LOOK_CLOTHES_COLOR)+"^000000): - Penteado (^0055FF"+getlook(LOOK_HAIR)+"^000000): - Cor do penteado (^0055FF"+getlook(LOOK_HAIR_COLOR)+"^000000)");
		set @Revert, getlook([email protected][@s]);
	}
	set [email protected], getlook([email protected][@s]);
	
	while(1) {
		set [email protected]$, ([email protected] ? (": - Anterior (^0055FF"+(([email protected]>1)[email protected]:[email protected][@s])+"^000000): - Próxima (^0055FF"+(([email protected]<[email protected][@s])[email protected]+1:1)+"^000000)") 
		           : (" - Próxima (^0055FF"+(([email protected]<[email protected][@s])[email protected]+1:1)+"^000000): - Anterior (^0055FF"+(([email protected]>1)[email protected]:[email protected][@s])+"^000000):")) 
		           + ": - Próxima ^008000(auto rolagem)^000000: - Anterior ^008000(auto rolagem)^000000:"
		           + " - Pule para...: - Reverter para o original (^0055FF"[email protected]+"^000000)";
		switch(select([email protected]$)) {
			case 1:
			case 3:
				set [email protected],0;
				set [email protected], (([email protected]<[email protected][@s])[email protected]+1:1);
				break;
			case 2:
				set [email protected],1;
				set [email protected], (([email protected]>1)[email protected]:[email protected][@s]);
				break;
				
			case 4:
				mes "[^008000Estilista^000000]";
				mes "Clique em Fechar para iniciar a rolagem automática...";
				mes " ";
				mes "Clique em qualquer lugar da tela para parar a rolagem automática.";
				close2;
				set @autoscroll, 1;
				addtimer 1,strnpcinfo(3)+"::OnProgressbarEnd";
				while (1) {
					set [email protected], (([email protected]<[email protected][@s])[email protected]+1:1);
					setlook [email protected][@s], [email protected];
					message strcharinfo(0),"This is style #"[email protected]+".";
					progressbar "FFFF00",1;
				}
				end;
			case 5:
				mes "[^008000Estilista^000000]";
				mes "Clique em Fechar para iniciar a rolagem automática...";
				mes " ";
				mes "Clique em qualquer lugar da tela para parar a rolagem automática.";
				close2;
				set @autoscroll, 1;
				addtimer 1,strnpcinfo(3)+"::OnProgressbarEnd";
				while (1) {
					set [email protected], (([email protected]>1)[email protected]:[email protected][@s]);
					setlook [email protected][@s], [email protected];
					message strcharinfo(0),"This is style #"[email protected]+".";
					progressbar "FFFF00",1;
				}
				end;
			
			case 6: message strcharinfo(0),"Choose a style between 1 - "[email protected][@s]+".";
				input [email protected],0,[email protected][@s];
				if ([email protected]) set [email protected], rand(1,[email protected][@s]);
				break;
			case 7: set [email protected], @Revert; setlook [email protected][@s], @Revert; break;
		}
		setlook [email protected][@s], [email protected];
		message strcharinfo(0),"This is style #"[email protected]+".";
	}
}

 

  • Love 1
  • Like 1

Share this post


Link to post
Share on other sites
  • 0
On 12/20/2020 at 2:01 PM, BeWan said:

here..

prontera,164,232,1	script	Estilista#custom_stylist	2_M_DYEINGER,{
OnProgressbarEnd:
	if (vip_status(1)){
	setarray [email protected][1],450,50,80;
	}else
	setarray [email protected][1],150,20,30;
	setarray [email protected][1],LOOK_CLOTHES_COLOR,LOOK_HAIR,LOOK_HAIR_COLOR;
	
	if (@autoscroll) {
		set @autoscroll, 0;
	} else {
		set @s, select(" - Cor da roupa (^0055FF"+getlook(LOOK_CLOTHES_COLOR)+"^000000): - Penteado (^0055FF"+getlook(LOOK_HAIR)+"^000000): - Cor do penteado (^0055FF"+getlook(LOOK_HAIR_COLOR)+"^000000)");
		set @Revert, getlook([email protected][@s]);
	}
	set [email protected], getlook([email protected][@s]);
	
	while(1) {
		set [email protected]$, ([email protected] ? (": - Anterior (^0055FF"+(([email protected]>1)[email protected]:[email protected][@s])+"^000000): - Próxima (^0055FF"+(([email protected]<[email protected][@s])[email protected]+1:1)+"^000000)") 
		           : (" - Próxima (^0055FF"+(([email protected]<[email protected][@s])[email protected]+1:1)+"^000000): - Anterior (^0055FF"+(([email protected]>1)[email protected]:[email protected][@s])+"^000000):")) 
		           + ": - Próxima ^008000(auto rolagem)^000000: - Anterior ^008000(auto rolagem)^000000:"
		           + " - Pule para...: - Reverter para o original (^0055FF"[email protected]+"^000000)";
		switch(select([email protected]$)) {
			case 1:
			case 3:
				set [email protected],0;
				set [email protected], (([email protected]<[email protected][@s])[email protected]+1:1);
				break;
			case 2:
				set [email protected],1;
				set [email protected], (([email protected]>1)[email protected]:[email protected][@s]);
				break;
				
			case 4:
				mes "[^008000Estilista^000000]";
				mes "Clique em Fechar para iniciar a rolagem automática...";
				mes " ";
				mes "Clique em qualquer lugar da tela para parar a rolagem automática.";
				close2;
				set @autoscroll, 1;
				addtimer 1,strnpcinfo(3)+"::OnProgressbarEnd";
				while (1) {
					set [email protected], (([email protected]<[email protected][@s])[email protected]+1:1);
					setlook [email protected][@s], [email protected];
					message strcharinfo(0),"This is style #"[email protected]+".";
					progressbar "FFFF00",1;
				}
				end;
			case 5:
				mes "[^008000Estilista^000000]";
				mes "Clique em Fechar para iniciar a rolagem automática...";
				mes " ";
				mes "Clique em qualquer lugar da tela para parar a rolagem automática.";
				close2;
				set @autoscroll, 1;
				addtimer 1,strnpcinfo(3)+"::OnProgressbarEnd";
				while (1) {
					set [email protected], (([email protected]>1)[email protected]:[email protected][@s]);
					setlook [email protected][@s], [email protected];
					message strcharinfo(0),"This is style #"[email protected]+".";
					progressbar "FFFF00",1;
				}
				end;
			
			case 6: message strcharinfo(0),"Choose a style between 1 - "[email protected][@s]+".";
				input [email protected],0,[email protected][@s];
				if ([email protected]) set [email protected], rand(1,[email protected][@s]);
				break;
			case 7: set [email protected], @Revert; setlook [email protected][@s], @Revert; break;
		}
		setlook [email protected][@s], [email protected];
		message strcharinfo(0),"This is style #"[email protected]+".";
	}
}

 

Thank you very much mr @BeWan But there is a problem. VIP players are failing to exceed the limit of 150, 20, 30.

The script contains no errors.

Share this post


Link to post
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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.