//===== rAthena Script =======================================
//= Stylist
//===== by: ==================================================
//= 1.0 - Euphy
//= 2.0 - Myzter
//===== Current Version: =====================================
//= 2.0
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Changes your hair style, hair color, and cloth color.
//============================================================
prontera,160,187,1 script Stylist#custom01 122,{
set .@Item,8888; // Set here the item to pay for any style change
setarray .@MaxCode[0],553,37,250;
setarray .@StyleClass[0],7,1,6; // Don't change it
setarray .@StyleClassName$[0],"Cloth color","Hairstyle","Hair color";
set .@opt, select(.@StyleClassName$[0],.@StyleClassName$[1],.@StyleClassName$[2],"[x] Exit") - 1;
if (.@opt == 3) close;
if (!countitem(.@Item)) {
message strcharinfo(0), "Hmm, i need a " + getitemname(.@Item) + " to change my style.";
close;
}
delitem .@Item,1;
set .@selCat, .@StyleClass[.@opt];
set .@Original, getlook(.@selCat);
set .@Style, .@Original;
set .@Direction,1;
dispbottom .@selCat + " " + .@Original + " " + .@MaxCode[.@opt];
dispbottom "> Original " + .@StyleClassName$[.@opt] + ": " + .@Original;
while(1) {
if (.@Style < 0) set .@Style, .@MaxCode[.@opt];
if (.@Style > .@MaxCode[.@opt]) set .@Style, 0;
setlook .@selCat, .@Style;
set .@Nx$, "[>] ^0080FFNext^000000";
set .@Pv$, "[<] ^8080C0Previows^000000";
// set .@menu$, .@Direction?.@Nx$ + "[^FF641A" + .@Style + "^000000 / " + .@MaxCode[.@opt] + "]:" + .@Pv$:.@Pv$ + " / " + .@MaxCode[.@opt] + "]:" + .@Nx$;
set .@menu$, (.@Direction?.@Nx$:.@Pv$) + " [^FF641A" + .@Style + "^000000 / " + .@MaxCode[.@opt] + "]:" + (.@Direction?.@Pv$:.@Nx$);
set .@menu$, .@menu$ + ":[*] ^008000Jump to...^000000:[!] ^ff0000Finish!^000000";
switch(prompt(.@menu$)) {
case 1:
if (.@Direction) {
set .@Style, .@Style + 1;
} else {
set .@Style, .@Style - 1;
set .@Direction,0;
}
break;
case 2:
if (.@Direction) {
set .@Style, .@Style - 1;
set .@Direction,0;
} else {
set .@Style, .@Style + 1;
set .@Direction,1;
}
break;
case 3:
message strcharinfo(0),"I have to input a style between 1 and " + .@MaxCode[.@opt] + "...";
input .@Style,0,.@MaxCode[.@opt];
set .@Direction,1;
break;
case 4:
dispbottom "> Selected " + .@StyleClassName$[.@opt] + ": " + .@Style;
close;
case 255: // Player press the Cancel button
if (getlook(.@selCat) != .@Original) {
setlook .@selCat, .@Original;
dispbottom "> Process Canceled, restoring original " + .@StyleClassName$[.@opt] + ": " + .@Original;
}
getitem .@Item,1;
end;
}
}
end;
}