class 2 royal_req_next_maker : royal_rush_maker
{
parameter:
	string	next_maker_name = "";
	int	req_count = 0;
	int	BossMaker = 0;

handler:
	EventHandler ON_NPC_DELETED(deleted_def,deleted_npc,i0,i1,maker0)
	{
		if( BossMaker == 1 )
		{
			i0 = myself::DecreaseTotal(1);
			deleted_def::DecCount(1);
			if( deleted_npc.sm.npc_class_id == 1010339 || deleted_npc.sm.npc_class_id == 1010342 || deleted_npc.sm.npc_class_id == 1010346 || deleted_npc.sm.npc_class_id == 1010349 )
			{
				maker0 = gg::GetNpcMaker(next_maker_name);
				if( gg::IsNull(maker0) == 0 )
				{
					gg::SendMakerScriptEvent(maker0,1002,0,0);
				}
			}
		}
		else
		{
			i0 = myself::DecreaseTotal(1);
			deleted_def::DecCount(1);
			if( i0 == req_count )
			{
				i1 = gg::GetDateTime(0,4);
				if( i1 >= 0 && i1 <= 50 )
				{
					maker0 = gg::GetNpcMaker(next_maker_name);
					if( gg::IsNull(maker0) == 0 )
					{
						gg::SendMakerScriptEvent(maker0,1001,0,0);
					}
				}
			}
		}
	}

	EventHandler ON_SCRIPT_EVENT(script_event_arg1,script_event_arg2,script_event_arg3,def0,i0,i1)
	{
		super;
	}

}
