forked from kronosaur/Transcendence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommonwealthMilitiaMission01.xml
166 lines (136 loc) · 4.35 KB
/
CommonwealthMilitiaMission01.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version="1.0" ?>
<TranscendenceModule>
<!-- Mission: Patrol Stargates ================================================
EXTRA DATA
reward: Reward (in credits) for completing mission
targetID: The players current target to recon
waypoints: List of remaining objID which player must recon
=========================================================================== -->
<MissionType UNID="&msCMGatePatrol;"
name= "Patrol Orbital Lanes"
attributes= "commonwealthMilitia, rank0"
level= "1-7"
expireTime= "5400"
failureAfterOutOfSystem="5400"
>
<Events>
<OnCreate>
(block (
(gateList (sysFindObject gSource "G -uncharted;"))
)
(switch
; Check if player is experienced enough
(not (milCanEnterCC))
(msnDestroy gSource)
; Make sure there are at least 2 gates
(ls (count gateList) 2)
(msnDestroy gSource)
; The two gates better be at least 50 light-seconds
; away from each other
(ls (objGetDistance (@ gateList 0) (@ gateList 1)) 50)
(msnDestroy gSource)
(block Nil
(msnSetData gSource 'waypoints
(list
(objGetID (objGetObjRefData (@ gateList 0) "NavBeacon"))
(objGetID (@ gateList 0))
(objGetID (@ gateList 1))
(objGetID (objGetObjRefData (@ gateList 1) "NavBeacon"))
(objGetID aOwnerObj)
)
)
)
)
)
</OnCreate>
<OnAccepted>
(msnFireEvent gSource 'OnNextWaypoint)
</OnAccepted>
<OnObjReconned>
(if (= (objGetID aObj) (msnGetData gSource 'targetID))
(msnFireEvent gSource 'OnNextWaypoint)
)
</OnObjReconned>
<OnNextWaypoint>
(block (
(waypoints (msnGetData gSource 'waypoints))
)
(if waypoints
; If we're not done, then prepare the next encounter
(block (
(nextWaypoint (objGetObjByID (@ waypoints 0)))
)
; Prepare the station to be reconned
(staClearReconned nextWaypoint)
(staSetFireReconEvent nextWaypoint)
(msnRegisterForEvents gSource nextWaypoint)
; Create some marauders at the waypoint and send them
; towards the player
(if (leq (random 1 100) 60)
(sysAddEncounterEvent 0 gPlayerShip &etMarauderAmbush1; nextWaypoint)
)
; Remember which waypoint we want
(msnSetData gSource 'targetID (@ waypoints 0))
(msnSetData gSource 'waypoints (lnkRemove waypoints 0))
(msnSetPlayerTarget gSource)
)
; Otherwise, mission is done
(msnSuccess gSource)
)
)
</OnNextWaypoint>
<OnSetPlayerTarget>
(rpgSetTarget gSource aReason (objGetObjByID (msnGetData gSource 'targetID)) 'escort)
</OnSetPlayerTarget>
<OnCompleted>
(milMissionCompleted gSource aReason gData)
</OnCompleted>
<OnReward>
(milGiveReward gSource)
</OnReward>
</Events>
<Language>
<Text id="Name">
"Patrol Orbital Lanes"
</Text>
<Text id="Summary">
(cat
"Your mission is to patrol the orbital lanes in " (sysGetName)
" and destroy and enemy ship.\n\n"
"System: " (sysGetName) "\n"
"Payment: " (fmtCurrency 'credit (msnGetData gSource 'reward))
)
</Text>
<Text id="Intro">
(cat
"You are in the command center surrounded by wall maps and scanner displays. "
"The commanding officer of the fortress looks up from his charts and asks, "
"\"Are you looking for a mission, captain?\""
)
</Text>
<Text id="Briefing">
(cat
"\"Your mission is to patrol the orbital lanes that access the major stargates. "
"Your patrol will take you in a circuit through the system that passes each "
"stargate and returns back here. Your orders are to destroy any enemy ships in "
"the lanes. Understood?\""
)
</Text>
<Text id="AcceptReply">
"\"Good luck, captain!\""
</Text>
<Text id="DeclineReply">
"\"Why don't you make yourself useful and get us some tea or something.\""
</Text>
<Text id="InProgress">
"\"What is your major malfunction!? Get back out there and complete your mission!\""
</Text>
<Text id="FailureDebrief">
"\"You screwed that mission all the way to Sol and back. You better hit the sims, pilot!\""
</Text>
<Text id="SuccessDebrief">
"\"Good work, captain! That was an outstanding mission.\""
</Text>
</Language>
</MissionType>
</TranscendenceModule>