Index: code/trunk/data/levels/quest_test.oxw
===================================================================
--- code/trunk/data/levels/quest_test.oxw	(revision 6801)
+++ code/trunk/data/levels/quest_test.oxw	(revision 6801)
@@ -0,0 +1,211 @@
+<?lua
+  include("hudtemplates3.oxo")
+  include("stats.oxo")
+  include("templates/spaceship_assff.oxt")
+  include("templates/spaceship_HXY_SL.oxt")
+  include("templates/spaceship_pirate.oxt")
+?>
+
+<NotificationQueue
+	 name     = "notification"
+	 position = "0.40, 0.05"
+	 font     = "VeraMono"
+	 textsize = 0.020
+	 length   = 3
+	 width    = 50
+/>
+	
+	
+	
+<Level
+name="Dani's Testlevel"
+description="Erste Versuche mit den Quests"
+>
+
+    <Scene
+        ambientlight = "0.3, 0.3, 0.3"
+        skybox       = "Orxonox/skypanoramagen1"
+    >
+	      <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+	      
+	      
+	      <GlobalQuest id="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551">
+		<QuestDescription title="Fight for freedom" 
+					description="Just a few hours ago, a group of pirates attacked an killed all your friends. Now you are very angry and you want to take revenge. Find the pirates and kill them!"
+					failmessage="You are a loser, now the whole universe will be controlled by the pirates!" 
+					completeMessage="Yeah, you did it! Now there will be peace in the whole universe. You are a hero!"/>
+			<subquests>
+				<GlobalQuest id="3159b4d4-bc86-4190-ba1d-4530668dfe31">
+					<QuestDescription title="A few problems occured!" 
+					description="This pirates are only a small part of the whole fleet. It isn't as easy as you think... Another problem is, that they've stolen
+							a very important memory stick with secret infos, the holy stick. You must get it back!" 
+					failmessage="" 
+					completeMessage="Unbelievable, you annihilated all pirates and got the stolen memory stick. 
+					But wait... this is the memory stick you looked for... anyway, it's helpful: There is a map saved on it, which leads you to a pirate - base. Perhaps you'll find more there..."/>
+				</GlobalQuest>
+				<GlobalQuest id="8d8ed3a6-74a6-4491-9172-26155cff151d">
+					<QuestDescription title="Find the Base"
+					description="Now you are in possession of the map and it should be easy to find the base. Because you are the best fight pilot of mankind, your ship has been pimped before you started your mission.
+						They installed a very modern navigation system, which leads you precisely to your desired destination..."
+					failmessage=""
+					completeMessage="The navigation system worked very well and now you should be near a pirate -base." />
+				</GlobalQuest>
+					
+			</subquests>
+			<hints>
+				<QuestHint id="2b85f32c-2433-4f1a-bdd4-f24d20c9403c">
+					<QuestDescription title="Useful to know" description="Pirates like to hide themselves behind asteroids."/>
+				</QuestHint>
+			</hints>
+			<fail-effects>
+			</fail-effects>
+			<complete-effects>
+			</complete-effects>
+		</GlobalQuest>
+		
+	      <ParticleSpawner position="0,0,0" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
+		  <events>
+		    <spawn>
+		      <EventTrigger delay=1>
+			<events>
+			  <trigger>
+			    <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+			  </trigger>
+			</events>
+		      </EventTrigger>
+		    </spawn>
+		  </events>
+		  <attached>
+		    <QuestEffectBeacon position="0,0,0" times=1>
+			<effects>
+			    <AddQuest questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" />
+			</effects>
+			<events>
+			    <execute>
+				<EventListener event=questbeacon1 />
+			    </execute>
+			</events>
+			<attached>
+			    <DistanceMultiTrigger name=questbeacon1 position="0,0,0" distance=100 target="Pawn" />
+			</attached>
+		    </QuestEffectBeacon>
+		  </attached>
+		</ParticleSpawner>
+		
+		
+		
+		<!-- AddSubQuest1 (Questbeacon2)-->
+		<QuestEffectBeacon position="<?lua print(math.random()*1000-500)?>,<?lua print(math.random()*1000-500)?>,<?lua print(math.random()*200-2000)?>" times=1>
+					<attached>
+						<Billboard position="0,0,0" scale=1 colour="1.0,1.0,0" material="Examples/Flare" />
+						<DistanceMultiTrigger name=questbeacon2  position="0,0,0" distance=200 target="Pawn" />
+					</attached>
+					<effects>
+						<AddQuest questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" />
+					</effects>
+					<events>
+						<execute>
+							<EventListener event=questbeacon2 />
+						</execute>
+					</events>
+			    </QuestEffectBeacon>
+			    
+		<!-- hint (Questbeacon3)-->
+		<QuestEffectBeacon position="<?lua print(math.random()*1000-500)?>,<?lua print(math.random()*1000-500)?>,<?lua print(math.random()*200-500)?>" times=1>
+					<attached>
+						<Billboard position="0,0,0" scale=1 colour="0,1.0,0" material="Examples/Flare" />
+						<DistanceMultiTrigger name=questbeacon3  position="0,0,0" distance=300 target="Pawn" />
+					</attached>
+					<effects>
+						<AddQuestHint hintId="2b85f32c-2433-4f1a-bdd4-f24d20c9403c" />
+					</effects>
+					<events>
+						<execute>
+							<EventListener event=questbeacon3 />
+						</execute>
+					</events>
+			    </QuestEffectBeacon>	
+			    
+		<!-- finish Quest (Questbeacon4)-->
+		<QuestEffectBeacon position="<?lua print(math.random()*1000)?>,<?lua print(math.random()*1000)?>,<?lua print(math.random()*200-6000)?>" times=1>
+					<attached>
+						<Billboard position="0,0,0" scale=1 colour="0,1.0,0" material="Examples/Flare" />
+						<DistanceMultiTrigger name=questbeacon4  position="0,0,0" distance=200 target="Pawn" />
+					</attached>
+		
+					<effects>
+						<CompleteQuest questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" />
+					</effects>
+					<events>
+						<execute>
+							<EventListener event=questbeacon4 />
+						</execute>
+					</events>
+			    </QuestEffectBeacon>
+			
+		<!-- pirates -->
+		<?lua
+		for i = 1,2, 1
+		do
+		?>
+		    <SpaceShip position="<?lua print(math.random()*100)?>,<?lua print(math.random()*100)?>,<?lua print(math.random()*100-2000)?>">
+		      <templates>
+			<Template link=spaceshipHXYSL />
+		      </templates>
+		      <controller>
+			<WaypointPatrolController alertnessradius=1000 team=0 active=true>
+			  <waypoints>
+			    <StaticEntity position="0,<?lua print(math.random()*50)?> ,<?lua print(i*50 -2000) ?>" />
+			  </waypoints>
+			</WaypointPatrolController>
+		      </controller>
+		      <attached>
+		      </attached>
+		    </SpaceShip>
+		<?lua
+		end
+		?>
+			
+		
+		<?lua
+		for i = 1,5, 1
+		do
+		?>
+		    <SpaceShip position="<?lua print(math.random()*100)?>,<?lua print(math.random()*100)?>,<?lua print(math.random()*100-6000)?>">
+		      <templates>
+			<Template link=spaceshipHXYSL />
+		      </templates>
+		      <controller>
+			<WaypointPatrolController alertnessradius=1000 team=0 active=true>
+			  <waypoints>
+			    <StaticEntity position="0,<?lua print(math.random()*50)?> ,<?lua print(i*50 -6000) ?>" />
+			  </waypoints>
+			</WaypointPatrolController>
+		      </controller>
+		      <attached>
+		      </attached>
+		    </SpaceShip>
+		<?lua
+		end
+		?>
+		
+		
+	<!-- Asteroid field-->
+            <StaticEntity position="-400,2000,-7000">
+                <attached>
+                    <?lua
+                        for i = 1, 220
+                        do ?>
+                        <MovableEntity position="<?lua print(math.random() * 10000 -5000)?>, <?lua print(math.random() * 10000-5000) ?>, <?lua print(math.random() * 10000 -7000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.abs(math.random() * 30 -10)) ?>">
+                            <attached>
+                                <Model scale="<?lua print(math.random() * 80) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+                            </attached>
+                        </MovableEntity>
+                    <?lua
+                        end
+                    ?>
+		    </attached>
+		</StaticEntity>
+		
+	</Scene>
+</Level>
