diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-04-09 13:33:57 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-04-09 13:33:57 -0300 |
commit | cf18ce071c79ae37e14ea38943e0b1d88da70a7b (patch) | |
tree | f9159c9b60b3018300dd22ffba0d797bc5e828e5 /npc/functions/headstyles.txt | |
parent | 8a4bf716002a017de77fe7df301ef8e4aaf00a2e (diff) | |
download | serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.gz serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.bz2 serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.xz serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.zip |
Override
Diffstat (limited to 'npc/functions/headstyles.txt')
-rwxr-xr-x | npc/functions/headstyles.txt | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/npc/functions/headstyles.txt b/npc/functions/headstyles.txt new file mode 100755 index 00000000..91395fd1 --- /dev/null +++ b/npc/functions/headstyles.txt @@ -0,0 +1,97 @@ + +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; +} + +function script getHeadStyles { + cleararray @HairStyles$, "", getarraysize(@HairStyles$); + cleararray @HairColors$, "", getarraysize(@HairColors$); + + if (Class == 2) goto L_Tritan; + else if (Class == 3) goto L_Ifriton; + else if (Class == 4) goto L_Gispaan; + else if (Class == 5) goto L_Sparron; + else set Class, 1; // we can not style custom classes, so reset when using the barber + goto L_Talpan; + +L_Talpan: + setarray @HairStyles$[0], + "Bald", "Flat ponytail", "Bowl cut", "Combed back", "Emo", "Mohawk", + "Pompadour", "Center parting/Short and slick", "Long and slick", + "Short and curly", "Pigtails", "Long and curly", "Parted", + "Perky ponytail", "Wave", "Mane", "Bun", "Shoulder Length Flick", + "Fizzy", "Long and Clipped"; + setarray @HairColors$[0], + "Brunette", "Green", "Dark red", "Light purple", "Gray", "Blonde", + "Teal", "Light red", "Blue", "Dark purple", "Black", "Pink", + "Brown";//, "(free slot)", "(free slot)"; + return; + +L_Tritan: + setarray @HairStyles$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15", + "16", "17", "18", "19", "20"; + setarray @HairColors$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15"; + return; + +L_Gispaan: + setarray @HairStyles$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15", + "16", "17", "18", "19", "20"; + setarray @HairColors$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15"; + return; + +L_Sparron: + setarray @HairStyles$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15", + "16", "17", "18", "19", "20"; + setarray @HairColors$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15"; + return; + +L_Ifriton: + setarray @HairStyles$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15", + "16", "17", "18", "19", "20"; + setarray @HairColors$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15"; + return; +} |