From f6ea0570134ad364006c4d70c98dd15b2a059ed0 Mon Sep 17 00:00:00 2001 From: mekolat Date: Mon, 25 Aug 2014 14:57:28 -0400 Subject: fix barber and mirror for future classes --- world/map/db/const.txt | 2 +- world/map/npc/013-2/notes.txt | 6 +- world/map/npc/functions/barber.txt | 135 +++++++++++++++++---------------- world/map/npc/functions/headstyles.txt | 54 +++++++++++++ world/map/npc/items/mirror.txt | 22 ++++++ world/map/npc/scripts.conf | 2 + 6 files changed, 152 insertions(+), 69 deletions(-) create mode 100644 world/map/npc/functions/headstyles.txt create mode 100644 world/map/npc/items/mirror.txt diff --git a/world/map/db/const.txt b/world/map/db/const.txt index 52752c1d..90118b47 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -17,7 +17,7 @@ MaxSp 8 1 //StatusPoint 9 1 BaseLevel 11 1 //SkillPoint 12 1 -//Class 19 1 +Class 19 1 Zeny 20 1 Sex 21 1 //NextBaseExp 22 1 diff --git a/world/map/npc/013-2/notes.txt b/world/map/npc/013-2/notes.txt index 9b9f46dc..c8b386bd 100644 --- a/world/map/npc/013-2/notes.txt +++ b/world/map/npc/013-2/notes.txt @@ -27,10 +27,8 @@ next; mes "Your looks suddenly change..."; next; - set @style, rand(20); - set @color, rand(12); - setlook LOOK_HAIR_STYLE, @style; - setlook LOOK_HAIR_COLOR, @color + 1; + set @fixedMirror, 1; + callfunc "useMirror"; close; } diff --git a/world/map/npc/functions/barber.txt b/world/map/npc/functions/barber.txt index 76b06dd7..46b423ce 100644 --- a/world/map/npc/functions/barber.txt +++ b/world/map/npc/functions/barber.txt @@ -11,15 +11,16 @@ function|script|Barber|, { + callfunc "getHeadStyles"; set @style, getlook(LOOK_HAIR_STYLE); 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 < 20) - set @color$, $@HairColors$[@color]; + set @style$, @HairStyles$[@style]; + if (@color >= 0 && @color < 120) + set @color$, @HairColors$[@color]; if (@color == 127) set @color$, "Shocked White"; @@ -35,39 +36,52 @@ L_Main: "Nah, I'm fine", L_Done; L_Style: + if(!@hairOpts) set @HairStyles$[getarraysize(@HairStyles$)], "Surprise me"; + if(!@hairOpts) set @HairStyles$[getarraysize(@HairStyles$)], "Nah, I'm fine"; + if(!@hairOpts) set @hairOpts, 1; menu - "Bald", L_MenuItems, - "Flat ponytail", L_MenuItems, - "Bowl cut", L_MenuItems, - "Combed back", L_MenuItems, - "Emo", L_MenuItems, - "Mohawk", L_MenuItems, - "Pompadour", L_MenuItems, - "Center parting/Short and slick", L_MenuItems, - "Long and slick", L_MenuItems, - "Short and curly", L_MenuItems, - "Pigtails", L_MenuItems, - "Long and curly", L_MenuItems, - "Parted", L_MenuItems, - "Perky ponytail", L_MenuItems, - "Wave", L_MenuItems, - "Mane", L_MenuItems, - "Bun", L_MenuItems, - "Shoulder Length Flick", L_MenuItems, - "Fizzy", L_MenuItems, - "Long and Clipped", L_MenuItems, - "Surprise me", L_RandomStyle, - "Nah, I'm fine", L_Done; + @HairStyles$[0], L_MenuItems, + @HairStyles$[1], L_MenuItems, + @HairStyles$[2], L_MenuItems, + @HairStyles$[3], L_MenuItems, + @HairStyles$[4], L_MenuItems, + @HairStyles$[5], L_MenuItems, + @HairStyles$[6], L_MenuItems, + @HairStyles$[7], L_MenuItems, + @HairStyles$[8], L_MenuItems, + @HairStyles$[9], L_MenuItems, + @HairStyles$[10], L_MenuItems, + @HairStyles$[11], L_MenuItems, + @HairStyles$[12], L_MenuItems, + @HairStyles$[13], L_MenuItems, + @HairStyles$[14], L_MenuItems, + @HairStyles$[15], L_MenuItems, + @HairStyles$[16], L_MenuItems, + @HairStyles$[17], L_MenuItems, + @HairStyles$[18], L_MenuItems, + @HairStyles$[19], L_MenuItems, + @HairStyles$[20], L_MenuItems, + @HairStyles$[21], L_MenuItems, + @HairStyles$[22], L_MenuItems, + @HairStyles$[23], L_MenuItems, + @HairStyles$[24], L_MenuItems, + @HairStyles$[25], L_MenuItems; L_MenuItems: if (@menu - 1 == @style) goto L_SameStyle; - + if(@menu == (getarraysize(@HairStyles$) - 1)) goto L_RandomStyle; + if(@menu == getarraysize(@HairStyles$)) goto L_Done; + if(@menu == 1) + set @menu, 21; // bald headstyle setlook LOOK_HAIR_STYLE, @menu - 1; goto L_Done; L_RandomStyle: - setlook LOOK_HAIR_STYLE, rand(20); + set @randomStyle, rand(0, (getarraysize(@HairStyles$) -4)); + if(@randomStyle == 0) + set @randomStyle, 20; + setlook LOOK_HAIR_STYLE, @randomStyle; goto L_Done; L_SameStyle: @@ -75,36 +89,43 @@ L_SameStyle: goto L_Main; L_Color: + if(@style == 20) goto L_SameColor; + if(!@colorOpts) set @HairColors$[getarraysize(@HairColors$)], "Surprise me"; + if(!@colorOpts) set @HairColors$[getarraysize(@HairColors$)], "Nah, I'm fine"; + if(!@colorOpts) set @colorOpts, 1; menu - "Brunette", L_MenuItems1, - "Green", L_MenuItems1, - "Dark red", L_MenuItems1, - "Light purple", L_MenuItems1, - "Gray", L_MenuItems1, - "Blonde", L_MenuItems1, - "Teal", L_MenuItems1, - "Light red", L_MenuItems1, - "Blue", L_MenuItems1, - "Dark purple", L_MenuItems1, - "Black", L_MenuItems1, - "Pink", L_MenuItems1, - "Brown", L_MenuItems1, - "Surprise me", L_RandomColor, - "Nah, I'm fine", L_Done; + @HairColors$[0], L_MenuItems1, + @HairColors$[1], L_MenuItems1, + @HairColors$[2], L_MenuItems1, + @HairColors$[3], L_MenuItems1, + @HairColors$[4], L_MenuItems1, + @HairColors$[5], L_MenuItems1, + @HairColors$[6], L_MenuItems1, + @HairColors$[7], L_MenuItems1, + @HairColors$[8], L_MenuItems1, + @HairColors$[9], L_MenuItems1, + @HairColors$[10], L_MenuItems1, + @HairColors$[11], L_MenuItems1, + @HairColors$[12], L_MenuItems1, + @HairColors$[13], L_MenuItems1, + @HairColors$[14], L_MenuItems1, + @HairColors$[15], L_MenuItems1, + @HairColors$[16], L_MenuItems1; L_MenuItems1: if (@menu - 1 == @color) goto L_SameColor; - - setlook LOOK_HAIR_COLOR, @menu - 1; + if(@menu == (getarraysize(@HairColors$) - 1)) goto L_RandomColor; + if(@menu == getarraysize(@HairColors$)) goto L_Done; + setlook LOOK_HAIR_COLOR, ((@menu - 1) + (15 * Class)); goto L_Done; L_RandomColor: - setlook LOOK_HAIR_COLOR, rand(13); + setlook LOOK_HAIR_COLOR, rand((15 * Class), ((getarraysize(@HairColors$) -4) + (15 * Class))); goto L_Done; L_SameColor: - mes "Your hair is already that color."; + mes "You are either bald or your hair is already that color."; goto L_Main; L_Done: @@ -112,23 +133,9 @@ L_Done: set @menu, 0; set @style, 0; set @color, 0; + cleararray @HairStyles$, "", getarraysize(@HairStyles$); + cleararray @HairColors$, "", getarraysize(@HairColors$); + set @hairOpts, 0; + set @colorOpts, 0; return; } - --|script|#BarberConfig|-1, -{ - end; - -OnInit: - setarray $@HairStyles$, - "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$, - "Brunette", "Green", "Dark red", "Light purple", "Gray", "Blonde", - "Teal", "Light red", "Blue", "Dark purple", "Black", "Pink", - "Brown"; - end; -} diff --git a/world/map/npc/functions/headstyles.txt b/world/map/npc/functions/headstyles.txt new file mode 100644 index 00000000..cdba58fc --- /dev/null +++ b/world/map/npc/functions/headstyles.txt @@ -0,0 +1,54 @@ +// headstyles config file +// author: meko + +function|script|getHeadStyles|, +{ + set @HairStyles$, 0; + set @HairColors$, 0; + cleararray @HairStyles$, "", getarraysize(@HairStyles$); + cleararray @HairColors$, "", getarraysize(@HairColors$); + if(Class == 0) + setarray @HairStyles$, // TALPONIAN (human) + "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"; + + if(Class == 1) // TRITAN (fish) + setarray @HairStyles$, + "no fins", "fins 1", "fins 2", "fins 3", "fins 4"; + + if(Class == 2) // GISPAAN (demon) + setarray @HairStyles$, + "no horns", "horns 1", "horns 2", "horns 3", "horns 4", "horns 5"; + + if(Class == 3) // SPARRON (orc) + setarray @HairStyles$, + "bald"; + + if(Class == 0) + 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)"; + + if(Class == 1) // TRITAN (fish) + setarray @HairColors$, + "Green", "Blue", "Light blue", "Dark purple", "Black";//, "(free slot)", + //"(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", + //"(free slot)", "(free slot)", "(free slot)"; + + if(Class == 2) // GISPAAN (demon) + setarray @HairColors$, + "Light brown", "Red", "Gray", "Yellow", "Light red";//, "(free slot)", + //"(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", + //"(free slot)", "(free slot)", "(free slot)"; + + if(Class == 3) // SPARRON (orc) + setarray @HairColors$, + "(no colors yet)";//, "(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", + //"(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", + //"(free slot)", "(free slot)", "(free slot)"; + return; +} diff --git a/world/map/npc/items/mirror.txt b/world/map/npc/items/mirror.txt new file mode 100644 index 00000000..0c200efa --- /dev/null +++ b/world/map/npc/items/mirror.txt @@ -0,0 +1,22 @@ +function|script|useMirror|, +{ + callfunc "getHeadStyles"; + goto L_Rand; + + L_Rand: + set @style, rand(0,(getarraysize(@HairStyles$) -2)); + if(@style == 0) + set @style, 20; + set @color, rand((15 * Class),((getarraysize(@HairColors$) -2) + (15 * Class))); + if((getlook(LOOK_HAIR_STYLE) == @style) || (getlook(LOOK_HAIR_COLOR) == @color)) + goto L_Rand; + goto L_Proceed; + + L_Proceed: + if(@fixedMirror) + setlook LOOK_HAIR_STYLE, @style; + setlook LOOK_HAIR_COLOR, @color; + //if(!@fixedMirror) getitem "SilverMirror", 1; <== this can be used in the future to have a portable hair color changer (like scissors but for the color) + set @fixedMirror, 0; + return; +} diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf index 90c11883..047d7dbb 100644 --- a/world/map/npc/scripts.conf +++ b/world/map/npc/scripts.conf @@ -22,6 +22,7 @@ npc: npc/functions/debug.txt npc: npc/functions/lockpicking.txt npc: npc/functions/default_npc_checks.txt npc: npc/functions/undead_debug.txt +npc: npc/functions/headstyles.txt // Item Functions npc: npc/items/magic_gm_top_hat.txt @@ -35,6 +36,7 @@ npc: npc/items/warpTowels.txt npc: npc/items/unequipcb.txt npc: npc/items/launcher_ammo.txt npc: npc/items/check_wand.txt +npc: npc/items/mirror.txt import: npc/_import.txt // GM Events -- cgit v1.2.3-60-g2f50 From fc48c7a7ee9f99b381da0aec023eaa45f42fdcbf Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 23 Oct 2014 00:22:49 -0400 Subject: remove unused heads and colors --- world/map/npc/functions/headstyles.txt | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/world/map/npc/functions/headstyles.txt b/world/map/npc/functions/headstyles.txt index cdba58fc..f79e97fe 100644 --- a/world/map/npc/functions/headstyles.txt +++ b/world/map/npc/functions/headstyles.txt @@ -14,41 +14,12 @@ function|script|getHeadStyles|, "Short and curly", "Pigtails", "Long and curly", "Parted", "Perky ponytail", "Wave", "Mane", "Bun", "Shoulder Length Flick", "Fizzy", "Long and Clipped"; - - if(Class == 1) // TRITAN (fish) - setarray @HairStyles$, - "no fins", "fins 1", "fins 2", "fins 3", "fins 4"; - - if(Class == 2) // GISPAAN (demon) - setarray @HairStyles$, - "no horns", "horns 1", "horns 2", "horns 3", "horns 4", "horns 5"; - - if(Class == 3) // SPARRON (orc) - setarray @HairStyles$, - "bald"; - if(Class == 0) 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)"; - - if(Class == 1) // TRITAN (fish) - setarray @HairColors$, - "Green", "Blue", "Light blue", "Dark purple", "Black";//, "(free slot)", - //"(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", - //"(free slot)", "(free slot)", "(free slot)"; - - if(Class == 2) // GISPAAN (demon) - setarray @HairColors$, - "Light brown", "Red", "Gray", "Yellow", "Light red";//, "(free slot)", - //"(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", - //"(free slot)", "(free slot)", "(free slot)"; - - if(Class == 3) // SPARRON (orc) - setarray @HairColors$, - "(no colors yet)";//, "(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", - //"(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", "(free slot)", - //"(free slot)", "(free slot)", "(free slot)"; + + // adding a new species is as simple as adding another if(Class == X) return; } -- cgit v1.2.3-60-g2f50 From e343e7fc35a14c453aa0cb218b97a66077573bed Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 23 Oct 2014 13:00:45 -0400 Subject: fixup --- world/map/npc/functions/barber.txt | 35 +++++++++++++++++++---------------- world/map/npc/items/mirror.txt | 2 -- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/world/map/npc/functions/barber.txt b/world/map/npc/functions/barber.txt index 46b423ce..0f9b4ffb 100644 --- a/world/map/npc/functions/barber.txt +++ b/world/map/npc/functions/barber.txt @@ -11,10 +11,12 @@ function|script|Barber|, { - callfunc "getHeadStyles"; + callfunc "getHeadStyles"; + goto L_Main; + +L_Main: set @style, getlook(LOOK_HAIR_STYLE); set @color, getlook(LOOK_HAIR_COLOR); - set @style$, "Unknown"; set @color$, "Unknown"; if (@style >= 0 && @style < 20) @@ -23,13 +25,9 @@ function|script|Barber|, set @color$, @HairColors$[@color]; if (@color == 127) set @color$, "Shocked White"; - mes "Your current style is " + @style$ + " and your current color is " + @color$ + "."; set @style$, ""; set @color$, ""; - goto L_Main; - -L_Main: menu "Change my style", L_Style, "Change my color", L_Color, @@ -72,24 +70,24 @@ L_MenuItems: goto L_SameStyle; if(@menu == (getarraysize(@HairStyles$) - 1)) goto L_RandomStyle; if(@menu == getarraysize(@HairStyles$)) goto L_Done; - if(@menu == 1) - set @menu, 21; // bald headstyle setlook LOOK_HAIR_STYLE, @menu - 1; - goto L_Done; + goto L_Main; L_RandomStyle: set @randomStyle, rand(0, (getarraysize(@HairStyles$) -4)); - if(@randomStyle == 0) - set @randomStyle, 20; + if(@randomStyle == @style) goto L_RandomStyle; setlook LOOK_HAIR_STYLE, @randomStyle; - goto L_Done; + menu + "Surprise me once again", L_RandomStyle, + "Go back", L_Main, + "Goodbye", L_Done; L_SameStyle: mes "Your hair already has that style."; goto L_Main; L_Color: - if(@style == 20) goto L_SameColor; + if(@style == Class) goto L_SameColor; // first 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; @@ -118,11 +116,16 @@ L_MenuItems1: if(@menu == (getarraysize(@HairColors$) - 1)) goto L_RandomColor; if(@menu == getarraysize(@HairColors$)) goto L_Done; setlook LOOK_HAIR_COLOR, ((@menu - 1) + (15 * Class)); - goto L_Done; + goto L_Main; L_RandomColor: - setlook LOOK_HAIR_COLOR, rand((15 * Class), ((getarraysize(@HairColors$) -4) + (15 * Class))); - goto L_Done; + set @randomColor, rand((15 * Class), ((getarraysize(@HairColors$) -4) + (15 * Class))); + if(@randomColor == @color) goto L_RandomColor; + setlook LOOK_HAIR_COLOR, @randomColor; + menu + "Surprise me once again", L_RandomColor, + "Go back", L_Main, + "Goodbye", L_Done; L_SameColor: mes "You are either bald or your hair is already that color."; diff --git a/world/map/npc/items/mirror.txt b/world/map/npc/items/mirror.txt index 0c200efa..fc2ca69b 100644 --- a/world/map/npc/items/mirror.txt +++ b/world/map/npc/items/mirror.txt @@ -5,8 +5,6 @@ function|script|useMirror|, L_Rand: set @style, rand(0,(getarraysize(@HairStyles$) -2)); - if(@style == 0) - set @style, 20; set @color, rand((15 * Class),((getarraysize(@HairColors$) -2) + (15 * Class))); if((getlook(LOOK_HAIR_STYLE) == @style) || (getlook(LOOK_HAIR_COLOR) == @color)) goto L_Rand; -- cgit v1.2.3-60-g2f50 From 20e268cd6b8179c5f2a7ac772e533013764e65f4 Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 23 Oct 2014 16:18:56 -0400 Subject: add janitor for old classes --- world/map/npc/functions/headstyles.txt | 44 +++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/world/map/npc/functions/headstyles.txt b/world/map/npc/functions/headstyles.txt index f79e97fe..072a9fbf 100644 --- a/world/map/npc/functions/headstyles.txt +++ b/world/map/npc/functions/headstyles.txt @@ -7,19 +7,35 @@ function|script|getHeadStyles|, set @HairColors$, 0; cleararray @HairStyles$, "", getarraysize(@HairStyles$); cleararray @HairColors$, "", getarraysize(@HairColors$); - if(Class == 0) - setarray @HairStyles$, // TALPONIAN (human) - "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"; - if(Class == 0) - 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)"; + cleararray @ValidClasses, "", getarraysize(@ValidClasses); + setarray @ValidClasses, 0; // add new classes here + set @loop, 0; + if(Class != 0) goto L_LoopValid; + goto L_ValidClass; - // adding a new species is as simple as adding another if(Class == X) - return; + L_LoopValid: + 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, 0; + goto L_ValidClass; + + L_ValidClass: + if(Class == 0) + setarray @HairStyles$, // TALPONIAN (human) + "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"; + if(Class == 0) + 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; } -- cgit v1.2.3-60-g2f50 From 22bd75e621078fd98176b5d2cc1f2873ae35b305 Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 23 Oct 2014 16:21:08 -0400 Subject: allow to change base class --- world/map/npc/functions/headstyles.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/world/map/npc/functions/headstyles.txt b/world/map/npc/functions/headstyles.txt index 072a9fbf..989bef83 100644 --- a/world/map/npc/functions/headstyles.txt +++ b/world/map/npc/functions/headstyles.txt @@ -5,13 +5,13 @@ function|script|getHeadStyles|, { set @HairStyles$, 0; set @HairColors$, 0; + set @BaseClass, 0; // this is the default class cleararray @HairStyles$, "", getarraysize(@HairStyles$); cleararray @HairColors$, "", getarraysize(@HairColors$); cleararray @ValidClasses, "", getarraysize(@ValidClasses); setarray @ValidClasses, 0; // add new classes here set @loop, 0; - if(Class != 0) goto L_LoopValid; - goto L_ValidClass; + goto L_LoopValid; L_LoopValid: if(@ValidClasses[@loop] == Class) goto L_ValidClass; @@ -20,7 +20,7 @@ function|script|getHeadStyles|, goto L_LoopValid; L_FixClass: - set Class, 0; + set Class, @BaseClass; goto L_ValidClass; L_ValidClass: -- cgit v1.2.3-60-g2f50