summaryrefslogtreecommitdiff
path: root/world/map/npc
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
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')
-rw-r--r--world/map/npc/002-2/bleacher.txt327
-rw-r--r--world/map/npc/009-2/selim.txt73
-rw-r--r--world/map/npc/010-2/loratay.txt62
-rw-r--r--world/map/npc/012-1/injured-mouboo.txt2
-rw-r--r--world/map/npc/027-2/lover.txt2
-rw-r--r--world/map/npc/annuals/xmas/config.txt12
-rw-r--r--world/map/npc/functions/DyeConfig.txt42
-rw-r--r--world/map/npc/scripts.conf1
8 files changed, 197 insertions, 324 deletions
diff --git a/world/map/npc/002-2/bleacher.txt b/world/map/npc/002-2/bleacher.txt
index 213c96f8..2853bb73 100644
--- a/world/map/npc/002-2/bleacher.txt
+++ b/world/map/npc/002-2/bleacher.txt
@@ -1,293 +1,132 @@
-//
+// IMPORTANT: add your items to DyeConfig, do not edit Candide
002-2,72,92,0|script|Candide|156
{
mes "[Candide]";
- mes "\"I've figured out how that volcanic ash bleaches cloth.";
- mes "I could do it for you, but I'll need three piles of ash and 5,000 GP for supplies per item.\"";
+ mes "\"Greetings! I am Candide the Bleacher.";
+ mes "Tulimshar is my homeland, where I learned the ancient art of bleaching.\"";
+ next;
+ mes "\"Bleaching was originally done by the sun, but now we use ash combined with special ingredients to remove color from fabric.\"";
next;
-
- if (countitem("PileOfAsh") < 3) goto L_no_ash;
-
- if (Zeny < 5000) goto L_no_money;
-
menu
+ "What is needed for the bleaching process?", L_Materials,
"I'd like to bleach something.", L_bleach_menu,
- "No thanks.", L_Close;
+ "So long.", L_Close;
-L_bleach_menu:
+L_Materials:
mes "[Candide]";
- mes "\"What would you like to bleach?\"";
+ mes "\"For each item, I will need 3 piles of ash and 5,000 GP for the special ingredients.\"";
next;
-
menu
- "Cotton shirt.", L_cottonshirt,
- "Contributor shirt.", L_contributor,
- "V-Neck sweater.", L_vneck,
- "Turtleneck sweater.", L_tneck,
- "Cotton shorts.", L_shorts,
- "Cotton trousers.", L_trousers,
- "Cotton skirt.", L_skirt,
- "Miniskirt.", L_miniskirt,
- "Tank top .", L_tanktop,
- "Short tank top.", L_tanktop_short,
- "Silk robe.", L_robe,
- "Cotton headband.", L_cotton_headband,
- "Desert hat.", L_desert_hat,
- "Cotton boots.", L_cotton_boots,
- "Cotton gloves.", L_cotton_gloves,
- "Rabbit ears.", L_rabbit_ears,
- "Wizard hat.", L_wizard_hat,
- "Bowler hat.", L_bowler_hat,
- "Sorcerer robe.", L_sorcerer_robe,
- "Bowler hat (brown).", L_bowler_hat_brown,
- "Fine dress.", L_fine_dress,
- "Cotton cloth.", L_cotton_cloth,
- "Nevermind.", L_Close;
-
-L_contributor:
- set @normal, 1178;
- set @dyeBase, 5131;
- goto L_choose_color;
-
-L_cottonshirt:
- set @normal, 1202;
- set @dyeBase, 2050;
- goto L_choose_color;
-
-L_vneck:
- set @normal, 624;
- set @dyeBase, 2060;
- goto L_choose_color;
-
-L_tneck:
- set @normal, 564;
- set @dyeBase, 2070;
- goto L_choose_color;
-
-L_shorts:
- set @normal, 586;
- set @dyeBase, 2110;
- goto L_choose_color;
-
-L_trousers:
- set @normal, 648;
- set @dyeBase, 2180;
- goto L_choose_color;
-
-L_skirt:
- set @normal, 632;
- set @dyeBase, 2100;
- goto L_choose_color;
-
-L_miniskirt:
- set @normal, 771;
- set @dyeBase, 2170;
- goto L_choose_color;
-
-L_tanktop:
- set @normal, 688;
- set @dyeBase, 2090;
- goto L_choose_color;
-
-L_tanktop_short:
- set @normal, 689;
- set @dyeBase, 2120;
- goto L_choose_color;
-
-L_robe:
- set @normal, 720;
- set @dyeBase, 2080;
- goto L_choose_color;
-
-L_cotton_headband:
- set @normal, 724;
- set @dyeBase, 2140;
- goto L_choose_color;
-
-L_desert_hat:
- set @normal, 723;
- set @dyeBase, 2130;
- goto L_choose_color;
-
-L_cotton_boots:
- set @normal, 735;
- set @dyeBase, 2150;
- goto L_choose_color;
-
-L_cotton_gloves:
- set @normal, 741;
- set @dyeBase, 2160;
- goto L_choose_color;
-
-L_rabbit_ears:
- set @normal, 1255;
- set @dyeBase, 2190;
- goto L_choose_color;
-
-L_wizard_hat:
- set @normal, 4028;
- set @dyeBase, 2200;
- goto L_choose_color;
-
-L_bowler_hat:
- set @normal, 4030;
- set @dyeBase, 2210;
- goto L_choose_color;
+ "I'd like to bleach something.", L_bleach_menu,
+ "So long.", L_Close;
-L_sorcerer_robe:
+L_bleach_menu:
+ if (countitem("PileOfAsh") < 3) goto L_no_ash;
+ if (Zeny < 5000) goto L_no_money;
+ cleararray @CANDIDE_items,0,getarraysize(@CANDIDE_items);
+ cleararray @CANDIDE_color,0,getarraysize(@CANDIDE_color);
+ cleararray @CANDIDE_menu$,"",getarraysize(@CANDIDE_menu$);
+ set @w, 0;
+ freeloop 1; // do not check for infinity loop
+ callsub S_LoopArray;
+ freeloop 0; // re-enable infinity loop check
+ set @w, 0;
+ set @c, 0;
+ set @p, 0;
+ if(@CANDIDE_menu$[0] == "") goto L_Nothing;
mes "[Candide]";
- mes "\"Which one?\"";
+ mes "\"Yes?\"";
next;
menu
- "A red lined one.", L_red_lined,
- "A green lined one.", L_green_lined,
- "A dark blue lined one.", L_dark_blue_lined,
- "A yellow lined one.", L_yellow_lined,
- "A light blue lined one.", L_light_blue_lined,
- "A pink lined one.", L_pink_lined,
- "A black lined one.", L_black_lined,
- "An orange lined one.", L_orange_lined,
- "A purple lined one.", L_purple_lined,
- "A dark green lined one.", L_dark_green_lined,
- "A white lined one.", L_white_lined,
- "Nevermind.", L_Close;
-
-L_red_lined:
- set @normal, 798;
- set @dyeBase, 2220;
- goto L_choose_color;
-
-L_green_lined:
- set @normal, 5010;
- set @dyeBase, 5000;
- goto L_choose_color;
-
-L_dark_blue_lined:
- set @normal, 5021;
- set @dyeBase, 5011;
- goto L_choose_color;
-
-L_yellow_lined:
- set @normal, 5032;
- set @dyeBase, 5022;
- goto L_choose_color;
-
-L_light_blue_lined:
- set @normal, 5043;
- set @dyeBase, 5033;
- goto L_choose_color;
-
-L_pink_lined:
- set @normal, 5054;
- set @dyeBase, 5044;
- goto L_choose_color;
-
-L_black_lined:
- set @normal, 5065;
- set @dyeBase, 5055;
- goto L_choose_color;
-
-L_orange_lined:
- set @normal, 5076;
- set @dyeBase, 5066;
- goto L_choose_color;
-
-L_purple_lined:
- set @normal, 5087;
- set @dyeBase, 5077;
- goto L_choose_color;
-
-L_dark_green_lined:
- set @normal, 5098;
- set @dyeBase, 5088;
- goto L_choose_color;
-
-L_white_lined:
- set @normal, 5109;
- set @dyeBase, 5099;
- goto L_choose_color;
-
-L_bowler_hat_brown:
- set @normal, 800;
- set @dyeBase, 2230;
- goto L_choose_color;
-
-L_fine_dress:
- set @normal, 870;
- set @dyeBase, 2240;
- goto L_choose_color;
-
-L_cotton_cloth:
- set @normal, 660;
- set @dyeBase, 2250;
- goto L_choose_color;
-
-L_choose_color:
+ "Nevermind.", L_Close,
+ @CANDIDE_menu$[0], L_MenuItems, // base array was too big for a dynamic menu so we can't use it
+ @CANDIDE_menu$[1], L_MenuItems,
+ @CANDIDE_menu$[2], L_MenuItems,
+ @CANDIDE_menu$[3], L_MenuItems,
+ @CANDIDE_menu$[4], L_MenuItems,
+ @CANDIDE_menu$[5], L_MenuItems,
+ @CANDIDE_menu$[6], L_MenuItems,
+ @CANDIDE_menu$[7], L_MenuItems,
+ @CANDIDE_menu$[8], L_MenuItems,
+ @CANDIDE_menu$[9], L_MenuItems,
+ @CANDIDE_menu$[10], L_MenuItems,
+ @CANDIDE_menu$[11], L_MenuItems,
+ @CANDIDE_menu$[12], L_MenuItems,
+ @CANDIDE_menu$[13], L_MenuItems,
+ @CANDIDE_menu$[14], L_MenuItems,
+ @CANDIDE_menu$[15], L_MenuItems,
+ @CANDIDE_menu$[16], L_MenuItems,
+ @CANDIDE_menu$[17], L_MenuItems;
+
+S_LoopArray:
+ set @c, 0;
+ callsub S_LoopColor;
+ set @w, @w + 1;
+ if(@w < getarraysize($@DYE_items$)) goto S_LoopArray;
+ return;
+
+S_LoopColor:
+ if(countitem($@DYE_colors$[@c] + $@DYE_items$[@w]) > 0)
+ goto L_AddToMenu;
+ goto L_LoopColor2;
+
+L_AddToMenu:
+ set @CANDIDE_items[@p], @w;
+ set @CANDIDE_color[@p], @c;
+ set @CANDIDE_menu$[@p], $@DYE_color_names$[@c]+" "+$@DYE_item_names$[@w];
+ set @p, @p + 1;
+ goto L_LoopColor2;
+
+L_LoopColor2:
+ set @c, @c + 1;
+ if(@c < getarraysize($@DYE_colors$)) goto S_LoopColor;
+ return;
+
+L_Nothing:
mes "[Candide]";
- mes "\"And the color?\"";
+ mes "\"Sorry, you have nothing to bleach.\"";
next;
-
- menu
- "Red.", L_MenuItems,
- "Green.", L_MenuItems,
- "Dark Blue.", L_MenuItems,
- "Yellow.", L_MenuItems,
- "Light Blue.", L_MenuItems,
- "Pink.", L_MenuItems,
- "Black.", L_MenuItems,
- "Orange.", L_MenuItems,
- "Purple.", L_MenuItems,
- "Dark Green.", L_MenuItems;
+ goto L_Close;
L_MenuItems:
- set @del, @dyeBase + @menu - 1;
-
- if (countitem(@del) == 0) goto L_no_item;
-
if (countitem("PileOfAsh") < 3) goto L_no_ash;
-
if (Zeny < 5000) goto L_no_money;
-
- delitem @del, 1;
- getitem @normal, 1;
+ set @m, @menu - 2;
+ set @it$, $@DYE_colors$[@CANDIDE_color[@m]] + $@DYE_items$[@CANDIDE_items[@m]];
+ if(getitemname(@it$) == "Unknown Item") mapexit;
+ delitem @it$, 1;
delitem "PileOfAsh", 3;
set Zeny, Zeny - 5000;
+ getitem $@DYE_items$[@CANDIDE_items[@m]], 1;
goto L_again;
L_again:
mes "[Candide]";
mes "\"Would you like to bleach something else?\"";
next;
-
menu
"Yes.", L_bleach_menu,
"No.", L_Close;
-L_no_item:
- mes "[Candide]";
- mes "\"You don't have one of those.\"";
- next;
-
- goto L_again;
-
L_no_ash:
mes "[Candide]";
mes "\"You don't have enough ash for me to bleach anything.";
mes "I need three piles.\"";
+ next;
goto L_Close;
L_no_money:
mes "[Candide]";
mes "\"You don't have enough gold for me to bleach anything.";
mes "I need 5,000 GP for supplies.\"";
+ next;
goto L_Close;
L_Close:
mes "[Candide]";
mes "\"Come again.\"";
- set @normal, 0;
- set @dyeBase, 0;
- set @del, 0;
- close;
+ close2;
+ emotion EMOTE_GRIN;
+ end;
}
diff --git a/world/map/npc/009-2/selim.txt b/world/map/npc/009-2/selim.txt
index ab74b2f9..80abfdcc 100644
--- a/world/map/npc/009-2/selim.txt
+++ b/world/map/npc/009-2/selim.txt
@@ -1,46 +1,20 @@
-function|script|SelimDebug
-{
- set @w, 0;
- mes "[Selim Debug]";
- menu
- "Debug item array.", L_DebugArrayExplain,
- "Exit debug.", L_Return;
-
-L_DebugArrayExplain:
- mes "[How it works]";
- mes "Click on the link to verify that it is the red variation of the item.";
- mes "If, for example, you see [Skirt] then when you click on it you should see Red Skirt.";
- next;
- goto L_DebugArray;
-
-L_DebugArray:
- mes "[@@" + @items_new[@w] + "|" + @item_names$[@w] + "@@]";
- set @w, @w + 1;
- if(@w >= getarraysize(@items_new)) goto L_Return;
- menu
- "Next.", L_DebugArray,
- "Exit debug.", L_Return;
-
-L_Return:
- return;
-}
-
009-2,32,104,0|script|Selim|326
{
- setarray @all_colours$, "red", "green", "dark blue", "yellow", "light blue", "pink", "black", "orange", "purple", "dark green";
-
cleararray @items$, "", getarraysize(@items$);
cleararray @item_names$, "", getarraysize(@item_names$);
- cleararray @items_new, "", getarraysize(@items_new);
- setarray @items_new, 2050, 2250, 2060, 2070, 2110, 2180, 2100, 2170, 2090, 2120, 2080, 2140, 2130, 2150, 2160, 2190, 2200, 2210, 2230, 2240, 5131, 2220, 5000, 5011, 5022, 5033, 5044, 5055, 5066, 5077, 5088, 5099;
- setarray @items$, "CottonShirt", "CottonCloth", "VNeckSweater", "TurtleneckSweater", "CottonShorts", "CottonTrousers", "CottonSkirt", "Miniskirt", "TankTop", "ShortTankTop", "SilkRobe", "CottonHeadband", "DesertHat", "CottonBoots", "CottonGloves", "WhiteRabbitEars", "WizardHat", "BowlerHat", "BowlerHatBrown", "FineDress", "ContributorShirt", "SorcererRobeRed", "SorcererRobeGreen", "SorcererRobeDarkBlue", "SorcererRobeYellow", "SorcererRobeLightBlue", "SorcererRobePink", "SorcererRobeBlack", "SorcererRobeOrange", "SorcererRobePurple", "SorcererRobeDarkGreen", "SorcererRobeWhite";
- setarray @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", "White Rabbit Ears", "Wizard Hat", "Bowler Hat", "Bowler Hat (brown)", "Fine Dress", "Contributor Shirt", "Red lined Sorcerer Robe", "Green lined Sorcerer Robe", "Dark Blue lined Sorcerer Robe", "Yellow lined Sorcerer Robe", "Light Blue lined Sorcerer Robe", "Pink lined Sorcerer Robe", "Black lined Sorcerer Robe", "Orange lined Sorcerer Robe", "Purple lined Sorcerer Robe", "Dark Green lined Sorcerer Robe", "White lined Sorcerer Robe";
- if ((getgmlevel() >= 40 || debug) && (getequipid(equip_head) == 647 || getequipid(equip_head) == 725)) goto L_Debug;
+ set @r, 0;
+ set @j, getarraysize($@DYE_items$);
+ goto L_CloneArray; // clone the array from DyeConfig
+
+L_CloneArray:
+ set @items$[@r], $@DYE_items$[@r];
+ set @item_names$[@r], $@DYE_item_names$[@r];
+ set @r, @r + 1;
+ if(@r < @j) goto L_CloneArray;
+ set @r, 0;
+ set @j, 0;
goto L_Main;
-L_Debug:
- callfunc "SelimDebug";
- close;
L_Main:
mes "[Selim]";
@@ -86,7 +60,6 @@ L_clothes_choice:
callfunc "DynamicItemMenu$";
set @default_choice$, "";
set @item_del$, @item$;
- set @item_new, @items_new[@index];
set @name$, @item_names$[@index];
cleararray @items$, "", getarraysize(@items$);
cleararray @item_names$, "", getarraysize(@item_names$);
@@ -114,7 +87,6 @@ L_Next:
mes "\"Of course I can help you by dyeing the materials your tailor will want.";
mes "All I need is a piece of Cotton Cloth.\"";
set @item_del$, "CottonCloth";
- set @item_new, 2250;
menu
"Sure. Here is one.", L_picked_item,
"I have to go pick that.", L_Close;
@@ -127,8 +99,9 @@ L_colour:
mes "[Selim]";
mes "\"Excellent. Now, what color do you want?\"";
next;
- setarray @items$, "RedDye", "GreenDye", "DarkBlueDye", "YellowDye", "LightBlueDye", "PinkDye", "BlackDye", "OrangeDye", "PurpleDye", "DarkGreenDye";
- setarray @item_names$, "red", "green", "dark blue", "yellow", "light blue", "pink", "black", "orange", "purple", "dark green";
+ set @r, 0;
+ set @j, getarraysize($@DYE_colors$);
+ callsub S_CloneColors;
set @default_choice$, "I have no dye.";
callfunc "DynamicItemMenu$";
cleararray @items$, "", getarraysize(@items$);
@@ -136,9 +109,17 @@ L_colour:
set @default_choice$, "";
if (@item$ == "") goto L_no_dye;
set @colour, @index;
- set @vial, 690 + @colour;
goto L_finish;
+S_CloneColors:
+ set @items$[@r], $@DYE_colors$[@r] + "Dye";
+ set @item_names$[@r], $@DYE_color_names$[@r];
+ set @r, @r + 1;
+ if(@r < @j) goto S_CloneColors;
+ set @r, 0;
+ set @j, 0;
+ return;
+
L_no_dye:
mes "[Selim]";
mes "\"I would love to dye your " + @name$ + " for you, but you will have to bring me some dye first.";
@@ -159,11 +140,13 @@ L_explain_dye:
goto L_Close;
L_finish:
- delitem @vial, 1;
+ if(getitemname($@DYE_colors$[@colour] + @item_del$) == "Unknown Item") mapexit;
+ if(countitem(@item_del$) < 1) goto L_havenone;
+ delitem @item$, 1;
delitem @item_del$, 1;
- getitem @item_new + @colour, 1;
+ getitem $@DYE_colors$[@colour] + @item_del$, 1;
mes "[Selim]";
- mes "\"Here's your " + @all_colours$[@colour] + " " + @name$ + "! Please let dry for a minute.\"";
+ mes "\"Here's your " + $@DYE_color_names$[@colour] + " " + @name$ + "! Please let dry for a minute.\"";
goto L_Close;
L_havenone:
diff --git a/world/map/npc/010-2/loratay.txt b/world/map/npc/010-2/loratay.txt
index ef85fc36..b81a9ca5 100644
--- a/world/map/npc/010-2/loratay.txt
+++ b/world/map/npc/010-2/loratay.txt
@@ -44,7 +44,6 @@ OnInit:
set @FINEDRESS_COCOONS, 180;
set @SORCERER_ROBE_SEW_ZENY, 25000;
set @SORCERER_ROBE_NUM_COTTON_CLOTH, 2;
- setarray @item_colors$, "red", "green", "dark blue", "yellow", "light blue", "pink", "black", "orange", "purple", "dark green", "white";
set @wg_state, ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT);
if (@loratay_asking_robe == 1) goto L_ExamineSR;
@@ -487,28 +486,30 @@ L_desert_hat:
mes "The seamstress sighs.";
mes "\"One of these days it would be nice to have an actual challenge... yes, of course I can make a desert hat. A Cotton Headband, three pieces of cotton cloth. Hmm. And let's add 300 GP to that.\"";
next;
- cleararray @items, 0, getarraysize(@items);
+ cleararray @items$, "", getarraysize(@items$);
cleararray @item_names$, "", getarraysize(@item_names$);
- setarray @items, 724, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149;
- setarray @item_names$, "Here is a Cotton Headband.", "Here is a Red Cotton Headband.", "Here is a Green Cotton Headband.", "Here is a Dark Blue Cotton Headband.", "Here is a Yellow Cotton Headband.", "Here is a Light Blue Cotton Headband.", "Here is a Pink Cotton Headband.", "Here is a Black Cotton Headband.", "Here is an Orange Cotton Headband.", "Here is a Puple Cotton Headband.", "Here is a Dark Green Cotton Headband.";
+ set @o, 1;
+ setarray @items$, "CottonHeadband";
+ setarray @item_names$, "Here is a Cotton Headband.";
+ callsub S_CottonHeadbandColors;
- callfunc "DynamicItemMenu";
- if (@item == 0)
+ callfunc "DynamicItemMenu$";
+ if (@item$ == "")
goto L_main_menu;
- if (@item == 724)
- set @genitem, 723;
- if (@item != 724)
- set @genitem, @item - 10;
- if (countitem(@item) < 1)
+ if (@item$ == "CottonHeadband")
+ set @genitem$, "DesertHat";
+ if (@item$ != "CottonHeadband")
+ set @genitem$, $@DYE_colors$[@index] + "DesertHat";
+ if (countitem(@item$) < 1)
goto L_desert_hat_noheadband;
if (countitem("CottonCloth") < 3)
goto L_desert_hat_nocotton;
if (Zeny < 300)
goto L_desert_hat_nogp;
- delitem @item, 1;
+ delitem @item$, 1;
delitem "CottonCloth", 3;
set Zeny, Zeny - 300;
- getitem @genitem, 1;
+ getitem @genitem$, 1;
mes "[Lora Tay the Seamstress]";
mes "\"Now then, this should only take a minute.\"";
mes "The seamstress folds your cotton cloth in a complicated fashion, wraps the resulting bundle into and out of the headband, and finally sews together several loose ends.";
@@ -520,6 +521,13 @@ L_desert_hat:
next;
goto L_main_menu;
+S_CottonHeadbandColors:
+ set @items$[@o], $@DYE_colors$[@o]+"CottonHeadband";
+ set @item_names$[@o], "Here is a "+$@DYE_color_names$[@o]+" Cotton Headband";
+ set @o, @o + 1;
+ if(@o < getarraysize($@DYE_colors$)) goto S_CottonHeadbandColors;
+ return;
+
L_desert_hat_nocotton:
mes "[Lora Tay the Seamstress]";
mes "\"You're asking me to make a desert hat without enough cloth? Here, have your headband back-- see, that's how much I can do without cloth! And since I'm generous today, you can even keep your GP...\"";
@@ -930,7 +938,7 @@ L_ExamineSR:
mes "Lora Tay takes a closer look at what you are wearing.";
next;
mes "[Lora Tay the Seamstress]";
- mes "\"Hmm. This " + @item_colors$[@current_linecolor] + " lined " + @item_colors$[@current_maincolor] + " sorcerer robe. I see. Is that ok?\"";
+ mes "\"Hmm. This " + $@DYE_color_names$[@current_linecolor] + " lined " + $@DYE_color_names$[@current_maincolor] + " sorcerer robe. I see. Is that ok?\"";
if (@current_maincolor == -1 || @current_linecolor == -1)
goto L_NotSR;
menu
@@ -947,17 +955,17 @@ L_ChooseSRLineColor:
mes "[Lora Tay the Seamstress]";
mes "\"And which Cotton Cloth color will you give me?\"";
menu
- "A " + @item_colors$[0] + " one.", L_ItemMenus2,
- "A " + @item_colors$[1] + " one.", L_ItemMenus2,
- "A " + @item_colors$[2] + " one.", L_ItemMenus2,
- "A " + @item_colors$[3] + " one.", L_ItemMenus2,
- "A " + @item_colors$[4] + " one.", L_ItemMenus2,
- "A " + @item_colors$[5] + " one.", L_ItemMenus2,
- "A " + @item_colors$[6] + " one.", L_ItemMenus2,
- "A " + @item_colors$[7] + " one.", L_ItemMenus2,
- "A " + @item_colors$[8] + " one.", L_ItemMenus2,
- "A " + @item_colors$[9] + " one.", L_ItemMenus2,
- "A " + @item_colors$[10] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[0] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[1] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[2] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[3] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[4] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[5] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[6] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[7] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[8] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[9] + " one.", L_ItemMenus2,
+ "A " + $@DYE_color_names$[10] + " one.", L_ItemMenus2,
"Hum. I changed my mind. Later maybe.", L_end;
L_ItemMenus2:
@@ -985,8 +993,8 @@ L_ItemMenus2:
delitem @chest_equip_id, 1;
set Zeny, Zeny - @SORCERER_ROBE_SEW_ZENY;
getitem @new_sr_id, 1;
- mes "Lora Tay adjusts her glasses and removes carefully the " + @item_colors$[@current_linecolor] + " string of the robe.";
- mes "Then she grabs the " + @item_colors$[@chosen_color] + " cotton cloth, unfolds it and pins her needle in it.";
+ mes "Lora Tay adjusts her glasses and removes carefully the " + $@DYE_color_names$[@current_linecolor] + " string of the robe.";
+ mes "Then she grabs the " + $@DYE_color_names$[@chosen_color] + " cotton cloth, unfolds it and pins her needle in it.";
next;
mes "She begins to sew the new string onto the sorcerer robe.";
next;
diff --git a/world/map/npc/012-1/injured-mouboo.txt b/world/map/npc/012-1/injured-mouboo.txt
index 58a6af50..09e27c80 100644
--- a/world/map/npc/012-1/injured-mouboo.txt
+++ b/world/map/npc/012-1/injured-mouboo.txt
@@ -195,7 +195,7 @@ L_dead:
getinventorylist;
if (@inventorylist_count == 100)
goto L_nopickup;
- getitem "BlackTurtleneckSweater", 1;
+ getitem "BlackTurtleneck", 1;
mes "You pull out the sweater and stuff it into your backpack.";
set @Q_status, @STATE_TOOK_KILL_REWARD;
callsub S_update_var;
diff --git a/world/map/npc/027-2/lover.txt b/world/map/npc/027-2/lover.txt
index 5488b8e7..d1ab2a56 100644
--- a/world/map/npc/027-2/lover.txt
+++ b/world/map/npc/027-2/lover.txt
@@ -264,7 +264,7 @@ L_Soul:
getinventorylist;
if (@inventorylist_count == 100)
goto L_Full_Inv;
- getitem "SorcererRobeRed", 1;
+ getitem "SorcererRed", 1;
set @state, 7;
callsub S_Update_Mask;
mes "\"This is what mages and their apprentices wore when I lived. It is white because I wasn't a master yet.\"";
diff --git a/world/map/npc/annuals/xmas/config.txt b/world/map/npc/annuals/xmas/config.txt
index 33ddcf97..b7a6de82 100644
--- a/world/map/npc/annuals/xmas/config.txt
+++ b/world/map/npc/annuals/xmas/config.txt
@@ -129,12 +129,12 @@ L_Main:
goto L_XmasError;
// Santas Helper quest rewards
setarray $@SantasHelper_Annual_Reward$,
- "RedTurtleneckSweater",
- "YellowTurtleneckSweater",
- "LightBlueTurtleneckSwea",
- "PinkTurtleneckSweater",
- "OrangeTurtleneckSweater",
- "PurpleTurtleneckSweater",
+ "RedTurtleneck",
+ "YellowTurtleneck",
+ "LightBlueTurtleneck",
+ "PinkTurtleneck",
+ "OrangeTurtleneck",
+ "PurpleTurtleneck",
"KnitCap",
"KnitCap";
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;
+}
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index d9fbd64d..1414f681 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -27,6 +27,7 @@ npc: npc/functions/global_event_handler.txt
npc: npc/functions/stat_reset.txt
npc: npc/functions/quiz.txt
npc: npc/functions/dynamic_menu.txt
+npc: npc/functions/DyeConfig.txt
// Item Functions
npc: npc/items/magic_gm_top_hat.txt