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