Jump to content
  • 0

R > stylist restriction for summoner (not all of them)


drifterxxxx2

Question


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.02
  • Content Count:  83
  • Reputation:   3
  • Joined:  10/22/17
  • Last Seen:  

hi

i'm using the default script for stylist and need a restriction that allow a job (i.e. summoner) to only have access to (i.e.) 6 hair styles, 10 cloth colors, 10 hair colors.

 

npc/custom/stylist.txt

//===== rAthena Script =======================================
//= Stylist
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Changes your hair style, hair color, and cloth color.
//===== Additional Comments: =================================
//= 1.0 Initial script.
//= 1.1 Switched to 'getbattleflag', credits to Saithis. [Euphy]
//============================================================

prontera,170,180,1	script	Stylist#custom_stylist	122,{
	setarray .@Styles[1],
		getbattleflag("max_cloth_color"),
		getbattleflag("max_hair_style"),
		getbattleflag("max_hair_color");
	setarray .@Look[1],
		LOOK_CLOTHES_COLOR,
		LOOK_HAIR,
		LOOK_HAIR_COLOR;
	set .@s, select(" ~ Cloth color: ~ Hairstyle: ~ Hair color");
	set .@Revert, getlook(.@Look[.@s]);
	set .@Style,1;
	while(1) {
		setlook .@Look[.@s], .@Style;
		message strcharinfo(0),"This is style #"+.@Style+".";
		set .@menu$, " ~ Next (^0055FF"+((.@Style!=.@Styles[.@s])?.@Style+1:1)+"^000000): ~ Previous (^0055FF"+((.@Style!=1)?.@Style-1:.@Styles[.@s])+"^000000): ~ Jump to...: ~ Revert to original (^0055FF"+.@Revert+"^000000)";
		switch(select(.@menu$)) {
		case 1:
			set .@Style, ((.@Style != .@Styles[.@s]) ? .@Style+1 : 1);
			break;
		case 2:
			set .@Style, ((.@Style != 1) ? .@Style-1 : .@Styles[.@s]);
			break;
		case 3:
			message strcharinfo(0),"Choose a style between 1 - "+.@Styles[.@s]+".";
			input .@Style,0,.@Styles[.@s];
			if (!.@Style)
				set .@Style, rand(1,.@Styles[.@s]);
			break;
		case 4:
			set .@Style, .@Revert;
			setlook .@Look[.@s], .@Revert;
			break;
		}
	}
}

 

I read here but it only gives a full job restriction /sob 

 

 

thank you in advance

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   704
  • Joined:  12/21/14
  • Last Seen:  

setarray .@Styles[1],
		getbattleflag("max_cloth_color"),
		getbattleflag("max_hair_style"),
		getbattleflag("max_hair_color");

^ this the array for the numbers

do like that

if(Class == Job_Summoner){
	setarray .@Styles[1],
		10,//max_cloth_color
		6,//max_hair_style
		10;//max_hair_color
}else{
	setarray .@Styles[1],
		getbattleflag("max_cloth_color"),
		getbattleflag("max_hair_style"),
		getbattleflag("max_hair_color");
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.02
  • Content Count:  83
  • Reputation:   3
  • Joined:  10/22/17
  • Last Seen:  

works like a charm

thank you very much /thx 

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