Frame 1
copyright = "Copyright (c) 2005 by Yaroslav Yanovsky";
var plLoaded = false;
var plLoadState = (int((this.getBytesLoaded() / this.getBytesTotal()) * 100) + "%");
fscommand ("showmenu", false);
fscommand ("allowscale", false);
fscommand ("wmode", "opaque");
Frame 2
if (this.getBytesLoaded() < this.getBytesTotal()) {
gotoAndPlay ("load");
} else {
stop();
preloaderlogos._visible = false;
preloader._visible = false;
trace(arcadetown);
arcadetown.gotoAndPlay("play");
}
Frame 3
function playSound(snd) {
if (_root.soundEnabled) {
_root.sound.gotoAndPlay(snd);
}
}
function updateMouse() {
var _local3 = _root._xmouse;
var _local2 = _root._ymouse;
var _local4 = (((_local3 > 0) && (_local3 < 480)) && (_local2 > 0)) && (_local2 < 360);
if (_local4 != mouseInRect) {
if ((mouseInRect = _local4)) {
Mouse.hide();
cursor._visible = true;
} else {
Mouse.show();
cursor._visible = false;
}
}
cursor._x = _local3;
cursor._y = _local2;
}
function EncrpytString(strVal) {
var _local7 = "aHfEjcDebChGiAfIjDbEjacD";
var _local8 = _local7.length;
var _local11 = "0";
var _local3 = "";
var _local9 = strVal.length;
var _local1 = 0;
_local3 = "";
var _local4;
var _local6;
var _local2;
var _local5 = 0;
nCnt = 0;
while (nCnt < _local9) {
_local4 = strVal.charCodeAt(nCnt);
if (_local4 >= 128) {
_local4 = "X";
}
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = (_local4 % 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local5 = _local5 + _local2;
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = Math.floor(_local4 / 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local5 = _local5 + _local2;
nCnt++;
}
_local5 = _local5 % 256;
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = (_local5 % 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = Math.floor(_local5 / 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
return(_local3);
}
function GetUrlParam(strUrl, strParam) {
var _local4 = strUrl.toLowerCase();
var _local1 = _local4.indexOf(strParam);
var _local5 = strParam.length;
if (_local1 > 0) {
var _local3;
var _local2 = _local4.indexOf("&", _local1 + _local5);
if (_local2 > 0) {
_local3 = _local2 - _local1;
} else {
_local3 = strUrl.length - _local1;
}
return(strUrl.substr(_local1 + _local5, _local3));
}
return("");
}
function GetBaseUrl(strUrl) {
var _local1 = strUrl.toLowerCase();
var _local2 = _local1.length;
var _local3 = _local1.indexOf("?", 0);
if (_local3 > 0) {
_local2 = _local3;
}
var _local4 = "download";
if (_local1.substr(0, 4) == "http") {
_local4 = strUrl.substr(7, _local2 - 7);
}
return(_local4);
}
hero0 = new Object();
hero0.damage = 100;
hero0.moneyLevel = 0;
hero0.speed = 4;
hero0.armorLevel = 1;
hero0.armor = [0, 2, 3, 4, 6, 8, 10, 12, 15, 20, 25];
hero0.weaponNumber = 1;
hero0.weaponLevel1 = 1;
hero0.weaponLevel2 = 0;
hero0.weaponLevel3 = 0;
hero0.weaponLevel4 = 0;
weaponLevelmax1 = 5;
weaponLevelmax2 = 5;
weaponLevelmax3 = 5;
weaponLevelmax4 = 5;
armorLevelmax = 10;
bullet1power = 10;
bullet2power = 10;
bullet3power = 10;
bullet4power = 200;
shop = new Object();
shop.weapon1 = [0, 100, 150, 200, 250, 300];
shop.weapon2 = [0, 200, 300, 400, 500, 600];
shop.weapon3 = [0, 400, 600, 800, 1000, 1200];
shop.weapon4 = [0, 500, 750, 1000, 1250, 1500];
hero0.armor = [0, 2, 3, 4, 5, 6, 7, 8, 10, 15, 20];
shop.armor = [0, 50, 100, 150, 200, 300, 400, 500, 700, 1000, 1500];
numberofLevels = 18;
levels = new Array();
i = 0;
while (i <= numberofLevels) {
levels[i] = new Array();
i++;
}
levels[0].Xelement = 184;
levels[0].Yelement = 184;
levels[0].damageofEnemies1 = 30;
levels[0].armorofEnemies1 = 1;
levels[0].hitpowerofEnemies1 = 1;
levels[0].speedofEnemies1 = 2;
levels[0].transKofEnemies1 = 0.2;
levels[0].maxMoneyofEnemies1 = 20;
levels[0].damageofEnemies2 = 30;
levels[0].armorofEnemies2 = 1;
levels[0].hitpowerofEnemies2 = 1;
levels[0].speedofEnemies2 = 2;
levels[0].distanceofEnemies2 = 160;
levels[0].transKofEnemies2 = 0.2;
levels[0].maxMoneyofEnemies2 = 40;
levels[0].damageofEnemies3 = 100;
levels[0].armorofEnemies3 = 5;
levels[0].hitpowerofEnemies3 = 3;
levels[0].speedofEnemies3 = 2;
levels[0].transKofEnemies3 = 0.3;
levels[0].maxMoneyofEnemies3 = 100;
levels[0].damageofEnemies4 = 100;
levels[0].armorofEnemies4 = 2;
levels[0].hitpowerofEnemies4 = 2;
levels[0].powerofEnemies4 = 40;
levels[0].speedofEnemies4 = 2;
levels[0].transKofEnemies4 = 0.4;
levels[0].maxMoneyofEnemies4 = 100;
levels[0].damageofCitizens1 = 10;
levels[0].armorofCitizens1 = 3;
levels[0].speedofCitizens1 = 1;
levels[0].damageofCitizens2 = 10;
levels[0].armorofCitizens2 = 1;
levels[0].speedofCitizens2 = 1;
levels[0].damageofCitizens3 = 10;
levels[0].armorofCitizens3 = 5;
levels[0].speedofCitizens3 = 1;
levels[0].maxMoneyofTreasures1 = 20;
levels[0].bonusforSavedSoules = 30;
levels[0].bonusTime = 1;
levels[0].bonusforSavedTime = 1;
levels[0].bonusforSavedLives = 1;
levels[0].numberofXField = 10;
levels[0].numberofYField = 10;
var k = 0;
while (k <= (levels[0].numberofXField - 1)) {
levels[0][k] = new Array();
var l = 0;
while (l <= (levels[0].numberofYField - 1)) {
levels[0][k][l] = new Array();
l++;
}
k++;
}
levels[0].bg = new Array();
Line1 = "bbbbbbbbbb ";
Line2 = "bchhththcb ";
Line3 = "bvbbvbvbvb ";
Line4 = "bvbbvbvbvb ";
Line5 = "bthhxhxhtb ";
Line6 = "bvbbvbvbvb ";
Line7 = "bthhxhxhtb ";
Line8 = "bvbbvbvbvb ";
Line9 = "bchhththcb ";
Line10 = "bbbbbbbbbb ";
levels[0].bg = ((((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9) + Line10;
levels[0][2][1] = [["Treasure1", 3, 5]];
levels[0][1][2] = [["Enemy4", 10], ["Enemy1", 20]];
levels[0][3][8] = [["Treasure1", 1, 50], ["Citizen1", 1]];
levels[0][4][2] = [["Enemy2", 10], ["Enemy3", 10]];
levels[0][4][3] = [["Enemy3", 5], ["Enemy4", 5]];
levels[0][6][5] = [["Treasure1", 1, 10]];
levels[0][6][7] = [["Enemy2", 10], ["Citizen2", 20]];
levels[0][8][5] = [["Citizen1", 20], ["Citizen1", 1]];
levels[0][5][4] = [["hero"]];
for (name in levels[0]) {
levels[1][name] = levels[0][name];
}
levels[1].numberofXField = 5;
levels[1].numberofYField = 4;
var k = 0;
while (k <= (levels[1].numberofXField - 1)) {
levels[1][k] = new Array();
var l = 0;
while (l <= (levels[1].numberofYField - 1)) {
levels[1][k][l] = new Array();
l++;
}
k++;
}
levels[1].bg = new Array();
Line1 = "][]{[ ";
Line2 = "{fff] ";
Line3 = "]f{][ ";
Line4 = "{][{] ";
levels[1].bg = ((Line1 + Line2) + Line3) + Line4;
levels[1][1][1] = [["hero"]];
levels[1][3][1] = [["Treasure1", 3, 10], ["Enemy1", 2]];
levels[1][1][2] = [["Citizen1", 3]];
for (name in levels[0]) {
levels[2][name] = levels[0][name];
}
levels[2].numberofXField = 5;
levels[2].numberofYField = 4;
var k = 0;
while (k <= (levels[2].numberofXField - 1)) {
levels[2][k] = new Array();
var l = 0;
while (l <= (levels[2].numberofYField - 1)) {
levels[2][k][l] = new Array();
l++;
}
k++;
}
levels[2].bg = new Array();
Line1 = "bbbbb ";
Line2 = "bfffb ";
Line3 = "bfbfb ";
Line4 = "bbbbb ";
levels[2].bg = ((Line1 + Line2) + Line3) + Line4;
levels[2][1][1] = [["hero"]];
levels[2][1][2] = [["Citizen1", 3]];
levels[2][3][1] = [["Treasure1", 3, 5], ["Enemy1", 5]];
levels[2][3][2] = [["Citizen1", 4]];
for (name in levels[0]) {
levels[3][name] = levels[0][name];
}
levels[3].numberofXField = 6;
levels[3].numberofYField = 6;
var k = 0;
while (k <= (levels[3].numberofXField - 1)) {
levels[3][k] = new Array();
var l = 0;
while (l <= (levels[3].numberofYField - 1)) {
levels[3][k][l] = new Array();
l++;
}
k++;
}
levels[3].bg = new Array();
Line1 = "bbbbbb ";
Line2 = "bchhcb ";
Line3 = "bvbbvb ";
Line4 = "bvbfvb ";
Line5 = "bchhcb ";
Line6 = "bbbbbb ";
levels[3].bg = ((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6;
levels[3][1][1] = [["Enemy1", 5], ["Treasure1", 3, 20]];
levels[3][1][2] = [["Enemy2", 1]];
levels[3][1][4] = [["hero"]];
levels[3][2][4] = [["Enemy1", 5]];
levels[3][3][3] = [["Citizen1", 3]];
levels[3][4][1] = [["Citizen1", 3], ["Treasure1", 2, 10]];
levels[3][4][4] = [["Citizen2", 2], ["Treasure1", 2, 10]];
for (name in levels[0]) {
levels[4][name] = levels[0][name];
}
levels[4].numberofXField = 7;
levels[4].numberofYField = 7;
var k = 0;
while (k <= (levels[4].numberofXField - 1)) {
levels[4][k] = new Array();
var l = 0;
while (l <= (levels[4].numberofYField - 1)) {
levels[4][k][l] = new Array();
l++;
}
k++;
}
levels[4].bg = new Array();
Line1 = "bbbbbbb ";
Line2 = "bchhhcb ";
Line3 = "bvbbbvb ";
Line4 = "bvbbbvb ";
Line5 = "bvbbbvb ";
Line6 = "bchhhcb ";
Line7 = "bbbbbbb ";
levels[4].bg = (((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7;
levels[4][1][1] = [["hero"], ["Citizen2", 3]];
levels[4][1][2] = [["Citizen2", 3]];
levels[4][1][3] = [["Enemy1", 2]];
levels[4][1][4] = [["Enemy2", 2], ["Enemy1", 2], ["Treasure1", 2, 30]];
levels[4][1][5] = [["Enemy1", 2]];
levels[4][3][1] = [["Enemy1", 2]];
levels[4][4][1] = [["Enemy1", 2]];
levels[4][5][1] = [["Enemy2", 2], ["Enemy1", 2], ["Treasure1", 2, 20]];
levels[4][5][4] = [["Citizen1", 3]];
levels[4][5][5] = [["Citizen1", 3]];
for (name in levels[0]) {
levels[5][name] = levels[0][name];
}
levels[5].numberofXField = 7;
levels[5].numberofYField = 7;
var k = 0;
while (k <= (levels[5].numberofXField - 1)) {
levels[5][k] = new Array();
var l = 0;
while (l <= (levels[5].numberofYField - 1)) {
levels[5][k][l] = new Array();
l++;
}
k++;
}
levels[5].bg = new Array();
Line1 = "bbbbbbb ";
Line2 = "bchhhcb ";
Line3 = "bvbbbvb ";
Line4 = "bvbchtb ";
Line5 = "bvbvbvb ";
Line6 = "bchthcb ";
Line7 = "bbbbbbb ";
levels[5].bg = (((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7;
levels[5][1][1] = [["hero"], ["Citizen2", 3]];
levels[5][1][2] = [["Citizen2", 3]];
levels[5][1][3] = [["Enemy1", 4]];
levels[5][1][5] = [["Enemy2", 2], ["Enemy1", 2], ["Treasure1", 2, 50]];
levels[5][3][1] = [["Enemy1", 4]];
levels[5][3][3] = [["Citizen1", 3], ["Citizen3", 3], ["Treasure1", 4, 50]];
levels[5][5][1] = [["Enemy2", 4], ["Enemy1", 2], ["Treasure1", 2, 20]];
levels[5][5][4] = [["Citizen1", 3]];
levels[5][5][5] = [["Citizen1", 3]];
for (name in levels[0]) {
levels[6][name] = levels[0][name];
}
levels[6].numberofXField = 7;
levels[6].numberofYField = 7;
var k = 0;
while (k <= (levels[6].numberofXField - 1)) {
levels[6][k] = new Array();
var l = 0;
while (l <= (levels[6].numberofYField - 1)) {
levels[6][k][l] = new Array();
l++;
}
k++;
}
levels[6].bg = new Array();
Line1 = "bbbbbbb ";
Line2 = "bchhhcb ";
Line3 = "bvbfbvb ";
Line4 = "bthhhtb ";
Line5 = "bvbfbvb ";
Line6 = "bchhhcb ";
Line7 = "bbbbbbb ";
levels[6].bg = (((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7;
levels[6][1][1] = [["Enemy3", 2], ["Enemy1", 4], ["Treasure1", 3, 30]];
levels[6][1][3] = [["Citizen2", 2], ["Treasure1", 3, 30]];
levels[6][1][5] = [["Enemy1", 6]];
levels[6][3][3] = [["hero"], ["Citizen1", 1]];
levels[6][5][1] = [["Enemy2", 2], ["Enemy1", 4], ["Treasure1", 2, 50]];
levels[6][5][3] = [["Citizen2", 2], ["Treasure1", 2, 50]];
levels[6][5][5] = [["Enemy2", 6]];
for (name in levels[0]) {
levels[7][name] = levels[0][name];
}
levels[7].numberofXField = 9;
levels[7].numberofYField = 7;
var k = 0;
while (k <= (levels[7].numberofXField - 1)) {
levels[7][k] = new Array();
var l = 0;
while (l <= (levels[7].numberofYField - 1)) {
levels[7][k][l] = new Array();
l++;
}
k++;
}
levels[7].bg = new Array();
Line1 = "bbbbbbbbb ";
Line2 = "bchththcb ";
Line3 = "bvbvbvbvb ";
Line4 = "bthtfthtb ";
Line5 = "bvbvbvbvb ";
Line6 = "bchcbchcb ";
Line7 = "bbbbbbbbb ";
levels[7].bg = (((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7;
levels[7][1][1] = [["Enemy1", 3]];
levels[7][1][3] = [["Treasure1", 2, 40], ["Treasure1", 1, 80]];
levels[7][1][5] = [["Enemy3", 3]];
levels[7][3][1] = [["Enemy2", 8]];
levels[7][3][3] = [["Citizen2", 3]];
levels[7][3][5] = [["Enemy2", 8]];
levels[7][5][1] = [["Citizen1", 5], ["Citizen2", 3]];
levels[7][5][5] = [["Citizen2", 3], ["Citizen3", 3]];
levels[7][7][1] = [["Treasure1", 2, 40], ["Treasure1", 1, 80]];
levels[7][7][2] = [["Citizen2", 3]];
levels[7][7][3] = [["hero"], ["Citizen1", 5]];
levels[7][7][5] = [["Citizen2", 3]];
levels[7][7][5] = [["Treasure1", 2, 40], ["Treasure1", 1, 80]];
for (name in levels[0]) {
levels[8][name] = levels[0][name];
}
levels[8].numberofXField = 9;
levels[8].numberofYField = 7;
var k = 0;
while (k <= (levels[8].numberofXField - 1)) {
levels[8][k] = new Array();
var l = 0;
while (l <= (levels[8].numberofYField - 1)) {
levels[8][k][l] = new Array();
l++;
}
k++;
}
levels[8].bg = new Array();
Line1 = "bbbbbbbbb ";
Line2 = "bchthfffb ";
Line3 = "bvbvbfbfb ";
Line4 = "bvbvffbfb ";
Line5 = "bvbvbfbfb ";
Line6 = "bchcbfffb ";
Line7 = "bbbbbbbbb ";
levels[8].bg = (((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7;
levels[8][1][1] = [["Enemy1", 20], ["Enemy3", 10]];
levels[8][1][5] = [["Citizen1", 10], ["Citizen2", 10]];
levels[8][4][3] = [["hero"]];
levels[8][7][1] = [["Treasure1", 2, 40], ["Enemy1", 5]];
levels[8][7][2] = [["Treasure1", 2, 40]];
levels[8][7][3] = [["Treasure1", 2, 40]];
levels[8][7][4] = [["Treasure1", 2, 40]];
levels[8][7][5] = [["Treasure1", 2, 80], ["Citizen2", 10]];
for (name in levels[0]) {
levels[9][name] = levels[0][name];
}
levels[9].numberofXField = 9;
levels[9].numberofYField = 8;
var k = 0;
while (k <= (levels[9].numberofXField - 1)) {
levels[9][k] = new Array();
var l = 0;
while (l <= (levels[9].numberofYField - 1)) {
levels[9][k][l] = new Array();
l++;
}
k++;
}
levels[9].bg = new Array();
Line1 = "bbbbbbbbb ";
Line2 = "bbbbbfffb ";
Line3 = "bbbbbfffb ";
Line4 = "bchhhcffb ";
Line5 = "bvbbbvbbb ";
Line6 = "bvbbbvbbb ";
Line7 = "bchhhcbbb ";
Line8 = "bbbbbbbbb ";
levels[9].bg = ((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8;
levels[9][1][5] = [["Citizen1", 5], ["Citizen2", 5], ["Treasure1", 3, 50]];
levels[9][1][3] = [["Enemy2", 5]];
levels[9][1][4] = [["Citizen3", 5]];
levels[9][1][6] = [["hero"], ["Citizen1", 5]];
levels[9][4][6] = [["Enemy1", 15], ["Enemy2", 10]];
levels[9][6][1] = [["Citizen1", 3], ["Treasure1", 6, 30]];
levels[9][5][1] = [["Citizen2", 3], ["Treasure1", 6, 30]];
levels[9][7][1] = [["Treasure1", 3, 50], ["Treasure1", 1, 80], ["Citizen1", 3]];
levels[9][7][3] = [["Enemy3", 5]];
for (name in levels[0]) {
levels[10][name] = levels[0][name];
}
levels[10].numberofXField = 9;
levels[10].numberofYField = 9;
var k = 0;
while (k <= (levels[10].numberofXField - 1)) {
levels[10][k] = new Array();
var l = 0;
while (l <= (levels[10].numberofYField - 1)) {
levels[10][k][l] = new Array();
l++;
}
k++;
}
levels[10].bg = new Array();
Line1 = "bbbbbbbbb ";
Line2 = "bchhhthcb ";
Line3 = "bvbbbvbvb ";
Line4 = "bvbbbchtb ";
Line5 = "bvbbbbbvb ";
Line6 = "bthcbbbvb ";
Line7 = "bvbvbbbvb ";
Line8 = "bchthhhcb ";
Line9 = "bbbbbbbbb ";
levels[10].bg = (((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9;
levels[10][1][1] = [["Enemy3", 3][3]];
levels[10][1][4] = [["Enemy1", 10]];
levels[10][1][6] = [["Enemy2", 5]];
levels[10][1][7] = [["hero"]];
levels[10][2][7] = [["Enemy2", 10]];
levels[10][3][1] = [["Citizen2", 5]];
levels[10][3][5] = [["Citizen2", 5], ["Treasure1", 3, 40]];
levels[10][3][7] = [["Enemy3", 3]];
levels[10][4][1] = [["Citizen1", 5]];
levels[10][5][1] = [["Citizen3", 5]];
levels[10][5][3] = [["Citizen2", 10], ["Treasure1", 3, 40]];
levels[10][7][1] = [["Citizen2", 10], ["Treasure1", 5, 20], ["Treasure1", 1, 100]];
levels[10][7][2] = [["Citizen2", 3], ["Treasure1", 2, 80]];
levels[10][7][3] = [["Citizen2", 3], ["Treasure1", 2, 80]];
levels[10][7][7] = [["Enemy1", 10]];
for (name in levels[0]) {
levels[11][name] = levels[0][name];
}
levels[11].numberofXField = 9;
levels[11].numberofYField = 9;
var k = 0;
while (k <= (levels[11].numberofXField - 1)) {
levels[11][k] = new Array();
var l = 0;
while (l <= (levels[11].numberofYField - 1)) {
levels[11][k][l] = new Array();
l++;
}
k++;
}
levels[11].bg = new Array();
Line1 = "bbbbbbbbb ";
Line2 = "bbbchhhcb ";
Line3 = "bbbvbbbvb ";
Line4 = "bchcffbvb ";
Line5 = "bvbfbfbvb ";
Line6 = "bvbffchcb ";
Line7 = "bvbbbvbbb ";
Line8 = "bchhhcbbb ";
Line9 = "bbbbbbbbb ";
levels[11].bg = (((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9;
levels[11][1][3] = [["Citizen3", 3]];
levels[11][1][5] = [["Treasure1", 1, 150], ["Citizen3", 3]];
levels[11][1][7] = [["Enemy3", 10]];
levels[11][3][2] = [["Treasure1", 4, 50]];
levels[11][3][5] = [["Citizen2", 15]];
levels[11][3][7] = [["Citizen1", 3]];
levels[11][5][1] = [["Enemy1", 10], ["Enemy2", 5]];
levels[11][5][3] = [["Citizen1", 15]];
levels[11][5][7] = [["Citizen1", 3]];
levels[11][7][1] = [["hero"]];
levels[11][7][2] = [["Enemy2", 5], ["Treasure1", 4, 50]];
levels[11][7][5] = [["Enemy1", 10], ["Enemy2", 5]];
for (name in levels[0]) {
levels[12][name] = levels[0][name];
}
levels[12].numberofXField = 10;
levels[12].numberofYField = 10;
var k = 0;
while (k <= (levels[12].numberofXField - 1)) {
levels[12][k] = new Array();
var l = 0;
while (l <= (levels[12].numberofYField - 1)) {
levels[12][k][l] = new Array();
l++;
}
k++;
}
levels[12].bg = new Array();
Line1 = "bbbbbbbbbb ";
Line2 = "bchhththcb ";
Line3 = "bvbbvbvbvb ";
Line4 = "bvbbvbvbvb ";
Line5 = "bchhcfvfvb ";
Line6 = "bbbbfbvbvb ";
Line7 = "bchhhhxhtb ";
Line8 = "bvbbfbvbvb ";
Line9 = "bchhhhthcb ";
Line10 = "bbbbbbbbbb ";
levels[12].bg = ((((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9) + Line10;
levels[12][1][2] = [["Enemy4", 5], ["Enemy1", 20]];
levels[12][1][8] = [["Citizen1", 20], ["Citizen1", 1]];
levels[12][2][1] = [["Treasure1", 3, 150]];
levels[12][3][8] = [["Treasure1", 1, 500], ["Citizen1", 1]];
levels[12][4][2] = [["Enemy2", 10], ["Enemy3", 10]];
levels[12][4][3] = [["Enemy3", 5], ["Enemy4", 5]];
levels[12][6][5] = [["Treasure1", 1, 10]];
levels[12][8][7] = [["Enemy2", 10], ["Citizen2", 10]];
levels[12][5][4] = [["hero"]];
for (name in levels[0]) {
levels[13][name] = levels[0][name];
}
levels[13].numberofXField = 12;
levels[13].numberofYField = 12;
var k = 0;
while (k <= (levels[13].numberofXField - 1)) {
levels[13][k] = new Array();
var l = 0;
while (l <= (levels[13].numberofYField - 1)) {
levels[13][k][l] = new Array();
l++;
}
k++;
}
levels[13].bg = new Array();
Line1 = "bbbbbbbbbbbb ";
Line2 = "bchhhhthhhcb ";
Line3 = "bvbbbbvbbbvb ";
Line4 = "bvbbbbvbbbvb ";
Line5 = "bchhthcfffvb ";
Line6 = "bbbbvbbbbbvb ";
Line7 = "bchhcbchhhtb ";
Line8 = "bvbbfbvbbbvb ";
Line9 = "bvfffbchthtb ";
Line10 = "bvbbbbbbvbvb ";
Line11 = "bchhhhhhthcb ";
Line12 = "bbbbbbbbbbbb ";
levels[13].bg = ((((((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9) + Line10) + Line11) + Line12;
levels[13][1][1] = [["Citizen1", 3]];
levels[13][1][2] = [["Citizen2", 3]];
levels[13][1][3] = [["Citizen3", 3]];
levels[13][1][4] = [["Citizen2", 3]];
levels[13][1][8] = [["Citizen3", 3]];
levels[13][1][9] = [["Citizen2", 3]];
levels[13][1][10] = [["Citizen2", 3]];
levels[13][2][1] = [["Citizen2", 3], ["Treasure1", 1, 100]];
levels[13][2][8] = [["Citizen1", 3]];
levels[13][3][1] = [["Citizen3", 3], ["Treasure1", 1, 100]];
levels[13][3][8] = [["Citizen1", 3]];
levels[13][4][1] = [["Citizen2", 3], ["Treasure1", 1, 100]];
levels[13][4][4] = [["Enemy2", 10], ["Enemy3", 10]];
levels[13][4][8] = [["Citizen1", 3]];
levels[13][6][1] = [["Citizen2", 3], ["Treasure1", 1, 100]];
levels[13][6][2] = [["Citizen1", 10]];
levels[13][6][3] = [["Citizen2", 10]];
levels[13][6][4] = [["hero"]];
levels[13][6][6] = [["Enemy2", 10]];
levels[13][6][8] = [["Enemy2", 5], ["Enemy3", 5]];
levels[13][6][10] = [["Citizen2", 10]];
levels[13][7][1] = [["Citizen1", 3], ["Treasure1", 1, 100]];
levels[13][8][1] = [["Citizen1", 3], ["Treasure1", 1, 100]];
levels[13][8][8] = [["Enemy2", 5], ["Enemy4", 5]];
levels[13][8][10] = [["Enemy1", 10], ["Enemy3", 5]];
levels[13][9][1] = [["Citizen1", 3], ["Treasure1", 1, 100]];
levels[13][10][1] = [["Citizen1", 3], ["Treasure1", 1, 100]];
levels[13][10][2] = [["Citizen2", 3]];
levels[13][10][3] = [["Citizen3", 3]];
levels[13][10][4] = [["Citizen1", 3]];
for (name in levels[0]) {
levels[14][name] = levels[0][name];
}
levels[14].numberofXField = 10;
levels[14].numberofYField = 12;
var k = 0;
while (k <= (levels[14].numberofXField - 1)) {
levels[14][k] = new Array();
var l = 0;
while (l <= (levels[14].numberofYField - 1)) {
levels[14][k][l] = new Array();
l++;
}
k++;
}
levels[14].bg = new Array();
Line1 = "bbbbbbbbbb ";
Line2 = "bchhthhhcb ";
Line3 = "bvbbvbfbvb ";
Line4 = "bvbbvbfbvb ";
Line5 = "bthhxhhhtb ";
Line6 = "bvbbvbfbvb ";
Line7 = "bvffvfffvb ";
Line8 = "bvbbvbfbvb ";
Line9 = "bvffvfffvb ";
Line10 = "bvbbvbfbvb ";
Line11 = "bchhthhhcb ";
Line12 = "bbbbbbbbbb ";
levels[14].bg = ((((((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9) + Line10) + Line11) + Line12;
levels[14][1][2] = [["Citizen1", 5]];
levels[14][1][3] = [["Citizen2", 5]];
levels[14][1][4] = [["Citizen3", 5]];
levels[14][1][5] = [["Citizen1", 5]];
levels[14][1][8] = [["Enemy1", 10]];
levels[14][1][10] = [["Citizen1", 3]];
levels[14][2][1] = [["Treasure1", 3, 100]];
levels[14][2][8] = [["Treasure1", 3, 100], ["Enemy1", 10]];
levels[14][2][10] = [["Citizen2", 3]];
levels[14][3][4] = [["Citizen2", 5]];
levels[14][3][8] = [["Treasure1", 6, 50], ["Enemy1", 10]];
levels[14][3][10] = [["Citizen3", 3]];
levels[14][4][2] = [["Citizen1", 5]];
levels[14][4][3] = [["Citizen2", 5]];
levels[14][4][4] = [["Citizen3", 5]];
levels[14][4][5] = [["Citizen2", 5]];
levels[14][4][10] = [["Citizen3", 3]];
levels[14][5][4] = [["Citizen1", 5]];
levels[14][5][10] = [["Citizen1", 3]];
levels[14][6][3] = [["Treasure1", 5, 30], ["Enemy4", 5]];
levels[14][6][4] = [["hero"]];
levels[14][6][5] = [["Treasure1", 5, 30], ["Enemy3", 10]];
levels[14][6][10] = [["Citizen1", 3]];
levels[14][7][10] = [["Citizen1", 3]];
levels[14][8][4] = [["Citizen1", 5]];
levels[14][8][8] = [["Treasure1", 5, 50], ["Enemy2", 5]];
levels[14][8][9] = [["Citizen1", 5]];
levels[14][8][10] = [["Citizen1", 3]];
for (name in levels[0]) {
levels[15][name] = levels[0][name];
}
levels[15].numberofXField = 10;
levels[15].numberofYField = 14;
var k = 0;
while (k <= (levels[15].numberofXField - 1)) {
levels[15][k] = new Array();
var l = 0;
while (l <= (levels[15].numberofYField - 1)) {
levels[15][k][l] = new Array();
l++;
}
k++;
}
levels[15].bg = new Array();
Line1 = "bbbbbbbbbb ";
Line2 = "bchhthhhcb ";
Line3 = "bvbbvbfbvb ";
Line4 = "bvbbvbfbvb ";
Line5 = "bthhxhhhtb ";
Line6 = "bvbbvbbbvb ";
Line7 = "bchhxhhhtb ";
Line8 = "bbbbvbbbvb ";
Line9 = "bchhthhhtb ";
Line10 = "bvbfffbbvb ";
Line11 = "bvbfffbbvb ";
Line12 = "bvbbbbbbvb ";
Line13 = "bchhhhhhcb ";
Line14 = "bbbbbbbbbb ";
levels[15].bg = ((((((((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9) + Line10) + Line11) + Line12) + Line13) + Line14;
levels[15][1][2] = [["Citizen1", 5]];
levels[15][1][3] = [["Citizen2", 5]];
levels[15][1][4] = [["Citizen3", 5]];
levels[15][1][5] = [["Citizen1", 5]];
levels[15][1][10] = [["Citizen1", 3]];
levels[15][1][12] = [["Enemy2", 10]];
levels[15][2][1] = [["Treasure1", 3, 100]];
levels[15][2][8] = [["Treasure1", 3, 100], ["Enemy1", 10]];
levels[15][3][4] = [["Citizen2", 5]];
levels[15][3][8] = [["Citizen3", 3]];
levels[15][3][9] = [["Citizen3", 3]];
levels[15][3][10] = [["Citizen1", 3]];
levels[15][3][12] = [["Enemy1", 10]];
levels[15][4][2] = [["Citizen1", 5]];
levels[15][4][3] = [["Citizen2", 5]];
levels[15][4][4] = [["Citizen3", 5], ["hero"]];
levels[15][4][5] = [["Citizen2", 5]];
levels[15][4][8] = [["Citizen3", 3]];
levels[15][4][9] = [["Citizen1", 3]];
levels[15][4][10] = [["Citizen2", 3]];
levels[15][4][12] = [["Enemy4", 5]];
levels[15][5][4] = [["Enemy2", 5]];
levels[15][5][6] = [["Treasure1", 5, 30], ["Enemy4", 5]];
levels[15][5][8] = [["Citizen1", 3]];
levels[15][5][9] = [["Citizen2", 3]];
levels[15][5][10] = [["Citizen3", 3]];
levels[15][5][12] = [["Enemy1", 10]];
levels[15][6][6] = [["Treasure1", 5, 30], ["Enemy3", 5]];
levels[15][8][3] = [["Citizen1", 5]];
levels[15][8][4] = [["Citizen2", 5]];
levels[15][8][5] = [["Citizen3", 5]];
levels[15][8][6] = [["Citizen1", 5]];
levels[15][8][9] = [["Citizen1", 5]];
levels[15][8][10] = [["Citizen2", 5]];
levels[15][8][12] = [["Enemy1", 5]];
for (name in levels[0]) {
levels[16][name] = levels[0][name];
}
levels[16].numberofXField = 10;
levels[16].numberofYField = 17;
var k = 0;
while (k <= (levels[16].numberofXField - 1)) {
levels[16][k] = new Array();
var l = 0;
while (l <= (levels[16].numberofYField - 1)) {
levels[16][k][l] = new Array();
l++;
}
k++;
}
levels[16].bg = new Array();
Line1 = "bbbbbbbbbb ";
Line2 = "bchhthhhcb ";
Line3 = "bvbbvbfbvb ";
Line4 = "bvbbvbfbvb ";
Line5 = "bthhxhhhtb ";
Line6 = "bvbbvbbbvb ";
Line7 = "bvffvfffvb ";
Line8 = "bvbbvbfbvb ";
Line9 = "bthhxhhhcb ";
Line10 = "bvbbvbfbbb ";
Line11 = "bvbbvbfbbb ";
Line12 = "bthhxhhhcb ";
Line13 = "bvbbvbbbvb ";
Line14 = "bvffvfffvb ";
Line15 = "bvbbvbfbvb ";
Line16 = "bchhthhhcb ";
Line17 = "bbbbbbbbbb ";
levels[16].bg = (((((((((((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9) + Line10) + Line11) + Line12) + Line13) + Line14) + Line15) + Line16) + Line17;
levels[16][1][8] = [["Enemy1", 10]];
levels[16][2][1] = [["Treasure1", 3, 100], ["Enemy1", 10]];
levels[16][3][8] = [["Treasure1", 6, 50], ["Enemy1", 10]];
levels[16][8][1] = [["Enemy4", 10]];
levels[16][3][4] = [["Enemy2", 10]];
levels[16][4][2] = [["Enemy2", 10]];
levels[16][4][3] = [["Enemy3", 10]];
levels[16][4][4] = [["Enemy1", 10]];
levels[16][5][4] = [["Enemy1", 10]];
levels[16][6][4] = [["Treasure1", 5, 30], ["Enemy3", 10]];
levels[16][1][15] = [["Citizen1", 5], ["Citizen2", 5]];
levels[16][2][11] = [["Treasure1", 3, 100], ["Citizen3", 5]];
levels[16][1][12] = [["Treasure1", 3, 100], ["Citizen1", 5]];
levels[16][1][13] = [["Treasure1", 3, 100], ["Citizen2", 5]];
levels[16][2][15] = [["Treasure1", 3, 100], ["Citizen1", 5]];
levels[16][3][15] = [["Treasure1", 6, 50], ["Citizen3", 5]];
levels[16][8][11] = [["Citizen2", 5]];
levels[16][8][12] = [["Citizen1", 5]];
levels[16][8][13] = [["Citizen3", 5]];
levels[16][3][13] = [["Citizen2", 5]];
levels[16][4][10] = [["Citizen1", 5]];
levels[16][4][11] = [["Citizen2", 5]];
levels[16][4][12] = [["hero"], ["Citizen1", 5]];
levels[16][5][13] = [["Citizen1", 5]];
levels[16][6][13] = [["Treasure1", 5, 30], ["Citizen3", 5]];
levels[16][8][15] = [["Treasure1", 5, 50], ["Citizen1", 5]];
for (name in levels[0]) {
levels[17][name] = levels[0][name];
}
levels[17].numberofXField = 12;
levels[17].numberofYField = 14;
var k = 0;
while (k <= (levels[17].numberofXField - 1)) {
levels[17][k] = new Array();
var l = 0;
while (l <= (levels[17].numberofYField - 1)) {
levels[17][k][l] = new Array();
l++;
}
k++;
}
levels[17].bg = new Array();
Line1 = "bbbbbbbbbbbb ";
Line2 = "bchhhhthhhcb ";
Line3 = "bvbffbvbbbvb ";
Line4 = "bvbfffvbbbvb ";
Line5 = "bvbbbbchhhtb ";
Line6 = "bvbbbbbbfbvb ";
Line7 = "bchhcbbffbvb ";
Line8 = "bbbbvbbffbvb ";
Line9 = "bbbbvbbfbbvb ";
Line10 = "bchhcfffchtb ";
Line11 = "bvbbfffbvbvb ";
Line12 = "bvbbbbfbvbvb ";
Line13 = "bchhhhhhthcb ";
Line14 = "bbbbbbbbbbbb ";
levels[17].bg = ((((((((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9) + Line10) + Line11) + Line12) + Line13) + Line14;
levels[17][1][1] = [["Citizen1", 3]];
levels[17][1][3] = [["Citizen3", 3]];
levels[17][1][5] = [["Citizen3", 3]];
levels[17][1][6] = [["Citizen1", 3]];
levels[17][1][9] = [["Enemy1", 5], ["Enemy3", 5]];
levels[17][1][11] = [["Citizen2", 3]];
levels[17][2][12] = [["Citizen1", 3]];
levels[17][3][3] = [["Enemy3", 10]];
levels[17][3][12] = [["Citizen1", 3], ["Treasure1", 2, 50]];
levels[17][4][2] = [["Enemy1", 10], ["Enemy3", 5]];
levels[17][4][10] = [["Citizen1", 5], ["Treasure1", 2, 100]];
levels[17][4][12] = [["Citizen2", 3], ["Treasure1", 2, 50]];
levels[17][5][3] = [["Enemy4", 5], ["Enemy2", 5]];
levels[17][5][9] = [["Citizen2", 5], ["Treasure1", 2, 100]];
levels[17][5][10] = [["Citizen1", 5], ["Treasure1", 2, 100]];
levels[17][5][12] = [["Citizen3", 3], ["Treasure1", 2, 50]];
levels[17][6][3] = [["hero"]];
levels[17][6][9] = [["Citizen2", 8], ["Treasure1", 2, 100]];
levels[17][6][10] = [["Citizen2", 5], ["Treasure1", 2, 100]];
levels[17][6][12] = [["Citizen3", 3], ["Treasure1", 2, 100]];
levels[17][7][6] = [["Citizen1", 7]];
levels[17][7][7] = [["Citizen2", 7]];
levels[17][7][12] = [["Citizen2", 3]];
levels[17][8][4] = [["Enemy1", 5], ["Enemy3", 5]];
levels[17][8][12] = [["Citizen2", 3], ["Treasure1", 2, 50]];
levels[17][9][12] = [["Citizen1", 3], ["Treasure1", 2, 50]];
levels[17][10][12] = [["Citizen1", 3], ["Treasure1", 2, 50]];
for (name in levels[0]) {
levels[18][name] = levels[0][name];
}
levels[18].numberofXField = 14;
levels[18].numberofYField = 14;
var k = 0;
while (k <= (levels[18].numberofXField - 1)) {
levels[18][k] = new Array();
var l = 0;
while (l <= (levels[18].numberofYField - 1)) {
levels[18][k][l] = new Array();
l++;
}
k++;
}
levels[18].bg = new Array();
Line1 = "bbbbbbbbbbbbbb ";
Line2 = "bchhhhththhhcb ";
Line3 = "bvbffbvbvbbbvb ";
Line4 = "bvbffbchcffbvb ";
Line5 = "bvbbbbbbbffbvb ";
Line6 = "bvbbfffbbbfbvb ";
Line7 = "bthcffffchhhtb ";
Line8 = "bvbvbbbbvbbbvb ";
Line9 = "bthcbbffchhhtb ";
Line10 = "bvbfffffbbfbvb ";
Line11 = "bvbffbbbbffbvb ";
Line12 = "bvbbbbbbbfbbvb ";
Line13 = "bchhhhhhhhhhcb ";
Line14 = "bbbbbbbbbbbbbb ";
levels[18].bg = ((((((((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9) + Line10) + Line11) + Line12) + Line13) + Line14;
levels[18][1][1] = [["Enemy4", 5], ["Enemy2", 5]];
levels[18][1][8] = [["Enemy1", 10]];
levels[18][1][10] = [["Enemy2", 5]];
levels[18][1][12] = [["hero"]];
levels[18][3][12] = [["Enemy2", 5]];
levels[18][3][2] = [["Citizen1", 5], ["Treasure1", 2, 150]];
levels[18][3][3] = [["Citizen2", 5], ["Treasure1", 2, 150]];
levels[18][4][2] = [["Citizen3", 5], ["Treasure1", 2, 150]];
levels[18][4][3] = [["Citizen1", 5], ["Treasure1", 2, 150]];
levels[18][4][5] = [["Citizen2", 5], ["Treasure1", 2, 150]];
levels[18][4][6] = [["Citizen3", 5], ["Treasure1", 2, 150]];
levels[18][5][5] = [["Citizen2", 5], ["Treasure1", 2, 150]];
levels[18][5][6] = [["Citizen3", 5], ["Treasure1", 2, 150]];
levels[18][6][5] = [["Citizen2", 5], ["Treasure1", 2, 150]];
levels[18][6][6] = [["Citizen3", 5], ["Treasure1", 2, 150]];
levels[18][3][9] = [["Citizen1", 5], ["Treasure1", 2, 150]];
levels[18][3][10] = [["Citizen2", 5], ["Treasure1", 2, 150]];
levels[18][4][9] = [["Citizen3", 5], ["Treasure1", 2, 150]];
levels[18][4][10] = [["Citizen1", 5], ["Treasure1", 2, 150]];
levels[18][9][3] = [["Enemy4", 5]];
levels[18][9][4] = [["Enemy4", 5]];
levels[18][9][12] = [["Enemy2", 10]];
levels[18][10][3] = [["Enemy4", 5]];
levels[18][10][4] = [["Enemy4", 5]];
levels[18][9][10] = [["Enemy3", 5]];
levels[18][10][10] = [["Enemy4", 5]];
levels[18][12][6] = [["Enemy1", 10]];
levels[19] = new Object();
for (name in levels[0]) {
levels[19][name] = levels[0][name];
}
levels[19].numberofXField = 15;
levels[19].numberofYField = 17;
var k = 0;
while (k <= (levels[19].numberofXField - 1)) {
levels[19][k] = new Array();
var l = 0;
while (l <= (levels[19].numberofYField - 1)) {
levels[19][k][l] = new Array();
l++;
}
k++;
}
levels[19].bg = new Array();
Line1 = "bbbbbbbbbbbbbbb ";
Line2 = "bchhhhhthhhhhcb ";
Line3 = "bvbbbbbvbbbbbvb ";
Line4 = "bvbchthththcbvb ";
Line5 = "bvbvfvbbbvfvbvb ";
Line6 = "bthtfchhhcfthtb ";
Line7 = "bvbvfffbfffvbvb ";
Line8 = "bvbchhhthhhcbvb ";
Line9 = "bvbbbbbvbbbbbvb ";
Line10 = "bvbchhhthhhcbvb ";
Line11 = "bvbvfffbfffvbvb ";
Line12 = "bthtfchhhcfthtb ";
Line13 = "bvbvfvbbbvfvbvb ";
Line14 = "bvbchthththcbvb ";
Line15 = "bvbbbbbvbbbbbvb ";
Line16 = "bchhhhhthhhhhcb ";
Line17 = "bbbbbbbbbbbbbbb ";
levels[19].bg = (((((((((((((((Line1 + Line2) + Line3) + Line4) + Line5) + Line6) + Line7) + Line8) + Line9) + Line10) + Line11) + Line12) + Line13) + Line14) + Line15) + Line16) + Line17;
levels[19][1][1] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][2] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][3] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][4] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][5] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][6] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][7] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][8] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][9] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][10] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][11] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][12] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][13] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][14] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][1][15] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][4][4] = [["Citizen1", 5]];
levels[19][4][5] = [["Citizen1", 5]];
levels[19][4][6] = [["Citizen1", 5]];
levels[19][4][10] = [["Enemy1", 10]];
levels[19][4][11] = [["Enemy2", 5]];
levels[19][4][12] = [["Enemy3", 5]];
levels[19][7][2] = [["Enemy2", 5]];
levels[19][7][3] = [["Enemy1", 5]];
levels[19][7][13] = [["Enemy2", 5]];
levels[19][7][14] = [["hero"]];
levels[19][7][15] = [["Enemy4", 10]];
levels[19][10][4] = [["Citizen1", 5]];
levels[19][10][5] = [["Citizen1", 5]];
levels[19][10][6] = [["Citizen1", 5]];
levels[19][10][10] = [["Enemy1", 10]];
levels[19][10][11] = [["Enemy2", 5]];
levels[19][10][12] = [["Enemy3", 5]];
levels[19][13][1] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][2] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][3] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][4] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][5] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][6] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][7] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][8] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][9] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][10] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][11] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][12] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][13] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][14] = [["Citizen1", 2], ["Treasure1", 2, 100]];
levels[19][13][15] = [["Citizen1", 2], ["Treasure1", 2, 100]];
aimsrc.duplicateMovieClip("cursor", 15000);
cursor.gotoAndStop("arrow");
var musicEnabled = true;
var soundEnabled = true;
_root.submited = false;
playgame = function () {
score = 0;
oldScore = 0;
Hero = new Object();
for (name in hero0) {
Hero[name] = hero0[name];
}
numberofLevel = 1;
changeFrame = true;
gotoAndPlay ("game");
};
nextLevel = function (MH) {
numberofLevel++;
Hero.moneyLevel = MH.moneyLevel;
Hero.weaponLevel1 = MH.weaponLevel1;
Hero.weaponLevel2 = MH.weaponLevel2;
Hero.weaponLevel3 = MH.weaponLevel3;
Hero.weaponLevel4 = MH.weaponLevel4;
Hero.armorLevel = MH.armorLevel;
Hero.speed = MH.speed;
Hero.weaponNumber = MH.weaponNumber;
HeroLast = new Object();
HeroLast.moneyLevel = MH.moneyLevel;
HeroLast.weaponLevel1 = MH.weaponLevel1;
HeroLast.weaponLevel2 = MH.weaponLevel2;
HeroLast.weaponLevel3 = MH.weaponLevel3;
HeroLast.weaponLevel4 = MH.weaponLevel4;
HeroLast.armorLevel = MH.armorLevel;
HeroLast.speed = MH.speed;
HeroLast.weaponNumber = MH.weaponNumber;
oldScore = score;
changeFrame = true;
if (numberofLevel <= numberofLevels) {
gotoAndPlay ("shop");
} else {
gotoAndPlay ("win");
}
};
restartLevel = function () {
changeFrame = true;
if (numberofLevel > 1) {
Hero.moneyLevel = HeroLast.moneyLevel;
Hero.weaponLevel1 = HeroLast.weaponLevel1;
Hero.weaponLevel2 = HeroLast.weaponLevel2;
Hero.weaponLevel3 = HeroLast.weaponLevel3;
Hero.weaponLevel4 = HeroLast.weaponLevel4;
Hero.armorLevel = HeroLast.armorLevel;
Hero.speed = HeroLast.speed;
Hero.weaponNumber = HeroLast.weaponNumber;
score = oldScore;
gotoAndPlay ("shop");
} else {
playgame();
}
};
gameOver = function () {
changeFrame = true;
_root.gotoAndPlay("over");
};
Frame 4
changeFrame = false;
Frame 5
play();
Frame 6
updateMouse();
if (!changeFrame) {
gotoAndStop ("mainmenuplay");
}
Frame 7
_quality = "LOW";
changeFrame = false;
cursor.gotoAndStop("aim");
onEnterFrame = function () {
main.begin();
delete onEnterFrame;
};
win._visible = false;
loose1._visible = false;
loose2._visible = false;
paused._visible = false;
ico.gotoAndStop(Hero.weaponNumber);
Frame 8
updateMouse();
play();
Frame 9
if (!changeFrame) {
gotoAndStop ("play");
}
Frame 10
changeFrame = false;
_quality = "HIGH";
cursor.gotoAndStop("arrow");
prise = "";
if (Hero.weaponLevel1 == weaponLevelmax1) {
bw1.enabled = false;
weapon1mc.gotoAndStop(3);
}
if (Hero.weaponLevel2 == weaponLevelmax2) {
bw2.enabled = false;
weapon2mc.gotoAndStop(3);
}
if (Hero.weaponLevel3 == weaponLevelmax3) {
bw3.enabled = false;
weapon3mc.gotoAndStop(3);
}
if (Hero.weaponLevel4 == weaponLevelmax4) {
bw4.enabled = false;
weapon4mc.gotoAndStop(3);
}
if (Hero.armorLevel == armorLevelmax) {
ba.enabled = false;
armormc.gotoAndStop(3);
}
Instance of Symbol 1669 MovieClip in Frame 10
/* no clip actions */
Frame 11
m = Hero.moneyLevel;
updateMouse();
uw1.setLevel(Hero.weaponLevel1, weaponLevelmax1);
uw2.setLevel(Hero.weaponLevel2, weaponLevelmax2);
uw3.setLevel(Hero.weaponLevel3, weaponLevelmax3);
uw4.setLevel(Hero.weaponLevel4, weaponLevelmax4);
ua.setLevel(Hero.armorLevel, armorLevelmax);
if (Hero.weaponLevel1 < weaponLevelmax1) {
prisew1 = shop.weapon1[Hero.weaponLevel1 + 1];
} else {
prisew1 = "";
}
if (Hero.weaponLevel2 < weaponLevelmax2) {
prisew2 = shop.weapon2[Hero.weaponLevel2 + 1];
} else {
prisew2 = "";
}
if (Hero.weaponLevel3 < weaponLevelmax3) {
prisew3 = shop.weapon3[Hero.weaponLevel3 + 1];
} else {
prisew3 = "";
}
if (Hero.weaponLevel4 < weaponLevelmax4) {
prisew4 = shop.weapon4[Hero.weaponLevel4 + 1];
} else {
prisew4 = "";
}
if (Hero.armorLevel < armorLevelmax) {
prisea = shop.armor[Hero.armorLevel + 1];
} else {
prisea = "";
}
if ((Hero.moneyLevel < shop.weapon1[Hero.weaponLevel1 + 1]) && (Hero.weaponLevel1 < weaponLevelmax1)) {
weapon1mc.gotoAndStop(4);
bw1.enabled = false;
}
if ((Hero.moneyLevel < shop.weapon2[Hero.weaponLevel2 + 1]) && (Hero.weaponLevel2 < weaponLevelmax2)) {
weapon2mc.gotoAndStop(4);
bw2.enabled = false;
}
if ((Hero.moneyLevel < shop.weapon3[Hero.weaponLevel3 + 1]) && (Hero.weaponLevel3 < weaponLevelmax3)) {
weapon3mc.gotoAndStop(4);
bw3.enabled = false;
}
if ((Hero.moneyLevel < shop.weapon4[Hero.weaponLevel4 + 1]) && (Hero.weaponLevel4 < weaponLevelmax4)) {
weapon4mc.gotoAndStop(4);
bw4.enabled = false;
}
if ((Hero.moneyLevel < shop.armor[Hero.armorLevel + 1]) && (Hero.armorLevel < armorLevelmax)) {
armormc.gotoAndStop(4);
ba.enabled = false;
}
play();
Frame 12
gotoAndStop ("shopping");
Frame 13
changeFrame = false;
_quality = "HIGH";
cursor.gotoAndStop("arrow");
Frame 14
updateMouse();
play();
Frame 15
gotoAndStop ("creditsplay");
Frame 16
changeFrame = false;
_quality = "HIGH";
cursor.gotoAndStop("arrow");
submit.valScore = score;
submit._visible = !submited;
submit.sub.enabled = false;
Selection.setFocus(submit.playerName);
Frame 17
updateMouse();
play();
Frame 18
gotoAndStop ("overplay");
Frame 19
changeFrame = false;
_quality = "HIGH";
cursor.gotoAndStop("arrow");
submit.valScore = score;
submit._visible = !submited;
submit.sub.enabled = false;
Selection.setFocus(submit.playerName);
Frame 20
updateMouse();
play();
Frame 21
gotoAndStop ("winplay");
Frame 22
changeFrame = false;
_quality = "HIGH";
backB.enabled = false;
i = 1;
cursor.gotoAndStop("arrow");
Frame 23
updateMouse();
play();
Frame 24
gotoAndStop ("instructions1");
Frame 25
updateMouse();
backB.enabled = true;
play();
Frame 26
gotoAndStop ("instructions2");
Frame 27
updateMouse();
play();
Frame 28
gotoAndStop ("instructions3");
Frame 29
updateMouse();
play();
Frame 30
gotoAndStop ("instructions4");
Frame 31
updateMouse();
play();
Frame 32
gotoAndStop ("instructions5");
Frame 33
updateMouse();
play();
Frame 34
gotoAndStop ("instructions6");
Frame 35
updateMouse();
play();
Frame 36
gotoAndStop ("instructions7");
Frame 37
updateMouse();
nextB.enabled = true;
play();
Frame 38
gotoAndStop ("instructions8");
Frame 39
updateMouse();
play();
Frame 40
gotoAndStop ("instructions9");
Frame 41
updateMouse();
nextB.enabled = false;
play();
Frame 42
gotoAndStop ("instructions10");
Symbol 1806 MovieClip [__Packages.hero] Frame 0
class hero
{
var itstarget, parentTarget, damage, moneyLevel, speed, armorLevel, armor, weaponNumber, weaponLevel1, weaponLevel2, weaponLevel3, weaponLevel4, bulletNumber, times, motionStart, dead, idIntervalmg, idIntervalshoot, changed, loadbulletnames, Bullets, ritem, soundFlag, soundCounter, motionLeft, motionRight, motionUp, motionDown, shootenable, myBullet, alpha;
function hero (myTarget, myParentTarget, myDamage, myMoneyLevel, mySpeed, myArmorLevel, myArmor, myWeaponNumber, myWeaponLevel1, myWeaponLevel2, myWeaponLevel3, myWeaponLevel4) {
itstarget = myTarget;
parentTarget = myParentTarget;
damage = myDamage;
moneyLevel = myMoneyLevel;
speed = mySpeed;
armorLevel = myArmorLevel;
armor = myArmor;
weaponNumber = myWeaponNumber;
weaponLevel1 = myWeaponLevel1;
weaponLevel2 = myWeaponLevel2;
weaponLevel3 = myWeaponLevel3;
weaponLevel4 = myWeaponLevel4;
bulletNumber = 0;
var _local3 = 2000 - (weaponLevel4 * 200);
var _local2 = 400 - (weaponLevel3 * 50);
var _local5 = 1300 - (weaponLevel2 * 150);
var _local4 = 1000 - (weaponLevel1 * 100);
times = [0, _local4, _local5, _local2, _local3];
motionStart = false;
dead = false;
idIntervalmg = 0;
idIntervalshoot = 0;
changed = false;
loadbulletnames = [0, "bullet1", "bullet2", "bullet3", "bullet4"];
Bullets = new Array();
ritem = itstarget.radar.setHero(itstarget._x, itstarget._y);
soundFlag = false;
soundCounter = 0;
}
function update(flag, dir) {
if (soundFlag) {
soundCounter++;
if (soundCounter == 30) {
soundCounter = 0;
soundFlag = false;
}
}
}
function letItMove(flag, dir) {
var thisObj = this;
var directionsN = 0;
switch (dir) {
case "left" :
motionLeft = flag;
break;
case "right" :
motionRight = flag;
break;
case "up" :
motionUp = flag;
break;
case "down" :
motionDown = flag;
}
if ((!motionStart) && (((motionLeft or motionRight) or motionUp) or motionDown)) {
motionStart = true;
itstarget.motion(true);
thisObj.itstarget.onEnterFrame = function () {
thisObj.itstarget.legs._rotation = 0;
directionsN = 0;
if (thisObj.motionLeft) {
directionsN++;
thisObj.itstarget.legs._rotation = (thisObj.itstarget.legs._rotation - 90) / directionsN;
thisObj.motion("left");
}
if (thisObj.motionRight) {
directionsN++;
thisObj.itstarget.legs._rotation = (thisObj.itstarget.legs._rotation + 90) / directionsN;
thisObj.motion("right");
}
if (thisObj.motionUp) {
directionsN++;
thisObj.itstarget.legs._rotation = thisObj.itstarget.legs._rotation / directionsN;
thisObj.motion("up");
}
if (thisObj.motionDown) {
directionsN++;
thisObj.itstarget.legs._rotation = (thisObj.itstarget.legs._rotation + 180) / directionsN;
thisObj.motion("down");
}
};
}
if (motionStart && ((((!motionLeft) && (!motionRight)) && (!motionUp)) && (!motionDown))) {
motionStart = false;
itstarget.motion(false);
delete thisObj.itstarget.onEnterFrame;
}
}
function motion(dir) {
var _local5;
var _local4;
_local5 = itstarget._x;
_local4 = itstarget._y;
switch (dir) {
case "left" :
itstarget._x = itstarget._x - speed;
break;
case "right" :
itstarget._x = itstarget._x + speed;
break;
case "up" :
itstarget._y = itstarget._y - speed;
break;
case "down" :
itstarget._y = itstarget._y + speed;
}
if (parentTarget.testOnBuilding(itstarget._x, itstarget._y)) {
itstarget._x = _local5;
itstarget._y = _local4;
if (!soundFlag) {
var _local3 = Math.round(Math.random() * 2) + 1;
_root.playSound("hero_meet_wall_0" + _local3);
soundFlag = true;
}
}
ritem.setX(itstarget._x);
ritem.setY(itstarget._y);
}
function stopShoot() {
if (shootenable != undefined) {
shootenable = false;
}
}
function shoot() {
function shootgun(d) {
if (thisObj.shootenable) {
var X;
var Y;
_root.playSound("hero_shoot_01");
thisObj.itstarget.man.fire.play();
X = thisObj.parentTarget._xmouse;
Y = thisObj.parentTarget._ymouse;
thisObj.bulletNumber = thisObj.bulletNumber + 1;
thisObj.parentTarget.attachMovie(thisObj.loadbulletnames[thisObj.weaponNumber], "bullet" + thisObj.bulletNumber, thisObj.parentTarget.getNextHighestDepth());
thisObj.alpha = -Math.atan((X - thisObj.itstarget._x) / (Y - thisObj.itstarget._y));
if ((Y - thisObj.itstarget._y) >= 0) {
thisObj.alpha = thisObj.alpha + Math.PI;
}
var s;
s = thisObj.parentTarget._name;
thisObj.myBullet = eval ((s + "/bullet") + thisObj.bulletNumber);
thisObj.myBullet._x = thisObj.itstarget._x - (thisObj.itstarget.man.gun._y * Math.sin((thisObj.itstarget.man._rotation * Math.PI) / 180));
thisObj.myBullet._y = thisObj.itstarget._y + (thisObj.itstarget.man.gun._y * Math.cos((thisObj.itstarget.man._rotation * Math.PI) / 180));
thisObj.myBullet._rotation = thisObj.itstarget.man._rotation + d;
}
if (!thisObj.shootenable) {
clearInterval(thisObj.idIntervalmg);
thisObj.idIntervalmg = 0;
thisObj.shootenable = true;
}
}
function shotgun() {
if (thisObj.shootenable) {
shootgun(0);
this.Bullets.push(this.myBullet);
shootgun(15);
this.Bullets.push(this.myBullet);
shootgun(-15);
this.Bullets.push(this.myBullet);
} else {
clearInterval(thisObj.idIntervalmg);
thisObj.idIntervalmg = 0;
thisObj.shootenable = true;
}
}
var thisObj;
thisObj = this;
if (!idIntervalshoot) {
shootenable = true;
}
var s;
s = parentTarget._name;
var n;
n = thisObj.bulletNumber;
myBullet = eval ((s + "/bullet") + n);
switch (weaponNumber) {
case 1 :
if (!idIntervalmg) {
shootgun(0);
var idInterval = setInterval(shootgun, times[1], 0);
idIntervalmg = idInterval;
}
return;
case 2 :
if (!idIntervalmg) {
shotgun(0);
var idInterval = setInterval(shotgun, times[2]);
idIntervalmg = idInterval;
}
return;
case 3 :
if (!idIntervalmg) {
shootgun(0);
var idInterval = setInterval(shootgun, times[3], 0);
idIntervalmg = idInterval;
}
return;
case 4 :
if (idIntervalmg) {
break;
}
shootgun(0);
var idInterval = setInterval(shootgun, times[4], 0);
idIntervalmg = idInterval;
}
}
function changeBulletNumber(changeNumber) {
bulletNumber = bulletNumber + changeNumber;
Bullets.splice(Bullets.length - 1, 1);
}
function changeWeapon(myWeaponNumber) {
function shootEnabled() {
thisObj.shootenable = true;
clearInterval(thisObj.idIntervalshoot);
thisObj.idIntervalshoot = 0;
}
var thisObj = this;
var _local2 = weaponNumber;
weaponNumber = myWeaponNumber;
itstarget.changeWeapon(myWeaponNumber);
if (idIntervalmg && (_local2 != weaponNumber)) {
clearInterval(idIntervalmg);
idIntervalmg = 0;
if ((!idIntervalshoot) && (shootenable)) {
var _local3 = setInterval(shootEnabled, times[weaponNumber] - 100);
}
idIntervalshoot = _local3;
shootenable = false;
shoot();
}
}
function setRotation(X, Y) {
alpha = -Math.atan((X - itstarget._x) / (Y - itstarget._y));
if ((Y - itstarget._y) >= 0) {
alpha = alpha + Math.PI;
}
itstarget.man._rotation = (alpha * 180) / Math.PI;
}
function setMoneyLevel(changeNumber) {
moneyLevel = moneyLevel + changeNumber;
}
function setSpeed(newSpeed) {
speed = newSpeed;
}
function hit(power) {
_root.damage.play();
damage = damage - (power / armor[armorLevel]);
if (damage <= 0) {
die();
parentTarget.finish();
}
if (!soundFlag) {
var _local3 = Math.round(Math.random() * 2) + 1;
_root.playSound("hero_receive_damage_0" + _local3);
soundFlag = true;
}
}
function die() {
dead = true;
if (idIntervalmg) {
clearInterval(idIntervalmg);
}
itstarget.die();
ritem.die();
}
}
Symbol 40 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 2
play();
Symbol 40 MovieClip Frame 53
stop();
_parent.play();
Symbol 40 MovieClip Frame 54
stop();
Symbol 50 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
_root.submited = false;
playgame();
}
Symbol 53 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
gotoAndPlay ("instructions");
}
Symbol 56 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
getURL ("http://www.arcadetown.com/zombiestorm/view_high_scores.asp", "_blank");
}
Symbol 59 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
gotoAndPlay ("credits");
}
Symbol 64 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
getURL ((("http://www.arcadetown.com/partner/download.asp?gameid=zombiestorm&aid=" + GetUrlParam(_url, "aid=")) + "&refer=") + _root.GetBaseUrl(_url), "_blank");
}
Symbol 68 MovieClip Frame 1
stop();
Symbol 68 MovieClip Frame 2
stop();
Symbol 70 Button
on (rollOver) {
cursor.gotoAndPlay("hand");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
if ((_root.soundEnabled = !_root.soundEnabled)) {
signsound.gotoAndPlay("on");
} else {
signsound.gotoAndPlay("off");
}
}
Symbol 76 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
getURL ((("http://www.arcadetown.com/index.asp?gameid=zombiestorm&aid=" + GetUrlParam(_url, "aid=")) + "&refer=") + _root.GetBaseUrl(_url), "_blank");
}
Symbol 81 Button
on (rollOver) {
cursor.gotoAndStop("hand");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
getURL ((("http://www.arcadetown.com/index.asp?gameid=zombiestorm&aid=" + GetUrlParam(_url, "aid=")) + "&refer=") + _root.GetBaseUrl(_url), "_blank");
}
Symbol 221 MovieClip Frame 31
gotoAndPlay (1);
Symbol 221 MovieClip Frame 65
_parent.transformation();
Symbol 221 MovieClip Frame 96
stop();
_parent.removeMovieClip();
Symbol 286 MovieClip Frame 33
stop();
this._visible = false;
Symbol 287 MovieClip [enemy1] Frame 1
R0 = 400;
Wmax = 45;
distance = 10000;
distanceOff = 22500;
begin = function (transFlag) {
i = 0;
speed0 = _parent.levelConstruktor.speedofEnemies1;
damage = _parent.levelConstruktor.damageofEnemies1;
armor = _parent.levelConstruktor.armorofEnemies1;
hitpower = _parent.levelConstruktor.hitpowerofEnemies1;
TransK = _parent.levelConstruktor.transKofEnemies1;
maxMoney = _parent.levelConstruktor.maxMoneyofEnemies1;
changeTime = 100;
speed = speed0;
setRoration(Math.random() * 360);
viz = true;
X = _x;
Y = _y;
Mode = "simular";
toHeroOn = false;
changeDir();
if (!transFlag) {
morph._visible = false;
}
ritem = _parent.zombieKiller.radar.setEnemy(_x, _y);
};
changeDir = function () {
dir = Math.random();
if ((dir > 0) && (dir <= 0.5)) {
dirS = "Left";
}
if ((dir > 0.5) && (dir <= 1)) {
dirS = "Right";
}
var _local1 = _rotation;
switch (dirS) {
case "Left" :
_local1 = _local1 - (Math.random() * Wmax);
break;
case "Right" :
_local1 = _local1 + (Math.random() * Wmax);
}
setRotation(_local1);
};
hit = function (power) {
toHeroOn = true;
damage = damage - (power / armor);
if ((damage <= 0) && (!dead)) {
dead = true;
die();
} else if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_receive_damage_0" + _local3);
}
};
die = function () {
dead = true;
_root.score = _root.score + maxMoney;
ritem.die();
_parent.killEnemie();
temp = Math.random();
i = 0;
figure.gotoAndStop(1);
onEnterFrame = function () {
figure.gotoAndPlay("die");
delete onEnterFrame;
};
gotoAndStop (1);
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_die_0" + _local3);
}
};
transformation = function () {
if (temp <= TransK) {
_parent.numberofTreasures++;
_parent.bonus.attachMovie("treasure1", "treasure" + _parent.numberofTreasures, _parent.getNextHighestDepth());
newTreasure = eval ("_parent.bonus.treasure" + _parent.numberofTreasures);
money = Math.random() * maxMoney;
money = Math.round(money);
onEnterFrame = function () {
newTreasure.setMoney(money);
delete onEnterFrame;
};
_parent.Treasures[_parent.numberofTreasures] = newTreasures;
newTreasure._x = _x;
newTreasure._y = _y;
}
};
simular = function () {
i++;
Mode = "simular";
speed = speed0;
if (i == changeTime) {
i = 0;
changeDir();
}
};
toCitizen = function (citizens) {
var _local6 = distance;
clength = citizens.length;
if (clength != undefined) {
k = 0;
while (k <= (clength - 1)) {
var _local5 = citizens[k];
var _local2 = _local5._x;
var _local1 = _local5._y;
var _local4 = ((_local2 - X) * (_local2 - X)) + ((_local1 - Y) * (_local1 - Y));
if (_local4 <= _local6) {
_local6 = _local4;
var _local3 = -Math.atan((_local2 - X) / (_local1 - Y));
if ((_local1 - Y) >= 0) {
_local3 = _local3 + Math.PI;
}
var _local7 = ((_local3 * 180) / Math.PI) - 180;
setRotation(_local7);
Mode = "complete";
globalXp = _local2;
globalYp = _local1;
}
speed = speed0;
if (_local6 <= R0) {
speed = 0;
}
k++;
}
}
};
toHero = function () {
var _local6 = _parent.myHero.itstarget;
var _local4 = _local6._x;
var _local3 = _local6._y;
var _local2 = ((_local4 - X) * (_local4 - X)) + ((_local3 - Y) * (_local3 - Y));
if (((_local2 <= distance) or toHeroOn) && (_local2 <= distanceOff)) {
Mode = "complete";
Rmin = _local2;
globalXp = _local4;
globalYp = _local3;
var _local5 = -Math.atan((_local4 - X) / (_local3 - Y));
if ((_local3 - Y) >= 0) {
_local5 = _local5 + Math.PI;
}
var _local7 = ((_local5 * 180) / Math.PI) - 180;
setRotation(_local7);
}
if (_local2 <= R0) {
_parent.myHero.hit(hitpower);
speed = 0;
} else {
speed = speed0;
}
if (_local2 > distanceOff) {
toHeroOn = false;
}
};
setRotation = function (myRot) {
Msin = Math.sin((myRot * Math.PI) / 180);
Mcos = Math.cos((myRot * Math.PI) / 180);
_rotation = myRot;
};
updateXY = function (bool) {
if (!bool) {
if (viz) {
viz = false;
_visible = false;
}
X = X - (speed * Msin);
Y = Y + (speed * Mcos);
if (!soundFlag) {
if (Mode != "simular") {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local6 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_attack_0" + _local6);
soundFlag = true;
}
}
} else if (Mode == "simular") {
soundFlag = false;
}
var _local7 = Math.random();
if (_local7 < 0.005) {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local6 = Math.round(Math.random() * 9) + 1;
_root.playSound("zombie_talk_0" + _local6);
soundFlag = true;
}
}
if (_parent.testOnBuilding(X, Y)) {
var _local4 = X;
var _local3 = Y;
X = X + (speed * Msin);
Y = Y - (speed * Mcos);
if (Mode == "simular") {
var _local5 = ((1 - Math.random()) * 2) * Wmax;
setRotation((_rotation - 180) + _local5);
} else {
nearWall(_local4, _local3);
}
}
} else {
if (!viz) {
viz = true;
_visible = true;
}
_x = X;
_y = Y;
}
};
nearWall = function (X1, Y1) {
var _local2;
if ((_parent.testOnBuilding(X, Y1) and (Y1 < Y)) and ((globalXp - X) < 0)) {
_local2 = 90;
}
if ((_parent.testOnBuilding(X, Y1) and (Y1 < Y)) and ((globalXp - X) >= 0)) {
_local2 = -90;
}
if ((_parent.testOnBuilding(X, Y1) and (Y1 > Y)) and ((globalXp - X) < 0)) {
_local2 = 90;
}
if ((_parent.testOnBuilding(X, Y1) and (Y1 > Y)) and ((globalXp - X) >= 0)) {
_local2 = -90;
}
if ((_parent.testOnBuilding(X1, Y) and (X1 < X)) and ((globalYp - Y) < 0)) {
_local2 = 180;
}
if ((_parent.testOnBuilding(X1, Y) and (X1 < X)) and ((globalYp - Y) >= 0)) {
_local2 = 0;
}
if ((_parent.testOnBuilding(X1, Y) and (X1 > X)) and ((globalYp - Y) < 0)) {
_local2 = 180;
}
if ((_parent.testOnBuilding(X1, Y) and (X1 > X)) and ((globalYp - Y) >= 0)) {
_local2 = 0;
}
setRotation(_local2);
};
Symbol 342 MovieClip [blood] Frame 19
this.removeMovieClip();
Symbol 487 MovieClip Frame 31
gotoAndPlay (1);
Symbol 487 MovieClip Frame 80
stop();
_parent.removeMovieClip();
Symbol 488 MovieClip [citizen1] Frame 1
R0 = 2500;
Wmax = 45;
distance = 22500;
begin = function () {
speed = _parent.levelConstruktor.speedofCitizens1;
damage = _parent.levelConstruktor.damageofCitizens1;
armor = _parent.levelConstruktor.armorofCitizens1;
setRotation(Math.random() * 360);
viz = true;
i = 0;
Mode = "simular";
itranstimer = 0;
thisObj = this;
changeTime = 100;
transTime = 30;
changeDir();
play();
ritem = _parent.zombieKiller.radar.setCitizen(_x, _y);
X = _x;
Y = _y;
};
changeDir = function () {
dir = Math.random();
if ((dir > 0) && (dir <= 0.5)) {
dirS = "Left";
}
if ((dir > 0.5) && (dir <= 1)) {
dirS = "Right";
}
var _local1 = _rotation;
switch (dirS) {
case "Left" :
_local1 = _local1 - (Math.random() * Wmax);
break;
case "Right" :
_local1 = _local1 + (Math.random() * Wmax);
}
setRotation(_local1);
};
hit = function (power) {
damage = damage - (power / armor);
if (damage <= 0) {
if (!dead) {
die();
}
} else if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 4) + 1;
_root.playSound("civilian_receive_damage_0" + _local3);
}
};
die = function () {
dead = true;
ritem.die();
_parent.killCitizen();
i = 0;
R0 = 80;
onEnterFrame = function () {
figure.gotoAndStop(1);
figure.gotoAndPlay("die");
delete onEnterFrame;
};
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("civilian_die_0" + _local3);
}
gotoAndStop (1);
};
simular = function () {
Mode = "simular";
i++;
if (i == changeTime) {
i = 0;
changeDir();
}
};
toEnemy = function (zombies) {
zlength = zombies.length;
Rmin = distance;
zombieisnear = false;
if (zlength != undefined) {
var _local1 = 0;
while (_local1 <= (zlength - 1)) {
item = zombies[_local1];
Xp = item.X;
Yp = item.Y;
R12 = ((Xp - X) * (Xp - X)) + ((Yp - Y) * (Yp - Y));
if ((R12 <= R0) && (!item.dead)) {
zombieisnear = true;
}
if (R12 <= Rmin) {
i = 0;
Rmin = R12;
alpha = -Math.atan((Xp - X) / (Yp - Y));
if ((Yp - Y) >= 0) {
alpha = alpha + Math.PI;
}
var _local2 = (alpha * 180) / Math.PI;
setRotation(_local2);
Mode = "complete";
}
_local1++;
}
}
};
setRotation = function (myRot) {
Msin = Math.sin((myRot * Math.PI) / 180);
Mcos = Math.cos((myRot * Math.PI) / 180);
_rotation = myRot;
};
transformation = function () {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var nSound = (Math.round(Math.random() * 4) + 1);
_root.playSound("civilian_become_zombie_0" + nSound);
}
_parent.numberofEnemies++;
_parent.attachMovie("enemy1", "enemy" + _parent.numberofEnemies, _parent.getNextHighestDepth());
newEnemy = eval ("_parent.enemy" + _parent.numberofEnemies);
_parent.Enemies.push(newEnemy);
newEnemy._x = X;
newEnemy._y = Y;
var k = _parent.getK(X);
var l = _parent.getL(Y);
onEnterFrame = function () {
newEnemy.begin(true);
_parent.EnemyLocations[k][l].push(newEnemy);
delete onEnterFrame;
dead = true;
ritem.die();
_parent.killCitizen();
this.removeMovieClip();
};
};
updateXY = function (bool) {
if (!bool) {
if (viz) {
viz = false;
_visible = false;
}
X = X - (speed * Msin);
Y = Y + (speed * Mcos);
if (!soundFlag) {
if (Mode != "simular") {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 3) + 1;
_root.playSound("civilian_runaway_0" + _local4);
soundFlag = true;
}
}
} else if (Mode == "simular") {
soundFlag = false;
}
var _local5 = Math.random() * Math.random();
if ((_local5 < 0.0005) && (Mode == "simular")) {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 3) + 1;
_root.playSound("civilian_talking_0" + _local4);
soundFlag = true;
}
}
if (_parent.testOnBuilding(X, Y)) {
X = X + (speed * Msin);
Y = Y - (speed * Mcos);
if (Mode == "simular") {
var _local3 = ((1 - Math.random()) * 2) * Wmax;
setRotation((_rotation - 180) + _local3);
}
}
} else {
if (!viz) {
viz = true;
_visible = true;
}
_x = X;
_y = Y;
}
if (!zombieisnear) {
itranstimer = 0;
} else {
itranstimer++;
if (itranstimer >= transTime) {
if (!dead) {
transformation();
itranstimer = 0;
}
}
}
};
stop();
Symbol 630 MovieClip Frame 31
gotoAndPlay (1);
Symbol 630 MovieClip Frame 80
stop();
_parent.removeMovieClip();
Symbol 631 MovieClip [citizen2] Frame 1
R0 = 2500;
Wmax = 45;
distance = 22500;
begin = function () {
speed = _parent.levelConstruktor.speedofCitizens2;
damage = _parent.levelConstruktor.damageofCitizen2;
armor = _parent.levelConstruktor.armorofCitizens2;
setRotation(Math.random() * 360);
viz = true;
i = 0;
Mode = "simular";
itranstimer = 0;
thisObj = this;
changeTime = 100;
transTime = 30;
changeDir();
play();
ritem = _parent.zombieKiller.radar.setCitizen(_x, _y);
X = _x;
Y = _y;
};
changeDir = function () {
dir = Math.random();
if ((dir > 0) && (dir <= 0.5)) {
dirS = "Left";
}
if ((dir > 0.5) && (dir <= 1)) {
dirS = "Right";
}
var _local1 = _rotation;
switch (dirS) {
case "Left" :
_local1 = _local1 - (Math.random() * Wmax);
break;
case "Right" :
_local1 = _local1 + (Math.random() * Wmax);
}
setRotation(_local1);
};
hit = function (power) {
damage = damage - (power / armor);
if (damage <= 0) {
if (!dead) {
die();
}
} else if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 4) + 1;
_root.playSound("civilian_receive_damage_0" + _local3);
}
};
die = function () {
dead = true;
ritem.die();
_parent.killCitizen();
i = 0;
R0 = 80;
onEnterFrame = function () {
figure.gotoAndStop(1);
figure.gotoAndPlay("die");
delete onEnterFrame;
};
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("civilian_die_0" + _local3);
}
gotoAndStop (1);
};
simular = function () {
Mode = "simular";
i++;
if (i == changeTime) {
i = 0;
changeDir();
}
};
toEnemy = function (zombies) {
zlength = zombies.length;
Rmin = distance;
zombieisnear = false;
if (zlength != undefined) {
var _local1 = 0;
while (_local1 <= (zlength - 1)) {
item = zombies[_local1];
Xp = item.X;
Yp = item.Y;
R12 = ((Xp - X) * (Xp - X)) + ((Yp - Y) * (Yp - Y));
if ((R12 <= R0) && (!item.dead)) {
zombieisnear = true;
}
if (R12 <= Rmin) {
i = 0;
Rmin = R12;
alpha = -Math.atan((Xp - X) / (Yp - Y));
if ((Yp - Y) >= 0) {
alpha = alpha + Math.PI;
}
var _local2 = (alpha * 180) / Math.PI;
setRotation(_local2);
Mode = "complete";
}
_local1++;
}
}
};
setRotation = function (myRot) {
Msin = Math.sin((myRot * Math.PI) / 180);
Mcos = Math.cos((myRot * Math.PI) / 180);
_rotation = myRot;
};
transformation = function () {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var nSound = (Math.round(Math.random() * 4) + 1);
_root.playSound("civilian_become_zombie_0" + nSound);
}
_parent.numberofEnemies++;
_parent.attachMovie("enemy1", "enemy" + _parent.numberofEnemies, _parent.getNextHighestDepth());
newEnemy = eval ("_parent.enemy" + _parent.numberofEnemies);
_parent.Enemies.push(newEnemy);
newEnemy._x = X;
newEnemy._y = Y;
var k = _parent.getK(X);
var l = _parent.getL(Y);
onEnterFrame = function () {
newEnemy.begin(true);
_parent.EnemyLocations[k][l].push(newEnemy);
delete onEnterFrame;
dead = true;
ritem.die();
_parent.killCitizen();
this.removeMovieClip();
};
};
updateXY = function (bool) {
if (!bool) {
if (viz) {
viz = false;
_visible = false;
}
X = X - (speed * Msin);
Y = Y + (speed * Mcos);
if (!soundFlag) {
if (Mode != "simular") {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 3) + 1;
_root.playSound("civilian_runaway_0" + _local4);
soundFlag = true;
}
}
} else if (Mode == "simular") {
soundFlag = false;
}
var _local5 = Math.random() * Math.random();
if ((_local5 < 0.0005) && (Mode == "simular")) {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 3) + 1;
_root.playSound("civilian_talking_0" + _local4);
soundFlag = true;
}
}
if (_parent.testOnBuilding(X, Y)) {
X = X + (speed * Msin);
Y = Y - (speed * Mcos);
if (Mode == "simular") {
var _local3 = ((1 - Math.random()) * 2) * Wmax;
setRotation((_rotation - 180) + _local3);
}
}
} else {
if (!viz) {
viz = true;
_visible = true;
}
_x = X;
_y = Y;
}
if (!zombieisnear) {
itranstimer = 0;
} else {
itranstimer++;
if (itranstimer >= transTime) {
if (!dead) {
transformation();
itranstimer = 0;
}
}
}
};
stop();
Symbol 775 MovieClip Frame 31
gotoAndPlay (1);
Symbol 775 MovieClip Frame 70
_parent.transformation();
Symbol 775 MovieClip Frame 92
stop();
_parent.removeMovieClip();
Symbol 776 MovieClip [enemy2] Frame 1
R0 = 400;
Wmax = 45;
begin = function (transFlag) {
i = 0;
speed0 = _parent.levelConstruktor.speedofEnemies2;
damage = _parent.levelConstruktor.damageofEnemies2;
distance = _parent.levelConstruktor.distanceofEnemies2;
distance = distance * distance;
armor = _parent.levelConstruktor.armorofEnemies2;
hitpower = _parent.levelConstruktor.hitpowerofEnemies2;
TransK = _parent.levelConstruktor.transKofEnemies2;
maxMoney = _parent.levelConstruktor.maxMoneyofEnemies2;
_rotation = (Math.random() * 360);
changeTime = 100;
speed = speed0;
setRoration(Math.random() * 360);
viz = true;
X = _x;
Y = _y;
Mode = "simular";
changeDir();
ritem = _parent.zombieKiller.radar.setEnemy(X, Y);
};
changeDir = function () {
dir = Math.random();
if ((dir > 0) && (dir <= 0.5)) {
dirS = "Left";
}
if ((dir > 0.5) && (dir <= 1)) {
dirS = "Right";
}
var _local1 = _rotation;
switch (dirS) {
case "Left" :
_local1 = _local1 - (Math.random() * Wmax);
break;
case "Right" :
_local1 = _local1 + (Math.random() * Wmax);
}
setRotation(_local1);
};
hit = function (power) {
blood.play();
damage = damage - (power / armor);
if ((damage <= 0) && (!dead)) {
dead = true;
die();
} else if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_receive_damage_0" + _local3);
}
};
die = function () {
dead = true;
_root.score = _root.score + maxMoney;
ritem.die();
_parent.killEnemie();
temp = Math.random();
i = 0;
figure.gotoAndStop(1);
onEnterFrame = function () {
figure.gotoAndPlay("die");
delete onEnterFrame;
};
gotoAndStop (1);
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_die_0" + _local3);
}
};
transformation = function () {
if (temp <= TransK) {
_parent.numberofTreasures++;
_parent.bonus.attachMovie("treasure1", "treasure" + _parent.numberofTreasures, _parent.getNextHighestDepth());
newTreasure = eval ("_parent.bonus.treasure" + _parent.numberofTreasures);
money = Math.random() * maxMoney;
money = Math.round(money);
onEnterFrame = function () {
newTreasure.setMoney(money);
delete onEnterFrame;
};
_parent.Treasures[_parent.numberofTreasures] = newTreasures;
newTreasure._x = _x;
newTreasure._y = _y;
}
};
simular = function () {
i++;
Mode = "simular";
speed = speed0;
if (i == changeTime) {
i = 0;
changeDir();
}
};
toCitizen = function (citizens) {
var _local6 = distance;
clength = citizens.length;
if (clength != undefined) {
k = 0;
while (k <= (clength - 1)) {
var _local5 = citizens[k];
var _local2 = _local5._x;
var _local1 = _local5._y;
var _local4 = ((_local2 - X) * (_local2 - X)) + ((_local1 - Y) * (_local1 - Y));
if (_local4 <= _local6) {
_local6 = _local4;
var _local3 = -Math.atan((_local2 - X) / (_local1 - Y));
if ((_local1 - Y) >= 0) {
_local3 = _local3 + Math.PI;
}
var _local7 = ((_local3 * 180) / Math.PI) - 180;
setRotation(_local7);
Mode = "complete1";
}
speed = speed0;
if (_local6 <= R0) {
speed = 0;
}
k++;
}
}
};
toHero = function () {
var _local2 = _parent.myHero.itstarget;
var _local5 = _local2._x;
var _local4 = _local2._y;
var _local7 = ((_local5 - X) * (_local5 - X)) + ((_local4 - Y) * (_local4 - Y));
speed = speed0;
if (_local7 < distance) {
speed = 2 * speed0;
var _local6 = -Math.atan((_local5 - X) / (_local4 - Y));
if ((_local4 - Y) >= 0) {
_local6 = _local6 + Math.PI;
}
var _local3 = (_local6 * 180) / Math.PI;
Mode = "complete2";
if (_parent.testOnBuilding(X, Y - speed) and ((_local2.X - X) < 0)) {
_local3 = -90;
}
if (_parent.testOnBuilding(X, Y - speed) and ((_local2.X - X) >= 0)) {
_local3 = 90;
}
if (_parent.testOnBuilding(X, Y + speed) and ((_local2.X - X) < 0)) {
_local3 = -90;
}
if (_parent.testOnBuilding(X, Y + speed) and ((_local2.X - X) >= 0)) {
_local3 = 90;
}
if (_parent.testOnBuilding(X - speed, Y) and ((_local2.Y - Y) < 0)) {
_local3 = 0;
}
if (_parent.testOnBuilding(X - speed, Y) and ((_local2.Y - Y) >= 0)) {
_local3 = 180;
}
if (_parent.testOnBuilding(X + speed, Y) and ((_local2.Y - Y) < 0)) {
_local3 = 0;
}
if (_parent.testOnBuilding(X + speed, Y) and ((_local2.Y - Y) >= 0)) {
_local3 = 180;
}
setRotation(_local3);
if (_local7 <= R0) {
speed = 0;
_parent.myHero.hit(hitpower);
}
}
};
setRotation = function (myRot) {
Msin = Math.sin((myRot * Math.PI) / 180);
Mcos = Math.cos((myRot * Math.PI) / 180);
_rotation = myRot;
};
updateXY = function (bool) {
if (!bool) {
if (viz) {
viz = false;
_visible = false;
}
X = X - (speed * Msin);
Y = Y + (speed * Mcos);
if (!soundFlag) {
if (Mode == "complete1") {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_attack_0" + _local4);
soundFlag = true;
}
}
if (Mode == "complete2") {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 0) + 1;
_root.playSound("zombie_runaway_0" + _local4);
soundFlag = true;
}
}
} else if (Mode == "simular") {
soundFlag = false;
}
var _local5 = Math.random();
if (_local5 < 0.005) {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 9) + 1;
_root.playSound("zombie_talk_0" + _local4);
soundFlag = true;
}
}
if (_parent.testOnBuilding(X, Y)) {
X = X + (speed * Msin);
Y = Y - (speed * Mcos);
if (Mode == "simular") {
var _local3 = ((1 - Math.random()) * 2) * Wmax;
setRotation((_rotation - 180) + _local3);
}
}
} else {
if (!viz) {
viz = true;
_visible = true;
}
_x = X;
_y = Y;
}
};
stop();
Symbol 920 MovieClip Frame 31
gotoAndPlay (1);
Symbol 920 MovieClip Frame 65
_parent.transformation();
Symbol 920 MovieClip Frame 92
stop();
_parent.removeMovieClip();
Symbol 923 MovieClip [enemy4] Frame 1
R0 = 400;
Wmax = 45;
distance = 10000;
distanceOff = 40000;
begin = function () {
speed0 = _parent.levelConstruktor.speedofEnemies4;
damage = _parent.levelConstruktor.damageofEnemies4;
armor = _parent.levelConstruktor.armorofEnemies4;
hitpower = _parent.levelConstruktor.hitpowerofEnemies4;
TransK = _parent.levelConstruktor.transKofEnemies4;
maxMoney = _parent.levelConstruktor.maxMoneyofEnemies4;
speed = speed0;
i = 0;
ishoot = 0;
loadbulletname = "ebullet1";
changeTime = 50;
shootTime = 10;
ritem = _parent.zombieKiller.radar.setEnemy(_x, _y);
setRoration(Math.random() * 360);
viz = true;
X = _x;
Y = _y;
Mode = "simular";
toHeroOn = false;
changeDir();
};
changeDir = function () {
dir = Math.random();
if ((dir > 0) && (dir <= 0.5)) {
dirS = "Left";
}
if ((dir > 0.5) && (dir <= 1)) {
dirS = "Right";
}
var _local1 = _rotation;
switch (dirS) {
case "Left" :
_local1 = _local1 - (Math.random() * Wmax);
break;
case "Right" :
_local1 = _local1 + (Math.random() * Wmax);
}
setRotation(_local1);
};
hit = function (power) {
toHeroOn = true;
damage = damage - (power / armor);
if ((damage <= 0) && (!dead)) {
dead = true;
die();
} else if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_receive_damage_0" + _local3);
}
};
tryShoot = function () {
dir = Math.random();
if ((dir > 0) && (dir <= 0.5)) {
shoot();
}
};
shoot = function () {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
_root.playSound("hero_shoot_01");
}
_parent.ebulletNumber = _parent.ebulletNumber + 1;
_parent.attachMovie(loadbulletname, "ebullet" + _parent.ebulletNumber, _parent.getNextHighestDepth());
myBullet = eval ("_parent.ebullet" + _parent.ebulletNumber);
myBullet._x = _x - (gun._y * Math.sin((_rotation * Math.PI) / 180));
myBullet._y = _y + (gun._y * Math.cos((_rotation * Math.PI) / 180));
myBullet._rotation = _rotation - 180;
};
die = function () {
dead = true;
_root.score = _root.score + maxMoney;
ritem.die();
_parent.killEnemie();
temp = Math.random();
i = 0;
figure.gotoAndStop(1);
onEnterFrame = function () {
figure.gotoAndPlay("die");
delete onEnterFrame;
};
gotoAndStop (1);
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_die_0" + _local3);
}
};
transformation = function () {
if (temp <= TransK) {
_parent.numberofTreasures++;
_parent.bonus.attachMovie("treasure1", "treasure" + _parent.numberofTreasures, _parent.getNextHighestDepth());
newTreasure = eval ("_parent.bonus.treasure" + _parent.numberofTreasures);
money = Math.random() * maxMoney;
money = Math.round(money);
onEnterFrame = function () {
newTreasure.setMoney(money);
delete onEnterFrame;
};
_parent.Treasures[_parent.numberofTreasures] = newTreasures;
newTreasure._x = _x;
newTreasure._y = _y;
}
};
simular = function () {
i++;
Mode = "simular";
speed = speed0;
if (i == changeTime) {
i = 0;
changeDir();
}
ishoot++;
if (ishoot == shootTime) {
ishoot = 0;
tryShoot();
}
};
toCitizen = function (citizens) {
var _local6 = distance;
var _local8 = citizens.length;
if (_local8 != undefined) {
k = 0;
while (k <= (_local8 - 1)) {
var _local5 = citizens[k];
var _local2 = _local5._x;
var _local1 = _local5._y;
var _local4 = ((_local2 - X) * (_local2 - X)) + ((_local1 - Y) * (_local1 - Y));
if (_local4 <= _local6) {
_local6 = _local4;
var _local3 = -Math.atan((_local2 - X) / (_local1 - Y));
if ((_local1 - Y) >= 0) {
_local3 = _local3 + Math.PI;
}
var _local7 = ((_local3 * 180) / Math.PI) - 180;
setRotation(_local7);
Mode = "complete";
}
speed = speed0;
if (_local6 <= (distance / 2)) {
speed = 0;
}
k++;
}
}
};
toHero = function () {
var _local6 = _parent.myHero.itstarget;
var _local4 = _local6._x;
var _local3 = _local6._y;
var _local2 = ((_local4 - X) * (_local4 - X)) + ((_local3 - Y) * (_local3 - Y));
if (((_local2 <= distance) or toHeroOn) && (_local2 <= distanceOff)) {
Mode = "complete";
Rmin = _local2;
var _local5 = -Math.atan((_local4 - X) / (_local3 - Y));
if ((_local3 - Y) >= 0) {
_local5 = _local5 + Math.PI;
}
var _local7 = ((_local5 * 180) / Math.PI) - 180;
setRotation(_local7);
}
if (_local2 <= (distance / 2)) {
speed = 0;
if (_local2 <= R0) {
_parent.myHero.hit(hitpower);
}
} else {
speed = speed0;
}
if (_local2 > distanceOff) {
toHeroOn = false;
}
};
setRotation = function (myRot) {
Msin = Math.sin((myRot * Math.PI) / 180);
Mcos = Math.cos((myRot * Math.PI) / 180);
_rotation = myRot;
};
updateXY = function (bool) {
if (!bool) {
if (viz) {
viz = false;
_visible = false;
}
X = X - (speed * Msin);
Y = Y + (speed * Mcos);
if (!soundFlag) {
if (Mode != "simular") {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_attack_0" + _local4);
soundFlag = true;
}
}
} else if (Mode == "simular") {
soundFlag = false;
}
var _local5 = Math.random();
if (_local5 < 0.005) {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 9) + 1;
_root.playSound("zombie_talk_0" + _local4);
soundFlag = true;
}
}
if (_parent.testOnBuilding(X, Y)) {
X = X + (speed * Msin);
Y = Y - (speed * Mcos);
if (Mode == "simular") {
var _local3 = ((1 - Math.random()) * 2) * Wmax;
setRotation((_rotation - 180) + _local3);
}
}
} else {
if (!viz) {
viz = true;
_visible = true;
}
_x = X;
_y = Y;
}
};
stop();
Symbol 1067 MovieClip Frame 31
gotoAndPlay (1);
Symbol 1067 MovieClip Frame 32
Symbol 1067 MovieClip Frame 70
_parent.transformation();
Symbol 1067 MovieClip Frame 92
stop();
_parent.removeMovieClip();
Symbol 1068 MovieClip [enemy3] Frame 1
R0 = 400;
Wmax = 45;
distance = 10000;
distanceOff = 22500;
begin = function () {
i = 0;
speed0 = _parent.levelConstruktor.speedofEnemies3;
damage = _parent.levelConstruktor.damageofEnemies3;
armor = _parent.levelConstruktor.armorofEnemies3;
hitpower = _parent.levelConstruktor.hitpowerofEnemies3;
TransK = _parent.levelConstruktor.transKofEnemies3;
maxMoney = _parent.levelConstruktor.maxMoneyofEnemies3;
setRoration(Math.random() * 360);
viz = true;
changeTime = 100;
speed = speed0;
changeDir();
X = _x;
Y = _y;
Mode = "simular";
toHeroOn = false;
ritem = _parent.zombieKiller.radar.setEnemy(_x, _y);
};
changeDir = function () {
dir = Math.random();
if ((dir > 0) && (dir <= 0.5)) {
dirS = "Left";
}
if ((dir > 0.5) && (dir <= 1)) {
dirS = "Right";
}
var _local1 = _rotation;
switch (dirS) {
case "Left" :
_local1 = _local1 - (Math.random() * Wmax);
break;
case "Right" :
_local1 = _local1 + (Math.random() * Wmax);
}
setRotation(_local1);
};
hit = function (power) {
toHeroOn = true;
blood.play();
damage = damage - (power / armor);
if ((damage <= 0) && (!dead)) {
dead = true;
die();
} else if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_receive_damage_0" + _local3);
}
};
die = function () {
dead = true;
_root.score = _root.score + maxMoney;
ritem.die();
_parent.killEnemie();
temp = Math.random();
i = 0;
figure.gotoAndStop(1);
onEnterFrame = function () {
figure.gotoAndPlay("die");
delete onEnterFrame;
};
gotoAndStop (1);
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_die_0" + _local3);
}
};
transformation = function () {
if (temp <= TransK) {
_parent.numberofTreasures++;
_parent.bonus.attachMovie("treasure1", "treasure" + _parent.numberofTreasures, _parent.getNextHighestDepth());
newTreasure = eval ("_parent.bonus.treasure" + _parent.numberofTreasures);
money = Math.random() * maxMoney;
money = Math.round(money);
onEnterFrame = function () {
newTreasure.setMoney(money);
delete onEnterFrame;
};
_parent.Treasures[_parent.numberofTreasures] = newTreasures;
newTreasure._x = _x;
newTreasure._y = _y;
}
};
simular = function () {
i++;
Mode = "simular";
speed = speed0;
if (i == changeTime) {
i = 0;
changeDir();
}
};
toCitizen = function (citizens) {
var _local6 = distance;
clength = citizens.length;
if (clength != undefined) {
k = 0;
while (k <= (clength - 1)) {
var _local5 = citizens[k];
var _local2 = _local5._x;
var _local1 = _local5._y;
var _local4 = ((_local2 - X) * (_local2 - X)) + ((_local1 - Y) * (_local1 - Y));
if (_local4 <= _local6) {
_local6 = _local4;
var _local3 = -Math.atan((_local2 - X) / (_local1 - Y));
if ((_local1 - Y) >= 0) {
_local3 = _local3 + Math.PI;
}
var _local7 = ((_local3 * 180) / Math.PI) - 180;
setRotation(_local7);
Mode = "complete";
globalXp = _local2;
globalYp = _local1;
}
speed = speed0;
if (_local6 <= R0) {
speed = 0;
}
k++;
}
}
};
toHero = function () {
var _local6 = _parent.myHero.itstarget;
var _local4 = _local6._x;
var _local3 = _local6._y;
var _local2 = ((_local4 - X) * (_local4 - X)) + ((_local3 - Y) * (_local3 - Y));
if (((_local2 <= distance) or toHeroOn) && (_local2 <= distanceOff)) {
Mode = "complete";
Rmin = _local2;
globalXp = _local4;
globalYp = _local3;
var _local5 = -Math.atan((_local4 - X) / (_local3 - Y));
if ((_local3 - Y) >= 0) {
_local5 = _local5 + Math.PI;
}
var _local7 = ((_local5 * 180) / Math.PI) - 180;
setRotation(_local7);
}
if (_local2 <= R0) {
_parent.myHero.hit(hitpower);
speed = 0;
} else {
speed = speed0;
}
if (_local2 > distanceOff) {
toHeroOn = false;
}
};
setRotation = function (myRot) {
Msin = Math.sin((myRot * Math.PI) / 180);
Mcos = Math.cos((myRot * Math.PI) / 180);
_rotation = myRot;
};
updateXY = function (bool) {
if (!bool) {
if (viz) {
viz = false;
_visible = false;
}
X = X - (speed * Msin);
Y = Y + (speed * Mcos);
if (!soundFlag) {
if (Mode != "simular") {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local6 = Math.round(Math.random() * 3) + 1;
_root.playSound("zombie_attack_0" + _local6);
soundFlag = true;
}
}
} else if (Mode == "simular") {
soundFlag = false;
}
var _local7 = Math.random();
if (_local7 < 0.005) {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local6 = Math.round(Math.random() * 9) + 1;
_root.playSound("zombie_talk_0" + _local6);
soundFlag = true;
}
}
if (_parent.testOnBuilding(X, Y)) {
var _local4 = X;
var _local3 = Y;
X = X + (speed * Msin);
Y = Y - (speed * Mcos);
if (Mode == "simular") {
var _local5 = ((1 - Math.random()) * 2) * Wmax;
setRotation((_rotation - 180) + _local5);
} else {
nearWall(_local4, _local3);
}
}
} else {
if (!viz) {
viz = true;
_visible = true;
}
_x = X;
_y = Y;
}
};
nearWall = function (X1, Y1) {
var _local2;
if ((_parent.testOnBuilding(X, Y1) and (Y1 < Y)) and ((globalXp - X) < 0)) {
_local2 = 90;
}
if ((_parent.testOnBuilding(X, Y1) and (Y1 < Y)) and ((globalXp - X) >= 0)) {
_local2 = -90;
}
if ((_parent.testOnBuilding(X, Y1) and (Y1 > Y)) and ((globalXp - X) < 0)) {
_local2 = 90;
}
if ((_parent.testOnBuilding(X, Y1) and (Y1 > Y)) and ((globalXp - X) >= 0)) {
_local2 = -90;
}
if ((_parent.testOnBuilding(X1, Y) and (X1 < X)) and ((globalYp - Y) < 0)) {
_local2 = 180;
}
if ((_parent.testOnBuilding(X1, Y) and (X1 < X)) and ((globalYp - Y) >= 0)) {
_local2 = 0;
}
if ((_parent.testOnBuilding(X1, Y) and (X1 > X)) and ((globalYp - Y) < 0)) {
_local2 = 180;
}
if ((_parent.testOnBuilding(X1, Y) and (X1 > X)) and ((globalYp - Y) >= 0)) {
_local2 = 0;
}
setRotation(_local2);
};
Symbol 1105 MovieClip [gblood] Frame 19
this.removeMovieClip();
Symbol 1249 MovieClip Frame 31
gotoAndPlay (1);
Symbol 1249 MovieClip Frame 85
stop();
_parent.removeMovieClip();
Symbol 1250 MovieClip [citizen3] Frame 1
R0 = 2500;
Wmax = 45;
distance = 22500;
begin = function () {
speed = _parent.levelConstruktor.speedofCitizens3;
damage = _parent.levelConstruktor.damageofCitizens3;
armor = _parent.levelConstruktor.armorofCitizens3;
setRotation(Math.random() * 360);
viz = true;
i = 0;
Mode = "simular";
itranstimer = 0;
thisObj = this;
changeTime = 100;
transTime = 30;
changeDir();
play();
ritem = _parent.zombieKiller.radar.setCitizen(_x, _y);
X = _x;
Y = _y;
};
changeDir = function () {
dir = Math.random();
if ((dir > 0) && (dir <= 0.5)) {
dirS = "Left";
}
if ((dir > 0.5) && (dir <= 1)) {
dirS = "Right";
}
var _local1 = _rotation;
switch (dirS) {
case "Left" :
_local1 = _local1 - (Math.random() * Wmax);
break;
case "Right" :
_local1 = _local1 + (Math.random() * Wmax);
}
setRotation(_local1);
};
hit = function (power) {
damage = damage - (power / armor);
if (damage <= 0) {
if (!dead) {
die();
}
} else if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 4) + 1;
_root.playSound("civilian_receive_damage_0" + _local3);
}
};
die = function () {
dead = true;
ritem.die();
_parent.killCitizen();
i = 0;
R0 = 80;
onEnterFrame = function () {
figure.gotoAndStop(1);
figure.gotoAndPlay("die");
delete onEnterFrame;
};
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local3 = Math.round(Math.random() * 3) + 1;
_root.playSound("civilian_die_0" + _local3);
}
gotoAndStop (1);
};
simular = function () {
Mode = "simular";
i++;
if (i == changeTime) {
i = 0;
changeDir();
}
};
toEnemy = function (zombies) {
zlength = zombies.length;
Rmin = distance;
zombieisnear = false;
if (zlength != undefined) {
var _local1 = 0;
while (_local1 <= (zlength - 1)) {
item = zombies[_local1];
Xp = item.X;
Yp = item.Y;
R12 = ((Xp - X) * (Xp - X)) + ((Yp - Y) * (Yp - Y));
if ((R12 <= R0) && (!item.dead)) {
zombieisnear = true;
}
if (R12 <= Rmin) {
i = 0;
Rmin = R12;
alpha = -Math.atan((Xp - X) / (Yp - Y));
if ((Yp - Y) >= 0) {
alpha = alpha + Math.PI;
}
var _local2 = (alpha * 180) / Math.PI;
setRotation(_local2);
Mode = "complete";
}
_local1++;
}
}
};
setRotation = function (myRot) {
Msin = Math.sin((myRot * Math.PI) / 180);
Mcos = Math.cos((myRot * Math.PI) / 180);
_rotation = myRot;
};
transformation = function () {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var nSound = (Math.round(Math.random() * 4) + 1);
_root.playSound("civilian_become_zombie_0" + nSound);
}
_parent.numberofEnemies++;
_parent.attachMovie("enemy1", "enemy" + _parent.numberofEnemies, _parent.getNextHighestDepth());
newEnemy = eval ("_parent.enemy" + _parent.numberofEnemies);
_parent.Enemies.push(newEnemy);
newEnemy._x = X;
newEnemy._y = Y;
var k = _parent.getK(X);
var l = _parent.getL(Y);
onEnterFrame = function () {
newEnemy.begin(true);
_parent.EnemyLocations[k][l].push(newEnemy);
delete onEnterFrame;
dead = true;
ritem.die();
_parent.killCitizen();
this.removeMovieClip();
};
};
updateXY = function (bool) {
if (!bool) {
if (viz) {
viz = false;
_visible = false;
}
X = X - (speed * Msin);
Y = Y + (speed * Mcos);
if (!soundFlag) {
if (Mode != "simular") {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 3) + 1;
_root.playSound("civilian_runaway_0" + _local4);
soundFlag = true;
}
}
} else if (Mode == "simular") {
soundFlag = false;
}
var _local5 = Math.random() * Math.random();
if ((_local5 < 0.0005) && (Mode == "simular")) {
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var _local4 = Math.round(Math.random() * 3) + 1;
_root.playSound("civilian_talking_0" + _local4);
soundFlag = true;
}
}
if (_parent.testOnBuilding(X, Y)) {
X = X + (speed * Msin);
Y = Y - (speed * Mcos);
if (Mode == "simular") {
var _local3 = ((1 - Math.random()) * 2) * Wmax;
setRotation((_rotation - 180) + _local3);
}
}
} else {
if (!viz) {
viz = true;
_visible = true;
}
_x = X;
_y = Y;
}
if (!zombieisnear) {
itranstimer = 0;
} else {
itranstimer++;
if (itranstimer >= transTime) {
if (!dead) {
transformation();
itranstimer = 0;
}
}
}
};
stop();
Symbol 1253 MovieClip Frame 20
stop();
Symbol 1254 MovieClip [treasure1] Frame 1
R0 = 400;
temp = Math.round(Math.random() * _parent._parent.levelConstruktor.maxMoneyofTreasures1);
money = temp;
begin = function (max) {
temp = Math.round(Math.random() * max);
setMoney(temp);
};
die = function () {
_root.playSound("bonus");
_parent._parent.takeTreasure();
removeMovieClip(this);
};
setMoney = function (ml) {
X = _x;
Y = _y;
money = ml;
};
Symbol 1254 MovieClip [treasure1] Frame 2
item = _parent._parent.myHero.itstarget;
Xp = item._x;
Yp = item._y;
R12 = ((Xp - X) * (Xp - X)) + ((Yp - Y) * (Yp - Y));
if ((R12 <= R0) && (!isNaN(R12))) {
_parent._parent.myHero.setMoneyLevel(money);
this.die();
}
Symbol 1254 MovieClip [treasure1] Frame 3
gotoAndPlay (2);
Symbol 1264 MovieClip Frame 1
var reload = 60;
var reloadupgraded = 30;
var respawn = 120;
stop();
Symbol 1264 MovieClip Frame 2
stop();
Symbol 1264 MovieClip Frame 3
stop();
Symbol 1264 MovieClip Frame 4
play();
Symbol 1264 MovieClip Frame 63
gotoAndStop ("aim");
Symbol 1264 MovieClip Frame 64
play();
Symbol 1264 MovieClip Frame 183
gotoAndStop ("aim");
Symbol 1264 MovieClip Frame 184
play();
Symbol 1264 MovieClip Frame 216
gotoAndStop ("aim");
Symbol 1264 MovieClip Frame 217
play();
Symbol 1264 MovieClip Frame 306
gotoAndStop ("aim");
Symbol 1264 MovieClip Frame 307
play();
Symbol 1264 MovieClip Frame 366
gotoAndStop ("aim");
Symbol 1264 MovieClip Frame 367
stop();
Symbol 1267 MovieClip [bullet1] Frame 1
speed = 15;
R0 = 400;
power0 = _parent.bullet1power;
level = 1;
power = power0 * _parent.myHero.weaponLevel1;
i = 0;
lifetime = 10;
del = false;
thisObj = this;
X = _x;
Y = _y;
Symbol 1267 MovieClip [bullet1] Frame 2
X = X + (speed * Math.sin((_rotation * Math.PI) / 180));
Y = Y - (speed * Math.cos((_rotation * Math.PI) / 180));
changeflag = false;
if (_parent.testOnBuilding(X, Y)) {
del = true;
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var nSound = (Math.round(Math.random() * 2) + 1);
_root.playSound("bullet_hits_wall_0" + nSound);
}
} else {
_x = X;
_y = Y;
}
Symbol 1267 MovieClip [bullet1] Frame 3
i++;
if (i <= lifetime) {
gotoAndPlay (2);
} else {
del = true;
}
zombieisnear = false;
var K = _parent.getK(X);
var L = _parent.getL(Y);
zombies = _parent.enemyNear(K, L);
elength = zombies.length;
if (elength == undefined) {
elength = 0;
}
if (elength) {
zombieisnear = true;
}
if (zombieisnear) {
k = 0;
while (k <= (elength - 1)) {
item = zombies[k];
R12 = ((item.X - X) * (item.X - X)) + ((item.Y - Y) * (item.Y - Y));
if (((R12 <= R0) && (!item.dead)) && (!del)) {
var nSound = (Math.round(Math.random() * 2) + 1);
_root.playSound("shot_hits_body_0" + nSound);
item.hit(power);
n = 0;
blength = _parent.Blood.length;
if (blength) {
var i = 0;
while (i <= blength) {
if ((_parent.Blood[i] == undefined) && (!n)) {
n = i;
}
i++;
}
}
_parent.attachMovie("gblood", "blood" + n, _parent.getNextHighestDepth());
myitem = eval ("_parent.blood" + n);
_parent.Blood[n] = myitem;
myitem._x = X;
myitem._y = Y;
myitem._rotation = this._rotation;
del = true;
}
k++;
}
}
citizens = _parent.citizenNear(K, L);
clength = citizens.length;
citizennear = false;
if (clength == undefined) {
clength = 0;
}
if (clength) {
citizennear = true;
}
if (citizennear) {
k = 0;
while (k <= (clength - 1)) {
item = citizens[k];
R12 = ((item.X - X) * (item.X - X)) + ((item.Y - Y) * (item.Y - Y));
if (((R12 <= R0) && (!del)) && (!isNaN(R12))) {
_root.damage.play();
var nSound = (Math.round(Math.random() * 2) + 1);
_root.playSound("shot_hits_body_0" + nSound);
item.hit(power);
n = 0;
blength = _parent.Blood.length;
if (blength) {
var i = 0;
while (i <= blength) {
if ((_parent.Blood[i] == undefined) && (!n)) {
n = i;
}
i++;
}
}
_parent.attachMovie("blood", "blood" + n, _parent.getNextHighestDepth());
myitem = eval ("_parent.blood" + n);
_parent.Blood[n] = myitem;
myitem._x = X;
myitem._y = Y;
myitem._rotation = this._rotation;
del = true;
}
k++;
}
}
if (del) {
_parent.bulletout(false);
_parent.myHero.changeBulletNumber(1);
thisObj.removeMovieClip();
}
Symbol 1268 MovieClip [bullet2] Frame 1
speed = 10;
R0 = 400;
power0 = _parent.bullet2power;
power = power0 * _parent.myHero.weaponLevel2;
i = 0;
lifetime = 20;
del = false;
thisObj = this;
X = _x;
Y = _y;
Symbol 1268 MovieClip [bullet2] Frame 2
X = X + (speed * Math.sin((_rotation * Math.PI) / 180));
Y = Y - (speed * Math.cos((_rotation * Math.PI) / 180));
changeflag = false;
if (_parent.testOnBuilding(X, Y)) {
del = true;
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var nSound = (Math.round(Math.random() * 2) + 1);
_root.playSound("bullet_hits_wall_0" + nSound);
}
} else {
_x = X;
_y = Y;
}
Symbol 1268 MovieClip [bullet2] Frame 3
i++;
if (i <= lifetime) {
gotoAndPlay (2);
} else {
del = true;
}
zombieisnear = false;
var K = _parent.getK(X);
var L = _parent.getL(Y);
zombies = _parent.enemyNear(K, L);
elength = zombies.length;
if (elength == undefined) {
elength = 0;
}
if (elength) {
zombieisnear = true;
}
if (zombieisnear) {
k = 0;
while (k <= (elength - 1)) {
item = zombies[k];
R12 = ((item.X - X) * (item.X - X)) + ((item.Y - Y) * (item.Y - Y));
if (((R12 <= R0) && (!item.dead)) && (!del)) {
var nSound = (Math.round(Math.random() * 2) + 1);
_root.playSound("shot_hits_body_0" + nSound);
item.hit(power);
n = 0;
blength = _parent.Blood.length;
if (blength) {
var i = 0;
while (i <= blength) {
if ((_parent.Blood[i] == undefined) && (!n)) {
n = i;
}
i++;
}
}
_parent.attachMovie("gblood", "blood" + n, _parent.getNextHighestDepth());
myitem = eval ("_parent.blood" + n);
_parent.Blood[n] = myitem;
myitem._x = X;
myitem._y = Y;
myitem._rotation = this._rotation;
del = true;
}
k++;
}
}
citizens = _parent.citizenNear(K, L);
clength = citizens.length;
citizennear = false;
if (clength == undefined) {
clength = 0;
}
if (clength) {
citizennear = true;
}
if (citizennear) {
k = 0;
while (k <= (clength - 1)) {
item = citizens[k];
R12 = ((item.X - X) * (item.X - X)) + ((item.Y - Y) * (item.Y - Y));
if (((R12 <= R0) && (!del)) && (!isNaN(R12))) {
_root.damage.play();
_root.playSound("hitbullet");
item.hit(power);
n = 0;
blength = _parent.Blood.length;
if (blength) {
var i = 0;
while (i <= blength) {
if ((_parent.Blood[i] == undefined) && (!n)) {
n = i;
}
i++;
}
}
_parent.attachMovie("blood", "blood" + n, _parent.getNextHighestDepth());
myitem = eval ("_parent.blood" + n);
_parent.Blood[n] = myitem;
myitem._x = X;
myitem._y = Y;
myitem._rotation = this._rotation;
del = true;
}
k++;
}
}
if (del) {
_parent.bulletout(false);
_parent.myHero.changeBulletNumber(1);
thisObj.removeMovieClip();
}
Symbol 1269 MovieClip [bullet3] Frame 1
speed = 10;
R0 = 400;
power0 = _parent.bullet3power;
power = power0 * _parent.myHero.weaponLevel3;
i = 0;
lifetime = 20;
thisObj = this;
X = _x;
Y = _y;
rot = _rotation;
var getK = _parent.getK;
var getL = _parent.getL;
Symbol 1269 MovieClip [bullet3] Frame 2
X = X + (speed * _global.Math.sin(rot * (_global.Math.PI / 180)));
Y = Y - (speed * _global.Math.cos(rot * (_global.Math.PI / 180)));
changeflag = false;
if (_parent.testOnBuilding(X, Y)) {
del = true;
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var nSound = (_global.Math.round(_global.Math.random() * 2) + 1);
_root.playSound("bullet_hits_wall_0" + nSound);
}
} else {
_x = X;
_y = Y;
}
Symbol 1269 MovieClip [bullet3] Frame 3
i++;
if (i <= lifetime) {
gotoAndPlay (2);
} else {
del = true;
}
zombieisnear = false;
var K = getK(X);
var L = getL(Y);
zombies = _parent.enemyNear(K, L);
elength = zombies.length;
if (elength == undefined) {
elength = 0;
}
if (elength) {
zombieisnear = true;
}
if (zombieisnear) {
k = 0;
while (k <= (elength - 1)) {
item = zombies[k];
R12 = ((item.X - X) * (item.X - X)) + ((item.Y - Y) * (item.Y - Y));
if (((R12 <= R0) && (!item.dead)) && (!del)) {
var nSound = (Math.round(Math.random() * 2) + 1);
_root.playSound("shot_hits_body_0" + nSound);
item.hit(power);
n = 0;
blength = _parent.Blood.length;
if (blength) {
var i = 0;
while (i <= blength) {
if ((_parent.Blood[i] == undefined) && (!n)) {
n = i;
}
i++;
}
}
_parent.attachMovie("gblood", "blood" + n, _parent.getNextHighestDepth());
myitem = eval ("_parent.blood" + n);
_parent.Blood[n] = myitem;
myitem._x = X;
myitem._y = Y;
myitem._rotation = this._rotation;
del = true;
}
k++;
}
}
citizens = _parent.citizenNear(K, L);
clength = citizens.length;
citizennear = false;
if (clength == undefined) {
clength = 0;
}
if (clength) {
citizennear = true;
}
if (citizennear) {
k = 0;
while (k <= (clength - 1)) {
item = citizens[k];
R12 = ((item.X - X) * (item.X - X)) + ((item.Y - Y) * (item.Y - Y));
if (((R12 <= R0) && (!del)) && (!isNaN(R12))) {
_root.damage.play();
_root.playSound("hitbullet");
item.hit(power);
n = 0;
blength = _parent.Blood.length;
if (blength) {
var i = 0;
while (i <= blength) {
if ((_parent.Blood[i] == undefined) && (!n)) {
n = i;
}
i++;
}
}
_parent.attachMovie("blood", "blood" + n, _parent.getNextHighestDepth());
myitem = eval ("_parent.blood" + n);
_parent.Blood[n] = myitem;
myitem._x = X;
myitem._y = Y;
myitem._rotation = this._rotation;
del = true;
}
k++;
}
}
if (del) {
delete zombies;
delete citizens;
_parent.bulletout(false);
_parent.myHero.changeBulletNumber(1);
thisObj.removeMovieClip();
}
Symbol 1317 MovieClip Frame 1
stop();
Symbol 1317 MovieClip Frame 2
stop();
Symbol 1317 MovieClip Frame 3
stop();
Symbol 1317 MovieClip Frame 4
stop();
Symbol 1317 MovieClip Frame 5
stop();
Symbol 1317 MovieClip Frame 6
stop();
Symbol 1317 MovieClip Frame 7
stop();
Symbol 1317 MovieClip Frame 8
stop();
Symbol 1317 MovieClip Frame 9
stop();
Symbol 1317 MovieClip Frame 10
stop();
Symbol 1317 MovieClip Frame 11
stop();
Symbol 1317 MovieClip Frame 12
stop();
Symbol 1317 MovieClip Frame 13
stop();
Symbol 1317 MovieClip Frame 14
stop();
Symbol 1317 MovieClip Frame 15
stop();
Symbol 1317 MovieClip Frame 16
stop();
Symbol 1317 MovieClip Frame 17
stop();
Symbol 1317 MovieClip Frame 18
stop();
Symbol 1317 MovieClip Frame 19
stop();
Symbol 1317 MovieClip Frame 20
stop();
Symbol 1317 MovieClip Frame 21
stop();
Symbol 1317 MovieClip Frame 38
stop();
_parent.removeMovieClip();
Symbol 1318 MovieClip [bullet4] Frame 1
lifetime = 20;
dR = 10;
maxdistance = 300;
X = _parent._xmouse;
Y = _parent._ymouse;
distance = Math.sqrt(((X - _x) * (X - _x)) + ((Y - _y) * (Y - _y)));
if (distance < maxdistance) {
speed = distance / lifetime;
} else {
speed = maxdistance / lifetime;
}
power0 = _parent.bullet4power;
power = power0 * _parent.myHero.weaponLevel4;
R0 = 60 + (dR * _parent.myHero.weaponLevel4);
R0 = R0 * R0;
i = 1;
Symbol 1318 MovieClip [bullet4] Frame 2
_x = (_x + (speed * Math.sin((_rotation * Math.PI) / 180)));
_y = (_y - (speed * Math.cos((_rotation * Math.PI) / 180)));
bullet.gotoAndStop(i + 1);
Symbol 1318 MovieClip [bullet4] Frame 3
i++;
if (i <= lifetime) {
gotoAndPlay (2);
} else {
gotoAndPlay (4);
}
Symbol 1318 MovieClip [bullet4] Frame 4
zombieisnear = false;
var K = _parent.getK(X);
var L = _parent.getL(Y);
zombies = _parent.enemyNear(K, L);
elength = zombies.length;
if (elength == undefined) {
elength = 0;
}
if (elength) {
zombieisnear = true;
}
if (zombieisnear) {
k = 0;
while (k <= (elength - 1)) {
item = zombies[k];
R12 = ((item.X - X) * (item.X - X)) + ((item.Y - Y) * (item.Y - Y));
if ((R12 <= R0) && (!_parent.Enemies[k].dead)) {
item.hit(power);
del = true;
}
k++;
}
}
citizens = _parent.citizenNear(K, L);
clength = _parent.Citizens.length;
citizennear = false;
if (clength == undefined) {
clength = 0;
}
if (clength) {
citizennear = true;
}
if (citizennear) {
k = 0;
while (k <= (citizens.length - 1)) {
item = citizens[k];
R12 = ((item.X - X) * (item.X - X)) + ((item.Y - Y) * (item.Y - Y));
if (R12 <= R0) {
_root.damage.play();
item.hit(power);
del = true;
}
k++;
}
}
if (_parent.myHero != undefined) {
item = _parent.myHero.itstarget;
R12 = ((item._x - X) * (item._x - X)) + ((item._y - Y) * (item._y - Y));
if ((R12 <= R0) && (item != undefined)) {
_parent.myHero.hit(power);
}
_parent.myHero.changeBulletNumber(1);
_parent.bulletout(false);
this._name = "explosed";
_root.playSound("explosionbomb");
bullet.gotoAndPlay("del");
}
stop();
Symbol 1321 MovieClip [ebullet1] Frame 1
speed = 10;
R0 = 400;
power = _parent.ebullet1power;
i = 0;
lifetime = 20;
X = _x;
Y = _y;
Symbol 1321 MovieClip [ebullet1] Frame 2
X = X + (speed * Math.sin((_rotation * Math.PI) / 180));
Y = Y - (speed * Math.cos((_rotation * Math.PI) / 180));
changeflag = false;
if (_parent.testOnBuilding(X, Y)) {
_parent.myHero.changeBulletNumber(1);
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var nSound = (Math.round(Math.random() * 2) + 1);
_root.playSound("bullet_hits_wall_0" + nSound);
}
this.removeMovieClip();
} else {
_x = X;
_y = Y;
}
Symbol 1321 MovieClip [ebullet1] Frame 3
i++;
if (i <= lifetime) {
gotoAndPlay (2);
} else {
_parent.myHero.changeBulletNumber(1);
this.removeMovieClip();
}
item = _parent.myHero.itstarget;
R12 = ((item._x - X) * (item._x - X)) + ((item._y - Y) * (item._y - Y));
if ((R12 <= R0) && (item != undefined)) {
var nSound = (Math.round(Math.random() * 2) + 1);
_root.playSound("shot_hits_body_0" + nSound);
_parent.myHero.hit(power);
this.removeMovieClip();
}
var K = _parent.getK(X);
var L = _parent.getL(Y);
citizens = _parent.citizenNear(K, L);
clength = citizens.length;
citizennear = false;
if (clength == undefined) {
clength = 0;
}
if (clength) {
citizennear = true;
}
if (citizennear) {
k = 0;
while (k <= (clength - 1)) {
item = citizens[k];
R12 = ((item.X - X) * (item.X - X)) + ((item.Y - Y) * (item.Y - Y));
if (((R12 <= R0) && (!del)) && (!isNaN(R12))) {
_root.damage.play();
if (((((X + _parent._x) < _parent.windowRightBorder) && ((X + _parent._x) > _parent.windowLeftBorder)) && ((Y + _parent._y) > _parent.windowUpBorder)) && ((Y + _parent._y) < _parent.windowDownBorder)) {
var nSound = (Math.round(Math.random() * 2) + 1);
_root.playSound("shot_hits_body_0" + nSound);
}
item.hit(power);
n = 0;
blength = _parent.Blood.length;
if (blength) {
var i = 0;
while (i <= blength) {
if ((_parent.Blood[i] == undefined) && (!n)) {
n = i;
}
i++;
}
}
_parent.attachMovie("blood", "blood" + n, _parent.getNextHighestDepth());
myitem = eval ("_parent.blood" + n);
_parent.Blood[n] = myitem;
myitem._x = X;
myitem._y = Y;
myitem._rotation = this._rotation;
del = true;
}
k++;
}
}
if (del) {
_parent.ebulletNumber = _parent.ebulletNumber - 1;
this.removeMovieClip();
}
Symbol 1330 MovieClip [enemyr] Frame 1
stop();
Symbol 1330 MovieClip [enemyr] Frame 2
stop();
Symbol 1332 MovieClip [citizenr] Frame 1
stop();
Symbol 1332 MovieClip [citizenr] Frame 2
stop();
trace("scaled");
Symbol 1333 MovieClip [heror] Frame 1
stop();
Symbol 1333 MovieClip [heror] Frame 2
stop();
Symbol 1419 MovieClip Frame 1
stop();
Symbol 1419 MovieClip Frame 3
play();
Symbol 1419 MovieClip Frame 4
stop();
Symbol 1419 MovieClip Frame 5
play();
Symbol 1419 MovieClip Frame 6
stop();
Symbol 1419 MovieClip Frame 7
play();
Symbol 1419 MovieClip Frame 8
stop();
Symbol 1419 MovieClip Frame 9
play();
Symbol 1419 MovieClip Frame 10
stop();
Symbol 1419 MovieClip Frame 11
play();
Symbol 1419 MovieClip Frame 12
stop();
Symbol 1419 MovieClip Frame 13
play();
Symbol 1419 MovieClip Frame 14
stop();
Symbol 1419 MovieClip Frame 15
play();
Symbol 1419 MovieClip Frame 16
stop();
Symbol 1419 MovieClip Frame 17
play();
Symbol 1419 MovieClip Frame 18
stop();
Symbol 1419 MovieClip Frame 19
play();
Symbol 1419 MovieClip Frame 20
stop();
Symbol 1419 MovieClip Frame 21
play();
Symbol 1419 MovieClip Frame 22
stop();
Symbol 1419 MovieClip Frame 23
play();
Symbol 1419 MovieClip Frame 24
stop();
Symbol 1419 MovieClip Frame 29
play();
Symbol 1419 MovieClip Frame 30
stop();
Symbol 1419 MovieClip Frame 31
play();
Symbol 1419 MovieClip Frame 32
stop();
Symbol 1419 MovieClip Frame 33
play();
Symbol 1419 MovieClip Frame 34
stop();
Symbol 1419 MovieClip Frame 35
play();
Symbol 1419 MovieClip Frame 36
stop();
Symbol 1419 MovieClip Frame 37
play();
Symbol 1419 MovieClip Frame 38
stop();
Symbol 1419 MovieClip Frame 39
play();
Symbol 1419 MovieClip Frame 40
stop();
Symbol 1419 MovieClip Frame 41
play();
Symbol 1419 MovieClip Frame 42
stop();
Symbol 1419 MovieClip Frame 43
play();
Symbol 1419 MovieClip Frame 44
stop();
Symbol 1419 MovieClip Frame 45
play();
Symbol 1419 MovieClip Frame 46
stop();
Symbol 1419 MovieClip Frame 47
play();
Symbol 1419 MovieClip Frame 48
stop();
Symbol 1419 MovieClip Frame 49
play();
Symbol 1419 MovieClip Frame 50
stop();
Symbol 1419 MovieClip Frame 51
play();
Symbol 1419 MovieClip Frame 52
stop();
Symbol 1419 MovieClip Frame 53
play();
Symbol 1419 MovieClip Frame 54
stop();
Symbol 1419 MovieClip Frame 55
play();
Symbol 1419 MovieClip Frame 56
stop();
Symbol 1419 MovieClip Frame 57
play();
Symbol 1419 MovieClip Frame 58
stop();
Symbol 1419 MovieClip Frame 59
play();
Symbol 1419 MovieClip Frame 60
stop();
Symbol 1419 MovieClip Frame 61
play();
Symbol 1419 MovieClip Frame 62
stop();
Symbol 1419 MovieClip Frame 63
play();
Symbol 1419 MovieClip Frame 64
stop();
Symbol 1419 MovieClip Frame 65
play();
Symbol 1419 MovieClip Frame 66
stop();
Symbol 1419 MovieClip Frame 67
play();
Symbol 1419 MovieClip Frame 68
stop();
Symbol 1419 MovieClip Frame 69
play();
Symbol 1419 MovieClip Frame 70
stop();
Symbol 1419 MovieClip Frame 71
play();
Symbol 1419 MovieClip Frame 72
stop();
Symbol 1419 MovieClip Frame 73
play();
Symbol 1419 MovieClip Frame 74
stop();
Symbol 1419 MovieClip Frame 75
play();
Symbol 1419 MovieClip Frame 76
stop();
Symbol 1419 MovieClip Frame 77
play();
Symbol 1419 MovieClip Frame 78
stop();
Symbol 1419 MovieClip Frame 79
play();
Symbol 1419 MovieClip Frame 80
stop();
Symbol 1419 MovieClip Frame 81
play();
Symbol 1419 MovieClip Frame 82
stop();
Symbol 1419 MovieClip Frame 83
play();
Symbol 1419 MovieClip Frame 84
stop();
Symbol 1419 MovieClip Frame 85
play();
Symbol 1419 MovieClip Frame 86
stop();
Symbol 1419 MovieClip Frame 87
play();
Symbol 1419 MovieClip Frame 88
stop();
Symbol 1419 MovieClip Frame 89
play();
Symbol 1419 MovieClip Frame 90
stop();
Symbol 1419 MovieClip Frame 91
play();
Symbol 1419 MovieClip Frame 92
stop();
Symbol 1419 MovieClip Frame 93
play();
Symbol 1419 MovieClip Frame 94
stop();
Symbol 1419 MovieClip Frame 95
play();
Symbol 1419 MovieClip Frame 96
stop();
Symbol 1419 MovieClip Frame 97
play();
Symbol 1419 MovieClip Frame 98
stop();
Symbol 1419 MovieClip Frame 99
play();
Symbol 1419 MovieClip Frame 100
stop();
Symbol 1419 MovieClip Frame 101
play();
Symbol 1419 MovieClip Frame 102
stop();
Symbol 1419 MovieClip Frame 103
play();
Symbol 1419 MovieClip Frame 104
stop();
Symbol 1419 MovieClip Frame 105
play();
Symbol 1419 MovieClip Frame 106
stop();
Symbol 1419 MovieClip Frame 107
play();
Symbol 1419 MovieClip Frame 108
stop();
Symbol 1419 MovieClip Frame 109
play();
Symbol 1419 MovieClip Frame 110
stop();
Symbol 1419 MovieClip Frame 111
play();
Symbol 1419 MovieClip Frame 112
stop();
Symbol 1419 MovieClip Frame 113
play();
Symbol 1419 MovieClip Frame 114
stop();
Symbol 1419 MovieClip Frame 115
play();
Symbol 1419 MovieClip Frame 116
stop();
Symbol 1419 MovieClip Frame 117
play();
Symbol 1419 MovieClip Frame 118
stop();
Symbol 1419 MovieClip Frame 119
play();
Symbol 1419 MovieClip Frame 120
stop();
Symbol 1419 MovieClip Frame 121
play();
Symbol 1419 MovieClip Frame 122
stop();
Symbol 1419 MovieClip Frame 123
play();
Symbol 1419 MovieClip Frame 124
stop();
Symbol 1419 MovieClip Frame 125
play();
Symbol 1419 MovieClip Frame 126
stop();
Symbol 1419 MovieClip Frame 127
play();
Symbol 1419 MovieClip Frame 128
stop();
Symbol 1419 MovieClip Frame 129
play();
Symbol 1419 MovieClip Frame 130
stop();
Symbol 1419 MovieClip Frame 131
play();
Symbol 1419 MovieClip Frame 132
stop();
Symbol 1419 MovieClip Frame 133
play();
Symbol 1419 MovieClip Frame 134
stop();
Symbol 1419 MovieClip Frame 135
play();
Symbol 1419 MovieClip Frame 136
stop();
Symbol 1419 MovieClip Frame 137
play();
Symbol 1419 MovieClip Frame 138
stop();
Symbol 1419 MovieClip Frame 139
play();
Symbol 1419 MovieClip Frame 140
stop();
Symbol 1419 MovieClip Frame 141
play();
Symbol 1419 MovieClip Frame 142
stop();
Symbol 1419 MovieClip Frame 143
play();
Symbol 1419 MovieClip Frame 144
stop();
Symbol 1419 MovieClip Frame 145
play();
Symbol 1419 MovieClip Frame 146
stop();
Symbol 1419 MovieClip Frame 147
play();
Symbol 1419 MovieClip Frame 148
stop();
Symbol 1419 MovieClip Frame 149
play();
Symbol 1419 MovieClip Frame 150
stop();
Symbol 1419 MovieClip Frame 151
play();
Symbol 1419 MovieClip Frame 152
stop();
Symbol 1419 MovieClip Frame 153
play();
Symbol 1419 MovieClip Frame 154
stop();
Symbol 1419 MovieClip Frame 155
play();
Symbol 1419 MovieClip Frame 156
stop();
Symbol 1419 MovieClip Frame 157
play();
Symbol 1419 MovieClip Frame 158
stop();
Symbol 1419 MovieClip Frame 159
play();
Symbol 1419 MovieClip Frame 160
stop();
Symbol 1419 MovieClip Frame 161
play();
Symbol 1419 MovieClip Frame 162
stop();
Symbol 1419 MovieClip Frame 163
play();
Symbol 1419 MovieClip Frame 164
stop();
Symbol 1419 MovieClip Frame 165
play();
Symbol 1419 MovieClip Frame 166
stop();
Symbol 1419 MovieClip Frame 167
play();
Symbol 1419 MovieClip Frame 168
stop();
Symbol 1419 MovieClip Frame 169
play();
Symbol 1419 MovieClip Frame 170
stop();
Symbol 1419 MovieClip Frame 171
play();
Symbol 1419 MovieClip Frame 172
stop();
Symbol 1419 MovieClip Frame 173
play();
Symbol 1419 MovieClip Frame 174
stop();
Symbol 1419 MovieClip Frame 175
play();
Symbol 1419 MovieClip Frame 176
stop();
Symbol 1419 MovieClip Frame 177
play();
Symbol 1419 MovieClip Frame 180
stop();
Symbol 1419 MovieClip Frame 181
play();
Symbol 1419 MovieClip Frame 184
stop();
Symbol 1422 MovieClip Frame 1
numberofEnemies = 0;
numberofCitizens = 0;
numberofGrounds = 0;
scale = false;
x0 = 7;
y0 = 7;
maxforscale1 = 50;
maxforscale2 = 80;
setKX = function (X0) {
KX = x0 / X0;
};
setKY = function (Y0) {
KY = y0 / Y0;
};
setWidth = function (itsWidth) {
Width = itsWidth * KX;
};
setHeight = function (itsHeight) {
Height = itsHeight * KY;
};
setEnemy = function (x, y) {
numberofEnemies++;
attachMovie("enemyr", "enemy" + numberofEnemies, this.getNextHighestDepth());
var myenemy = eval ("enemy" + numberofEnemies);
if (scale) {
myenemy.gotoAndStop("scale");
}
myenemy.setX = function (x) {
this._x = ((x * KX) - (Width / 2)) - (2 * x0);
};
myenemy.setY = function (y) {
this._y = ((y * KY) + (Height / 2)) - (y0 / 2);
};
myenemy.die = function () {
this.removeMovieClip();
};
myenemy.setX(x);
myenemy.setY(y);
return(myenemy);
};
setCitizen = function (x, y) {
numberofCitizens++;
attachMovie("citizenr", "citizen" + numberofCitizens, this.getNextHighestDepth());
mycitizen = eval ("citizen" + numberofCitizens);
if (scale) {
mycitizen.gotoAndStop("scale");
}
mycitizen.setX = function (x) {
this._x = ((x * KX) - (Width / 2)) - (2 * x0);
};
mycitizen.setY = function (y) {
this._y = ((y * KY) + (Height / 2)) - (y0 / 2);
};
mycitizen.die = function () {
this.removeMovieClip();
};
mycitizen.setX(x);
mycitizen.setY(y);
return(mycitizen);
};
setHero = function (x, y) {
attachMovie("heror", "item", this.getNextHighestDepth());
if (scale) {
item.gotoAndStop("scale");
}
item.setX = function (x) {
this._x = ((x * KX) - (Width / 2)) - (2 * x0);
};
item.setY = function (y) {
this._y = ((y * KY) + (Height / 2)) - (y0 / 2);
};
item.die = function () {
this.removeMovieClip();
};
item.setX(x);
item.setY(y);
return(item);
};
setGround = function (x, y, build) {
var level;
numberofGrounds++;
if (build) {
sourceName = "buildr";
if (numberofGrounds == 1) {
level = 1;
} else {
level = this.getNextHighestDepth();
}
attachMovie(sourceName, "ground" + numberofGrounds, level);
myground = eval ("ground" + numberofGrounds);
myground._x = ((x * KX) - (Width / 2)) - (2 * x0);
myground._y = ((y * KY) + (Height / 2)) - (y0 / 2);
}
};
completed = function () {
sourceName = "freer";
attachMovie(sourceName, "bg", 0);
myground = bg;
myground._width = Width - x0;
myground._height = Height;
myground._x = ((-Width) / 2) - (x0 / 2);
myground._y = (Height / 2) + (y0 / 2);
if ((Width < maxforscale1) && (Height < maxforscale1)) {
_width = (_width * 2);
_height = (_height * 2);
scale = true;
}
if ((Width < maxforscale2) && (Height < maxforscale2)) {
_width = (_width * 1.5);
_height = (_height * 1.5);
}
};
Symbol 1490 MovieClip Frame 1
stop();
Symbol 1571 MovieClip Frame 1
stop();
Symbol 1571 MovieClip Frame 42
stop();
Symbol 1574 MovieClip Frame 1
stop();
motion = function (flag) {
if (flag) {
legs.play();
} else {
legs.gotoAndStop(1);
}
};
die = function () {
man.gotoAndPlay("die");
};
Symbol 1575 MovieClip Frame 1
distanceX = 240;
distanceY = 180;
Symbol 1575 MovieClip Frame 2
del = (_parent.myHero.itstarget._x + _parent._x) - _parent.windowLeftBorder;
if (del < distanceX) {
_parent._x = (_parent._x + distanceX) - del;
}
del = ((-_parent.myHero.itstarget._x) - _parent._x) + _parent.windowRightBorder;
if (del < distanceX) {
_parent._x = (_parent._x - distanceX) + del;
}
del = (_parent.myHero.itstarget._y + _parent._y) - _parent.windowUpBorder;
if (del < distanceY) {
_parent._y = (_parent._y + distanceY) - del;
}
del = ((-_parent.myHero.itstarget._y) - _parent._y) + _parent.windowDownBorder;
if (del < distanceY) {
_parent._y = (_parent._y - distanceY) + del;
}
if (_parent.myHero.damage != undefined) {
_parent._parent.t = Math.round(_parent.myHero.damage);
} else {
_parent._parent.t = 0;
}
_parent._parent.k = _parent.numberofCitizens - _parent.killedCitizensNumber;
_parent._parent.e = _parent.numberofEnemies - _parent.killedEnemiesNumber;
if (_parent.myHero.moneyLevel != undefined) {
_parent._parent.m = _parent.myHero.moneyLevel;
} else {
_parent._parent.m = 0;
}
Symbol 1575 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1576 MovieClip Frame 1
windowLeftBorder = 0;
windowRightBorder = 480;
windowUpBorder = 0;
windowDownBorder = 360;
windowWidth = windowRightBorder - windowLeftBorder;
windowHeight = windowDownBorder - windowUpBorder;
buildingsType = 3;
Rtransform = 240;
counter = 0;
kcounter = 0;
paused = 0;
finished = false;
thisObj = this;
translator = function (S) {
var _local3 = new Array();
_local3[0] = new Array();
var _local2 = 0;
var _local5 = 0;
var _local1 = 0;
do {
s0 = S.substr(_local1, 1);
if (s0 == " ") {
_local2 = 0;
_local5++;
_local1++;
s0 = S.substr(_local1, 1);
}
if (_local3[_local2] == undefined) {
_local3[_local2] = new Array();
}
_local3[_local2][_local5] = s0;
_local2++;
_local1++;
} while (_local1 < S.length);
return(_local3);
};
begin = function () {
levelConstruktor = new Array();
levelConstruktor = _parent.levels[_parent.numberofLevel];
numberofXField = levelConstruktor.numberofXField;
numberofYField = levelConstruktor.numberofYField;
Xelement = levelConstruktor.Xelement;
Yelement = levelConstruktor.Yelement;
myWidth = Xelement * numberofXField;
myHeight = Yelement * numberofYField;
leftBorder = (-(myWidth - windowWidth)) / 2;
_x = leftBorder;
rightBorder = leftBorder + myWidth;
upBorder = (-(myHeight - windowHeight)) / 2;
_y = upBorder;
downBorder = upBorder + myHeight;
zombieKiller.radar.setKX(Xelement);
zombieKiller.radar.setKY(Yelement);
zombieKiller.radar.setWidth(myWidth);
zombieKiller.radar.setHeight(myHeight);
numberofBuildings = 0;
numberofEnemies = 0;
numberofCitizens = 0;
numberofTreasures = 0;
Buildings = new Array();
Enemies = new Array();
Enemies[0] = 0;
Citizens = new Array();
Citizens[0] = 0;
Treasures = new Array();
Treasures[0] = 0;
TreasuresM = new Array();
TreasuresM[0] = 0;
Blood = new Array();
killedEnemiesNumber = 0;
killedCitizensNumber = 0;
tookTreasuresNumber = 0;
ebulletNumber = 0;
bgArray = translator(levelConstruktor.bg);
numberofBGItems = 0;
NumberofItems = 0;
shootEnabled = true;
EnemyLocations = new Array();
ilocationlength = Math.floor((rightBorder - leftBorder) / Rtransform);
jlocationlength = Math.floor((downBorder - upBorder) / Rtransform);
var _local4 = 0;
while (_local4 <= ilocationlength) {
EnemyLocations[_local4] = new Array();
var _local5 = 0;
while (_local5 <= jlocationlength) {
EnemyLocations[_local4][_local5] = false;
_local5++;
}
_local4++;
}
CitizenLocations = new Array();
_local4 = 0;
while (_local4 <= ilocationlength) {
CitizenLocations[_local4] = new Array();
var _local5 = 0;
while (_local5 <= jlocationlength) {
CitizenLocations[_local4][_local5] = false;
_local5++;
}
_local4++;
}
var _local6 = 0;
while (_local6 <= (numberofXField - 1)) {
Buildings[_local6] = new Array();
var _local3 = 0;
while (_local3 <= (numberofYField - 1)) {
Buildings[_local6][_local3] = false;
fillBGWith(_local6, _local3, bgArray[_local6][_local3]);
_local3++;
}
_local6++;
}
_local6 = 0;
while (_local6 <= (numberofXField - 1)) {
var _local3 = 0;
while (_local3 <= (numberofYField - 1)) {
_local4 = 0;
while (_local4 <= levelConstruktor[_local6][_local3].length) {
setItems(_local6, _local3);
switch (levelConstruktor[_local6][_local3][_local4][0]) {
case "Enemy1" :
setEnemy1(_local6, _local3, levelConstruktor[_local6][_local3][_local4][1]);
break;
case "Enemy2" :
setEnemy2(_local6, _local3, levelConstruktor[_local6][_local3][_local4][1]);
break;
case "Enemy3" :
setEnemy3(_local6, _local3, levelConstruktor[_local6][_local3][_local4][1]);
break;
case "Enemy4" :
setEnemy4(_local6, _local3, levelConstruktor[_local6][_local3][_local4][1]);
break;
case "Citizen1" :
setCitizen1(_local6, _local3, levelConstruktor[_local6][_local3][_local4][1]);
break;
case "Citizen2" :
setCitizen2(_local6, _local3, levelConstruktor[_local6][_local3][_local4][1]);
break;
case "Citizen3" :
setCitizen3(_local6, _local3, levelConstruktor[_local6][_local3][_local4][1]);
break;
case "Treasure1" :
setTreasure1(_local6, _local3, levelConstruktor[_local6][_local3][_local4][1], levelConstruktor[_local6][_local3][_local4][2]);
break;
case "hero" :
setHero(_local6, _local3);
}
_local4++;
}
_local3++;
}
_local6++;
}
bullet1power = _parent.bullet1power;
bullet2power = _parent.bullet2power;
bullet3power = _parent.bullet3power;
bullet4power = _parent.bullet4power;
ebullet1power = levelConstruktor.powerofEnemies4;
onEnterFrame = function () {
var _local1 = 1;
while (_local1 <= numberofEnemies) {
Enemies[_local1].begin(false);
_local1++;
}
_local1 = 1;
while (_local1 <= numberofCitizens) {
Citizens[_local1].begin();
_local1++;
}
_local1 = 1;
while (_local1 <= numberofTreasures) {
Treasures[_local1].begin(TreasuresM[_local1]);
_local1++;
}
delete onEnterFrame;
};
thisObj.onMouseDown = function () {
if (!thisObj.paused) {
myHero.shoot();
}
};
thisObj.onMouseUp = function () {
myHero.stopShoot();
};
thisObj.onMouseMove = function () {
if (!thisObj.paused) {
myHero.setRotation(_xmouse, _ymouse);
}
};
my_cm = new ContextMenu();
menuHandler = function (obj, menu) {
myHero.shoot(false);
_root.mouseInRect = false;
};
my_cm.onSelect = menuHandler;
_root.menu = my_cm;
zombieKiller.radar.completed();
play();
};
testOnBuilding = function (X, Y) {
var _local1 = false;
if (X <= leftBorder) {
_local1 = true;
}
if (X >= rightBorder) {
_local1 = true;
}
if (Y <= upBorder) {
_local1 = true;
}
if (Y >= downBorder) {
_local1 = true;
}
var _local5 = Math.floor((X - leftBorder) / Xelement);
var _local3 = Math.floor((Y - upBorder) / Yelement);
if (Buildings[_local5][_local3]) {
_local1 = true;
}
if (_local1) {
return(true);
}
return(false);
};
freeCell = function (i, j) {
var _local1 = false;
if (bgArray[i][j] == "h") {
_local1 = true;
}
if (bgArray[i][j] == "v") {
_local1 = true;
}
if (bgArray[i][j] == "c") {
_local1 = true;
}
if (bgArray[i][j] == "t") {
_local1 = true;
}
if (bgArray[i][j] == "x") {
_local1 = true;
}
return(_local1);
};
fillBGWith = function (i, j, item) {
var bonus = "";
var Rotation = 0;
numberofBGItems++;
switch (item) {
case "c" :
if (freeCell(i + 1, j) && (freeCell(i, j + 1))) {
Rotation = 0;
}
if (freeCell(i - 1, j) && (freeCell(i, j + 1))) {
Rotation = 90;
}
if (freeCell(i - 1, j) && (freeCell(i, j - 1))) {
Rotation = 180;
}
if (freeCell(i + 1, j) && (freeCell(i, j - 1))) {
Rotation = 270;
}
break;
case "t" :
if ((freeCell(i + 1, j) && (freeCell(i, j + 1))) && (freeCell(i, j - 1))) {
Rotation = 0;
}
if ((freeCell(i - 1, j) && (freeCell(i + 1, j))) && (freeCell(i, j + 1))) {
Rotation = 90;
}
if ((freeCell(i - 1, j) && (freeCell(i, j + 1))) && (freeCell(i, j - 1))) {
Rotation = 180;
}
if ((freeCell(i - 1, j) && (freeCell(i + 1, j))) && (freeCell(i, j - 1))) {
Rotation = 270;
}
break;
case "b" :
setBuilding(i, j);
bonus = Math.round(Math.random() * (buildingsType - 1)) + 1;
break;
case "[" :
setBuilding(i, j);
bonus = 1;
item = "b";
break;
case "]" :
setBuilding(i, j);
bonus = 2;
item = "b";
break;
case "{" :
setBuilding(i, j);
bonus = 3;
item = "b";
break;
case "}" :
setBuilding(i, j);
item = "b";
bonus = 4;
}
bg.attachMovie(("bg" + item) + bonus, "bg" + numberofBGItems, bg.getNextHighestDepth());
var bgItem = eval ("bg.bg" + numberofBGItems);
bgItem._x = leftBorder + ((i + 0.5) * Xelement);
bgItem._y = upBorder + ((j + 0.5) * Yelement);
zombieKiller.radar.setGround(bgItem._x, bgItem._y, Buildings[i][j]);
bgItem._rotation = Rotation;
};
setBuilding = function (i, j) {
zombieKiller.radar.setBuild(i, j);
numberofBuildings++;
Buildings[i][j] = true;
};
setEnemy1 = function (i, j, n) {
var k = 1;
while (k <= n) {
numberofEnemies++;
attachMovie("enemy1", "enemy" + numberofEnemies, this.getNextHighestDepth());
myenemy = eval ("enemy" + numberofEnemies);
myenemy._x = (leftBorder + (i * Xelement)) + (Math.random() * Xelement);
myenemy._y = (upBorder + (j * Yelement)) + (Math.random() * Yelement);
Enemies.push(myenemy);
k++;
}
};
setEnemy2 = function (i, j, n) {
var k = 1;
while (k <= n) {
numberofEnemies++;
attachMovie("enemy2", "enemy" + numberofEnemies, this.getNextHighestDepth());
myenemy = eval ("enemy" + numberofEnemies);
myenemy._x = (leftBorder + (i * Xelement)) + (Math.random() * Xelement);
myenemy._y = (upBorder + (j * Yelement)) + (Math.random() * Yelement);
Enemies.push(myenemy);
k++;
}
};
setEnemy3 = function (i, j, n) {
var k = 1;
while (k <= n) {
numberofEnemies++;
attachMovie("enemy3", "enemy" + numberofEnemies, this.getNextHighestDepth());
myenemy = eval ("enemy" + numberofEnemies);
myenemy._x = (leftBorder + (i * Xelement)) + (Math.random() * Xelement);
myenemy._y = (upBorder + (j * Yelement)) + (Math.random() * Yelement);
Enemies.push(myenemy);
k++;
}
};
setEnemy4 = function (i, j, n) {
var k = 1;
while (k <= n) {
numberofEnemies++;
attachMovie("enemy4", "enemy" + numberofEnemies, this.getNextHighestDepth());
myenemy = eval ("enemy" + numberofEnemies);
myenemy._x = (leftBorder + (i * Xelement)) + (Math.random() * Xelement);
myenemy._y = (upBorder + (j * Yelement)) + (Math.random() * Yelement);
Enemies.push(myenemy);
k++;
}
};
setCitizen1 = function (i, j, n) {
var k = 1;
while (k <= n) {
numberofCitizens++;
attachMovie("citizen1", "citizen" + numberofCitizens, this.getNextHighestDepth());
mycitizen = eval ("citizen" + numberofCitizens);
mycitizen._x = (leftBorder + (i * Xelement)) + (Math.random() * Xelement);
mycitizen._y = (upBorder + (j * Yelement)) + (Math.random() * Yelement);
Citizens.push(mycitizen);
k++;
}
};
setCitizen2 = function (i, j, n) {
var k = 1;
while (k <= n) {
numberofCitizens++;
attachMovie("citizen2", "citizen" + numberofCitizens, this.getNextHighestDepth());
mycitizen = eval ("citizen" + numberofCitizens);
mycitizen._x = (leftBorder + (i * Xelement)) + (Math.random() * Xelement);
mycitizen._y = (upBorder + (j * Yelement)) + (Math.random() * Yelement);
Citizens.push(mycitizen);
k++;
}
};
setCitizen3 = function (i, j, n) {
var k = 1;
while (k <= n) {
numberofCitizens++;
attachMovie("citizen3", "citizen" + numberofCitizens, this.getNextHighestDepth());
mycitizen = eval ("citizen" + numberofCitizens);
mycitizen._x = (leftBorder + (i * Xelement)) + (Math.random() * Xelement);
mycitizen._y = (upBorder + (j * Yelement)) + (Math.random() * Yelement);
Citizens.push(mycitizen);
k++;
}
};
setTreasure1 = function (i, j, n, s) {
var k = 1;
while (k <= n) {
numberofTreasures++;
bonus.attachMovie("treasure1", "treasure" + numberofTreasures, bonus.getNextHighestDepth());
mytreasure = eval ("bonus.treasure" + numberofTreasures);
mytreasure._x = (leftBorder + (i * Xelement)) + (Math.random() * Xelement);
mytreasure._y = (upBorder + (j * Yelement)) + (Math.random() * Yelement);
mytreasure.money = new Number();
Treasures.push(mytreasure);
TreasuresM.push(s);
k++;
}
};
setHero = function (i, j) {
zombieKiller._x = (leftBorder + (i * Xelement)) + (Math.random() * Xelement);
zombieKiller._y = (upBorder + (j * Yelement)) + (Math.random() * Yelement);
myHero = new hero(zombieKiller, this, _parent.Hero.damage, _parent.Hero.moneyLevel, _parent.Hero.speed, _parent.Hero.armorLevel, _parent.Hero.armor, _parent.Hero.weaponNumber, _parent.Hero.weaponLevel1, _parent.Hero.weaponLevel2, _parent.Hero.weaponLevel3, _parent.Hero.weaponLevel4);
myHero.itstarget.motion(false);
};
setItems = function (i, j) {
var item = "firest";
var n = 1;
if (!Buildings[i][j]) {
var k = 1;
while (k <= n) {
NumberofItems++;
if (Math.random() > 0.85) {
bg.attachMovie(item, "item" + NumberofItems, bg.getNextHighestDepth());
myitem = eval ("bg.item" + NumberofItems);
myitem._x = (leftBorder + (i * Xelement)) + (Math.random() * (Xelement / 4));
myitem._y = (upBorder + (j * Yelement)) + (Math.random() * (Yelement / 4));
}
k++;
}
}
};
killEnemie = function () {
killedEnemiesNumber++;
var _local1 = 1;
while (_local1 <= (Enemies.length - 1)) {
if (Enemies[_local1].dead) {
Enemies.splice(_local1, 1);
}
_local1++;
}
if (killedEnemiesNumber == numberofEnemies) {
finish(true);
}
};
killCitizen = function () {
killedCitizensNumber++;
var _local1 = 1;
while (_local1 <= (Citizens.length - 1)) {
if (Citizens[_local1].dead) {
Citizens.splice(_local1, 1);
}
_local1++;
}
if (killedCitizensNumber == numberofCitizens) {
finish(false);
}
};
tookTreasures = function () {
tookTreasuresNumber++;
};
UpdateXY = function () {
var _local4 = Citizens.length;
var _local5 = Enemies.length;
var _local2 = Enemies;
var _local3 = Citizens;
var _local1 = 0;
while (_local1 <= (_local4 - 1)) {
_local3[_local1].updateXY(false);
_local1++;
}
_local1 = 0;
while (_local1 <= (_local5 - 1)) {
_local2[_local1].updateXY(false);
_local1++;
}
};
UpdateRadar = function () {
var _local1;
var _local5 = Citizens.length;
var _local6 = Enemies.length;
var _local4 = Citizens;
var _local3 = Enemies;
var _local2 = 0;
while (_local2 <= (_local5 - 1)) {
_local1 = _local4[_local2];
_local1.ritem.setX(_local1.X);
_local1.ritem.setY(_local1.Y);
_local2++;
}
_local2 = 0;
while (_local2 <= (_local6 - 1)) {
_local1 = _local3[_local2];
_local1.ritem.setX(_local1.X);
_local1.ritem.setY(_local1.Y);
_local2++;
}
};
transformation = function () {
var _local7 = Array();
var _local5 = Array();
var _local4;
var _local3;
var _local9;
var _local6;
var _local10 = EnemyLocations;
var _local8 = CitizenLocations;
var _local2 = 0;
while (_local2 <= ilocationlength) {
var _local1 = 0;
while (_local1 <= jlocationlength) {
_local7 = _local10[_local2][_local1];
_local5 = _local8[_local2][_local1];
_local4 = _local7.length;
_local3 = _local5.length;
if (((((_local4 != undefined) && (_local4)) && (_local3 != undefined)) && (_local3)) && ((Math.abs(_local2 - HeroK) > 1) or (Math.abs(_local1 - HeroL) > 1))) {
_local9 = (Math.random() * Math.random()) / _local4;
if (_local9 < 0.02) {
_local6 = Math.round(Math.random() * (_local3 - 2)) + 1;
_local5[_local6].transformation();
_local8[_local2][_local1].splice(_local6, 1);
}
}
_local1++;
}
_local2++;
}
};
setDirections = function (k, l, exact) {
if (exact) {
var _local2 = enemyNear(k, l);
var _local5 = citizenNear(k, l);
} else {
var _local2 = EnemyLocations[k][l];
var _local5 = CitizenLocations[k][l];
}
var _local4 = _local2.length;
var _local3 = _local5.length;
if (_local3 && (_local3 != undefined)) {
var _local1 = 0;
while (_local1 <= (_local3 - 1)) {
_local5[_local1].simular();
if (_local4 && (_local4 != undefined)) {
_local5[_local1].toEnemy(_local2);
}
_local1++;
}
}
if (_local4 && (_local4 != undefined)) {
var _local1 = 0;
while (_local1 <= (_local4 - 1)) {
_local2[_local1].simular();
if (_local3 && (_local3 != undefined)) {
_local2[_local1].toCitizen(_local5);
}
_local2[_local1].toHero();
_local1++;
}
}
};
toHero = function (k, l) {
var _local2 = enemyNear(k, l);
var _local5 = _local2.length;
if (_local5) {
var _local1 = 0;
while (_local1 <= (_local5 - 1)) {
_local2[_local1].updateXY(true);
_local1++;
}
}
var _local3 = citizenNear(k, l);
var _local4 = _local3.length;
if (_local4) {
var _local1 = 0;
while (_local1 <= (_local4 - 1)) {
_local3[_local1].updateXY(true);
_local1++;
}
}
};
formateEnemyLocations = function () {
var _local3;
var _local8;
var _local2;
var _local1;
var _local4;
var _local5 = EnemyLocations;
var _local7 = Enemies.length;
var _local6 = Enemies;
_local2 = 0;
while (_local2 <= ilocationlength) {
_local1 = 0;
while (_local1 <= jlocationlength) {
_local5[_local2][_local1] = new Array();
_local1++;
}
_local2++;
}
_local3 = 1;
while (_local3 <= (_local7 - 1)) {
_local4 = _local6[_local3];
_local2 = getK(_local4.X);
_local1 = getL(_local4.Y);
_local5[_local2][_local1].push(_local4);
_local3++;
}
};
formateCitizenLocations = function () {
var _local3;
var _local8;
var _local2;
var _local1;
var _local4;
var _local5 = CitizenLocations;
var _local7 = Citizens.length;
var _local6 = Citizens;
_local2 = 0;
while (_local2 <= ilocationlength) {
_local1 = 0;
while (_local1 <= jlocationlength) {
_local5[_local2][_local1] = new Array();
_local1++;
}
_local2++;
}
_local3 = 1;
while (_local3 <= (Citizens.length - 1)) {
_local4 = _local6[_local3];
_local2 = getK(_local4.X);
_local1 = getL(_local4.Y);
_local5[_local2][_local1].push(_local4);
_local3++;
}
};
getK = function (x) {
return(_global.Math.floor((x - leftBorder) / Rtransform));
};
getL = function (y) {
return(_global.Math.floor((y - upBorder) / Rtransform));
};
plusArray = function (array, plus) {
var _local2 = array;
var _local3 = plus.length;
if (_local3 && (_local3 != undefined)) {
var _local1 = 0;
while (_local1 <= (_local3 - 1)) {
_local2[_local2.length] = plus[_local1];
_local1++;
}
}
return(_local2);
};
enemyNear = function (k, l) {
var _local1 = [];
var _local2 = EnemyLocations;
var _local3 = plusArray;
_local1 = _local3(_local1, _local2[k][l]);
_local1 = _local3(_local1, _local2[k - 1][l]);
_local1 = _local3(_local1, _local2[k + 1][l]);
_local1 = _local3(_local1, _local2[k][l - 1]);
_local1 = _local3(_local1, _local2[k][l + 1]);
_local1 = _local3(_local1, _local2[k - 1][l - 1]);
_local1 = _local3(_local1, _local2[k - 1][l + 1]);
_local1 = _local3(_local1, _local2[k + 1][l - 1]);
_local1 = _local3(_local1, _local2[k + 1][l + 1]);
return(_local1);
};
citizenNear = function (k, l) {
var _local1 = [];
var _local2 = CitizenLocations;
var _local3 = plusArray;
_local1 = _local3(_local1, _local2[k][l]);
_local1 = _local3(_local1, _local2[k - 1][l]);
_local1 = _local3(_local1, _local2[k + 1][l]);
_local1 = _local3(_local1, _local2[k][l - 1]);
_local1 = _local3(_local1, _local2[k][l + 1]);
_local1 = _local3(_local1, _local2[k - 1][l - 1]);
_local1 = _local3(_local1, _local2[k - 1][l + 1]);
_local1 = _local3(_local1, _local2[k + 1][l - 1]);
_local1 = _local3(_local1, _local2[k + 1][l + 1]);
return(_local1);
};
bulletout = function (flag) {
shootEnabled = !flag;
};
finish = function (rez) {
toFinish = function () {
clearInterval(myFinishInterval);
var _local3 = 1;
while (_local3 <= numberofEnemies) {
Enemies[_local3].removeMovieClip();
_local3++;
}
_local3 = 1;
while (_local3 <= numberofCitizens) {
Citizens[_local3].removeMovieClip();
_local3++;
}
_local3 = 1;
while (_local3 <= numberofTreasures) {
Treasures[_local3].removeMovieClip();
_local3++;
}
if (!rez) {
if (myHero != undefined) {
myHero.die();
delete myHero;
}
_parent.gameOver();
} else {
myHero.die();
bonus = levelConstruktor.bonusforSavedSoules * (numberofCitizens - killedCitizensNumber);
myHero.setMoneyLevel(bonus);
_root.score = _root.score + bonus;
_parent.nextLevel(myHero);
}
};
if (!finished) {
var myFinishInterval = setInterval(toFinish, 5000);
if (!rez) {
myHero.itstarget.speed = 0;
myHero.itstarget.gotoAndStop(1);
if (myHero.dead) {
_root.loose2._visible = true;
var _local4 = Math.round(Math.random() * 2) + 1;
_root.playSound("hero_die_0" + _local4);
delete myHero;
} else {
_root.loose1._visible = true;
_root.playSound("level_fail_all_civilians_killed");
}
} else {
_root.win._visible = true;
_root.playSound("win");
}
finished = true;
}
};
mouseOutScreen = function () {
myHero.stopShoot();
};
setPause = function () {
if (!paused) {
_root.cursor.gotoAndStop("arrow");
thisObj.stop();
myHero.letItMove(false, "left");
myHero.letItMove(false, "right");
myHero.letItMove(false, "up");
myHero.letItMove(false, "down");
myHero.stopShoot();
} else {
_root.cursor.gotoAndStop("aim");
thisObj.play();
}
paused = !paused;
_root.paused._visible = paused;
_root.paused.dali.enabled = paused;
};
stop();
Instance of Symbol 1574 MovieClip "zombieKiller" in Symbol 1576 MovieClip Frame 1
onClipEvent (keyDown) {
if (!_parent.paused) {
switch (Key.getCode()) {
case 37 :
_parent.myHero.letItMove(true, "left");
break;
case 39 :
_parent.myHero.letItMove(true, "right");
break;
case 38 :
_parent.myHero.letItMove(true, "up");
break;
case 40 :
_parent.myHero.letItMove(true, "down");
break;
case 65 :
_parent.myHero.letItMove(true, "left");
break;
case 68 :
_parent.myHero.letItMove(true, "right");
break;
case 87 :
_parent.myHero.letItMove(true, "up");
break;
case 83 :
_parent.myHero.letItMove(true, "down");
break;
case 49 :
if (_parent.myHero.weaponLevel1) {
_parent.myHero.changeWeapon(1);
_root.ico.gotoAndStop("gun");
}
break;
case 50 :
if (_parent.myHero.weaponLevel2) {
_parent.myHero.changeWeapon(2);
_root.ico.gotoAndStop("shotgun");
}
break;
case 51 :
if (_parent.myHero.weaponLevel3) {
_parent.myHero.changeWeapon(3);
_root.ico.gotoAndStop("machinegun");
}
break;
case 52 :
if (_parent.myHero.weaponLevel4) {
_parent.myHero.changeWeapon(4);
_root.ico.gotoAndStop("grenade");
}
break;
case 80 :
if (_parent.finished) {
break;
}
_parent.setPause(true);
}
}
}
onClipEvent (keyUp) {
switch (Key.getCode()) {
case 37 :
_parent.myHero.letItMove(false, "left");
break;
case 39 :
_parent.myHero.letItMove(false, "right");
break;
case 38 :
_parent.myHero.letItMove(false, "up");
break;
case 40 :
_parent.myHero.letItMove(false, "down");
break;
case 65 :
_parent.myHero.letItMove(false, "left");
break;
case 68 :
_parent.myHero.letItMove(false, "right");
break;
case 87 :
_parent.myHero.letItMove(false, "up");
break;
case 83 :
_parent.myHero.letItMove(false, "down");
}
}
Symbol 1576 MovieClip Frame 2
HeroK = getK(myHero.itstarget._x);
HeroL = getL(myHero.itstarget._y);
if (counter == ilocationlength) {
counter = 0;
kcounter++;
if (kcounter == jlocationlength) {
kcounter = 0;
}
formateEnemyLocations();
formateCitizenLocations();
setDirections(HeroK, HeroL, true);
UpdateRadar();
transformation();
}
UpdateXY();
toHero(HeroK, HeroL);
myHero.update();
counter++;
Symbol 1576 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1578 MovieClip Frame 1
stop();
Symbol 1607 MovieClip Frame 1
stop();
Symbol 1607 MovieClip Frame 2
stop();
Symbol 1607 MovieClip Frame 3
stop();
Symbol 1607 MovieClip Frame 4
stop();
Symbol 1611 Button
on (rollOver) {
_root.cursor.gotoAndStop("hand");
_root.playSound("shop_mouse_over");
}
on (rollOut) {
_root.cursor.gotoAndStop("arrow");
}
on (release) {
_root.playSound("shop_simple_click");
_root.main.setPause();
}
Symbol 1615 Button
on (rollOver) {
_root.cursor.gotoAndStop("hand");
_root.playSound("shop_mouse_over");
}
on (rollOut) {
_root.cursor.gotoAndStop("arrow");
}
on (release) {
_root.playSound("shop_simple_click");
_root.main.myHero.die();
_root.gameOver();
}
Symbol 1631 MovieClip Frame 1
stop();
Symbol 1631 MovieClip Frame 2
play();
Symbol 1632 MovieClip Frame 1
setLevel = function (cl, ml) {
mask._width = (cl * mask0._width) / ml;
};
Symbol 1644 MovieClip Frame 1
stop();
Symbol 1644 MovieClip Frame 2
stop();
Symbol 1644 MovieClip Frame 3
stop();
Symbol 1644 MovieClip Frame 4
stop();
Symbol 1646 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
weapon2mc.gotoAndStop(2);
prise = shop.weapon2[Hero.weaponLevel2 + 1];
}
on (rollOut) {
cursor.gotoAndStop("arrow");
weapon2mc.gotoAndStop(1);
prise = "";
}
on (press) {
playSound("shop_simple_click");
}
on (release) {
if (Hero.moneyLevel >= shop.weapon2[Hero.weaponLevel2 + 1]) {
Hero.weaponLevel2 = Hero.weaponLevel2 + 1;
Hero.moneyLevel = Hero.moneyLevel - shop.weapon2[Hero.weaponLevel2];
prise = shop.weapon2[Hero.weaponLevel2 + 1];
if (Hero.weaponLevel2 == weaponLevelmax2) {
bw2.enabled = false;
prise = "";
cursor.gotoAndStop("arrow");
weapon2mc.gotoAndStop(3);
}
uw2.blick.gotoAndStop("play");
_root.playSound("shop_click_buy");
} else {
_root.playSound("shop_buy_failed");
}
}
Symbol 1655 MovieClip Frame 1
stop();
Symbol 1655 MovieClip Frame 2
stop();
Symbol 1655 MovieClip Frame 3
stop();
Symbol 1655 MovieClip Frame 4
stop();
Symbol 1664 MovieClip Frame 1
stop();
Symbol 1664 MovieClip Frame 2
stop();
Symbol 1664 MovieClip Frame 3
stop();
Symbol 1664 MovieClip Frame 4
stop();
Symbol 1665 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
weapon3mc.gotoAndStop(2);
prise = shop.weapon3[Hero.weaponLevel3 + 1];
}
on (rollOut) {
cursor.gotoAndStop("arrow");
weapon3mc.gotoAndStop(1);
prise = "";
}
on (press) {
playSound("shop_simple_click");
}
on (release) {
if (Hero.moneyLevel >= shop.weapon3[Hero.weaponLevel3 + 1]) {
Hero.weaponLevel3 = Hero.weaponLevel3 + 1;
Hero.moneyLevel = Hero.moneyLevel - shop.weapon3[Hero.weaponLevel3];
prise = shop.weapon3[Hero.weaponLevel3 + 1];
if (Hero.weaponLevel3 == weaponLevelmax3) {
bw3.enabled = false;
prise = "";
cursor.gotoAndStop("arrow");
weapon3mc.gotoAndStop(3);
}
uw3.blick.gotoAndStop("play");
_root.playSound("shop_click_buy");
} else {
_root.playSound("shop_buy_failed");
}
}
Symbol 1666 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
weapon4mc.gotoAndStop(2);
prise = shop.weapon4[Hero.weaponLevel4 + 1];
}
on (rollOut) {
cursor.gotoAndStop("arrow");
weapon4mc.gotoAndStop(1);
prise = "";
}
on (press) {
playSound("shop_simple_click");
}
on (release) {
playSound("mouseclick");
if (Hero.moneyLevel >= shop.weapon4[Hero.weaponLevel4 + 1]) {
Hero.weaponLevel4 = Hero.weaponLevel4 + 1;
Hero.moneyLevel = Hero.moneyLevel - shop.weapon4[Hero.weaponLevel4];
prise = shop.weapon4[Hero.weaponLevel4 + 1];
if (Hero.weaponLevel4 == weaponLevelmax4) {
bw4.enabled = false;
prise = "";
cursor.gotoAndStop("arrow");
weapon4mc.gotoAndStop(3);
}
uw4.blick.gotoAndStop("play");
_root.playSound("shop_click_buy");
} else {
_root.playSound("shop_buy_failed");
}
}
Symbol 1680 MovieClip Frame 1
stop();
Symbol 1680 MovieClip Frame 2
stop();
Symbol 1681 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
exitmc.gotoAndStop(2);
}
on (rollOut) {
cursor.gotoAndStop("arrow");
exitmc.gotoAndStop(1);
prise = "";
}
on (release) {
playSound("shop_simple_click");
gotoAndPlay ("game");
}
Symbol 1698 MovieClip Frame 1
stop();
Symbol 1698 MovieClip Frame 2
stop();
Symbol 1698 MovieClip Frame 3
stop();
Symbol 1698 MovieClip Frame 4
stop();
Symbol 1701 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
armormc.gotoAndStop(2);
prise = shop.armor[Hero.armorLevel + 1];
}
on (rollOut) {
cursor.gotoAndStop("arrow");
armormc.gotoAndStop(1);
prise = "";
}
on (press) {
playSound("shop_simple_click");
}
on (release) {
playSound("mouseclick");
if (Hero.moneyLevel >= shop.armor[Hero.armorLevel + 1]) {
Hero.armorLevel = Hero.armorLevel + 1;
Hero.moneyLevel = Hero.moneyLevel - shop.armor[Hero.armorLevel];
prise = shop.armor[Hero.armorLevel + 1];
if (Hero.armorLevel == armorLevelmax) {
ba.enabled = false;
prise = "";
cursor.gotoAndStop("arrow");
armormc.gotoAndStop(3);
}
ua.blick.gotoAndStop("play");
_root.playSound("shop_click_buy");
} else {
_root.playSound("shop_buy_failed");
}
}
Symbol 1708 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
weapon1mc.gotoAndStop(2);
prise = shop.weapon1[Hero.weaponLevel1 + 1];
}
on (rollOut) {
cursor.gotoAndStop("arrow");
weapon1mc.gotoAndStop(1);
prise = "";
}
on (press) {
playSound("shop_simple_click");
}
on (release) {
if (Hero.moneyLevel >= shop.weapon1[Hero.weaponLevel1 + 1]) {
Hero.weaponLevel1 = Hero.weaponLevel1 + 1;
Hero.moneyLevel = Hero.moneyLevel - shop.weapon1[Hero.weaponLevel1];
prise = shop.weapon1[Hero.weaponLevel1 + 1];
if (Hero.weaponLevel1 == weaponLevelmax1) {
bw1.enabled = false;
prise = "";
cursor.gotoAndStop("arrow");
weapon1mc.gotoAndStop(3);
}
uw1.blick.gotoAndStop("play");
_root.playSound("shop_click_buy");
} else {
_root.playSound("shop_buy_failed");
}
}
Symbol 1717 MovieClip Frame 1
stop();
Symbol 1717 MovieClip Frame 2
stop();
Symbol 1717 MovieClip Frame 3
stop();
Symbol 1717 MovieClip Frame 4
stop();
Symbol 1728 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
gotoAndPlay ("mainmenuplay");
}
Symbol 1739 Button
on (rollOver) {
cursor.gotoAndPlay("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
getURL ("http://www.enkord.com/", "_blank");
}
Symbol 1746 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
restartLevel();
}
Symbol 1752 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
gotoAndPlay ("mainmenuplay");
}
Symbol 1757 Button
on (rollOver) {
_root.cursor.gotoAndStop("hand");
_root.playSound("shop_mouse_over");
}
on (rollOut) {
_root.cursor.gotoAndStop("arrow");
}
on (release) {
_root.playSound("shop_simple_click");
var strOut = ((playerName.text + "|") + valScore);
var strOut2 = _root.EncrpytString(strOut);
getURL ("http://www.arcadetown.com/zombiestorm/hs.asp?" + strOut2, "_blank");
_parent.submit._visible = false;
_root.submited = true;
}
Symbol 1765 MovieClip Frame 1
if ((!flag) && (playerName.text.length)) {
sub.enabled = true;
flag = true;
}
Symbol 1770 MovieClip Frame 1
if ((!flag) && (playerName.text.length)) {
sub.enabled = true;
flag = true;
}
Symbol 1781 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
i++;
gotoAndPlay("instructions" + i);
}
Symbol 1783 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("shop_mouse_over");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("shop_simple_click");
i--;
gotoAndPlay("instructions" + i);
}
Symbol 1805 Button
on (rollOver) {
cursor.gotoAndStop("hand");
playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndStop("arrow");
}
on (release) {
playSound("mouseclick");
gotoAndPlay ("instructions2");
}