#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure look_at_p_proc;
procedure use_obj_on_p_proc;
procedure use_skill_on_p_proc;


procedure start
begin
	if ((script_action == look_at_proc) or (script_action == description_proc)) then begin
		call look_at_p_proc;
	end
	else begin
		if (script_action == use_obj_on_proc) then begin
			call use_obj_on_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 look_at_p_proc
begin
	script_overrides;
	display_msg(message_str(SCRIPT_SSWELL, 100));
end

procedure use_obj_on_p_proc
begin
	if (obj_pid(obj_being_used_with) == 127) then begin
		script_overrides;
		display_msg(message_str(SCRIPT_SSWELL, 101));
	end
	else begin
		if (obj_pid(obj_being_used_with) == 41) then begin
			script_overrides;
			display_msg(message_str(SCRIPT_SSWELL, 103));
			item_caps_adjust(dude_obj, -1);
		end
	end
end

procedure use_skill_on_p_proc
begin
	if (action_being_used == 12) then begin
		script_overrides;
		display_msg(message_str(SCRIPT_SSWELL, 102));
	end
end