summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/headstyles.txt
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2016-01-26 13:32:37 -0600
committermekolat <mekolat@users.noreply.github.com>2016-02-08 21:04:36 -0500
commitd0b2262fc38ecfa47671e1738d657b4317238499 (patch)
tree22eb4405d461e8e7d7040273895b5a81d95a0500 /world/map/npc/functions/headstyles.txt
parentf28b9ef883c8da9a890096d8e05865b90795c46d (diff)
downloadserverdata-d0b2262fc38ecfa47671e1738d657b4317238499.tar.gz
serverdata-d0b2262fc38ecfa47671e1738d657b4317238499.tar.bz2
serverdata-d0b2262fc38ecfa47671e1738d657b4317238499.tar.xz
serverdata-d0b2262fc38ecfa47671e1738d657b4317238499.zip
Move gender selection to intro dialogue
Diffstat (limited to 'world/map/npc/functions/headstyles.txt')
-rw-r--r--world/map/npc/functions/headstyles.txt11
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