From 4b353e978cccec57dc4bc1a065c86642dd6d936d Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 25 Jan 2009 14:47:52 +0000 Subject: Fix bugs in the injured mouboo's script --- npc/012-1_Woodland_Hills/injured-mouboo.txt | 42 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 22 deletions(-) (limited to 'npc/012-1_Woodland_Hills/injured-mouboo.txt') diff --git a/npc/012-1_Woodland_Hills/injured-mouboo.txt b/npc/012-1_Woodland_Hills/injured-mouboo.txt index 0c32aaf3..efa68ad5 100644 --- a/npc/012-1_Woodland_Hills/injured-mouboo.txt +++ b/npc/012-1_Woodland_Hills/injured-mouboo.txt @@ -102,9 +102,9 @@ L_give: setarray @items$, "CactusDrink", "CactusPotion", "ChocolateBar", "Milk", "OrangeCupcake", "Apple", "Beer", "BottleOfWater", "TinyHealingPotion", "SmallHealingPotion", "MediumHealingPotion", "LargeHealingPotion"; setarray @itemeat, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0; - setarray @choice$, "", "", "", "", "", "", "", "", "", "", "", ""; + setarray @menuItems$, "", "", "", "", "", "", "", "", "", "", "", ""; set @choices_nr, 0; - setarray @choice_idx, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; + setarray @menuNames$, "", "", "", "", "", "", "", "", "", "", "", ""; setarray @choice_eat, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; set @n, 0; @@ -114,9 +114,9 @@ L_nloop: if (countitem(@k$) == 0) goto L_nloop_skip; - set @name$, getitemname(@k); - set @choice$[@ct], @name$; - set @choice_idx$[@ct], @k$; + set @name$, getitemname(@k$); + set @menuItems$[@ct], @name$; + set @menuNames$[@ct], @k$; set @choice_eat[@ct], @itemeat[@n]; set @ct, @ct + 1; @@ -126,34 +126,32 @@ L_nloop_skip: if (@n < @items_nr) goto L_nloop; - menu @choice$[0], -, - @choice$[1], -, - @choice$[2], -, - @choice$[3], -, - @choice$[4], -, - @choice$[5], -, - @choice$[6], -, - @choice$[7], -, - @choice$[8], -, - @choice$[9], -, - @choice$[10], -, - @choice$[11], -; + menu @menuItems$[0], -, + @menuItems$[1], -, + @menuItems$[2], -, + @menuItems$[3], -, + @menuItems$[4], -, + @menuItems$[5], -, + @menuItems$[6], -, + @menuItems$[7], -, + @menuItems$[8], -, + @menuItems$[9], -, + @menuItems$[10], -, + @menuItems$[11], -; set @menu, @menu - 1; - set @choice$, @choice_idx[@menu]; - set @choice_e, @choice_eat[@menu]; + set @choice$, @menuNames$[@menu]; set @verb$, "drinks"; - if (@choice_e) + if (@choice_eat[@menu]) set @verb$, "eats"; - if (@choice$ && countitem(@choice$)) + if (@choice$ != "" && countitem(@choice$)) goto L_consume; goto L_menu; L_consume: mes "[Injured Mouboo]"; - mes "The mouboo " + @verb$ + " your " + getitemname(@choice$) + "."; delitem @choice$, 1; next; -- cgit v1.2.3-60-g2f50