Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/notifications/data/levels/Quest_PirateAttack.oxw @ 7619

Last change on this file since 7619 was 7354, checked in by dafrick, 14 years ago

Started work on edit mode. ConsoleCommand is not yet working.
Some additional cleanup. All the NotificationQueues generated by the NotificationManager now are destroyed upon destruction of the NotificationManager.
Removed NotificationQueue from level files.

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