summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/headstyles.txt
blob: f5f2ea8257a5f5987624a16e55847b1aadbe8684 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// headstyles config file
// author: meko

function|script|fixHeadStyles
{
    callfunc "getHeadStyles";
    if ((TUT_var < 1 || QL_BEGIN < 1) && StatusPoint < 1 && BaseLevel == 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
        setlook LOOK_HAIR_STYLE, 1; // FIXME: this needs to be a param in the future
    if (@color >= 120 && @color <= HC_WHITE) // convert shock white
        set @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:
    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
{
    cleararray @HairStyles$, "", getarraysize(@HairStyles$);
    cleararray @HairColors$, "", getarraysize(@HairColors$);

    if   (Class == 2) goto L_Tritan;
    elif (Class == 3) goto L_Ifriton;
    elif (Class == 4) goto L_Gispaan;
    elif (Class == 5) goto L_Sparron;
    elif (Class == 6) goto L_Headless;
    else set Class, 1; // we can not style custom classes, so reset when using the barber
    goto L_Talpan;

L_Talpan:
    set @species$, "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_Headless:
    if (Class == 6) set @species$, "Undead";
    setarray @HairStyles$[0],
        "Plain", "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:
    set @species$, "Tritan";
    setarray @HairStyles$[0],
        "Finless",  "Mohawk",  "Dorsal",  "Translucid",  "Spiky",
        "Dual dorsal", "Intricate",  "Lateral";
    setarray @HairColors$[0],
        "Midori",  "Aqua",  "Mauve",  "Magenta",  "Jet";
    return;

L_Gispaan:
    set @species$, "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:
    set @species$, "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:
    set @species$, "Ifriton";
    setarray @HairStyles$[0],
        "Plain",  "Horny",  "Kinky",  "Fiendish",  "Modest",
        "Spiky";
    setarray @HairColors$[0],
        "Natural",  "Fiery",  "Bold",  "Blazing",  "Spunky",
        "Gloomy";
    return;
}