summaryrefslogtreecommitdiff
path: root/world/map/npc/functions
diff options
context:
space:
mode:
authorWushin <pasekei@gmail.com>2015-03-08 17:00:42 -0500
committerWushin <pasekei@gmail.com>2015-03-08 17:00:42 -0500
commit95e8332fca6bc456bf437a40fc30db51a5312d0f (patch)
tree9c0a7e8fc3d02e44363a794ef93de0c25cc9e89d /world/map/npc/functions
parenta7e1ccc2e920ea97c7a0d44ae9ac100ef340a4bb (diff)
parent331707dc5f6c581fa1ccef479d6bf86b25b3fd99 (diff)
downloadserverdata-95e8332fca6bc456bf437a40fc30db51a5312d0f.tar.gz
serverdata-95e8332fca6bc456bf437a40fc30db51a5312d0f.tar.bz2
serverdata-95e8332fca6bc456bf437a40fc30db51a5312d0f.tar.xz
serverdata-95e8332fca6bc456bf437a40fc30db51a5312d0f.zip
Merge pull request #289 from mekolat/itemcolor
Item color naming convention
Diffstat (limited to 'world/map/npc/functions')
-rw-r--r--world/map/npc/functions/DyeConfig.txt42
1 files changed, 42 insertions, 0 deletions
diff --git a/world/map/npc/functions/DyeConfig.txt b/world/map/npc/functions/DyeConfig.txt
new file mode 100644
index 00000000..1da1e734
--- /dev/null
+++ b/world/map/npc/functions/DyeConfig.txt
@@ -0,0 +1,42 @@
+009-2,32,105,0|script|#DyeChecker|-1
+{
+ end;
+OnInit:
+ /******************************
+ Config Starts Here
+ ******************************/
+ setarray $@DYE_color_names$, "Red", "Green", "Dark Blue", "Yellow", "Light blue", "Pink", "Black", "Orange", "Purple", "Dark Green";
+ setarray $@DYE_colors$, "Red", "Green", "DarkBlue", "Yellow", "LightBlue", "Pink", "Black", "Orange", "Purple", "DarkGreen";
+
+ setarray $@DYE_items$, "CottonShirt", "CottonCloth", "VNeckSweater", "Turtleneck", "CottonShorts", "CottonTrousers", "CottonSkirt", "Miniskirt", "TankTop", "ShortTankTop", "SilkRobe", "CottonHeadband", "DesertHat", "CottonBoots", "CottonGloves", "RabbitEars", "WizardHat", "BowlerHat", "BowlerHatBrown", "FineDress", "Contributor", "SorcererRed", "SorcererGreen", "SorcererDBlue", "SorcererYellow", "SorcererLBlue", "SorcererPink", "SorcererBlack", "SorcererOrange", "SorcererPurple", "SorcererDGreen", "SorcererWhite";
+ setarray $@DYE_item_names$, "Cotton Shirt", "Cotton Cloth", "V-Neck Sweater", "Turtleneck Sweater", "Cotton Shorts", "Cotton Trousers", "Cotton Skirt", "Miniskirt", "Tank Top", "Short Tank Top", "Silk Robe", "Cotton Headband", "Desert Hat", "Cotton Boots", "Cotton Gloves", "Rabbit Ears", "Wizard Hat", "Bowler Hat", "Bowler Hat (brown)", "Fine Dress", "Contributor Shirt", "Sorcerer Robe (Red)", "Sorcerer Robe (Green)", "Sorcerer Robe (Dark Blue)", "Sorcerer Robe (Yellow)", "Sorcerer Robe (Light Blue)", "Sorcerer Robe (Pink)", "Sorcerer Robe (Black)", "Sorcerer Robe (Orange)", "Sorcerer Robe (Purple)", "Sorcerer Robe (Dark Green)", "Sorcerer Robe (White)";
+ /******************************
+ Config Ends Here
+ ******************************/
+
+ set $@w, 0;
+ freeloop 1; // do not check for infinity loop
+ callsub S_Array;
+ freeloop 0; // re-enable infinity loop check
+ set $@w, 0;
+ set $@c, 0;
+ end;
+
+S_Array:
+ if(getitemname($@DYE_items$[$@w]) == "Unknown Item") goto L_Fail;
+ set $@c, 0;
+ callsub S_Color;
+ set $@w, $@w + 1;
+ if($@w < getarraysize($@DYE_items$)) goto S_Array;
+ return;
+
+L_Fail:
+ debugmes "Dye Fail: "+$@DYE_items$[$@w];
+ mapexit;
+
+S_Color:
+ if(getitemname($@DYE_colors$[$@c] + $@DYE_items$[$@w]) == "Unknown Item") goto L_Fail;
+ set $@c, $@c + 1;
+ if($@c < getarraysize($@DYE_colors$)) goto S_Color;
+ return;
+}