Please help me with this Stylist.

almarket23

New member
Messages
90
Points
0
Github
nexus
Emulator
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

Code:
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;			}	}}
 
Try this.

Code:
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;		}	}}
 
Last edited by a moderator:
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.

 
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.
 

 
Last edited by a moderator:
Back
Top