/*
        Script name: 	TOXBOT.ssl
        Location:	Toxic Caves Secret Base
	Description:	Security bot
        Created: 	July 4th 2004
	 By		ColJack
	Updated:

*/

/* Include Files */

#include "..\headers\define.h"

#define NAME                    SCRIPT_TOXBOT

#include "..\headers\command.h"

/* Standard Script Procedures */
procedure start;
procedure critter_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure damage_p_proc;
procedure map_enter_p_proc;

/* Local variables which do not need to be saved between map changes. */

procedure start begin
end

procedure critter_p_proc begin
   if (global_var ( GVAR_TOXIC_SECURITY ) == 1) then begin              // power on
     if (obj_can_see_obj(self_obj,dude_obj)) then begin
       attack(dude_obj);
     end
   end
end

procedure destroy_p_proc begin
end

procedure damage_p_proc begin
   if (global_var( GVAR_TOXIC_POWER ) == 1) then begin              // power on
     attack(dude_obj);
   end
end

procedure look_at_p_proc begin
   script_overrides;
   display_msg(mstr(100));
end

procedure description_p_proc begin
   script_overrides;
   display_msg(mstr(101));
end

procedure use_skill_on_p_proc begin
   script_overrides;
end

procedure map_enter_p_proc begin
   critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_TEAM_NUM,TEAM_SIERRA_BASE);
end