// 6046, New Clothing Dye Coupon
// Euphy's Stylist NPC
prontera,170,180,1 script Adv. Stylist 4_F_JP_CHROME,{
setarray .@styles[1],getbattleflag("max_cloth_color"),getbattleflag("max_hair_style"),getbattleflag("max_hair_color");
setarray .@Look[1],7,1,6;
mes "[ ^8B008BAdvanced Stylist^000000 ]";
mes "Hello "+strcharinfo(0)+", I am Elendir.";
mes "I can customize your appearance (Cloth Color, Hair Style, and Hair Color) in exchange for (1) Premium Reset Stone.";
mes "Please select the service that you want:";
set .@s, select(" ~ Cloth Color", " ~ Hair Style", " ~ Hair Color");
set .@Revert, getlook(.@Look[.@s]);
set .@style,1;
while(1) {
setlook .@Look[.@s], .@style;
message strcharinfo(PC_NAME),"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): ~ I want this appearance";
switch(select(.@menu$)) {
case 1:
set .@style, ((.@style!=.@styles[.@s])?.@style+1:1);
if ( countitem(6046) < 1 ) goto dyecouponacceptance_fail;
case 2:
set .@style, ((.@style!=1)?.@style-1:.@styles[.@s]);
if ( countitem(6046) < 1 ) goto dyecouponacceptance_fail;
case 3:
message strcharinfo(PC_NAME),"Choose a style between 1 - "+.@styles[.@s]+".";
input .@style,0,.@styles[.@s];
case 5:
if ( countitem(6046) < 1 ) goto dyecoupon_fail; // Counts Clothing Coupon
delitem 6046, 1; // Deletes New Clothing Dye Coupon
next;
mes "[ ^8B008BAdvanced Stylist^000000 ]";
mes "There you go! I've successfully changed your appearance.";
close;
dyecoupon_fail:
next;
mes "[ ^8B008BAdvanced Stylist^000000 ]";
mes "It seems you don't have a ^0000FFNew Clothing Dye Coupon^000000.";
mes "Please come back when you have the coupon.";
close;
dyecouponacceptance_fail
set .@style, .@Revert;
setlook .@Look[.@s], .@Revert;
next;
mes "[ ^8B008BAdvanced Stylist^000000 ]";
mes "It seems you don't have a ^0000FFNew Clothing Dye Coupon^000000.";
mes "Please come back when you have the coupon.";
if (!.@style) set .@style, rand(1,.@styles[.@s]);
break;
case 4:
set .@style, .@Revert;
setlook .@Look[.@s], .@Revert;
break;
}
}
}