From d0b2262fc38ecfa47671e1738d657b4317238499 Mon Sep 17 00:00:00 2001 From: wushin Date: Tue, 26 Jan 2016 13:32:37 -0600 Subject: Move gender selection to intro dialogue --- world/map/npc/functions/headstyles.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'world/map/npc/functions/headstyles.txt') 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 -- cgit v1.2.3-70-g09d2