Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions scripts_src/abbey/abbilbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/* Include Files */
#define SCRIPT_REALNAME "abbilbox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_ABBILBOX

Expand Down Expand Up @@ -79,12 +80,8 @@ procedure map_enter_p_proc begin
set_local_var(LVAR_Trapped,TRAPPED_STATUS);
end

if (((game_time) < 0) and (local_var(LVAR_Restock_Time_Fix) == 0)) then begin
set_local_var(LVAR_Restock_Time, game_time - 1);
set_local_var(LVAR_Restock_Time_Fix, 1);
end

if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOTTLE_CAPS, 150, 225, 100)
check_restock_item(PID_LEATHER_ARMOR, 1, 1, 100)
check_restock_item(PID_HEALING_POWDER, 2, 4, 100)
Expand All @@ -102,6 +99,7 @@ procedure map_enter_p_proc begin
check_restock_item(PID_FIRST_AID_KIT, 0, 1, 100)
check_restock_item(PID_SPEAR, 1, 1, 100)
check_restock_item(PID_FLARE, 1, 3, 100)
call restore_critical_items(tmp_box);
set_local_var(LVAR_Restock_Time, (10 * ONE_GAME_DAY) + game_time);
end

Expand Down
4 changes: 2 additions & 2 deletions scripts_src/brokhill/hidocbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define SCRIPT_REALNAME "hidocbox"
#include "../headers/define.h"
#include "../headers/broken1.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_HIDOCBOX

Expand Down Expand Up @@ -53,8 +54,7 @@ procedure map_enter_p_proc begin

broken_hills_doc_box := self_obj;
if (is_loading_game == false) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOTTLE_CAPS, 200, 750, 100)
check_restock_item(PID_FIRST_AID_KIT, 0, 1, 25)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/brokhill/hijacbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define SCRIPT_REALNAME "hijacbox"
#include "../headers/define.h"
#include "../headers/broken1.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_HIJACBOX

Expand All @@ -46,8 +47,7 @@ end
procedure map_enter_p_proc begin
broken_hills_jacob_box := self_obj;
if (is_loading_game == false) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOTTLE_CAPS, 200, 1250, 100)
check_restock_item(PID_BUFFOUT, 0, 3, 25)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/brokhill/hilbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define SCRIPT_REALNAME "hilbox"
#include "../headers/define.h"
#include "../headers/broken1.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_HILBOX

Expand All @@ -48,8 +49,7 @@ procedure map_enter_p_proc begin
broken_hills_liz_box := self_obj;
if (is_loading_game == false) then begin
if (map_var(MVAR_Liz_Dead) == 0) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOTTLE_CAPS, 100, 300, 100)
check_restock_item(PID_ROPE, 1, 5, 100)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/brokhill/hioutbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define SCRIPT_REALNAME "hioutbox"
#include "../headers/define.h"
#include "../headers/broken1.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_HIOUTBOX

Expand All @@ -46,8 +47,7 @@ end
procedure map_enter_p_proc begin
broken_hills_outfitter_box := self_obj;
if (is_loading_game == false) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOTTLE_CAPS, 100, 500, 100)
check_restock_item(PID_223_FMJ, 0, 3, 25)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/den/dcdealer.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "../headers/define.h"
#include "../headers/den.h"
#include "../headers/denres1.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_DCDEALER

Expand Down Expand Up @@ -147,8 +148,7 @@ procedure map_enter_p_proc begin
dealer := 1;

if (dealer and is_loading_game == false) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
check_restock_item(PID_JET, 2, 5, 100)
check_restock_item(PID_BUFFOUT, 0, 1, 100)
check_restock_item(PID_STIMPAK, 2, 3, 100)
Expand Down
6 changes: 3 additions & 3 deletions scripts_src/den/diflibox.ssl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 1998-2003 Interplay Entertainment Corp. All rights reserved.
Copyright 1998-2003 Interplay Entertainment Corp. All rights reserved.
*/

/*
Expand All @@ -18,6 +18,7 @@
/* Include Files */
#define SCRIPT_REALNAME "diflibox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_DIFLIBOX

Expand All @@ -40,8 +41,7 @@ procedure map_enter_p_proc begin
/* Set up the door state when the player first enters the map */
den_flick_box_obj := self_obj;
if (is_loading_game == false) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
self_caps_adjust(random(55, 61) - self_caps);
check_restock_item(PID_JET, 0, 1, 100)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/den/diflkbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/* Include Files */
#define SCRIPT_REALNAME "diflkbox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_DIFLKBOX

Expand Down Expand Up @@ -62,8 +63,7 @@ procedure map_enter_p_proc begin
set_local_var(LVAR_Trapped,TRAPPED_STATUS);
end

restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOTTLE_CAPS, 148, 3512, 100)
check_restock_item(PID_LEATHER_ARMOR, 1, 1, 80)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/den/dimetbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/* Include Files */
#define SCRIPT_REALNAME "dimetbox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_DIMETBOX

