summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/headstyles.txt
diff options
context:
space:
mode:
authorWushin <pasekei@gmail.com>2014-10-23 22:03:52 -0500
committerWushin <pasekei@gmail.com>2014-10-23 22:03:52 -0500
commitd24a040fe20b9e824f0cad9c2c4eafffb5527450 (patch)
tree36c2e7e62962419edf779aaacadc233292369d78 /world/map/npc/functions/headstyles.txt
parent569b841a6ab356a809723744c347e79760f7efcf (diff)
parent22bd75e621078fd98176b5d2cc1f2873ae35b305 (diff)
downloadserverdata-d24a040fe20b9e824f0cad9c2c4eafffb5527450.tar.gz
serverdata-d24a040fe20b9e824f0cad9c2c4eafffb5527450.tar.bz2
serverdata-d24a040fe20b9e824f0cad9c2c4eafffb5527450.tar.xz
serverdata-d24a040fe20b9e824f0cad9c2c4eafffb5527450.zip
Merge pull request #161 from mekolat/species
make the barber work with new classes
Diffstat (limited to 'world/map/npc/functions/headstyles.txt')
-rw-r--r--world/map/npc/functions/headstyles.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/world/map/npc/functions/headstyles.txt b/world/map/npc/functions/headstyles.txt
new file mode 100644
index 00000000..989bef83
--- /dev/null
+++ b/world/map/npc/functions/headstyles.txt
@@ -0,0 +1,41 @@
+// headstyles config file
+// author: meko
+
+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;
+ goto L_LoopValid;
+
+ 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, @BaseClass;
+ 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;
+}