summaryrefslogtreecommitdiff
path: root/world/map/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/functions')
-rw-r--r--world/map/npc/functions/barber.txt11
-rw-r--r--world/map/npc/functions/change_sex.txt24
-rw-r--r--world/map/npc/functions/headstyles.txt11
3 files changed, 19 insertions, 27 deletions
diff --git a/world/map/npc/functions/barber.txt b/world/map/npc/functions/barber.txt
index effa3436..54732418 100644
--- a/world/map/npc/functions/barber.txt
+++ b/world/map/npc/functions/barber.txt
@@ -179,10 +179,12 @@ L_Debug:
mes "Class: " + Class;
mes "Style: " + getlook(LOOK_HAIR_STYLE);
mes "Color: " + getlook(LOOK_HAIR_COLOR);
+ mes "Gender: " + Sex;
menu
"edit| Set Class", L_DebugClass,
"edit| Set Style", L_DebugStyle,
"edit| Set Color", L_DebugColor,
+ "edit| Set Gender", L_DebugGender,
"toggle| Simulate logout", L_DebugLogout,
"Close", L_Done;
@@ -216,4 +218,13 @@ L_DebugColor:
setlook LOOK_HAIR_COLOR, @dbg_color;
set @dbg_color, 0;
goto L_Debug;
+
+L_DebugGender:
+ set @dbg_gender, 0;
+ mes "input gender (0-3)";
+ input @dbg_gender;
+ if (@dbg_gender >= 0 && @dbg_gender <= 3)
+ set Sex, @dbg_gender;
+ set @dbg_gender, 0;
+ goto L_Debug;
}
diff --git a/world/map/npc/functions/change_sex.txt b/world/map/npc/functions/change_sex.txt
deleted file mode 100644
index f81334f6..00000000
--- a/world/map/npc/functions/change_sex.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-function|script|ChangeSex
-{
- mes "Please select a character gender:";
- menu
- "Female.", L_Female,
- "Male.", L_Male,
- "Non-binary.", L_NonBinary;
-
-L_Female:
- set @sex, 0;
- goto L_Change;
-
-L_Male:
- set @sex, 1;
- goto L_Change;
-
-L_NonBinary:
- set @sex, 3;
- goto L_Change;
-
-L_Change:
- set Sex, @sex;
- return;
-}
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