3761
|
1 |
-- IMPORTANT -- THIS IS WORK IN PROGRESS AND VERY LIKELY TO BE CHANGED AGAIN
|
|
2 |
-- IMPORTANT -- SAVE YOURSELF THE WORK AND DON'T TRANSLATE THE TEXTS IF YOU FEAR STARTING OVER LATER!
|
|
3 |
|
|
4 |
local teamnames = {}
|
|
5 |
local hognames = {}
|
|
6 |
teamnames[0] = {
|
|
7 |
["en"] = "Bloody Rookies",
|
4070
|
8 |
["de"] = "Blutige Anfänger",
|
4073
|
9 |
["pl"] = "Żótodzioby",
|
|
10 |
["sv"] = "Blodiga nybörjare"
|
3761
|
11 |
}
|
|
12 |
|
|
13 |
teamnames[1] = {
|
|
14 |
["en"] = "Instructors",
|
4051
|
15 |
["de"] = "Ausbilder",
|
4073
|
16 |
["pl"] = "Instruktor",
|
|
17 |
["sv"] = "Instruktör"
|
3761
|
18 |
}
|
|
19 |
|
|
20 |
hognames[0] = {
|
|
21 |
["en"] = "Joker",
|
4051
|
22 |
["de"] = "Joker",
|
4073
|
23 |
["pl"] = "Joker",
|
|
24 |
["sv"] = "Joker"
|
3761
|
25 |
}
|
|
26 |
|
|
27 |
hognames[1] = {
|
|
28 |
["en"] = "Harthog",
|
4051
|
29 |
["de"] = "Harthog",
|
4073
|
30 |
["pl"] = "Harthog",
|
|
31 |
["sv"] = "Harthog"
|
3761
|
32 |
}
|
|
33 |
|
|
34 |
local caption = {
|
|
35 |
["en"] = "Boot Camp",
|
4051
|
36 |
["de"] = "Grundausbildung",
|
4073
|
37 |
["pl"] = "Poligon",
|
|
38 |
["sv"] = "Grundutbildning"
|
3761
|
39 |
}
|
|
40 |
|
|
41 |
local subcaption = {
|
|
42 |
["en"] = "Follow the instructions!",
|
4051
|
43 |
["de"] = "Befolge die Anweisungen!",
|
4073
|
44 |
["pl"] = "Wykonuj polecenia!",
|
|
45 |
["sv"] = "Följ instruktioner!"
|
3761
|
46 |
}
|
|
47 |
|
|
48 |
local goals = {}
|
|
49 |
|
|
50 |
goals[0] = {
|
|
51 |
["en"] = "Listen to your Drill Instructor and follow his lead!",
|
4070
|
52 |
["de"] = "Höre deinem Ausbilder zu und befolge seine Anweisungen!",
|
4073
|
53 |
["pl"] = "Słuchaj instruktora i wykonuj jego rozkazy!",
|
|
54 |
["sv"] = "Lyssna på din instruktör och gör som han säger!"
|
3761
|
55 |
}
|
|
56 |
|
|
57 |
goals[1] = {
|
|
58 |
["en"] = "Destroy the target to finish this mission!",
|
4070
|
59 |
["de"] = "Zerstöre das Ziel, um diese Mission abzuschließen!",
|
4073
|
60 |
["pl"] = "Zniszcz cel by ukończyć misję!",
|
|
61 |
["sv"] = "Förstör målet för att avklara uppdraget!"
|
3761
|
62 |
}
|
|
63 |
|
|
64 |
goals[2] = {
|
|
65 |
["en"] = "Excellent! You've passed the Boot Camp!",
|
4051
|
66 |
["de"] = "Ausgezeichnet! Du hast das Ausbildungslager bestanden!",
|
4073
|
67 |
["pl"] = "Doskonale! Wyszedłeś cało z poligonu!",
|
|
68 |
["sv"] = "Brilliant! Du har klarat av grundutbildningen!"
|
3761
|
69 |
}
|
|
70 |
|
|
71 |
local failed = {
|
|
72 |
["en"] = "You failed! Follow the instructions and shoot the target only!",
|
4070
|
73 |
["de"] = "Du hast versagt! Befolge die Anweisungen und schieß nur auf das Ziel!",
|
4073
|
74 |
["pl"] = "Przegrałeś! Wykonuj instrukcje poprawnie i strzelaj tylko w podane cele!",
|
|
75 |
["sv"] = "Du har misslyckats! Följ instruktionerna och sjut endast på målen!"
|
3761
|
76 |
}
|
|
77 |
|
|
78 |
local drill = {}
|
|
79 |
|
|
80 |
drill[0] = {
|
|
81 |
["en"] = "Allright, maggot!",
|
4051
|
82 |
["de"] = "Also gut, du Made!",
|
4073
|
83 |
["pl"] = "Słuchaj mnie gnido!",
|
|
84 |
["sv"] = "Dåså, din mask!"
|
3761
|
85 |
}
|
|
86 |
|
|
87 |
drill[1] = {
|
|
88 |
["en"] = "Show that you aren't that useless.",
|
4051
|
89 |
["de"] = "Zeig, dass du nicht so nutzlos bist.",
|
4073
|
90 |
["pl"] = "Udowodnij, że nie jesteś bezwartościowy.",
|
|
91 |
["sv"] = "Visa att du inte är så värdelös!"
|
3761
|
92 |
}
|
|
93 |
|
|
94 |
drill[2] = {
|
|
95 |
["en"] = "Use [left] to move to the left!",
|
4051
|
96 |
["de"] = "Benutze [Links], um nach links zu gehen!",
|
4073
|
97 |
["pl"] = "Użyj [lewo] by poruszyć się w lewą stronę!",
|
|
98 |
["sv"] = "Använd [vänster] för att gå åt vänster!"
|
3761
|
99 |
}
|
|
100 |
|
|
101 |
drill[3] = {
|
|
102 |
["en"] = "Good! Now use [right] to come back!",
|
4070
|
103 |
["de"] = "Gut! Nun komm mit [Rechts] zurück!",
|
4073
|
104 |
["pl"] = "Dobzre, Teraz użyj [prawo] by wrócić!",
|
|
105 |
["sv"] = "Bra! Använd nu [höger] för att gå tillbaka!"
|
3761
|
106 |
}
|
|
107 |
|
|
108 |
drill[4] = {
|
|
109 |
["en"] = "Excellent!",
|
4051
|
110 |
["de"] = "Ausgezeichnet!",
|
4073
|
111 |
["pl"] = "Wspaniale!",
|
|
112 |
["sv"] = "Utmärkt!"
|
3761
|
113 |
}
|
|
114 |
|
|
115 |
drill[5] = {
|
|
116 |
["en"] = "Now jump to the left using [return]!",
|
4051
|
117 |
["de"] = "Jetzt springe mit [Eingabetaste] nach links!",
|
4073
|
118 |
["pl"] = "Teraz skocz w lewo używając [Enter]",
|
|
119 |
["sv"] = "Hoppa nu åt vänster med hjälp av [enter]!"
|
3761
|
120 |
}
|
|
121 |
|
|
122 |
drill[6] = {
|
|
123 |
["en"] = "Use [up] and [down] to aim.",
|
4051
|
124 |
["de"] = "Benutze [Hoch] und [Runter], um zu zielen.",
|
4073
|
125 |
["pl"] = "Użyj klawiszy [góra] i [dół] by celować.",
|
|
126 |
["sv"] = "Använd [upp] och [ner] för att sikta!"
|
3761
|
127 |
}
|
|
128 |
|
|
129 |
drill[7] = {
|
|
130 |
["en"] = "Hold [space] to power up your shot and then release it to shoot.",
|
4051
|
131 |
["de"] = "Halte [Leertaste], um deinen Schuss aufzuladen, und lasse dann rechtzeitig los.",
|
4073
|
132 |
["pl"] = "Przytrzymaj spację by zwiększyć siłę strzału.",
|
|
133 |
["sv"] = "Håll ner [mellanslag] för att få kraft och släpp för att skjuta!"
|
3761
|
134 |
}
|
|
135 |
|
|
136 |
drill[8] = {
|
|
137 |
["en"] = "Destroy the target to finish your basic training!",
|
4070
|
138 |
["de"] = "Zerstöre das Ziel, um deine Grundausbildung abzuschließen!",
|
4073
|
139 |
["pl"] = "Zniszcz cel by by ukończyć trening podstawowy!",
|
|
140 |
["sv"] = "Förstör målet för att avsluta din grundutbildning!"
|
3761
|
141 |
}
|
|
142 |
|
|
143 |
local function loc(text)
|
|
144 |
if text == nil then return "**missing**"
|
|
145 |
elseif text[L] == nil then return text["en"]
|
|
146 |
else return text[L]
|
|
147 |
end
|
|
148 |
end
|
|
149 |
|
|
150 |
local player = nil
|
|
151 |
local instructor = nil
|
|
152 |
local target = nil
|
|
153 |
|
|
154 |
function onGameStart()
|
|
155 |
|
|
156 |
end
|
|
157 |
|
|
158 |
local player_start_x = 2300
|
|
159 |
local player_start_y = 1250
|
|
160 |
local target_x = 1900
|
|
161 |
local target_y = 1250
|
|
162 |
local player_health = 100
|
|
163 |
local instructor_health = 100
|
|
164 |
local teamcolor = 14483456
|
|
165 |
|
|
166 |
local progress = 0
|
|
167 |
local time_start = 0
|
|
168 |
|
|
169 |
function onGameTick()
|
|
170 |
if progress == -1 and (time_start + 2500) == GameTime then
|
|
171 |
EndGame()
|
|
172 |
elseif progress == -1 then
|
|
173 |
|
|
174 |
elseif progress > 0 and ((TurnTimeLeft == 0) or (GetHealth(player) ~= player_health) or (GetHealth(instructor) ~= instructor_health)) then
|
|
175 |
progress = -1
|
|
176 |
ShowMission(loc(caption), loc(subcaption), loc(failed), -amBazooka, 0);
|
|
177 |
time_start = GameTime
|
|
178 |
PlaySound(sndNooo)
|
|
179 |
TurnTimeLeft = 0
|
|
180 |
elseif GameTime == 0 then
|
|
181 |
ShowMission(loc(caption), loc(subcaption), loc(goals[0]), -amBazooka, 0);
|
|
182 |
TurnTimeLeft = 60000
|
|
183 |
elseif GameTime == 2500 then
|
|
184 |
FollowGear(instructor)
|
|
185 |
HogSay(instructor, loc(drill[0]), SAY_SAY)
|
|
186 |
elseif GameTime == 5000 then
|
|
187 |
FollowGear(instructor)
|
|
188 |
HogSay(instructor, loc(drill[1]), SAY_SAY)
|
|
189 |
elseif GameTime == 7500 then
|
|
190 |
FollowGear(instructor)
|
|
191 |
HogSay(instructor, loc(drill[2]), SAY_SHOUT)
|
|
192 |
progress = 1
|
|
193 |
TurnTimeLeft = 10000
|
|
194 |
elseif progress == 1 then
|
|
195 |
local x, y = GetGearPosition(player);
|
|
196 |
if x < player_start_x - 50 then
|
|
197 |
progress = 2
|
|
198 |
FollowGear(instructor)
|
|
199 |
HogSay(instructor, loc(drill[3]), SAY_SHOUT)
|
3762
|
200 |
TurnTimeLeft = 10000
|
3761
|
201 |
end
|
|
202 |
elseif progress == 2 then
|
|
203 |
local x, y = GetGearPosition(player);
|
|
204 |
if x > player_start_x then
|
|
205 |
progress = 3
|
|
206 |
FollowGear(instructor)
|
|
207 |
HogSay(instructor, loc(drill[4]), SAY_SAY)
|
|
208 |
time_start = GameTime
|
|
209 |
end
|
|
210 |
elseif progress == 3 and (time_start + 2500 == GameTime) then
|
|
211 |
progress = 4
|
|
212 |
FollowGear(instructor)
|
|
213 |
HogSay(instructor, loc(drill[5]), SAY_SHOUT)
|
|
214 |
HogTurnLeft(player, true)
|
|
215 |
TurnTimeLeft = 10000
|
|
216 |
elseif progress == 4 then
|
|
217 |
local x, y = GetGearPosition(player);
|
|
218 |
if y < player_start_y then
|
|
219 |
progress = 5
|
|
220 |
FollowGear(instructor)
|
|
221 |
HogSay(instructor, "Yeah!", SAY_SAY)
|
|
222 |
time_start = GameTime
|
|
223 |
TurnTimeLeft = 30000
|
|
224 |
end
|
|
225 |
elseif progress == 5 and (time_start + 2500 == GameTime) then
|
|
226 |
FollowGear(instructor)
|
|
227 |
HogSay(instructor, loc(drill[6]), SAY_SAY)
|
|
228 |
elseif progress == 5 and (time_start + 5000 == GameTime) then
|
|
229 |
FollowGear(instructor)
|
|
230 |
HogSay(instructor, loc(drill[7]), SAY_SAY)
|
|
231 |
elseif progress == 5 and (time_start + 7500 == GameTime) then
|
|
232 |
FollowGear(instructor)
|
|
233 |
HogSay(instructor, loc(drill[8]), SAY_SHOUT)
|
|
234 |
ShowMission(loc(caption), loc(subcaption), loc(goals[1]), 1, 0);
|
|
235 |
target = AddGear(target_x, target_y, gtTarget, 0, 0, 0, 0)
|
|
236 |
TurnTimeLeft = 60000
|
|
237 |
elseif progress == 5 and (time_start + 10000 == GameTime) then
|
|
238 |
FollowGear(target)
|
|
239 |
elseif progress == 6 then
|
|
240 |
progress = 7
|
|
241 |
ShowMission(loc(caption), loc(subcaption), loc(goals[2]), 0, 0);
|
|
242 |
PlaySound(sndVictory);
|
|
243 |
time_start = GameTime
|
|
244 |
elseif progress == 7 and (time_start + 2500 == GameTime) then
|
|
245 |
EndGame()
|
|
246 |
end
|
|
247 |
end
|
|
248 |
|
|
249 |
function onGameInit()
|
|
250 |
Seed = 0
|
|
251 |
GameFlags = gfMultiWeapon + gfOneClanMode
|
|
252 |
TurnTime = 25000
|
|
253 |
CaseFreq = 0
|
|
254 |
LandAdds = 0
|
|
255 |
Explosives = 0
|
|
256 |
Delay = 2500
|
|
257 |
Map = "Mushrooms"
|
|
258 |
Theme = "Nature"
|
|
259 |
|
|
260 |
AddTeam(loc(teamnames[0]), teamcolor, "Simple", "Island", "Default")
|
|
261 |
player = AddHog(loc(hognames[0]), 0, player_health, "NoHat")
|
|
262 |
SetGearPosition(player, player_start_x, player_start_y);
|
|
263 |
|
|
264 |
AddTeam(loc(teamnames[1]), teamcolor + 1, "Simple", "Island", "Default")
|
|
265 |
instructor = AddHog(loc(hognames[1]), 0, instructor_health, "NoHat")
|
|
266 |
SetGearPosition(instructor, player_start_x + 100, player_start_y)
|
|
267 |
HogTurnLeft(instructor, true)
|
|
268 |
|
|
269 |
FollowGear(player);
|
|
270 |
end
|
|
271 |
|
|
272 |
function onAmmoStoreInit()
|
|
273 |
SetAmmo(amBazooka, 9, 0, 0, 0)
|
|
274 |
end
|
|
275 |
|
|
276 |
function onGearDelete(gear)
|
|
277 |
if GetGearType(gear) == gtTarget then
|
|
278 |
progress = 6
|
|
279 |
end
|
4051
|
280 |
end
|