summaryrefslogtreecommitdiff
path: root/world/map/npc/010-2/loratay.txt
blob: f9467e405d3ac4369c80b3a2b6bf26e68c5fe890 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
010-2.gat,85,85,0|script|Lora Tay|151,
{
    set @ROBE_COCOONS_NR, 150; // must be multiple of ten
    set @ROBE_ZENY, 10000;
    set @ROBE_SHEETS_NR, 6;      // number of silk sheets required for the silk robe. Must be less than 10.
    set @ROBE_SHEETS_ZENY, 6000; // price of the silk robe when bringing silk sheets.
    set @Robe_with_sheets, 0;    // will be set to 1 if silk robe is made with sheets
    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";

    if (@loratay_asking_robe == 1) goto L_ExamineSorcererRobe;
    if (QUEST_WG_state == 10) goto L_agostine_menu;
    if (QUEST_WG_state == 11 || QUEST_WG_state == 12) goto L_regular_intro;
    if (QUEST_WG_state == 13) goto L_proposal_intro;
    if (QUEST_WG_state == 14) goto L_proposal_show_materials;
    if (QUEST_WG_state == 15) goto L_proposal_search_items;
    if (QUEST_WG_state == 16) goto L_proposal_retrieve_design;
    if (QUEST_WG_state == 17) goto L_proposal_bringing_design;
    if (QUEST_WG_state == 18) goto L_proposal_wait_dress_finished;
    if (QUEST_WG_state == 19) goto L_proposal_dress_finished;
    if (QUEST_WG_state >= 20 && QUEST_WG_state < 23) goto L_proposal_deliver_dress;
    if (QUEST_WG_state >= 23) goto L_regular_intro;

    set @t, rand(3);
    if (@t == 0) goto L_intro_0;
    if (@t == 1) goto L_intro_1;

    mes "You see a middle-aged woman furiously sewing away at what appears to be a very expensive dress.  Her fingers are moving so nimbly that you find it near-impossible to follow the needle.";
    goto L_intro_over;

L_intro_0:
    mes "You notice a middle-aged woman carefully drawing lines on a large sheet of cotton.";
    goto L_intro_over;

L_intro_1:
    mes "You see a middle-aged woman cautiously but surprisingly swiftly cutting out shapes from a huge cotton sheet.  The scissors glide along the cloth as if it were butter, never leaving the premarked lines.";
    goto L_intro_over;

L_intro_over:
    next;
    mes "She suddenly stops and looks up.";
    next;
    mes "\"Now who are you, and what are you doing here?\"";
    mes "She squints, pushes her thick spectacles up the bridge of her nose and eyes you suspiciously.";
    next;

    set @agostine_msg0$, "";
    set @agostine_msg1$, "";

    if (QUEST_WG_state >= 1)
        set @agostine_msg0$, "Do you know Agostine?";
    if ((QUEST_WG_state >= 9) && (countitem("FurBoots")))
        set @agostine_msg1$, "Can you make fur boots, like Agostine?";

    menu
        "Hello!  My name is " + strcharinfo(0) + ".", L_hello_0,
        "Hello; are you a tailor?", L_hello_1,
        "Can you make something for me?", L_hello_2,
        @agostine_msg0$, L_agostine_0,
        @agostine_msg1$, L_agostine_1;

L_hello_0:
    mes "She raises an eyebrow.";
    mes "\"That,\", she notes dryly, \"is hardly my fault.  And now I would greatly appreciate it if you were to get out of here and leave me to my work!\"";
    close;

L_hello_1:
    mes "She frowns.";
    mes "\"No, I am an accupuncturist, I just happen to practice on cloth!  Get out of here with your silly questions!\"";
    close;

L_hello_2:
    mes "She glares at you indignantly.";
    mes "\"Do you even know whom you are talking to?  I am Lora Tay, greatest of the seven seamstresses of the South!\"";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "\"I do not work for petty peasants or arrogant adventurers.  Get out of my sight!\"";
    mes "She waves you away and returns to her work.";
    close;

L_agostine_0:
    if (QUEST_WG_state < 1)
        close;
    mes "She shoots an incensed glare at you.";
    mes "\"Ah, Agostine!  The 'legendary tailor'!  Now who has not heard of him, been inspired by him!  Such charisma!  Such popularity!  Such unprecedented lack of talent!\"";
    mes "You notice that she prononuces the 't's as if she were trying to slap someone.";
    next;
    mes "\"Please spare me your tales of this fool.  He couldn't mend a sock without getting himself trapped inside!\"";
    mes "She frowns and turns back to her work, clearly not interested in discussing the matter further.";
    close;

L_agostine_1:
    if ((QUEST_WG_state < 9) || (countitem (655) == 0))
        close;
    mes "[Lora Tay the Seamstress]";
    mes "She glares at your boots, her lips forming barely more than a thin line.  Deep furrows form above her brows.";
    mes "\"I can't believe it!  He copied Illana's design but used fluffy fur in place of ice wolvern fur-- Fluffy fur!  Of all things!  Who would wear such an atrocity of fashion!  Everyone knows that you need ice-white, not pale-white, to go with such leather!\"";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "She looks at them more closely.";
    mes "\"This insolent upstart!  Even worse, he copied my very own double-backward cross-stitch pattern... I can't believe it!\"";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "Angry red spots begin to form on her cheeks.";
    mes "\"Get those... things out of my sight before I forget myself!\"";
    if (QUEST_WG_state == 9)
        set QUEST_WG_state, 10;
    close;

L_agostine_menu:
    mes "[Lora Tay the Seamstress]";
    mes "The seamstress looks up at you from her work.";
    mes "\"I do hope that you have not had any more dealings with this... this lumberjack of a tailor?\"";
    next;
    if (countitem("WinterGloves") > 0)
        menu
            "You mean Agostine?", L_agostine_3,
            "Actually, he also made me gloves...", L_agostine_2,
            "Why don't you like him?", L_agostine_4,
            "No, none, really.", L_agostine_5;
    menu
        "You mean Agostine?", L_agostine_3,
        "Why don't you like him?", L_agostine_4,
        "No, none, really.", L_agostine_5;

L_agostine_2:
    if ((QUEST_WG_state < 9) || (countitem("WinterGloves") == 0))
        close;
    mes "[Lora Tay the Seamstress]";
    mes "Lora inspects your gloves, shock apparent on her face.";
    mes "\"Winter gloves?  And he managed the join stitches without adding a single crease... no, that can't be the Agostine we were talking about...\"";
    mes "Without asking, she takes your gloves and inspects them further.";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "\"Triple inverted crossbar... he stole another of my stitching patterns!  Except... no, that couldn't hold... what kind of yarn...\"";
    mes "Torn between excitement, worry, and latent disgust, she frantically turns the gloves from side to side, looking for obvious flaws, her face reddening.";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "\"No, it's perfect... Inconceivable!  How could that little upstart... I don't believe it!\"";
    mes "Breathing heavily with something that might be anger or confusion, she turns them inside out.";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "She slides her fingers over the now-exposed inside whilst the color of her face approaches that of an over-ripe tomato.";
    mes "\"Almost perfectly smooth...\", she whispers.";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "She jumps up in a fit of sudden rage.";
    mes "\"That's impossible!  Where did he learn to sew like that!  How did he cut the shapes so perfectly!  When did he...";
    mes "Suddenly, she breaks into a cough.";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "\"*cough* ... can't possibly... *cough*...\"";
    mes "Lora sinks back on her chair, trying to control her cough.";
    next;
    if (countitem("BottleOfWater"))
        menu
            "(sneak out of the room)", L_end,
            "Are you alright?", L_Next,
            "Here, have a bottle of water...", L_give_water,
            "Can I help you?", L_Next;

    menu
        "(sneak out of the room)", L_end,
        "Are you alright?", L_Next,
        "Can I help you?", L_Next;

L_Next:
    mes "[Lora Tay the Seamstress]";
    mes "She holds out your gloves for you to pick up, then waves you out of the room.  Fortunately, her cough seems to be slowly subsiding.";
    close;

L_agostine_3:
    mes "[Lora Tay the Seamstress]";
    mes "She frowns at you.";
    mes "\"What other self-absorbed tailor-pretends with the sewing skill of a mouboo are there around?  Stop wasting my time.\"";
    close;

L_agostine_4:
    mes "[Lora Tay the Seamstress]";
    mes "\"Is it not obvious?  We are talking about someone so self-absorbed that he chose to ignore the advice of myself, greatest of the seven southern seamstresses!  I cannot stand such arrogance.\"";
    close;

L_agostine_5:
    mes "[Lora Tay the Seamstress]";
    mes "\"Good for you.  That arrogant good-for-nothing couldn't tell a piece of cotton from chain mail if he wiped his nose with it!\"";
    close;

L_no_water:
    mes "Checking more closely, you realize that you are out of water.";
    mes "You apologise to Lora, though it fortunately seems that her cough is subsiding.";
    mes "She waves you out of the room.";
    close;

L_regular_intro:
    mes "[Lora Tay the Seamstress]";
    mes "\"Ah, you again.  Is there anything in particular you need?\"";
    next;
    if (QUEST_WG_state == 12)
        goto L_main_menu2;
    goto L_main_menu;

L_give_water:
    if (countitem("BottleOfWater") == 0)
        goto L_no_water;
    delitem "BottleOfWater", 1;
    set QUEST_WG_state, 11;

    set @xpval, 50000;

    getexp @xpval, 0;
    mes "[Lora Tay the Seamstress]";
    mes "Lora grabs your water bottle and take a deep sip.  Slowly, her head regains a more natural color.  As she puts the bottle down, her cough seems to have subsided.";
    mes "\"Thank you, dear; that was just the right thing at the right time.\"";
    mes "[You gain " + @xpval + " experience points]";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "She hands you the winter gloves again.";
    mes "\"Now what happened I don't know, but this wasn't made by the Agostine I remember.  But I shan't be made a fool out of by one such as him.\"";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "\"If HE can sew petty every-day items for ordinary peasants, then so can I.  Very well, is there anything in particular that you need made?  I shall show you how a proper seamstress operates!\"";
    next;

    if (QUEST_WG_state == 12)
        goto L_main_menu2;
    goto L_main_menu;

L_main_menu:
    menu
        "Can you trim something for me?", L_trim,
        "Can you lengthen something for me?", L_lengthen,
        "Can you make me a shirt?", L_shirt,
        "Can you make me a tank top?", L_tanktop,
        "Can you make me a cape?", L_cape,
        "Can you make fur boots for me?", L_Fur,
        "Can you make winter gloves me?", L_Fur,
        "Can you sew a robe for me?", L_robe,
        "Can you make a desert hat for me?", L_desert_hat,
        "Can you enhance a sorcerer robe with another line color?", L_sorcerer_robe_linecolor,
        "Goodbye for now.", L_end;

L_Fur:
    mes "[Lora Tay the Seamstress]";
    mes "\"From what?  Fluffy fur?  I won't work with such lowly materials.\"";
    next;
    goto L_main_menu;

L_main_menu2:
    menu
        "Can you trim something for me?", L_trim,
        "Can you lengthen something for me?", L_lengthen,
        "Can you make me a shirt?", L_shirt,
        "Can you make me a tank top?", L_tanktop,
        "Can you make me a cape?", L_cape,
        "Can you make fur boots for me?", L_Fur1,
        "Can you make winter gloves me?", L_Fur1,
        "Can you sew a robe for me?", L_robe,
        "Can you make a desert hat for me?", L_desert_hat,
        "Actually...I have a proposal for you...", L_agostine_proposal,
        "Goodbye for now.", L_end;

L_Fur1:
    mes "[Lora Tay the Seamstress]";
    mes "\"From what?  Fluffy fur?  I won't work with such lowly materials.\"";
    next;
    goto L_main_menu2;

L_agostine_proposal:
    mes "[Lora Tay the Seamstress]";
    mes "\"What kind of proposal are you asking of me?\"";
    next;

    menu
        "I have talked to Agostine and he needs your help.", L_Next1,
        "I forgot...", L_main_menu2;

L_Next1:
    mes "[Lora Tay the Seamstress]";
    mes "\"That cheat! What could he possibly want from me?";
    mes "We don't even have the same style in seaming. Is this a joke?\"";
    next;

    menu
        "It's no joke. He needs your help in creating a new fashion!", L_Next2,
        "Yeah you're right, he was probably joking.", L_end;

L_Next2:
    mes "[Lora Tay the Seamstress]";
    mes "\"Well it depends what he wants from me.";
    mes "Go see Agostine, ask him what he's planning and I will think about it.\"";

    set QUEST_WG_state, 13;

    close;

L_proposal_intro:
    mes "Lora Tay seems lost in her thoughts... ";
    menu
        "Sorry to disturb you, but...", L_main_menu,
        "I better go talk to Agostine.", L_end;

L_proposal_show_materials:
    mes "[Lora Tay the Seamstress]";
    mes "\"Did you talk to Agostine about his idea?\"";
    next;
    menu
        "Yes, he explained he saw a dress in a dream and gave me these materials.", L_Next3,
        "No, that guy is a total wacko.", L_end;

L_Next3:
    mes "[Lora Tay the Seamstress]";
    mes "\"Wow these are such fine materials!";
    mes "These are certainly not for just any ordinary clothes...";
    mes "He must be thinking of something magnificent.\"";
    next;

    menu
        "He said this garment would be his first dress creation and he wanted it to be fabulous!", L_Next4;

L_Next4:
    mes "[Lora Tay the Seamstress]";
    mes "\"Fine I will accept his offer...";
    mes "But the materials he has given you need some sewing on the edges.\"";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "\"I will fix them, but I cannot use normal threading to fix these materials.";
    mes "I will need a soft thin thread so I won't spoil the textures.\"";
    next;
    goto L_proposal_search_items;

L_proposal_search_items:
    mes "[Lora Tay the Seamstress]";
    mes "\"Please bring me " + @FINEDRESS_COCOONS + " silk cocoons.";
    mes "This should cover the materials needed, and will leave extra for sewing the pieces together later on.\"";
    next;

    menu
        "I will go get them right away!", L_Next5,
        "Here you are.", L_proposal_give_items,
        @FINEDRESS_COCOONS+" silk cocoons for a dress? Find somebody else.", L_end;

L_Next5:
    set QUEST_WG_state, 15;
    close;

L_proposal_not_enough_items:
    mes "[Lora Tay the Seamstress]";
    mes "\"This is not funny. I need " + @FINEDRESS_COCOONS + " silk cocoons. No less.";
    close;

L_proposal_give_items:
    if (countitem ("SilkCocoon") < @FINEDRESS_COCOONS)
        goto L_proposal_not_enough_items;
    delitem "SilkCocoon", @FINEDRESS_COCOONS;
    set QUEST_WG_state, 16;

    mes "[Lora Tay the Seamstress]";
    mes "\"Great, now I can spin the silk threading and fix this mess made of these fine materials.";
    mes "While I do this, you will need to go get the design drawings from Agostine...";
    mes "Every tailor puts their designs on paper before they forget about it.\"";
    next;
    goto L_proposal_retrieve_design;

L_proposal_retrieve_design:
    mes "[Lora Tay the Seamstress]";
    mes "\"May you go retrieve the design from Agostine?\"";
    next;
    menu
        "Certainly I'll be back soon!", L_end,
        "Actually I want something else...", L_main_menu;

L_proposal_bringing_design:
    mes "[Lora Tay the Seamstress]";
    mes "\"Welcome back, did you get the drawings I requested?\"";
    next;
    menu
        "Here they are!", L_Next6;

L_Next6:
    mes "[Lora Tay the Seamstress]";
    mes "\"Wonderful, this dress design is magnificent!";
    mes "I am done with the threading but I will now need to sew these materials together into the design.\"";
    next;
    set QUEST_WG_state, 18;
    goto L_proposal_wait_dress_finished;

L_proposal_wait_dress_finished:
    // Sets @time_start to the current time
    // if not set yet, or if the player logged off.
    if (@time_start == 0) set @time_start, gettimetick(2);
    if (gettimetick(2) - @time_start > 30)
        goto L_proposal_dress_finished;
    mes "[Lora Tay the Seamstress]";
    mes "\"It will take some time to have the dress finished.";
    mes "Meanwhile, why don't you go take some air outside?\"";
    close;

L_proposal_dress_finished:
    set QUEST_WG_state, 19;
    mes "[Lora Tay the Seamstress]";
    mes "\"Well it was difficult seaming with such fragile materials.";
    mes "But I have done it. The design is finished except for one part of it.\"";
    next;

    menu
        "Wow it looks great, but what's missing?", L_Next7;

L_Next7:
    mes "[Lora Tay the Seamstress]";
    mes "\"Well there are white flare designs on the bottom of the dress.";
    mes "I'm not great with fine cloth design so this might be something Agostine must do on his own.";
    next;

    mes "[Lora Tay the Seamstress]";
    mes "\"Please take the unfinished dress to him so he may finish the edges with the cloth.\"";
    next;

    menu
        "Okay, can't wait to see the finished product! Thanks for your help!", L_Next8;

L_Next8:
    set QUEST_WG_state, 20;
    close;

L_proposal_deliver_dress:
    mes "[Lora Tay the Seamstress]";
    mes "\"Please take the unfinished dress to him so he may finish the edges with the cloth.\"";
    menu
        "I'm on my way.", L_end,
        "I have a request...", L_main_menu;

L_desert_hat:
    mes "[Lora Tay the Seamstress]";
    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;
    set @default_choice$, "Never mind.";
    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 @items_nr, 11;

    callsub S_pick_one_of_many_items;
    if (@item == 0)
        goto L_main_menu;
    if (@item == 724)
        set @genitem, 723;
    if (@item != 724)
        set @genitem, @item - 10;
    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 "CottonCloth", 3;
    set Zeny, Zeny - 300;
    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.";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "The result resembles a huge knot.";
    mes "Lora picks two ends and pulls, hard-- to your amazement, the knot unfolds, yielding a Desert Hat.";
    mes "\"Here you are.\"";
    next;
    goto L_main_menu;

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...\"";
    next;
    goto L_main_menu;

L_desert_hat_nogp:
    mes "[Lora Tay the Seamstress]";
    mes "\"No, no, no.  300 GP.  That's not that much, I've been told.  I can't just work for free, now can I?\"";
    next;
    goto L_main_menu;

L_desert_hat_noheadband:
    mes "[Lora Tay the Seamstress]";
    mes "\"Now that is odd.  Where did your headband vanish to?  Well, I'm not going to make you something as silly as a headband, so get one from elsewhere.\"";
    next;
    goto L_main_menu;

L_trim:
    mes "[Lora Tay the Seamstress]";
    mes "\"Trimming... you mean that you can't do that yourself?  Well, alright... I suppose I should charge 100 GP and do it.\"";
    mes "\"Alright.  What is it that you want trimmed?\"";
    next;

    set @default_choice$, "Never mind.";
    setarray @items, 1202, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 688, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 632, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 648, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189;
    setarray @item_names$, "Cotton Shirt", "Red Cotton Shirt", "Green Cotton Shirt", "Dark Blue Cotton Shirt", "Yellow Cotton Shirt", "Light Blue Cotton Shirt", "Pink Cotton Shirt", "Black Cotton Shirt", "Orange Cotton Shirt", "Purple Cotton Shirt", "Dark Green Cotton Shirt", "Tank Top", "Red Tank Top", "Green Tank Top", "Dark Blue Tank Top", "Yellow Tank Top", "Light Blue Tank Top", "Pink Tank Top", "Black Tank Top", "Orange Tank Top", "Purple Tank Top", "Dark Green Tank Top", "Cotton Skirt", "Red Cotton Skirt", "Green Cotton Skirt", "Dark Blue Cotton Skirt", "Yellow Cotton Skirt", "Light Blue Cotton Skirt", "Pink Cotton Skirt", "Black Cotton Skirt", "Orange Cotton Skirt", "Purple Cotton Skirt", "Dark Green Cotton Skirt", "Cotton Trousers", "Red Cotton Trousers", "Green Cotton Trousers", "Dark Blue Cotton Trousers", "Yellow Cotton Trousers", "Light Blue Cotton Trousers", "Pink Cotton Trousers", "Black Cotton Trousers", "Orange Cotton Trousers", "Purple Cotton Trousers", "Dark Green Cotton Trousers";
    set @items_nr, 44;
    callsub S_pick_one_of_many_items;
    if (@item == 0)
        goto L_main_menu;
    set @delitem, @item;
    set @genitem, 0;
    if (@item == 1202)
        set @genitem, 688;
    if (@item == 688)
        set @genitem, 689;
    if (@item == 632)
        set @genitem, 771;
    if (@item == 648)
        set @genitem, 586;
    if (@item >= 2090 && @item <= 2099)
        set @genitem, @item + 30;
    if (@item >= 2050 && @item <= 2059)
        set @genitem, @item + 40;
    if (@item >= 2100 && @item <= 2109)
        set @genitem, @item + 70;
    if (@item >= 2180 && @item <= 2189)
        set @genitem, @item - 70;
    if (@genitem == 0)
        goto L_trim_impossible;
    if (Zeny < 100)
        goto L_trim_nozeny;
    if (countitem(@delitem) < 1)
        goto L_main_menu;

    delitem @delitem, 1;
    getitem @genitem, 1;
    set Zeny, Zeny - 100;
    mes "[Lora Tay the Seamstress]";
    mes "";
    mes "\"There you are, dear.\"";
    next;
    goto L_main_menu;

L_trim_impossible:
    mes "[Lora Tay the Seamstress]"; // INTERNAL ERROR
    mes "\"I don't really want to shorten this any more.\"";
    next;
    goto L_main_menu;

L_trim_nozeny:
    mes "[Lora Tay the Seamstress]";
    mes "\"Not enough GP?  Well, just do it yourself-- trimming really is trivial.\"";
    next;
    goto L_main_menu;

L_lengthen:
    mes "[Lora Tay the Seamstress]";
    mes "\"Naturally, I will need a piece of Cotton Cloth to sew onto it; I must also charge you some... hmm... does 500 GP sound reasonable?  Yes, I think I shall charge that.\"";
    mes "\"Now, let me see.  What is it that you want lengthened?\"";
    next;

    set @default_choice$, "Never mind.";
    setarray @items, 688, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 689, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 771, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 586, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119;
    setarray @item_names$, "Tank Top", "Red Tank Top", "Green Tank Top", "Dark Blue Tank Top", "Yellow Tank Top", "Light Blue Tank Top", "Pink Tank Top", "Black Tank Top", "Orange Tank Top", "Purple Tank Top", "Dark Green Tank Top", "Short Tank Top", "Red Short Tank Top", "Green Short Tank Top", "Dark Blue Short Tank Top", "Yellow Short Tank Top", "Light Blue Short Tank Top", "Pink Short Tank Top", "Black Short Tank Top", "Orange Short Tank Top", "Purple Short Tank Top", "Dark Green Short Tank Top", "Miniskirt", "Red Miniskirt", "Green Miniskirt", "Dark Blue Miniskirt", "Yellow Miniskirt", "Light Blue Miniskirt", "Pink Miniskirt", "Black Miniskirt", "Orange Miniskirt", "Purple Miniskirt", "Dark Green Miniskirt", "Cotton Shorts", "Red Cotton Shorts", "Green Cotton Shorts", "Dark Blue Cotton Shorts", "Yellow Cotton Shorts", "Light Blue Cotton Shorts", "Pink Cotton Shorts", "Black Cotton Shorts", "Orange Cotton Shorts", "Purple Cotton Shorts", "Dark Green Cotton Shorts";

    set @items_nr, 44;
    callsub S_pick_one_of_many_items;
    if (@item == 0)
        goto L_main_menu;

    set @delitem, @item;
    set @genitem, 0;
    if (@item == 688)
        set @genitem, 1202;
    if (@item == 689)
        set @genitem, 688;
    if (@item == 771)
        set @genitem, 632;
    if (@item == 586)
        set @genitem, 648;
    if (@item >= 2120 && @item <= 2129)
        set @genitem, @item - 30;
    if (@item >= 2090 && @item <= 2099)
        set @genitem, @item - 40;
    if (@item >= 2170 && @item <= 2179)
        set @genitem, @item - 70;
    if (@item >= 2110 && @item <= 2119)
        set @genitem, @item + 70;
    if (@genitem == 0)
        goto L_lengthen_impossible;
    if (Zeny < 500)
        goto L_lengthen_nozeny;
    if (countitem ("CottonCloth") < 1)
        goto L_lengthen_nocotton;
    if (countitem(@delitem) < 1)
        goto L_main_menu;

    delitem @delitem, 1;
    delitem "CottonCloth", 1;
    getitem @genitem, 1;
    set Zeny, Zeny - 500;
    mes "[Lora Tay the Seamstress]";
    mes "The seamstress cuts your piece of cotton cloth into stripes and sews them on.  Using some odd liquid, she flattens the seams and borders.";
    if (@delitem > 2000) // dyed
        mes "She then applies another liquid-- smelling strangely of fermented apples-- to the result, wraps it up, and wrings it tightly.  As she unwraps it, you observe to your amazement that the dye has spread to the newly attached area.";
    mes "\"There you are, dear.\"";
    next;
    goto L_main_menu;

L_lengthen_nocotton:
    mes "[Lora Tay the Seamstress]";
    mes "\"Who do you think I am?  The cotton fairy?  Get yourself some cloth before you ask me to sew it on.\"";
    next;
    goto L_main_menu;

L_lengthen_nozeny:
    mes "[Lora Tay the Seamstress]";
    mes "\"No gold, no sewing.\"";
    next;
    goto L_main_menu;

L_lengthen_impossible:
    mes "[Lora Tay the Seamstress]"; // INTERNAL ERROR
    mes "\"I really can't lengthen that any more.\"";
    next;
    goto L_main_menu;

L_shirt:
    mes "[Lora Tay the Seamstress]";
    mes "\"Oh, how silly.  You can buy those everywhere.  Please don't bore me with such trifles, dear.\"";
    next;
    goto L_main_menu;

L_tanktop:
    mes "[Lora Tay the Seamstress]";
    mes "\"A tank top?  Well, hardly a challenge, but I suppose I could do that.  Please get me some cloth-- plain cotton will do-- and, let's see, how does 100,000 GP for my efforts sound?\"";
    mes "\"Wait, I keep forgetting, you are just an adventurer... let's make that 1000 GP, then.\"";
    next;
    goto L_tanktop_menu;

L_tanktop_menu:
    menu
        "I think I would like something else.", L_main_menu,
        "A tank top, please (6 Cotton Cloth)", L_tanktop_long,
        "A short tank top, please (5 Cotton Cloth)", L_tanktop_short,
        "Goodbye for now.", L_end;

L_tanktop_short:
    if (countitem ("CottonCloth") < 5)
        goto L_tanktop_insufficient_cloth;
    if (Zeny < 1000)
        goto L_tanktop_insufficient_Zeny;
    getinventorylist;
    if (@inventorylist_count == 100 && countitem("CottonCloth") > 5)
        goto L_TooMany;
    set Zeny, Zeny - 1000;
    delitem "CottonCloth", 5;
    getitem "ShortTankTop", 1;
    mes "[Lora Tay the Seamstress]";
    mes "You watch as Lora sews the pieces of cloth together, then flattens the seams and ends with some odd liquid.";
    mes "Amazingly, the result looks like a single piece of cloth.";
    mes "After little more than a few elegant cuts and folds, your tank top is ready.";
    mes "\"Oh dear, it seems that I am done already.  Do you need anything else?\"";
    next;
    goto L_tanktop_menu;

L_tanktop_long:
    if (countitem ("CottonCloth") < 6)
        goto L_tanktop_insufficient_cloth;
    if (Zeny < 1000)
        goto L_tanktop_insufficient_Zeny;
    getinventorylist;
    if (@inventorylist_count == 100 && countitem("CottonCloth") > 6)
        goto L_TooMany;
    set Zeny, Zeny - 1000;
    delitem "CottonCloth", 6;
    getitem "TankTop", 1;
    mes "[Lora Tay the Seamstress]";
    mes "After combining your pieces of cloth into one-- miraculously making the seams and stitches vanish-- the seamstress cuts out all that doesn't belong into a tank top, then folds and stabilises the edges with additional seam lines.";
    mes "\"There you are.  Don't worry, I have trimmed it to match your size perfectly.\"";
    next;
    goto L_tanktop_menu;

L_tanktop_insufficient_cloth:
    mes "[Lora Tay the Seamstress]";
    mes "\"No, no, no, count again-- how much Cotton Cloth did I say I needed?  That's not enough.\"";
    next;
    goto L_tanktop_menu;

L_tanktop_insufficient_Zeny:
    mes "[Lora Tay the Seamstress]";
    mes "As you note that you don't have enough GP on you, Lora rolls her eyes.";
    mes "\"I don't work for free, you know.  I already gave you a discounted peasant price.\"";
    next;
    goto L_main_menu;

L_cape:
    mes "[Lora Tay the Seamstress]";
    mes "She shakes her head.";
    mes "\"No capes.  You're an adventurer, right? Do you want to get caught by a closing portcullis?  Or strangled when your cape gets tangled in a tree?  Or brought down by a mushroom stomping on your cape while you're trying to run away?  No capes.\"";
    next;
    goto L_main_menu;

L_robe:
    mes "[Lora Tay the Seamstress]";
    mes "\"A robe?  Well, as long as you're not asking me to make it out of cotton...\"";
    next;
    if (countitem("SilkCocoon")== 0 && countitem("SilkSheet")== 0)
        goto L_robe_nosilk;
    goto L_robe_menu;

L_robe_menu:
    menu
        "Here, I have some silk cocoons!", L_Next9,
        "Here, I have some silk sheets!", L_robe_sheets,
        "Where can I find silk?", L_where_silk,
        "How much silk do you need?", L_how_much_silk,
        "Oh, never mind.", L_main_menu;

L_Next9:
    mes "[Lora Tay the Seamstress]";
    mes "The seamstress stares at you as if you had gone out of your mind.";
    mes "\"And what precisely do you expect me to do with Silk Cocoons?  String them together in some baubly chain?  Somehow remove the thread and spin and weave it so that some random person can have their robe?\"";
    next;
    menu
        "Will you trade cocoons for sheets?", L_Next10,
        "Never mind.", L_main_menu;

L_Next10:
    mes "[Lora Tay the Seamstress]";
    mes "Lora frowns.";
    mes "\"It's not all that easy to get properly processed silk around here.  Easier for me than for you, I admit...\"";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "She sighs.";
    mes "\"All right, very well then.  I have enough spare silk sheets right now, but you pay the silk processing for your cocoons.\"";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "\"Let's see... " + @ROBE_COCOONS_NR + " silk cocoons and " + @ROBE_ZENY + " GP should just about cover that.\"";
    next;
    menu
        "I'm not interested.", L_main_menu,
        "Very well then, here you are.", L_Next11;

L_Next11:
    if (countitem("SilkCocoon") < @ROBE_COCOONS_NR)
        goto L_robe_missing_cocoons;
    if (Zeny < @ROBE_ZENY)
        goto L_robe_missing_Zeny;
    getinventorylist;
    if (@inventorylist_count == 100 && countitem("SilkCocoon") > @ROBE_COCOONS_NR)
        goto L_TooMany;
    set Zeny, Zeny - @ROBE_ZENY;
    delitem "SilkCocoon", @ROBE_COCOONS_NR;
    mes "[Lora Tay the Seamstress]";
    mes "The seamstress puts your cocoons and GP away, takes your measurements and pulls out several silk sheets.  She asks you to stretch out your arms, then pins the silk sheets in place all over your body.";
    next;
    goto L_get_robe;

L_robe_sheets:
    set @Robe_with_sheets, 1;
    mes "[Lora Tay the Seamstress]";
    mes "\"Let's see... " + @ROBE_SHEETS_NR + " silk sheets and " + @ROBE_SHEETS_ZENY + " GP should just about cover that.\"";
    next;
    menu
        "I'm not interested.", L_main_menu,
        "Very well then, here you are.", L_Next12;

L_Next12:
    if (countitem("SilkSheet") < @ROBE_SHEETS_NR)
        goto L_robe_missing_sheets;
    if (Zeny < @ROBE_SHEETS_ZENY)
        goto L_robe_sheet_missing_Zeny;
    getinventorylist;
    if (@inventorylist_count == 100 && countitem("SilkSheet") > @ROBE_SHEETS_NR)
        goto L_TooMany;
    set Zeny, Zeny - @ROBE_SHEETS_ZENY;
    delitem "SilkSheet", @ROBE_SHEETS_NR;
    mes "[Lora Tay the Seamstress]";
    mes "The seamstress puts your GP away, takes your measurements and puts the silk sheets on the table.  She asks you to stretch out your arms, then pins the silk sheets in place all over your body.";
    next;
    goto L_get_robe;

L_get_robe:
    mes "[Lora Tay the Seamstress]";
    mes "She proceeds to make a number of mysterious marks on the sheets with a charcoal pen.  Meanwhile, your arms are getting tired, but you're afraid to lower them-- she used a lot of pins to put everything into place, and you lost track of where they went...";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "\"Splendid.\"";
    mes "After removing the sheets (and pins!), she picks up a pair of scissors and plows through the cloth at her usual amazing pace, only stopping briefly to sew together parts here and there.";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "She then treats the seams with some odorless liquid, making them vanish completely.  Finally she hands you the finished robe.";
    getitem "SilkRobe", 1;
    if (@Robe_with_sheets == 1)
        goto L_robe_sheet_end;
    mes "\"Here you are now, this will fit.  And don't you dare tell anyone that I did this!  I'm not about to start a silk cocoon collection!\"";
    next;
    goto L_main_menu;

L_robe_sheet_end:
    mes "\"Here you are now, this will fit. Thank you for bringing the sheets. People are so lazy nowadays! \"";
    next;
    goto L_main_menu;

L_robe_missing_cocoons:
    mes "[Lora Tay the Seamstress]";
    mes "\"" + @ROBE_COCOONS_NR + " cocoons is what I said, not " + countitem("SilkCocoon") + ".";
    mes @ROBE_COCOONS_NR + " is " + (@ROBE_COCOONS_NR / 10) + " as many times as you have fingers, in case that helps.\"";
    next;
    goto L_main_menu;

L_robe_missing_Zeny:
    mes "[Lora Tay the Seamstress]";
    mes "\"No, no no.  The way this works is that you give me the GP first and I give you the robe afterwards.  You're " + (@ROBE_ZENY - Zeny) + " GP short, so come back when you can afford the robe!\"";
    next;
    goto L_main_menu;

L_robe_missing_sheets:
    mes "[Lora Tay the Seamstress]";
    mes "\"" + @ROBE_SHEETS_NR + " silk sheets is what I said, not " + countitem("SilkSheet") + ".";
    mes @ROBE_SHEETS_NR + " is " + (10-@ROBE_SHEETS_NR) + " less than you have fingers, in case that helps.\"";
    next;
    goto L_main_menu;

L_robe_sheet_missing_Zeny:
    mes "[Lora Tay the Seamstress]";
    mes "\"No, no no.  The way this works is that you give me the GP first and I give you the robe afterwards.  You're " + (@ROBE_SHEETS_ZENY - Zeny) + " GP short, so come back when you can afford the robe!\"";
    next;
    goto L_main_menu;

L_where_silk:
    mes "[Lora Tay the Seamstress]";
    mes "\"Oh, Hetchel on the Tulimshar Marketplace can weave them for you.\"";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "She hesitates.";
    mes "\"I didn't see her there the last time I visited, though.  She may be visiting family.  Tough luck.\"";
    next;
    goto L_robe_menu;

L_how_much_silk:
    mes "[Lora Tay the Seamstress]";
    mes "\"Six sheets should do fine, if they're the usual double-elbow squares.\"";
    next;
    goto L_robe_menu;

L_robe_nosilk:
    mes "[Lora Tay the Seamstress]";
    mes "\"What is that?  You don't have any silk?  Well, you're out of luck, I would say.  I shan't make one out of those cotton rags; you might as well be wearing an apple sack.\"";
    next;
    goto L_main_menu;

L_end:
    set @ROBE_COCOONS_NR, 0;
    set @ROBE_ZENY, 0;
    set @ROBE_SHEETS_NR, 0;
    set @ROBE_SHEETS_ZENY, 0;
    set @Robe_with_sheets, 0;
    close;

// Input: @items (array of items you want to choose from)
//        @item_names (names of the items in @items)
//        @items_nr (number of entries in @items)
//        @default_choice$ (default option)
// Return:  @item (The selected item, or 0 if the default/something invalid was chosen)
S_pick_one_of_many_items:
    set @c, 0;
    set @i, 0;

    setarray @choice_n$, "", "", "", "", "", "", "", "",
                             "", "", "", "", "", "", "", "",
                             "", "", "", "", "", "", "", "",
                             "", "", "", "", "", "", "", "";
    goto L_SUB_pick_choice_loop;

L_SUB_pick_choice_loop:
    if (@i >= @items_nr)
        goto L_SUB_choice_init_done;
    set @current, @items[@i];
    set @current_name$, @item_names$[@i];
    set @i, @i + 1;

    if (countitem(@current) == 0)
        goto L_SUB_pick_choice_loop;
    set @choice_v[@c], @current;
    set @choice_n$[@c], @current_name$;
    set @c, @c + 1;
    goto L_SUB_pick_choice_loop;

L_SUB_choice_init_done:
    set @choice_v[@c], 0;
    set @choice_n$[@c], @default_choice$;
    set @c, @c + 1;

    if (@c < 10)
        menu
            @choice_n$[0], L_SUB_choice_join,
            @choice_n$[1], L_SUB_choice_join,
            @choice_n$[2], L_SUB_choice_join,
            @choice_n$[3], L_SUB_choice_join,
            @choice_n$[4], L_SUB_choice_join,
            @choice_n$[5], L_SUB_choice_join,
            @choice_n$[6], L_SUB_choice_join,
            @choice_n$[7], L_SUB_choice_join,
            @choice_n$[8], L_SUB_choice_join,
            @choice_n$[9], L_SUB_choice_join;

    if (@c < 20)
        menu
            @choice_n$[0], L_SUB_choice_join,
            @choice_n$[1], L_SUB_choice_join,
            @choice_n$[2], L_SUB_choice_join,
            @choice_n$[3], L_SUB_choice_join,
            @choice_n$[4], L_SUB_choice_join,
            @choice_n$[5], L_SUB_choice_join,
            @choice_n$[6], L_SUB_choice_join,
            @choice_n$[7], L_SUB_choice_join,
            @choice_n$[8], L_SUB_choice_join,
            @choice_n$[9], L_SUB_choice_join,
            @choice_n$[10], L_SUB_choice_join,
            @choice_n$[11], L_SUB_choice_join,
            @choice_n$[12], L_SUB_choice_join,
            @choice_n$[13], L_SUB_choice_join,
            @choice_n$[14], L_SUB_choice_join,
            @choice_n$[15], L_SUB_choice_join,
            @choice_n$[16], L_SUB_choice_join,
            @choice_n$[17], L_SUB_choice_join,
            @choice_n$[18], L_SUB_choice_join,
            @choice_n$[19], L_SUB_choice_join;

    menu
        @choice_n$[0], L_SUB_choice_join,
        @choice_n$[1], L_SUB_choice_join,
        @choice_n$[2], L_SUB_choice_join,
        @choice_n$[3], L_SUB_choice_join,
        @choice_n$[4], L_SUB_choice_join,
        @choice_n$[5], L_SUB_choice_join,
        @choice_n$[6], L_SUB_choice_join,
        @choice_n$[7], L_SUB_choice_join,
        @choice_n$[8], L_SUB_choice_join,
        @choice_n$[9], L_SUB_choice_join,
        @choice_n$[10], L_SUB_choice_join,
        @choice_n$[11], L_SUB_choice_join,
        @choice_n$[12], L_SUB_choice_join,
        @choice_n$[13], L_SUB_choice_join,
        @choice_n$[14], L_SUB_choice_join,
        @choice_n$[15], L_SUB_choice_join,
        @choice_n$[16], L_SUB_choice_join,
        @choice_n$[17], L_SUB_choice_join,
        @choice_n$[18], L_SUB_choice_join,
        @choice_n$[19], L_SUB_choice_join,
        @choice_n$[20], L_SUB_choice_join,
        @choice_n$[21], L_SUB_choice_join,
        @choice_n$[22], L_SUB_choice_join,
        @choice_n$[23], L_SUB_choice_join,
        @choice_n$[24], L_SUB_choice_join,
        @choice_n$[25], L_SUB_choice_join,
        @choice_n$[26], L_SUB_choice_join,
        @choice_n$[27], L_SUB_choice_join,
        @choice_n$[28], L_SUB_choice_join,
        @choice_n$[29], L_SUB_choice_join,
        @choice_n$[30], L_SUB_choice_join,
        @choice_n$[31], L_SUB_choice_join;

L_SUB_choice_join:
    set @menu, @menu - 1;
    set @item, @choice_v[@menu];
    if (@menu >= @c)
        set @item, 0;
    return;

L_TooMany:
    mes "[Lora Tay the Seamstress]";
    mes "\"You don't have anywhere to put this. Come back when you have more room.\"";
    close;

L_sorcerer_robe_linecolor:
    mes "[Lora Tay the Seamstress]";
    mes "\"Hmm, this has a line sewed on it already. I don't see another way than remove it and sew a new one.";
    mes "That is  quite a difficult work... for a casual tailor of course. I'll do that in a heart beat.\"";
    next;
    mes "\"However, you can expect this will cost you a large fee. Let's say " + @SORCERER_ROBE_SEW_ZENY + " GP.";
    mes "Also, I will need " + @SORCERER_ROBE_NUM_COTTON_CLOTH + " sheets of Cotton Cloth of the color you want.\"";
    next;
    mes "\"Ok. Now please wear the robe you want me to change.\"";
    set @loratay_asking_robe, 1;
    close;

L_ExamineSorcererRobe:
    set @loratay_asking_robe, 0;
    mes "[Lora Tay the Seamstress]";
    mes "\"Let's see...\"";
    next;
    set @chest_equip_id, getequipid(equip_torso);
    callsub S_Get_SorcererRobeColors;
    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?\"";
    if (@current_maincolor == -1 || @current_linecolor == -1)
        goto L_NotSorcererRobe;
    menu
        "Yes, that's fine. Take this one.", L_ChooseSorcererLineColor,
        "No, I changed my mind.", L_CleanSorcererRobe;

L_NotSorcererRobe:
    mes "\"This isn't a Sorcerer Robe dear. Stop taking me for a fool.\"";
    goto L_CleanSorcererRobe;

L_ChooseSorcererLineColor:
    // Unequip the robe, just to simulate Lora Tay really took it
    unequipbyid(equip_torso);
    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,
        "Hum. I changed my mind. Later maybe.", L_end;

L_ItemMenus2:
    set @chosen_color, @menu - 1;
    set @cotton_cloth_id, 2250 + @chosen_color;
    // The White Cotton Cloth is in fact the undyed one.
    if (@cotton_cloth_id == 2260)
        set @cotton_cloth_id, 660;
    if (countitem(@cotton_cloth_id) < 2)
        goto L_NoColoredCottonCloth;
    if (@current_linecolor == @chosen_color)
        goto L_SorcererRobe_SameColor;
    callsub S_Get_NewSorcererRobeId;
    // Should not happen since it has been checked the player submitted a sorcerer robe
    if (@new_sorcerer_robe_id == 0)
        goto L_end;

    if (Zeny < @SORCERER_ROBE_SEW_ZENY)
        goto L_SorcererRobe_NoZeny;
    if (countitem(@chest_equip_id) == 0)
        goto L_SorcererRobe_Vanished;
    delitem @cotton_cloth_id, @SORCERER_ROBE_NUM_COTTON_CLOTH;
    // Since we delete an unstackable item, we don't need to check
    // for an available inventory slot.
    delitem @chest_equip_id, 1;
    set Zeny, Zeny - @SORCERER_ROBE_SEW_ZENY;
    getitem @new_sorcerer_robe_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.";
    next;
    mes "She begins to sew the new string onto the sorcerer robe.";
    next;
    mes "She regularly flips and flips again the robe, which starts to show her new color.";
    next;
    mes "After a few minutes you barely noticed, the robe seems to be ready.";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "\"There you are dear. I have to say I made a perfect job... As always.";
    mes "I hope you'll enjoy your new robe.\"";
    goto L_CleanSorcererRobe;

L_SorcererRobe_SameColor:
    mes "[Lora Tay the Seamstress]";
    mes "\"Are you blind? Your robe is already of this color dear!\"";
    goto L_CleanSorcererRobe;

L_SorcererRobe_Vanished:
    mes "Lora Tay adjusts her glasses and looks around, as if something was missing.";
    next;
    mes "[Lora Tay the Seamstress]";
    mes "\"Uh? Where is your sorcerer robe?\"";
    goto L_CleanSorcererRobe;

S_Get_NewSorcererRobeId:
    if (@chosen_color == 0 && @current_maincolor == 10)
        set @new_sorcerer_robe_id, 798;
    if (@chosen_color == 0 && @current_maincolor < 10)
        set @new_sorcerer_robe_id, 2220 + @current_maincolor;
    if (@chosen_color > 0)
        set @new_sorcerer_robe_id, 5000 + @current_maincolor + (@chosen_color-1)*11;
    return;

L_NoColoredCottonCloth:
    mes "[Lora Tay the Seamstress]";
    mes "\"You don't seem to own enough Cotton Cloth of this color. I need " + @SORCERER_ROBE_NUM_COTTON_CLOTH + " of them. Too bad.\"";
    goto L_CleanSorcererRobe;

L_SorcererRobe_NoZeny:
    mes "[Lora Tay the Seamstress]";
    mes "\"You don't seem to be able to afford my services, dear.\"";
    goto L_CleanSorcererRobe;

S_Get_SorcererRobeColors:
    set @current_maincolor, -1;
    set @current_linecolor, -1;
    // Line color
    if (@chest_equip_id == 798 || (@chest_equip_id >= 2220 && @chest_equip_id <= 2229))
        set @current_linecolor, 0;
    if (@chest_equip_id >= 5000 && @chest_equip_id <= 5109)
        set @current_linecolor, 1 + (@chest_equip_id-5000)/11;
    // Main color
    if (@chest_equip_id == 798)
        set @current_maincolor, 10;
    if (@chest_equip_id >= 2220 && @chest_equip_id <= 2229)
        set @current_maincolor, @chest_equip_id - (@chest_equip_id/10)*10;
    if (@chest_equip_id >= 5000 && @chest_equip_id <= 5109)
        set @current_maincolor, @chest_equip_id - 5000 - (@current_linecolor-1)*11;
    return;

L_CleanSorcererRobe:
    set @current_maincolor, 0;
    set @current_linecolor, 0;
    set @chest_equip_id, 0;
    set @new_sorcerer_robe_id, 0;
    set @chosen_color, 0;
    set @cotton_cloth_id, 0;
    close;
}