Fallout Wiki
Advertisement
Fallout Wiki
Details
Type Source file
SCRIPTS.LST comment Gecko Coolant Control Panel
MSG file N/A
Transcript

/*
        Copyright 1998-2003 Interplay Entertainment Corp. All rights reserved.
*/
/*
        Name: Gecko Coolant Valve
        Location: GECKO
        Description: This is the valve that the player can shutdown to start a meltdown.
                     Also allows player to repair using the part.
        Log:
           Please note any changes that have been made to the file in Updated. Then comment
           the code which you have changed/altered/commented out. Please, do not delete any
           code which was written.
           Created: April 9, 1998
           Updated:
*/
/* Include Files */
/* Note, the Following Lines need to be in this order so that
   the script will be compilable. The define Name is referenced
   in a module from define.h and used in command.h. Please do
   not change the ordering.
        -rwh2 11/13/97
*/
#include "..\headers\define.h"
#define NAME SCRIPT_GSVALVE
#define TOWN_REP_VAR (GVAR_TOWN_REP_GECKO)
#define floater(x) float_msg(self_obj, message_str(NAME,x),FLOAT_MSG_RED)
#include "..\headers\command.h"
#include "..\headers\gecko.h"
#define Vault_Known (1) // Temp Until get command from Jesse
#define Visited_City (1) // Temp Until get command from Jesse
/* Standard Script Procedures */
procedure start;
procedure use_p_proc;
procedure use_obj_on_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure repair_it;
/* Script Specific Procedure Calls */
procedure Node999; // This Node is Always Ending
/* Local Variables which are saved. All Local Variables need to be
   prepended by LVAR_ */
#define LVAR_Valve_Status (0)
//#define LVAR_Center (13) //is Torr at center of map
//#define LVAR_Edge (14) //is Torr at edge
/* Imported variables from the Map scripts. These should only be
   pointers and variables that need not be saved. If a variable
   Needs to be saved, make it a map variable (MVAR_) */
/* Local variables which do not need to be saved between map changes. */
variable Only_Once:=0;
variable Tool;
variable repair_check;
variable skill_used;
variable item;
procedure Node999 begin
end
procedure start begin
end
/* This procedure will get called each time that the map is first entered. It will
   set up the Team number and AI packet for this critter. This will override the
   default from the prototype, and needs to be set in scripts. */
/*
procedure map_enter_p_proc begin
   Only_Once:=0;
end
procedure map_update_p_proc begin
end
procedure critter_p_proc begin
end
procedure damage_p_proc begin
end
procedure pickup_p_proc begin
end
*/
procedure use_p_proc begin
   //make a strength roll 3 times
   if (local_var(LVAR_Valve_Status) < 3) then begin
      if (stat_success(dude_obj, STAT_st, 0)) then begin
         set_local_var(LVAR_Valve_Status, local_var(LVAR_Valve_Status)+1);
         if (local_var(LVAR_Valve_Status) == 1) then
            display_msg(mstr(111));
         else if (local_var(LVAR_Valve_Status) == 2) then
            display_msg(mstr(112));
         else if (local_var(LVAR_Valve_Status) > 2) then begin
            set_global_var(GVAR_ENEMY_GECKO,1);
            set_global_var(GVAR_GECKO_MELTDOWN, 1); //start meltdown
            display_msg(mstr(113));
         end
      end
      else begin
         display_msg(mstr(110));
      end
   end
end
procedure use_obj_on_p_proc begin
   script_overrides;
   Tool:=obj_pid(obj_being_used_with);
   if (Tool == PID_HY_MAG_PART) then begin
   //make a repair roll
      call repair_it;
   end
end
/* Look_at_p_proc gets called any time that the player passes the cursor over any object.
   This should only hold the most cursory of glances for the player. */
procedure look_at_p_proc begin
   script_overrides;
   display_msg(mstr(100));
end
/* The player will see more indepth descriptions from this procedure. They are actively
   looking at the critter and want more information. Things like names can be added here
   if the critter is known to the player. */
procedure description_p_proc begin
   script_overrides;
   display_msg(mstr(101));
end
/* Any time a skill is used on a critter this call is made. This can be to give examinations
   for things like Doctor skill or messages for various other skills. */
procedure use_skill_on_p_proc begin
   script_overrides;
   skill_used:=action_being_used;
   if (skill_used == SKILL_REPAIR) then begin
      if (obj_is_carrying_obj_pid(dude_obj, PID_HY_MAG_PART)) then begin
         call repair_it;
      end
      else begin
         display_msg(mstr(120));
      end
   end
   else begin
      display_msg(mstr(121));
   end
end
procedure repair_it begin
   repair_check:=roll_vs_skill(dude_obj,SKILL_REPAIR,0);
   if (is_success(repair_check)) then begin
      item:=obj_carrying_pid_obj(dude_obj, PID_HY_MAG_PART);
      rm_obj_from_inven(dude_obj,item);
      set_global_var(GVAR_VAULT_GECKO_PLANT, PLANT_REPAIRED);
      set_global_var(GVAR_VAULT_PLANT_STATUS, PLANT_REPAIRED);
      display_msg(mstr(122));
      give_xp(EXP_REPAIR_REACTOR);
      GC_REP_ADJUST(30)
      inc_general_rep(REP_BONUS_GC_PLANT_REPAIRED);
   end
   else begin
      display_msg(mstr(123));
   end
end
//xxxxxxxxxxxxxxxxxxxx

Advertisement