#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>

variable rndx;
variable rndy;
variable critter_tile;


procedure start
begin
	critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_AI_PACKET, AI_DOG);
	if ((cur_map_index == MAP_SHADYW) or (cur_map_index == MAP_SHADYE)) then begin
		critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_TEAM_NUM, 2);
	end
	if (script_action == critter_proc) then begin
		rndy := random(1, 20);
		if (rndy == 1) then begin
			rndx := random(0, 5);
			critter_tile := tile_num_in_direction(tile_num(self_obj), rndx, 1);
			animate_move_obj_to_tile(self_obj, critter_tile, ANIMATE_WALK);
		end
		detach;
	end
end