#include <define.h>

//#define NAME                    SCRIPT_

#include <command.h>
//#include <ModReact.h>



procedure start;
#include <push.h>
procedure description_p_proc;
procedure use_p_proc;
procedure use_skill_on_p_proc;


procedure start
begin
	if (script_action == description_proc) then begin
		call description_p_proc;
	end
	else begin
		if (script_action == use_proc) then begin
			call use_p_proc;
		end
		else begin
			if (script_action == use_skill_on_proc) then begin
				call use_skill_on_p_proc;
			end
		end
	end
end

procedure description_p_proc
begin
	script_overrides;
	display_msg(message_str(SCRIPT_CORECOMP, 100));
end

procedure use_p_proc
begin
	script_overrides;
	display_msg(message_str(SCRIPT_VALTCOMP, 100));
end

procedure use_skill_on_p_proc
begin
	if (action_being_used == 12) then begin
		script_overrides;
		if (is_success(roll_vs_skill(dude_obj, action_being_used, 0))) then begin
			if ((game_time / (10 * 60 * 60 * 24)) >= 90) then begin
				display_msg(message_str(SCRIPT_CORECOMP, 101));
			end
			else begin
				display_msg(message_str(SCRIPT_CORECOMP, 102));
			end
		end
		else begin
			display_msg(message_str(SCRIPT_CORECOMP, 103));
		end
	end
end