File: vendorScript.xml

package info (click to toggle)
scummvm 2.9.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 450,580 kB
  • sloc: cpp: 4,299,825; asm: 28,322; python: 12,901; sh: 11,302; java: 9,289; xml: 7,895; perl: 2,639; ansic: 2,465; yacc: 1,670; javascript: 1,020; makefile: 933; lex: 578; awk: 275; objc: 82; sed: 11; php: 1
file content (1393 lines) | stat: -rw-r--r-- 50,575 bytes parent folder | download | duplicates (3)
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
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
<?xml version="1.0"?>
<!-- $Id: vendorScript.xml 2852 2011-03-27 04:50:22Z darren_janeczek $ -->

<scripts xml:space="preserve" debug="false" id_prop="choice">
    <!--
    /**
     * Weapons
     */
    -->
    <script id="Weapons" noun="weapon">
        <intro>
            <ztats screen="weapons"/>
            <music type="shopping"/>



            Welcome to
            {name}

            {owner} says:
            Welcome friend!
            Art thou here to
            Buy or Sell? <input type="choice" options="bs" target="buy_sell"/>
        </intro>

        <end>
            <music reset="true"/>
            <ztats screen="party"/>
        </end>

        <bye>

            {owner} says:
            Fare thee well!
        <end/>
        </bye>

        <!--
        /**
         * Global items
         *
         * We list these here because you can sell
         * any weapon to any store, but each store
         * doesn't carry every weapon, so it needs
         * a global reference so it can figure out
         * how much gold to give you when you sell it
         */
         -->
        <weapon choice="b" name="Staff" price="20"/>
        <weapon choice="c" name="Dagger" price="2"/>
        <weapon choice="d" name="Sling" price="25"/>
        <weapon choice="e" name="Mace" price="100"/>
        <weapon choice="f" name="Axe" price="225"/>
        <weapon choice="g" name="Sword" price="300"/>
        <weapon choice="h" name="Bow" price="250"/>
        <weapon choice="i" name="Crossbow" price="600"/>
        <weapon choice="j" name="Flaming Oil" price="5"/>
        <weapon choice="k" name="Halberd" price="350"/>
        <weapon choice="l" name="Magic Axe" price="1500"/>
        <weapon choice="m" name="Magic Sword" price="2500"/>
        <weapon choice="n" name="Magic Bow" price="2000"/>
        <weapon choice="o" name="Magic Wand" price="5000"/>
        <weapon choice="p" name="Mystic Sword" price="7000"/>

        <buy_sell default="true" redirect="bye"/>

        <!--
        /**
         * Buying
         */
         -->

        <buy_more default="true" redirect="bye"/>
        <buy_more choice="y">
            <redirect target="buy_sell" choice="b"/>
        </buy_more>

        <buy_sell choice="b">



            Very Good!

            We Have:
            {show_inventory:show_item}
            Your
            Interest? <input type="choice" options="{inventory_choices}" target="check_money"/>
        </buy_sell>

        <!-- what to show as the inventory for each item -->
        <show_item>{toupper({choice})}-{name}</show_item>

        <!-- check to see if the player has enough gold first -->
        <check_money choice="null" redirect="bye"/>
        <check_money>
            <context name="weapon"/> <!-- change the translation context with the $choice variable -->
            <var name="weapon" value="{$choice}"/>
            <var name="cost" value="{price}"/>
            <var name="quantity" value="1"/>

            <if test="{party:gold}&lt;{price}">
                You have not the funds for even one!<redirect target="anything_else_buy"/>
            </if>

            <include script="tell_about" choice="{$choice}"/>
            <if test="{party:gold}&gt;={math({price}*2)}">
                <redirect target="howmany_buy"/>
            </if>
            Take it? <input type="choice" options="yn" target="take_it"/>
        </check_money>

        <not_enough_money>
            I fear you have not the funds, perhaps something else.<redirect target="anything_else_buy"/>
        </not_enough_money>

        <take_it default="true" redirect="toobad"/>
        <take_it choice="y">
            <include script="buy"/> <!-- include the basic "buy" script -->
        </take_it>

        <!-- description of each weapon -->

        <tell_about choice="b">
            We are the only staff makers in Britannia, yet sell them for only {price}gp.
        </tell_about>

        <tell_about choice="c">
            We sell the most deadly of daggers, a bargain at only {price}gp each.
        </tell_about>

        <tell_about choice="d">
            Our slings are made from only the finest guy and leather,
            'Tis yours for {price}gp.
        </tell_about>

        <tell_about choice="e">
            These maces have a hardened shaft and a 5lb head fairly priced at {price}gp.
        </tell_about>

        <tell_about choice="f">
            Notice the fine workmanship on this axe, you'll agree {price}gp is a good price.
        </tell_about>

        <tell_about choice="g">
            The fine work on these swords will be the dread of thy foes, for {price}gp.
        </tell_about>

        <tell_about choice="h">
            Our bows are made of finest yew, and the arrows willow, a steal at {price}gp.
        </tell_about>

        <tell_about choice="i">
            Crossbows made by Iolo the Bard are the finest in the world, your for {price}gp.
        </tell_about>

        <tell_about choice="j">
            Flasks of oil make great weapons and creates a wall of flame too.
            {price}gp each.
        </tell_about>

        <tell_about choice="k">
            A Halberd is a mighty weapon to attack over obstacles; a must and only {price}gp.
        </tell_about>

        <tell_about choice="l">
            This magical axe can be thrown at thy enemy and will then return all for {price}gp.
        </tell_about>

        <tell_about choice="m">
            Magical swords such as these are rare indeed
            I will part with one for {price}gp.
        </tell_about>

        <tell_about choice="n">
            A magical bow will keep thy enemies far away or dead! A must for {price}gp!
        </tell_about>

        <tell_about choice="o">
            This magic wand casts mighty blue bolts to strike down thy foes, {price}gp.
        </tell_about>

        <!-- input how many to buy -->
        <howmany_buy>
            How many would
            you like? <input name="quantity" type="number" maxlen="2" target="buy"/>
        </howmany_buy>

        <!-- buy the weapon -->
        <buy choice="null" redirect="toobad"/>
        <buy>
            <if test="{$quantity}==0" redirect="anything_else_buy"/>
            <if test="{party:gold}&lt;{math({$quantity}*{price})}" redirect="not_enough_money"/>
            <pay price="{$cost}" quantity="{$quantity}" cantpay="check_money"/>
            <add type="weapon" subtype="{$weapon}" quantity="{$quantity}"/>
            {owner} says: A fine choice!<redirect target="anything_else_buy"/>
        </buy>

        <toobad>
            Too bad.<redirect target="anything_else_buy"/>
        </toobad>

        <anything_else_buy>
            <unset_context/>
            Anything
            else? <input type="choice" options="yn" target="buy_more"/>
        </anything_else_buy>

        <!--
        /**
         * Selling
         */
         -->
        <buy_sell choice="s">
            Excellent! Which
            wouldst <redirect target="you_sell"/>
        </buy_sell>

        <you_sell choice="null" redirect="bye"/>
        <you_sell>
            You sell: <input type="choice" options="bcdefghijklmnop" target="sell_weapon"/>
        </you_sell>

        <sell_weapon choice="null" redirect="bye"/>
        <sell_weapon>
            <context name="weapon"/> <!-- Add the weapon we're talking about to the translation context -->
            <var name="weapon" value="{$choice}"/>
            <var name="price" value="{math({price}/2)}"/>
            <if test="{party:weapon:{name}}==0" redirect="you_sell"/>
            <if test="{party:weapon:{name}}&gt;1" redirect="sell_many"/>
            <redirect target="sell_one"/>
        </sell_weapon>

        <!-- sell just one item -->
        <sell_one>
            <var name="quantity" value="1"/>
            I will give you {$price}gp for that {name}.
            Deal? <input type="choice" options="yn" target="sell"/>
        </sell_one>

        <sell_many>
            How many {name}s
            would you wish
            to sell? <input name="quantity" type="number" maxlen="2" target="sell_many_offer"/>
        </sell_many>

        <sell_many_offer choice="null" redirect="bye"/>
        <sell_many_offer>
            <if test="{$quantity}==0" redirect="sell" choice="n"/>
            <if test="{$quantity}&gt;{party:weapon:{name}}" redirect="dont_have_that_many"/>
            I will give you {math({$price}*{$quantity})}gp for them.
            Deal? <input type="choice" options="yn" target="sell"/>
        </sell_many_offer>

        <dont_have_that_many>
            You don't have that many swine!
            <end/>
        </dont_have_that_many>

        <sell default="true" redirect="bye"/>
        <sell choice="n">
            Hmmph. What else
            would <redirect target="you_sell"/>
        </sell>
        <sell choice="y">
            <lose type="weapon" subtype="{$weapon}" quantity="{$quantity}"/>
            <add type="gold" quantity="{math({$quantity}*{$price})}"/>
            <unset_context/>
            Fine! What else?
            <redirect target="you_sell"/>
        </sell>

        <vendor id="Britain" name="Windsor Weaponry" owner="Winston">
            <weapon choice="b" name="Staff" price="20"/>
            <weapon choice="c" name="Dagger" price="2"/>
            <weapon choice="d" name="Sling" price="25"/>
            <weapon choice="g" name="Sword" price="300"/>
        </vendor>

        <vendor id="Jhelom" name="Willard's Weaponry" owner="Willard">
            <weapon choice="f" name="Axe" price="225"/>
            <weapon choice="g" name="Sword" price="300"/>
            <weapon choice="i" name="Crossbow" price="600"/>
            <weapon choice="k" name="Halberd" price="350"/>
        </vendor>

        <vendor id="Minoc" name="The Iron Works" owner="Peter">
            <weapon choice="e" name="Mace" price="100"/>
            <weapon choice="k" name="Halberd" price="300"/>
            <weapon choice="l" name="Magic Axe" price="1500"/>
            <weapon choice="m" name="Magic Sword" price="2500"/>
        </vendor>

        <vendor id="Trinsic" name="Dueling Weapons" owner="Jumar">
            <weapon choice="e" name="Mace" price="100"/>
            <weapon choice="f" name="Axe" price="225"/>
            <weapon choice="g" name="Sword" price="300"/>
            <weapon choice="h" name="Bow" price="250"/>
        </vendor>

        <vendor id="Buccaneers Den" name="Hook's Arms" owner="Hook">
            <weapon choice="i" name="Crossbow" price="600"/>
            <weapon choice="j" name="Flaming Oil" price="5"/>
            <weapon choice="n" name="Magic Bow" price="2000"/>
            <weapon choice="o" name="Magic Wand" price="5000"/>
        </vendor>

        <vendor id="Vesper" name="Village Arms" owner="Wendy">
            <weapon choice="c" name="Dagger" price="2"/>
            <weapon choice="d" name="Sling" price="25"/>
            <weapon choice="h" name="Bow" price="250"/>
            <weapon choice="j" name="Flaming Oil" price="5"/>
        </vendor>

    </script>

    <!--
    /**
     * Armor
     */
    -->
    <script id="Armor" noun="armor">
        <intro>
            <ztats screen="armor"/>
            <music type="shopping"/>



            Welcome to
            {name}

            {owner} says:
            Welcome friend!
            Want to Buy or
            Sell? <input type="choice" options="bs" target="buy_sell"/>
        </intro>

        <end>
            <music reset="true"/>
            <ztats screen="party"/>
        </end>

        <bye>
            {owner} says:
            Good Bye.
        <end/>
        </bye>

       <!--
        /**
         * Global items
         *
         * We list these here because you can sell
         * any weapon to any store, but each store
         * doesn't carry every weapon, so it needs
         * a global reference so it can figure out
         * how much gold to give you when you sell it
         */
         -->
        <armor choice="b" name="Cloth" price="50"/>
        <armor choice="c" name="Leather" price="200"/>
        <armor choice="d" name="Chain Mail" price="600"/>
        <armor choice="e" name="Plate Mail" price="2000"/>
        <armor choice="f" name="Magic Chain" price="4000"/>
        <armor choice="g" name="Magic Plate" price="7000"/>
        <armor choice="h" name="Mystic Robe" price="9000"/>

        <buy_sell default="true" redirect="bye"/>

        <!--
        /**
         * Buying
         */
         -->

        <buy_more default="true" redirect="bye"/>
        <buy_more choice="y">
            <redirect target="buy_sell" choice="b"/>
        </buy_more>

        <buy_sell choice="b">



            Well then,
            We've got:
            {show_inventory:show_item}

            What'll it
            be? <input type="choice" options="{inventory_choices}" target="check_money"/>
        </buy_sell>

        <!-- what to show as the inventory for each item -->
        <show_item>{toupper({choice})} {name}</show_item>

        <!-- check to see if the player has enough gold first -->
        <check_money choice="null" redirect="bye"/>
        <check_money>
            <context name="armor"/>
            <var name="armor" value="{$choice}"/>
            <var name="quantity" value="1"/>

            <if test="{party:gold}&lt;{price}">
                You have not the funds for even one!<redirect target="anything_else_buy"/>
            </if>

            <include script="tell_about" choice="{$choice}"/>
            <if test="{party:gold}&gt;={math({price}*2)}">
                <redirect target="howmany_buy"/>
            </if>
            Take it? <input type="choice" options="yn" target="take_it"/>
        </check_money>

        <not_enough_money>
            You don't have enough gold. Maybe something cheaper?<redirect target="anything_else_buy"/>
        </not_enough_money>

        <take_it default="true" redirect="toobad"/>
        <take_it choice="y">
            <include script="buy"/> <!-- include the basic "buy" script -->
        </take_it>

        <!-- description of each armor -->

        <tell_about choice="b">
            Cloth Armour is good for a tight budget, Fairly priced at {price}gp.
        </tell_about>

        <tell_about choice="c">
            Leather Armour is both supple and strong, and costs a mere {price}gp.
            A Bargain!
        </tell_about>

        <tell_about choice="d">
            Chail Mail is the armour used by more warriors than all others. Ours costs {price}gp.
        </tell_about>

        <tell_about choice="e">
            Full Plate armour is the ultimate in non-magical armour. Get yours for {price}gp.
        </tell_about>

        <tell_about choice="f">
            Magic Armour is rare and expensive. This chain sells for {price}gp.
        </tell_about>

        <tell_about choice="g">
            Magic Plate Armour is the best known protection. Only we have it. Cost: {price}gp.
        </tell_about>

        <!-- input how many to buy -->
        <howmany_buy>
            How many would
            you like? <input name="quantity" type="number" target="buy"/>
        </howmany_buy>

        <!-- buy the armor -->
        <buy choice="null" redirect="toobad"/>
        <buy>
            <if test="{$quantity}==0" redirect="anything_else_buy"/>
            <if test="{party:gold}&lt;{math({$quantity}*{price})}" redirect="not_enough_money"/>
            <pay price="{price}" quantity="{$quantity}" cantpay="check_money"/>
            <add type="armor" subtype="{$armor}" quantity="{$quantity}"/>

            {owner} says: Good choice!<redirect target="anything_else_buy"/>
        </buy>

        <toobad>
            Too bad.<redirect target="anything_else_buy"/>
        </toobad>

        <anything_else_buy>
            <unset_context/>
            Anything
            else? <input type="choice" options="yn" target="buy_more"/>
        </anything_else_buy>

        <!--
        /**
         * Selling
         */
         -->
        <buy_sell choice="s">
            What will <redirect target="you_sell"/>
        </buy_sell>

        <you_sell>
            You sell: <input type="choice" options="bcdefgh" target="sell_armor"/>
        </you_sell>

        <sell_armor choice="null" redirect="bye"/>
        <sell_armor>
            <context name="armor"/>
            <var name="armor" value="{$choice}"/>
            <var name="price" value="{math({price}/2)}"/>

            <if test="{party:armor:{name}}==0">
                Come on, you
                don't own any.<redirect target="bye"/>
            </if>

            <if test="{party:armor:{name}}&gt;1" redirect="sell_many"/>
            <redirect target="sell_one"/>
        </sell_armor>

        <!-- sell just one item -->
        <sell_one>
            <var name="quantity" value="1"/>
            I will give you {$price}gp for that {name}.
            Deal? <input type="choice" options="yn" target="sell"/>
        </sell_one>

        <sell_many>
            How many {name}s
            would you wish
            to sell? <input name="quantity" type="number" target="sell_many_offer"/>
        </sell_many>

        <sell_many_offer choice="null" redirect="bye"/>
        <sell_many_offer>
            <if test="{$quantity}==0" redirect="sell" choice="n"/>
            <var name="price" value="{math({$price}*{$quantity})}"/>
            <if test="{$quantity}&gt;{party:armor:{name}}" redirect="dont_have_that_many"/>
            I will give you {$price}gp for them.
            Deal? <input type="choice" options="yn" target="sell"/>
        </sell_many_offer>

        <dont_have_that_many>
            You don't have that many swine!
            <end/>
        </dont_have_that_many>

        <sell default="true" redirect="bye"/>
        <sell choice="n">
            <unset_context/>
            Harumph. What else would <redirect target="you_sell"/>
        </sell>
        <sell choice="y">
            <lose type="armor" subtype="{$armor}" quantity="{$quantity}"/>
            <add type="gold" quantity="{$price}"/>
            <unset_context/>
            Fine! What else?
            <redirect target="you_sell"/>
        </sell>

        <vendor id="Britain" name="Winsdor Armour" owner="Winston">
            <armor choice="b" name="Cloth" price="50"/>
            <armor choice="c" name="Leather" price="200"/>
            <armor choice="d" name="Chain Mail" price="600"/>
        </vendor>

        <vendor id="Jhelom" name="Valiant's Armour" owner="Valiant">
            <armor choice="d" name="Chain Mail" price="600"/>
            <armor choice="e" name="Plate Mail" price="2000"/>
            <armor choice="f" name="Magic Chain" price="4000"/>
            <armor choice="g" name="Magic Plate" price="7000"/>
        </vendor>

        <vendor id="Trinsic" name="Duelling Armour" owner="Jean">
            <armor choice="b" name="Cloth" price="50"/>
            <armor choice="d" name="Chain Mail" price="600"/>
            <armor choice="f" name="Magic Chain" price="4000"/>
        </vendor>

        <vendor id="Paws" name="Light Armour" owner="Pierre">
            <armor choice="b" name="Cloth" price="50"/>
            <armor choice="c" name="Leather" price="200"/>
        </vendor>

        <vendor id="Buccaneers Den" name="Basic Armour" owner="Limpy">
            <armor choice="b" name="Cloth" price="50"/>
            <armor choice="c" name="Leather" price="200"/>
            <armor choice="d" name="Chain Mail" price="600"/>
        </vendor>

    </script>

    <!--
    /**
     * Food
     */
    -->
    <script id="Food">
        <intro>
            <music type="shopping"/>
            Welcome to {name}

            {owner} says: Good day, and Welcome friend.
            <if test="{party:gold}&lt;{price}" redirect="come_back"/>
            May I interest you in some rations? <input type="choice" options="yn" target="ask"/>
        </intro>

        <end>
            <music reset="true"/>
        </end>

        <ask default="true" redirect="bye"/>
        <ask choice="y">
            We have the best adventure rations, {quant} for only {price}gp.
            <redirect target="howmany"/>
        </ask>
        <howmany>How many packs of {quant} would you like? <input name="quantity" type="number" target="buy"/></howmany>
        <buy choice="null">
            Too bad. Maybe next time.
            <redirect target="bye"/>
        </buy>
        <buy>
            <pay price="{price}" quantity="{$quantity}" cantpay="cantpay"/>
            <add type="food" quantity="{math({quant}*{$quantity})}"/>
            Thank you.<if test="{party:gold}&lt;{price}" redirect="come_again"/>
            Anything
            else? <input type="choice" options="yn" target="ask"/>
        </buy>
        <cantpay>
            You can only afford {math({party:gold}/{price})} packs.
            <redirect target="howmany"/>
        </cantpay>
        <come_back>
            Come back when you have some money!
            <end/>
        </come_back>
        <come_again>
            Come again!
            <end/>
        </come_again>
        <bye>
            Goodbye. Come again!
            <end/>
        </bye>

        <vendor id="Moonglow" name="The Sage Deli" owner="Shaman" price="25" quant="25"/>
        <vendor id="Britain" name="Adventure Food" owner="Windrick" price="40" quant="25"/>
        <vendor id="Yew" name="The Dry Goods" owner="Donnar" price="35" quant="25"/>
        <vendor id="Skara Brae" name="Food For Thought" owner="Mintol" price="20" quant="25"/>
        <vendor id="Paws" name="The Market" owner="Max" price="30" quant="25"/>
    </script>

    <!--
    /**
     * Taverns
     */
    -->
    <script id="Tavern">
        <intro>
            <music type="shopping"/>
            {owner} says: Welcome to {name}<redirect target="whatll_it_be"/>
        </intro>

        <end>
            <music reset="true"/>
        </end>

        <ask default="true" redirect="bye"/>
        <ask choice="y" redirect="whatll_it_be"/>
        <whatll_it_be>
            {owner} says: What'll it be,
            Food er Ale? <input type="choice" options="fa" target="buy"/>
        </whatll_it_be>

        <bye>
            See ya mate!
            <end/>
        </bye>

        <buy default="true" redirect="bye"/>
        <buy choice="f">
            Our specialty is {specialty},
            which costs {spec_price}gp.<redirect target="how_many_plates"/>
        </buy>

        <how_many_plates>How many plates would you
            like? <input name="quantity" type="number" target="food_buy"/>
        </how_many_plates>

        <food_buy choice="null" redirect="bye"/>
        <food_buy>
            <if test="{$quantity}==0" redirect="bye"/>
            <pay price="{spec_price}" quantity="{$quantity}" cantpay="cantpay_food"/>
            Here ye arr.
            <add type="food" quantity="{$quantity}"/>
            <redirect target="something_else"/>
        </food_buy>

        <cantpay_food>
            Ya can only afford {math({party:gold}/{spec_price})} plates.
            <redirect target="how_many_plates"/>
        </cantpay_food>

        <something_else>
            Somethin'
            else? <input type="choice" options="yn" target="ask"/>
        </something_else>

        <buy choice="a">
            Here's a mug of our best.
            That'll be {ale_price}gp.
            You pay? <input name="price" type="number" maxlen="2" target="ale_buy"/>
        </buy>

        <ale_buy choice="null" redirect="bye"/>
        <ale_buy>
            <if test="{$price}&lt;{ale_price}">
                Won't pay, eh.
                Ya scum, be gone
                fore ey call the
                guards!
                <end/>
            </if>
            <pay price="{$price}" quantity="1" cantpay="cantpay_ale"/>
            <if test="{$price}={ale_price}" redirect="something_else"/>
            <if test="{$price}&gt;{ale_price}">
                <var name="tip_total" value="{math({$price}-{ale_price})}"/>
                What'd ya like to know friend?
                <input name="choice" type="text" target="topic"/>
            </if>
        </ale_buy>

        <cantpay_ale>
            It seems that you have not the gold. Good Day!<redirect target="bye"/>
        </cantpay_ale>

        <topic default="true">
            <if test="{isempty({$choice})}" redirect="something_else"/>
            'fraid I can't help ya there friend!
            <redirect target="something_else"/>
        </topic>

        <reply choice="black stone">
            {owner} says: Ah, the Black Stone.
            Yes I've heard of it. But, the
            only one who knows where it
            lies is the wizard Merlin.
            <redirect target="something_else"/>
        </reply>

        <reply choice="sextant">
            {owner} says: For navigation a Sextant is vital... Ask for item "D" in the Guild shops!
            <redirect target="something_else"/>
        </reply>

        <reply choice="white stone">
            Now let me see... Yes it was the old Hermit...
            Sloven! He is tough to find,
            lives near Lock Lake I hear.
            <redirect target="something_else"/>
        </reply>

        <reply choice="mandrake">
            {owner} says: The last person I knew that had
            any Mandrake was an old alchemist
            named Calumny.
            <redirect target="something_else"/>
        </reply>

        <reply choice="skull">
            {owner} says: If thou must know of that evilest of all things...
            find the beggar Jude. He is very very poor!
            <redirect target="something_else"/>
        </reply>

        <reply choice="nightshade">
            {owner} says: Of Nightshade I know but this...
            Seek out Virgil or thou shalt miss! Try in Trinsic!
            <redirect target="something_else"/>
        </reply>

        <save>
            <context name="topic"/>
            <var name="topic" value="{$choice}"/>
            <var name="payment" value="0"/>
            <redirect target="foggy"/>
        </save>

        <sorry>
            Sorry, I could
            not help ya mate!<redirect target="something_else"/>
        </sorry>

        <foggy choice="null" redirect="sorry"/>
        <foggy>
            <pay price="payment" quantity="1" cantpay="cantpay_topic"/>
            <var name="tip_total" value="{math({$tip_total}+{$payment})}"/>
            <if test="{price}&lt;={$tip_total}" choice="{$topic}" redirect="reply"/>
            That subject is a bit foggy, perhaps more gold will refresh my memory. You
            give: <input name="payment" type="number" maxlen="2"/>
            <if test="{$payment}==0" redirect="sorry"/>
        	<redirect target="foggy"/>
        </foggy>

        <cantpay_topic>
            Ye don't have that mate!<redirect target="sorry"/>
        </cantpay_topic>

        <vendor id="Britain" name="Jolly Spirits" owner="Sam" specialty="Lamb Chops" spec_price="4" ale_price="2">
            <topic choice="black stone" price="20" redirect="save"/>
            <topic choice="sextant" price="30" redirect="save"/>
            <topic choice="white stone" price="10" redirect="save"/>
            <topic choice="mandrake" price="40" redirect="save"/>
            <topic choice="skull" price="99" redirect="save"/>
            <topic choice="nightshade" price="25" redirect="save"/>
        </vendor>

        <vendor id="Jhelom" name="The Bloody Pub" owner="Celestial" specialty="Dragon Tartar" spec_price="2" ale_price="2">
            <topic choice="sextant" price="30" redirect="save"/>
            <topic choice="white stone" price="10" redirect="save"/>
            <topic choice="mandrake" price="40" redirect="save"/>
            <topic choice="skull" price="99" redirect="save"/>
            <topic choice="nightshade" price="25" redirect="save"/>
        </vendor>

        <vendor id="Trinsic" name="The Keg Tap" owner="Terran" specialty="Brown Beans" spec_price="3" ale_price="2">
            <topic choice="white stone" price="10" redirect="save"/>
            <topic choice="mandrake" price="40" redirect="save"/>
            <topic choice="skull" price="99" redirect="save"/>
            <topic choice="nightshade" price="25" redirect="save"/>
        </vendor>

        <vendor id="Paws" name="Folley Tavern" owner="Greg 'n Rob" specialty="Folley Filet" spec_price="2" ale_price="2">
            <topic choice="mandrake" price="40" redirect="save"/>
            <topic choice="skull" price="99" redirect="save"/>
            <topic choice="nightshade" price="25" redirect="save"/>
        </vendor>

        <vendor id="Buccaneers Den" name="Captain Black Tavern" owner="The Cap'n" specialty="Dog Meat Pie" spec_price="4" ale_price="2">
            <topic choice="skull" price="99" redirect="save"/>
            <topic choice="nightshade" price="25" redirect="save"/>
        </vendor>

        <vendor id="Vesper" name="Axe 'n Ale" owner="Arron" specialty="Green Granukit" spec_price="2" ale_price="2">
            <topic choice="nightshade" price="25" redirect="save"/>
        </vendor>
    </script>

    <!--
    /**
     * Reagents
     */
     -->

    <script id="Reagents" noun="reagent">
        <intro>
            <music type="shopping"/>
            <ztats screen="reagents"/>
            A blind woman turns to you and says: Welcome to {name}

            I am {owner}
            Are you in need of Reagents? <input type="choice" options="yn" target="show_reagents"/>
        </intro>

        <end>
            <music reset="true"/>
            <ztats screen="party"/>
        </end>

        <bye>
            {owner} says:
            Perhaps another time then....
            and slowly turns away.
            <end/>
        </bye>

        <show_reagents default="true" redirect="bye"/>
        <show_reagents choice="y">
            Very well,
            I have
            {show_inventory:show_item}
            Your
            Interest: <input type="choice" options="{inventory_choices}" target="how_many"/>
        </show_reagents>

        <show_item>{toupper({choice})}-{name}</show_item>

        <how_many choice="null" redirect="bye"/>
        <how_many>
            <context name="reagent"/>
            <var name="reagent" value="{$choice}"/>
            Very well, we sell {name} for {price}gp. How many would you
            like? <input name="quantity" type="number" target="you_pay"/>
        </how_many>

        <i_see_then>
            I see, then <redirect target="anything_else"/>
        </i_see_then>

        <anything_else>
            <unset_context/>
            Anything
            else? <input type="choice" options="yn" target="show_reagents"/>
        </anything_else>

        <you_pay choice="null" redirect="i_see_then"/>
        <you_pay>
            <if test="{$quantity}==0" redirect="i_see_then"/>
            Very good, that will be {math({price}*{$quantity})}gp.
            You pay: <input name="price" type="number" target="buy"/>
        </you_pay>

        <buy choice="null" redirect="i_see_then"/>
        <buy>
            <if test="{$price}==0" redirect="i_see_then"/>
            <pay price="{$price}" quantity="1" cantpay="cantpay"/>
            <add type="reagent" subtype="{type}" quantity="{$quantity}"/>
            Very good.
            <if test="{$price}&lt;{math({price}*{$quantity})}">
                <karma action="cheated_merchant"/>
                <redirect target="anything_else"/>
            </if>

            <karma action="honest_to_merchant"/>
            <redirect target="anything_else"/>
        </buy>

        <cantpay>
            It seems you have not the gold! <redirect target="anything_else"/>
        </cantpay>

        <vendor id="Moonglow" name="Magical Herbs" owner="Margot">
            <reagent choice="a" name="Sulfurous Ash" type="ash" price="2"/>
            <reagent choice="b" name="Ginseng" type="ginseng" price="5"/>
            <reagent choice="c" name="Garlic" type="garlic" price="6"/>
            <reagent choice="d" name="Spider Silk" type="silk" price="3"/>
            <reagent choice="e" name="Blood Moss" type="moss" price="6"/>
            <reagent choice="f" name="Black Pearl" type="pearl" price="9"/>
        </vendor>

        <vendor id="Skara Brae" name="Herbs and Spice" owner="Sasha">
            <reagent choice="a" name="Sulfurous Ash" type="ash" price="2"/>
            <reagent choice="b" name="Ginseng" type="ginseng" price="4"/>
            <reagent choice="c" name="Garlic" type="garlic" price="9"/>
            <reagent choice="d" name="Spider Silk" type="silk" price="6"/>
            <reagent choice="e" name="Blood Moss" type="moss" price="4"/>
            <reagent choice="f" name="Black Pearl" type="pearl" price="8"/>
        </vendor>

        <vendor id="Paws" name="The Magics" owner="Sheila">
            <reagent choice="a" name="Sulfurous Ash" type="ash" price="3"/>
            <reagent choice="b" name="Ginseng" type="ginseng" price="4"/>
            <reagent choice="c" name="Garlic" type="garlic" price="2"/>
            <reagent choice="d" name="Spider Silk" type="silk" price="9"/>
            <reagent choice="e" name="Blood Moss" type="moss" price="6"/>
            <reagent choice="f" name="Black Pearl" type="pearl" price="7"/>
        </vendor>

        <vendor id="Buccaneers Den" name="Magic Mentar" owner="Shannon">
            <reagent choice="a" name="Sulfurous Ash" type="ash" price="6"/>
            <reagent choice="b" name="Ginseng" type="ginseng" price="7"/>
            <reagent choice="c" name="Garlic" type="garlic" price="9"/>
            <reagent choice="d" name="Spider Silk" type="silk" price="9"/>
            <reagent choice="e" name="Blood Moss" type="moss" price="9"/>
            <reagent choice="f" name="Black Pearl" type="pearl" price="1"/>
        </vendor>
    </script>

    <!--
    /**
     * Healer
     */
     -->

    <script id="Healer" noun="service">
        <intro>
            <music type="shopping"/>
            Welcome unto
            {name}

            {healer} says:
            Peace and Joy be with you friend.
            Are you in need of help? <input type="choice" options="yn" target="show_services"/>
        </intro>

        <end>
            <music reset="true"/>
        </end>

        <bye>
            {healer} says: May thy life be guarded by the powers of good.
            <end/>
        </bye>

        <give_blood>
            <if test="{party:member1:hp}&gt;=400">
                Art thou willing to give 100pts of thy blood to aid others? <input type="choice" options="yn" target="gave_blood"/>
            </if>
            <redirect target="bye"/>
        </give_blood>

        <gave_blood default="true" redirect="bye"/>
        <gave_blood choice="n">
            <karma action="didnt_give_blood"/>
            <redirect target="bye"/>
        </gave_blood>
        <gave_blood choice="y">
            <damage player="1" pts="100"/>
            <karma action="gave_blood"/>
            Thou art a great help. We are in dire need! <redirect target="bye"/>
        </gave_blood>

        <more_help>
            <unset_context/>
            {healer} asks: Do you need more help? <input type="choice" options="yn" target="show_services"/>
        </more_help>

        <show_services default="true" redirect="give_blood"/>
        <show_services choice="y">
            {healer} says: We can perform:
            {show_inventory:show_item}
            Your need: <input type="choice" options="{inventory_choices}" target="who_needs"/>
        </show_services>

        <show_item>{toupper({choice})}-{name}</show_item>

        <who_needs choice="null" redirect="give_blood"/>
        <who_needs>
            <context name="service"/>
            <var name="service" value="{$choice}"/>
            <var name="choice" value="1"/>

            <if test="{party:members}==1" redirect="will_pay"/>
            {healer} asks:
            Who is in
            need? <input name="choice" type="player" target="will_pay"/>
        </who_needs>

        <will_pay choice="null">
            No one? <redirect target="more_help"/>
        </will_pay>

        <will_pay>
            <var name="player" value="{$choice}"/>
            <if test="!{party:member{$player}:needs:{type}}">
                <include script="dont_need" choice="{$service}"/>
                <redirect target="more_help"/>
            </if>
            {desc} will cost thee {price}gp.
            <if test="{party:gold}&lt;{price}">
                I see by thy purse that thou hast not enough gold. I cannot aid thee. <redirect target="more_help"/>
            </if>
            Wilt thou
            pay? <input type="choice" options="yn" target="heal"/>
        </will_pay>

        <heal default="true" redirect="more_help"/>
        <heal choice="y">
            <pay price="{price}" quantity="1"/>
            <cast_spell/>
            <heal type="{type}" player="{$player}"/>
            <redirect target="more_help"/>
        </heal>

        <dont_need choice="a">
            Thou suffers not from Poison!</dont_need>
        <dont_need choice="b">
            Thou art already quite healthy!</dont_need>
        <dont_need choice="c">
            Thou art not dead fool!</dont_need>
        <vendor id="Britannia" name="The Royal Healer" healer="Pendragon">
            <service choice="a" name="Curing" desc="A curing" price="100" type="cure"/>
            <service choice="b" name="Healing" desc="A healing" price="200" type="fullheal"/>
            <service choice="c" name="Resurrection" desc="Resurrection" price="300" type="resurrect"/>
        </vendor>

        <vendor id="Moonglow" name="The Healer" healer="Harmony">
            <service choice="a" name="Curing" desc="A curing" price="100" type="cure"/>
            <service choice="b" name="Healing" desc="A healing" price="200" type="fullheal"/>
            <service choice="c" name="Resurrection" desc="Resurrection" price="300" type="resurrect"/>
        </vendor>

        <vendor id="Britain" name="Wound Healing" healer="Celest">
            <service choice="a" name="Curing" desc="A curing" price="100" type="cure"/>
            <service choice="b" name="Healing" desc="A healing" price="200" type="fullheal"/>
            <service choice="c" name="Resurrection" desc="Resurrection" price="300" type="resurrect"/>
        </vendor>

        <vendor id="Jhelom" name="Heal and Health" healer="Triplet">
            <service choice="a" name="Curing" desc="A curing" price="100" type="cure"/>
            <service choice="b" name="Healing" desc="A healing" price="200" type="fullheal"/>
            <service choice="c" name="Resurrection" desc="Resurrection" price="300" type="resurrect"/>
        </vendor>

        <vendor id="Yew" name="Just Healing" healer="Justin">
            <service choice="a" name="Curing" desc="A curing" price="100" type="cure"/>
            <service choice="b" name="Healing" desc="A healing" price="200" type="fullheal"/>
            <service choice="c" name="Resurrection" desc="Resurrection" price="300" type="resurrect"/>
        </vendor>

        <vendor id="Skara Brae" name="The Mystic Heal" healer="Spiran">
            <service choice="a" name="Curing" desc="A curing" price="100" type="cure"/>
            <service choice="b" name="Healing" desc="A healing" price="200" type="fullheal"/>
            <service choice="c" name="Resurrection" desc="Resurrection" price="300" type="resurrect"/>
        </vendor>

        <vendor id="Lycaeum" name="The Truth Healer" healer="Starfire">
            <service choice="a" name="Curing" desc="A curing" price="100" type="cure"/>
            <service choice="b" name="Healing" desc="A healing" price="200" type="fullheal"/>
            <service choice="c" name="Resurrection" desc="Resurrection" price="300" type="resurrect"/>
        </vendor>

        <vendor id="Empath Abbey" name="The Love Healer" healer="Salle'">
            <service choice="a" name="Curing" desc="A curing" price="100" type="cure"/>
            <service choice="b" name="Healing" desc="A healing" price="200" type="fullheal"/>
            <service choice="c" name="Resurrection" desc="Resurrection" price="300" type="resurrect"/>
        </vendor>

        <vendor id="Serpents Hold" name="The Courage Healer" healer="Windwalker">
            <service choice="a" name="Curing" desc="A curing" price="100" type="cure"/>
            <service choice="b" name="Healing" desc="A healing" price="200" type="fullheal"/>
            <service choice="c" name="Resurrection" desc="Resurrection" price="300" type="resurrect"/>
        </vendor>

        <vendor id="Cove" name="The Healer Shop" healer="Quat">
            <service choice="a" name="Curing" desc="A curing" price="100" type="cure"/>
            <service choice="b" name="Healing" desc="A healing" price="200" type="fullheal"/>
            <service choice="c" name="Resurrection" desc="Resurrection" price="300" type="resurrect"/>
        </vendor>

    </script>

    <!--
    /**
     * Inns
     */
    -->
    <script id="Inn" noun="room">
        <intro>
            <music type="shopping"/>
            The Innkeeper says: <if test="{party:transport}=horse" redirect="nohorse"/>Welcome to {name}

            I am {innkeeper}.

            Are you in need of lodging?<input type="choice" options="yn" target="ask"/>
        </intro>

        <end>
            <music reset="true"/>
        </end>

        <bye>
            {innkeeper} says: Then you have come to the wrong place!
            Good day.
            <end/>
        </bye>
        <nohorse>Get that horse out of here!!!
            <end/>
        </nohorse>
        <ask default="true" redirect="bye"/>
        <ask choice="n" redirect="bye"/>
        <rent default="true" redirect="no_better_deal"/>
        <rent choice="y" redirect="stay"/>
        <rent choice="1" redirect="stay"/>
        <rent choice="2" redirect="stay"/>
        <rent choice="3" redirect="stay"/>

        <no_better_deal>
            You won't find a better deal in this towne!
            <end/>
        </no_better_deal>
        <stay>
            <context name="room"/>
            <pay price="{price}" quantity="1" cantpay="cantpay"/>
            <cursor enable="false"/>
            Very good. Have
            a pleasant night.
            <move x="{x}" y="{y}"/>
            <random chance="25%">
                <wait msecs="1000"/>
                Oh, and don't mind the strange noises, it's only rats!
            </random>
            <sleep/>
            <end/>
        </stay>
        <cantpay>
            If you can't pay, you can't stay! Good Bye.
            <end/>
        </cantpay>

        <!-- Moonglow -->
        <vendor id="Moonglow" name="The Honest Inn" innkeeper="Scatu">
            <room choice="y" price="20" x="28" y="6"/>
            <ask choice="y">
                We have a room with 2 beds that rents for 20gp.

                Take it? <input type="choice" options="yn" target="rent"/>
            </ask>
        </vendor>

        <!-- Britain -->
        <vendor id="Britain" name="Britannia Manor" innkeeper="Jason">
            <room choice="y" price="15" x="29" y="6"/>
            <ask choice="y">
                We have a modest sized room with 1 bed for 15 gp.

                Take it? <input type="choice" options="yn" target="rent"/>
            </ask>
        </vendor>

        <!-- Jhelom -->
        <vendor id="Jhelom" name="The Inn of Ends" innkeeper="Smirk">
            <room choice="y" price="10" x="10" y="26"/>
            <ask choice="y">
                We have a very secure room of modest size and 1 bed for 10gp.

                Take it? <input type="choice" options="yn" target="rent"/>
            </ask>
        </vendor>

        <!-- Minoc -->
        <vendor id="Minoc" name="Wayfarer's Inn" innkeeper="Estro" rooms="3">
            <room choice="1" price="30" x="2" y="6"/>
            <room choice="2" price="60" x="2" y="2"/>
            <room choice="3" price="90" x="8" y="2"/>
            <ask choice="y">
                We have three rooms available,
                a 1, 2 and 3 bed room for 30, 60
                and 90 gp each.
                1, 2 or 3
                beds? <input type="choice" options="0123" target="rent"/>
            </ask>
        </vendor>

        <!-- Trinsic -->
        <vendor id="Trinsic" name="Honorable Inn" innkeeper="Zajac">
            <room choice="y" price="15" x="29" y="2"/>
            <ask choice="y">
                We have a single bed room with a back door for 15gp.

                Take it? <input type="choice" options="yn" target="rent"/>
            </ask>
        </vendor>

        <!-- Skara Brae -->
        <vendor id="Skara Brae" name="The Inn of the Spirits" innkeeper="Tyrone">
            <room choice="y" price="5" x="28" y="11"/>
            <ask choice="y">
                Unfortunately, I have but only a very small room with 1 bed:
                worse yet, it's haunted! If you do wish to stay it costs 5gp.

                Take it? <input type="choice" options="yn" target="rent"/>
            </ask>
        </vendor>

        <!-- Vesper -->
        <vendor id="Vesper" name="The Sleep Shop" innkeeper="Tymus">
            <room choice="y" price="1" x="25" y="23"/>
            <ask choice="y">
                All we have is that cot over there. But it is comfortable, and only 1 gp.

                Take it? <input type="choice" options="yn" target="rent"/>
            </ask>
        </vendor>
    </script>

    <!--
    /**
     * Guild
     */
    -->
    <script id="Guild" noun="item">
        <intro>
            <music type="shopping"/>
            <ztats screen="equipment"/>
            Avast ye mate! Shure ye wishes to buy from ol'
            {owner}?

            {owner} says: Welcome to {name}.
            Like to see my goods? <input type="choice" options="yn" target="show_goods"/>
        </intro>

        <end>
            <music reset="true"/>
            <ztats screen="party"/>
        </end>

        <bye>
            <unset_context/>
            {owner} says: See ya matie!
            <end/>
        </bye>

        <show_goods default="true" redirect="bye"/>
        <show_goods choice="y">
            {owner} says: Good Mate!
            Ya see I gots:
            {show_inventory:show_item}
            Wat'l it be? <input type="choice" options="{inventory_choices}" target="tell_about"/>
        </show_goods>

        <show_item>{toupper({choice})}-{name}</show_item>

        <tell_about default="true" redirect="bye"/>
        <tell_about choice="a">
            <context name="item"/>
            I can give ya {quant} long lasting Torches for a mere {price}gp.<redirect target="will_buy"/>
        </tell_about>
        <tell_about choice="b">
            <context name="item"/>
            I've got magical mapping Gems, {quant} for only {price}gp.<redirect target="will_buy"/>
        </tell_about>
        <tell_about choice="c">
            <context name="item"/>
            Magical Keys, 1 use each, a fair price at {price}gp for {quant}.<redirect target="will_buy"/>
        </tell_about>
        <tell_about choice="d">
            <context name="item"/>
            So...Ya want a Sextant...Well I gots one which I might part with fer {price} gold!<redirect target="will_buy"/>
        </tell_about>

        <will_buy>
            <var name="item" value="{$choice}"/>
            Will ya buy? <input type="choice" options="yn" target="buy_item"/>
        </will_buy>

        <buy_item default="true" choice="n">
            Hmmm...Grmbl...<redirect target="bye"/>
        </buy_item>
        <buy_item choice="y">
            <redirect target="buy" choice="{$item}"/>
        </buy_item>

        <buy>
            <pay price="{price}" quantity="1" cantpay="cantpay"/>
            Fine... fine...
            <add type="{type}" quantity="{quant}"/>
            <redirect target="see_more"/>
        </buy>
        <cantpay>
            What? Can't pay! Buzz off swine!
            <end/>
        </cantpay>

        <see_more>
            <unset_context/>
            {owner} says: See
            more? <input type="choice" options="yn" target="show_goods"/>
        </see_more>

        <vendor id="Vesper" name="The Guild Shop" owner="Long John Leary">
            <item choice="a" name="Torches" price="50" quant="5" type="torch"/>
            <item choice="b" name="Magic Gems" price="60" quant="5" type="gem"/>
            <item choice="c" name="Magic Keys" price="60" quant="6" type="key"/>
            <item choice="d" hidden="true" name="Sextant" price="900" quant="1" type="sextant"/>
        </vendor>

        <vendor id="Buccaneers Den" name="Pirate's Guild" owner="One Eyed Willey">
            <item choice="a" name="Torches" price="50" quant="5" type="torch"/>
            <item choice="b" name="Magic Gems" price="60" quant="5" type="gem"/>
            <item choice="c" name="Magic Keys" price="60" quant="6" type="key"/>
            <item choice="d" hidden="true" name="Sextant" price="900" quant="1" type="sextant"/>
        </vendor>
    </script>

    <!--
    /**
     * Stable
     */
    -->
    <script id="Stable">
        <intro>
            <music type="shopping"/>
            Welcome friend!
            Can I interest thee in
            horses? <input type="choice" options="yn" target="ask"/>
        </intro>

        <end>
            <music reset="true"/>
        </end>

        <bye>
            A shame, thou looks like thou could use a good horse!
            <end/>
        </bye>

        <ask default="true" redirect="bye"/>
        <ask choice="y">
            For only {price}g.p.
            Thou can have the best! Wilt thou buy? <input type="choice" options="yn" target="buy"/>
        </ask>

        <buy default="true" redirect="bye"/>
        <buy choice="y">
            <pay price="{price}" quantity="1" cantpay="cantpay"/>
            <add type="horse"/>
            Here, a better breed thou shalt not find ever!
            <end/>
        </buy>

        <cantpay>
            It seems thou hast not gold enough to pay!
            <end/>
        </cantpay>

        <vendor id="Paws" price="{math({party:members}*100)}"/>
    </script>

</scripts>