Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9215 was 8958, checked in by baermatt, 13 years ago

Removing unused Level attributes.

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