summaryrefslogtreecommitdiff
path: root/world/map/npc/009-2/selim.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/009-2/selim.txt')
-rw-r--r--world/map/npc/009-2/selim.txt299
1 files changed, 33 insertions, 266 deletions
diff --git a/world/map/npc/009-2/selim.txt b/world/map/npc/009-2/selim.txt
index f936f2cc..c34f3968 100644
--- a/world/map/npc/009-2/selim.txt
+++ b/world/map/npc/009-2/selim.txt
@@ -9,255 +9,29 @@
{
setarray @all_colours$, "red", "green", "dark blue", "yellow", "light blue", "pink", "black", "orange", "purple", "dark green";
- mes "[Selim]";
- mes "\"What can I dye for you today?\"";
- next;
+ cleararray @items$, "", getarraysize(@items$);
+ cleararray @item_names$, "", getarraysize(@item_names$);
+ cleararray @items_new, "", getarraysize(@items_new);
+ setarray @items_new, 5131, 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";
+ set @default_choice$, "About these sorcerer robes...";
goto L_clothes_choice;
L_clothes_choice:
- set @pronoun$, "it";
- set @is_verb$, "is";
- menu
- "Cotton shirt.", L_cottonshirt,
- "Cotton cloth.", L_cottoncloth,
- "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_headband,
- "Desert hat.", L_desert_hat,
- "Cotton boots.", L_cottonboots,
- "Cotton gloves.", L_cottongloves,
- "Rabbit ears.", L_rabbitears,
- "Wizard hat.", L_wizardhat,
- "Bowler hat.", L_bowlerhat,
- "Sorcerer robe.", L_sorcererrobe,
- "Bowler hat (brown).", L_bowlerhatbrown,
- "Fine dress.", L_finedress,
- "Contributor Shirt.", L_contributor,
- "About these sorcerer robes...", L_asksorcererrobe,
- "I'm fine for now, thanks.", L_Close;
-
-L_contributor:
- set @del, 1178;
- set @new, 5131;
- set @name$, "contributor shirt";
- goto L_picked_item;
-
-L_cottonshirt:
- set @del, 1202;
- set @new, 2050;
- set @name$, "cotton shirt";
- goto L_picked_item;
-
-L_vneck:
- set @del, 624;
- set @new, 2060;
- set @name$, "V-neck sweater";
- goto L_picked_item;
-
-L_tneck:
- set @del, 564;
- set @new, 2070;
- set @name$, "turtleneck sweater";
- goto L_picked_item;
-
-L_shorts:
- set @del, 586;
- set @new, 2110;
- set @name$, "cotton shorts";
- set @pronoun$, "them";
- set @is_verb$, "are";
- goto L_picked_item;
-
-L_trousers:
- set @del, 648;
- set @new, 2180;
- set @name$, "cotton trousers";
- set @pronoun$, "them";
- set @is_verb$, "are";
- goto L_picked_item;
-
-L_skirt:
- set @del, 632;
- set @new, 2100;
- set @name$, "cotton skirt";
- goto L_picked_item;
-
-L_miniskirt:
- set @del, 771;
- set @new, 2170;
- set @name$, "miniskirt";
- goto L_picked_item;
-
-L_tanktop:
- set @del, 688;
- set @new, 2090;
- set @name$, "tank top";
- goto L_picked_item;
-
-L_tanktop_short:
- set @del, 689;
- set @new, 2120;
- set @name$, "short tank top";
- goto L_picked_item;
-
-L_robe:
- set @del, 720;
- set @new, 2080;
- set @name$, "silk robe";
- goto L_picked_item;
-
-L_headband:
- set @del, 724;
- set @new, 2140;
- set @name$, "cotton headband";
- goto L_picked_item;
-
-L_desert_hat:
- set @del, 723;
- set @new, 2130;
- set @name$, "desert hat";
- goto L_picked_item;
-
-L_cottonboots:
- set @del, 735;
- set @new, 2150;
- set @name$, "cotton boots";
- goto L_picked_item;
-
-L_cottongloves:
- set @del, 741;
- set @new, 2160;
- set @name$, "cotton gloves";
- goto L_picked_item;
-
-L_rabbitears:
- set @del, 1255;
- set @new, 2190;
- set @name$, "rabbit ears";
- set @pronoun$, "them";
- set @is_verb$, "are";
- goto L_picked_item;
-
-L_wizardhat:
- set @del, 4028;
- set @new, 2200;
- set @name$, "wizard hat";
- goto L_picked_item;
-
-L_bowlerhat:
- set @del, 4030;
- set @new, 2210;
- set @name$, "bowler hat";
- goto L_picked_item;
-
-L_sorcererrobe:
mes "[Selim]";
- mes "\"Which one?\"";
+ mes "\"What can I dye for you today?\"";
next;
- menu
- "A red lined one.", L_redlinedsorcererrobe,
- "A green lined one.", L_greenlinedsorcererrobe,
- "A dark blue lined one.", L_darkbluelinedsorcererrobe,
- "A yellow lined one.", L_yellowlinedsorcererrobe,
- "A light blue lined one.", L_lightbluelinedsorcererrobe,
- "A pink lined one.", L_pinklinedsorcererrobe,
- "A black lined one.", L_blacklinedsorcererrobe,
- "An orange lined one.", L_orangelinedsorcererrobe,
- "A purple lined one.", L_purplelinedsorcererrobe,
- "A dark green lined one.", L_darkgreenlinedsorcererrobe,
- "A white lined one.", L_whitelinedsorcererrobe,
- "I'm fine for now, thanks.", L_Close;
-
-L_redlinedsorcererrobe:
- set @del, 798;
- set @new, 2220;
- set @name$, "red lined sorcerer robe";
- goto L_picked_item;
-
-L_greenlinedsorcererrobe:
- set @del, 5010;
- set @new, 5000;
- set @name$, "green lined sorcerer robe";
+ 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$);
+ if(@item$ == "") goto L_asksorcererrobe;
goto L_picked_item;
-L_darkbluelinedsorcererrobe:
- set @del, 5021;
- set @new, 5011;
- set @name$, "dark blue lined sorcerer robe";
- goto L_picked_item;
-
-L_yellowlinedsorcererrobe:
- set @del, 5032;
- set @new, 5022;
- set @name$, "yellow lined sorcerer robe";
- goto L_picked_item;
-
-L_lightbluelinedsorcererrobe:
- set @del, 5043;
- set @new, 5033;
- set @name$, "light blue lined sorcerer robe";
- goto L_picked_item;
-
-L_pinklinedsorcererrobe:
- set @del, 5054;
- set @new, 5044;
- set @name$, "pink lined sorcerer robe";
- goto L_picked_item;
-
-L_blacklinedsorcererrobe:
- set @del, 5065;
- set @new, 5055;
- set @name$, "black lined sorcerer robe";
- goto L_picked_item;
-
-L_orangelinedsorcererrobe:
- set @del, 5076;
- set @new, 5066;
- set @name$, "orange lined sorcerer robe";
- goto L_picked_item;
-
-L_purplelinedsorcererrobe:
- set @del, 5087;
- set @new, 5077;
- set @name$, "purple lined sorcerer robe";
- goto L_picked_item;
-
-L_darkgreenlinedsorcererrobe:
- set @del, 5098;
- set @new, 5088;
- set @name$, "dark green lined sorcerer robe";
- goto L_picked_item;
-
-L_whitelinedsorcererrobe:
- set @del, 5109;
- set @new, 5099;
- set @name$, "white lined sorcerer robe";
- goto L_picked_item;
-
-L_bowlerhatbrown:
- set @del, 800;
- set @new, 2230;
- set @name$, "bowler hat (brown)";
- goto L_picked_item;
-
-L_finedress:
- set @del, 870;
- set @new, 2240;
- set @name$, "fine dress";
- goto L_picked_item;
-
-L_cottoncloth:
- set @del, 660;
- set @new, 2250;
- set @name$, "cotton cloth";
- goto L_picked_item;
L_asksorcererrobe:
mes "[Selim]";
@@ -278,43 +52,38 @@ L_Next:
mes "[Selim]";
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_cottoncloth,
+ "Sure. Here is one.", L_picked_item,
"I have to go pick that.", L_Close;
L_picked_item:
- if (countitem(@del) == 0) goto L_havenone;
+ if (countitem(@item_del$) == 0) goto L_havenone;
goto L_colour;
L_colour:
mes "[Selim]";
mes "\"Excellent. Now, what color do you want?\"";
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;
-
-L_MenuItems:
- set @colour, @menu - 1;
+ 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 @default_choice$, "I have no dye.";
+ callfunc "DynamicItemMenu$";
+ cleararray @items$, "", getarraysize(@items$);
+ cleararray @item_names$, "", getarraysize(@item_names$);
+ set @default_choice$, "";
+ if (@item$ == "") goto L_no_dye;
+ set @colour, @index;
set @vial, 690 + @colour;
- if (countitem(@vial) == 0) goto L_no_dye;
goto L_finish;
L_no_dye:
mes "[Selim]";
- mes "\"I would love to dye your " + @name$ + " for you, but you will have to bring me some " + @all_colours$[@colour] + " dye first.";
+ mes "\"I would love to dye your " + @name$ + " for you, but you will have to bring me some dye first.";
mes "Those behind me are nearly empty and won't last for your item.\"";
next;
menu
- "Sorry, I meant a different color.", L_colour,
"I wanted to dye a different item anyway.", L_clothes_choice,
"What do you mean, `bring you dye'?", L_explain_dye,
"Where would I get dye?", L_explain_dye,
@@ -329,13 +98,11 @@ L_explain_dye:
close;
L_finish:
- if (countitem(@del) == 0)
- goto L_havenone;
delitem @vial, 1;
- delitem @del, 1;
- getitem @new + @colour, 1;
+ delitem @item_del$, 1;
+ getitem @item_new + @colour, 1;
mes "[Selim]";
- mes "\"Here " + @is_verb$ + " your " + @all_colours$[@colour] + " " + @name$ + "! Please let " + @pronoun$ + " dry for a minute before you put " + @pronoun$ + " on.\"";
+ mes "\"Here's your " + @all_colours$[@colour] + " " + @name$ + "! Please let dry for a minute.\"";
close;
L_havenone: