summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/000-2-1/alige.txt39
1 files changed, 11 insertions, 28 deletions
diff --git a/npc/000-2-1/alige.txt b/npc/000-2-1/alige.txt
index 5d7f7f64..6e53a6af 100644
--- a/npc/000-2-1/alige.txt
+++ b/npc/000-2-1/alige.txt
@@ -92,34 +92,17 @@
goto l_GiveFood;
l_GiveFood:
-
- getinventorylist;
-
- set @i, 0;
- set @j, 0;
-
- makemenuloop:
-
- set @id, @inventorylist_id[@i];
-
- if ( (500 >= @id) || (@id >= 700) ) goto makemenunext;
-
- set @menureference[@j], @id;
- set @menulist$[@j], getitemname(@id);
- set @j, @j+1;
-
- makemenunext:
-
- set @i, @i+1;
- if (@i <= inventorylist_count)
- goto makemenuloop;
-
- set @menulist$[@j], l("I don't have anything good for you today.");
- set @menureference[@j], -1;
-
- menu @menulist$[0],-,@menulist$[1],-,....@menulist$[150],-;
-
- set @id, @menureference[@menu-1];
+
+ menu
+ rif(countitem(502, 1), l(getitemname(502))), 502,
+ rif(countitem(503, 1), l(getitemname(503))), 503,
+ rif(countitem(504, 1), l(getitemname(504))), 504,
+ rif(countitem(505, 1), l(getitemname(505))), 505,
+ rif(countitem(506, 1), l(getitemname(506))), 506,
+ rif(countitem(507, 1), l(getitemname(507))), 507,
+ l("I don't have anything good for you today."), -1;
+
+ set @id, @menuret;
if (@id == -1) goto l_DamnYou;
if ( (@id == 502) || (@id == 504) || (@id == 505) ) goto l_GiveReward;
if (@id == 507) goto l_NoMore;