Jump to content
  • 0

Stylist Limit


hardelite

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  44
  • Reputation:   2
  • Joined:  01/09/18
  • Last Seen:  

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. 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  44
  • Reputation:   2
  • Joined:  01/09/18
  • Last Seen:  

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!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  398
  • Reputation:   246
  • Joined:  07/04/19
  • Last Seen:  

here..

prontera,164,232,1	script	Estilista#custom_stylist	2_M_DYEINGER,{
OnProgressbarEnd:
	if (vip_status(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;
	
	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+".";
	}
}

 

  • Love 1
  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  44
  • Reputation:   2
  • Joined:  01/09/18
  • Last Seen:  

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 .@max[1],450,50,80;
	}else
	setarray .@max[1],150,20,30;
	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 mr @BeWan But there is a problem. VIP players are failing to exceed the limit of 150, 20, 30.

The script contains no errors.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   25
  • Joined:  12/24/14
  • Last Seen:  

 	if (vip_status(1)){
	setarray .@max[1],450,50,80;
	} else {
	setarray .@max[1],150,20,30;
        }
  • Like 1
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...