Expand Down Expand Up @@ -46,8 +47,7 @@ procedure map_enter_p_proc begin
/* Set up the door state when the player first enters the map */
den_metzger_box_obj := self_obj;
if (is_loading_game == false) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
if (gave_metzger_party_stuff) then begin
off_gave_metzger_party_stuff;
the_box_to_kill := create_object(PID_FOOTLOCKER_CLEAN_RIGHT, 0, 0);
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/den/dimombox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/* Include Files */
#define SCRIPT_REALNAME "dimombox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_DIMOMBOX

Expand All @@ -39,8 +40,7 @@ procedure map_enter_p_proc begin
/* Set up the door state when the player first enters the map */
den_mom_box_obj := self_obj;
if (is_loading_game == false) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
self_caps_adjust(random(110, 125) - self_caps);
check_restock_item(PID_STIMPAK, 0, 2, 90)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/den/dismibox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/* Include Files */
#define SCRIPT_REALNAME "dismibox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_DISMIBOX

Expand All @@ -38,8 +39,7 @@ procedure map_enter_p_proc begin
/* Set up the door state when the player first enters the map */
den_smitty_box_obj := self_obj;
if (is_loading_game == false) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOX_OF_NOODLES, 0, 1, 100)
check_restock_item(PID_BEER, 0, 6, 100)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/den/ditubbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/* Include Files */
#define SCRIPT_REALNAME "ditubbox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_DITUBBOX

Expand All @@ -39,8 +40,7 @@ procedure map_enter_p_proc begin
/* Set up the door state when the player first enters the map */
den_tubby_box_obj := self_obj;
if (is_loading_game == false) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
self_caps_adjust(random(151, 161) - self_caps);
check_restock_item(PID_JET, 5, 10, 100)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/gecko/giperbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/* Include Files */
#define SCRIPT_REALNAME "giperbox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_GIPERBOX

Expand All @@ -44,8 +45,7 @@ end
procedure map_enter_p_proc begin
gecko_percy_box := self_obj;
if (is_loading_game == false) then begin
restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOTTLE_CAPS, 500, 1000, 100)
check_restock_item(PID_RAD_X, 0, 1, 100)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/generic/zinuke.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/* Include Files */
#define SCRIPT_REALNAME "zinuke"
#include "../headers/define.h"
#include "../sfall/lib.math.h"

#define NAME SCRIPT_ZINUKE
#define CUR_COMP_SCRIPT SCRIPT_ZINUKE
Expand Down Expand Up @@ -218,8 +219,7 @@ end
***************************************************************************************/

procedure map_enter_p_proc begin
restock_fix
if (game_time > local_var(LVAR_Restock_Time)) then begin
if (unsigned_int_compare(game_time, local_var(LVAR_Restock_Time)) > 0) then begin
if (local_var(LVAR_Stock) < MAX_STOCK) then
set_local_var(LVAR_Stock, Random(MAX_STOCK / 2, MAX_STOCK));

Expand Down
4 changes: 2 additions & 2 deletions scripts_src/klamath/kibbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/* Include Files */
#define SCRIPT_REALNAME "kibbox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"
#define NAME SCRIPT_KIBBOX
#include "../headers/command.h"

Expand Down Expand Up @@ -59,8 +60,7 @@ procedure map_enter_p_proc begin
set_local_var(LVAR_Trapped,TRAPPED_STATUS);
end

restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOTTLE_CAPS, 150, 225, 100)
check_restock_item(PID_LEATHER_ARMOR, 1, 1, 100)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/klamath/kidbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/* Include Files */
#define SCRIPT_REALNAME "kidbox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"
#define NAME SCRIPT_KIDBOX
#include "../headers/command.h"
/* Defines and Macros */
Expand Down Expand Up @@ -61,8 +62,7 @@ procedure map_enter_p_proc begin
set_local_var(LVAR_Trapped,TRAPPED_STATUS);
end

restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOTTLE_CAPS, 65, 65, 100)
check_restock_item(PID_MEAT_JERKY, 45, 45, 100)
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/klamath/kisbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/* Include Files */
#define SCRIPT_REALNAME "kisbox"
#include "../headers/define.h"
#include "../sfall/lib.math.h"
#define NAME SCRIPT_KISBOX
#include "../headers/command.h"

Expand Down Expand Up @@ -60,8 +61,7 @@ procedure map_enter_p_proc begin
set_local_var(LVAR_Trapped,TRAPPED_STATUS);
end

restock_fix
if (local_var(LVAR_Restock_Time) < game_time) then begin
if (unsigned_int_compare(local_var(LVAR_Restock_Time), game_time) < 0) then begin
variable tmp_box := move_quest_items();
check_restock_item(PID_BOTTLE_CAPS, 125, 250, 100)
check_restock_item(PID_LEATHER_JACKET, 1, 1, 100)
Expand Down
Loading