From 0ce5c3ab72899dea6489adff3bbd0eac8f3658ec Mon Sep 17 00:00:00 2001 From: mekolat Date: Fri, 24 Oct 2014 15:39:43 -0400 Subject: disallow hair 0 --- world/map/npc/functions/barber.txt | 20 +++++++++++--------- world/map/npc/functions/headstyles.txt | 21 +++++++++++++-------- world/map/npc/items/mirror.txt | 4 ++-- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/world/map/npc/functions/barber.txt b/world/map/npc/functions/barber.txt index 0f9b4ffb..58fee175 100644 --- a/world/map/npc/functions/barber.txt +++ b/world/map/npc/functions/barber.txt @@ -19,9 +19,11 @@ L_Main: set @color, getlook(LOOK_HAIR_COLOR); set @style$, "Unknown"; set @color$, "Unknown"; - if (@style >= 0 && @style < 20) - set @style$, @HairStyles$[@style]; - if (@color >= 0 && @color < 120) + if (@style >= 1 && @style <= 20) + set @style$, @HairStyles$[(@style - 1)]; + if (Class > 1) + set @color, (@color - (15 * Class)); + if (@color >= 0 && @color <= 15) set @color$, @HairColors$[@color]; if (@color == 127) set @color$, "Shocked White"; @@ -66,15 +68,15 @@ L_Style: @HairStyles$[25], L_MenuItems; L_MenuItems: - if (@menu - 1 == @style) + if (@menu == @style) goto L_SameStyle; if(@menu == (getarraysize(@HairStyles$) - 1)) goto L_RandomStyle; if(@menu == getarraysize(@HairStyles$)) goto L_Done; - setlook LOOK_HAIR_STYLE, @menu - 1; + setlook LOOK_HAIR_STYLE, @menu; goto L_Main; L_RandomStyle: - set @randomStyle, rand(0, (getarraysize(@HairStyles$) -4)); + set @randomStyle, rand(1, (getarraysize(@HairStyles$) -4)); if(@randomStyle == @style) goto L_RandomStyle; setlook LOOK_HAIR_STYLE, @randomStyle; menu @@ -87,7 +89,7 @@ L_SameStyle: goto L_Main; L_Color: - if(@style == Class) goto L_SameColor; // first headstyle of any class is bald + if(@style == @BaldStyle) goto L_SameColor; // last headstyle of any class is bald if(!@colorOpts) set @HairColors$[getarraysize(@HairColors$)], "Surprise me"; if(!@colorOpts) set @HairColors$[getarraysize(@HairColors$)], "Nah, I'm fine"; if(!@colorOpts) set @colorOpts, 1; @@ -115,11 +117,11 @@ L_MenuItems1: goto L_SameColor; if(@menu == (getarraysize(@HairColors$) - 1)) goto L_RandomColor; if(@menu == getarraysize(@HairColors$)) goto L_Done; - setlook LOOK_HAIR_COLOR, ((@menu - 1) + (15 * Class)); + setlook LOOK_HAIR_COLOR, ((@menu - 1) + (15 * (Class - 1))); goto L_Main; L_RandomColor: - set @randomColor, rand((15 * Class), ((getarraysize(@HairColors$) -4) + (15 * Class))); + set @randomColor, rand((15 * (Class - 1)), ((getarraysize(@HairColors$) -4) + (15 * (Class - 1)))); if(@randomColor == @color) goto L_RandomColor; setlook LOOK_HAIR_COLOR, @randomColor; menu diff --git a/world/map/npc/functions/headstyles.txt b/world/map/npc/functions/headstyles.txt index 989bef83..91ed2cfe 100644 --- a/world/map/npc/functions/headstyles.txt +++ b/world/map/npc/functions/headstyles.txt @@ -5,15 +5,20 @@ function|script|getHeadStyles|, { set @HairStyles$, 0; set @HairColors$, 0; - set @BaseClass, 0; // this is the default class + set @BaseClass, 1; // this is the default class cleararray @HairStyles$, "", getarraysize(@HairStyles$); cleararray @HairColors$, "", getarraysize(@HairColors$); cleararray @ValidClasses, "", getarraysize(@ValidClasses); - setarray @ValidClasses, 0; // add new classes here + setarray @ValidClasses, 1; // add new classes here set @loop, 0; goto L_LoopValid; - L_LoopValid: + L_Janitor: + set @BaldStyle, getarraysize(@HairStyles$); // we set it as a variable because we use it with the barber + if(getlook(LOOK_HAIR_STYLE) < 1) setlook LOOK_HAIR_STYLE, @BaldStyle; // the last head of any race has no hair/fins/whatever + return; + + L_LoopValid: // here we fix non-existant classes if(@ValidClasses[@loop] == Class) goto L_ValidClass; set @loop, (@loop + 1); if(@loop >= getarraysize(@ValidClasses)) goto L_FixClass; @@ -24,18 +29,18 @@ function|script|getHeadStyles|, goto L_ValidClass; L_ValidClass: - if(Class == 0) + if(Class == 1) setarray @HairStyles$, // TALPONIAN (human) - "Bald", "Flat ponytail", "Bowl cut", "Combed back", "Emo", "Mohawk", + "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"; - if(Class == 0) + "Fizzy", "Long and Clipped", "Bald"; + if(Class == 1) setarray @HairColors$, // TALPONIAN (human) "Brunette", "Green", "Dark red", "Light purple", "Gray", "Blonde", "Teal", "Light red", "Blue", "Dark purple", "Black", "Pink", "Brown";//, "(free slot)", "(free slot)"; // adding a new species is as simple as adding another if(Class == X) and adding the class to @ValidClasses - return; + goto L_Janitor; } diff --git a/world/map/npc/items/mirror.txt b/world/map/npc/items/mirror.txt index fc2ca69b..82aeb7a7 100644 --- a/world/map/npc/items/mirror.txt +++ b/world/map/npc/items/mirror.txt @@ -4,8 +4,8 @@ function|script|useMirror|, goto L_Rand; L_Rand: - set @style, rand(0,(getarraysize(@HairStyles$) -2)); - set @color, rand((15 * Class),((getarraysize(@HairColors$) -2) + (15 * Class))); + set @style, rand(1,(getarraysize(@HairStyles$) -2)); + set @color, rand((15 * (Class - 1)),((getarraysize(@HairColors$) -2) + (15 * (Class - 1)))); if((getlook(LOOK_HAIR_STYLE) == @style) || (getlook(LOOK_HAIR_COLOR) == @color)) goto L_Rand; goto L_Proceed; -- cgit v1.2.3-60-g2f50 From a34d89f2aaa7276922305091c12f8129cb1aaaab Mon Sep 17 00:00:00 2001 From: wushin Date: Tue, 28 Oct 2014 13:26:12 -0400 Subject: Add Offical Bald Hairstyle --- world/map/conf/battle_athena.conf | 2 +- world/map/db/const.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/world/map/conf/battle_athena.conf b/world/map/conf/battle_athena.conf index cc10f40c..3d94845c 100644 --- a/world/map/conf/battle_athena.conf +++ b/world/map/conf/battle_athena.conf @@ -281,7 +281,7 @@ any_warp_GM_min_level: 20 // valid range of dye's and styles on the client // Note: this is also hard-coded in the char-server min_hair_style: 0 -max_hair_style: 19 +max_hair_style: 20 min_hair_color: 0 max_hair_color: 11 diff --git a/world/map/db/const.txt b/world/map/db/const.txt index 90118b47..fb4c8737 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -222,6 +222,7 @@ HS_Bun 16 HS_ShoulderLengthFlick 17 HS_Fizzy 18 HS_LongAndClipped 19 +HS_Bald 20 // Hair Colors HC_LIGHT_BROWN 0 -- cgit v1.2.3-60-g2f50 From f3439fef34f5b7ca279028e2e1021c7c6443f625 Mon Sep 17 00:00:00 2001 From: wushin Date: Tue, 28 Oct 2014 14:06:47 -0400 Subject: Increase Colors --- world/map/conf/battle_athena.conf | 2 +- world/map/db/const.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/world/map/conf/battle_athena.conf b/world/map/conf/battle_athena.conf index 3d94845c..8288601d 100644 --- a/world/map/conf/battle_athena.conf +++ b/world/map/conf/battle_athena.conf @@ -283,7 +283,7 @@ any_warp_GM_min_level: 20 min_hair_style: 0 max_hair_style: 20 min_hair_color: 0 -max_hair_color: 11 +max_hair_color: 255 // Visible area size (how many squares away from a player can they see) area_size: 14 diff --git a/world/map/db/const.txt b/world/map/db/const.txt index fb4c8737..655de746 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -222,7 +222,7 @@ HS_Bun 16 HS_ShoulderLengthFlick 17 HS_Fizzy 18 HS_LongAndClipped 19 -HS_Bald 20 +HS_BaldTwo 20 // Hair Colors HC_LIGHT_BROWN 0 -- cgit v1.2.3-60-g2f50 From 9d713f3187973768c6b1ba4fbf0c7bb68eb25137 Mon Sep 17 00:00:00 2001 From: mekolat Date: Tue, 28 Oct 2014 15:25:48 -0400 Subject: put barber janitor into clearvars --- world/map/npc/functions/clear_vars.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt index 0a0247b7..588c22d5 100644 --- a/world/map/npc/functions/clear_vars.txt +++ b/world/map/npc/functions/clear_vars.txt @@ -251,6 +251,10 @@ L_Fix_Skills: if(getskilllv(SKILL_TRADE) > 0) setskill SKILL_TRADE, 0; if(getskilllv(SKILL_PARTY) > 0) setskill SKILL_PARTY, 0; if(getskilllv(SKILL_EMOTE) > 0) setskill SKILL_EMOTE, 0; + goto L_Barber_Janitor; + +L_Barber_Janitor: + callfunc "getHeadStyles"; // this converts class, color and hair goto L_Return; L_Return: -- cgit v1.2.3-60-g2f50 From 3eb89bb0c12e22745b192f02a48cf7e28f7e279e Mon Sep 17 00:00:00 2001 From: mekolat Date: Wed, 29 Oct 2014 13:49:39 -0400 Subject: double the indentation --- world/map/npc/functions/headstyles.txt | 54 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/world/map/npc/functions/headstyles.txt b/world/map/npc/functions/headstyles.txt index 91ed2cfe..4648ede4 100644 --- a/world/map/npc/functions/headstyles.txt +++ b/world/map/npc/functions/headstyles.txt @@ -13,34 +13,34 @@ function|script|getHeadStyles|, set @loop, 0; goto L_LoopValid; - L_Janitor: - set @BaldStyle, getarraysize(@HairStyles$); // we set it as a variable because we use it with the barber - if(getlook(LOOK_HAIR_STYLE) < 1) setlook LOOK_HAIR_STYLE, @BaldStyle; // the last head of any race has no hair/fins/whatever - return; +L_Janitor: + set @BaldStyle, getarraysize(@HairStyles$); // we set it as a variable because we use it with the barber + if(getlook(LOOK_HAIR_STYLE) < 1) setlook LOOK_HAIR_STYLE, @BaldStyle; // the last head of any race has no hair/fins/whatever + return; - L_LoopValid: // here we fix non-existant classes - if(@ValidClasses[@loop] == Class) goto L_ValidClass; - set @loop, (@loop + 1); - if(@loop >= getarraysize(@ValidClasses)) goto L_FixClass; - goto L_LoopValid; +L_LoopValid: // here we fix non-existant classes + if(@ValidClasses[@loop] == Class) goto L_ValidClass; + set @loop, (@loop + 1); + if(@loop >= getarraysize(@ValidClasses)) goto L_FixClass; + goto L_LoopValid; - L_FixClass: - set Class, @BaseClass; - goto L_ValidClass; +L_FixClass: + set Class, @BaseClass; + goto L_ValidClass; - L_ValidClass: - if(Class == 1) - setarray @HairStyles$, // TALPONIAN (human) - "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", "Bald"; - if(Class == 1) - setarray @HairColors$, // TALPONIAN (human) - "Brunette", "Green", "Dark red", "Light purple", "Gray", "Blonde", - "Teal", "Light red", "Blue", "Dark purple", "Black", "Pink", - "Brown";//, "(free slot)", "(free slot)"; - // adding a new species is as simple as adding another if(Class == X) and adding the class to @ValidClasses - goto L_Janitor; +L_ValidClass: + if(Class == 1) + setarray @HairStyles$, // TALPONIAN (human) + "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", "Bald"; + if(Class == 1) + setarray @HairColors$, // TALPONIAN (human) + "Brunette", "Green", "Dark red", "Light purple", "Gray", "Blonde", + "Teal", "Light red", "Blue", "Dark purple", "Black", "Pink", + "Brown";//, "(free slot)", "(free slot)"; + // adding a new species is as simple as adding another if(Class == X) and adding the class to @ValidClasses + goto L_Janitor; } -- cgit v1.2.3-60-g2f50 From 36c115f9dd3554ad8f4b6461a0f30fd7aaa0825e Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 30 Oct 2014 11:50:34 -0400 Subject: bump minimum manaplus version --- world/map/news.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/world/map/news.php b/world/map/news.php index d9f4d2e5..ff4b80a1 100644 --- a/world/map/news.php +++ b/world/map/news.php @@ -1,7 +1,7 @@