Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation3/data/levels/quest_test.oxw @ 7032

Last change on this file since 7032 was 7032, checked in by landauf, 14 years ago

eol-style native

  • Property svn:eol-style set to native
File size: 13.8 KB
Line 
1<?lua
2  include("hudtemplates3.oxo")
3  include("stats.oxo")
4  include("templates/spaceship_assff.oxt")
5  include("templates/spaceship_HXY_SL.oxt")
6  include("templates/spaceship_pirate.oxt")
7?>
8
9<Template name=spaceshipassffplayer defaults=0>
10  <SpaceShip template=spaceshipassff name=player>
11    <attached>
12    <DistanceTriggerBeacon name=Me/>
13    </attached>
14  </SpaceShip>
15</Template>
16
17<?lua
18    dofile("includes/CuboidSpaceStation.lua")
19?>     
20       
21<Level
22name="Dani's Testlevel"
23description="Erste Versuche mit den Quests"
24>
25
26    <NotificationQueue
27             name     = "notification"
28             position = "0.40, 0.05"
29             font     = "VeraMono"
30             textsize = 0.020
31             length   = 3
32             width    = 50
33    />
34
35    <Scene
36        ambientlight = "0.3, 0.3, 0.3"
37        skybox       = "Orxonox/skypanoramagen1"
38    >
39              <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" />
40             
41             
42              <GlobalQuest id="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551">
43                <QuestDescription title="Fight for freedom"
44                                        description="Just a few hours ago, a group of pirates attacked an killed all your  squad members. Now you are very angry and you want to take revenge. Find the pirates and kill them!"
45                                        failmessage="You are a loser, now the whole universe will be controlled by the pirates!"
46                                        completeMessage="Yeah, you did it! You,ve eliminated the enemies. But why attacked them the Humans here? For tousands of years, there was peace in this sun system.
47                                                                You have to find out what happened exactly and why the pirates attacked..."/>
48                        <subquests>
49                                <GlobalQuest id="3159b4d4-bc86-4190-ba1d-4530668dfe31">
50                                        <QuestDescription title="There are more of them..."
51                                        description="Now you can see it: There are more pirates... the pirates you killed were only a small part of the whole fleet. You recieved a message from your Headquarter: The pirates have stolen
52                                                        a very important memory stick with secret infos (military locations etc.), the holy stick. You must get it back! Otherwise the humans are in great danger..."
53                                        failmessage=""
54                                        completeMessage="Unbelievable, you annihilated all pirates and got the stolen memory stick.
55                                                                But wait... this isn't the memory stick you looked for, this stick is one from a pirate... anyway, it's helpful: There is a map saved on it, which leads you to a pirate - base. Perhaps you'll find more
56                                                                about their plans there..."/>
57                                </GlobalQuest>
58                                <GlobalQuest id="8d8ed3a6-74a6-4491-9172-26155cff151d">
59                                        <QuestDescription title="Find the Base"
60                                        description="Now you are in possession of the map and it should be easy to find the base. Because you are a Member of an elite-fight-squad, your ship has been pimped before you started your mission.
61                                                They installed a very modern navigation system, which leads you precisely to your desired destination. Use it to find the pirate - base."
62                                        failmessage=""
63                                        completeMessage="The navigation system worked very well and now you should be near a pirate -base." />
64                                        <hints>
65                                                <QuestHint id="965101b3-26ce-4fcf-bc71-17cc2a87d2e9">
66                                                <QuestDescription title="3 Ways?"
67                                                description="The different ways leads you to the possible positions where the base could be. The problem is that the map is encrypted and your on board system is not
68                                                                able to decrypt it exactly. Therefore you have to try 3 possible ways...Tha base is Huge, but it could be that it's invisible when ou are in longer distance (some Big Ships
69                                                                have a special shield aroud them which make them invisible at longer range)."/>
70                                                </QuestHint>
71                                                <QuestHint id="9930a598-98bc-4ff8-8cc0-31311a6ccaaa">
72                                                <QuestDescription title=":(" description="Here isn't the base you look for... try another way."/>
73                                                </QuestHint>
74                                        </hints>
75                                </GlobalQuest>
76                                <GlobalQuest id="8a62408b-c47b-4e02-bd3d-06bb9ec0b363">
77                                        <QuestDescription title="The Base"
78                                        description="Yeah, you found the Base... now let's check if there is the important holy stick..."
79                                        failmessage=""
80                                        completeMessage="There it is, the Holy stick. Yes, you're right. It looks like a rocket because there are so many rockets in the universe, that it's nearly impossible to find the holy stick between them.
81                                                                Anyway, the pirates found the stick... another part which is confusing. Why did they know where the holy stick is? Perpaps they know more about the humans than you think."/>
82                                </GlobalQuest>
83                                <GlobalQuest id="85380d05-b791-45d1-82e9-01f0bc930367">
84                                        <QuestDescription title="Find out more about the pirates"
85                                        description= "Now, the Holy stick is back in your possession. Your new mission is "
86                                        failmessage=""
87                                        completeMessage=""/>
88                                </GlobalQuest>
89                        </subquests>
90                        <hints>
91                                <QuestHint id="2b85f32c-2433-4f1a-bdd4-f24d20c9403c">
92                                        <QuestDescription title="Useful to know" description="Pirates like to hide themselves behind asteroids."/>
93                                </QuestHint>
94                        </hints>
95                        <fail-effects>
96                        </fail-effects>
97                        <complete-effects>
98                        </complete-effects>
99                </GlobalQuest>
100               
101              <ParticleSpawner position="0,0,0" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
102                  <events>
103                    <spawn>
104                      <EventTrigger delay=1>
105                        <events>
106                          <trigger>
107                            <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassffplayer />
108                          </trigger>
109                        </events>
110                      </EventTrigger>
111                    </spawn>
112                  </events>
113                  <attached>
114                    <QuestEffectBeacon position="0,0,0" times=1>
115                        <effects>
116                            <AddQuest questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" />
117                        </effects>
118                        <events>
119                            <execute>
120                                <EventListener event=questbeacon1 />
121                            </execute>
122                        </events>
123                        <attached>
124                            <DistanceTrigger name=questbeacon1 position="0,0,0" distance=100 target=DistanceTriggerBeacon targetname=Me/>
125                        </attached>
126                    </QuestEffectBeacon>
127                  </attached>
128                </ParticleSpawner>
129               
130               
131               
132                <!-- AddSubQuest1 (Questbeacon2)-->
133                <QuestEffectBeacon position="<?lua print(math.random()*100-500)?>,<?lua print(math.random()*100-500)?>,<?lua print(math.random()*200-2000)?>" times=1>
134                                        <attached>
135                                                <Billboard position="0,0,0" scale=3 colour="1.0,1.0,0" material="Examples/Flare" />
136                                                <DistanceTrigger name=questbeacon2  position="0,0,0" distance=200 target="Pawn" />
137                                        </attached>
138                                        <effects>
139                                                <AddQuest questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" />
140                                        </effects>
141                                        <events>
142                                                <execute>
143                                                        <EventListener event=questbeacon2 />
144                                                </execute>
145                                        </events>
146                            </QuestEffectBeacon>
147                           
148                <!-- hint (Questbeacon3)-->
149                <QuestEffectBeacon position="0,0,0" times=1>
150                                        <attached>
151                                                <DistanceTrigger name=questbeacon3  position="0,0,0" distance=300 target=DistanceTriggerBeacon targetname=Me delay="10" />
152                                        </attached>
153                                        <effects>
154                                                <AddQuestHint hintId="2b85f32c-2433-4f1a-bdd4-f24d20c9403c" />
155                                        </effects>
156                                        <events>
157                                                <execute>
158                                                        <EventListener event=questbeacon3 />
159                                                </execute>
160                                        </events>
161                            </QuestEffectBeacon>       
162                           
163                           
164                <!-- finish SubQuest (Questbeacon4)-->
165                <QuestEffectBeacon position="600,300,-6000" times=1>
166                                        <attached>
167                                                <Billboard position="0,0,0" scale=3 colour="0,1.0,0" material="Examples/Flare" />
168                                                <DistanceTrigger name=questbeacon4  position="0,0,0" distance=200 target=DistanceTriggerBeacon targetname=Me />
169                                        </attached>
170               
171                                        <effects>
172                                                <CompleteQuest questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" />
173                                                <AddQuest questId="8d8ed3a6-74a6-4491-9172-26155cff151d" />
174                                                <AddQuestHint hintId="965101b3-26ce-4fcf-bc71-17cc2a87d2e9" />
175                                        </effects>
176                                        <events>
177                                                <execute>
178                                                        <EventListener event=questbeacon4 />
179                                                </execute>
180                                        </events>
181                            </QuestEffectBeacon>
182                           
183                           
184                <!-- Navihint 1(Questbeacon5)-->
185                <QuestEffectBeacon position="7600,300,-8000" times=1>
186                                        <attached>
187                                                <DistanceTrigger name=questbeacon5  position="0,0,0" distance=300 target=DistanceTriggerBeacon targetname=Me />
188                                        </attached>
189                                        <effects>
190                                                <AddQuestHint hintId="9930a598-98bc-4ff8-8cc0-31311a6ccaaa" />
191                                        </effects>
192                                        <events>
193                                                <execute>
194                                                        <EventListener event=questbeacon5 />
195                                                </execute>
196                                        </events>
197                            </QuestEffectBeacon>       
198                           
199                <!-- Navi2(Questbeacon6)-->
200                <QuestEffectBeacon position="4600,5300,-11000" times=1>
201                                        <attached>
202                                                <DistanceTrigger name=questbeacon6  position="0,0,0" distance=300 target=DistanceTriggerBeacon targetname=Me />
203                                        </attached>
204                                        <effects>
205                                                <CompleteQuest questId="8d8ed3a6-74a6-4491-9172-26155cff151d" />
206                                                <AddQuest questId="8a62408b-c47b-4e02-bd3d-06bb9ec0b363" />
207                                               
208                                        </effects>
209                                        <events>
210                                                <execute>
211                                                        <EventListener event=questbeacon6 />
212                                                </execute>
213                                        </events>
214                            </QuestEffectBeacon>
215                           
216                <!--Navigation System-->                           
217        <EventDispatcher>
218                <targets>
219                    <EventTarget target=Navi />
220                </targets>
221                <events>
222                    <visibility>
223                        <QuestListener questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" mode="complete" />
224                    </visibility>
225                    <activity>
226                        <QuestListener questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" mode="complete" />
227                    </activity>
228                </events>
229            </EventDispatcher>
230
231            <?lua
232                for i = 0, 30
233                do
234            ?>
235                <Billboard position="<?lua print(i*1000/30+600) ?>,<?lua print(i*2000/30+300) ?>,<?lua print(-i*4000/30-6000) ?>" colour="1.0,0,0" scale=1 material="Examples/Flare" name=Navi visible=false/><!--endpos:1600,2300,-10000-->
236                <Billboard position="<?lua print(i*7000/30+600) ?>,<?lua print(i*0/30+300) ?>,<?lua print(-i*2000/30-6000) ?>" colour="0,1.0,0" scale=1 material="Examples/Flare" name=Navi visible=false/><!--endpos:7600,300,-8000-->
237                <Billboard position="<?lua print(i*4000/30+600) ?>,<?lua print(i*5000/30+300) ?>,<?lua print(-i*5000/30-6000) ?>" colour="0,0,1.0" scale=1 material="Examples/Flare" name=Navi visible=false/><!--endpos:4600,5300,-11000-->
238            <?lua
239                end
240            ?>
241               
242               
243        <StaticEntity scale=1 position="4650,5350,-11050" name=base visible=true active=true yaw=60>
244                <attached>
245                    <?lua
246                        createSpaceStationPar(9851,2,1,2,1,2,1,100)
247                    ?>
248                </attached>
249            </StaticEntity>
250           
251        <ParticleSpawner position="4650,5350,-11050" source="Orxonox/explosion1" name=base visible=false active=false loop=0/>
252        <Model position="4800,5785,-10725" scale=3 mesh="Rocket.mesh" visible=true active=true name=base />
253        <EventDispatcher>
254                <targets>
255                    <EventTarget target=base />
256                </targets>
257                <events>
258                    <visibility>
259                  <EventTrigger invert=true>
260                    <events>
261                      <trigger>
262                        <QuestListener questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" mode="start" />
263                      </trigger>
264                    </events>
265                  </EventTrigger>
266                    </visibility>
267                    <activity>
268                    <EventTrigger invert=true>
269                    <events>
270                      <trigger>
271                             <QuestListener questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" mode="start" />
272                      </trigger>
273                    </events>
274                  </EventTrigger>
275                    </activity>
276                </events>
277            </EventDispatcher>
278
279       
280        <EventDispatcher>
281                <targets>
282                    <EventTarget target=base />
283                </targets>
284                <events>
285                    <visibility>
286                        <QuestListener questId="8d8ed3a6-74a6-4491-9172-26155cff151d" mode="complete" />
287                    </visibility>
288                    <activity>
289                        <QuestListener questId="8d8ed3a6-74a6-4491-9172-26155cff151d" mode="complete" />
290                    </activity>
291                </events>
292            </EventDispatcher>
293
294       
295       
296       
297                <!-- pirates -->
298                <?lua
299                for i = 1,1, 1
300                do
301                ?>
302                    <SpaceShip position="<?lua print(math.random()*100)?>,<?lua print(math.random()*100)?>,<?lua print(math.random()*100-2000)?>">
303                      <templates>
304                        <Template link=spaceshippirate />
305                      </templates>
306                      <controller>
307                        <WaypointPatrolController alertnessradius=1000 team=0 active=true>
308                          <waypoints>
309                            <StaticEntity position="0,<?lua print(math.random()*50)?> ,<?lua print(i*50 -2000) ?>" />
310                          </waypoints>
311                        </WaypointPatrolController>
312                      </controller>
313                      <attached>
314                      </attached>
315                    </SpaceShip>
316                <?lua
317                end
318                ?>
319               
320                <?lua
321                for i = 1,2, 1
322                do
323                ?>
324                    <SpaceShip position="600,300,-6000">
325                      <templates>
326                        <Template link=spaceshippirate />
327                      </templates>
328                      <controller>
329                        <WaypointPatrolController alertnessradius=1000 team=0 active=true>
330                          <waypoints>
331                            <StaticEntity position="600,300,-6000" />
332                          </waypoints>
333                        </WaypointPatrolController>
334                      </controller>
335                      <attached>
336                      </attached>
337                    </SpaceShip>
338                <?lua
339                end
340                ?>
341               
342               
343        <!-- Asteroid field-->
344            <StaticEntity position="-400,2000,-7000">
345                <attached>
346                    <?lua
347                        for i = 1, 180
348                        do ?>
349                        <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)) ?>">
350                            <attached>
351                                <Model scale="<?lua print(math.random() * 100) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
352                            </attached>
353                        </MovableEntity>
354                    <?lua
355                        end
356                    ?>
357                    </attached>
358                </StaticEntity>
359               
360               
361        </Scene>
362</Level>
Note: See TracBrowser for help on using the repository browser.