diff options
Diffstat (limited to 'world/map/npc/functions/headstyles.txt')
-rw-r--r-- | world/map/npc/functions/headstyles.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/world/map/npc/functions/headstyles.txt b/world/map/npc/functions/headstyles.txt index 02cc895f..1098c80c 100644 --- a/world/map/npc/functions/headstyles.txt +++ b/world/map/npc/functions/headstyles.txt @@ -3,10 +3,9 @@ function|script|fixHeadStyles { - if (Class < 1 || Class > 5) // usable classes - set Class, 1; // it is impossible to use custom styling for class 0 in m+ so default is 1 - callfunc "getHeadStyles"; + if ((TUT_var < 1 || QL_BEGIN < 1) && StatusPoint < 1) + goto L_RandomHair; // on first login set @style, getlook(LOOK_HAIR_STYLE); // 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 if (@style < 1 || @style > getarraysize(@HairStyles$)) // leftover from previous attempt at classes @@ -17,6 +16,12 @@ function|script|fixHeadStyles 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: + resetstatus; // <= important! gives 48 stat points + setlook LOOK_HAIR_STYLE, rand(1, getarraysize(@HairStyles$)); + setlook LOOK_HAIR_COLOR, rand((15 * (Class - 1)),((15 * (Class - 1)) + (getarraysize(@HairColors$) - 1))); + return; } function|script|getHeadStyles |