From 16659723f9589d0ea31746d594907a7a62bead7c Mon Sep 17 00:00:00 2001 From: meko Date: Fri, 3 Apr 2015 19:52:42 -0400 Subject: Update chest.txt the chest always said you won the first item of the array (bull helm or steel shield) --- world/map/npc/052-2/chest.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/world/map/npc/052-2/chest.txt b/world/map/npc/052-2/chest.txt index 1551d171..03b08b82 100644 --- a/world/map/npc/052-2/chest.txt +++ b/world/map/npc/052-2/chest.txt @@ -60,12 +60,13 @@ L_GetCommonReward: if (@illia_current_num_rewards == $@illia_num_common_reward_items) goto L_RewardDone; getinventorylist; - set @reward$, $@illia_common_rewards$[rand(getarraysize($@illia_common_rewards$))]; + set @index, rand(getarraysize($@illia_common_rewards$)); + set @reward$, $@illia_common_rewards$[@index]; if ((checkweight(@reward$, 1) == 0) || (@inventorylist_count == 100)) goto L_InventoryNoSpace; set @illia_current_num_rewards, @illia_current_num_rewards + 1; getitem @reward$, 1; - mes "You found a " + $@illia_common_rewards_n$ + "!"; + mes "You found a " + $@illia_common_rewards_n$[@index] + "!"; set @reward$, ""; goto L_GetCommonReward; @@ -75,7 +76,8 @@ L_GetUniqueReward: if (Illia_Uniques_Count >= 2) goto L_GetUniqueReward2; getinventorylist; - set @reward$, $@illia_unique_rewards$[rand(getarraysize($@illia_unique_rewards$))]; + set @index, rand(getarraysize($@illia_unique_rewards$)); + set @reward$, $@illia_unique_rewards$[@index]; if ((checkweight(@reward$, 1) == 0) || (@inventorylist_count == 100)) goto L_InventoryNoSpace; next; @@ -83,7 +85,7 @@ L_GetUniqueReward: next; set @illia_current_num_rewards, @illia_current_num_rewards + 1; getitem @reward$, 1; - mes "You found a " + $@illia_unique_rewards_n$ + "!"; + mes "You found a " + $@illia_unique_rewards_n$[@index] + "!"; set Illia_Uniques_Count, Illia_Uniques_Count + 1; set @reward$, ""; goto L_GetUniqueReward; -- cgit v1.2.3-60-g2f50