summaryrefslogtreecommitdiff
path: root/world/map
diff options
context:
space:
mode:
Diffstat (limited to 'world/map')
-rw-r--r--world/map/npc/052-2/chest.txt10
1 files 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;