author | Periklis Ntanasis <pntanasis@gmail.com> |
Thu, 19 Sep 2013 02:33:23 +0300 | |
branch | spacecampaign |
changeset 9641 | b08c8bde57e3 |
parent 9088 | 553355472675 |
child 10290 | 42efccba0711 |
permissions | -rw-r--r-- |
8043 | 1 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
7889 | 2 |
|
3 |
local player = nil |
|
4 |
local RCGear = nil |
|
5 |
local planesUsed = 0 |
|
6 |
local cratesLeft = 0 |
|
7 |
||
8 |
function onGameInit() |
|
9 |
||
10 |
Seed = 1 |
|
11 |
GameFlags = gfInfAttack + gfInvulnerable + gfOneClanMode + gfSolidLand |
|
12 |
||
13 |
TurnTime = 90 * 1000 |
|
14 |
||
15 |
Map = "Ropes" |
|
16 |
Theme = "Eyes" |
|
17 |
||
18 |
CaseFreq = 0 |
|
19 |
MinesNum = 0 |
|
20 |
Explosives = 0 |
|
21 |
||
22 |
AddTeam(loc("Wannabe Flyboys"), 14483456, "Simple", "Island", "Default", "Hedgewars") |
|
9088
553355472675
Fix broken x/y values on Dangerous Ducklings
mikade <redgrinner@gmail.com>
parents:
8043
diff
changeset
|
23 |
player = AddHog(loc("Ace"), 0, 80, "Gasmask") |
7889 | 24 |
SetGearPosition(player, 1380, 1500) |
25 |
||
26 |
end |
|
27 |
||
28 |
||
29 |
||
30 |
function onGameStart() |
|
31 |
||
32 |
ShowMission ( |
|
33 |
loc("RC PLANE TRAINING"), |
|
34 |
loc("a Hedgewars challenge"), |
|
35 |
||
36 |
loc("Collect or destroy all the health crates.") .. "|" .. |
|
37 |
loc("Compete to use as few planes as possible!") .. "|" .. |
|
38 |
"", -amRCPlane, 4000 |
|
39 |
) |
|
40 |
||
41 |
PlaceGirder(2192, 508, 6) |
|
42 |
PlaceGirder(2192, 670, 6) |
|
43 |
PlaceGirder(2193, 792, 2) |
|
44 |
PlaceGirder(2100, 825, 4) |
|
45 |
PlaceGirder(2009, 899, 6) |
|
46 |
PlaceGirder(2084, 992, 4) |
|
47 |
PlaceGirder(2145, 1087, 6) |
|
48 |
PlaceGirder(2199, 1235, 5) |
|
49 |
PlaceGirder(2308, 1296, 0) |
|
50 |
PlaceGirder(2424, 1234, 7) |
|
51 |
PlaceGirder(2473, 1129, 2) |
|
52 |
PlaceGirder(2437, 1046, 1) |
|
53 |
PlaceGirder(2409, 927, 6) |
|
54 |
PlaceGirder(2408, 763, 6) |
|
55 |
PlaceGirder(2404, 540, 6) |
|
56 |
PlaceGirder(2426, 423, 3) |
|
57 |
PlaceGirder(2550, 400, 4) |
|
58 |
PlaceGirder(2668, 425, 1) |
|
59 |
PlaceGirder(2707, 541, 6) |
|
60 |
PlaceGirder(2706, 703, 6) |
|
61 |
PlaceGirder(2705, 867, 6) |
|
62 |
PlaceGirder(2779, 962, 4) |
|
63 |
PlaceGirder(2894, 924, 3) |
|
64 |
PlaceGirder(2908, 802, 6) |
|
65 |
PlaceGirder(2907, 639, 6) |
|
66 |
PlaceGirder(3052, 566, 4) |
|
67 |
PlaceGirder(2971, 394, 4) |
|
68 |
PlaceGirder(3103, 448, 7) |
|
69 |
PlaceGirder(3047, 654, 0) |
|
70 |
PlaceGirder(3043, 746, 6) |
|
71 |
PlaceGirder(3265, 1583, 6) |
|
72 |
PlaceGirder(3256, 1491, 4) |
|
73 |
PlaceGirder(3187, 1401, 6) |
|
74 |
PlaceGirder(3326, 1400, 6) |
|
75 |
PlaceGirder(774, 530, 5) |
|
76 |
PlaceGirder(922, 595, 4) |
|
77 |
PlaceGirder(1079, 533, 7) |
|
78 |
PlaceGirder(1139, 386, 6) |
|
79 |
PlaceGirder(1074, 237, 5) |
|
80 |
PlaceGirder(723, 381, 6) |
|
81 |
PlaceGirder(781, 229, 7) |
|
82 |
PlaceGirder(927, 746, 6) |
|
83 |
PlaceGirder(874, 736, 0) |
|
84 |
PlaceGirder(982, 737, 0) |
|
85 |
PlaceGirder(2430, 1730, 4) |
|
86 |
||
87 |
PlaceGirder(1613, 1104, 7) |
|
88 |
PlaceGirder(1564, 1256, 6) |
|
89 |
PlaceGirder(1643, 1341, 5) |
|
90 |
PlaceGirder(1780, 1372, 4) |
|
91 |
PlaceGirder(1869, 1296, 7) |
|
92 |
PlaceGirder(1858, 1163, 5) |
|
93 |
PlaceGirder(1739, 1044, 5) |
|
94 |
PlaceGirder(1621, 926, 5) |
|
95 |
PlaceGirder(1597, 985, 5) |
|
96 |
PlaceGirder(1449, 939, 4) |
|
97 |
PlaceGirder(1473, 874, 4) |
|
98 |
PlaceGirder(2092, 1352, 7) |
|
99 |
PlaceGirder(2145, 1444, 7) |
|
100 |
PlaceGirder(2004, 1443, 3) |
|
101 |
PlaceGirder(1978, 1523, 2) |
|
102 |
PlaceGirder(2021, 1596, 1) |
|
103 |
PlaceGirder(2103, 1625, 0) |
|
104 |
PlaceGirder(2208, 1551, 7) |
|
105 |
PlaceGirder(2327, 1431, 7) |
|
106 |
PlaceGirder(2395, 1478, 6) |
|
107 |
PlaceGirder(2396, 1600, 2) |
|
108 |
PlaceGirder(2495, 1285, 6) |
|
109 |
PlaceGirder(2494, 1408, 2) |
|
110 |
PlaceGirder(2547, 530, 0) |
|
111 |
||
112 |
PlaceGirder(2451, 1551, 0) |
|
113 |
PlaceGirder(2551, 706, 6) |
|
114 |
PlaceGirder(2551, 869, 6) |
|
115 |
PlaceGirder(2623, 1016, 5) |
|
116 |
PlaceGirder(2773, 1083, 4) |
|
117 |
PlaceGirder(2924, 1019, 7) |
|
118 |
PlaceGirder(2568, 1491, 7) |
|
119 |
PlaceGirder(2618, 1346, 6) |
|
120 |
PlaceGirder(2674, 1195, 7) |
|
121 |
PlaceGirder(2822, 1142, 4) |
|
122 |
PlaceGirder(2963, 1069, 7) |
|
123 |
PlaceGirder(3067, 938, 5) |
|
124 |
PlaceGirder(2803, 1373, 2) |
|
125 |
PlaceGirder(2811, 1559, 2) |
|
126 |
||
127 |
tempG = SpawnHealthCrate(930, 557) |
|
128 |
SetHealth(tempG, 25) |
|
129 |
tempG = SpawnHealthCrate(979, 692) |
|
130 |
SetHealth(tempG, 25) |
|
131 |
tempG = SpawnHealthCrate(876, 703) |
|
132 |
SetHealth(tempG, 25) |
|
133 |
tempG = SpawnHealthCrate(2309, 1260) |
|
134 |
SetHealth(tempG, 25) |
|
135 |
tempG = SpawnHealthCrate(1733, 1127) |
|
136 |
SetHealth(tempG, 25) |
|
137 |
tempG = SpawnHealthCrate(1738, 1320) |
|
138 |
SetHealth(tempG, 25) |
|
139 |
tempG = SpawnHealthCrate(3249, 1460) |
|
140 |
SetHealth(tempG, 25) |
|
141 |
tempG = SpawnHealthCrate(3051, 617) |
|
142 |
SetHealth(tempG, 25) |
|
143 |
tempG = SpawnHealthCrate(2972, 353) |
|
144 |
SetHealth(tempG, 25) |
|
145 |
tempG = SpawnHealthCrate(2548, 358) |
|
146 |
||
147 |
SetHealth(tempG, 25) |
|
148 |
tempG = SpawnHealthCrate(2090, 1580) |
|
149 |
SetHealth(tempG, 25) |
|
150 |
tempG = SpawnHealthCrate(1752, 1753) |
|
151 |
SetHealth(tempG, 25) |
|
152 |
tempG = SpawnHealthCrate(1865, 1758) |
|
153 |
SetHealth(tempG, 25) |
|
154 |
tempG = SpawnHealthCrate(1985, 1760) |
|
155 |
SetHealth(tempG, 25) |
|
156 |
tempG = SpawnHealthCrate(2429, 1760) |
|
157 |
SetHealth(tempG, 25) |
|
158 |
tempG = SpawnHealthCrate(2810, 1480) |
|
159 |
SetHealth(tempG, 25) |
|
160 |
tempG = SpawnHealthCrate(2800, 1277) |
|
161 |
SetHealth(tempG, 25) |
|
162 |
tempG = SpawnHealthCrate(2806, 1107) |
|
163 |
SetHealth(tempG, 25) |
|
164 |
||
165 |
PlaceGirder(1897, 903, 6) |
|
166 |
PlaceGirder(1916, 784, 3) |
|
167 |
PlaceGirder(2010, 732, 4) |
|
168 |
PlaceGirder(2082, 639, 6) |
|
169 |
PlaceGirder(2081, 516, 2) |
|
170 |
PlaceGirder(1985, 487, 4) |
|
171 |
PlaceGirder(1862, 407, 5) |
|
172 |
PlaceGirder(1855, 224, 7) |
|
173 |
PlaceGirder(2006, 163, 4) |
|
174 |
PlaceGirder(2128, 187, 1) |
|
175 |
PlaceGirder(2251, 213, 4) |
|
176 |
PlaceGirder(2413, 213, 4) |
|
177 |
PlaceGirder(1952, 618, 0) |
|
178 |
PlaceGirder(957, 1068, 4) |
|
179 |
PlaceGirder(794, 1069, 4) |
|
180 |
PlaceGirder(728, 1163, 6) |
|
181 |
PlaceGirder(728, 1287, 2) |
|
182 |
PlaceGirder(802, 1342, 4) |
|
183 |
PlaceGirder(966, 1342, 4) |
|
184 |
PlaceGirder(674, 1032, 1) |
|
185 |
PlaceGirder(554, 1011, 4) |
|
186 |
PlaceGirder(445, 1056, 3) |
|
187 |
PlaceGirder(422, 1174, 6) |
|
188 |
PlaceGirder(369, 1341, 5) |
|
189 |
PlaceGirder(495, 1313, 5) |
|
190 |
PlaceGirder(568, 1379, 3) |
|
191 |
PlaceGirder(577, 1202, 2) |
|
192 |
PlaceGirder(744, 1490, 5) |
|
193 |
PlaceGirder(760, 1617, 7) |
|
194 |
PlaceGirder(622, 1693, 4) |
|
195 |
PlaceGirder(476, 1623, 5) |
|
196 |
PlaceGirder(376, 1697, 1) |
|
197 |
PlaceGirder(955, 1746, 2) |
|
198 |
PlaceGirder(1025, 1746, 2) |
|
199 |
PlaceGirder(1090, 1745, 2) |
|
200 |
PlaceGirder(1156, 1746, 2) |
|
201 |
PlaceGirder(3806, 1530, 2) |
|
202 |
PlaceGirder(3880, 1464, 2) |
|
203 |
PlaceGirder(3738, 1458, 2) |
|
204 |
PlaceGirder(3806, 1390, 2) |
|
205 |
PlaceGirder(3805, 1588, 0) |
|
206 |
PlaceGirder(3676, 1609, 3) |
|
207 |
PlaceGirder(3930, 1615, 1) |
|
208 |
PlaceGirder(3719, 1295, 0) |
|
209 |
PlaceGirder(3888, 1294, 0) |
|
210 |
PlaceGirder(3661, 1385, 2) |
|
211 |
PlaceGirder(3955, 1377, 2) |
|
212 |
PlaceGirder(3982, 1518, 0) |
|
213 |
PlaceGirder(3378, 440, 2) |
|
214 |
PlaceGirder(3447, 492, 4) |
|
215 |
PlaceGirder(3564, 529, 1) |
|
216 |
PlaceGirder(3596, 647, 6) |
|
217 |
PlaceGirder(3521, 740, 4) |
|
218 |
PlaceGirder(3524, 838, 4) |
|
219 |
PlaceGirder(3644, 819, 3) |
|
220 |
PlaceGirder(3691, 708, 6) |
|
221 |
PlaceGirder(3690, 545, 6) |
|
222 |
PlaceGirder(3612, 433, 5) |
|
223 |
PlaceGirder(3463, 383, 4) |
|
224 |
PlaceGirder(2815, 122, 7) |
|
225 |
PlaceGirder(2960, 72, 4) |
|
226 |
PlaceGirder(3032, 123, 2) |
|
227 |
PlaceGirder(3063, 174, 0) |
|
228 |
PlaceGirder(3095, 124, 2) |
|
229 |
PlaceGirder(3169, 71, 4) |
|
230 |
PlaceGirder(3320, 124, 5) |
|
231 |
PlaceGirder(3210, 179, 2) |
|
232 |
PlaceGirder(2932, 181, 2) |
|
233 |
||
234 |
tempG = SpawnHealthCrate(3804, 1461) |
|
235 |
SetHealth(tempG, 25) |
|
236 |
tempG = SpawnHealthCrate(3269, 1742) |
|
237 |
SetHealth(tempG, 25) |
|
238 |
tempG = SpawnHealthCrate(3066, 121) |
|
239 |
SetHealth(tempG, 25) |
|
240 |
tempG = SpawnHealthCrate(3207, 104) |
|
241 |
SetHealth(tempG, 25) |
|
242 |
tempG = SpawnHealthCrate(2928, 103) |
|
243 |
SetHealth(tempG, 25) |
|
244 |
tempG = SpawnHealthCrate(1997, 202) |
|
245 |
SetHealth(tempG, 25) |
|
246 |
tempG = SpawnHealthCrate(2253, 159) |
|
247 |
SetHealth(tempG, 25) |
|
248 |
tempG = SpawnHealthCrate(2132, 774) |
|
249 |
SetHealth(tempG, 25) |
|
250 |
tempG = SpawnHealthCrate(2549, 490) |
|
251 |
SetHealth(tempG, 25) |
|
252 |
tempG = SpawnHealthCrate(3527, 694) |
|
253 |
SetHealth(tempG, 25) |
|
254 |
tempG = SpawnHealthCrate(3777, 78) |
|
255 |
SetHealth(tempG, 25) |
|
256 |
tempG = SpawnHealthCrate(1124, 1746) |
|
257 |
SetHealth(tempG, 25) |
|
258 |
tempG = SpawnHealthCrate(1056, 1740) |
|
259 |
SetHealth(tempG, 25) |
|
260 |
tempG = SpawnHealthCrate(993, 1742) |
|
261 |
SetHealth(tempG, 25) |
|
262 |
tempG = SpawnHealthCrate(799, 1298) |
|
263 |
SetHealth(tempG, 25) |
|
264 |
tempG = SpawnHealthCrate(577, 1126) |
|
265 |
SetHealth(tempG, 25) |
|
266 |
tempG = SpawnHealthCrate(596, 1463) |
|
267 |
SetHealth(tempG, 25) |
|
268 |
tempG = SpawnHealthCrate(3854, 1043) |
|
269 |
SetHealth(tempG, 25) |
|
270 |
tempG = SpawnHealthCrate(1944, 567) |
|
271 |
SetHealth(tempG, 25) |
|
272 |
tempG = SpawnHealthCrate(338, 1748) |
|
273 |
SetHealth(tempG, 25) |
|
274 |
||
275 |
||
276 |
end |
|
277 |
||
278 |
--function onGameTick() |
|
279 |
||
280 |
--if RCGear ~= nil then |
|
281 |
-- AddCaption(GetTimer(RCGear)) |
|
282 |
--end |
|
283 |
||
284 |
--end |
|
285 |
||
286 |
function onNewTurn() |
|
287 |
TurnTimeLeft = -1 |
|
288 |
end |
|
289 |
||
290 |
function onGearAdd(gear) |
|
291 |
||
292 |
if GetGearType(gear) == gtRCPlane then |
|
293 |
RCGear = gear |
|
294 |
planesUsed = planesUsed + 1 |
|
295 |
end |
|
296 |
||
297 |
if GetGearType(gear) == gtCase then |
|
298 |
cratesLeft = cratesLeft + 1 |
|
299 |
end |
|
300 |
||
301 |
end |
|
302 |
||
303 |
function onGearDelete(gear) |
|
304 |
||
305 |
if GetGearType(gear) == gtRCPlane then |
|
306 |
||
307 |
RCGear = nil |
|
308 |
AddCaption(loc("Planes Used:") .. " " .. planesUsed) |
|
309 |
||
310 |
elseif GetGearType(gear) == gtCase then |
|
311 |
||
312 |
AddCaption(loc("Crates Left:") .. " " .. cratesLeft) |
|
313 |
cratesLeft = cratesLeft - 1 |
|
314 |
||
315 |
if cratesLeft == 0 then |
|
316 |
||
9088
553355472675
Fix broken x/y values on Dangerous Ducklings
mikade <redgrinner@gmail.com>
parents:
8043
diff
changeset
|
317 |
if planesUsed == 1 then |
553355472675
Fix broken x/y values on Dangerous Ducklings
mikade <redgrinner@gmail.com>
parents:
8043
diff
changeset
|
318 |
AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Prestigious Pilot"),0xffba00ff,capgrpMessage2) |
553355472675
Fix broken x/y values on Dangerous Ducklings
mikade <redgrinner@gmail.com>
parents:
8043
diff
changeset
|
319 |
end |
553355472675
Fix broken x/y values on Dangerous Ducklings
mikade <redgrinner@gmail.com>
parents:
8043
diff
changeset
|
320 |
|
7889 | 321 |
ShowMission ( |
322 |
loc("CHALLENGE COMPLETE"), |
|
323 |
loc("Congratulations!"), |
|
324 |
loc("Planes Used") .. ": " .. planesUsed .. "|" .. |
|
325 |
"", 0, 0 |
|
326 |
) |
|
327 |
||
328 |
||
329 |
ParseCommand("teamgone Wannabe Flyboys") |
|
330 |
end |
|
331 |
||
332 |
if RCGear ~= nil then |
|
333 |
SetTimer(RCGear, GetTimer(RCGear) + 10000) |
|
334 |
end |
|
335 |
||
336 |
end |
|
337 |
||
338 |
end |
|
339 |
||
340 |
function onAmmoStoreInit() |
|
341 |
SetAmmo(amRCPlane, 9, 0, 0, 0) |
|
342 |
end |