class 2 on_timer_maker : default_maker
{
parameter:
	int	spawn_type = 0;
	int	l2_time = 0;

handler:
	EventHandler ON_START(i0,i1,def0)
	{
		i0 = gg::GetL2Time(0);
		i1 = gg::GetL2Time(1);
		if( i0 == l2_time && i1 == 0 )
		{
			if( spawn_type == 0 )
			{
				super;
			}
		}
		myself::AddTimerEx(3000,1000);
	}

	EventHandler ON_NPC_DELETED(deleted_def,i0,i1,maker0)
	{
		i0 = myself::DecreaseTotal(1);
		deleted_def::DecCount(1);
	}

	EventHandler ON_TIMER(timer_id,i0,i1,maker0)
	{
		if( timer_id == 3000 )
		{
			i0 = gg::GetL2Time(0);
			i1 = gg::GetL2Time(1);
			if( i0 == l2_time && i1 == 0 )
			{
				if( spawn_type == 0 )
				{
					if( gg::IsNull(maker0) == 0 )
					{
						gg::SendMakerScriptEvent(maker0,1001,0,0);
					}
				}
				else if( gg::IsNull(maker0) == 0 )
				{
					gg::SendMakerScriptEvent(maker0,1000,0,0);
				}
			}
			myself::AddTimerEx(3000,1000);
		}
	}

}
