class 1 warrior_gather_npc : warrior
{
parameter:

handler:
	EventHandler CREATED()
	{
		if( gg::Rand(100) < 10 )
		{
			myself::AddTimerEx(2000,60000);
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id)
	{
		if( timer_id == 2000 )
		{
			myself::BroadcastScriptEvent(10003,myself::GetIndexFromCreature(myself.sm),300);
			myself::AddTimerEx(2000,60000);
		}
		super;
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,c0)
	{
		if( script_event_arg1 == 10003 && myself.p_state != 3 )
		{
			c0 = myself::GetCreatureFromIndex(script_event_arg2);
			if( myself::IsNullCreature(c0) == 0 && c0 != myself.sm )
			{
				myself::AddMoveToDesire(myself::FloatToInt(c0.x),myself::FloatToInt(c0.y),myself::FloatToInt(c0.z),1000);
			}
		}
	}

}
