Jump to content
  • 0
Sign in to follow this  
almarket23

Please help me with this Stylist.

Question

Hello guys. Can anyone help me with my Stylist. Here is my script. This is not yet finished but can anyone finish this for me? i dont know how to do this. Thanks

 

prontera,150,150,5	script	Stylist	878,{set .@n$,"[Stylist]";query_sql("SELECT `char_id`,`name`,`hair`,`hair_color`,`clothes_color` FROM `char` WHERE `char_id` = '"+getcharid(0)+"'",@charid$,@name$,@hair$,@haircolor$,@clothcolor$);mes .@n$;mes "You are currently wearing:";mes "Cloth Color: "+@clothcolor$+"";mes "Hair Color: "+@haircolor$+"";mes "Hair Style: "+@hair$+"";next;mes .@n$;mes "What would you like to change?";next;switch(select("Clothes Color:Hair Color:Hair Style:Saved Dyes:Randomize")) {	case 1:	clothcolor:		mes .@n$;		mes "Choose a style to begin from between 0 to 699.";		input (.@clothcolor);		switch(select("Next:Previous:I Like it!:[Save Clothes]")) {			case 1: // will show the next clothcolor			case 2: // will show the previous clothcolor			case 3:				next;				mes .@n$;				mes "Perfect ! I am glad you found a style that fits you!";				close;			case 4:				switch(select("Set 1:Set 2:Set3")) {					case 1: // will save the clothcolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto clothcolor;					case 2: // will save the clothcolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto clothcolor;					case 3: // will save the clothcolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto clothcolor;					} 			}	case 2:	haircolor:		mes .@n$;		mes "Choose a style to begin from between 0 to 126.";		input (.@haircolor);		switch(select("Next:Previous:I Like it!:[Save Clothes]")) {			case 1: // will show the next hair color			case 2: // will show the previous hair color			case 3:				next;				mes .@n$;				mes "Perfect ! I am glad you found a style that fits you!";				close;			case 4:				switch(select("Set 1:Set 2:Set3")) {					case 1: // will save the haircolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto haircolor;					case 2: // will save the haircolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto haircolor;					case 3: // will save the haircolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto haircolor;					}			}	case 3:		mes .@n$;		mes "Choose a style to begin from between 0 to 27.";		input (.@hairstyle);		switch(select("Next:Previous:I Like it!")) {			case 1: // will show the next hairstyle			case 2: // will show the previous hairstyle			case 3:				next;				mes .@n$;				mes "Perfect ! I am glad you found a style that fits you!";				close;			}	case 4:		mes .@n$;		mes "Here are the color sets you saved:";		mes "Which one do you want to wear ?";		mes Slot 1 : <clothcolor>,<haircolor>";		mes Slot 2 : <clothcolor>,<haircolor>";		mes Slot 3 : <clothcolor>,<haircolor>";		next;		switch(select("Set 1:Set2:Set3")) {			case 1:				// it will automatically wear the cloth color and hair color that you have saved before in this set.				mes .@n$;				mes "Here is the set you like! See you later.";				close;			case 2:				// it will automatically wear the cloth color and hair color that you have saved before in this set.				mes .@n$;				mes "Here is the set you like! See you later.";				close;			case 3:				// it will automatically wear the cloth color and hair color that you have saved before in this set.				mes .@n$;				mes "Here is the set you like! See you later.";				close;			}	case 5:		mes .@n$;		mes "What would you like to change?";		next;		switch(select("Next:I Like It!")) {			case 1:				// it will going to give you a random cloth color, hair color and hair style.			case 2:				next;				mes .@n$;				mes "Perfect ! I am glad you found a style that fits you!";				close;			}	}}

 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Try this.

 

prontera,150,150,5	script	Stylist	878,{set .@n$,"[Stylist]";query_sql("SELECT `char_id`,`name`,`hair`,`hair_color`,`clothes_color` FROM `char` WHERE `char_id` = '"+getcharid(0)+"'",@charid$,@name$,@hair$,@haircolor$,@clothcolor$);mes .@n$;mes "You are currently wearing:";mes "Cloth Color: "+@clothcolor$+"";mes "Hair Color: "+@haircolor$+"";mes "Hair Style: "+@hair$+"";next;mes .@n$;mes "What would you like to change?";next;switch(select("Clothes Color:Hair Color:Hair Style:Saved Dyes:Randomize")) {	case 1:	clothcolor:		mes .@n$;		mes "Choose a style to begin from between 0 to 699.";		input (.@clothcolor);		switch(select("Next:Previous:I Like it!:[Save Clothes]")) {			case 1: // will show the next clothcolor			case 2: // will show the previous clothcolor			case 3:				next;				mes .@n$;				mes "Perfect ! I am glad you found a style that fits you!";				close;			case 4:				switch(select("Set 1:Set 2:Set3")) {					case 1: // will save the clothcolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto clothcolor;					case 2: // will save the clothcolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto clothcolor;					case 3: // will save the clothcolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto clothcolor;					} 			}	case 2:	haircolor:		mes .@n$;		mes "Choose a style to begin from between 0 to 126.";		input (.@haircolor);		switch(select("Next:Previous:I Like it!:[Save Clothes]")) {			case 1: // will show the next hair color			case 2: // will show the previous hair color			case 3:				next;				mes .@n$;				mes "Perfect ! I am glad you found a style that fits you!";				close;			case 4:				switch(select("Set 1:Set 2:Set3")) {					case 1: // will save the haircolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto haircolor;					case 2: // will save the haircolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto haircolor;					case 3: // will save the haircolor that you want to this set						mes .@n$;						mes "Your style has been saved.";						goto haircolor;					}			}	case 3:		mes .@n$;		mes "Choose a style to begin from between 0 to 27.";		input (.@hairstyle);		switch(select("Next:Previous:I Like it!")) {			case 1: // will show the next hairstyle			case 2: // will show the previous hairstyle			case 3:				next;				mes .@n$;				mes "Perfect ! I am glad you found a style that fits you!";				close;			}	case 4:		mes .@n$;		mes "Here are the color sets you saved:";		mes "Which one do you want to wear ?";		mes "Slot 1 : <clothcolor>,<haircolor>";		mes "Slot 2 : <clothcolor>,<haircolor>";		mes "Slot 3 : <clothcolor>,<haircolor>";		next;		switch(select("Set 1:Set2:Set3")) {			case 1:				// it will automatically wear the cloth color and hair color that you have saved before in this set.				mes .@n$;				mes "Here is the set you like! See you later.";				close;			case 2:				// it will automatically wear the cloth color and hair color that you have saved before in this set.				mes .@n$;				mes "Here is the set you like! See you later.";				close;			case 3:				// it will automatically wear the cloth color and hair color that you have saved before in this set.				mes .@n$;				mes "Here is the set you like! See you later.";				close;			}	case 5:		mes .@n$;		mes "What would you like to change?";		next;		switch(select("Next:I Like It!")) {			case 1:				// it will going to give you a random cloth color, hair color and hair style.			case 2:				next;				mes .@n$;				mes "Perfect ! I am glad you found a style that fits you!";				close;		}	}}
Edited by Dogpatch

Share this post


Link to post
Share on other sites
  • 0

Simple difference

 

Your script

case 4:		mes .@n$;		mes "Here are the color sets you saved:";		mes "Which one do you want to wear ?";		mes Slot 1 : <clothcolor>,<haircolor>";		mes Slot 2 : <clothcolor>,<haircolor>";		mes Slot 3 : <clothcolor>,<haircolor>";

 

Fix to it in the one I posted

case 4:		mes .@n$;		mes "Here are the color sets you saved:";		mes "Which one do you want to wear ?";		mes "Slot 1 : <clothcolor>,<haircolor>";		mes "Slot 2 : <clothcolor>,<haircolor>";		mes "Slot 3 : <clothcolor>,<haircolor>";

 

You were getting DIRECT INPUT errors as you forgot to add a starting quotation on the Slot lines.

Share this post


Link to post
Share on other sites
  • 0

Instead of using a SQL query for this purpose, you should use getlook(..) and setlook(..) instead.

For more information on these commands, you can look them up in doc/script_commands.txt.
 

Edited by Toshiro

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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