diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-06-01 21:36:28 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-06-01 21:36:28 -0300 |
commit | 767cc8a9df173c43bd76892e57a62a07f106e746 (patch) | |
tree | 58454822d932856c95496fc9d0ed431970e62e13 /npc/003-1 | |
parent | b5e054a319f3164627df38787feaacd86c07b591 (diff) | |
download | serverdata-767cc8a9df173c43bd76892e57a62a07f106e746.tar.gz serverdata-767cc8a9df173c43bd76892e57a62a07f106e746.tar.bz2 serverdata-767cc8a9df173c43bd76892e57a62a07f106e746.tar.xz serverdata-767cc8a9df173c43bd76892e57a62a07f106e746.zip |
Simplify Ishi, we're using goto() so we don't need some stuff
Diffstat (limited to 'npc/003-1')
-rw-r--r-- | npc/003-1/ishi.txt | 93 |
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 ++) |