Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/doc/data/levels/Quest_PirateAttack.oxw @ 7346

Last change on this file since 7346 was 7163, checked in by dafrick, 14 years ago

Merged presentation3 branch into trunk.

  • Property svn:eol-style set to native
File size: 25.6 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  include("templates/lodinformation.oxt")
8?>
9
10<Template name=spaceshipassffplayer defaults=0>
11  <SpaceShip template=spaceshipassff name=player>
12    <attached>
13    <DistanceTriggerBeacon name=Me/>
14    </attached>
15  </SpaceShip>
16</Template>
17
18<?lua
19    dofile("includes/CuboidSpaceStation.lua")
20?>
21
22<NotificationQueue
23     name     = "notification"
24     position = "0.40, 0.05"
25     font     = "VeraMono"
26     textsize = 0.020
27     length   = 3
28     width    = 50
29/>
30   
31   
32   
33<Level
34name="Dani's Testlevel"
35description="Erste Versuche mit den Quests"
36gametype=TeamDeathmatch
37>
38
39  <templates>
40    <Template link=lodtemplate_default />
41  </templates>
42
43    <Scene
44        ambientlight = "0.3, 0.3, 0.3"
45        skybox       = "Orxonox/skypanoramagen1"
46    >
47          <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" />
48   
49   
50          <GlobalQuest id="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551">
51        <QuestDescription title="Fight for freedom"
52                    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!"
53                    failmessage="You are a loser, now the whole universe will be controlled by the pirates!"
54                    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.
55                                You have to find out what happened exactly and why the pirates attacked..."/>
56            <subquests>
57                <GlobalQuest id="3159b4d4-bc86-4190-ba1d-4530668dfe31">
58                    <QuestDescription title="The stolen stick..."
59                    description="Now you can see it: There are more pirates... the pirates you killed were only a small part of the whole fleet. You received a message from your Headquarter: The pirates have stolen
60                            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..."
61                    failmessage=""
62                    completeMessage="Unbelievable, you annihilated all pirates and got the stolen memory stick.
63                                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
64                                about their plans there..."/>
65                </GlobalQuest>
66                <GlobalQuest id="8d8ed3a6-74a6-4491-9172-26155cff151d">
67                    <QuestDescription title="Find the Base"
68                    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.
69                        They installed a very modern navigation system, which leads you precisely to your desired destination. Use it to find the pirate - base."
70                    failmessage=""
71                    completeMessage="The navigation system worked very well and now you should be near a pirate -base." />
72                    <hints>
73                        <QuestHint id="965101b3-26ce-4fcf-bc71-17cc2a87d2e9">
74                        <QuestDescription title="3 Ways?"
75                        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
76                                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
77                                have a special shield aroud them which make them invisible at longer range)."/>
78                        </QuestHint>
79                    </hints>
80                </GlobalQuest>
81                <GlobalQuest  id="9930a598-98bc-4ff8-8cc0-31311a6ccaaa">
82                    <QuestDescription title=":(" description="Here isn't the base you look for... try another way."/>
83                </GlobalQuest>
84                <GlobalQuest id="9930a598-98bc-4ff8-8cc0-31311a6ccaab">
85                    <QuestDescription title=":(" description="Here isn't the base you look for... try another way."/>
86                </GlobalQuest>
87                <GlobalQuest id="8a62408b-c47b-4e02-bd3d-06bb9ec0b363">
88                    <QuestDescription title="The Base"
89                    description="Yeah, you found the Base... now let's check if there is the important holy stick..."
90                    failmessage=""
91                    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.
92                                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."/>
93                </GlobalQuest>
94                <GlobalQuest id="85380d05-b791-45d1-82e9-01f0bc930367">
95                    <QuestDescription title="Find out more about the pirates"
96                    description= "Now, the Holy stick is back in your possession. Your new mission is to get some more infos about the pirates. You've got an info about a near mining company
97                    which delivers Hydrogen out of special asteroids. Hydrogen is a very rare ressource on earth and is delivered by a few great mining companys. There is no oil anymore on earth since many years.
98                    Therefore hydrogen became the most important energy source for all humans.
99                    But back to your mission. The mining company has it's own security. Ask some of their security staff if they know more about the pirates... it's actually your only hope to get more infos.
100                    You'll find the mining company at the near planet with the asteroid belt."
101                    failmessage=""
102                    completeMessage=""/>
103                </GlobalQuest>
104                <GlobalQuest id="d8afe2eb-b3b9-4c98-8ed7-cc1a2a8e3734">
105                    <QuestDescription title="Interesting..."
106                    description= "You're very lucky. The first security man has interesting infos about the pirates. He said that they made a few attacks in de last few weeks and they intensified the attacks in the last days...
107                    Shit, they attack one more time. Fight them back!"
108                    failmessage=""
109                    completeMessage=""/>
110                </GlobalQuest>
111            </subquests>
112            <hints>
113                <QuestHint id="2b85f32c-2433-4f1a-bdd4-f24d20c9403c">
114                    <QuestDescription title="Useful to know" description="Pirates like to hide themselves behind asteroids."/>
115                </QuestHint>
116            </hints>
117            <fail-effects>
118            </fail-effects>
119            <complete-effects>
120            </complete-effects>
121        </GlobalQuest>
122   
123          <ParticleSpawner position="0,0,0" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
124          <events>
125            <spawn>
126              <EventTrigger delay=1>
127            <events>
128              <trigger>
129                <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassffplayer name=spawnpoint1 team=0 active=true/>
130              </trigger>
131            </events>
132              </EventTrigger>
133            </spawn>
134          </events>
135          <attached>
136            <QuestEffectBeacon position="0,0,0" times=1>
137            <effects>
138                <AddQuest questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" />
139            </effects>
140            <events>
141                <execute>
142                <EventListener event=questbeacon1 />
143                </execute>
144            </events>
145            <attached>
146                <DistanceTrigger name=questbeacon1 position="0,0,0" distance=100 target=DistanceTriggerBeacon targetname=Me/>
147            </attached>
148            </QuestEffectBeacon>
149          </attached>
150        </ParticleSpawner>
151   
152        <SpawnPoint position="600,300,-6000" spawnclass=SpaceShip pawndesign=spaceshipassffplayer name=spawnpoint2 active=false/>
153   
154   
155   
156        <!-- Add second Quest-->
157        <QuestEffectBeacon position="250,-300,-1500" times=1>
158                    <attached>
159                        <Billboard position="0,0,0" scale=3 colour="1.0,1.0,0" material="Examples/Flare" />
160                        <DistanceTrigger name=questbeacon2 targetname=Me position="0,0,0" target=DistanceTriggerBeacon distance=400 />
161                    </attached>
162                    <effects>
163                        <AddQuest questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" />
164                    </effects>
165                    <events>
166                        <execute>
167                            <EventListener event=questbeacon2 />
168                        </execute>
169                    </events>
170                </QuestEffectBeacon>
171   
172        <!-- Hint to first Quest-->
173        <QuestEffectBeacon position="0,0,0" times=1>
174                    <attached>
175                        <DistanceTrigger name=questbeacon3  position="0,0,0" distance=300 target=DistanceTriggerBeacon targetname=Me delay="5" />
176                    </attached>
177                    <effects>
178                        <AddQuestHint hintId="2b85f32c-2433-4f1a-bdd4-f24d20c9403c" />
179                    </effects>
180                    <events>
181                        <execute>
182                            <EventListener event=questbeacon3 />
183                        </execute>
184                    </events>
185                </QuestEffectBeacon>
186   
187   
188        <!--Pirates killed... navi leads you to possible Base stations-->
189        <QuestEffectBeacon position="600,300,-6000" times=1>
190                    <attached>
191                        <Billboard position="0,0,0" scale=3 colour="0,1.0,0" material="Examples/Flare" />
192                        <DistanceTrigger name=questbeacon4  position="0,0,0" distance=200 target=DistanceTriggerBeacon targetname=Me />
193                    </attached>
194   
195                    <effects>
196                        <CompleteQuest questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" />
197                        <AddQuest questId="8d8ed3a6-74a6-4491-9172-26155cff151d" />
198                        <AddQuestHint hintId="965101b3-26ce-4fcf-bc71-17cc2a87d2e9" />
199                    </effects>
200                    <events>
201                        <execute>
202                            <EventListener event=questbeacon4 />
203                        </execute>
204                    </events>
205                </QuestEffectBeacon>
206   
207   
208        <!-- Wrong way 1-->
209        <QuestEffectBeacon position="7600,300,-8000" times=1>
210                    <attached>
211                        <DistanceTrigger name=questbeacon5  position="0,0,0" distance=300 target=DistanceTriggerBeacon targetname=Me />
212                    </attached>
213                    <effects>
214                        <AddQuest questId="9930a598-98bc-4ff8-8cc0-31311a6ccaaa" />
215                    </effects>
216                    <events>
217                        <execute>
218                            <EventListener event=questbeacon5 />
219                        </execute>
220                    </events>
221                </QuestEffectBeacon>
222   
223        <!-- Wrong way 2-->
224        <QuestEffectBeacon position="1600,2300,-10000" times=1>
225                    <attached>
226                        <DistanceTrigger name=questbeacon8  position="0,0,0" distance=300 target=DistanceTriggerBeacon targetname=Me />
227                    </attached>
228                    <effects>
229                        <AddQuest questId="9930a598-98bc-4ff8-8cc0-31311a6ccaab" />
230                    </effects>
231                    <events>
232                        <execute>
233                            <EventListener event=questbeacon8 />
234                        </execute>
235                    </events>
236                </QuestEffectBeacon>
237   
238        <!-- Base found!-->
239        <QuestEffectBeacon position="4600,5300,-11000" times=1>
240                    <attached>
241                        <DistanceTrigger name=questbeacon6  position="0,0,0" distance=600 target=DistanceTriggerBeacon targetname=Me />
242                    </attached>
243                    <effects>
244                        <CompleteQuest questId="8d8ed3a6-74a6-4491-9172-26155cff151d" />
245                        <AddQuest questId="8a62408b-c47b-4e02-bd3d-06bb9ec0b363" />
246                        <CompleteQuest questId="9930a598-98bc-4ff8-8cc0-31311a6ccaaa" />
247                        <CompleteQuest questId="9930a598-98bc-4ff8-8cc0-31311a6ccaab" />
248   
249                    </effects>
250                    <events>
251                        <execute>
252                            <EventListener event=questbeacon6 />
253                        </execute>
254                    </events>
255                </QuestEffectBeacon>
256        <!--Stick found-->
257        <QuestEffectBeacon position="4800,5785,-10725" times=1>
258                    <attached>
259                        <DistanceTrigger name=questbeacon7  position="0,0,0" distance=30 target=DistanceTriggerBeacon targetname=Me />
260                    </attached>
261                    <effects>
262                        <CompleteQuest questId="8a62408b-c47b-4e02-bd3d-06bb9ec0b363" />
263                        <AddQuest questId="85380d05-b791-45d1-82e9-01f0bc930367" />
264   
265                    </effects>
266                    <events>
267                        <execute>
268                            <EventListener event=questbeacon7 />
269                        </execute>
270                    </events>
271                </QuestEffectBeacon>
272   
273   
274        <!--Security Man found-->
275        <QuestEffectBeacon position="4000,4000,-20000" times=1>
276                    <attached>
277                        <Billboard position="0,0,0" scale=3 colour="0,0,1.0" material="Examples/Flare" />
278                        <DistanceTrigger name=questbeacon9 position="0,0,0" distance=500 target=DistanceTriggerBeacon targetname=Me />
279                    </attached>
280                    <effects>
281                        <CompleteQuest questId="85380d05-b791-45d1-82e9-01f0bc930367" />
282                        <AddQuest questId="d8afe2eb-b3b9-4c98-8ed7-cc1a2a8e3734" />
283   
284                    </effects>
285                    <events>
286                        <execute>
287                            <EventListener event=questbeacon9 />
288                        </execute>
289                    </events>
290        </QuestEffectBeacon>
291   
292    <!--Navigation System which shows possiple positions of base-->
293    <EventDispatcher>
294                <targets>
295                    <EventTarget target=Navi />
296                </targets>
297                <events>
298                    <visibility>
299                        <QuestListener questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" mode="complete" />
300                    </visibility>
301                    <activity>
302                        <QuestListener questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" mode="complete" />
303                    </activity>
304                </events>
305            </EventDispatcher>
306
307            <?lua
308                for i = 0, 30
309                do
310            ?>
311        <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-->
312        <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-->
313        <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-->
314            <?lua
315                end
316            ?>
317   
318    <!--Base&Stick spawn*****************************************************************-->
319    <StaticEntity scale=1 position="4650,5350,-11050" name=base visible=true active=true yaw=60>
320                <attached>
321                    <?lua
322                        createSpaceStationPar(9851,2,1,2,1,2,1,100)
323                    ?>
324                </attached>
325            </StaticEntity>
326   
327    <ParticleSpawner position="4650,5350,-11050" source="Orxonox/explosion1" name=base visible=false active=false loop=0/>
328    <Model position="4800,5785,-10725" scale=3 mesh="rocket.mesh" visible=true active=true name=base />
329    <EventDispatcher>
330                <targets>
331                    <EventTarget target=base />
332             <EventTarget target=navipirate1 />
333              <EventTarget target=navipirate2 />
334                </targets>
335                <events>
336                    <visibility>
337          <EventTrigger invert=true>
338            <events>
339              <trigger>
340                <QuestListener questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" mode="start" />
341              </trigger>
342            </events>
343          </EventTrigger>
344                    </visibility>
345                    <activity>
346                <EventTrigger invert=true>
347            <events>
348              <trigger>
349                             <QuestListener questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" mode="start" />
350              </trigger>
351            </events>
352          </EventTrigger>
353                    </activity>
354                </events>
355            </EventDispatcher>
356
357   
358    <EventDispatcher>
359                <targets>
360                    <EventTarget target=base />
361                </targets>
362                <events>
363                    <visibility>
364                        <QuestListener questId="8d8ed3a6-74a6-4491-9172-26155cff151d" mode="complete" />
365                    </visibility>
366                    <activity>
367                        <QuestListener questId="8d8ed3a6-74a6-4491-9172-26155cff151d" mode="complete" />
368                    </activity>
369                </events>
370            </EventDispatcher>
371   
372    <!--Base&Stick spawn********end*****************************************************-->
373   
374    <!--Change spawnoint-->
375    <EventDispatcher>
376                <targets>
377                    <EventTarget target=spawnpoint1 />
378                </targets>
379                <events>
380                    <activity>
381                <EventTrigger invert=true>
382            <events>
383              <trigger>
384                             <QuestListener questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" mode="complete" />
385              </trigger>
386            </events>
387          </EventTrigger>
388                    </activity>
389                </events>
390   
391            </EventDispatcher>
392            <EventDispatcher>
393                <targets>
394                    <EventTarget target=spawnpoint2/>
395                </targets>
396                <events>
397                    <activity>
398                             <QuestListener questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" mode="complete" />
399                    </activity>
400                </events>
401            </EventDispatcher>
402    <!--Change spawnoint end-->
403   
404    <!-- pirates -->
405        <?lua
406        for i = 1,1, 1
407        do
408        ?>
409            <SpaceShip position="<?lua print(math.random()*100)?>,<?lua print(math.random()*100)?>,<?lua print(math.random()*100-2000)?>">
410              <templates>
411            <Template link=spaceshippirate />
412              </templates>
413              <controller>
414            <WaypointPatrolController alertnessradius=1000 active=true team=1>
415              <waypoints>
416                <StaticEntity position="0,<?lua print(math.random()*50)?> ,<?lua print(i*50 -2000) ?>" />
417              </waypoints>
418            </WaypointPatrolController>
419              </controller>
420            </SpaceShip>
421        <?lua
422        end
423        ?>
424   
425        <?lua
426        for i = 1,2, 1
427        do
428        ?>
429            <SpaceShip position="600,300,-6000">
430              <templates>
431            <Template link=spaceshippirate />
432              </templates>
433              <controller>
434            <WaypointPatrolController alertnessradius=1000 active=true team=1>
435              <waypoints>
436                <StaticEntity position="600,300,-6000" />
437              </waypoints>
438            </WaypointPatrolController>
439              </controller>
440            </SpaceShip>
441        <?lua
442        end
443        ?>
444   
445    <!-- Pirates at the end of wrong Navi line (get visible when you get near them)-->
446     <SpaceShip position="1600,2300,-10000" active=true visible=true name=navipirate1>
447              <templates>
448            <Template link=spaceshippirate />
449              </templates>
450              <controller>
451            <WaypointPatrolController alertnessradius=1000 name=navipirate1 active=true team=1>
452              <waypoints>
453                <StaticEntity position="1600,2300,-10000" />
454              </waypoints>
455            </WaypointPatrolController>
456              </controller>
457            </SpaceShip>
458   
459    <SpaceShip position="7600,300,-8000" active=true visible=true name=navipirate2>
460              <templates>
461            <Template link=spaceshippirate />
462              </templates>
463              <controller>
464            <WaypointPatrolController alertnessradius=1000 name=navipirate2 active=true team=1>
465              <waypoints>
466                <StaticEntity position="7600,300,-8000" />
467              </waypoints>
468            </WaypointPatrolController>
469              </controller>
470        </SpaceShip>
471   
472   
473    <EventDispatcher>
474                <targets>
475                    <EventTarget target=navipirate1 />
476                </targets>
477                <events>
478                    <visibility>
479                        <QuestListener questId="9930a598-98bc-4ff8-8cc0-31311a6ccaab" mode="start" />
480                    </visibility>
481                    <activity>
482                        <QuestListener questId="9930a598-98bc-4ff8-8cc0-31311a6ccaab" mode="start" />
483                    </activity>
484                </events>
485            </EventDispatcher>
486   
487    <EventDispatcher>
488                <targets>
489                    <EventTarget target=navipirate2 />
490                </targets>
491                <events>
492                    <visibility>
493                        <QuestListener questId="9930a598-98bc-4ff8-8cc0-31311a6ccaaa" mode="start" />
494                    </visibility>
495                    <activity>
496                        <QuestListener questId="9930a598-98bc-4ff8-8cc0-31311a6ccaaa" mode="start" />
497                    </activity>
498                </events>
499            </EventDispatcher>
500    <!-- Pirates at the end of wrong Navi line **** end-->
501   
502    <!--Security man from mining corp.-->
503    <SpaceShip position="4000,4000,-20000">
504              <templates>
505            <Template link=spaceshipassff/>
506              </templates>
507              <controller>
508            <WaypointPatrolController alertnessradius=1000 team=0 active=false>
509              <waypoints>
510                <StaticEntity position="4000,4000,-20000" />
511              </waypoints>
512            </WaypointPatrolController>
513              </controller>
514    </SpaceShip>
515   
516    <!-- Asteroid field-->
517            <StaticEntity position="-400,2000,-7000">
518                <attached>
519                    <?lua
520                        for i = 1, 180
521                        do ?>
522                        <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)) ?>">
523                            <attached>
524                                <Model scale="<?lua print(math.random() * 100) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
525                            </attached>
526                        </MovableEntity>
527                    <?lua
528                        end
529                    ?>
530            </attached>
531        </StaticEntity>
532    <!--Planet with asteroid belt-->
533    <Planet mesh="iceplanet.mesh" position="2600,4300,-20000" scale=1000 atmosphere="atmosphere1" atmospheresize=224.0f imagesize=1024.0f/>
534    <StaticEntity position="2600,4300,-20000" collisionType=static>
535          <collisionShapes>
536            <SphereCollisionShape radius="1000" />
537          </collisionShapes>
538                          <attached>
539                <?lua
540                for i = 1, 100
541                do
542                k=(math.random() * 2600 -1300)
543                if math.random()<0.5 then
544                l=(1300^2-k^2)^(0.5)
545                else
546                l=-(1300^2-k^2)^(0.5)
547                end
548                ?>
549   
550                <MovableEntity position="<?lua print(k) ?>,<?lua print(l) ?>, <?lua print(math.random() * 100) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.abs(math.random() * 30 -10)) ?>">
551
552                    <attached>
553                    <Model scale="<?lua print(math.random() * 25) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
554                    </attached>
555                </MovableEntity>
556                <?lua
557                end
558                ?>
559                            </attached>
560        </StaticEntity>
561   
562    </Scene>
563</Level>
Note: See TracBrowser for help on using the repository browser.