<h1>De Schietschool</h1>
<p>
Schiet binnen 30 seconden. Zoveel mogenlijk punten binnen.
Het is de bedoeling dat je zo veel mogelijk targets raakt, per target krijg je 1-5 punten.
Mis je een target? Dan ontvang je twee strafpunten.
Schiet hier zo vaak als je wil Helemaal Gratis.
</p>
<table class="content_table" style="margin: 10px auto; width: 500px; padding: 0">
<tr>
<td width=20% class="donker">Tijd</td><td width=30% class="licht"><span id="timer">30</span> Seconden</td>
</tr><tr>
<td class="donker">Score</td><td class="licht"><span id="score">0</span> Punten</td>
</tr><tr>
</tr>
</table>
<div style="width: 500px; height: 300px; background: url('/images/shooting/background.jpg'); margin: 0 auto;">
<div style="width: 500px; height: 300px; overflow: hidden; cursor: crosshair; position: relative;" onclick="shooting_hit(this,0);">
<img onclick="shooting_hit(this,1);" id="target1" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,2);" id="target2" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target2.png"/><img onclick="shooting_hit(this,3);" id="target3" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target5.png"/><img onclick="shooting_hit(this,4);" id="target4" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,5);" id="target5" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target5.png"/><img onclick="shooting_hit(this,6);" id="target6" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target3.png"/><img onclick="shooting_hit(this,7);" id="target7" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target2.png"/><img onclick="shooting_hit(this,8);" id="target8" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target4.png"/><img onclick="shooting_hit(this,9);" id="target9" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target3.png"/><img onclick="shooting_hit(this,10);" id="target10" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target2.png"/><img onclick="shooting_hit(this,11);" id="target11" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target5.png"/><img onclick="shooting_hit(this,12);" id="target12" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target2.png"/><img onclick="shooting_hit(this,13);" id="target13" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target2.png"/><img onclick="shooting_hit(this,14);" id="target14" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,15);" id="target15" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target5.png"/><img onclick="shooting_hit(this,16);" id="target16" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target3.png"/><img onclick="shooting_hit(this,17);" id="target17" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target4.png"/><img onclick="shooting_hit(this,18);" id="target18" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target4.png"/><img onclick="shooting_hit(this,-19);" id="target19" style="position: absolute; top: -100px; left: -100px;" src="/images/icons_02/stats_credits.png"/><img onclick="shooting_hit(this,20);" id="target20" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,21);" id="target21" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,22);" id="target22" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,23);" id="target23" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,24);" id="target24" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target5.png"/><img onclick="shooting_hit(this,25);" id="target25" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target3.png"/><img onclick="shooting_hit(this,26);" id="target26" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target4.png"/><img onclick="shooting_hit(this,27);" id="target27" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target5.png"/><img onclick="shooting_hit(this,28);" id="target28" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target4.png"/><img onclick="shooting_hit(this,29);" id="target29" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target5.png"/><img onclick="shooting_hit(this,30);" id="target30" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target3.png"/><img onclick="shooting_hit(this,31);" id="target31" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target2.png"/><img onclick="shooting_hit(this,32);" id="target32" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target3.png"/><img onclick="shooting_hit(this,33);" id="target33" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target5.png"/><img onclick="shooting_hit(this,34);" id="target34" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target2.png"/><img onclick="shooting_hit(this,35);" id="target35" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target3.png"/><img onclick="shooting_hit(this,36);" id="target36" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,37);" id="target37" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,38);" id="target38" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target2.png"/><img onclick="shooting_hit(this,39);" id="target39" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,40);" id="target40" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target5.png"/><img onclick="shooting_hit(this,41);" id="target41" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target3.png"/><img onclick="shooting_hit(this,42);" id="target42" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target2.png"/><img onclick="shooting_hit(this,43);" id="target43" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target1.png"/><img onclick="shooting_hit(this,44);" id="target44" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target4.png"/><img onclick="shooting_hit(this,45);" id="target45" style="position: absolute; top: -100px; left: -100px;" src="/images/shooting/target4.png"/> <img id="gameover" style="display: none; position: absolute; top: 136px; left: 196px" src="/images/shooting/gameover.png"/>
</div>
</div>
<script type="text/javascript">
var score = 0;
var score2 = 0;
var l39c7197a = [-80,-80,580,580,-80,580,580,-80,-80,-80,580,-80,-80,580,580,580,-80,-80,580,-80,-80,-80,580,-80,580,-80,-80,-80,-80,-80,580,580,-80,-80,-80,-80,-80,580,580,580,-80,-80,580,-80,-80];
var tops = [92,70,4,45,129,62,28,73,84,142,3,161,173,92,65,46,74,83,16,157,54,129,59,184,25,52,191,73,159,106,27,3,167,88,192,58,152,3,71,47,126,126,12,91,112];
var mileft = [8,8,-10,-11,11,-5,-8,6,6,8,-8,8,8,-7,-5,-11,9,10,-5,10,7,9,-8,6,-10,7,7,11,11,5,-10,-5,11,6,5,5,10,-10,-9,-8,10,9,-8,10,9];
var maleft = [16,16,-20,-22,22,-10,-16,12,12,16,-16,16,16,-14,-10,-22,18,20,-10,20,14,18,-16,12,-20,14,14,22,22,10,-20,-10,22,12,10,10,20,-20,-18,-16,20,18,-16,20,18];
var mitop = [-2,-6,-3,-3,-5,-3,-7,-5,-6,-7,-5,-1,-2,-5,-5,-8,-8,-5,-3,-7,-7,-3,-8,-1,-2,-4,-3,-6,-6,-5,-4,-1,-6,-5,-6,-3,-7,-6,-6,-4,-6,-8,-5,-5,-6];
var matop = [2,6,3,3,5,3,7,5,6,7,5,1,2,5,5,8,8,5,3,7,7,3,8,1,2,4,3,6,6,5,4,1,6,5,6,3,7,6,6,4,6,8,5,5,6];
var offsets = [2,12,21,30,39,57,75,87,103,120,131,143,162,171,186,203,214,234,244,262,273,284,301,319,335,347,362,377,386,406,419,430,441,456,472,483,493,507,519,535,550,561,576,594,611];
var hits = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
function shooting_hit(that,id) {
if (playtime <= 0) { return false; }
if (id == 0) {
score = score - 2;
if (score < 0) score = 0;
startgame();
} else if (id > 0 && l39c7197a[id-1] >= -65 && l39c7197a[id-1] <= 565 && that.id == 'target'+id) {
mileft[id-1] = 0;
maleft[id-1] = 0;
mitop[id-1] = 25;
matop[id-1] = 25;
if (hits[id-1] == 0) { score = Math.floor(score + 3 + Math.random()*4); }
hits[id-1] = 1;
} else if (id < 0 && l39c7197a[-id-1] >= -65 && l39c7197a[-id-1] <= 565 && that.id == 'target'+(-id)) {
mileft[-id-1] = 0;
maleft[-id-1] = 0;
mitop[-id-1] = 25;
matop[-id-1] = 25;
if (hits[-id-1] == 0) { score = score + 2; score2 = score2 + 1; }
hits[-id-1] = 1;
} else {
score = 0;
score2 = 0;
playtime = 1;
}
document.getElementById('score').innerHTML = score;
document.getElementById('score2').innerHTML = score2;
}
function movetarget() {
j = 0;
for (var i = 0; i < l39c7197a.length; i++) {
j++;
offsets[i]--;
if (offsets[i] < 0 && hits[i] < 2) {
l39c7197a[i] = l39c7197a[i] + Math.round(Math.random()*mileft[i] + Math.random()*maleft[i]);
tops[i] = tops[i] + Math.round(Math.random()*mitop[i] + Math.random()*matop[i]);
if (l39c7197a[i] < -100) { l39c7197a[i] = -100; hits[i] = 2; }
if (l39c7197a[i] > 600) { l39c7197a[i] = 600; hits[i] = 2; }
if (tops[i] < -100) { tops[i] = -100; hits[i] = 2; }
if (tops[i] > 400) { tops[i] = 400; hits[i] = 2; }
document.getElementById('target'+j).style.left = l39c7197a[i]+'px';
document.getElementById('target'+j).style.top = tops[i]+'px';
}
}
}
var playtime = 30;
function gametimer() {
playtime--;
if (playtime == 0) {
document.getElementById('gameover').style.display = 'inline';
for (var i in tops) {
mileft[i] = 0;
maleft[i] = 0;
mitop[i] = 25;
matop[i] = 25;
}
new Ajax.Request('shooting', {
method: 'post',
parameters: 'game='+gameid+'&score='+score+'&score2='+score2
});
}
if (playtime < 0) playtime = 0;
document.getElementById('timer').innerHTML = playtime;
}
var started = 0;
var gameid = '';
function startgame() {
if (started == 0) {
new Ajax.Request('shooting', {
method: 'post',
parameters: 'start=1',
onSuccess: function(transport) {
gameid = transport.responseText;
if (gameid == '-') {
document.getElementById('gameover').style.display = 'inline';
} else {
started = 1;
window.setInterval('movetarget();', 50);
window.setInterval('gametimer();', 1000);
score = 0;
}
}
});
}
}
</script>