#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure destroy_p_proc;
procedure talk_p_proc;

variable initialized1;
variable Item;


procedure start
begin
	if (not(initialized1) and metarule(14, 0)) then begin
		critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_TEAM_NUM, 0);
		critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_AI_PACKET, AI_STRANGER);
		Item := create_object_sid(global_var(GVAR_WATER_THIEF_1), 0, 0, -1);
		add_obj_to_inven(self_obj, Item);
		float_msg(self_obj, message_str(SCRIPT_GENCHAT, 182 + random(0, 1)), FLOAT_MSG_NORMAL);
		initialized1 := 1;
	end
	else begin
		if (script_action == destroy_proc) then begin
			call destroy_p_proc;
		end
		else begin
			if (script_action == talk_proc) then begin
				call talk_p_proc;
			end
		end
	end
end

procedure destroy_p_proc
begin
	set_global_var(GVAR_STRANGER_STATUS, 1);
end

procedure talk_p_proc
begin
	float_msg(self_obj, message_str(SCRIPT_GENCHAT, 184 + random(0, 1)), FLOAT_MSG_NORMAL);
end