class 2 royal_spawn_treasurebox : royal_rush_maker
{
handler:
	EventHandler ON_SCRIPT_EVENT(script_event_arg1,script_event_arg2,script_event_arg3,def0,i0,i1,i2)
	{
		if( script_event_arg1 == 1002 )
		{
			i1 = gg::GetDateTime(0,4);
			i2 = gg::Rand(10);
			if( i1 < 50 && i1 >= 48 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 10 + i2 )) )
					{
						def0::IncCount(( 10 + i2 ));
						def0::Spawn(( 10 + i2 ),0);
					}
				}
			}
			else if( i1 < 48 && i1 >= 46 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 15 + i2 )) )
					{
						def0::IncCount(( 15 + i2 ));
						def0::Spawn(( 15 + i2 ),0);
					}
				}
			}
			else if( i1 < 46 && i1 >= 44 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 20 + i2 )) )
					{
						def0::IncCount(( 20 + i2 ));
						def0::Spawn(( 20 + i2 ),0);
					}
				}
			}
			else if( i1 < 44 && i1 >= 42 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 26 + i2 )) )
					{
						def0::IncCount(( 26 + i2 ));
						def0::Spawn(( 26 + i2 ),0);
					}
				}
			}
			else if( i1 < 42 && i1 >= 40 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 32 + i2 )) )
					{
						def0::IncCount(( 32 + i2 ));
						def0::Spawn(( 32 + i2 ),0);
					}
				}
			}
			else if( i1 < 40 && i1 >= 38 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 39 + i2 )) )
					{
						def0::IncCount(( 39 + i2 ));
						def0::Spawn(( 39 + i2 ),0);
					}
				}
			}
			else if( i1 < 38 && i1 >= 36 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 45 + i2 )) )
					{
						def0::IncCount(( 45 + i2 ));
						def0::Spawn(( 45 + i2 ),0);
					}
				}
			}
			else if( i1 < 36 && i1 >= 34 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 52 + i2 )) )
					{
						def0::IncCount(( 52 + i2 ));
						def0::Spawn(( 52 + i2 ),0);
					}
				}
			}
			else if( i1 < 34 && i1 >= 32 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 60 + i2 )) )
					{
						def0::IncCount(( 60 + i2 ));
						def0::Spawn(( 60 + i2 ),0);
					}
				}
			}
			else if( i1 < 32 && i1 >= 30 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 68 + i2 )) )
					{
						def0::IncCount(( 68 + i2 ));
						def0::Spawn(( 68 + i2 ),0);
					}
				}
			}
			else if( i1 < 30 && i1 >= 28 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 76 + i2 )) )
					{
						def0::IncCount(( 76 + i2 ));
						def0::Spawn(( 76 + i2 ),0);
					}
				}
			}
			else if( i1 < 28 && i1 >= 26 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 85 + i2 )) )
					{
						def0::IncCount(( 85 + i2 ));
						def0::Spawn(( 85 + i2 ),0);
					}
				}
			}
			else if( i1 < 26 && i1 >= 24 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 94 + i2 )) )
					{
						def0::IncCount(( 94 + i2 ));
						def0::Spawn(( 94 + i2 ),0);
					}
				}
			}
			else if( i1 < 24 && i1 >= 22 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 103 + i2 )) )
					{
						def0::IncCount(( 103 + i2 ));
						def0::Spawn(( 103 + i2 ),0);
					}
				}
			}
			else if( i1 < 22 && i1 >= 20 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 113 + i2 )) )
					{
						def0::IncCount(( 113 + i2 ));
						def0::Spawn(( 113 + i2 ),0);
					}
				}
			}
			else if( i1 < 18 && i1 >= 16 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 123 + i2 )) )
					{
						def0::IncCount(( 123 + i2 ));
						def0::Spawn(( 123 + i2 ),0);
					}
				}
			}
			else if( i1 < 16 && i1 >= 14 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 134 + i2 )) )
					{
						def0::IncCount(( 134 + i2 ));
						def0::Spawn(( 134 + i2 ),0);
					}
				}
			}
			else if( i1 < 14 && i1 >= 12 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 145 + i2 )) )
					{
						def0::IncCount(( 145 + i2 ));
						def0::Spawn(( 145 + i2 ),0);
					}
				}
			}
			else if( i1 < 12 )
			{
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 )
				{
					if( myself::IncreaseTotal(( 157 + i2 )) )
					{
						def0::IncCount(( 157 + i2 ));
						def0::Spawn(( 157 + i2 ),0);
					}
				}
			}
		}
	}

}
