function script fixHeadStyles {
callfunc "getHeadStyles";
if (!HELLOWORLD)
goto L_RandomHair;
set @style, getlook(LOOK_HAIR); // FIXME: this needs to be a param in the future
set @color, getlook(LOOK_HAIR_COLOR); // FIXME: this needs to be a param in the future
debugmes "Login OK";
return;
if (@color >= 123 && @color <= HC_WHITE) // convert shock white
@color = (HC_WHITE - Class) + 1;
if (@color < 105 && ((@color - (15 * (Class - 1))) < 0 || @color > ((15 * (Class - 1)) + (getarraysize(@HairColors$) - 1))))
set @color, 15 * (Class - 1); // it is possible to style color 0 but not style 0 since style is treated as an item
setlook LOOK_HAIR_COLOR, @color; // FIXME: this needs to be a param in the future
return;
L_RandomHair:
HELLOWORLD=true;
//resetstatus; // <= important! gives 48 stat points
debugmes "Set random look....";
setlook LOOK_HAIR, rand(1, getarraysize(@HairStyles$));
setlook LOOK_HAIR_COLOR, rand(15);
return;
}
// Hairstyle config
// set array of style and colors
- script hairstyle_config NPC_HIDDEN,{
end;
OnInit:
setarray $@hairstyle$[0], "(none)", "Bald", "Bowl cut", "Combed back",
"Emo", "Mohawk", "Pompadour", "Center parting", "Long and slick",
"Short and curly", "Pigtails", "Long and curly", "Parted",
"Perky ponytail", "Wave", "Mane", "Bun", "Wavy", "Bunches",
"Long ponytail", "Infinitely long", "Choppy", "Wild", "Punk",
"Imperial", "Side strand", "Messy", "Flat ponytail",
"Tapered Nape";
setarray $@haircolor$[0], "Light Brown", "Green", "Red",
"Purple", "Gray", "Yellow", "Blue",
"Light Red", "Light Blue", "Dark Purple", "Black",
"Pink", "Brown", "Dark";
setarray $@REFEXP[0], 400, 900, 2250, 6500, 15000;
end;
}