Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/tutorial/data/levels/pirateAttack.oxw @ 9215

Last change on this file since 9215 was 7679, checked in by dafrick, 14 years ago

Renaming levelfiles (and some other) according to our new naming conventions which is using camelCase, without '_' or spaces.

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