summaryrefslogtreecommitdiff
path: root/npc/003-1/ishi.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/003-1/ishi.txt')
-rw-r--r--npc/003-1/ishi.txt93
1 files changed, 24 insertions, 69 deletions
diff --git a/npc/003-1/ishi.txt b/npc/003-1/ishi.txt
index be652f44d..48ed76a1a 100644
--- a/npc/003-1/ishi.txt
+++ b/npc/003-1/ishi.txt
@@ -54,81 +54,36 @@
if (@mpq_cost > 0)
mesc l("You can get up to @@ items.", (Mobpt/@mpq_cost));
- do
- {
- select
- rif(Mobpt >= @mpq_cost, "1"),
- rif(Mobpt >= (@mpq_cost)*2, "2"),
- rif(Mobpt >= (@mpq_cost)*3, "3"),
- rif(Mobpt >= (@mpq_cost)*4, "4"),
- rif(Mobpt >= (@mpq_cost)*5, "5"),
- rif(Mobpt >= (@mpq_cost)*6, "6"),
- rif(Mobpt >= (@mpq_cost)*7, "7"),
- rif(Mobpt >= (@mpq_cost)*8, "8"),
- rif(Mobpt >= (@mpq_cost)*9, "9"),
- rif(Mobpt >= (@mpq_cost)*10,"10"),
- rif(Mobpt >= (@mpq_cost)*11,l("Gimme as many as I deserve!")),
- l("Sorry, I have to go now.");
+ menuint
+ rif(Mobpt >= @mpq_cost, "1"), 1,
+ rif(Mobpt >= (@mpq_cost)*2, "2"), 2,
+ rif(Mobpt >= (@mpq_cost)*3, "3"), 3,
+ rif(Mobpt >= (@mpq_cost)*4, "4"), 4,
+ rif(Mobpt >= (@mpq_cost)*5, "5"), 5,
+ rif(Mobpt >= (@mpq_cost)*6, "6"), 6,
+ rif(Mobpt >= (@mpq_cost)*7, "7"), 7,
+ rif(Mobpt >= (@mpq_cost)*8, "8"), 8,
+ rif(Mobpt >= (@mpq_cost)*9, "9"), 9,
+ rif(Mobpt >= (@mpq_cost)*10,"10"), 10,
+ rif(Mobpt >= (@mpq_cost)*11,l("Gimme as many as I deserve!")), -1,
+ l("Sorry, I have to go now."), 0;
+
+ @var=@menuret;
+
+ // Special cases
+ if (@var < 1)
+ goto L_Give_all;
+ if (!@var)
+ goto L_Close;
- switch (@menu)
- {
- case 1 :
- @var = 1;
- goto L_Items;
- break;
- case 2 :
- @var = 2;
- goto L_Items;
- break;
- case 3 :
- @var = 3;
- goto L_Items;
- break;
- case 4 :
- @var = 4;
- goto L_Items;
- break;
- case 5 :
- @var = 5;
- goto L_Items;
- break;
- case 6 :
- @var = 6;
- goto L_Items;
- break;
- case 7 :
- @var = 7;
- goto L_Items;
- break;
- case 8 :
- @var = 8;
- goto L_Items;
- break;
- case 9 :
- @var = 9;
- goto L_Items;
- break;
- case 10 :
- @var = 10;
- goto L_Items;
- break;
- case 11 :
- goto L_Give_all;
- break;
- default :
- goto L_Close;
- break;
- }
- } while (@menu != 12);
+ goto L_Items;
+L_Close:
+ @var=0;
closedialog;
goodbye;
close;
-L_Close:
- @var =0;
- close;
-
L_Items:
//debugmes "Reaching item loop";
for (.@i = 0; .@i < @var; .@i ++)