2222/* Include Files */
2323#define SCRIPT_REALNAME "abbilbox"
2424#include "../headers/define.h"
25+ #include "../sfall/lib.math.h"
2526
2627#define NAME SCRIPT_ABBILBOX
2728
@@ -79,12 +80,8 @@ procedure map_enter_p_proc begin
7980 set_local_var(LVAR_Trapped,TRAPPED_STATUS);
8081 end
8182
82- if (((game_time) < 0) and (local_var(LVAR_Restock_Time_Fix) == 0)) then begin
83- set_local_var(LVAR_Restock_Time, game_time - 1);
84- set_local_var(LVAR_Restock_Time_Fix, 1);
85- end
86-
87- if (local_var(LVAR_Restock_Time) < game_time) then begin
83+ if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
84+ variable tmp_box := move_quest_items();
8885 check_restock_item(PID_BOTTLE_CAPS, 150, 225, 100)
8986 check_restock_item(PID_LEATHER_ARMOR, 1, 1, 100)
9087 check_restock_item(PID_HEALING_POWDER, 2, 4, 100)
@@ -102,6 +99,7 @@ procedure map_enter_p_proc begin
10299 check_restock_item(PID_FIRST_AID_KIT, 0, 1, 100)
103100 check_restock_item(PID_SPEAR, 1, 1, 100)
104101 check_restock_item(PID_FLARE, 1, 3, 100)
102+ call restore_critical_items(tmp_box);
105103 set_local_var(LVAR_Restock_Time, (10 * ONE_GAME_DAY) + game_time);
106104 end
107105
0 commit comments