summaryrefslogtreecommitdiff
path: root/world/map/npc/002-2/bleacher.txt
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/002-2/bleacher.txt
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/002-2/bleacher.txt')
-rw-r--r--world/map/npc/002-2/bleacher.txt327
1 files changed, 83 insertions, 244 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;
}