prontera,134,190,5 script Stylist#balikRO 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, select(" ~ Cloth color: ~ Hairstyle: ~ Hair color");
.@t_start = (s_select-1)*2;
switch(s_select){
case 1:
message strcharinfo(0)," I take "+.event_ticket[1]+" "+getitemname(.event_ticket[0])+" For Changing Cloth Color";
break;
case 2:
message strcharinfo(0)," I take "+.event_ticket[3]+" "+getitemname(.event_ticket[2])+" For Changing HairStyle";
break;
case 3:
message strcharinfo(0)," I take "+.event_ticket[5]+" "+getitemname(.event_ticket[4])+" For Changing Hair Color";
break;
}
if (countitem(.event_ticket[.@t_start]) < .event_ticket[.@t_start+1]){ //Check one more time.
message strcharinfo(0), "You don't have enough "+getitemname(.event_ticket[.@t_start]);
end;
}
set RevertStyle, getlook(.@Look[s_select]); //Original Style
set .@style,1;
set StyleCost,1;
addtimer 1000,strnpcinfo(3)+"::OnResetLook";
while(1) {
setlook .@Look[s_select], .@style;
message strcharinfo(0),"This is style #"+.@style+".";
set .@menu$, "~ Confirm the Style: ~ Next (^0055FF"+((.@style!=.@styles[s_select])?.@style+1:1)+"^000000): ~ Previous (^0055FF"+((.@style!=1)?.@style-1:.@styles[s_select])+"^000000): ~ Jump to...: ~ Revert to original (^0055FF"+.@Revert+"^000000)";
switch(select(.@menu$)) {
case 1:
if (RevertStyle == .@style){
message strcharinfo(0),"Same Style has been chosen";
break;
}
if (countitem(.event_ticket[.@t_start]) < .event_ticket[.@t_start+1]){ //Check one more time.
message strcharinfo(0), "You don't have enough "+getitemname(.event_ticket[.@t_start]);
end;
}
mes " Style Changed";
set StyleCost,0;
delitem .event_ticket[.@t_start],.event_ticket[.@t_start+1];
close;
case 2: set .@style, ((.@style!=.@styles[s_select])?.@style+1:1); break;
case 3: set .@style, ((.@style!=1)?.@style-1:.@styles[s_select]); break;
case 4: message strcharinfo(0),"Choose a style between 1 - "+.@styles[s_select]+".";
input .@style,0,.@styles[s_select];
if (!.@style) set .@style, rand(1,.@styles[s_select]);
break;
case 5: set .@style, RevertStyle; setlook .@Look[s_select], RevertStyle; break;
}
}
end;
OnResetLook:
if (StyleCost==1){
setarray .@Look[1],LOOK_CLOTHES_COLOR,LOOK_HAIR,LOOK_HAIR_COLOR;
setlook .@Look[s_select], RevertStyle;
message strcharinfo(0),"Style Reset to Normal";
}
end;
OnInit:
setarray .event_ticket[0],20014,1; //Cloth Color
setarray .event_ticket[2],20014,1; //Hair Style
setarray .event_ticket[4],20014,1; //Hair Color
}