<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="instance">
		<xs:complexType>
			<xs:sequence minOccurs="1" maxOccurs="1">
				<xs:element name="activityTime" minOccurs="0" maxOccurs="1">
					<xs:complexType>
						<xs:attribute name="val" type="xs:positiveInteger" use="required" />
					</xs:complexType>
				</xs:element>
				<xs:element name="allowSummon" minOccurs="0" maxOccurs="1">
					<xs:complexType>
						<xs:attribute name="val" type="xs:boolean" use="required" />
					</xs:complexType>
				</xs:element>
				<xs:element name="emptyDestroyTime" minOccurs="0" maxOccurs="1">
					<xs:complexType>
						<xs:attribute name="val" type="xs:positiveInteger" use="required" />
					</xs:complexType>
				</xs:element>
				<xs:element name="PvPInstance" minOccurs="0" maxOccurs="1">
					<xs:complexType>
						<xs:attribute name="val" type="xs:boolean" use="required" />
					</xs:complexType>
				</xs:element>
				<xs:element name="showTimer" minOccurs="0" maxOccurs="1">
					<xs:complexType>
						<xs:attribute name="val" type="xs:boolean" use="required" />
						<xs:attribute name="increase" type="xs:boolean" use="optional" />
						<xs:attribute name="text" type="xs:normalizedString" use="optional" />
					</xs:complexType>
				</xs:element>
				<xs:element name="spawnPoint" minOccurs="0" maxOccurs="1">
					<xs:complexType>
						<xs:attribute name="spawnX" type="xs:integer" use="required" />
						<xs:attribute name="spawnY" type="xs:integer" use="required" />
						<xs:attribute name="spawnZ" type="xs:integer" use="required" />
					</xs:complexType>
				</xs:element>
				<xs:element name="doorlist" minOccurs="0" maxOccurs="1">
					<xs:complexType>
						<xs:sequence minOccurs="1" maxOccurs="1">
							<xs:element name="door" minOccurs="1" maxOccurs="unbounded">
								<xs:complexType>
									<xs:attribute name="doorId" type="xs:positiveInteger" use="required" />
									<xs:attribute name="default_status">
										<xs:simpleType>
											<xs:restriction base="xs:token">
												<xs:enumeration value="open" />
												<xs:enumeration value="close" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="random_time" type="xs:integer" />
									<xs:attribute name="open_time" type="xs:integer" />
									<xs:attribute name="close_time" type="xs:integer" />
									<xs:attribute name="level" type="xs:nonNegativeInteger" />
									<xs:attribute name="open_method" type="xs:nonNegativeInteger" />
									<xs:attribute name="targetable" type="xs:boolean" />
									<xs:attribute name="check_collision" type="xs:boolean" />
									<xs:attribute name="clanhall_id" type="xs:positiveInteger" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="spawnlist" minOccurs="0" maxOccurs="1">
					<xs:complexType>
						<xs:sequence minOccurs="1" maxOccurs="unbounded">
							<xs:element name="group" minOccurs="1" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence minOccurs="1" maxOccurs="1">
										<xs:element name="spawn" minOccurs="1" maxOccurs="unbounded">
											<xs:complexType>
												<xs:attribute name="amount" type="xs:positiveInteger" />
												<xs:attribute name="heading" type="xs:integer" use="required" />
												<xs:attribute name="npcId" type="xs:positiveInteger" use="required" />
												<xs:attribute name="onKillDelay" type="xs:nonNegativeInteger" />
												<xs:attribute name="respawn" type="xs:nonNegativeInteger" use="required" />
												<xs:attribute name="respawnRandom" type="xs:nonNegativeInteger" />
												<xs:attribute name="allowRandomWalk" type="xs:boolean" />
												<xs:attribute name="x" type="xs:integer" use="required" />
												<xs:attribute name="y" type="xs:integer" use="required" />
												<xs:attribute name="z" type="xs:integer" use="required" />
											</xs:complexType>
										</xs:element>
									</xs:sequence>
									<xs:attribute name="name" type="xs:normalizedString" use="required" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="name" type="xs:normalizedString" use="required" />
			<xs:attribute name="ejectTime" type="xs:positiveInteger" />
			<xs:attribute name="allowRandomWalk" type="xs:boolean" />
		</xs:complexType>
	</xs:element>
</xs:schema>