Frame 1
fscommand ("fullscreen", true);
fscommand ("showmenu", false);
money = 400;
wins = 0;
losses = 0;
clips = 1;
paint = 40;
gun = "";
currdiff = 1;
tour = 1;
reputation = 0;
orient = "relative";
challenge1 = false;
challenge2 = false;
challenge3 = false;
p = "p";
b = "b";
r = "r";
c = "c";
var pshoot = new Sound();
pshoot.attachSound("shoot");
var eshoot = new Sound();
eshoot.attachSound("shoot");
bytes = getBytesTotal();
loaded = getBytesLoaded();
percent = (loaded / bytes) * 100;
loadbar.bar._xscale = percent;
levels = 9;
var alevel0 = [[b, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, b], [3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3], [0, 0, 0, 0, 2, 0, 1, 0, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, p, 0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, 1, 0, 2, 0, 0, 0, 0], [3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3], [b, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, b]];
var alevel1 = [[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, b, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0], [b, 0, 3, 1, 3, 0, p, 0, 3, 1, 3, 0, b], [0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, b, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]];
var alevel2 = [[0, 0, 0, 0, 0, 0, 0, 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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, 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, 0, 0, 0, 0, 0, 0]];
var test_level = [[0, r, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [r, r, r, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, r, 0, 0, r, r, 1, r, r, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 0, r, 0, 0, 0, 0], [0, 0, p, 0, 1, 2, 1, 2, 1, 0, b, 0, 0], [c, 0, 0, 0, r, 0, 3, 0, 0, 0, 0, 0, 0], [c, 0, c, 0, r, r, 1, r, r, 0, 0, 0, 0], [c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [c, c, c, c, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
Frame 2
if (bytes != loaded) {
gotoAndPlay (1);
} else {
gotoAndPlay (3);
}
Frame 4
Stage.scaleMode = "noScale";
MochiAd.showPreGameAd({id:"4bd8acd9ec0f3132", res:"800x600", clip:_root.adHolder});
stop();
Frame 5
adHolder.unloadMovie();
adHolder.removeMovieClip();
Stage.scaleMode = "showAll";
Frame 6
stop();
Frame 8
if (orient == "relative") {
orient1_toggle.gotoAndStop(2);
orient2_toggle.gotoAndStop(1);
} else {
orient1_toggle.gotoAndStop(1);
orient2_toggle.gotoAndStop(2);
}
Frame 9
stop();
error_msg = "";
paint_balls = (clips + "x") + paint;
weapon_buy.gotoAndStop(gun);
tours.gotoAndStop(tour);
error_write = function (msg) {
time = getTimer();
error_msg = msg;
onEnterFrame = function () {
if (getTimer() > (time + 5000)) {
error_msg = "";
delete onEnterFrame;
}
};
};
Frame 10
tour1.gotoAndStop(1);
tour2.gotoAndStop(2);
tour3.gotoAndStop(3);
tour4.gotoAndStop(4);
tour5.gotoAndStop(5);
tour6.gotoAndStop(6);
tour7.gotoAndStop(7);
tour8.gotoAndStop(8);
tour9.gotoAndStop(9);
tour10.gotoAndStop(10);
Frame 11
gameover = false;
stat_msg = "";
red = 0;
blue = 0;
winner = "";
bot_gun_weight = 2 - ((diff / 10) * 6);
bot_gun_acc = 1 - ((diff / 6) * 2);
var blocks = new Array();
var paints = new Array();
var enemies = new Array();
var red_team = new Array();
var players = new Array();
time_slot = 15;
if ((paint == 0) && (clips > 0)) {
clips--;
paint = 40;
}
level_load = function (level) {
_root.createEmptyMovieClip("land", 1);
q = 0;
while (q < blocks.length) {
blocks[q] = undefined;
q++;
}
i = 0;
while (i < level.length) {
t = 0;
while (t < level[i].length) {
if (level[i][t] == 1) {
block = land.attachMovie("block", "block" + land.getNextHighestDepth(), land.getNextHighestDepth(), {_x:(t * 100) - 10, _y:i * 100});
blocks.push(block);
} else if (level[i][t] == "p") {
player = attachMovie("redp", "player", _root.getNextHighestDepth(), {_x:(t * 100) + 40, _y:(i * 100) + 50});
red_team.push(player);
players.push(player);
player.all = "red";
red++;
} else if (level[i][t] == "b") {
blueplayer = attachMovie("bluep", "enemy" + enemies.length, _root.getNextHighestDepth(), {_x:(t * 100) + 40, _y:(i * 100) + 50});
enemies.push(blueplayer);
players.push(blueplayer);
blueplayer.all = "blue";
blue++;
} else if (level[i][t] == "r") {
redplayer = attachMovie("redp", "red" + red_ai.length, _root.getNextHighestDepth(), {_x:(t * 100) + 40, _y:(i * 100) + 50});
red_team.push(redplayer);
players.push(redplayer);
redplayer.all = "red";
red++;
}
t++;
}
i++;
}
};
level_load(_root[(level_type + "level") + random(levels)]);
_sprint = 100;
movement_time = getTimer();
player.onEnterFrame = function () {
this.interval = getTimer() - movement_time;
if (paint < 5) {
stat_msg = "Running low on paint!!!";
} else if (paint == 0) {
stat_msg = "RELOAD!!!";
} else {
stat_msg = "";
}
if ((Key.isDown(82) && (reload == false)) && (clips > 0)) {
player.wep.time = getTimer();
player.wep.onEnterFrame = function () {
reload = true;
if (getTimer() > (this.time + 2000)) {
if (paint < 10) {
paint = 30 + random(10);
} else {
paint = 40;
}
clips--;
reload = false;
delete player.wep.onEnterFrame;
}
};
}
if (_sprint < 100) {
_sprint = _sprint + 0.1;
}
ydif = _ymouse - this._y;
xdif = _xmouse - this._x;
rads = Math.atan2(ydif, xdif);
degs = 57.2957795130823 * rads;
this._rotation = degs;
xspeed = Math.cos(rads);
yspeed = Math.sin(rads);
this._xspeed = ((xspeed * (2 - gun_weight)) / time_slot) * this.interval;
this._yspeed = ((yspeed * (2 - gun_weight)) / time_slot) * this.interval;
b_xspeed = Math.cos(rads + ((random(gun_acc * 100) - ((gun_acc * 100) / 2)) / 100));
b_yspeed = Math.sin(rads + ((random(gun_acc * 100) - ((gun_acc * 100) / 2)) / 100));
if (Key.isDown(87) || (Key.isDown(38))) {
this._x = this._x + this._xspeed;
this._y = this._y + this._yspeed;
if (Key.isDown(16) && (_sprint > 0)) {
this._x = this._x + this._xspeed;
this._y = this._y + this._yspeed;
this.sprintingx = this._xspeed;
this.sprintingy = this._yspeed;
_sprint = _sprint - 0.5;
} else {
this.sprintingx = 0;
this.sprintingy = 0;
}
}
if (Key.isDown(83) || (Key.isDown(40))) {
this._x = this._x - this._xspeed;
this._y = this._y - this._yspeed;
}
if (Key.isDown(65) || (Key.isDown(37))) {
this._x = this._x + this._yspeed;
this._y = this._y + (-this._xspeed);
}
if (Key.isDown(68) || (Key.isDown(39))) {
this._x = this._x + (-this._yspeed);
this._y = this._y + this._xspeed;
}
if (this._x < -10) {
this._x = -10;
} else if (this._x > 1280) {
this._x = 1280;
} else if (this._y < 0) {
this._y = 0;
} else if (this._y > 885) {
this._y = 885;
}
};
i = 0;
while (i < enemies.length) {
enemies[i].sprintingx = 0;
enemies[i].sprintingy = 0;
enemies[i].hit = false;
enemies[i].time = getTimer();
enemies[i].shoot_time = getTimer();
enemies[i].onEnterFrame = function () {
this.interval = getTimer() - movement_time;
this.ydif = player._y - this._y;
this.xdif = player._x - this._x;
this.dist = Math.sqrt((this.xdif * this.xdif) + (this.ydif * this.ydif));
this.rads = Math.atan2(this.ydif, this.xdif);
degs = 57.2957795130823 * this.rads;
this._rotation = degs;
if (this.dist > 40) {
this._x = this._x + (((Math.cos(this.rads) * (2 - bot_gun_weight)) / time_slot) * this.interval);
this._y = this._y + (((Math.sin(this.rads) * (2 - bot_gun_weight)) / time_slot) * this.interval);
} else if (this.dist < 40) {
this._x = this._x - (((Math.cos(this.rads) * (2 - bot_gun_weight)) / time_slot) * this.interval);
this._y = this._y - (((Math.sin(this.rads) * (2 - bot_gun_weight)) / time_slot) * this.interval);
}
this.xspeed = Math.cos(this.rads);
this.yspeed = Math.sin(this.rads);
this.b_xspeed = Math.cos(this.rads + ((random(bot_gun_acc * 100) - ((bot_gun_acc * 100) / 2)) / 100));
this.b_yspeed = Math.sin(this.rads + ((random(bot_gun_acc * 100) - ((bot_gun_acc * 100) / 2)) / 100));
if (getTimer() > (this.time + (1100 - (diff * 100)))) {
if (this.hit == "left") {
if (ydif > 0) {
this._xspeed = (-(Math.sin(this.rads) / time_slot)) * this.interval;
this._yspeed = (Math.cos(this.rads) / time_slot) * this.interval;
} else if (ydif < 0) {
this._xspeed = (Math.sin(this.rads) / time_slot) * this.interval;
this._yspeed = (-(Math.cos(this.rads) / time_slot)) * this.interval;
} else {
this._xspeed = (-(Math.sin(this.rads) / time_slot)) * this.interval;
this._yspeed = (Math.cos(this.rads) / time_slot) * this.interval;
}
this.time = getTimer();
} else if (this.hit == "right") {
if (ydif > 0) {
this._xspeed = (Math.sin(this.rads) / time_slot) * this.interval;
this._yspeed = (-(Math.cos(this.rads) / time_slot)) * this.interval;
} else if (ydif < 0) {
this._xspeed = (-(Math.sin(this.rads) / time_slot)) * this.interval;
this._yspeed = (Math.cos(this.rads) / time_slot) * this.interval;
} else {
this._xspeed = (-(Math.sin(this.rads) / time_slot)) * this.interval;
this._yspeed = (Math.cos(this.rads) / time_slot) * this.interval;
}
this.time = getTimer();
} else if (this.hit == "top") {
if (xdif > 0) {
this._xspeed = (-(Math.sin(this.rads) / time_slot)) * this.interval;
this._yspeed = (Math.cos(this.rads) / time_slot) * this.interval;
} else if (xdif < 0) {
this._xspeed = (Math.sin(this.rads) / time_slot) * this.interval;
this._yspeed = (-(Math.cos(this.rads) / time_slot)) * this.interval;
} else {
this._xspeed = (-(Math.sin(this.rads) / time_slot)) * this.interval;
this._yspeed = (Math.cos(this.rads) / time_slot) * this.interval;
}
this.time = getTimer();
} else if (this.hit == "bottom") {
if (xdif > 0) {
this._xspeed = (Math.sin(this.rads) / time_slot) * this.interval;
this._yspeed = (-(Math.cos(this.rads) / time_slot)) * this.interval;
} else if (xdif < 0) {
this._xspeed = (-(Math.sin(this.rads) / time_slot)) * this.interval;
this._yspeed = (Math.cos(this.rads) / time_slot) * this.interval;
} else {
this._xspeed = (Math.sin(this.rads) / time_slot) * this.interval;
this._yspeed = (-(Math.cos(this.rads) / time_slot)) * this.interval;
}
this.time = getTimer();
} else {
this.hit = false;
}
}
if ((getTimer() > (this.shoot_time + (4000 - (diff * 1000)))) && (this.dist > 100)) {
ai_shoot(this);
this.shoot_time = getTimer();
} else if ((getTimer() > (this.shoot_time + (600 - (diff * 100)))) && (this.dist <= 100)) {
ai_shoot(this);
this.shoot_time = getTimer();
}
this._xspeed = this._xspeed * (2 - bot_gun_weight);
this._yspeed = this._yspeed * (2 - bot_gun_weight);
this._x = this._x + this._xspeed;
this._y = this._y + this._yspeed;
if (this._x < -10) {
this._x = -10;
} else if (this._x > 1280) {
this._x = 1280;
} else if (this._y < 0) {
this._y = 0;
} else if (this._y > 885) {
this._y = 885;
}
};
i++;
}
reload = false;
onMouseDown = function () {
if (gameover == false) {
if (paint > 0) {
var _local3 = new Object();
_local3.x = 0;
_local3.y = 0;
player.wep.localToGlobal(_local3);
dep = _root.getNextHighestDepth();
newpaint = _root.attachMovie("paint", "fpaint" + dep, dep, {_x:_local3.x, _y:_local3.y});
newpaint.all = "red";
paints.push(newpaint);
newpaint.xspeed = b_xspeed;
newpaint.yspeed = b_yspeed;
newpaint.onEnterFrame = function () {
this.interval = getTimer() - movement_time;
this._x = this._x + (((this.xspeed * gun_power) / time_slot) * this.interval);
this._y = this._y + (((this.yspeed * gun_power) / time_slot) * this.interval);
};
paint--;
} else if (((reload == false) && (clips > 0)) && (paint == 0)) {
player.wep.time = getTimer();
player.wep.onEnterFrame = function () {
reload = true;
if (getTimer() > (this.time + 2000)) {
if (paint < 10) {
paint = 30 + random(10);
} else {
paint = 40;
}
clips--;
reload = false;
delete player.wep.onEnterFrame;
}
};
}
} else if (games == 1) {
delete onMouseDown;
if (tour_wins > tour_losses) {
if ((tour == this_tour) && (tour_on == true)) {
tour++;
money = money + prize;
reputation = reputation + tour_reputation;
} else if ((tour_on == true) && (tour > this_tour)) {
money = money + 200;
} else if (tour_on == false) {
money = money + 100;
reputation = reputation + 10;
}
if (tour_on == true) {
if ((this_tour == 3) && (tour_wins == 7)) {
challenge1 = true;
}
if ((this_tour == 7) && (tour_wins == 9)) {
challenge2 = true;
}
if ((this_tour == 10) && (tour_wins == 7)) {
challenge3 = true;
}
money = money + 50;
error_write("YOU WON THE TOURNAMENT!");
} else {
error_write("YOU WON!");
}
} else if (tour_on == true) {
reputation = reputation - 50;
money = money - (prize / 2);
error_write("YOU LOST THE TOURNAMENT!");
} else {
reputation = reputation - 5;
error_write("YOU LOST!");
}
onMouseUp = function () {
clear_map();
delete onMouseUp;
_root.gotoAndStop("set_up");
};
} else {
games--;
if (winner == "red") {
money = money + 50;
}
delete onMouseDown;
onMouseUp = function () {
clear_map();
delete onMouseUp;
_root.gotoAndStop("refill");
};
}
};
var _switch = new Object();
_switch.onKeyDown = function () {
if ((chr(Key.getAscii()) == "Q") || (chr(Key.getAscii()) == "q")) {
player._yscale = -100;
} else if ((chr(Key.getAscii()) == "E") || (chr(Key.getAscii()) == "e")) {
player._yscale = 100;
}
};
Key.addListener(_switch);
onEnterFrame = function () {
if (red <= 0) {
delete onEnterFrame;
d = 0;
while (d < players.length) {
delete players[d].onEnterFrame;
d++;
}
gameover = true;
losses++;
tour_losses++;
stat_msg = "Click to Continue";
winner = "blue";
} else if (blue <= 0) {
delete onEnterFrame;
d = 0;
while (d < players.length) {
delete players[d].onEnterFrame;
d++;
}
gameover = true;
wins++;
tour_wins++;
stat_msg = "YOU WIN! Click to Continue";
winner = "red";
}
z = 0;
while (z < players.length) {
ydif = blocks[i]._y - players[z]._y;
xdif = blocks[i]._x - players[z]._x;
dif = Math.sqrt((ydif * ydif) + (xdif * xdif));
if (_root.land.hitTest(players[z].body.getBounds(_root).xMax, players[z]._y, true)) {
players[z]._x = players[z]._x - (players[z]._xspeed + players[z].sprintingx);
players[z]._x = players[z]._x - ((Math.sin(players[z].rads) / time_slot) * players[z].interval);
players[z].hit = "left";
}
if (_root.land.hitTest(players[z].body.getBounds(_root).xMin, players[z]._y, true)) {
players[z]._x = players[z]._x - (players[z]._xspeed + players[z].sprintingx);
players[z]._x = players[z]._x - ((Math.sin(players[z].rads) / time_slot) * players[z].interval);
players[z].hit = "right";
}
if (_root.land.hitTest(players[z]._x, players[z].body.getBounds(_root).yMax, true)) {
players[z]._y = players[z]._y - ((players[z]._yspeed + players[z].sprintingy) - 1);
players[z]._y = players[z]._y - ((Math.cos(players[z].rads) / time_slot) * players[z].interval);
players[z].hit = "top";
}
if (_root.land.hitTest(players[z]._x, players[z].body.getBounds(_root).yMin, true)) {
players[z]._y = players[z]._y - ((players[z]._yspeed + players[z].sprintingy) - 1);
players[z]._y = players[z]._y - ((Math.cos(players[z].rads) / time_slot) * players[z].interval);
players[z].hit = "bottom";
}
p = 0;
while (p < paints.length) {
ydif = paints[p]._y - players[z]._y;
xdif = paints[p]._x - players[z]._x;
dif = Math.sqrt((ydif * ydif) + (xdif * xdif));
if ((dif < 20) && (dif > -20)) {
if (paints[p].hitTest(players[z].body)) {
if (((paints[p].all == "blue") && (players[z].all == "red")) || ((paints[p].all == "red") && (players[z].all == "blue"))) {
if ((players[z].all == "red") && (players[z]._alpha == 100)) {
red--;
} else if ((players[z].all == "blue") && (players[z]._alpha == 100)) {
blue--;
}
players[z].onEnterFrame = function () {
if (this._alpha <= 0) {
this.removeMovieClip();
} else {
this._alpha--;
}
};
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
players.splice(z, 1);
paints.splice(p, 1);
}
}
}
ydif = paints[p]._y - blocks[i]._y;
xdif = paints[p]._x - blocks[i]._x;
dif = Math.sqrt((ydif * ydif) + (xdif * xdif));
if (_root.land.hitTest(paints[p].getBounds(_root).xMax, paints[p]._y, true)) {
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
paints.splice(p, 1);
}
if (_root.land.hitTest(paints[p].getBounds(_root).xMin, paints[p]._y, true)) {
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
paints.splice(p, 1);
}
if (_root.land.hitTest(paints[p]._x, paints[p].getBounds(_root).yMax, true)) {
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
paints.splice(p, 1);
}
if (_root.land.hitTest(paints[p]._x, paints[p].getBounds(_root).yMin, true)) {
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
paints.splice(p, 1);
}
if ((((paints[p]._x > 1280) || (paints[p]._x < -10)) || (paints[p]._y > 885)) || (paints[p]._y < 0)) {
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
paints.splice(p, 1);
}
p++;
}
z++;
}
sprint.bar._xscale = _sprint;
movement_time = getTimer();
};
ai_shoot = function (target) {
var _local3 = new Object();
_local3.x = 0;
_local3.y = 0;
target.wep.localToGlobal(_local3);
dep = _root.getNextHighestDepth();
newpaint = _root.attachMovie("paint", "bpaint" + dep, dep, {_x:_local3.x, _y:_local3.y});
newpaint.all = "blue";
paints.push(newpaint);
newpaint.xspeed = target.b_xspeed;
newpaint.yspeed = target.b_yspeed;
newpaint.onEnterFrame = function () {
this.interval = getTimer() - movement_time;
this._x = this._x + (((this.xspeed * (7 + _root.diff)) / time_slot) * this.interval);
this._y = this._y + (((this.yspeed * (7 + _root.diff)) / time_slot) * this.interval);
};
};
clear_map = function () {
c = 0;
while (c < players.length) {
players[c].removeMovieClip();
c++;
}
c = 0;
while (c < blocks.length) {
blocks[c].removeMovieClip();
c++;
}
c = 0;
while (c < paints.length) {
paints[c].removeMovieClip();
c++;
}
};
Frame 12
gameover = false;
stat_msg = "";
red = 0;
blue = 0;
winner = "";
pshoot.setVolume(100);
active_blocks1 = 2;
bot_gun_weight = 2 - ((diff / 10) * 6);
bot_gun_acc = 1 - ((diff / 6) * 2);
_bg.gotoAndStop(diff);
var blocks = new Array();
var paints = new Array();
var enemies = new Array();
var red_team = new Array();
var players = new Array();
rlt._xscale = 0;
time_slot = 1;
if ((paint == 0) && (clips > 0)) {
clips--;
paint = 40;
}
level_load = function (level) {
q = 0;
while (q < blocks.length) {
blocks[q] = undefined;
q++;
}
i = 0;
while (i < level.length) {
t = 0;
while (t < level[i].length) {
if (level[i][t] == 1) {
block = land.attachMovie("box", "block" + land.getNextHighestDepth(), land.getNextHighestDepth(), {_x:(t * 100) - 10, _y:i * 100});
block.block._rotation = random(4) * 90;
block.block.gotoAndStop(random(active_blocks - 1) + 1);
blocks.push(block);
} else if ((level[i][t] == 2) || (level[i][t] == 3)) {
block = land.attachMovie("rail", "rail" + land.getNextHighestDepth(), land.getNextHighestDepth(), {_x:(t * 100) - 10, _y:i * 100});
block.block._rotation = (level[i][t] - 1) * 90;
block.block.gotoAndStop(1);
blocks.push(block);
} else if (level[i][t] == "c") {
block = land.attachMovie("box", "block" + land.getNextHighestDepth(), land.getNextHighestDepth(), {_x:(t * 100) - 10, _y:i * 100});
block.block._rotation = (level[i][t] - 1) * 90;
block.block.gotoAndStop(random(1) + 3);
blocks.push(block);
} else if (level[i][t] == "p") {
player = attachMovie("redp", "player", _root.getNextHighestDepth(), {_x:(t * 100) + 40, _y:(i * 100) + 50});
red_team.push(player);
players.push(player);
player.all = "red";
red++;
} else if (level[i][t] == "b") {
blueplayer = attachMovie("bluep", "enemy" + enemies.length, _root.getNextHighestDepth(), {_x:(t * 100) + 40, _y:(i * 100) + 50});
enemies.push(blueplayer);
players.push(blueplayer);
blueplayer.all = "blue";
blue++;
} else if (level[i][t] == "r") {
rail = land.attachMovie("rail", "rail" + land.getNextHighestDepth(), land.getNextHighestDepth(), {_x:(t * 100) - 10, _y:i * 100});
if ((((level[i - 1][t] != 0) && (level[i + 1][t] != 0)) && (level[i][t - 1] != 0)) && (level[i][t + 1] != 0)) {
rail.block.gotoAndStop(7);
} else if ((level[i][t - 1] == "r") && (level[i - 1][t] == "r")) {
rail.block.gotoAndStop(3);
} else if ((level[i - 1][t] == "r") && (level[i][t + 1] == "r")) {
rail.block.gotoAndStop(4);
} else if ((level[i + 1][t] == "r") && (level[i][t - 1] == "r")) {
rail.block.gotoAndStop(5);
} else if ((level[i + 1][t] == "r") && (level[i][t + 1] == "r")) {
rail.block.gotoAndStop(6);
} else if ((level[i - 1][t] != 0) || (level[i + 1][t] != 0)) {
rail.block._rotation = -90;
rail.block.gotoAndStop(2);
} else if ((level[i][t - 1] != 0) || (level[i][t + 1] != 0)) {
rail.block.gotoAndStop(2);
}
blocks.push(block);
}
t++;
}
i++;
}
};
level_load(_root[(level_type + "level") + random(levels)]);
_sprint = 100;
movement_time = getTimer();
player.onEnterFrame = function () {
this.interval = 1;
if (paint < 5) {
stat_msg = "Running low on paint!!!";
} else if (paint == 0) {
stat_msg = "RELOAD!!!";
} else {
stat_msg = "";
}
if ((Key.isDown(82) && (reload == false)) && (clips > 0)) {
player.body.wep.time = getTimer();
player.body.wep.onEnterFrame = function () {
reload = true;
rlt._xscale = ((getTimer() - this.time) / 2000) * 100;
if (getTimer() > (this.time + 2000)) {
if (paint < 10) {
paint = 30 + random(10);
} else {
paint = 40;
}
clips--;
reload = false;
rlt._xscale = 0;
delete player.body.wep.onEnterFrame;
}
};
}
if (_sprint < 100) {
_sprint = _sprint + 0.1;
}
ydif = _ymouse - this._y;
xdif = _xmouse - this._x;
rads = Math.atan2(ydif, xdif);
degs = 57.2957795130823 * rads;
this.body._rotation = degs;
xspeed = Math.cos(rads) * 1.5;
yspeed = Math.sin(rads) * 1.5;
this._xspeed = ((xspeed * (2 - gun_weight)) / time_slot) * this.interval;
this._yspeed = ((yspeed * (2 - gun_weight)) / time_slot) * this.interval;
b_xspeed = Math.cos(rads + ((random(gun_acc * 100) - ((gun_acc * 100) / 2)) / 100)) * 1.5;
b_yspeed = Math.sin(rads + ((random(gun_acc * 100) - ((gun_acc * 100) / 2)) / 100)) * 1.5;
_root[orient](this);
this._x = this._x + this._xspeed;
this._y = this._y + this._yspeed;
if (this._x < -10) {
this._x = -10;
} else if (this._x > 1280) {
this._x = 1280;
} else if (this._y < 0) {
this._y = 0;
} else if (this._y > 885) {
this._y = 885;
}
};
relative = function (target) {
if (Key.isDown(87) || (Key.isDown(38))) {
target.forwardx = target._xspeed;
target.forwardy = target._yspeed;
if (Key.isDown(16) && (_sprint > 0)) {
target.sprintingx = target._xspeed;
target.sprintingy = target._yspeed;
_sprint = _sprint - 0.5;
} else {
target.sprintingx = 0;
target.sprintingy = 0;
}
} else if (Key.isDown(83) || (Key.isDown(40))) {
target.forwardx = -target._xspeed;
target.forwardy = -target._yspeed;
target.sprintingx = 0;
target.sprintingy = 0;
} else {
target.forwardx = 0;
target.forwardy = 0;
target.sprintingx = 0;
target.sprintingy = 0;
}
if (Key.isDown(65) || (Key.isDown(37))) {
target.sidex = target._yspeed;
target.sidey = -target._xspeed;
} else if (Key.isDown(68) || (Key.isDown(39))) {
target.sidex = -target._yspeed;
target.sidey = target._xspeed;
} else {
target.sidex = 0;
target.sidey = 0;
}
target._xspeed = (target.forwardx + target.sidex) + target.sprintingx;
target._yspeed = (target.forwardy + target.sidey) + target.sprintingy;
};
absolute = function (target) {
if (Key.isDown(87) || (Key.isDown(38))) {
target.forwardx = 0;
target.forwardy = (-((2 * (2 - gun_weight)) / time_slot)) * target.interval;
} else if (Key.isDown(83) || (Key.isDown(40))) {
target.forwardx = 0;
target.forwardy = ((2 * (2 - gun_weight)) / time_slot) * target.interval;
} else {
target.forwardx = 0;
target.forwardy = 0;
}
if (Key.isDown(65) || (Key.isDown(37))) {
target.sidex = (-((2 * (2 - gun_weight)) / time_slot)) * target.interval;
target.sidey = 0;
} else if (Key.isDown(68) || (Key.isDown(39))) {
target.sidex = ((2 * (2 - gun_weight)) / time_slot) * target.interval;
target.sidey = 0;
} else {
target.sidex = 0;
target.sidey = 0;
}
target._xspeed = target.forwardx + target.sidex;
target._yspeed = target.forwardy + target.sidey;
};
i = 0;
while (i < enemies.length) {
enemies[i].sprintingx = 0;
enemies[i].sprintingy = 0;
enemies[i].xmove = 0;
enemies[i].ymove = 0;
enemies[i]._xspeed = 0;
enemies[i]._yspeed = 0;
enemies[i]._xstraif = 0;
enemies[i]._ystraif = 0;
enemies[i].hit = false;
enemies[i].time = getTimer();
enemies[i].shoot_time = getTimer();
enemies[i].onEnterFrame = function () {
this.interval = 1;
this.ydif = player._y - this._y;
this.xdif = player._x - this._x;
this.dist = Math.sqrt((this.xdif * this.xdif) + (this.ydif * this.ydif));
this.rads = Math.atan2(this.ydif, this.xdif);
this.degs = 57.2957795130823 * this.rads;
this.body._rotation = this.degs;
this.xspeed = Math.cos(this.rads) * 1.5;
this.yspeed = Math.sin(this.rads) * 1.5;
if (this.dist > 45) {
this.xmove = ((this.xspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
this.ymove = ((this.yspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
} else if (this.dist < 35) {
this.xmove = (-((this.xspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
this.ymove = (-((this.yspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
} else {
this.xmove = ((this.xspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
this.ymove = (-((this.yspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
}
this.b_xspeed = Math.cos(this.rads + ((random(bot_gun_acc * 100) - ((bot_gun_acc * 100) / 2)) / 100));
this.b_yspeed = Math.sin(this.rads + ((random(bot_gun_acc * 100) - ((bot_gun_acc * 100) / 2)) / 100));
if (getTimer() > (this.time + (1100 - (diff * 100)))) {
if (this.hit == "left") {
if (this.ydif > 0) {
this._xstraif = (-((this.yspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
this._ystraif = ((this.xspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
} else if (this.ydif < 0) {
this._xstraif = ((this.yspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
this._ystraif = (-((this.xspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
} else {
this._xstraif = (-((this.yspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
this._ystraif = ((this.xspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
}
this.time = getTimer();
} else if (this.hit == "right") {
if (this.ydif > 0) {
this._xstraif = ((this.yspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
this._ystraif = (-((this.xspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
} else if (this.ydif < 0) {
this._xstraif = (-((this.yspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
this._ystraif = ((this.xspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
} else {
this._xstraif = (-((this.yspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
this._ystraif = ((this.xspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
}
this.time = getTimer();
} else if (this.hit == "top") {
if (this.xdif > 0) {
this._xstraif = (-((this.yspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
this._ystraif = ((this.xspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
} else if (this.xdif < 0) {
this._xstraif = ((this.yspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
this._ystraif = (-((this.xspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
} else {
this._xstraif = (-((this.yspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
this._ystraif = ((this.xspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
}
this.time = getTimer();
} else if (this.hit == "bottom") {
if (this.xdif > 0) {
this._xstraif = ((this.yspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
this._ystraif = (-((this.xspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
} else if (this.xdif < 0) {
this._xstraif = (-((this.yspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
this._ystraif = ((this.xspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
} else {
this._xstraif = ((this.yspeed * (2 - bot_gun_weight)) / time_slot) * this.interval;
this._ystraif = (-((this.xspeed * (2 - bot_gun_weight)) / time_slot)) * this.interval;
}
this.time = getTimer();
} else {
this.hit = false;
}
}
if ((getTimer() > ((this.shoot_time + (4000 - (diff * 1000))) + (random(500) - 250))) && (this.dist > 100)) {
ai_shoot(this);
eshoot.setVolume(Math.max(0, 100 - (this.dist / 4)));
eshoot.start();
this.shoot_time = getTimer();
} else if ((getTimer() > ((this.shoot_time + (600 - (diff * 100))) + (random(100) - 50))) && (this.dist <= 100)) {
ai_shoot(this);
eshoot.setVolume(Math.max(0, 100 - (this.dist / 4)));
eshoot.start();
this.shoot_time = getTimer();
}
this._xspeed = this.xmove + this._xstraif;
this._yspeed = this.ymove + this._ystraif;
this._x = this._x + this._xspeed;
this._y = this._y + this._yspeed;
if (this._x < -10) {
this._x = -10;
} else if (this._x > 1280) {
this._x = 1280;
} else if (this._y < 0) {
this._y = 0;
} else if (this._y > 885) {
this._y = 885;
}
};
i++;
}
reload = false;
onMouseDown = function () {
if (gameover == false) {
if (paint > 0) {
var _local3 = new Object();
_local3.x = 0;
_local3.y = 0;
player.body.wep.localToGlobal(_local3);
dep = _root.getNextHighestDepth();
newpaint = _root.attachMovie("paint", "fpaint" + dep, dep, {_x:_local3.x, _y:_local3.y});
newpaint.all = "red";
paints.push(newpaint);
newpaint.xspeed = b_xspeed;
newpaint.yspeed = b_yspeed;
newpaint.onEnterFrame = function () {
this.interval = 1;
this._x = this._x + (((this.xspeed * gun_power) / time_slot) * this.interval);
this._y = this._y + (((this.yspeed * gun_power) / time_slot) * this.interval);
};
pshoot.setVolume(100);
pshoot.start();
paint--;
} else if (((reload == false) && (clips > 0)) && (paint == 0)) {
player.body.wep.time = getTimer();
player.body.wep.onEnterFrame = function () {
reload = true;
rlt._xscale = ((getTimer() - this.time) / 2000) * 100;
if (getTimer() > (this.time + 2000)) {
if (paint < 10) {
paint = 30 + random(10);
} else {
paint = 40;
}
clips--;
reload = false;
rlt._xscale = 0;
delete player.body.wep.onEnterFrame;
}
};
}
} else if (games == 1) {
delete onMouseDown;
if (tour_wins > tour_losses) {
if ((tour == this_tour) && (tour_on == true)) {
tour++;
money = money + prize;
reputation = reputation + tour_reputation;
} else if ((tour_on == true) && (tour > this_tour)) {
money = money + 200;
} else if (tour_on == false) {
money = money + 100;
reputation = reputation + 10;
}
if (tour_on == true) {
if ((this_tour == 3) && (tour_wins == 7)) {
challenge1 = true;
}
if ((this_tour == 7) && (tour_wins == 9)) {
challenge2 = true;
}
if ((this_tour == 10) && (tour_wins == 7)) {
challenge3 = true;
}
money = money + 50;
error_write("YOU WON THE TOURNAMENT!");
} else {
error_write("YOU WON!");
}
} else if (tour_on == true) {
reputation = reputation - 50;
money = money - (prize / 2);
error_write("YOU LOST THE TOURNAMENT!");
} else {
reputation = reputation - 5;
error_write("YOU LOST!");
}
onMouseUp = function () {
clear_map();
delete onMouseUp;
if (tour_on == true) {
gotoAndStop ("tours");
} else {
gotoAndStop ("set_up");
}
};
} else {
games--;
if (winner == "red") {
money = money + 50;
}
delete onMouseDown;
onMouseUp = function () {
clear_map();
delete onMouseUp;
_root.gotoAndStop("refill");
};
}
};
var _switch = new Object();
_switch.onKeyDown = function () {
if ((chr(Key.getAscii()) == "Q") || (chr(Key.getAscii()) == "q")) {
player.body._yscale = -100;
} else if ((chr(Key.getAscii()) == "E") || (chr(Key.getAscii()) == "e")) {
player.body._yscale = 100;
}
};
Key.addListener(_switch);
onEnterFrame = function () {
if (red <= 0) {
delete onEnterFrame;
d = 0;
while (d < players.length) {
delete players[d].onEnterFrame;
d++;
}
gameover = true;
losses++;
tour_losses++;
stat_msg = "Click to Continue";
winner = "blue";
} else if (blue <= 0) {
delete onEnterFrame;
d = 0;
while (d < players.length) {
delete players[d].onEnterFrame;
d++;
}
gameover = true;
wins++;
tour_wins++;
stat_msg = "YOU WIN! Click to Continue";
winner = "red";
}
z = 0;
while (z < players.length) {
ydif = blocks[i]._y - players[z]._y;
xdif = blocks[i]._x - players[z]._x;
dif = Math.sqrt((ydif * ydif) + (xdif * xdif));
if (_root.land.hitTest(players[z].body.body.getBounds(_root).xMax, players[z]._y, true)) {
players[z]._x = players[z]._x - Math.abs(players[z]._xspeed * 1.5);
players[z].hit = "left";
}
if (_root.land.hitTest(players[z].body.body.getBounds(_root).xMin, players[z]._y, true)) {
players[z]._x = players[z]._x + Math.abs(players[z]._xspeed * 1.5);
players[z].hit = "right";
}
if (_root.land.hitTest(players[z]._x, players[z].body.body.getBounds(_root).yMax, true)) {
players[z]._y = players[z]._y - Math.abs(players[z]._yspeed * 1.5);
players[z].hit = "top";
}
if (_root.land.hitTest(players[z]._x, players[z].body.body.getBounds(_root).yMin, true)) {
players[z]._y = players[z]._y + Math.abs(players[z]._yspeed * 1.5);
players[z].hit = "bottom";
}
p = 0;
while (p < paints.length) {
ydif = paints[p]._y - players[z]._y;
xdif = paints[p]._x - players[z]._x;
dif = Math.sqrt((ydif * ydif) + (xdif * xdif));
if ((dif < 20) && (dif > -20)) {
if (paints[p].hitTest(players[z].body.body)) {
if (((paints[p].all == "blue") && (players[z].all == "red")) || ((paints[p].all == "red") && (players[z].all == "blue"))) {
if ((players[z].all == "red") && (players[z]._alpha == 100)) {
red--;
} else if ((players[z].all == "blue") && (players[z]._alpha == 100)) {
blue--;
}
players[z].onEnterFrame = function () {
if (this._alpha <= 0) {
this.removeMovieClip();
} else {
this._alpha--;
}
};
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
players.splice(z, 1);
paints.splice(p, 1);
}
}
}
ydif = paints[p]._y - blocks[i]._y;
xdif = paints[p]._x - blocks[i]._x;
dif = Math.sqrt((ydif * ydif) + (xdif * xdif));
if (_root.land.hitTest(paints[p].getBounds(_root).xMax, paints[p]._y, true)) {
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
paints.splice(p, 1);
}
if (_root.land.hitTest(paints[p].getBounds(_root).xMin, paints[p]._y, true)) {
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
paints.splice(p, 1);
}
if (_root.land.hitTest(paints[p]._x, paints[p].getBounds(_root).yMax, true)) {
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
paints.splice(p, 1);
}
if (_root.land.hitTest(paints[p]._x, paints[p].getBounds(_root).yMin, true)) {
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
paints.splice(p, 1);
}
if ((((paints[p]._x > 1280) || (paints[p]._x < -10)) || (paints[p]._y > 885)) || (paints[p]._y < 0)) {
delete paints[p].onEnterFrame;
paints[p].gotoAndStop(2);
paints.splice(p, 1);
}
p++;
}
z++;
}
sprint.bar._xscale = _sprint;
movement_time = getTimer();
};
ai_shoot = function (target) {
var _local3 = new Object();
_local3.x = 0;
_local3.y = 0;
target.body.wep.localToGlobal(_local3);
dep = _root.getNextHighestDepth();
newpaint = _root.attachMovie("paint", "bpaint" + dep, dep, {_x:_local3.x, _y:_local3.y});
newpaint.all = "blue";
paints.push(newpaint);
newpaint.xspeed = target.b_xspeed;
newpaint.yspeed = target.b_yspeed;
newpaint.onEnterFrame = function () {
this.interval = 1;
this._x = this._x + (((this.xspeed * (7 + _root.diff)) / time_slot) * this.interval);
this._y = this._y + (((this.yspeed * (7 + _root.diff)) / time_slot) * this.interval);
};
};
clear_map = function () {
c = 0;
while (c < players.length) {
players[c].removeMovieClip();
c++;
}
c = 0;
while (c < blocks.length) {
blocks[c].removeMovieClip();
c++;
}
c = 0;
while (c < paints.length) {
paints[c].removeMovieClip();
c++;
}
};
Frame 13
paint_balls = (clips + " x ") + paint;
error_msg = "";
Symbol 17 MovieClip [paint] Frame 1
stop();
paint.gotoAndStop(all);
Symbol 17 MovieClip [paint] Frame 2
this._rotation = random(360);
onEnterFrame = function () {
this._alpha--;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
paint.gotoAndStop(all);
Symbol 283 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.3");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}};
options = _parseOptions(options, _local27);
if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0) {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
}
Instance of Symbol 47 MovieClip "body" in Symbol 50 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(1);
}
Instance of Symbol 47 MovieClip "body" in Symbol 53 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(random(19) + 1);
}
Symbol 64 MovieClip Frame 2
_root.play();
Symbol 71 Button
on (release) {
gotoAndPlay ("set_up");
}
Symbol 76 Button
on (release) {
gotoAndStop ("options");
}
Symbol 82 Button
on (release) {
fscommand ("quit");
}
Symbol 88 Button
on (release) {
gotoAndStop ("instruct");
}
Symbol 102 Button
on (release) {
gotoAndStop ("menu");
}
Symbol 112 Button
on (release) {
_quality = "BEST";
}
Symbol 118 Button
on (release) {
_quality = "HIGH";
}
Symbol 123 Button
on (release) {
_quality = "MEDIUM";
}
Symbol 128 Button
on (release) {
_quality = "LOW";
}
Symbol 129 Button
on (release) {
gotoAndStop ("menu");
}
Symbol 134 Button
on (release) {
challenge = 1;
reputation = 0;
money = 400;
wins = 0;
losses = 0;
clips = 1;
paint = 40;
gun = "";
tour = 1;
}
Symbol 140 Button
on (release) {
var code = cheat_codes.text.split(".");
if (code[1] == "TRUE") {
var value1 = true;
_root[code[0]] = value1;
} else {
var value2 = code[1];
_root[code[0]] = value2;
}
cheat_codes.text = "";
}
Symbol 147 Button
on (release) {
orient = "relative";
orient2_toggle.gotoAndStop(1);
orient1_toggle.gotoAndStop(2);
}
Symbol 152 Button
on (release) {
orient = "absolute";
orient1_toggle.gotoAndStop(1);
orient2_toggle.gotoAndStop(2);
}
Symbol 164 Button
on (release) {
level_type = "a";
prize = 100;
games = 1;
tour_on = false;
tour_wins = 0;
tour_losses = 0;
diff = currdiff;
if (gun != "") {
gotoAndStop ("play");
} else {
error_write("You need a gun!");
}
}
Symbol 169 Button
on (release) {
if (money >= 50) {
money = money - 50;
clips++;
paint_balls = (clips + "x") + paint;
} else {
error_write("Not Enough Money");
}
}
Symbol 185 Button
on (release) {
if ((_root.money >= gun_cost) && ((_root.tour - 1) >= gun_tour)) {
_root.gun = gun;
_root.gun_weight = gun_weight;
_root.gun_acc = gun_acc;
_root.gun_power = gun_power;
_root.money = _root.money - gun_cost;
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
} else if (_root.money < gun_cost) {
_root.error_write("Need more money!");
} else {
_root.error_write("You haven't unlocked this gun!");
}
}
Symbol 208 MovieClip Frame 1
stop();
gun = "GC-3";
gun_cost = 400;
gun_weight = 1.4;
gun_acc = 0.2;
gun_power = 6;
gun_tour = 0;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Instance of Symbol 178 MovieClip "acc" in Symbol 208 MovieClip Frame 1
onClipEvent (enterFrame) {
this._width = (1 - (_parent.gun_acc + 0.5)) * 60;
}
Instance of Symbol 178 MovieClip "power" in Symbol 208 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = _parent.gun_power * 5;
}
Instance of Symbol 178 MovieClip "weight" in Symbol 208 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = _parent.gun_weight * 30;
}
Symbol 208 MovieClip Frame 2
gun = "Foxy-Roy1";
gun_cost = 600;
gun_weight = 1.3;
gun_acc = 0.19;
gun_power = 7;
gun_tour = 1;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 3
gun = "XLI-100";
gun_cost = 620;
gun_weight = 1.5;
gun_acc = 0.188;
gun_power = 7.2;
gun_tour = 1;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 4
gun = "P2-Flame";
gun_cost = 850;
gun_weight = 1.2;
gun_acc = 0.185;
gun_power = 8;
gun_tour = 2;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 5
gun = "CTC II";
gun_cost = 850;
gun_weight = 1.34;
gun_acc = 0.184;
gun_power = 9;
gun_tour = 2;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 6
gun = "Foxy-Roy3";
gun_cost = 1100;
gun_weight = 1.1;
gun_acc = 0.18;
gun_power = 8.2;
gun_tour = 3;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 7
gun = "GC-10";
gun_cost = 1500;
gun_weight = 1;
gun_acc = 0.17;
gun_power = 8.4;
gun_tour = 4;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 8
gun = "CX-Armada";
gun_cost = 1500;
gun_weight = 1.2;
gun_acc = 0.16;
gun_power = 8.5;
gun_tour = 4;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 9
gun = "TreeHunter-3";
gun_cost = 1800;
gun_weight = 0.85;
gun_acc = 0.166;
gun_power = 8.4;
gun_tour = 5;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 10
gun = "CX-Lava";
gun_cost = 1800;
gun_weight = 0.89;
gun_acc = 0.172;
gun_power = 9;
gun_tour = 5;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 11
gun = "Foxy-Roy7";
gun_cost = 2200;
gun_weight = 0.75;
gun_acc = 0.14;
gun_power = 8.8;
gun_tour = 6;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 12
gun = "Foxy-Roy9";
gun_cost = 2800;
gun_weight = 0.7;
gun_acc = 0.12;
gun_power = 9;
gun_tour = 7;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 13
gun = "P3X-Flame";
gun_cost = 3400;
gun_weight = 0.65;
gun_acc = 0.11;
gun_power = 9.1;
gun_tour = 8;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 14
gun = "T4-AS";
gun_cost = 3500;
gun_weight = 0.62;
gun_acc = 0.1;
gun_power = 9.3;
gun_tour = 8;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 15
gun = "Sharper-1";
gun_cost = 4000;
gun_weight = 0.65;
gun_acc = 0.1;
gun_power = 9.5;
gun_tour = 9;
if ((_root.tour - 1) >= gun_tour) {
locked._visible = false;
} else {
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 16
gun = "ANGER";
gun_cost = 1500;
gun_weight = 0.7;
gun_acc = 0.14;
gun_power = 8;
gun_tour = 3;
if (((_root.tour - 1) >= gun_tour) && (_root.challenge1 == true)) {
wonder_gun._visible = true;
locked._visible = false;
} else {
wonder_gun._visible = false;
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 17
gun = "MENACE";
gun_cost = 3000;
gun_weight = 0.9;
gun_acc = 0.11;
gun_power = 9.2;
gun_tour = 7;
if (((_root.tour - 1) >= gun_tour) && (_root.challenge2 == true)) {
wonder_gun._visible = true;
locked._visible = false;
} else {
wonder_gun._visible = false;
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 208 MovieClip Frame 18
gun = "GOD-GUN";
gun_cost = 5000;
gun_weight = 0.5;
gun_acc = 0.05;
gun_power = 11;
gun_tour = 10;
if (((_root.tour - 1) >= gun_tour) && (_root.challenge3 == true)) {
wonder_gun._visible = true;
locked._visible = false;
} else {
wonder_gun._visible = false;
locked._visible = true;
}
if (_root.gun == gun) {
buy_btn._visible = false;
buy_btn.enabled = false;
} else {
buy_btn._visible = true;
buy_btn.enabled = true;
}
Symbol 213 Button
on (release) {
save_game = SharedObject.getLocal("game");
save_game.data.reputation = reputation;
save_game.data.tour = tour;
save_game.data.money = money;
save_game.data.wins = wins;
save_game.data.losses = losses;
save_game.data.paint = paint;
save_game.data.clips = clips;
save_game.data.gun = gun;
save_game.data.gun_weight = gun_weight;
save_game.data.gun_power = gun_power;
save_game.data.challenge1 = challenge1;
save_game.data.challenge2 = challenge2;
save_game.data.challenge3 = challenge3;
}
Symbol 218 Button
on (release) {
save_game = SharedObject.getLocal("game");
if (save_game.data.money != undefined) {
reputation = save_game.data.reputation;
tour = save_game.data.tour;
money = save_game.data.money;
wins = save_game.data.wins;
losses = save_game.data.losses;
paint = save_game.data.paint;
clips = save_game.data.clips;
gun = save_game.data.gun;
gun_weight = save_game.data.gun_weight;
gun_power = save_game.data.gun_power;
challenge1 = save_game.data.challenge1;
challenge2 = save_game.data.challenge2;
challenge3 = save_game.data.challenge3;
paint_balls = (clips + " x ") + paint;
gotoAndStop ("menu");
} else {
error_write("No Saved Game");
}
}
Symbol 219 Button
on (release) {
gotoAndStop ("menu");
}
Symbol 222 Button
on (release) {
weapon_buy.nextFrame();
}
Symbol 223 Button
on (release) {
weapon_buy.prevFrame();
}
Symbol 229 Button
on (release) {
if (clips > 0) {
paint = 40;
clips--;
paint_balls = (clips + "x") + paint;
} else {
error_write("Need more clips!");
}
}
Symbol 234 Button
on (release) {
gotoAndStop ("tours");
}
Symbol 236 Button
on (release) {
_root.gotoAndStop("set_up");
}
Symbol 245 MovieClip Frame 1
this.onRelease = function () {
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
if (_root.gun != "") {
_root.tour_reputation = tour_reputation;
_root.level_type = "a";
_root.this_tour = tour;
_root.tour_on = true;
_root.games = games;
_root.diff = diff;
_root.prize = prize;
_root.tour_wins = 0;
_root.tour_losses = 0;
_root.gotoAndStop("play");
} else {
_root.error_write("You need a gun!");
}
} else {
_root.error_write("You have not unlocked this Tournament!");
}
};
stop();
tour = 1;
games = 3;
diff = 1;
prize = 400;
tour_rep = 20;
tour_reputation = 300;
if (_root.tour > tour) {
done_symbol._visible = true;
} else {
done_symbol._visible = false;
}
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
locked = false;
locked_sym._visible = false;
} else {
locked = true;
locked_sym._visible = true;
}
Symbol 245 MovieClip Frame 2
tour = 2;
games = 5;
diff = 1;
prize = 700;
tour_rep = 350;
tour_reputation = 350;
if (_root.tour > tour) {
done_symbol._visible = true;
} else {
done_symbol._visible = false;
}
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
locked = false;
locked_sym._visible = false;
} else {
locked = true;
locked_sym._visible = true;
}
Symbol 245 MovieClip Frame 3
tour = 3;
games = 7;
diff = 1;
prize = 1200;
tour_rep = 730;
tour_reputation = 270;
if (_root.tour > tour) {
done_symbol._visible = true;
} else {
done_symbol._visible = false;
}
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
locked = false;
locked_sym._visible = false;
} else {
locked = true;
locked_sym._visible = true;
}
Symbol 245 MovieClip Frame 4
tour = 4;
games = 3;
diff = 2;
prize = 1600;
tour_rep = 1040;
tour_reputation = 450;
if (_root.tour > tour) {
done_symbol._visible = true;
} else {
done_symbol._visible = false;
}
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
locked = false;
_root.currdiff = 2;
locked_sym._visible = false;
} else {
locked = true;
locked_sym._visible = true;
}
Symbol 245 MovieClip Frame 5
tour = 5;
games = 5;
diff = 2;
prize = 2000;
tour_rep = 1530;
tour_reputation = 370;
if (_root.tour > tour) {
done_symbol._visible = true;
} else {
done_symbol._visible = false;
}
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
locked = false;
locked_sym._visible = false;
} else {
locked = true;
locked_sym._visible = true;
}
Symbol 245 MovieClip Frame 6
tour = 6;
games = 7;
diff = 2;
prize = 2400;
tour_rep = 1950;
tour_reputation = 600;
if (_root.tour > tour) {
done_symbol._visible = true;
} else {
done_symbol._visible = false;
}
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
locked = false;
locked_sym._visible = false;
} else {
locked = true;
locked_sym._visible = true;
}
Symbol 245 MovieClip Frame 7
tour = 7;
games = 9;
diff = 2;
prize = 2600;
tour_rep = 2600;
tour_reputation = 600;
if (_root.tour > tour) {
done_symbol._visible = true;
} else {
done_symbol._visible = false;
}
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
locked = false;
locked_sym._visible = false;
} else {
locked = true;
locked_sym._visible = true;
}
Symbol 245 MovieClip Frame 8
tour = 8;
games = 3;
diff = 3;
prize = 2800;
tour_rep = 3270;
tour_reputation = 730;
if (_root.tour > tour) {
done_symbol._visible = true;
} else {
done_symbol._visible = false;
}
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
locked = false;
_root.currdiff = 3;
locked_sym._visible = false;
} else {
locked = true;
locked_sym._visible = true;
}
Symbol 245 MovieClip Frame 9
tour = 9;
games = 5;
diff = 3;
prize = 3000;
tour_rep = 4100;
tour_reputation = 1400;
if (_root.tour > tour) {
done_symbol._visible = true;
} else {
done_symbol._visible = false;
}
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
locked = false;
locked_sym._visible = false;
} else {
locked = true;
locked_sym._visible = true;
}
Symbol 245 MovieClip Frame 10
tour = 10;
games = 7;
diff = 3;
prize = 3200;
tour_rep = 5650;
tour_reputation = 2350;
if (_root.tour > tour) {
done_symbol._visible = true;
} else {
done_symbol._visible = false;
}
if ((_root.tour > (tour - 1)) && (_root.reputation >= tour_rep)) {
locked = false;
locked_sym._visible = false;
} else {
locked = true;
locked_sym._visible = true;
}
Symbol 267 Button
on (release) {
if (money >= 50) {
money = money - 50;
clips++;
paint_balls = (clips + " x ") + paint;
} else {
error_write("Not Enough Money");
}
}
Symbol 274 Button
on (release) {
gotoAndStop ("play");
}
Symbol 281 Button
on (release) {
money = money - (100 * tour_losses);
money = money - (100 * games);
gotoAndStop ("set_up");
}