Frame 1
function MD5(string) {
function RotateLeft(lValue, iShiftBits) {
return((lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)));
}
function AddUnsigned(lX, lY) {
var _local5;
var _local4;
var _local3;
var _local2;
var _local1;
_local3 = lX & 2147483648;
_local2 = lY & 2147483648;
_local5 = lX & 1073741824;
_local4 = lY & 1073741824;
_local1 = (lX & 1073741823) + (lY & 1073741823);
if (_local5 & _local4) {
return(((_local1 ^ 2147483648) ^ _local3) ^ _local2);
}
if (_local5 | _local4) {
if (_local1 & 1073741824) {
return(((_local1 ^ 3221225472) ^ _local3) ^ _local2);
}
return(((_local1 ^ 1073741824) ^ _local3) ^ _local2);
}
return((_local1 ^ _local3) ^ _local2);
}
function F(x, y, z) {
return((x & y) | ((~x) & z));
}
function G(x, y, z) {
return((x & z) | (y & (~z)));
}
function H(x, y, z) {
return((x ^ y) ^ z);
}
function I(x, y, z) {
return(y ^ (x | (~z)));
}
function FF(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function GG(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function HH(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function II(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function ConvertToWordArray(string) {
var _local2;
var _local5 = string.length;
var _local8 = _local5 + 8;
var _local9 = (_local8 - (_local8 % 64)) / 64;
var _local7 = (_local9 + 1) * 16;
var _local3 = Array(_local7 - 1);
var _local4 = 0;
var _local1 = 0;
while (_local1 < _local5) {
_local2 = (_local1 - (_local1 % 4)) / 4;
_local4 = (_local1 % 4) * 8;
_local3[_local2] = _local3[_local2] | (string.charCodeAt(_local1) << _local4);
_local1++;
}
_local2 = (_local1 - (_local1 % 4)) / 4;
_local4 = (_local1 % 4) * 8;
_local3[_local2] = _local3[_local2] | (128 << _local4);
_local3[_local7 - 2] = _local5 << 3;
_local3[_local7 - 1] = _local5 >>> 29;
return(_local3);
}
function WordToHex(lValue) {
var _local3 = "";
var _local2 = "";
var _local4;
var _local1;
_local1 = 0;
while (_local1 <= 3) {
_local4 = (lValue >>> (_local1 * 8)) & 255;
_local2 = "0" + _local4.toString(16);
_local3 = _local3 + _local2.substr(_local2.length - 2, 2);
_local1++;
}
return(_local3);
}
function Utf8Encode(string) {
var _local2 = "";
var _local3 = 0;
while (_local3 < string.length) {
var _local1 = string.charCodeAt(_local3);
if (_local1 < 128) {
_local2 = _local2 + String.fromCharCode(_local1);
} else if ((_local1 > 127) && (_local1 < 2048)) {
_local2 = _local2 + String.fromCharCode((_local1 >> 6) | 192);
_local2 = _local2 + String.fromCharCode((_local1 & 63) | 128);
} else {
_local2 = _local2 + String.fromCharCode((_local1 >> 12) | 224);
_local2 = _local2 + String.fromCharCode(((_local1 >> 6) & 63) | 128);
_local2 = _local2 + String.fromCharCode((_local1 & 63) | 128);
}
_local3++;
}
return(_local2);
}
var _local6 = Array();
var _local5;
var _local35;
var _local36;
var _local37;
var _local34;
var _local4;
var _local3;
var _local2;
var _local1;
var _local21 = 7;
var _local19 = 12;
var _local16 = 17;
var _local13 = 22;
var _local20 = 5;
var _local17 = 9;
var _local14 = 14;
var _local11 = 20;
var _local18 = 4;
var _local15 = 11;
var _local12 = 16;
var _local10 = 23;
var _local25 = 6;
var _local24 = 10;
var _local23 = 15;
var _local22 = 21;
string = Utf8Encode(string);
_local6 = ConvertToWordArray(string);
_local4 = 1732584193 /* 0x67452301 */;
_local3 = 4023233417;
_local2 = 2562383102;
_local1 = 271733878 /* 0x10325476 */;
_local5 = 0;
while (_local5 < _local6.length) {
_local35 = _local4;
_local36 = _local3;
_local37 = _local2;
_local34 = _local1;
_local4 = FF(_local4, _local3, _local2, _local1, _local6[_local5 + 0], _local21, 3614090360);
_local1 = FF(_local1, _local4, _local3, _local2, _local6[_local5 + 1], _local19, 3905402710);
_local2 = FF(_local2, _local1, _local4, _local3, _local6[_local5 + 2], _local16, 606105819);
_local3 = FF(_local3, _local2, _local1, _local4, _local6[_local5 + 3], _local13, 3250441966);
_local4 = FF(_local4, _local3, _local2, _local1, _local6[_local5 + 4], _local21, 4118548399);
_local1 = FF(_local1, _local4, _local3, _local2, _local6[_local5 + 5], _local19, 1200080426);
_local2 = FF(_local2, _local1, _local4, _local3, _local6[_local5 + 6], _local16, 2821735955);
_local3 = FF(_local3, _local2, _local1, _local4, _local6[_local5 + 7], _local13, 4249261313);
_local4 = FF(_local4, _local3, _local2, _local1, _local6[_local5 + 8], _local21, 1770035416);
_local1 = FF(_local1, _local4, _local3, _local2, _local6[_local5 + 9], _local19, 2336552879);
_local2 = FF(_local2, _local1, _local4, _local3, _local6[_local5 + 10], _local16, 4294925233);
_local3 = FF(_local3, _local2, _local1, _local4, _local6[_local5 + 11], _local13, 2304563134);
_local4 = FF(_local4, _local3, _local2, _local1, _local6[_local5 + 12], _local21, 1804603682);
_local1 = FF(_local1, _local4, _local3, _local2, _local6[_local5 + 13], _local19, 4254626195);
_local2 = FF(_local2, _local1, _local4, _local3, _local6[_local5 + 14], _local16, 2792965006);
_local3 = FF(_local3, _local2, _local1, _local4, _local6[_local5 + 15], _local13, 1236535329);
_local4 = GG(_local4, _local3, _local2, _local1, _local6[_local5 + 1], _local20, 4129170786);
_local1 = GG(_local1, _local4, _local3, _local2, _local6[_local5 + 6], _local17, 3225465664);
_local2 = GG(_local2, _local1, _local4, _local3, _local6[_local5 + 11], _local14, 643717713);
_local3 = GG(_local3, _local2, _local1, _local4, _local6[_local5 + 0], _local11, 3921069994);
_local4 = GG(_local4, _local3, _local2, _local1, _local6[_local5 + 5], _local20, 3593408605);
_local1 = GG(_local1, _local4, _local3, _local2, _local6[_local5 + 10], _local17, 38016083);
_local2 = GG(_local2, _local1, _local4, _local3, _local6[_local5 + 15], _local14, 3634488961);
_local3 = GG(_local3, _local2, _local1, _local4, _local6[_local5 + 4], _local11, 3889429448);
_local4 = GG(_local4, _local3, _local2, _local1, _local6[_local5 + 9], _local20, 568446438);
_local1 = GG(_local1, _local4, _local3, _local2, _local6[_local5 + 14], _local17, 3275163606);
_local2 = GG(_local2, _local1, _local4, _local3, _local6[_local5 + 3], _local14, 4107603335);
_local3 = GG(_local3, _local2, _local1, _local4, _local6[_local5 + 8], _local11, 1163531501);
_local4 = GG(_local4, _local3, _local2, _local1, _local6[_local5 + 13], _local20, 2850285829);
_local1 = GG(_local1, _local4, _local3, _local2, _local6[_local5 + 2], _local17, 4243563512);
_local2 = GG(_local2, _local1, _local4, _local3, _local6[_local5 + 7], _local14, 1735328473);
_local3 = GG(_local3, _local2, _local1, _local4, _local6[_local5 + 12], _local11, 2368359562);
_local4 = HH(_local4, _local3, _local2, _local1, _local6[_local5 + 5], _local18, 4294588738);
_local1 = HH(_local1, _local4, _local3, _local2, _local6[_local5 + 8], _local15, 2272392833);
_local2 = HH(_local2, _local1, _local4, _local3, _local6[_local5 + 11], _local12, 1839030562);
_local3 = HH(_local3, _local2, _local1, _local4, _local6[_local5 + 14], _local10, 4259657740);
_local4 = HH(_local4, _local3, _local2, _local1, _local6[_local5 + 1], _local18, 2763975236);
_local1 = HH(_local1, _local4, _local3, _local2, _local6[_local5 + 4], _local15, 1272893353);
_local2 = HH(_local2, _local1, _local4, _local3, _local6[_local5 + 7], _local12, 4139469664);
_local3 = HH(_local3, _local2, _local1, _local4, _local6[_local5 + 10], _local10, 3200236656);
_local4 = HH(_local4, _local3, _local2, _local1, _local6[_local5 + 13], _local18, 681279174);
_local1 = HH(_local1, _local4, _local3, _local2, _local6[_local5 + 0], _local15, 3936430074);
_local2 = HH(_local2, _local1, _local4, _local3, _local6[_local5 + 3], _local12, 3572445317);
_local3 = HH(_local3, _local2, _local1, _local4, _local6[_local5 + 6], _local10, 76029189);
_local4 = HH(_local4, _local3, _local2, _local1, _local6[_local5 + 9], _local18, 3654602809);
_local1 = HH(_local1, _local4, _local3, _local2, _local6[_local5 + 12], _local15, 3873151461);
_local2 = HH(_local2, _local1, _local4, _local3, _local6[_local5 + 15], _local12, 530742520);
_local3 = HH(_local3, _local2, _local1, _local4, _local6[_local5 + 2], _local10, 3299628645);
_local4 = II(_local4, _local3, _local2, _local1, _local6[_local5 + 0], _local25, 4096336452);
_local1 = II(_local1, _local4, _local3, _local2, _local6[_local5 + 7], _local24, 1126891415);
_local2 = II(_local2, _local1, _local4, _local3, _local6[_local5 + 14], _local23, 2878612391);
_local3 = II(_local3, _local2, _local1, _local4, _local6[_local5 + 5], _local22, 4237533241);
_local4 = II(_local4, _local3, _local2, _local1, _local6[_local5 + 12], _local25, 1700485571);
_local1 = II(_local1, _local4, _local3, _local2, _local6[_local5 + 3], _local24, 2399980690);
_local2 = II(_local2, _local1, _local4, _local3, _local6[_local5 + 10], _local23, 4293915773);
_local3 = II(_local3, _local2, _local1, _local4, _local6[_local5 + 1], _local22, 2240044497);
_local4 = II(_local4, _local3, _local2, _local1, _local6[_local5 + 8], _local25, 1873313359);
_local1 = II(_local1, _local4, _local3, _local2, _local6[_local5 + 15], _local24, 4264355552);
_local2 = II(_local2, _local1, _local4, _local3, _local6[_local5 + 6], _local23, 2734768916);
_local3 = II(_local3, _local2, _local1, _local4, _local6[_local5 + 13], _local22, 1309151649);
_local4 = II(_local4, _local3, _local2, _local1, _local6[_local5 + 4], _local25, 4149444226);
_local1 = II(_local1, _local4, _local3, _local2, _local6[_local5 + 11], _local24, 3174756917);
_local2 = II(_local2, _local1, _local4, _local3, _local6[_local5 + 2], _local23, 718787259);
_local3 = II(_local3, _local2, _local1, _local4, _local6[_local5 + 9], _local22, 3951481745);
_local4 = AddUnsigned(_local4, _local35);
_local3 = AddUnsigned(_local3, _local36);
_local2 = AddUnsigned(_local2, _local37);
_local1 = AddUnsigned(_local1, _local34);
_local5 = _local5 + 16;
}
var _local46 = ((WordToHex(_local4) + WordToHex(_local3)) + WordToHex(_local2)) + WordToHex(_local1);
return(_local46.toLowerCase());
}
function getGoldFromChallange(idChallange) {
var myXML = new XML();
myXML.ignoreWhite = true;
myXML.load("http://belugerinstudios.com/data/data.php?act=getGoldFromId&challangeid=" + idChallange);
myXML.onLoad = function (success) {
nodeResult = myXML.firstChild.childNodes[0].firstChild.nodeValue;
_root.icoba.gaingold.value = ("You Gain: " + nodeResult) + " golds.";
_root.icoba.curgold.value = Number(_root.icoba.curgold.value) + Number(nodeResult);
_root.icoba.gold = Number(_root.icoba.gold) + Number(nodeResult);
trace("test:" + nodeResult);
};
}
function scoreHTTPSender(gameid, challangeid) {
function fadeIn() {
_root.icoba._alpha = _root.icoba._alpha + 2;
trace("ALPHA : " + _root.icoba._alpha);
if (_root.icoba._alpha >= 150) {
clearInterval(fadeInInterval);
}
}
createEmptyMovieClip("icoba", _root.getNextHighestDepth() + 123456);
createEmptyMovieClip("form", _root.getNextHighestDepth() + 123457);
form.createTextField("gold", 1, -100, -100);
var myXML = new XML();
myXML.ignoreWhite = true;
myXML.load((("http://belugerinstudios.com/data/data.php?gameid=" + gameid) + "&challangeid=") + challangeid);
myXML.onLoad = function (success) {
if (success) {
_root.debugger1 = "Debugger Running test on...: " + myXML.firstChild.childNodes[3].firstChild.nodeValue;
if (myXML.firstChild.childNodes[3].firstChild.nodeValue == undefined) {
_root.debugger1 = (((("Debugger failing: " + gameid) + "|") + challangeid) + "|") + myXML.firstChild.childNodes[3].firstChild.nodeValue;
} else if (myXML.firstChild.childNodes[4].firstChild.nodeValue == "false") {
_root.debugger1 = "Debugger Running then loading...";
_root.debugger2 = (("Loading movie: http://belugerinstudios.com/games/flash/demo4banner.swf?GET_gameid=" + gameid) + "&GET_challangeid=") + challangeid;
loadMovie ((("http://belugerinstudios.com/games/flash/demo4banner.swf?GET_gameid=" + gameid) + "&GET_challangeid=") + challangeid, _root.icoba);
icoba._x = (Stage.width / 2) - 250;
icoba._y = (Stage.height / 2) - 170;
trace("width: " + _root.icoba._width);
_root.icoba._alpha = 1;
trace("ALPHA : " + _root.icoba._alpha);
fadeInInterval = setInterval(fadeIn, 1);
}
}
};
myDate = new Date();
token = "belugerinstudios.com";
trace(gameid + token);
trace(MD5(gameid + token));
_root.form.gold.value = challangeid;
_root.form.loadVariables((((("http://belugerinstudios.com/action.php?action=score&gameid=" + gameid) + "&challangeid=") + challangeid) + "&token=") + MD5(gameid + token), "POST");
getGoldFromChallange(challangeid);
}
function initAwal() {
modelBackground = new Array(1, 1, 6, 12, 3, 6, 3, 4, 5, 6, 7, 9, 8, 10, 3, 10, 12, 5, 1, 3, 4, 6, 7, 1, 12, 9, 8, 9, 10, 7, 4, 2, 3, 1, 8, 6, 7, 9, 12, 11, 11, 1, 2, 5, 4, 3, 7, 9, 8, 2, 5, 9, 10, 3, 6, 4, 7, 8, 9, 12, 5, 11, 8, 7, 9, 2, 12, 11, 8, 1, 4, 9, 7, 12, 11, 12, 8, 6, 5, 3, 7, 8, 1, 8, 9, 12, 12, 5, 3, 2, 6, 7, 8, 9, 10, 6, 1);
i = 0;
while (i <= 96) {
_root["milik" + i] = 0;
_root["people" + i] = 0;
_root["worker" + i] = 0;
_root["soldier" + i] = 0;
_root["xfood" + i] = 9000 + (100 * random(15));
_root["xgold" + i] = 7000 + (75 * random(7));
_root["xwood" + i] = 3000 + (50 * random(5));
_root["xiron" + i] = 1800 + (25 * random(3));
_root["xclay" + i] = 1200 + (25 * random(3));
_root["xfood" + i] = Math.ceil(_root["xfood" + i] * 0.75);
_root["xgold" + i] = Math.ceil(_root["xgold" + i] * 0.75);
_root["xwood" + i] = Math.ceil(_root["xwood" + i] * 0.75);
_root["xiron" + i] = Math.ceil(_root["xiron" + i] * 0.75);
_root["xclay" + i] = Math.ceil(_root["xclay" + i] * 0.75);
_root["sword" + i] = 0;
_root["axe" + i] = 0;
_root["bow" + i] = 0;
_root["spear" + i] = 0;
_root["horse" + i] = 0;
_root["catapult" + i] = 0;
_root["xcatapult" + i] = 0;
_root["produksiSword" + i] = 1;
_root["produksiAxe" + i] = 0;
_root["produksiSpear" + i] = 0;
_root["produksiBow" + i] = 0;
_root["jenisBackgron" + i] = modelBackground[i];
_root["senjataBisa1" + i] = 1;
_root["senjataBisa2" + i] = 0;
_root["senjataBisa3" + i] = 0;
_root["senjataBisa4" + i] = 0;
i++;
}
i = 1;
while (i <= 12) {
_root["wfood" + i] = 2;
_root["wgold" + i] = 2;
_root["wwood" + i] = 2;
_root["wiron" + i] = 2;
_root["wclay" + i] = 2;
i++;
}
namaKingdoms0 = "Free Land";
namaKingdoms1 = "Artavera";
namaKingdoms2 = "Zargaz";
namaKingdoms3 = "Imperua";
namaKingdoms4 = "Rades";
namaKingdoms5 = "Jugaer";
namaKingdoms6 = "Halymuza";
namaKingdoms7 = "Garages";
namaKingdoms8 = "Fartazesa";
namaKingdoms9 = "Karagta";
namaKingdoms10 = "Wizaraz";
namaKingdoms11 = "Bugandeas";
namaKingdoms12 = "Caracatz";
days = 1;
menit = 0;
jam = 0;
ambilWilayah = 0;
menujuKe = 0;
jumlahLawan = 1;
jenisPerintah = "";
jenisUpgrade1 = false;
jenisUpgrade2 = false;
jenisUpgrade3 = false;
jenisUpgrade4 = false;
jenisUpgrade5 = false;
asalUsul = undefined;
jenisKotak = new Array();
upgradeKotak = new Array();
i = 0;
while (i <= 96) {
jenisKotak[i] = new Array();
upgradeKotak[i] = new Array();
j = 1;
while (j <= 100) {
rand = random(3);
if (rand == 0) {
jenisKotak[i][j] = random(6) + 15;
} else {
jenisKotak[i][j] = 0;
}
upgradeKotak[i][j] = 1;
j++;
}
i++;
}
gakBisaKotak1 = new Array(45, 46, 55, 56);
gakBisaKotak2 = new Array(35, 44, 45, 46, 47, 54, 55, 56, 57, 64, 65);
gakBisaKotak3 = new Array(1, 2, 11, 12, 54, 55, 64, 65, 89, 90, 99, 100, 9, 10, 19, 20);
gakBisaKotak4 = new Array(1, 2, 3, 11, 12, 13, 21, 22, 23, 8, 9, 10, 18, 19, 20, 28, 29, 30, 72, 73, 82, 83, 79, 80, 88, 89, 90, 99, 100);
gakBisaKotak5 = new Array(5, 15, 25, 35, 45, 54, 55, 65, 64, 75, 85, 95, 86, 96, 74);
gakBisaKotak6 = new Array(51, 61, 42, 52, 62, 43, 53, 44, 54, 45, 55, 46, 56, 47, 57, 48, 58, 49, 59, 50, 60);
gakBisaKotak7 = new Array(51, 61, 52, 62, 53, 63, 73, 44, 54, 64, 35, 45, 55, 36, 46, 56, 37, 47, 38, 48, 39, 49, 40, 50);
gakBisaKotak8 = new Array(3, 4, 5, 13, 14, 15, 23, 24, 25, 34, 35, 44, 45, 54, 55, 56, 65, 66, 75, 76, 77, 86, 87, 88, 89, 97, 98, 99, 100);
gakBisaKotak9 = new Array(31, 32, 33, 34, 15, 16, 17, 18, 7, 6, 25, 26, 27, 28, 35, 36, 37, 38, 44, 45, 46, 47, 48, 52, 53, 54, 55, 56, 57, 63, 64, 65, 66, 67, 74, 75, 76, 77, 78, 85, 86, 87);
gakBisaKotak10 = new Array(1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 17, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 45, 46, 51, 52, 53, 54, 55, 56, 57, 62, 63, 65, 66);
gakBisaKotak11 = new Array(3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 17, 18, 19, 20, 24, 25, 26, 27, 28, 29, 30, 34, 35, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48, 49, 50, 54, 55, 56, 57, 58, 59, 65, 66, 67);
gakBisaKotak12 = new Array(1, 11, 12, 21, 22, 23, 31, 32, 33, 34, 43, 44, 53, 54, 55, 56, 57, 58, 59, 60, 64, 65, 67, 68, 69, 70, 74, 75, 78, 79, 80, 85, 86, 87, 88, 89, 90, 94, 95, 96, 97, 98, 99, 100, 61, 71, 72, 62, 73, 81, 82, 83, 84, 91, 92, 93);
i = 0;
while (i <= 96) {
if (_root["jenisBackgron" + i] == 1) {
j = 0;
while (j <= gakBisaKotak1.length) {
jenisKotak[i][gakBisaKotak1[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 2) {
j = 0;
while (j <= gakBisaKotak2.length) {
jenisKotak[i][gakBisaKotak2[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 3) {
j = 0;
while (j <= gakBisaKotak3.length) {
jenisKotak[i][gakBisaKotak3[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 4) {
j = 0;
while (j <= gakBisaKotak4.length) {
jenisKotak[i][gakBisaKotak4[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 5) {
j = 0;
while (j <= gakBisaKotak5.length) {
jenisKotak[i][gakBisaKotak5[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 6) {
j = 0;
while (j <= gakBisaKotak6.length) {
jenisKotak[i][gakBisaKotak6[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 7) {
j = 0;
while (j <= gakBisaKotak7.length) {
jenisKotak[i][gakBisaKotak7[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 8) {
j = 0;
while (j <= gakBisaKotak8.length) {
jenisKotak[i][gakBisaKotak8[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 9) {
j = 0;
while (j <= gakBisaKotak9.length) {
jenisKotak[i][gakBisaKotak9[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 10) {
j = 0;
while (j <= gakBisaKotak10.length) {
jenisKotak[i][gakBisaKotak10[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 11) {
j = 0;
while (j <= gakBisaKotak11.length) {
jenisKotak[i][gakBisaKotak11[j]] = 99;
j++;
}
} else if (_root["jenisBackgron" + i] == 12) {
j = 0;
while (j <= gakBisaKotak12.length) {
jenisKotak[i][gakBisaKotak12[j]] = 99;
j++;
}
}
i++;
}
}
function initStatistik() {
medal11 = false;
medal12 = false;
medal13 = false;
medal14 = false;
medal15 = false;
medal16 = false;
medal17 = false;
medal18 = false;
medal19 = false;
medal110 = false;
medal21 = false;
medal22 = false;
medal23 = false;
medal24 = false;
medal25 = false;
medal26 = false;
medal27 = false;
medal28 = false;
medal29 = false;
medal210 = false;
medal31 = false;
medal32 = false;
medal33 = false;
medal34 = false;
medal35 = false;
medal36 = false;
medal37 = false;
medal38 = false;
medal39 = false;
medal310 = false;
medal311 = false;
totalKilled = 0;
totalWin1 = 0;
swordMati1 = 0;
spearMati1 = 0;
bowMati1 = 0;
axeMati1 = 0;
horseMati1 = 0;
catapultMati1 = 0;
totalWin2 = 0;
swordMati2 = 0;
spearMati2 = 0;
bowMati2 = 0;
axeMati2 = 0;
horseMati2 = 0;
catapultMati2 = 0;
}
function simpanData() {
i = 1;
while (i <= 12) {
_root["imperium2" + i] = String("dataimperium2" + i);
Cookies = SharedObject.getLocal(_root["imperium2" + i], "/");
Cookies.data["eeimperium2" + i] = _root["wfood" + i];
Cookies.flush();
_root["imperium3" + i] = String("dataimperium3" + i);
Cookies = SharedObject.getLocal(_root["imperium3" + i], "/");
Cookies.data["eeimperium3" + i] = _root["wgold" + i];
Cookies.flush();
_root["imperium4" + i] = String("dataimperium4" + i);
Cookies = SharedObject.getLocal(_root["imperium4" + i], "/");
Cookies.data["eeimperium4" + i] = _root["wwood" + i];
Cookies.flush();
_root["imperium5" + i] = String("dataimperium5" + i);
Cookies = SharedObject.getLocal(_root["imperium5" + i], "/");
Cookies.data["eeimperium5" + i] = _root["wiron" + i];
Cookies.flush();
_root["imperium6" + i] = String("dataimperium6" + i);
Cookies = SharedObject.getLocal(_root["imperium6" + i], "/");
Cookies.data["eeimperium6" + i] = _root["wclay" + i];
Cookies.flush();
i++;
}
i = 0;
while (i <= 96) {
_root["imperium1" + i] = String("dataimperium1" + i);
Cookies = SharedObject.getLocal(_root["imperium1" + i], "/");
Cookies.data["eeimperium0x" + i] = eval (simpanSemua[i]);
Cookies.data[("eeimperium1" + i) + 1] = _root["milik" + i];
Cookies.data[("eeimperium1" + i) + 2] = _root["people" + i];
Cookies.data[("eeimperium1" + i) + 3] = _root["worker" + i];
Cookies.data[("eeimperium1" + i) + 4] = _root["soldier" + i];
Cookies.data[("eeimperium1" + i) + 5] = _root["xfood" + i];
Cookies.data[("eeimperium1" + i) + 6] = _root["xgold" + i];
Cookies.data[("eeimperium1" + i) + 7] = _root["xwood" + i];
Cookies.data[("eeimperium1" + i) + 8] = _root["xiron" + i];
Cookies.data[("eeimperium1" + i) + 9] = _root["xclay" + i];
Cookies.data[("eeimperium1" + i) + 10] = _root["sword" + i];
Cookies.data[("eeimperium1" + i) + 11] = _root["axe" + i];
Cookies.data[("eeimperium1" + i) + 12] = _root["bow" + i];
Cookies.data[("eeimperium1" + i) + 13] = _root["spear" + i];
Cookies.data[("eeimperium1" + i) + 14] = _root["horse" + i];
Cookies.data[("eeimperium1" + i) + 15] = _root["catapult" + i];
Cookies.data[("eeimperium1" + i) + 16] = _root["xcatapult" + i];
Cookies.data[("eeimperium1" + i) + 17] = _root["produksiSword" + i];
Cookies.data[("eeimperium1" + i) + 18] = _root["produksiAxe" + i];
Cookies.data[("eeimperium1" + i) + 19] = _root["produksiSpear" + i];
Cookies.data[("eeimperium1" + i) + 20] = _root["produksiBow" + i];
Cookies.data[("xeeimperium1" + i) + 20] = _root["jenisBackgron" + i];
Cookies.data[("eeimperium1" + i) + 21] = jenisKotak[i][1];
Cookies.data[("eeimperium1" + i) + 22] = jenisKotak[i][2];
Cookies.data[("eeimperium1" + i) + 23] = jenisKotak[i][3];
Cookies.data[("eeimperium1" + i) + 24] = jenisKotak[i][4];
Cookies.data[("eeimperium1" + i) + 25] = jenisKotak[i][5];
Cookies.data[("eeimperium1" + i) + 26] = jenisKotak[i][6];
Cookies.data[("eeimperium1" + i) + 27] = jenisKotak[i][7];
Cookies.data[("eeimperium1" + i) + 28] = jenisKotak[i][8];
Cookies.data[("eeimperium1" + i) + 29] = jenisKotak[i][9];
Cookies.data[("eeimperium1" + i) + 30] = jenisKotak[i][10];
Cookies.data[("eeimperium1" + i) + 31] = jenisKotak[i][11];
Cookies.data[("eeimperium1" + i) + 32] = jenisKotak[i][12];
Cookies.data[("eeimperium1" + i) + 33] = jenisKotak[i][13];
Cookies.data[("eeimperium1" + i) + 34] = jenisKotak[i][14];
Cookies.data[("eeimperium1" + i) + 35] = jenisKotak[i][15];
Cookies.data[("eeimperium1" + i) + 36] = jenisKotak[i][16];
Cookies.data[("eeimperium1" + i) + 37] = jenisKotak[i][17];
Cookies.data[("eeimperium1" + i) + 38] = jenisKotak[i][18];
Cookies.data[("eeimperium1" + i) + 39] = jenisKotak[i][19];
Cookies.data[("eeimperium1" + i) + 40] = jenisKotak[i][20];
Cookies.data[("eeimperium1" + i) + 41] = jenisKotak[i][21];
Cookies.data[("eeimperium1" + i) + 42] = jenisKotak[i][22];
Cookies.data[("eeimperium1" + i) + 43] = jenisKotak[i][23];
Cookies.data[("eeimperium1" + i) + 44] = jenisKotak[i][24];
Cookies.data[("eeimperium1" + i) + 45] = jenisKotak[i][25];
Cookies.data[("eeimperium1" + i) + 46] = jenisKotak[i][26];
Cookies.data[("eeimperium1" + i) + 47] = jenisKotak[i][27];
Cookies.data[("eeimperium1" + i) + 48] = jenisKotak[i][28];
Cookies.data[("eeimperium1" + i) + 49] = jenisKotak[i][29];
Cookies.data[("eeimperium1" + i) + 50] = jenisKotak[i][30];
Cookies.data[("eeimperium1" + i) + 51] = jenisKotak[i][31];
Cookies.data[("eeimperium1" + i) + 52] = jenisKotak[i][32];
Cookies.data[("eeimperium1" + i) + 53] = jenisKotak[i][33];
Cookies.data[("eeimperium1" + i) + 54] = jenisKotak[i][34];
Cookies.data[("eeimperium1" + i) + 55] = jenisKotak[i][35];
Cookies.data[("eeimperium1" + i) + 56] = jenisKotak[i][36];
Cookies.data[("eeimperium1" + i) + 57] = jenisKotak[i][37];
Cookies.data[("eeimperium1" + i) + 58] = jenisKotak[i][38];
Cookies.data[("eeimperium1" + i) + 59] = jenisKotak[i][39];
Cookies.data[("eeimperium1" + i) + 60] = jenisKotak[i][40];
Cookies.data[("eeimperium1" + i) + 61] = jenisKotak[i][41];
Cookies.data[("eeimperium1" + i) + 62] = jenisKotak[i][42];
Cookies.data[("eeimperium1" + i) + 63] = jenisKotak[i][43];
Cookies.data[("eeimperium1" + i) + 64] = jenisKotak[i][44];
Cookies.data[("eeimperium1" + i) + 65] = jenisKotak[i][45];
Cookies.data[("eeimperium1" + i) + 66] = jenisKotak[i][46];
Cookies.data[("eeimperium1" + i) + 67] = jenisKotak[i][47];
Cookies.data[("eeimperium1" + i) + 68] = jenisKotak[i][48];
Cookies.data[("eeimperium1" + i) + 69] = jenisKotak[i][49];
Cookies.data[("eeimperium1" + i) + 70] = jenisKotak[i][50];
Cookies.data[("eeimperium1" + i) + 71] = jenisKotak[i][51];
Cookies.data[("eeimperium1" + i) + 72] = jenisKotak[i][52];
Cookies.data[("eeimperium1" + i) + 73] = jenisKotak[i][53];
Cookies.data[("eeimperium1" + i) + 74] = jenisKotak[i][54];
Cookies.data[("eeimperium1" + i) + 75] = jenisKotak[i][55];
Cookies.data[("eeimperium1" + i) + 76] = jenisKotak[i][56];
Cookies.data[("eeimperium1" + i) + 77] = jenisKotak[i][57];
Cookies.data[("eeimperium1" + i) + 78] = jenisKotak[i][58];
Cookies.data[("eeimperium1" + i) + 79] = jenisKotak[i][59];
Cookies.data[("eeimperium1" + i) + 80] = jenisKotak[i][60];
Cookies.data[("eeimperium1" + i) + 81] = jenisKotak[i][61];
Cookies.data[("eeimperium1" + i) + 82] = jenisKotak[i][62];
Cookies.data[("eeimperium1" + i) + 83] = jenisKotak[i][63];
Cookies.data[("eeimperium1" + i) + 84] = jenisKotak[i][64];
Cookies.data[("eeimperium1" + i) + 85] = jenisKotak[i][65];
Cookies.data[("eeimperium1" + i) + 86] = jenisKotak[i][66];
Cookies.data[("eeimperium1" + i) + 87] = jenisKotak[i][67];
Cookies.data[("eeimperium1" + i) + 88] = jenisKotak[i][68];
Cookies.data[("eeimperium1" + i) + 89] = jenisKotak[i][69];
Cookies.data[("eeimperium1" + i) + 90] = jenisKotak[i][70];
Cookies.data[("eeimperium1" + i) + 91] = jenisKotak[i][71];
Cookies.data[("eeimperium1" + i) + 92] = jenisKotak[i][72];
Cookies.data[("eeimperium1" + i) + 93] = jenisKotak[i][73];
Cookies.data[("eeimperium1" + i) + 94] = jenisKotak[i][74];
Cookies.data[("eeimperium1" + i) + 95] = jenisKotak[i][75];
Cookies.data[("eeimperium1" + i) + 96] = jenisKotak[i][76];
Cookies.data[("eeimperium1" + i) + 97] = jenisKotak[i][77];
Cookies.data[("eeimperium1" + i) + 98] = jenisKotak[i][78];
Cookies.data[("eeimperium1" + i) + 99] = jenisKotak[i][79];
Cookies.data[("eeimperium1" + i) + 100] = jenisKotak[i][80];
Cookies.data[("eeimperium1" + i) + 101] = jenisKotak[i][81];
Cookies.data[("eeimperium1" + i) + 102] = jenisKotak[i][82];
Cookies.data[("eeimperium1" + i) + 103] = jenisKotak[i][83];
Cookies.data[("eeimperium1" + i) + 104] = jenisKotak[i][84];
Cookies.data[("eeimperium1" + i) + 105] = jenisKotak[i][85];
Cookies.data[("eeimperium1" + i) + 106] = jenisKotak[i][86];
Cookies.data[("eeimperium1" + i) + 107] = jenisKotak[i][87];
Cookies.data[("eeimperium1" + i) + 108] = jenisKotak[i][88];
Cookies.data[("eeimperium1" + i) + 109] = jenisKotak[i][89];
Cookies.data[("eeimperium1" + i) + 110] = jenisKotak[i][90];
Cookies.data[("eeimperium1" + i) + 111] = jenisKotak[i][91];
Cookies.data[("eeimperium1" + i) + 112] = jenisKotak[i][92];
Cookies.data[("eeimperium1" + i) + 113] = jenisKotak[i][93];
Cookies.data[("eeimperium1" + i) + 114] = jenisKotak[i][94];
Cookies.data[("eeimperium1" + i) + 115] = jenisKotak[i][95];
Cookies.data[("eeimperium1" + i) + 116] = jenisKotak[i][96];
Cookies.data[("eeimperium1" + i) + 117] = jenisKotak[i][97];
Cookies.data[("eeimperium1" + i) + 118] = jenisKotak[i][98];
Cookies.data[("eeimperium1" + i) + 119] = jenisKotak[i][99];
Cookies.data[("eeimperium1" + i) + 120] = jenisKotak[i][100];
Cookies.data[("eeimperium2" + i) + 21] = upgradeKotak[i][1];
Cookies.data[("eeimperium2" + i) + 22] = upgradeKotak[i][2];
Cookies.data[("eeimperium2" + i) + 23] = upgradeKotak[i][3];
Cookies.data[("eeimperium2" + i) + 24] = upgradeKotak[i][4];
Cookies.data[("eeimperium2" + i) + 25] = upgradeKotak[i][5];
Cookies.data[("eeimperium2" + i) + 26] = upgradeKotak[i][6];
Cookies.data[("eeimperium2" + i) + 27] = upgradeKotak[i][7];
Cookies.data[("eeimperium2" + i) + 28] = upgradeKotak[i][8];
Cookies.data[("eeimperium2" + i) + 29] = upgradeKotak[i][9];
Cookies.data[("eeimperium2" + i) + 30] = upgradeKotak[i][10];
Cookies.data[("eeimperium2" + i) + 31] = upgradeKotak[i][11];
Cookies.data[("eeimperium2" + i) + 32] = upgradeKotak[i][12];
Cookies.data[("eeimperium2" + i) + 33] = upgradeKotak[i][13];
Cookies.data[("eeimperium2" + i) + 34] = upgradeKotak[i][14];
Cookies.data[("eeimperium2" + i) + 35] = upgradeKotak[i][15];
Cookies.data[("eeimperium2" + i) + 36] = upgradeKotak[i][16];
Cookies.data[("eeimperium2" + i) + 37] = upgradeKotak[i][17];
Cookies.data[("eeimperium2" + i) + 38] = upgradeKotak[i][18];
Cookies.data[("eeimperium2" + i) + 39] = upgradeKotak[i][19];
Cookies.data[("eeimperium2" + i) + 40] = upgradeKotak[i][20];
Cookies.data[("eeimperium2" + i) + 41] = upgradeKotak[i][21];
Cookies.data[("eeimperium2" + i) + 42] = upgradeKotak[i][22];
Cookies.data[("eeimperium2" + i) + 43] = upgradeKotak[i][23];
Cookies.data[("eeimperium2" + i) + 44] = upgradeKotak[i][24];
Cookies.data[("eeimperium2" + i) + 45] = upgradeKotak[i][25];
Cookies.data[("eeimperium2" + i) + 46] = upgradeKotak[i][26];
Cookies.data[("eeimperium2" + i) + 47] = upgradeKotak[i][27];
Cookies.data[("eeimperium2" + i) + 48] = upgradeKotak[i][28];
Cookies.data[("eeimperium2" + i) + 49] = upgradeKotak[i][29];
Cookies.data[("eeimperium2" + i) + 50] = upgradeKotak[i][30];
Cookies.data[("eeimperium2" + i) + 51] = upgradeKotak[i][31];
Cookies.data[("eeimperium2" + i) + 52] = upgradeKotak[i][32];
Cookies.data[("eeimperium2" + i) + 53] = upgradeKotak[i][33];
Cookies.data[("eeimperium2" + i) + 54] = upgradeKotak[i][34];
Cookies.data[("eeimperium2" + i) + 55] = upgradeKotak[i][35];
Cookies.data[("eeimperium2" + i) + 56] = upgradeKotak[i][36];
Cookies.data[("eeimperium2" + i) + 57] = upgradeKotak[i][37];
Cookies.data[("eeimperium2" + i) + 58] = upgradeKotak[i][38];
Cookies.data[("eeimperium2" + i) + 59] = upgradeKotak[i][39];
Cookies.data[("eeimperium2" + i) + 60] = upgradeKotak[i][40];
Cookies.data[("eeimperium2" + i) + 61] = upgradeKotak[i][41];
Cookies.data[("eeimperium2" + i) + 62] = upgradeKotak[i][42];
Cookies.data[("eeimperium2" + i) + 63] = upgradeKotak[i][43];
Cookies.data[("eeimperium2" + i) + 64] = upgradeKotak[i][44];
Cookies.data[("eeimperium2" + i) + 65] = upgradeKotak[i][45];
Cookies.data[("eeimperium2" + i) + 66] = upgradeKotak[i][46];
Cookies.data[("eeimperium2" + i) + 67] = upgradeKotak[i][47];
Cookies.data[("eeimperium2" + i) + 68] = upgradeKotak[i][48];
Cookies.data[("eeimperium2" + i) + 69] = upgradeKotak[i][49];
Cookies.data[("eeimperium2" + i) + 70] = upgradeKotak[i][50];
Cookies.data[("eeimperium2" + i) + 71] = upgradeKotak[i][51];
Cookies.data[("eeimperium2" + i) + 72] = upgradeKotak[i][52];
Cookies.data[("eeimperium2" + i) + 73] = upgradeKotak[i][53];
Cookies.data[("eeimperium2" + i) + 74] = upgradeKotak[i][54];
Cookies.data[("eeimperium2" + i) + 75] = upgradeKotak[i][55];
Cookies.data[("eeimperium2" + i) + 76] = upgradeKotak[i][56];
Cookies.data[("eeimperium2" + i) + 77] = upgradeKotak[i][57];
Cookies.data[("eeimperium2" + i) + 78] = upgradeKotak[i][58];
Cookies.data[("eeimperium2" + i) + 79] = upgradeKotak[i][59];
Cookies.data[("eeimperium2" + i) + 80] = upgradeKotak[i][60];
Cookies.data[("eeimperium2" + i) + 81] = upgradeKotak[i][61];
Cookies.data[("eeimperium2" + i) + 82] = upgradeKotak[i][62];
Cookies.data[("eeimperium2" + i) + 83] = upgradeKotak[i][63];
Cookies.data[("eeimperium2" + i) + 84] = upgradeKotak[i][64];
Cookies.data[("eeimperium2" + i) + 85] = upgradeKotak[i][65];
Cookies.data[("eeimperium2" + i) + 86] = upgradeKotak[i][66];
Cookies.data[("eeimperium2" + i) + 87] = upgradeKotak[i][67];
Cookies.data[("eeimperium2" + i) + 88] = upgradeKotak[i][68];
Cookies.data[("eeimperium2" + i) + 89] = upgradeKotak[i][69];
Cookies.data[("eeimperium2" + i) + 90] = upgradeKotak[i][70];
Cookies.data[("eeimperium2" + i) + 91] = upgradeKotak[i][71];
Cookies.data[("eeimperium2" + i) + 92] = upgradeKotak[i][72];
Cookies.data[("eeimperium2" + i) + 93] = upgradeKotak[i][73];
Cookies.data[("eeimperium2" + i) + 94] = upgradeKotak[i][74];
Cookies.data[("eeimperium2" + i) + 95] = upgradeKotak[i][75];
Cookies.data[("eeimperium2" + i) + 96] = upgradeKotak[i][76];
Cookies.data[("eeimperium2" + i) + 97] = upgradeKotak[i][77];
Cookies.data[("eeimperium2" + i) + 98] = upgradeKotak[i][78];
Cookies.data[("eeimperium2" + i) + 99] = upgradeKotak[i][79];
Cookies.data[("eeimperium2" + i) + 100] = upgradeKotak[i][80];
Cookies.data[("eeimperium2" + i) + 101] = upgradeKotak[i][81];
Cookies.data[("eeimperium2" + i) + 102] = upgradeKotak[i][82];
Cookies.data[("eeimperium2" + i) + 103] = upgradeKotak[i][83];
Cookies.data[("eeimperium2" + i) + 104] = upgradeKotak[i][84];
Cookies.data[("eeimperium2" + i) + 105] = upgradeKotak[i][85];
Cookies.data[("eeimperium2" + i) + 106] = upgradeKotak[i][86];
Cookies.data[("eeimperium2" + i) + 107] = upgradeKotak[i][87];
Cookies.data[("eeimperium2" + i) + 108] = upgradeKotak[i][88];
Cookies.data[("eeimperium2" + i) + 109] = upgradeKotak[i][89];
Cookies.data[("eeimperium2" + i) + 110] = upgradeKotak[i][90];
Cookies.data[("eeimperium2" + i) + 111] = upgradeKotak[i][91];
Cookies.data[("eeimperium2" + i) + 112] = upgradeKotak[i][92];
Cookies.data[("eeimperium2" + i) + 113] = upgradeKotak[i][93];
Cookies.data[("eeimperium2" + i) + 114] = upgradeKotak[i][94];
Cookies.data[("eeimperium2" + i) + 115] = upgradeKotak[i][95];
Cookies.data[("eeimperium2" + i) + 116] = upgradeKotak[i][96];
Cookies.data[("eeimperium2" + i) + 117] = upgradeKotak[i][97];
Cookies.data[("eeimperium2" + i) + 118] = upgradeKotak[i][98];
Cookies.data[("eeimperium2" + i) + 119] = upgradeKotak[i][99];
Cookies.data[("eeimperium2" + i) + 120] = upgradeKotak[i][100];
Cookies.flush();
i++;
}
}
function loadData() {
i = 1;
while (i <= 12) {
_root["imperium2" + i] = String("dataimperium2" + i);
Cookies = SharedObject.getLocal(_root["imperium2" + i], "/");
_root["wfood" + i] = Cookies.data["eeimperium2" + i];
_root["imperium3" + i] = String("dataimperium3" + i);
Cookies = SharedObject.getLocal(_root["imperium3" + i], "/");
_root["wgold" + i] = Cookies.data["eeimperium3" + i];
_root["imperium4" + i] = String("dataimperium4" + i);
Cookies = SharedObject.getLocal(_root["imperium4" + i], "/");
_root["wwood" + i] = Cookies.data["eeimperium4" + i];
_root["imperium5" + i] = String("dataimperium5" + i);
Cookies = SharedObject.getLocal(_root["imperium5" + i], "/");
_root["wiron" + i] = Cookies.data["eeimperium5" + i];
_root["imperium6" + i] = String("dataimperium6" + i);
Cookies = SharedObject.getLocal(_root["imperium6" + i], "/");
_root["wclay" + i] = Cookies.data["eeimperium6" + i];
i++;
}
i = 0;
while (i <= 96) {
_root["imperium1" + i] = String("dataimperium1" + i);
Cookies = SharedObject.getLocal(_root["imperium1" + i], "/");
_root[simpanSemua[i]] = Cookies.data["eeimperium0x" + i];
_root["milik" + i] = Cookies.data[("eeimperium1" + i) + 1];
_root["people" + i] = Cookies.data[("eeimperium1" + i) + 2];
_root["worker" + i] = Cookies.data[("eeimperium1" + i) + 3];
_root["soldier" + i] = Cookies.data[("eeimperium1" + i) + 4];
_root["xfood" + i] = Cookies.data[("eeimperium1" + i) + 5];
_root["xgold" + i] = Cookies.data[("eeimperium1" + i) + 6];
_root["xwood" + i] = Cookies.data[("eeimperium1" + i) + 7];
_root["xiron" + i] = Cookies.data[("eeimperium1" + i) + 8];
_root["xclay" + i] = Cookies.data[("eeimperium1" + i) + 9];
_root["sword" + i] = Cookies.data[("eeimperium1" + i) + 10];
_root["axe" + i] = Cookies.data[("eeimperium1" + i) + 11];
_root["bow" + i] = Cookies.data[("eeimperium1" + i) + 12];
_root["spear" + i] = Cookies.data[("eeimperium1" + i) + 13];
_root["horse" + i] = Cookies.data[("eeimperium1" + i) + 14];
_root["catapult" + i] = Cookies.data[("eeimperium1" + i) + 15];
_root["xcatapult" + i] = Cookies.data[("eeimperium1" + i) + 16];
_root["produksiSword" + i] = Cookies.data[("eeimperium1" + i) + 17];
_root["produksiAxe" + i] = Cookies.data[("eeimperium1" + i) + 18];
_root["produksiSpear" + i] = Cookies.data[("eeimperium1" + i) + 19];
_root["produksiBow" + i] = Cookies.data[("eeimperium1" + i) + 20];
_root["jenisBackgron" + i] = Cookies.data[("xeeimperium1" + i) + 20];
jenisKotak[i][1] = Cookies.data[("eeimperium1" + i) + 21];
jenisKotak[i][2] = Cookies.data[("eeimperium1" + i) + 22];
jenisKotak[i][3] = Cookies.data[("eeimperium1" + i) + 23];
jenisKotak[i][4] = Cookies.data[("eeimperium1" + i) + 24];
jenisKotak[i][5] = Cookies.data[("eeimperium1" + i) + 25];
jenisKotak[i][6] = Cookies.data[("eeimperium1" + i) + 26];
jenisKotak[i][7] = Cookies.data[("eeimperium1" + i) + 27];
jenisKotak[i][8] = Cookies.data[("eeimperium1" + i) + 28];
jenisKotak[i][9] = Cookies.data[("eeimperium1" + i) + 29];
jenisKotak[i][10] = Cookies.data[("eeimperium1" + i) + 30];
jenisKotak[i][11] = Cookies.data[("eeimperium1" + i) + 31];
jenisKotak[i][12] = Cookies.data[("eeimperium1" + i) + 32];
jenisKotak[i][13] = Cookies.data[("eeimperium1" + i) + 33];
jenisKotak[i][14] = Cookies.data[("eeimperium1" + i) + 34];
jenisKotak[i][15] = Cookies.data[("eeimperium1" + i) + 35];
jenisKotak[i][16] = Cookies.data[("eeimperium1" + i) + 36];
jenisKotak[i][17] = Cookies.data[("eeimperium1" + i) + 37];
jenisKotak[i][18] = Cookies.data[("eeimperium1" + i) + 38];
jenisKotak[i][19] = Cookies.data[("eeimperium1" + i) + 39];
jenisKotak[i][20] = Cookies.data[("eeimperium1" + i) + 40];
jenisKotak[i][21] = Cookies.data[("eeimperium1" + i) + 41];
jenisKotak[i][22] = Cookies.data[("eeimperium1" + i) + 42];
jenisKotak[i][23] = Cookies.data[("eeimperium1" + i) + 43];
jenisKotak[i][24] = Cookies.data[("eeimperium1" + i) + 44];
jenisKotak[i][25] = Cookies.data[("eeimperium1" + i) + 45];
jenisKotak[i][26] = Cookies.data[("eeimperium1" + i) + 46];
jenisKotak[i][27] = Cookies.data[("eeimperium1" + i) + 47];
jenisKotak[i][28] = Cookies.data[("eeimperium1" + i) + 48];
jenisKotak[i][29] = Cookies.data[("eeimperium1" + i) + 49];
jenisKotak[i][30] = Cookies.data[("eeimperium1" + i) + 50];
jenisKotak[i][31] = Cookies.data[("eeimperium1" + i) + 51];
jenisKotak[i][32] = Cookies.data[("eeimperium1" + i) + 52];
jenisKotak[i][33] = Cookies.data[("eeimperium1" + i) + 53];
jenisKotak[i][34] = Cookies.data[("eeimperium1" + i) + 54];
jenisKotak[i][35] = Cookies.data[("eeimperium1" + i) + 55];
jenisKotak[i][36] = Cookies.data[("eeimperium1" + i) + 56];
jenisKotak[i][37] = Cookies.data[("eeimperium1" + i) + 57];
jenisKotak[i][38] = Cookies.data[("eeimperium1" + i) + 58];
jenisKotak[i][39] = Cookies.data[("eeimperium1" + i) + 59];
jenisKotak[i][40] = Cookies.data[("eeimperium1" + i) + 60];
jenisKotak[i][41] = Cookies.data[("eeimperium1" + i) + 61];
jenisKotak[i][42] = Cookies.data[("eeimperium1" + i) + 62];
jenisKotak[i][43] = Cookies.data[("eeimperium1" + i) + 63];
jenisKotak[i][44] = Cookies.data[("eeimperium1" + i) + 64];
jenisKotak[i][45] = Cookies.data[("eeimperium1" + i) + 65];
jenisKotak[i][46] = Cookies.data[("eeimperium1" + i) + 66];
jenisKotak[i][47] = Cookies.data[("eeimperium1" + i) + 67];
jenisKotak[i][48] = Cookies.data[("eeimperium1" + i) + 68];
jenisKotak[i][49] = Cookies.data[("eeimperium1" + i) + 69];
jenisKotak[i][50] = Cookies.data[("eeimperium1" + i) + 70];
jenisKotak[i][51] = Cookies.data[("eeimperium1" + i) + 71];
jenisKotak[i][52] = Cookies.data[("eeimperium1" + i) + 72];
jenisKotak[i][53] = Cookies.data[("eeimperium1" + i) + 73];
jenisKotak[i][54] = Cookies.data[("eeimperium1" + i) + 74];
jenisKotak[i][55] = Cookies.data[("eeimperium1" + i) + 75];
jenisKotak[i][56] = Cookies.data[("eeimperium1" + i) + 76];
jenisKotak[i][57] = Cookies.data[("eeimperium1" + i) + 77];
jenisKotak[i][58] = Cookies.data[("eeimperium1" + i) + 78];
jenisKotak[i][59] = Cookies.data[("eeimperium1" + i) + 79];
jenisKotak[i][60] = Cookies.data[("eeimperium1" + i) + 80];
jenisKotak[i][61] = Cookies.data[("eeimperium1" + i) + 81];
jenisKotak[i][62] = Cookies.data[("eeimperium1" + i) + 82];
jenisKotak[i][63] = Cookies.data[("eeimperium1" + i) + 83];
jenisKotak[i][64] = Cookies.data[("eeimperium1" + i) + 84];
jenisKotak[i][65] = Cookies.data[("eeimperium1" + i) + 85];
jenisKotak[i][66] = Cookies.data[("eeimperium1" + i) + 86];
jenisKotak[i][67] = Cookies.data[("eeimperium1" + i) + 87];
jenisKotak[i][68] = Cookies.data[("eeimperium1" + i) + 88];
jenisKotak[i][69] = Cookies.data[("eeimperium1" + i) + 89];
jenisKotak[i][70] = Cookies.data[("eeimperium1" + i) + 90];
jenisKotak[i][71] = Cookies.data[("eeimperium1" + i) + 91];
jenisKotak[i][72] = Cookies.data[("eeimperium1" + i) + 92];
jenisKotak[i][73] = Cookies.data[("eeimperium1" + i) + 93];
jenisKotak[i][74] = Cookies.data[("eeimperium1" + i) + 94];
jenisKotak[i][75] = Cookies.data[("eeimperium1" + i) + 95];
jenisKotak[i][76] = Cookies.data[("eeimperium1" + i) + 96];
jenisKotak[i][77] = Cookies.data[("eeimperium1" + i) + 97];
jenisKotak[i][78] = Cookies.data[("eeimperium1" + i) + 98];
jenisKotak[i][79] = Cookies.data[("eeimperium1" + i) + 99];
jenisKotak[i][80] = Cookies.data[("eeimperium1" + i) + 100];
jenisKotak[i][81] = Cookies.data[("eeimperium1" + i) + 101];
jenisKotak[i][82] = Cookies.data[("eeimperium1" + i) + 102];
jenisKotak[i][83] = Cookies.data[("eeimperium1" + i) + 103];
jenisKotak[i][84] = Cookies.data[("eeimperium1" + i) + 104];
jenisKotak[i][85] = Cookies.data[("eeimperium1" + i) + 105];
jenisKotak[i][86] = Cookies.data[("eeimperium1" + i) + 106];
jenisKotak[i][87] = Cookies.data[("eeimperium1" + i) + 107];
jenisKotak[i][88] = Cookies.data[("eeimperium1" + i) + 108];
jenisKotak[i][89] = Cookies.data[("eeimperium1" + i) + 109];
jenisKotak[i][90] = Cookies.data[("eeimperium1" + i) + 110];
jenisKotak[i][91] = Cookies.data[("eeimperium1" + i) + 111];
jenisKotak[i][92] = Cookies.data[("eeimperium1" + i) + 112];
jenisKotak[i][93] = Cookies.data[("eeimperium1" + i) + 113];
jenisKotak[i][94] = Cookies.data[("eeimperium1" + i) + 114];
jenisKotak[i][95] = Cookies.data[("eeimperium1" + i) + 115];
jenisKotak[i][96] = Cookies.data[("eeimperium1" + i) + 116];
jenisKotak[i][97] = Cookies.data[("eeimperium1" + i) + 117];
jenisKotak[i][98] = Cookies.data[("eeimperium1" + i) + 118];
jenisKotak[i][99] = Cookies.data[("eeimperium1" + i) + 119];
jenisKotak[i][100] = Cookies.data[("eeimperium1" + i) + 120];
upgradeKotak[i][1] = Cookies.data[("eeimperium2" + i) + 21];
upgradeKotak[i][2] = Cookies.data[("eeimperium2" + i) + 22];
upgradeKotak[i][3] = Cookies.data[("eeimperium2" + i) + 23];
upgradeKotak[i][4] = Cookies.data[("eeimperium2" + i) + 24];
upgradeKotak[i][5] = Cookies.data[("eeimperium2" + i) + 25];
upgradeKotak[i][6] = Cookies.data[("eeimperium2" + i) + 26];
upgradeKotak[i][7] = Cookies.data[("eeimperium2" + i) + 27];
upgradeKotak[i][8] = Cookies.data[("eeimperium2" + i) + 28];
upgradeKotak[i][9] = Cookies.data[("eeimperium2" + i) + 29];
upgradeKotak[i][10] = Cookies.data[("eeimperium2" + i) + 30];
upgradeKotak[i][11] = Cookies.data[("eeimperium2" + i) + 31];
upgradeKotak[i][12] = Cookies.data[("eeimperium2" + i) + 32];
upgradeKotak[i][13] = Cookies.data[("eeimperium2" + i) + 33];
upgradeKotak[i][14] = Cookies.data[("eeimperium2" + i) + 34];
upgradeKotak[i][15] = Cookies.data[("eeimperium2" + i) + 35];
upgradeKotak[i][16] = Cookies.data[("eeimperium2" + i) + 36];
upgradeKotak[i][17] = Cookies.data[("eeimperium2" + i) + 37];
upgradeKotak[i][18] = Cookies.data[("eeimperium2" + i) + 38];
upgradeKotak[i][19] = Cookies.data[("eeimperium2" + i) + 39];
upgradeKotak[i][20] = Cookies.data[("eeimperium2" + i) + 40];
upgradeKotak[i][21] = Cookies.data[("eeimperium2" + i) + 41];
upgradeKotak[i][22] = Cookies.data[("eeimperium2" + i) + 42];
upgradeKotak[i][23] = Cookies.data[("eeimperium2" + i) + 43];
upgradeKotak[i][24] = Cookies.data[("eeimperium2" + i) + 44];
upgradeKotak[i][25] = Cookies.data[("eeimperium2" + i) + 45];
upgradeKotak[i][26] = Cookies.data[("eeimperium2" + i) + 46];
upgradeKotak[i][27] = Cookies.data[("eeimperium2" + i) + 47];
upgradeKotak[i][28] = Cookies.data[("eeimperium2" + i) + 48];
upgradeKotak[i][29] = Cookies.data[("eeimperium2" + i) + 49];
upgradeKotak[i][30] = Cookies.data[("eeimperium2" + i) + 50];
upgradeKotak[i][31] = Cookies.data[("eeimperium2" + i) + 51];
upgradeKotak[i][32] = Cookies.data[("eeimperium2" + i) + 52];
upgradeKotak[i][33] = Cookies.data[("eeimperium2" + i) + 53];
upgradeKotak[i][34] = Cookies.data[("eeimperium2" + i) + 54];
upgradeKotak[i][35] = Cookies.data[("eeimperium2" + i) + 55];
upgradeKotak[i][36] = Cookies.data[("eeimperium2" + i) + 56];
upgradeKotak[i][37] = Cookies.data[("eeimperium2" + i) + 57];
upgradeKotak[i][38] = Cookies.data[("eeimperium2" + i) + 58];
upgradeKotak[i][39] = Cookies.data[("eeimperium2" + i) + 59];
upgradeKotak[i][40] = Cookies.data[("eeimperium2" + i) + 60];
upgradeKotak[i][41] = Cookies.data[("eeimperium2" + i) + 61];
upgradeKotak[i][42] = Cookies.data[("eeimperium2" + i) + 62];
upgradeKotak[i][43] = Cookies.data[("eeimperium2" + i) + 63];
upgradeKotak[i][44] = Cookies.data[("eeimperium2" + i) + 64];
upgradeKotak[i][45] = Cookies.data[("eeimperium2" + i) + 65];
upgradeKotak[i][46] = Cookies.data[("eeimperium2" + i) + 66];
upgradeKotak[i][47] = Cookies.data[("eeimperium2" + i) + 67];
upgradeKotak[i][48] = Cookies.data[("eeimperium2" + i) + 68];
upgradeKotak[i][49] = Cookies.data[("eeimperium2" + i) + 69];
upgradeKotak[i][50] = Cookies.data[("eeimperium2" + i) + 70];
upgradeKotak[i][51] = Cookies.data[("eeimperium2" + i) + 71];
upgradeKotak[i][52] = Cookies.data[("eeimperium2" + i) + 72];
upgradeKotak[i][53] = Cookies.data[("eeimperium2" + i) + 73];
upgradeKotak[i][54] = Cookies.data[("eeimperium2" + i) + 74];
upgradeKotak[i][55] = Cookies.data[("eeimperium2" + i) + 75];
upgradeKotak[i][56] = Cookies.data[("eeimperium2" + i) + 76];
upgradeKotak[i][57] = Cookies.data[("eeimperium2" + i) + 77];
upgradeKotak[i][58] = Cookies.data[("eeimperium2" + i) + 78];
upgradeKotak[i][59] = Cookies.data[("eeimperium2" + i) + 79];
upgradeKotak[i][60] = Cookies.data[("eeimperium2" + i) + 80];
upgradeKotak[i][61] = Cookies.data[("eeimperium2" + i) + 81];
upgradeKotak[i][62] = Cookies.data[("eeimperium2" + i) + 82];
upgradeKotak[i][63] = Cookies.data[("eeimperium2" + i) + 83];
upgradeKotak[i][64] = Cookies.data[("eeimperium2" + i) + 84];
upgradeKotak[i][65] = Cookies.data[("eeimperium2" + i) + 85];
upgradeKotak[i][66] = Cookies.data[("eeimperium2" + i) + 86];
upgradeKotak[i][67] = Cookies.data[("eeimperium2" + i) + 87];
upgradeKotak[i][68] = Cookies.data[("eeimperium2" + i) + 88];
upgradeKotak[i][69] = Cookies.data[("eeimperium2" + i) + 89];
upgradeKotak[i][70] = Cookies.data[("eeimperium2" + i) + 90];
upgradeKotak[i][71] = Cookies.data[("eeimperium2" + i) + 91];
upgradeKotak[i][72] = Cookies.data[("eeimperium2" + i) + 92];
upgradeKotak[i][73] = Cookies.data[("eeimperium2" + i) + 93];
upgradeKotak[i][74] = Cookies.data[("eeimperium2" + i) + 94];
upgradeKotak[i][75] = Cookies.data[("eeimperium2" + i) + 95];
upgradeKotak[i][76] = Cookies.data[("eeimperium2" + i) + 96];
upgradeKotak[i][77] = Cookies.data[("eeimperium2" + i) + 97];
upgradeKotak[i][78] = Cookies.data[("eeimperium2" + i) + 98];
upgradeKotak[i][79] = Cookies.data[("eeimperium2" + i) + 99];
upgradeKotak[i][80] = Cookies.data[("eeimperium2" + i) + 100];
upgradeKotak[i][81] = Cookies.data[("eeimperium2" + i) + 101];
upgradeKotak[i][82] = Cookies.data[("eeimperium2" + i) + 102];
upgradeKotak[i][83] = Cookies.data[("eeimperium2" + i) + 103];
upgradeKotak[i][84] = Cookies.data[("eeimperium2" + i) + 104];
upgradeKotak[i][85] = Cookies.data[("eeimperium2" + i) + 105];
upgradeKotak[i][86] = Cookies.data[("eeimperium2" + i) + 106];
upgradeKotak[i][87] = Cookies.data[("eeimperium2" + i) + 107];
upgradeKotak[i][88] = Cookies.data[("eeimperium2" + i) + 108];
upgradeKotak[i][89] = Cookies.data[("eeimperium2" + i) + 109];
upgradeKotak[i][90] = Cookies.data[("eeimperium2" + i) + 110];
upgradeKotak[i][91] = Cookies.data[("eeimperium2" + i) + 111];
upgradeKotak[i][92] = Cookies.data[("eeimperium2" + i) + 112];
upgradeKotak[i][93] = Cookies.data[("eeimperium2" + i) + 113];
upgradeKotak[i][94] = Cookies.data[("eeimperium2" + i) + 114];
upgradeKotak[i][95] = Cookies.data[("eeimperium2" + i) + 115];
upgradeKotak[i][96] = Cookies.data[("eeimperium2" + i) + 116];
upgradeKotak[i][97] = Cookies.data[("eeimperium2" + i) + 117];
upgradeKotak[i][98] = Cookies.data[("eeimperium2" + i) + 118];
upgradeKotak[i][99] = Cookies.data[("eeimperium2" + i) + 119];
upgradeKotak[i][100] = Cookies.data[("eeimperium2" + i) + 120];
i++;
}
}
function loadData2() {
i = 0;
while (i <= simpanSemua.length) {
_root["imperium1" + i] = String("dataimperium1" + i);
Cookies = SharedObject.getLocal(_root["imperium1" + i], "/");
_root[simpanSemua[i]] = Cookies.data["eeimperium0x" + i];
i++;
}
}
function backDarah() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backDarah");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backKapak() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backKapak");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backTombak() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backTombak");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backTombak2() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backTombak2");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backPedang() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backPedang");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backPanah() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backPanah");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backMati() {
if (soundNyala == true) {
rand = random(4) + 1;
mySound = new Sound(xsound);
mySound.attachSound("backMati" + rand);
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backKuda() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backKuda");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backKuda2() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backKuda2");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backKetapel() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backKetapel");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backPanah2() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backPanah2");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backMati5() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backMati5");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backGada() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backGada");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backPukul() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backPukul");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backKetapel2() {
if (soundNyala == true) {
mySound = new Sound(xsound);
mySound.attachSound("backKetapel2");
mySound.start(0, 1);
mySound.setVolume(volum);
}
}
function backBattle() {
if (musikNyala == true) {
myMusic1.stop();
myMusic1 = new Sound(sound1);
myMusic1.attachSound("backBattle");
myMusic1.start(0, 99);
myMusic1.setVolume(volume1);
i = 1;
while (i <= 5) {
if (i != 1) {
_root["sound" + i].redup = true;
_root["sound" + i].nyala = false;
} else {
sound1.redup = false;
sound1.nyala = true;
}
i++;
}
myMusic1.onSoundComplete = function () {
backBattle();
};
}
}
function backDamai() {
if (musikNyala == true) {
myMusic2.stop();
myMusic2 = new Sound(sound2);
myMusic2.attachSound("backDamai");
myMusic2.start(0, 99);
myMusic2.setVolume(volume2);
i = 1;
while (i <= 5) {
if (i != 2) {
_root["sound" + i].redup = true;
_root["sound" + i].nyala = false;
} else {
sound2.redup = false;
sound2.nyala = true;
}
i++;
}
}
}
function backNaval() {
if (musikNyala == true) {
myMusic3.stop();
myMusic3 = new Sound(sound3);
myMusic3.attachSound("backNaval");
myMusic3.start(0, 99);
myMusic3.setVolume(volume3);
i = 1;
while (i <= 5) {
if (i != 3) {
_root["sound" + i].redup = true;
_root["sound" + i].nyala = false;
} else {
sound3.redup = false;
sound3.nyala = true;
}
i++;
}
myMusic3.onSoundComplete = function () {
backNaval();
};
}
}
function backTittle() {
if (musikNyala == true) {
myMusic4.stop();
myMusic4 = new Sound(sound4);
myMusic4.attachSound("backTittle");
myMusic4.start(0, 99);
myMusic4.setVolume(volume4);
i = 1;
while (i <= 5) {
if (i != 4) {
_root["sound" + i].redup = true;
_root["sound" + i].nyala = false;
} else {
sound4.redup = false;
sound4.nyala = true;
}
i++;
}
myMusic4.onSoundComplete = function () {
backTittle();
};
}
}
function backVillage() {
if (musikNyala == true) {
myMusic5.stop();
myMusic5 = new Sound(sound5);
myMusic5.attachSound("backVillage");
myMusic5.start(0, 99);
myMusic5.setVolume(volume5);
i = 1;
while (i <= 5) {
if (i != 5) {
_root["sound" + i].redup = true;
_root["sound" + i].nyala = false;
} else {
sound5.redup = false;
sound5.nyala = true;
}
i++;
}
myMusic5.onSoundComplete = function () {
backVillage();
};
}
}
stop();
fscommand ("showmenu", false);
fscommand ("fullscreen", false);
fscommand ("showmenu", false);
Stage.showMenu = false;
xsound1 = attachMovie("soundw", "sound1", 1);
xsound2 = attachMovie("soundw", "sound2", 2);
xsound3 = attachMovie("soundw", "sound3", 3);
xsound4 = attachMovie("soundw", "sound4", 4);
xsound5 = attachMovie("soundw", "sound5", 5);
xsound = attachMovie("soundw", "sound", 6);
volum = 100;
qualityGame = 1;
speedGame = 2;
_quality = "HIGH";
musikNyala = true;
soundNyala = true;
this.onEnterFrame = function () {
persen = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
xpersen = persen + " %";
bar_mc.gotoAndStop(persen);
if (persen >= 100) {
delete this.onEnterFrame;
gotoAndStop ("complete");
}
};
simpanSemua = new Array("datasaveImperium2", "days", "menit", "jam", "ambilWilayah", "jumlahLawan", "jenisPerintah", "namaKingdoms0", "namaKingdoms1", "namaKingdoms2", "namaKingdoms3", "namaKingdoms4", "namaKingdoms5", "namaKingdoms6", "namaKingdoms7", "namaKingdoms8", "namaKingdoms9", "namaKingdoms10", "namaKingdoms11", "namaKingdoms12", "menujuKe", "jenisUpgrade1", "jenisUpgrade2", "jenisUpgrade3", "jenisUpgrade4", "jenisUpgrade5", "sudahSerang1", "medal11", "medal12", "medal13", "medal14", "medal15", "medal16", "medal17", "medal18", "medal19", "medal110", "medal21", "medal22", "medal23", "medal24", "medal25", "medal26", "medal27", "medal28", "medal29", "medal210", "medal31", "medal32", "medal33", "medal34", "medal35", "medal36", "medal37", "medal38", "medal39", "medal1310", "medal1311", "totalKilled", "totalWin1", "swordMati1", "spearMati1", "bowMati1", "axeMati1", "horseMati1", "catapultMati1", "totalWin2", "swordMati2", "spearMati2", "bowMati2", "axeMati2", "horseMati2", "catapultMati2");
i = 1;
while (i <= 5) {
_root["sound" + i]._x = -100;
_root["sound" + i]._y = -100;
sound._x = -100;
sound._y = -100;
_root["volume" + i] = 0;
_root["sound" + i].nyala = false;
_root["sound" + i].redup = false;
i++;
}
awalLagu = true;
loadData2();
if (datasaveImperium2 == undefined) {
initStatistik();
}
sound1.onEnterFrame = function () {
myStr = new String(this);
indi1 = Number(myStr.substr(myStr.length - 1, 1));
if (this.nyala == true) {
if (_root["volume" + indi1] < 100) {
_root["volume" + indi1] = _root["volume" + indi1] + 2;
} else if (_root["volume" + indi1] >= 100) {
_root["volume" + indi1] = 100;
this.nyala = false;
}
} else if (this.redup == true) {
if (_root["volume" + indi1] > 0) {
_root["volume" + indi1] = _root["volume" + indi1] - 4;
} else if (_root["volume" + indi1] <= 0) {
_root["volume" + indi1] = 0;
myMusic1.stop();
this.redup = false;
}
}
myMusic1.setVolume(_root["volume" + indi1]);
};
sound2.onEnterFrame = function () {
myStr = new String(this);
indi2 = Number(myStr.substr(myStr.length - 1, 1));
if (this.nyala == true) {
if (_root["volume" + indi2] < 100) {
_root["volume" + indi2] = _root["volume" + indi2] + 2;
} else if (_root["volume" + indi2] >= 100) {
_root["volume" + indi2] = 100;
this.nyala = false;
}
} else if (this.redup == true) {
if (_root["volume" + indi2] > 0) {
_root["volume" + indi2] = _root["volume" + indi2] - 4;
} else if (_root["volume" + indi2] <= 0) {
_root["volume" + indi2] = 0;
myMusic2.stop();
this.redup = false;
}
}
myMusic2.setVolume(_root["volume" + indi2]);
};
sound3.onEnterFrame = function () {
myStr = new String(this);
indi3 = Number(myStr.substr(myStr.length - 1, 1));
if (this.nyala == true) {
if (_root["volume" + indi3] < 100) {
_root["volume" + indi3] = _root["volume" + indi3] + 2;
} else if (_root["volume" + indi3] >= 100) {
_root["volume" + indi3] = 100;
this.nyala = false;
}
} else if (this.redup == true) {
if (_root["volume" + indi3] > 0) {
_root["volume" + indi3] = _root["volume" + indi3] - 4;
} else if (_root["volume" + indi3] <= 0) {
_root["volume" + indi3] = 0;
myMusic3.stop();
this.redup = false;
}
}
myMusic3.setVolume(_root["volume" + indi3]);
};
sound4.onEnterFrame = function () {
myStr = new String(this);
indi4 = Number(myStr.substr(myStr.length - 1, 1));
if (this.nyala == true) {
if (_root["volume" + indi4] < 100) {
_root["volume" + indi4] = _root["volume" + indi4] + 2;
} else if (_root["volume" + indi4] >= 100) {
_root["volume" + indi4] = 100;
this.nyala = false;
}
} else if (this.redup == true) {
if (_root["volume" + indi4] > 0) {
_root["volume" + indi4] = _root["volume" + indi4] - 4;
} else if (_root["volume" + indi4] <= 0) {
_root["volume" + indi4] = 0;
myMusic4.stop();
this.redup = false;
}
}
myMusic4.setVolume(_root["volume" + indi4]);
};
sound5.onEnterFrame = function () {
myStr = new String(this);
indi5 = Number(myStr.substr(myStr.length - 1, 1));
if (this.nyala == true) {
if (_root["volume" + indi5] < 100) {
_root["volume" + indi5] = _root["volume" + indi5] + 2;
} else if (_root["volume" + indi5] >= 100) {
_root["volume" + indi5] = 100;
this.nyala = false;
}
} else if (this.redup == true) {
if (_root["volume" + indi5] > 0) {
_root["volume" + indi5] = _root["volume" + indi5] - 4;
} else if (_root["volume" + indi5] <= 0) {
_root["volume" + indi5] = 0;
myMusic5.stop();
this.redup = false;
}
}
myMusic5.setVolume(_root["volume" + indi5]);
};
Instance of Symbol 24 MovieClip in Frame 1
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Instance of Symbol 28 MovieClip in Frame 1
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Frame 5
stop();
gotoAndStop (31);
Frame 20
stop();
enter_btn.onRelease = function () {
gotoAndStop (31);
};
Instance of Symbol 24 MovieClip in Frame 20
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Instance of Symbol 28 MovieClip in Frame 20
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Frame 31
stop();
Frame 32
gotoAndStop (33);
Frame 33
play();
backTittle();
Instance of Symbol 843 MovieClip in Frame 33
on (release) {
gameid = "FL090909";
getURL ("http://belugerinstudios.com/data/counter.php?gameid=" + gameid, "_blank");
}
Frame 183
stop();
gotoAndStop (184);
Frame 184
stop();
continue_mc._visible = false;
if (datasaveImperium2 == undefined) {
load_btn.enabled = false;
} else {
load_btn.enabled = true;
}
play_btn.onRelease = function () {
initAwal();
zzawalMain = true;
gotoAndStop (216);
};
load_btn.onRelease = function () {
initAwal();
zzawalMain = false;
gotoAndStop (219);
};
credits_btn.onRelease = function () {
gotoAndStop (186);
};
option_btn.onRelease = function () {
gotoAndStop (185);
};
how_btn.onRelease = function () {
gotoAndStop (187);
};
achievements_btn.onRelease = function () {
gotoAndStop (212);
};
statistic_btn.onRelease = function () {
gotoAndStop (215);
};
more_btn.onRelease = function () {
getURL ("http://www.maxgames.com/game/imperium.html", "_blank");
};
Instance of Symbol 24 MovieClip in Frame 184
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Instance of Symbol 28 MovieClip in Frame 184
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Frame 185
function cekSpeedQuality() {
i = 1;
while (i <= 3) {
this["speed" + i].angka = i;
this["quality" + i].angka = i;
this["speed" + i].gotoAndStop(1);
this["quality" + i].gotoAndStop(1);
this["speed" + i].onRelease = klikSpeed;
this["quality" + i].onRelease = klikQuality;
this["speed" + i].onRollOver = function () {
over();
};
this["quality" + i].onRollOver = function () {
over();
};
i++;
}
this["speed" + _root.speedGame].gotoAndStop(2);
this["quality" + _root.qualityGame].gotoAndStop(2);
}
function klikSpeed() {
klik();
indi = new String(this);
_root.speedGame = Number(indi.substr(indi.length - 1, 1));
cekSpeedQuality();
}
function klikQuality() {
klik();
indi = new String(this);
_root.qualityGame = Number(indi.substr(indi.length - 1, 1));
if (_root.qualityGame == 1) {
_quality = "HIGH";
} else if (_root.qualityGame == 2) {
_quality = "MEDIUM";
} else if (_root.qualityGame == 3) {
_quality = "LOW";
}
cekSpeedQuality();
}
stop();
msgBox_mc._visible = false;
msgBox_mc2._visible = false;
back_btn.onRelease = function () {
removeMovieClip(infoBox);
gotoAndStop (184);
};
clear_btn.onRelease = function () {
initAwal();
initStatistik();
datasaveImperium2 = undefined;
simpanData();
loadData();
gotoAndStop (184);
};
bar1_mc.bar_mc._x = Math.ceil((_root.volum / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volum = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volum);
bar1_mc.persen1 = _root.volum + " %";
};
bar1_mc.indi_mc.onPress = function () {
klik();
startDrag (bar1_mc.bar_mc, true, -115, 0, 115, 0);
};
bar1_mc.indi_mc.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volum1 = int(0.434782608695652 * (this._x + 115));
_root.volum2 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volum1);
_root.mySound2.setVolume(_root.volum2);
bar2_mc.persen2 = _root.volum1 + " %";
};
bar2_mc.indi_mc.onPress = function () {
klik();
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
cekSpeedQuality();
if (musikNyala == true) {
xxmusic1.gotoAndStop(2);
xxmusic2.gotoAndStop(1);
xxmusic1.onRelease = function () {
backTittle();
musikNyala = true;
xxmusic1.gotoAndStop(2);
xxmusic2.gotoAndStop(1);
};
xxmusic2.onRelease = function () {
myMusic4.stop();
musikNyala = false;
xxmusic1.gotoAndStop(1);
xxmusic2.gotoAndStop(2);
};
} else {
xxmusic1.gotoAndStop(1);
xxmusic2.gotoAndStop(2);
xxmusic1.onRelease = function () {
musikNyala = true;
xxmusic1.gotoAndStop(2);
xxmusic2.gotoAndStop(1);
};
xxmusic2.onRelease = function () {
musikNyala = false;
xxmusic1.gotoAndStop(1);
xxmusic2.gotoAndStop(2);
};
}
if (soundNyala == true) {
xxsound1.gotoAndStop(2);
xxsound2.gotoAndStop(1);
xxsound1.onRelease = function () {
soundNyala = true;
xxsound1.gotoAndStop(2);
xxsound2.gotoAndStop(1);
};
xxsound2.onRelease = function () {
soundNyala = false;
xxsound1.gotoAndStop(1);
xxsound2.gotoAndStop(2);
};
} else {
xxsound1.gotoAndStop(1);
xxsound2.gotoAndStop(2);
xxsound1.onRelease = function () {
soundNyala = true;
xxsound1.gotoAndStop(2);
xxsound2.gotoAndStop(1);
};
xxsound2.onRelease = function () {
soundNyala = false;
xxsound1.gotoAndStop(1);
xxsound2.gotoAndStop(2);
};
}
Frame 186
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
Instance of Symbol 24 MovieClip in Frame 186
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Instance of Symbol 28 MovieClip in Frame 186
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Frame 187
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Frame 188
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Frame 189
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Frame 190
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Frame 191
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Frame 192
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Frame 193
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Frame 194
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Frame 195
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Frame 212
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
msgBox4_mc._visible = false;
achievements1 = new Array("", "Conquer 10 areas", "Conquer 20 areas", "Conquer 30 areas", "Conquer 40 areas", "Conquer 50 areas", "Conquer 60 areas", "Conquer 70 areas", "Conquer 80 areas", "Conquer 90 areas", "Win the game");
i = 1;
while (i <= 11) {
if (_root["medal1" + i] == true) {
_root["xmedal1" + i].gotoAndStop(1);
} else {
_root["xmedal1" + i].gotoAndStop(2);
}
_root["xmedal1" + i].onRollOver = function () {
myStr = new String(this);
if (myStr.length == 16) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 12);
}
msgBox4_mc._visible = true;
msgBox4_mc._x = this._x;
msgBox4_mc._y = this._y;
if (this._currentframe == 2) {
msgBox4_mc.kata = achievements1[indi] + " (locked)";
} else {
msgBox4_mc.kata = achievements1[indi];
}
};
_root["xmedal1" + i].onRollOut = function () {
msgBox4_mc._visible = false;
};
i++;
}
Frame 213
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
msgBox4_mc._visible = false;
achievements1 = new Array("", "Kill 50 enemies", "Kill 100 enemies", "Kill 150 enemies", "Kill 200 enemies", "Kill 250 enemies", "Kill 300 enemies", "Kill 350 enemies", "Kill 400 enemies", "Kill 450 enemies", "Kill 500 enemies");
i = 1;
while (i <= 11) {
if (_root["medal2" + i] == true) {
_root["xmedal2" + i].gotoAndStop(1);
} else {
_root["xmedal2" + i].gotoAndStop(2);
}
_root["xmedal2" + i].onRollOver = function () {
myStr = new String(this);
if (myStr.length == 16) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 12);
}
msgBox4_mc._visible = true;
msgBox4_mc._x = this._x;
msgBox4_mc._y = this._y;
if (this._currentframe == 2) {
msgBox4_mc.kata = achievements1[indi] + " (locked)";
} else {
msgBox4_mc.kata = achievements1[indi];
}
};
_root["xmedal2" + i].onRollOut = function () {
msgBox4_mc._visible = false;
};
i++;
}
Frame 214
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
prev_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
msgBox4_mc._visible = false;
achievements1 = new Array("", "Collect 1000000 golds", "Collect 2000000 foods", "Collect 500000 woods", "Collect 250000 irons", "Collect 100000 clays", "Collect 2000 swords", "Collect 1750 axes", "Collect 1500 spears", "Collect 1250 bows", "Collect 500 horses", "Collect 250 catapults");
i = 1;
while (i <= 11) {
if (_root["medal3" + i] == true) {
_root["xmedal3" + i].gotoAndStop(1);
} else {
_root["xmedal3" + i].gotoAndStop(2);
}
_root["xmedal3" + i].onRollOver = function () {
myStr = new String(this);
if (myStr.length == 16) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 12);
}
msgBox4_mc._visible = true;
msgBox4_mc._x = this._x;
msgBox4_mc._y = this._y;
if (this._currentframe == 2) {
msgBox4_mc.kata = achievements1[indi] + " (locked)";
} else {
msgBox4_mc.kata = achievements1[indi];
}
};
_root["xmedal3" + i].onRollOut = function () {
msgBox4_mc._visible = false;
};
i++;
}
Frame 215
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
Frame 216
function pilihLawan() {
i = 1;
while (i <= 12) {
_root["kerajaan" + i].gotoAndStop(1);
_root["kerajaan" + i].onRelease = klikKerajaan;
_root["nama" + i] = _root["namaKingdoms" + i];
_root["gold_kiri" + i]._visible = true;
_root["gold_kanan" + i]._visible = true;
_root["food_kiri" + i]._visible = true;
_root["food_kanan" + i]._visible = true;
_root["wood_kiri" + i]._visible = true;
_root["wood_kanan" + i]._visible = true;
_root["iron_kiri" + i]._visible = true;
_root["iron_kanan" + i]._visible = true;
_root["clay_kiri" + i]._visible = true;
_root["clay_kanan" + i]._visible = true;
_root["kotak_food" + i]._visible = true;
_root["kotak_gold" + i]._visible = true;
_root["kotak_wood" + i]._visible = true;
_root["kotak_iron" + i]._visible = true;
_root["kotak_clay" + i]._visible = true;
_root["xnama" + i]._visible = true;
_root["food" + i] = _root["wfood" + i];
_root["gold" + i] = _root["wgold" + i];
_root["wood" + i] = _root["wwood" + i];
_root["iron" + i] = _root["wiron" + i];
_root["clay" + i] = _root["wclay" + i];
_root["gold_kiri" + i].onRelease = goldKiri;
_root["gold_kanan" + i].onRelease = goldKanan;
_root["food_kiri" + i].onRelease = foodKiri;
_root["food_kanan" + i].onRelease = foodKanan;
_root["wood_kiri" + i].onRelease = woodKiri;
_root["wood_kanan" + i].onRelease = woodKanan;
_root["iron_kiri" + i].onRelease = ironKiri;
_root["iron_kanan" + i].onRelease = ironKanan;
_root["clay_kiri" + i].onRelease = clayKiri;
_root["clay_kanan" + i].onRelease = clayKanan;
i++;
}
_root["kerajaan" + (jumlahLawan + 1)].gotoAndStop(2);
i = jumlahLawan + 2;
while (i <= 12) {
_root["nama" + i] = "";
_root["gold_kiri" + i]._visible = false;
_root["gold_kanan" + i]._visible = false;
_root["food_kiri" + i]._visible = false;
_root["food_kanan" + i]._visible = false;
_root["wood_kiri" + i]._visible = false;
_root["wood_kanan" + i]._visible = false;
_root["iron_kiri" + i]._visible = false;
_root["iron_kanan" + i]._visible = false;
_root["clay_kiri" + i]._visible = false;
_root["clay_kanan" + i]._visible = false;
_root["kotak_food" + i]._visible = false;
_root["kotak_gold" + i]._visible = false;
_root["kotak_wood" + i]._visible = false;
_root["kotak_iron" + i]._visible = false;
_root["kotak_clay" + i]._visible = false;
_root["xnama" + i]._visible = false;
_root["food" + i] = "";
_root["gold" + i] = "";
_root["wood" + i] = "";
_root["iron" + i] = "";
_root["clay" + i] = "";
i++;
}
}
function klikKerajaan() {
myStr = new String(this);
if (myStr.length == 17) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 18) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
jumlahLawan = indi - 1;
pilihLawan();
}
function goldKiri() {
myStr = new String(this);
if (myStr.length == 18) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 19) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["gold" + indi] > 1) {
_root["gold" + indi]--;
}
}
function goldKanan() {
myStr = new String(this);
if (myStr.length == 19) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 20) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["gold" + indi] < 3) {
_root["gold" + indi]++;
}
}
function foodKiri() {
myStr = new String(this);
if (myStr.length == 18) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 19) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["food" + indi] > 1) {
_root["food" + indi]--;
}
}
function foodKanan() {
myStr = new String(this);
if (myStr.length == 19) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 20) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["food" + indi] < 3) {
_root["food" + indi]++;
}
}
function woodKiri() {
myStr = new String(this);
if (myStr.length == 18) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 19) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["wood" + indi] > 1) {
_root["wood" + indi]--;
}
}
function woodKanan() {
myStr = new String(this);
if (myStr.length == 19) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 20) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["wood" + indi] < 3) {
_root["wood" + indi]++;
}
}
function ironKiri() {
myStr = new String(this);
if (myStr.length == 18) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 19) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["iron" + indi] > 1) {
_root["iron" + indi]--;
}
}
function ironKanan() {
myStr = new String(this);
if (myStr.length == 19) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 20) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["iron" + indi] < 3) {
_root["iron" + indi]++;
}
}
function clayKiri() {
myStr = new String(this);
if (myStr.length == 18) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 19) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["clay" + indi] > 1) {
_root["clay" + indi]--;
}
}
function clayKanan() {
myStr = new String(this);
if (myStr.length == 19) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 20) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["clay" + indi] < 3) {
_root["clay" + indi]++;
}
}
stop();
indi = 2;
back_btn.onRelease = function () {
gotoAndStop (184);
};
continue_btn.onRelease = function () {
jumlahLawan = indi;
i = 1;
while (i <= 12) {
_root["namaKingdoms" + i] = _root["xnama" + i].text;
i++;
}
gotoAndStop (217);
};
random_btn.onRelease = function () {
i = 1;
while (i <= (jumlahLawan + 1)) {
_root["food" + i] = random(3) + 1;
_root["gold" + i] = random(3) + 1;
_root["wood" + i] = random(3) + 1;
_root["iron" + i] = random(3) + 1;
_root["clay" + i] = random(3) + 1;
i++;
}
};
pilihLawan();
Frame 217
function paketArea(indi) {
i = 1;
while (i <= 96) {
_root["area" + i].enabled = indi;
i++;
}
}
function paketTombol(indi) {
kingdoms_btn._visible = indi;
sabotage_btn._visible = indi;
diplomacy_btn._visible = indi;
menu_btn._visible = indi;
if (indi == true) {
kingdoms_btn.onRelease = function () {
gotoAndStop (217);
};
sabotage_btn.onRelease = function () {
sabotage_mc._visible = true;
};
diplomacy_btn.onRelease = function () {
diplomacy_btn._visible = true;
};
menu_btn.onRelease = function () {
cekMenuTombol();
};
}
}
function cekMenuTombol() {
paketArea(false);
paketTombol(false);
clearInterval(idWaktu);
menu_mc._visible = true;
_root.menu_mc.gotoAndStop(1);
menu_mc.save_btn.onRelease = function () {
datasaveImperium2 = true;
_root.menu_mc.gotoAndStop(2);
};
menu_mc.load_btn.onRelease = function () {
gotoAndStop (219);
};
menu_mc.close_btn.onRelease = function () {
if (speedGame == 3) {
idWaktu = setInterval(waktuJalan, 10);
} else if (speedGame == 2) {
idWaktu = setInterval(waktuJalan, 20);
} else if (speedGame == 1) {
idWaktu = setInterval(waktuJalan, 40);
}
menu_mc._visible = false;
paketArea(true);
paketTombol(true);
};
menu_mc.quit_btn.onRelease = function () {
clearSemua();
gotoAndStop (184);
backTittle();
};
menu_mc.quit_save_btn.onRelease = function () {
datasaveImperium2 = true;
_root.menu_mc.gotoAndStop(20);
};
menu_mc.options_btn.onRelease = function () {
_root.menu_mc.gotoAndStop(30);
_root.menu_mc.close_btn.onRelease = function () {
if (speedGame == 3) {
idWaktu = setInterval(waktuJalan, 10);
} else if (speedGame == 2) {
idWaktu = setInterval(waktuJalan, 20);
} else if (speedGame == 1) {
idWaktu = setInterval(waktuJalan, 40);
}
menu_mc._visible = false;
paketArea(true);
paketTombol(true);
};
};
}
function quitSave() {
clearSemua();
gotoAndStop (184);
backTittle();
}
function init() {
if (jenisTempat == "wilayah") {
info_mc._visible = false;
}
terhubungArea = new Array();
i = 1;
while (i <= 96) {
terhubungArea[1] = new Array(2, 11);
terhubungArea[2] = new Array(1, 3);
terhubungArea[3] = new Array(2, 4, 13);
terhubungArea[4] = new Array(3, 5);
terhubungArea[5] = new Array(4, 6, 15);
terhubungArea[6] = new Array(5, 7);
terhubungArea[7] = new Array(6, 8, 17);
terhubungArea[8] = new Array(7, 9);
terhubungArea[9] = new Array(8, 19);
terhubungArea[10] = new Array(11, 22);
terhubungArea[11] = new Array(1, 10, 12);
terhubungArea[12] = new Array(11, 13, 24);
terhubungArea[13] = new Array(3, 12, 14);
terhubungArea[14] = new Array(13, 15, 26);
terhubungArea[15] = new Array(5, 14, 16);
terhubungArea[16] = new Array(15, 17, 28);
terhubungArea[17] = new Array(7, 16, 18);
terhubungArea[18] = new Array(17, 19, 30);
terhubungArea[19] = new Array(9, 18, 20);
terhubungArea[20] = new Array(19, 32);
terhubungArea[21] = new Array(22, 35);
terhubungArea[22] = new Array(10, 21, 23);
terhubungArea[23] = new Array(22, 24, 37);
terhubungArea[24] = new Array(12, 23, 25);
terhubungArea[25] = new Array(24, 26, 39);
terhubungArea[26] = new Array(14, 25, 27);
terhubungArea[27] = new Array(26, 28, 41);
terhubungArea[28] = new Array(16, 27, 29);
terhubungArea[29] = new Array(28, 30, 43);
terhubungArea[30] = new Array(18, 29, 31);
terhubungArea[31] = new Array(30, 32, 45);
terhubungArea[32] = new Array(20, 31, 33);
terhubungArea[33] = new Array(32, 47);
terhubungArea[34] = new Array(35, 49);
terhubungArea[35] = new Array(21, 34, 36);
terhubungArea[36] = new Array(35, 37, 51);
terhubungArea[37] = new Array(23, 36, 38);
terhubungArea[38] = new Array(37, 39, 53);
terhubungArea[39] = new Array(25, 38, 40);
terhubungArea[40] = new Array(39, 41, 55);
terhubungArea[41] = new Array(27, 40, 42);
terhubungArea[42] = new Array(41, 43, 57);
terhubungArea[43] = new Array(29, 42, 44);
terhubungArea[44] = new Array(43, 45, 59);
terhubungArea[45] = new Array(31, 44, 46);
terhubungArea[46] = new Array(45, 47, 61);
terhubungArea[47] = new Array(33, 46, 48);
terhubungArea[48] = new Array(47, 63);
terhubungArea[49] = new Array(34, 50);
terhubungArea[50] = new Array(49, 51, 64);
terhubungArea[51] = new Array(36, 50, 52);
terhubungArea[52] = new Array(51, 53, 66);
terhubungArea[53] = new Array(38, 52, 54);
terhubungArea[54] = new Array(53, 55, 68);
terhubungArea[55] = new Array(40, 54, 56);
terhubungArea[56] = new Array(55, 57, 70);
terhubungArea[57] = new Array(42, 56, 58);
terhubungArea[58] = new Array(57, 59, 72);
terhubungArea[59] = new Array(44, 58, 60);
terhubungArea[60] = new Array(59, 61, 74);
terhubungArea[61] = new Array(46, 60, 62);
terhubungArea[62] = new Array(61, 63, 76);
terhubungArea[63] = new Array(48, 62);
terhubungArea[64] = new Array(50, 65);
terhubungArea[65] = new Array(64, 66, 77);
terhubungArea[66] = new Array(52, 65, 67);
terhubungArea[67] = new Array(66, 68, 79);
terhubungArea[68] = new Array(54, 67, 69);
terhubungArea[69] = new Array(68, 70, 81);
terhubungArea[70] = new Array(56, 69, 71);
terhubungArea[71] = new Array(70, 72, 83);
terhubungArea[72] = new Array(58, 71, 73);
terhubungArea[73] = new Array(72, 74, 85);
terhubungArea[74] = new Array(60, 73, 75);
terhubungArea[75] = new Array(74, 76, 87);
terhubungArea[76] = new Array(62, 75);
terhubungArea[77] = new Array(65, 78);
terhubungArea[78] = new Array(77, 79, 88);
terhubungArea[79] = new Array(67, 78, 80);
terhubungArea[80] = new Array(79, 81, 90);
terhubungArea[81] = new Array(69, 80, 82);
terhubungArea[82] = new Array(81, 83, 92);
terhubungArea[83] = new Array(71, 82, 84);
terhubungArea[84] = new Array(83, 85, 94);
terhubungArea[85] = new Array(73, 84, 86);
terhubungArea[86] = new Array(85, 87, 96);
terhubungArea[87] = new Array(75, 86);
terhubungArea[88] = new Array(78, 89);
terhubungArea[89] = new Array(88, 90);
terhubungArea[90] = new Array(80, 89, 91);
terhubungArea[91] = new Array(90, 92);
terhubungArea[92] = new Array(82, 91, 93);
terhubungArea[93] = new Array(92, 94);
terhubungArea[94] = new Array(84, 93, 95);
terhubungArea[95] = new Array(94, 96);
terhubungArea[96] = new Array(86, 95);
if (ambilWilayah == 1) {
if (_root["milik" + i] != 1) {
_root["area" + i]._alpha = 60;
_root["area" + i].enabled = false;
} else {
_root["area" + i].enabled = true;
}
}
i++;
}
i = 1;
while (i <= 96) {
_root["area" + i].onRollOver = function () {
this._alpha = 85;
myStr = new String(this);
if (myStr.length == 13) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 14) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
info_mc._visible = true;
if (_root["milik" + indi] <= 1) {
cekInfo(indi);
} else {
cekInfo2(indi);
}
};
_root["area" + i].onRollOut = function () {
this._alpha = 60;
myStr = new String(this);
if (myStr.length == 13) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 14) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
info_mc._visible = false;
};
_root["area" + i].onRelease = function () {
myStr = new String(this);
if (myStr.length == 13) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 14) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["milik" + indi] == 1) {
if (_root["area" + indi].bisaMove == true) {
instruction_mc._visible = false;
targetArea = indi;
gotoAndStop (226);
} else {
menujuKe = indi;
gotoAndStop (224);
backVillage();
}
} else if (_root.sudahSerang1 == 0) {
if (ambilWilayah == 0) {
cekInfo(indi);
_root["milik" + indi] = 1;
this.gotoAndStop(2);
paketTombol(true);
ambilWilayah = 1;
_root["xfood" + indi] = _root["xfood" + indi] * _root.food1;
_root["xgold" + indi] = _root["xgold" + indi] * _root.gold1;
_root["xwood" + indi] = _root["xwood" + indi] * _root.wood1;
_root["xiron" + indi] = _root["xiron" + indi] * _root.iron1;
_root["xclay" + indi] = _root["xclay" + indi] * _root.clay1;
if (speedGame == 3) {
idWaktu = setInterval(waktuJalan, 10);
} else if (speedGame == 2) {
idWaktu = setInterval(waktuJalan, 20);
} else if (speedGame == 1) {
idWaktu = setInterval(waktuJalan, 40);
}
init();
cekInfo(indi);
paketTombol(true);
if (jumlahLawan <= 2) {
jumlahLawan = 2;
}
zi = 2;
while (zi <= jumlahLawan) {
cekMunculMusuh(zi);
zi++;
}
hariKe = "Day: " + days;
cekBisaSerang();
} else if (jenisPerintah == "war") {
paketArea(false);
paketTombol(false);
instruction_mc.gotoAndStop(2);
instruction_mc.judul = ("Attack Area " + indi) + "?";
if (_root["milik" + indi] == 0) {
ztipeMusuh = "barbar";
instruction_mc.isi = "You will attack barbarians inhabited areas, looks a bit weaker than your opponent kingdom, but usually they are more numerous.";
} else {
ztipeMusuh = "kerajaan";
instruction_mc.isi = "You would attack the area of your opponent kingdom , be careful you might find a tough opponent.";
}
instruction_mc._visible = true;
instruction_mc.yes_btn.onRelease = function () {
kondisiSerangan = "menyerang";
instruction_mc._visible = false;
targetArea = indi;
gotoAndStop (229);
};
instruction_mc.no_btn.onRelease = function () {
init();
cekBisaSerang();
cekInfo(menujuKe);
paketTombol(true);
cancel_btn._visible = false;
instruction_mc._visible = false;
jenisPerintah = "";
};
}
}
};
i++;
}
}
function cekMunculMusuh(indi) {
masukArray = new Array();
masukKe = 0;
i = 1;
while (i <= 96) {
if (_root["milik" + i] == 0) {
masukArray[masukKe] = i;
masukKe++;
}
i++;
}
pilihArea = masukArray[random(masukKe)];
_root["milik" + pilihArea] = indi;
_root["area" + pilihArea].gotoAndStop(indi + 1);
_root["xfood" + pilihArea] = _root["xfood" + pilihArea] * 0;
_root["xgold" + pilihArea] = _root["xgold" + pilihArea] * 0;
_root["xwood" + pilihArea] = _root["xwood" + pilihArea] * 0;
_root["xiron" + pilihArea] = _root["xiron" + pilihArea] * 0;
_root["xclay" + pilihArea] = _root["xclay" + pilihArea] * 0;
}
function cekBisaSerang() {
i = 1;
while (i <= 96) {
if (_root["milik" + i] != 1) {
_root["area" + i].enabled = false;
}
i++;
}
if (_root.sudahSerang1 == 0) {
i = 1;
while (i <= 96) {
j = 0;
while (j <= 2) {
if (_root["milik" + i] == 1) {
_root["area" + terhubungArea[i][j]].enabled = true;
}
j++;
}
i++;
}
}
i = 1;
while (i <= 96) {
if (_root["milik" + i] > 1) {
_root["area" + i].enabled = true;
}
i++;
}
}
function cekBisaSerang2(indi) {
i = 1;
while (i <= 96) {
if (indi == "serang") {
_root["area" + i].enabled = false;
}
i++;
}
j = 0;
while (j <= 2) {
if (_root["milik" + menujuKe] == 1) {
if (indi == "serang") {
if (_root["milik" + terhubungArea[menujuKe][j]] != 1) {
_root["area" + terhubungArea[menujuKe][j]].enabled = true;
}
}
}
j++;
}
}
function cekBisaMove(indi) {
i = 1;
while (i <= 96) {
if (indi == "move") {
_root["area" + i].enabled = false;
_root["area" + i].bisaMove = false;
}
i++;
}
j = 0;
while (j <= 2) {
if (_root["milik" + menujuKe] == 1) {
if (indi == "move") {
if (_root["milik" + terhubungArea[menujuKe][j]] == 1) {
_root["area" + terhubungArea[menujuKe][j]].enabled = true;
_root["area" + terhubungArea[menujuKe][j]].bisaMove = true;
}
}
}
j++;
}
}
function cekInfo(indi) {
info_mc._visible = true;
i = 1;
while (i <= 14) {
info_mc["info" + i].onRollOver = function () {
arrayInfo = new Array("", "Gold", "Food", "Wood", "Iron", "Clay", "Swordsman", "Axeman", "Spearman", "Bowman", "Horse", "Catapult", "Population", "Unemployment", "Soldier");
myStr = new String(this);
if (myStr.length == 21) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
info_mc.info_mc2._x = this._x + 75;
info_mc.info_mc2._y = this._y;
info_mc.info_mc2._visible = true;
info_mc.info_mc2.nama = arrayInfo[indi];
};
info_mc["info" + i].onRollOut = function () {
info_mc.info_mc2._visible = false;
};
i++;
}
info_mc.namaArea = "Area " + indi;
info_mc.people = _root["people" + indi];
info_mc.worker = _root["worker" + indi];
info_mc.soldier = _root["soldier" + indi];
info_mc.food = _root["xfood" + indi];
info_mc.gold = _root["xgold" + indi];
info_mc.wood = _root["xwood" + indi];
info_mc.iron = _root["xiron" + indi];
info_mc.clay = _root["xclay" + indi];
info_mc.sword = _root["sword" + indi];
info_mc.axe = _root["axe" + indi];
info_mc.spear = _root["spear" + indi];
info_mc.bow = _root["bow" + indi];
info_mc.horse = _root["horse" + indi];
info_mc.catapult = _root["catapult" + indi];
_root["soldier" + indi] = Number(((((_root["sword" + indi] + _root["axe" + indi]) + _root["spear" + indi]) + _root["bow" + indi]) + _root["catapult" + indi]) + _root["horse" + indi]);
if (_root["milik" + indi] == 0) {
info_mc.namaKerajaan = _root["namaKingdoms" + _root["milik" + indi]];
} else {
info_mc.namaKerajaan = _root["namaKingdoms" + _root["milik" + indi]] + " Kingdom";
}
}
function cekInfo2(indi) {
info_mc._visible = true;
info_mc.namaArea = "Area " + indi;
info_mc.people = "???";
info_mc.worker = "???";
info_mc.soldier = "???";
info_mc.food = "Unknown";
info_mc.gold = "Unknown";
info_mc.wood = "Unknown";
info_mc.iron = "Unknown";
info_mc.clay = "Unknown";
info_mc.sword = "Unknown";
info_mc.spear = "Unknown";
info_mc.axe = "Unknown";
info_mc.bow = "Unknown";
info_mc.horse = "Unknown";
info_mc.catapult = "Unknown";
if (_root["milik" + indi] == 0) {
info_mc.namaKerajaan = _root["namaKingdoms" + _root["milik" + indi]];
} else {
info_mc.namaKerajaan = _root["namaKingdoms" + _root["milik" + indi]] + " Kingdom";
}
}
function cekNextTurn() {
i = 1;
while (i <= 96) {
_root["area" + i]._alpha = 60;
_root["area" + i].enabled = false;
i++;
}
if (days >= 100) {
ygNyerang = 2;
zzi = 2;
while (zzi <= jumlahLawan) {
ygNyerang = zzi;
keSerang();
zzi++;
}
}
cekSelesaiTurn();
}
function keSerang() {
w = ygNyerang;
masukArray2 = new Array();
masukKe2 = 0;
tipeAi = random(3) + 1;
if (tipeAi == 1) {
i = 1;
while (i <= 96) {
j = 0;
while (j <= 2) {
if (_root["milik" + i] == w) {
if ((_root["milik" + terhubungArea[i][j]] != w) && (_root["milik" + terhubungArea[i][j]] != 0)) {
if (terhubungArea[i][j] != undefined) {
masukArray2[masukKe2] = terhubungArea[i][j];
masukKe2++;
}
}
}
j++;
}
i++;
}
if (masukKe2 == 0) {
i = 1;
while (i <= 96) {
j = 0;
while (j <= 2) {
if (_root["milik" + i] == w) {
if (_root["milik" + terhubungArea[i][j]] == 0) {
if (terhubungArea[i][j] != undefined) {
masukArray2[masukKe2] = terhubungArea[i][j];
masukKe2++;
}
}
}
j++;
}
i++;
}
}
} else if (tipeAi == 2) {
i = 1;
while (i <= 96) {
j = 0;
while (j <= 2) {
if (_root["milik" + i] == w) {
if (_root["milik" + terhubungArea[i][j]] != w) {
if (terhubungArea[i][j] != undefined) {
masukArray2[masukKe2] = terhubungArea[i][j];
masukKe2++;
}
}
}
j++;
}
i++;
}
} else if (tipeAi == 3) {
i = 1;
while (i <= 96) {
j = 0;
while (j <= 2) {
if (_root["milik" + i] == w) {
if (_root["milik" + terhubungArea[i][j]] == 0) {
if (terhubungArea[i][j] != undefined) {
masukArray2[masukKe2] = terhubungArea[i][j];
masukKe2++;
}
}
}
j++;
}
i++;
}
if (masukKe2 == 0) {
i = 1;
while (i <= 96) {
j = 0;
while (j <= 2) {
if (_root["milik" + i] == w) {
if (_root["milik" + terhubungArea[i][j]] != w) {
if (terhubungArea[i][j] != undefined) {
masukArray2[masukKe2] = terhubungArea[i][j];
masukKe2++;
}
}
}
j++;
}
i++;
}
}
}
xpunyaWilayahx = 0;
i = 1;
while (i <= 96) {
if (_root["milik" + i] == 1) {
xpunyaWilayahx++;
}
i++;
}
if (xpunyaWilayahx <= 10) {
zrand = random(12);
} else if (xpunyaWilayahx <= 20) {
zrand = random(11);
} else if (xpunyaWilayahx <= 30) {
zrand = random(10);
} else if (xpunyaWilayahx <= 40) {
zrand = random(9);
} else if (xpunyaWilayahx <= 50) {
zrand = random(8);
} else if (xpunyaWilayahx <= 60) {
zrand = random(7);
} else if (xpunyaWilayahx <= 70) {
zrand = random(6);
} else if (xpunyaWilayahx <= 80) {
zrand = random(5);
} else {
zrand = random(4);
}
if (zrand == 1) {
if (masukKe2 > 0) {
if (sedangBattle == false) {
pilihSerang = masukArray2[random(masukKe2)];
if (_root["milik" + pilihSerang] == 1) {
removeMovieClip(xbangunan);
jenisPerintah = "diserangLawan";
gotoAndStop (217);
clearInterval(idWaktu);
menu_btn._visible = false;
menujuKe = pilihSerang;
paketTombol(false);
instruction_mc.gotoAndStop(2);
instruction_mc.judul = "Enemy Attack Area " + pilihSerang;
ztipeMusuh = "kerajaan";
instruction_mc.isi = "Your area has been attacked by enemy, would you counter attack?";
instruction_mc._visible = true;
instruction_mc.yes_btn.onRelease = function () {
menu_btn._visible = true;
clearInterval(idWaktu);
paketArea(true);
if (speedGame == 3) {
idWaktu = setInterval(waktuJalan, 10);
} else if (speedGame == 2) {
idWaktu = setInterval(waktuJalan, 20);
} else if (speedGame == 1) {
idWaktu = setInterval(waktuJalan, 40);
}
kondisiSerangan = "bertahan";
instruction_mc._visible = false;
targetArea = indi;
gotoAndStop (229);
};
instruction_mc.no_btn.onRelease = function () {
menu_btn._visible = true;
paketArea(true);
clearInterval(idWaktu);
jenisPerintah = "";
instruction_mc._visible = false;
if (speedGame == 3) {
idWaktu = setInterval(waktuJalan, 10);
} else if (speedGame == 2) {
idWaktu = setInterval(waktuJalan, 20);
} else if (speedGame == 1) {
idWaktu = setInterval(waktuJalan, 40);
}
_root["milik" + pilihSerang] = w;
_root["area" + pilihSerang].gotoAndStop(w + 1);
j = 1;
while (j <= 100) {
rand = random(3);
if (rand == 0) {
jenisKotak[pilihSerang][j] = random(6) + 15;
} else {
jenisKotak[pilihSerang][j] = 0;
}
upgradeKotak[pilihSerang][j] = 1;
j++;
}
};
zzi = jumlahLawan + 1;
} else {
_root["milik" + pilihSerang] = w;
_root["area" + pilihSerang].gotoAndStop(w + 1);
}
}
}
}
}
function cekSelesaiTurn() {
days++;
hariKe = "Day: " + days;
cekSumberDaya();
if (jenisTempat == "daerah") {
cekInfo(menujuKe);
}
clearInterval(idSerang);
i = 1;
while (i <= 4) {
_root["sudahSerang" + i] = 0;
i++;
}
init();
cekBisaSerang();
paketTombol(true);
punyaBanyakGold = 0;
punyaBanyakFood = 0;
punyaBanyakWood = 0;
punyaBanyakIron = 0;
punyaBanyakClay = 0;
punyaBanyakSword = 0;
punyaBanyakAxe = 0;
punyaBanyakSpear = 0;
punyaBanyakBow = 0;
punyaBanyakHorse = 0;
punyaBanyakCatapult = 0;
i = 1;
while (i <= 96) {
if (_root["milik" + i] == 1) {
punyaBanyakGold = punyaBanyakGold + _root["xgold" + i];
punyaBanyakFood = punyaBanyakFood + _root["xfood" + i];
punyaBanyakWood = punyaBanyakWood + _root["xwood" + i];
punyaBanyakIron = punyaBanyakIron + _root["xiron" + i];
punyaBanyakClay = punyaBanyakClay + _root["xclay" + i];
punyaBanyakSword = punyaBanyakSword + _root["sword" + i];
punyaBanyakAxe = punyaBanyakAxe + _root["axe" + i];
punyaBanyakSpear = punyaBanyakSpear + _root["spear" + i];
punyaBanyakBow = punyaBanyakBow + _root["bow" + i];
punyaBanyakHorse = punyaBanyakHorse + _root["horse" + i];
punyaBanyakCatapult = punyaBanyakCatapult + _root["catapult" + i];
}
i++;
}
if (punyaBanyakGold >= 1000000) {
medal31 = true;
}
if (punyaBanyakFood >= 2000000) {
medal32 = true;
_root.scoreHTTPSender("FL091021", "CH010");
}
if (punyaBanyakWood >= 500000) {
medal33 = true;
_root.scoreHTTPSender("FL091021", "CH009");
}
if (punyaBanyakIron >= 250000) {
medal34 = true;
_root.scoreHTTPSender("FL091021", "CH011");
}
if (punyaBanyakClay >= 100000) {
medal35 = true;
_root.scoreHTTPSender("FL091021", "CH012");
}
if (punyaBanyakSword >= 2000) {
medal36 = true;
_root.scoreHTTPSender("FL091021", "CH013");
}
if (punyaBanyakAxe >= 1750) {
medal37 = true;
_root.scoreHTTPSender("FL091021", "CH014");
}
if (punyaBanyakSpear >= 1500) {
medal38 = true;
}
if (punyaBanyakBow >= 1250) {
medal39 = true;
_root.scoreHTTPSender("FL091021", "CH015");
}
if (punyaBanyakHorse >= 500) {
medal310 = true;
}
if (punyaBanyakCatapult >= 250) {
medal311 = true;
_root.scoreHTTPSender("FL091021", "CH016");
}
punyaWilayahx = 0;
i = 1;
while (i <= 96) {
if (_root["milik" + i] == 1) {
punyaWilayahx++;
}
i++;
}
if (punyaWilayahx >= 10) {
medal11 = true;
_root.scoreHTTPSender("FL091021", "CH001");
}
if (punyaWilayahx >= 20) {
medal12 = true;
}
if (punyaWilayahx >= 30) {
medal13 = true;
}
if (punyaWilayahx >= 40) {
medal14 = true;
_root.scoreHTTPSender("FL091021", "CH002");
}
if (punyaWilayahx >= 50) {
medal15 = true;
}
if (punyaWilayahx >= 60) {
medal16 = true;
}
if (punyaWilayahx >= 70) {
medal17 = true;
}
if (punyaWilayahx >= 80) {
medal18 = true;
_root.scoreHTTPSender("FL091021", "CH003");
}
if (punyaWilayahx >= 90) {
medal19 = true;
}
if (punyaWilayahx >= 96) {
medal110 = true;
clearSemua();
gotoAndStop (231);
backTittle();
_root.scoreHTTPSender("FL091021", "CH004");
} else if (punyaWilayahx == 0) {
clearSemua();
gotoAndStop (232);
backTittle();
}
}
function cekSumberDaya() {
i = 1;
while (i <= 96) {
j = 1;
while (j <= 100) {
if (jenisKotak[i][j] == 2) {
_root["xfood" + i] = _root["xfood" + i] - (50 * upgradeKotak[i][j]);
} else if (jenisKotak[i][j] == 3) {
_root["xfood" + i] = _root["xfood" + i] + (300 * upgradeKotak[i][j]);
_root["xgold" + i] = _root["xgold" + i] - (5 * upgradeKotak[i][j]);
} else if (jenisKotak[i][j] == 4) {
_root["xwood" + i] = _root["xwood" + i] + (80 * upgradeKotak[i][j]);
_root["xgold" + i] = _root["xgold" + i] - (10 * upgradeKotak[i][j]);
} else if (jenisKotak[i][j] == 5) {
_root["xgold" + i] = _root["xgold" + i] + (250 * upgradeKotak[i][j]);
_root["xgold" + i] = _root["xgold" + i] - (20 * upgradeKotak[i][j]);
} else if (jenisKotak[i][j] == 6) {
_root["xgold" + i] = _root["xgold" + i] + (500 * upgradeKotak[i][j]);
_root["xgold" + i] = _root["xgold" + i] - (45 * upgradeKotak[i][j]);
} else if (jenisKotak[i][j] == 7) {
_root["xiron" + i] = _root["xiron" + i] + (60 * upgradeKotak[i][j]);
_root["xgold" + i] = _root["xgold" + i] - (50 * upgradeKotak[i][j]);
} else if (jenisKotak[i][j] == 9) {
if (_root["worker" + i] >= _root["produksiSword" + i]) {
_root["sword" + i] = _root["sword" + i] + Number(_root["produksiSword" + i]);
_root["worker" + i] = _root["worker" + i] - Number(_root["produksiSword" + i]);
}
if (_root["worker" + i] >= _root["produksiAxe" + i]) {
_root["axe" + i] = _root["axe" + i] + Number(_root["produksiAxe" + i]);
_root["worker" + i] = _root["worker" + i] - Number(_root["produksiAxe" + i]);
}
if (_root["worker" + i] >= _root["produksiSpear" + i]) {
_root["spear" + i] = _root["spear" + i] + Number(_root["produksiSpear" + i]);
_root["worker" + i] = _root["worker" + i] - Number(_root["produksiSpear" + i]);
}
if (_root["worker" + i] >= _root["produksiBow" + i]) {
_root["bow" + i] = _root["bow" + i] + Number(_root["produksiBow" + i]);
_root["worker" + i] = _root["worker" + i] - Number(_root["produksiBow" + i]);
}
_root["xgold" + i] = _root["xgold" + i] - (120 * upgradeKotak[i][j]);
} else if (jenisKotak[i][j] == 10) {
_root["horse" + i] = _root["horse" + i] + (1 * upgradeKotak[i][j]);
_root["xgold" + i] = _root["xgold" + i] - (50 * upgradeKotak[i][j]);
} else if (jenisKotak[i][j] == 11) {
_root["xcatapult" + i] = _root["xcatapult" + i] + (0.025 * upgradeKotak[i][j]);
_root["catapult" + i] = _root["xcatapult" + i];
_root["catapult" + i] = Math.floor(_root["catapult" + i]);
_root["xgold" + i] = _root["xgold" + i] - (70 * upgradeKotak[i][j]);
} else if (jenisKotak[i][j] == 12) {
_root["xclay" + i] = _root["xclay" + i] + (40 * upgradeKotak[i][j]);
_root["xgold" + i] = _root["xgold" + i] - (25 * upgradeKotak[i][j]);
}
_root["soldier" + i] = Number(((((_root["sword" + i] + _root["axe" + i]) + _root["spear" + i]) + _root["bow" + i]) + _root["catapult" + i]) + _root["horse" + i]);
if (_root["xfood" + i] <= 0) {
_root["xfood" + i] = 0;
}
if (_root["xwood" + i] <= 0) {
_root["xwood" + i] = 0;
}
if (_root["xiron" + i] <= 0) {
_root["xiron" + i] = 0;
}
if (_root["xclay" + i] <= 0) {
_root["xclay" + i] = 0;
}
j++;
}
i++;
}
}
function waktuJalan() {
menit++;
}
function clearSemua() {
clearInterval(idWaktu);
}
function inisialisasiWilayah() {
indi = random(96) + 1;
cekInfo(indi);
_root["milik" + indi] = 1;
paketTombol(true);
ambilWilayah = 1;
_root["xfood" + indi] = _root["xfood" + indi] * _root.food1;
_root["xgold" + indi] = _root["xgold" + indi] * _root.gold1;
_root["xwood" + indi] = _root["xwood" + indi] * _root.wood1;
_root["xiron" + indi] = _root["xiron" + indi] * _root.iron1;
_root["xclay" + indi] = _root["xclay" + indi] * _root.clay1;
if (speedGame == 3) {
idWaktu = setInterval(waktuJalan, 10);
} else if (speedGame == 2) {
idWaktu = setInterval(waktuJalan, 20);
} else if (speedGame == 1) {
idWaktu = setInterval(waktuJalan, 40);
}
init();
cekInfo(indi);
paketTombol(true);
if (jumlahLawan <= 2) {
jumlahLawan = 2;
}
zi = 2;
while (zi <= jumlahLawan) {
cekMunculMusuh(zi);
zi++;
}
hariKe = "Day: " + days;
cekBisaSerang();
}
stop();
wilayah_mc.gotoAndStop(1);
sedangBattle = false;
hariKe = "Day: " + days;
if (asalUsul == "load") {
asalUsul = undefined;
if (speedGame == 3) {
idWaktu = setInterval(waktuJalan, 10);
} else if (speedGame == 2) {
idWaktu = setInterval(waktuJalan, 20);
} else if (speedGame == 1) {
idWaktu = setInterval(waktuJalan, 40);
}
}
if (jenisPerintah == "diserangLawan") {
instruction_mc._visible = true;
} else {
instruction_mc._visible = false;
}
cancel_btn._visible = false;
menu_mc._visible = false;
sabotage_mc._visible = false;
diplomacy_btn._visible = false;
jenisTempat = "wilayah";
backDamai();
if (ambilWilayah != 0) {
if (jenisPerintah == "move") {
instruction_mc.judul = "Move Rescource";
instruction_mc.isi = "Click the destination area to move the resources, the area should be your city.";
instruction_mc._visible = true;
instruction_mc.next_btn.onRelease = function () {
cancel_btn._visible = true;
cekBisaMove("move");
instruction_mc._visible = false;
};
cancel_btn.onRelease = function () {
init();
cekInfo(menujuKe);
paketTombol(true);
cancel_btn._visible = false;
instruction_mc._visible = false;
};
} else if (jenisPerintah == "war") {
instruction_mc.judul = "Attack";
instruction_mc.isi = "Click the area you want to attack, the area should not be your city.";
instruction_mc._visible = true;
instruction_mc.next_btn.onRelease = function () {
cancel_btn._visible = true;
cekBisaSerang2("serang");
instruction_mc._visible = false;
};
cancel_btn.onRelease = function () {
init();
cekInfo(menujuKe);
paketTombol(true);
cancel_btn._visible = false;
instruction_mc._visible = false;
};
} else if (jenisPerintah == "selesaiWar") {
if (kondisiPerang == "menang") {
if (kondisiSerangan == "menyerang") {
_root["milik" + targetArea] = 1;
}
} else if (kondisiPerang == "kalah") {
if (kondisiSerangan == "bertahan") {
_root["milik" + pilihSerang] = w;
_root["area" + pilihSerang].gotoAndStop(w + 1);
j = 1;
while (j <= 100) {
rand = random(3);
if (rand == 0) {
jenisKotak[pilihSerang][j] = random(6) + 15;
} else {
jenisKotak[pilihSerang][j] = 0;
}
upgradeKotak[pilihSerang][j] = 1;
j++;
}
}
}
}
init();
i = 1;
while (i <= 96) {
if (_root["milik" + i] != 1) {
_root["area" + i].gotoAndStop(_root["milik" + i] + 1);
} else {
_root["area" + i].gotoAndStop(2);
}
i++;
}
cekBisaSerang();
cekInfo(menujuKe);
paketTombol(true);
if ((jenisPerintah == "war") || (jenisPerintah == "move")) {
paketTombol(false);
}
} else {
info_mc._visible = false;
paketTombol(false);
i = 1;
while (i <= 4) {
_root["sudahSerang" + i] = 0;
i++;
}
instruction_mc.judul = "Imperium II";
instruction_mc.isi = "Welcome to the Imperium II, where you can build your empire, make the royal army and attack your opponent, control the entire area to hold the Empire.";
i = 1;
while (i <= 96) {
_root["area" + i].gotoAndStop(15);
i++;
}
wilayah_mc.gotoAndStop(2);
instruction_mc._visible = true;
instruction_mc.next_btn.onRelease = function () {
init();
inisialisasiWilayah();
menujuKe = indi;
gotoAndStop (224);
backVillage();
instruction_mc._visible = false;
};
}
if (jenisPerintah == "diserangLawan") {
paketArea(false);
}
_root.onEnterFrame = function () {
if (menit >= 60) {
jam++;
menit = 0;
}
if (jam >= 24) {
jam = 0;
menit = 0;
cekNextTurn();
}
if (jam < 10) {
zjam = "0" + jam;
} else {
zjam = jam;
}
if (menit < 10) {
zmenit = "0" + menit;
} else {
zmenit = menit;
}
clock = (zjam + ":") + zmenit;
};
Instance of Symbol 1360 MovieClip in Frame 217
on (release) {
getURL ("http://www.maxgames.com/game/imperium.html", "_blank");
}
Instance of Symbol 24 MovieClip in Frame 217
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 219
play();
Frame 220
loadData();
Frame 223
asalUsul = "load";
gotoAndStop (217);
Frame 224
function cekBangunanAda(indi) {
bisaBangunan = false;
i = 1;
while (i <= 100) {
if (_root["kotak" + i]._currentframe == indi) {
bisaBangunan = true;
}
i++;
}
}
function overBangunan() {
if (sedangTekan == false) {
myStr = new String(this);
if (myStr.length == 17) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 18) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
msgBox_mc._visible = true;
if (_root._xmouse >= 400) {
msgBox_mc._x = this._x - 200;
msgBox_mc._y = this._y;
} else {
msgBox_mc._x = this._x + 200;
msgBox_mc._y = this._y;
}
msgBox_mc.gotoAndStop(1);
msgBox_mc.nama = arrayNama[indi];
msgBox_mc.gold = arrayGold[indi];
msgBox_mc.food = arrayFood[indi];
msgBox_mc.wood = arrayWood[indi];
msgBox_mc.iron = arrayIron[indi];
msgBox_mc.clay = arrayClay[indi];
msgBox_mc.penjelasan = arrayPenjelasan[indi];
}
}
function outBangunan() {
msgBox_mc._visible = false;
}
function overBangunan2() {
this.kotak._alpha = 100;
if ((sedangTekan == false) && (this._currentframe != 1)) {
myStr = new String(this);
indi = this._currentframe - 1;
msgBox_mc._visible = true;
if (_root._xmouse >= 400) {
if (indi >= 14) {
msgBox_mc._x = this._x - 125;
msgBox_mc._y = this._y;
} else {
msgBox_mc._x = this._x - 200;
msgBox_mc._y = this._y;
}
} else if (indi >= 14) {
msgBox_mc._x = this._x + 125;
msgBox_mc._y = this._y;
} else {
msgBox_mc._x = this._x + 200;
msgBox_mc._y = this._y;
}
myStr = new String(this);
if (myStr.length == 14) {
zindi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 15) {
zindi = Number(myStr.substr(myStr.length - 2, 2));
} else if (myStr.length == 16) {
zindi = Number(myStr.substr(myStr.length - 3, 3));
}
if (indi == 23) {
msgBox_mc.gotoAndStop(1);
msgBox_mc.nama = ((arrayNama[indi] + " (level ") + upgradeKotak[menujuKe][zindi]) + ")";
msgBox_mc.gold = arrayGold[indi];
msgBox_mc.food = arrayFood[indi];
msgBox_mc.wood = arrayWood[indi];
msgBox_mc.iron = arrayIron[indi];
msgBox_mc.clay = arrayClay[indi];
msgBox_mc.penjelasan = arrayPenjelasan[indi];
} else if (indi >= 14) {
msgBox_mc.gotoAndStop(2);
msgBox_mc.nama = "Trees";
msgBox_mc.penjelasan = "Click here to destroy, needs 200 golds.";
} else {
msgBox_mc.gotoAndStop(1);
msgBox_mc.nama = ((arrayNama[indi] + " (level ") + upgradeKotak[menujuKe][zindi]) + ")";
msgBox_mc.gold = arrayGold[indi];
msgBox_mc.food = arrayFood[indi];
msgBox_mc.wood = arrayWood[indi];
msgBox_mc.iron = arrayIron[indi];
msgBox_mc.clay = arrayClay[indi];
msgBox_mc.penjelasan = arrayPenjelasan[indi];
}
}
}
function outBangunan2() {
this.kotak._alpha = 5;
msgBox_mc._visible = false;
}
function pressBangunan() {
myStr = new String(this);
if (myStr.length == 17) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 18) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (indi == 14) {
jenisBangunan = 23;
}
if (jenisBangunan != indi) {
cekBangunanAda(14);
if ((bisaBangunan == true) && (indi == 10)) {
sedangTekan = true;
if (indi == 14) {
jenisBangunan = 23;
} else {
jenisBangunan = indi;
}
duplicateMovieClip (this, "xbangunan", 99);
xbangunan.gotoAndStop(2);
startDrag (xbangunan, true);
i = 1;
while (i <= 100) {
_root["kotak" + i].enabled = true;
i++;
}
} else if ((bisaBangunan == true) && (indi != 10)) {
sedangTekan = true;
if (indi == 14) {
jenisBangunan = 23;
} else {
jenisBangunan = indi;
}
duplicateMovieClip (this, "xbangunan", 99);
xbangunan.gotoAndStop(2);
startDrag (xbangunan, true);
i = 1;
while (i <= 100) {
_root["kotak" + i].enabled = true;
i++;
}
} else if ((bisaBangunan == false) && (indi != 10)) {
sedangTekan = true;
if (indi == 14) {
jenisBangunan = 23;
} else {
jenisBangunan = indi;
}
duplicateMovieClip (this, "xbangunan", 99);
xbangunan.gotoAndStop(2);
startDrag (xbangunan, true);
i = 1;
while (i <= 100) {
_root["kotak" + i].enabled = true;
i++;
}
} else {
informasi = "Unable to build, build Academy first.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to build, build Academy first.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
} else {
sedangTekan = false;
removeMovieClip(xbangunan);
jenisBangunan = 0;
}
}
function overKotak() {
}
function outKotak() {
}
function klikKotak() {
myStr = new String(this);
if (myStr.length == 14) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 15) {
indi = Number(myStr.substr(myStr.length - 2, 2));
} else if (myStr.length == 16) {
indi = Number(myStr.substr(myStr.length - 3, 3));
}
if (this._currentframe == 1) {
if (((((((_root["xgold" + menujuKe] >= arrayGold[jenisBangunan]) && (_root["xfood" + menujuKe] >= arrayFood[jenisBangunan])) && (_root["xwood" + menujuKe] >= arrayWood[jenisBangunan])) && (_root["xiron" + menujuKe] >= arrayIron[jenisBangunan])) && (_root["xclay" + menujuKe] >= arrayClay[jenisBangunan])) && ((_root["worker" + menujuKe] >= arrayWorker[jenisBangunan]) && (jenisBangunan > 1))) || (jenisBangunan == 1)) {
bisaBangun = 0;
if (((jenisBangunan <= 4) && (jenisBangunan != 2)) && (jenisBangunan != 11)) {
if (jenisKotak[menujuKe][indi] == 0) {
bisaBangun = 1;
jenisKotak[menujuKe][indi] = jenisBangunan + 1;
}
} else if (((jenisBangunan <= 7) || (jenisBangunan == 2)) || (jenisBangunan == 11)) {
if ((((((((((indi != 1) && (indi != 11)) && (indi != 21)) && (indi != 31)) && (indi != 41)) && (indi != 51)) && (indi != 61)) && (indi != 71)) && (indi != 81)) && (indi != 91)) {
if ((((jenisKotak[menujuKe][indi] == 0) && (jenisKotak[menujuKe][indi - 1] == 0)) && (jenisKotak[menujuKe][indi - 10] == 0)) && (jenisKotak[menujuKe][indi - 11] == 0)) {
bisaBangun = 1;
jenisKotak[menujuKe][indi] = jenisBangunan + 1;
jenisKotak[menujuKe][indi - 1] = -1;
jenisKotak[menujuKe][indi - 10] = -1;
jenisKotak[menujuKe][indi - 11] = -1;
}
}
} else if (jenisBangunan <= 13) {
if (((((((((((((((((((indi != 1) && (indi != 11)) && (indi != 21)) && (indi != 31)) && (indi != 41)) && (indi != 51)) && (indi != 61)) && (indi != 71)) && (indi != 81)) && (indi != 91)) && (indi != 2)) && (indi != 22)) && (indi != 32)) && (indi != 42)) && (indi != 52)) && (indi != 62)) && (indi != 72)) && (indi != 82)) && (indi != 92)) {
if (((((((((jenisKotak[menujuKe][indi] == 0) && (jenisKotak[menujuKe][indi - 1] == 0)) && (jenisKotak[menujuKe][indi - 2] == 0)) && (jenisKotak[menujuKe][indi - 10] == 0)) && (jenisKotak[menujuKe][indi - 11] == 0)) && (jenisKotak[menujuKe][indi - 12] == 0)) && (jenisKotak[menujuKe][indi - 20] == 0)) && (jenisKotak[menujuKe][indi - 21] == 0)) && (jenisKotak[menujuKe][indi - 22] == 0)) {
bisaBangun = 1;
jenisKotak[menujuKe][indi] = jenisBangunan + 1;
jenisKotak[menujuKe][indi - 1] = -1;
jenisKotak[menujuKe][indi - 2] = -1;
jenisKotak[menujuKe][indi - 10] = -1;
jenisKotak[menujuKe][indi - 11] = -1;
jenisKotak[menujuKe][indi - 12] = -1;
jenisKotak[menujuKe][indi - 20] = -1;
jenisKotak[menujuKe][indi - 21] = -1;
jenisKotak[menujuKe][indi - 22] = -1;
}
}
} else if (jenisBangunan == 23) {
if (((((((((((((((((((indi != 1) && (indi != 11)) && (indi != 21)) && (indi != 31)) && (indi != 41)) && (indi != 51)) && (indi != 61)) && (indi != 71)) && (indi != 81)) && (indi != 91)) && (indi != 2)) && (indi != 22)) && (indi != 32)) && (indi != 42)) && (indi != 52)) && (indi != 62)) && (indi != 72)) && (indi != 82)) && (indi != 92)) {
if (((((((((jenisKotak[menujuKe][indi] == 0) && (jenisKotak[menujuKe][indi - 1] == 0)) && (jenisKotak[menujuKe][indi - 2] == 0)) && (jenisKotak[menujuKe][indi - 10] == 0)) && (jenisKotak[menujuKe][indi - 11] == 0)) && (jenisKotak[menujuKe][indi - 12] == 0)) && (jenisKotak[menujuKe][indi - 20] == 0)) && (jenisKotak[menujuKe][indi - 21] == 0)) && (jenisKotak[menujuKe][indi - 22] == 0)) {
bisaBangun = 1;
jenisKotak[menujuKe][indi] = jenisBangunan + 1;
jenisKotak[menujuKe][indi - 1] = -1;
jenisKotak[menujuKe][indi - 2] = -1;
jenisKotak[menujuKe][indi - 10] = -1;
jenisKotak[menujuKe][indi - 11] = -1;
jenisKotak[menujuKe][indi - 12] = -1;
jenisKotak[menujuKe][indi - 20] = -1;
jenisKotak[menujuKe][indi - 21] = -1;
jenisKotak[menujuKe][indi - 22] = -1;
}
}
}
if (bisaBangun == 1) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - arrayGold[jenisBangunan];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - arrayFood[jenisBangunan];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - arrayWood[jenisBangunan];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - arrayIron[jenisBangunan];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - arrayClay[jenisBangunan];
if (jenisBangunan == 1) {
_root["people" + menujuKe] = _root["people" + menujuKe] + 50;
_root["worker" + menujuKe] = _root["worker" + menujuKe] + 25;
} else {
_root["worker" + menujuKe] = _root["worker" + menujuKe] - arrayWorker[jenisBangunan];
}
if (jenisBangunan == 23) {
_root["worker" + menujuKe] = _root["worker" + menujuKe] * 2;
_root["worker" + menujuKe] = Math.ceil(_root["worker" + menujuKe]);
}
cekInfo(menujuKe);
this.gotoAndStop(jenisBangunan + 1);
removeMovieClip(xbangunan);
i = 1;
while (i <= 100) {
if (_root["kotak" + i]._currentframe == 1) {
_root["kotak" + i].enabled = false;
} else {
_root["kotak" + i].enabled = true;
}
if (jenisKotak[menujuKe][i] == -1) {
_root["kotak" + i].gotoAndStop(25);
}
i++;
}
jenisBangunan = 0;
sedangTekan = false;
informasi = "";
} else if (jenisKotak[menujuKe][indi] == 99) {
informasi = "Can't create any buildings on water, mount, or forbidden tree areas.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Can't create any buildings on water, mount, or forbidden tree areas.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else {
informasi = "The area can not be occupied, find other areas or sell the blocking objects.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "The area can not be occupied, find other areas or sell the blocking objects.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
} else {
kurangAjar1 = "";
kurangAjar2 = "";
kurangAjar3 = "";
kurangAjar4 = "";
kurangAjar5 = "";
kurangApa = new Array();
adaBerapa = 0;
if (_root["xgold" + menujuKe] < arrayGold[jenisBangunan]) {
kurangAjar1 = "xgold";
kurangApa[adaBerapa] = "gold";
adaBerapa++;
}
if (_root["xfood" + menujuKe] < arrayFood[jenisBangunan]) {
kurangAjar2 = "xfood";
kurangApa[adaBerapa] = "food";
adaBerapa++;
}
if (_root["xwood" + menujuKe] < arrayWood[jenisBangunan]) {
kurangAjar3 = "xwood";
kurangApa[adaBerapa] = "wood";
adaBerapa++;
}
if (_root["xiron" + menujuKe] < arrayIron[jenisBangunan]) {
kurangAjar4 = "xiron";
kurangApa[adaBerapa] = "iron";
adaBerapa++;
}
if (_root["xclay" + menujuKe] < arrayIron[jenisBangunan]) {
kurangAjar5 = "xclay";
kurangApa[adaBerapa] = "clay";
adaBerapa++;
}
if (_root["worker" + menujuKe] < arrayWorker[jenisBangunan]) {
kurangAjar6 = "worker";
kurangApa[adaBerapa] = "worker";
adaBerapa++;
}
if (adaBerapa == 1) {
if (kurangAjar1 != "") {
informasi = "Unable to create buildings. No enough gold.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough gold.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else if (kurangAjar2 != "") {
informasi = "Unable to create buildings. No enough food.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough food.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else if (kurangAjar3 != "") {
informasi = "Unable to create buildings. No enough wood.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough wood.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else if (kurangAjar4 != "") {
informasi = "Unable to create buildings. No enough iron.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough iron.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else if (kurangAjar5 != "") {
informasi = "Unable to create buildings. No enough clay.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough clay.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else if (kurangAjar6 != "") {
informasi = "Unable to create buildings. No enough worker.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough worker.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
} else {
total = "";
w = 0;
while (w <= (adaBerapa - 1)) {
total = total + kurangApa[w];
if (w == (adaBerapa - 2)) {
total = total + " & ";
} else if (w == (adaBerapa - 1)) {
total = total + ". ";
} else {
total = total + ", ";
}
w++;
}
if (jenisKotak[menujuKe][indi] == 99) {
informasi = "Can't create any buildings on water, mount, or forbidden tree areas.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Can't create any buildings on water, mount, or forbidden tree areas.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else {
informasi = "Unable to create buildings. No enough " + total;
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough " + total;
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
}
}
} else if (sedangTekan == false) {
if (this._currentframe != 1) {
idKlik = this._currentframe - 1;
if ((idKlik >= 14) && (idKlik <= 20)) {
if (_root["xgold" + menujuKe] >= 200) {
this.gotoAndStop(1);
this.enabled = false;
msgBox_mc._visible = false;
jenisKotak[menujuKe][indi] = 0;
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - 200;
cekInfo(menujuKe);
} else {
informasi = "Unable to destroy buildings. No enough gold.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to destroy buildings. No enough gold.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
} else {
cekBangunan(this);
}
}
}
}
function cekBangunan(zindi) {
if (zindi._currentframe == 14) {
msgBox2_mc.gotoAndStop(3);
hargaUpgradeGold = new Array("", 100000, 125000, 150000, 175000, 200000);
hargaUpgradeFood = new Array("", 75000, 100000, 125000, 150000, 175000);
hargaUpgradeWood = new Array("", 25000, 35000, 50000, 75000, 100000);
hargaUpgradeIron = new Array("", 12500, 20000, 35000, 50000, 75000);
hargaUpgradeClay = new Array("", 10000, 15000, 25000, 35000, 50000);
if (jenisUpgrade1 == false) {
msgBox2_mc.upgrade1.enabled = true;
msgBox2_mc.upgrade1.gotoAndStop(1);
} else {
msgBox2_mc.upgrade1.enabled = false;
msgBox2_mc.upgrade1.gotoAndStop(2);
}
if (jenisUpgrade2 == false) {
msgBox2_mc.upgrade2.enabled = true;
msgBox2_mc.upgrade2.gotoAndStop(1);
} else {
msgBox2_mc.upgrade2.enabled = false;
msgBox2_mc.upgrade2.gotoAndStop(2);
}
if (jenisUpgrade3 == false) {
msgBox2_mc.upgrade3.enabled = true;
msgBox2_mc.upgrade3.gotoAndStop(1);
} else {
msgBox2_mc.upgrade3.enabled = false;
msgBox2_mc.upgrade3.gotoAndStop(2);
}
if (jenisUpgrade4 == false) {
msgBox2_mc.upgrade4.enabled = true;
msgBox2_mc.upgrade4.gotoAndStop(1);
} else {
msgBox2_mc.upgrade4.enabled = false;
msgBox2_mc.upgrade4.gotoAndStop(2);
}
if (jenisUpgrade5 == false) {
msgBox2_mc.upgrade5.enabled = true;
msgBox2_mc.upgrade5.gotoAndStop(1);
} else {
msgBox2_mc.upgrade5.enabled = false;
msgBox2_mc.upgrade5.gotoAndStop(2);
}
msgBox2_mc.upgrade1.onRollOut = (msgBox2_mc.upgrade2.onRollOut = (msgBox2_mc.upgrade3.onRollOut = (msgBox2_mc.upgrade4.onRollOut = (msgBox2_mc.upgrade5.onRollOut = function () {
msgBox2_mc.zgold = "";
msgBox2_mc.zfood = "";
msgBox2_mc.zwood = "";
msgBox2_mc.ziron = "";
msgBox2_mc.zclay = "";
}))));
msgBox2_mc.upgrade1.onRollOver = function () {
msgBox2_mc.zgold = hargaUpgradeGold[1];
msgBox2_mc.zfood = hargaUpgradeFood[1];
msgBox2_mc.zwood = hargaUpgradeWood[1];
msgBox2_mc.ziron = hargaUpgradeIron[1];
msgBox2_mc.zclay = hargaUpgradeClay[1];
};
msgBox2_mc.upgrade2.onRollOver = function () {
msgBox2_mc.zgold = hargaUpgradeGold[2];
msgBox2_mc.zfood = hargaUpgradeFood[2];
msgBox2_mc.zwood = hargaUpgradeWood[2];
msgBox2_mc.ziron = hargaUpgradeIron[2];
msgBox2_mc.zclay = hargaUpgradeClay[2];
};
msgBox2_mc.upgrade3.onRollOver = function () {
msgBox2_mc.zgold = hargaUpgradeGold[3];
msgBox2_mc.zfood = hargaUpgradeFood[3];
msgBox2_mc.zwood = hargaUpgradeWood[3];
msgBox2_mc.ziron = hargaUpgradeIron[3];
msgBox2_mc.zclay = hargaUpgradeClay[3];
};
msgBox2_mc.upgrade4.onRollOver = function () {
msgBox2_mc.zgold = hargaUpgradeGold[4];
msgBox2_mc.zfood = hargaUpgradeFood[4];
msgBox2_mc.zwood = hargaUpgradeWood[4];
msgBox2_mc.ziron = hargaUpgradeIron[4];
msgBox2_mc.zclay = hargaUpgradeClay[4];
};
msgBox2_mc.upgrade5.onRollOver = function () {
msgBox2_mc.zgold = hargaUpgradeGold[5];
msgBox2_mc.zfood = hargaUpgradeFood[5];
msgBox2_mc.zwood = hargaUpgradeWood[5];
msgBox2_mc.ziron = hargaUpgradeIron[5];
msgBox2_mc.zclay = hargaUpgradeClay[5];
};
msgBox2_mc.upgrade1.onRelease = function () {
if (((((_root["xgold" + menujuKe] >= hargaUpgradeGold[1]) && (_root["xfood" + menujuKe] >= hargaUpgradeFood[1])) && (_root["xwood" + menujuKe] >= hargaUpgradeWood[1])) && (_root["xiron" + menujuKe] >= hargaUpgradeIron[1])) && (_root["xclay" + menujuKe] >= hargaUpgradeClay[1])) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - hargaUpgradeGold[1];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - hargaUpgradeFood[1];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - hargaUpgradeWood[1];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - hargaUpgradeIron[1];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - hargaUpgradeClay[1];
cekInfo(menujuKe);
jenisUpgrade1 = true;
msgBox2_mc.upgrade1.enabled = false;
msgBox2_mc.upgrade1.gotoAndStop(2);
} else {
informasi = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
msgBox2_mc.upgrade2.onRelease = function () {
if (((((_root["xgold" + menujuKe] >= hargaUpgradeGold[2]) && (_root["xfood" + menujuKe] >= hargaUpgradeFood[2])) && (_root["xwood" + menujuKe] >= hargaUpgradeWood[2])) && (_root["xiron" + menujuKe] >= hargaUpgradeIron[2])) && (_root["xclay" + menujuKe] >= hargaUpgradeClay[2])) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - hargaUpgradeGold[2];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - hargaUpgradeFood[2];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - hargaUpgradeWood[2];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - hargaUpgradeIron[2];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - hargaUpgradeClay[2];
cekInfo(menujuKe);
jenisUpgrade2 = true;
msgBox2_mc.upgrade2.enabled = false;
msgBox2_mc.upgrade2.gotoAndStop(2);
} else {
informasi = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
msgBox2_mc.upgrade3.onRelease = function () {
if (((((_root["xgold" + menujuKe] >= hargaUpgradeGold[3]) && (_root["xfood" + menujuKe] >= hargaUpgradeFood[3])) && (_root["xwood" + menujuKe] >= hargaUpgradeWood[3])) && (_root["xiron" + menujuKe] >= hargaUpgradeIron[3])) && (_root["xclay" + menujuKe] >= hargaUpgradeClay[3])) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - hargaUpgradeGold[3];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - hargaUpgradeFood[3];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - hargaUpgradeWood[3];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - hargaUpgradeIron[3];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - hargaUpgradeClay[3];
cekInfo(menujuKe);
jenisUpgrade3 = true;
msgBox2_mc.upgrade3.enabled = false;
msgBox2_mc.upgrade3.gotoAndStop(2);
} else {
informasi = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
msgBox2_mc.upgrade4.onRelease = function () {
if (((((_root["xgold" + menujuKe] >= hargaUpgradeGold[4]) && (_root["xfood" + menujuKe] >= hargaUpgradeFood[4])) && (_root["xwood" + menujuKe] >= hargaUpgradeWood[4])) && (_root["xiron" + menujuKe] >= hargaUpgradeIron[4])) && (_root["xclay" + menujuKe] >= hargaUpgradeClay[4])) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - hargaUpgradeGold[4];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - hargaUpgradeFood[4];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - hargaUpgradeWood[4];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - hargaUpgradeIron[4];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - hargaUpgradeClay[4];
cekInfo(menujuKe);
jenisUpgrade4 = true;
msgBox2_mc.upgrade4.enabled = false;
msgBox2_mc.upgrade4.gotoAndStop(2);
} else {
informasi = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
msgBox2_mc.upgrade5.onRelease = function () {
if (((((_root["xgold" + menujuKe] >= hargaUpgradeGold[5]) && (_root["xfood" + menujuKe] >= hargaUpgradeFood[5])) && (_root["xwood" + menujuKe] >= hargaUpgradeWood[5])) && (_root["xiron" + menujuKe] >= hargaUpgradeIron[5])) && (_root["xclay" + menujuKe] >= hargaUpgradeClay[5])) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - hargaUpgradeGold[5];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - hargaUpgradeFood[5];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - hargaUpgradeWood[5];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - hargaUpgradeIron[5];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - hargaUpgradeClay[5];
cekInfo(menujuKe);
jenisUpgrade5 = true;
if (jenisUpgrade5 == true) {
arrayGold = new Array("", 300, 400, 600, 800, 1000, 1500, 4000, 6000, 7000, 11000, 2250, 7500, 20000, 35000, 100, 200, 70, 200, 100, 150);
} else {
arrayGold = new Array("", 500, 750, 1000, 1250, 1500, 2000, 5000, 7500, 10000, 15000, 2500, 10000, 25000, 50000, 150, 250, 100, 250, 150, 200);
}
msgBox2_mc.upgrade5.enabled = false;
msgBox2_mc.upgrade5.gotoAndStop(2);
} else {
informasi = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
msgBox2_mc.sell_btn.onRelease = klikSell2;
} else if (zindi._currentframe == 8) {
msgBox2_mc.gotoAndStop(4);
hargaUpgradeGold = new Array("", 10000, 12500, 15000, 17500);
hargaUpgradeFood = new Array("", 7500, 10000, 12500, 15000);
hargaUpgradeWood = new Array("", 2500, 3500, 5000, 7500);
hargaUpgradeIron = new Array("", 1250, 2000, 3500, 5000);
hargaUpgradeClay = new Array("", 1000, 1500, 2500, 3500);
if (_root["senjataBisa1" + menujuKe] == 1) {
msgBox2_mc.senjata1z.enabled = false;
msgBox2_mc.senjata1z.gotoAndStop(2);
} else {
msgBox2_mc.senjata1z.enabled = true;
msgBox2_mc.senjata1z.gotoAndStop(1);
}
if (_root["senjataBisa2" + menujuKe] == 1) {
msgBox2_mc.senjata2z.enabled = false;
msgBox2_mc.senjata2z.gotoAndStop(2);
} else {
msgBox2_mc.senjata2z.enabled = true;
msgBox2_mc.senjata2z.gotoAndStop(1);
}
if (_root["senjataBisa3" + menujuKe] == 1) {
msgBox2_mc.senjata3z.enabled = false;
msgBox2_mc.senjata3z.gotoAndStop(2);
} else {
msgBox2_mc.senjata3z.enabled = true;
msgBox2_mc.senjata3z.gotoAndStop(1);
}
if (_root["senjataBisa4" + menujuKe] == 1) {
msgBox2_mc.senjata4z.enabled = false;
msgBox2_mc.senjata4z.gotoAndStop(2);
} else {
msgBox2_mc.senjata4z.enabled = true;
msgBox2_mc.senjata4z.gotoAndStop(1);
}
msgBox2_mc.senjata1z.onRollOver = function () {
msgBox2_mc.zgold = hargaUpgradeGold[1];
msgBox2_mc.zfood = hargaUpgradeFood[1];
msgBox2_mc.zwood = hargaUpgradeWood[1];
msgBox2_mc.ziron = hargaUpgradeIron[1];
msgBox2_mc.zclay = hargaUpgradeClay[1];
};
msgBox2_mc.senjata2z.onRollOver = function () {
msgBox2_mc.zgold = hargaUpgradeGold[2];
msgBox2_mc.zfood = hargaUpgradeFood[2];
msgBox2_mc.zwood = hargaUpgradeWood[2];
msgBox2_mc.ziron = hargaUpgradeIron[2];
msgBox2_mc.zclay = hargaUpgradeClay[2];
};
msgBox2_mc.senjata3z.onRollOver = function () {
msgBox2_mc.zgold = hargaUpgradeGold[3];
msgBox2_mc.zfood = hargaUpgradeFood[3];
msgBox2_mc.zwood = hargaUpgradeWood[3];
msgBox2_mc.ziron = hargaUpgradeIron[3];
msgBox2_mc.zclay = hargaUpgradeClay[3];
};
msgBox2_mc.senjata4z.onRollOver = function () {
msgBox2_mc.zgold = hargaUpgradeGold[4];
msgBox2_mc.zfood = hargaUpgradeFood[4];
msgBox2_mc.zwood = hargaUpgradeWood[4];
msgBox2_mc.ziron = hargaUpgradeIron[4];
msgBox2_mc.zclay = hargaUpgradeClay[4];
};
msgBox2_mc.senjata1z.onRelease = function () {
if (((((_root["xgold" + menujuKe] >= hargaUpgradeGold[1]) && (_root["xfood" + menujuKe] >= hargaUpgradeFood[1])) && (_root["xwood" + menujuKe] >= hargaUpgradeWood[1])) && (_root["xiron" + menujuKe] >= hargaUpgradeIron[1])) && (_root["xclay" + menujuKe] >= hargaUpgradeClay[1])) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - hargaUpgradeGold[1];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - hargaUpgradeFood[1];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - hargaUpgradeWood[1];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - hargaUpgradeIron[1];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - hargaUpgradeClay[1];
cekInfo(menujuKe);
_root["senjataBisa1" + menujuKe] = 1;
msgBox2_mc.senjata1z.enabled = false;
msgBox2_mc.senjata1z.gotoAndStop(2);
} else {
informasi = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
msgBox2_mc.senjata2z.onRelease = function () {
if (((((_root["xgold" + menujuKe] >= hargaUpgradeGold[2]) && (_root["xfood" + menujuKe] >= hargaUpgradeFood[2])) && (_root["xwood" + menujuKe] >= hargaUpgradeWood[2])) && (_root["xiron" + menujuKe] >= hargaUpgradeIron[2])) && (_root["xclay" + menujuKe] >= hargaUpgradeClay[2])) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - hargaUpgradeGold[2];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - hargaUpgradeFood[2];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - hargaUpgradeWood[2];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - hargaUpgradeIron[2];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - hargaUpgradeClay[2];
cekInfo(menujuKe);
_root["senjataBisa2" + menujuKe] = 1;
msgBox2_mc.senjata2z.enabled = false;
msgBox2_mc.senjata2z.gotoAndStop(2);
} else {
informasi = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
msgBox2_mc.senjata3z.onRelease = function () {
if (((((_root["xgold" + menujuKe] >= hargaUpgradeGold[3]) && (_root["xfood" + menujuKe] >= hargaUpgradeFood[3])) && (_root["xwood" + menujuKe] >= hargaUpgradeWood[3])) && (_root["xiron" + menujuKe] >= hargaUpgradeIron[3])) && (_root["xclay" + menujuKe] >= hargaUpgradeClay[3])) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - hargaUpgradeGold[3];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - hargaUpgradeFood[3];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - hargaUpgradeWood[3];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - hargaUpgradeIron[3];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - hargaUpgradeClay[3];
cekInfo(menujuKe);
_root["senjataBisa3" + menujuKe] = 1;
msgBox2_mc.senjata3z.enabled = false;
msgBox2_mc.senjata3z.gotoAndStop(2);
} else {
informasi = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
msgBox2_mc.senjata4z.onRelease = function () {
if (((((_root["xgold" + menujuKe] >= hargaUpgradeGold[4]) && (_root["xfood" + menujuKe] >= hargaUpgradeFood[4])) && (_root["xwood" + menujuKe] >= hargaUpgradeWood[4])) && (_root["xiron" + menujuKe] >= hargaUpgradeIron[4])) && (_root["xclay" + menujuKe] >= hargaUpgradeClay[4])) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - hargaUpgradeGold[4];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - hargaUpgradeFood[4];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - hargaUpgradeWood[4];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - hargaUpgradeIron[4];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - hargaUpgradeClay[4];
cekInfo(menujuKe);
_root["senjataBisa4" + menujuKe] = 1;
msgBox2_mc.senjata4z.enabled = false;
msgBox2_mc.senjata4z.gotoAndStop(2);
} else {
informasi = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to upgrade buildings. No enough resources.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
msgBox2_mc.sell_btn.onRelease = klikSell;
} else {
msgBox2_mc.gotoAndStop(1);
msgBox2_mc.sell_btn.onRelease = klikSell;
}
msgBox2_mc._visible = true;
msgBox_mc._visible = false;
bisaKlik(false);
msgBox2_mc._x = 400;
msgBox2_mc._y = 300;
msgBox2_mc.nama = arrayNama[idKlik];
msgBox2_mc.upgrade_btn.onRelease = klikUpgrade;
msgBox2_mc.production_btn.onRelease = klikProduction;
if ((zindi._currentframe == 9) || (zindi._currentframe == 9)) {
msgBox2_mc.production_btn.enabled = true;
} else {
msgBox2_mc.production_btn.enabled = false;
}
msgBox2_mc.close_btn.onRelease = function () {
bisaKlik(true);
msgBox2_mc._visible = false;
};
msgBox2_mc.production_btn.onRelease = function () {
msgBox2_mc.gotoAndStop(2);
if (_root["senjataBisa1" + menujuKe] == 1) {
msgBox2_mc.senjata1._visible = true;
} else {
_root["produksiSword" + menujuKe] = 0;
msgBox2_mc.senjata1._visible = false;
}
if (_root["senjataBisa2" + menujuKe] == 1) {
msgBox2_mc.senjata2._visible = true;
} else {
msgBox2_mc.senjata2._visible = false;
_root["produksiAxe" + menujuKe] = 0;
}
if (_root["senjataBisa3" + menujuKe] == 1) {
msgBox2_mc.senjata3._visible = true;
} else {
msgBox2_mc.senjata3._visible = false;
_root["produksiSpear" + menujuKe] = 0;
}
if (_root["senjataBisa4" + menujuKe] == 1) {
msgBox2_mc.senjata4._visible = true;
} else {
msgBox2_mc.senjata4._visible = false;
_root["produksiBow" + menujuKe] = 0;
}
msgBox2_mc.senjata1.swordx = _root["produksiSword" + menujuKe];
msgBox2_mc.senjata2.axex = _root["produksiAxe" + menujuKe];
msgBox2_mc.senjata3.spearx = _root["produksiSpear" + menujuKe];
msgBox2_mc.senjata4.bowx = _root["produksiBow" + menujuKe];
msgBox2_mc.senjata1.swordy = _root["sword" + menujuKe];
msgBox2_mc.senjata2.axey = _root["axe" + menujuKe];
msgBox2_mc.senjata3.speary = _root["spear" + menujuKe];
msgBox2_mc.senjata4.bowy = _root["bow" + menujuKe];
msgBox2_mc.informasi = ((("Maximum soldier train per day: " + (2 * upgradeKotak[menujuKe][indi])) + ", don't input total of train more than ") + (2 * upgradeKotak[menujuKe][indi])) + ".";
msgBox2_mc.back_btn.onRelease = function () {
trace(msgBox2_mc.senjata1.sword_tx.text);
if ((isNaN(msgBox2_mc.senjata1.sword_tx.text) || (msgBox2_mc.senjata1.sword_tx.text <= 0)) || (msgBox2_mc.senjata1.sword_tx.text == "")) {
msgBox2_mc.senjata1.sword_tx.text = 0;
}
if ((isNaN(msgBox2_mc.senjata2.axe_tx.text) || (msgBox2_mc.senjata2.axe_tx.text <= 0)) || (msgBox2_mc.senjata2.axe_tx.text == "")) {
msgBox2_mc.senjata2.axe_tx.text = 0;
}
if ((isNaN(msgBox2_mc.senjata3.spear_tx.text) || (msgBox2_mc.senjata3.spear_tx.text <= 0)) || (msgBox2_mc.senjata3.spear_tx.text == "")) {
msgBox2_mc.senjata3.spear_tx.text = 0;
}
if ((isNaN(msgBox2_mc.senjata4.bow_tx.text) || (msgBox2_mc.senjata4.bow_tx.text <= 0)) || (msgBox2_mc.senjata4.bow_tx.text == "")) {
msgBox2_mc.senjata4.bow_tx.text = 0;
}
trace(((Number(msgBox2_mc.senjata1.sword_tx.text) + Number(msgBox2_mc.senjata2.axe_tx.text)) + Number(msgBox2_mc.senjata3.spear_tx.text)) + Number(msgBox2_mc.senjata4.bow_tx.text));
trace(2 * upgradeKotak[menujuKe][indi]);
if ((((Number(msgBox2_mc.senjata1.sword_tx.text) + Number(msgBox2_mc.senjata2.axe_tx.text)) + Number(msgBox2_mc.senjata3.spear_tx.text)) + Number(msgBox2_mc.senjata4.bow_tx.text)) > (2 * upgradeKotak[menujuKe][indi])) {
msgBox2_mc.senjata1.sword_tx.text = 0;
msgBox2_mc.senjata2.axe_tx.text = 0;
msgBox2_mc.senjata3.spear_tx.text = 0;
msgBox2_mc.senjata4.bow_tx.text = 0;
}
trace(msgBox2_mc.senjata1.sword_tx.text);
_root["produksiSword" + menujuKe] = msgBox2_mc.senjata1.sword_tx.text;
_root["produksiAxe" + menujuKe] = msgBox2_mc.senjata2.axe_tx.text;
_root["produksiSpear" + menujuKe] = msgBox2_mc.senjata3.spear_tx.text;
_root["produksiBow" + menujuKe] = msgBox2_mc.senjata4.bow_tx.text;
cekBangunan(zindi);
};
};
}
function klikUpgrade() {
jenisBangunan = idKlik;
if ((((((_root["xgold" + menujuKe] >= arrayGold[jenisBangunan]) && (_root["xfood" + menujuKe] >= arrayFood[jenisBangunan])) && (_root["xwood" + menujuKe] >= arrayWood[jenisBangunan])) && (_root["xiron" + menujuKe] >= arrayIron[jenisBangunan])) && (_root["xclay" + menujuKe] >= arrayClay[jenisBangunan])) && (_root["worker" + menujuKe] >= arrayWorker[jenisBangunan])) {
maksimumLevelx = 2;
if (upgradeKotak[menujuKe][indi] <= maksimumLevelx) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - arrayGold[jenisBangunan];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - arrayFood[jenisBangunan];
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - arrayWood[jenisBangunan];
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - arrayIron[jenisBangunan];
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - arrayIron[jenisBangunan];
if (idKlik == 1) {
_root["people" + menujuKe] = _root["people" + menujuKe] + 50;
_root["worker" + menujuKe] = _root["worker" + menujuKe] + 25;
} else {
_root["worker" + menujuKe] = _root["worker" + menujuKe] - arrayWorker[jenisBangunan];
}
msgBox2_mc._visible = false;
bisaKlik(true);
upgradeKotak[menujuKe][indi]++;
_root["kotak" + indi].levelx = "Level " + upgradeKotak[menujuKe][indi];
cekInfo(menujuKe);
} else {
informasi = "Unable to upgrade more, level 3 is the maximum.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to upgrade more, level 3 is the maximum.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
} else {
kurangAjar1 = "";
kurangAjar2 = "";
kurangAjar3 = "";
kurangAjar4 = "";
kurangAjar5 = "";
kurangApa = new Array();
adaBerapa = 0;
if (_root["xgold" + menujuKe] < arrayGold[jenisBangunan]) {
kurangAjar1 = "xgold";
kurangApa[adaBerapa] = "gold";
adaBerapa++;
}
if (_root["xfood" + menujuKe] < arrayFood[jenisBangunan]) {
kurangAjar2 = "xfood";
kurangApa[adaBerapa] = "food";
adaBerapa++;
}
if (_root["xwood" + menujuKe] < arrayWood[jenisBangunan]) {
kurangAjar3 = "xwood";
kurangApa[adaBerapa] = "wood";
adaBerapa++;
}
if (_root["xiron" + menujuKe] < arrayIron[jenisBangunan]) {
kurangAjar4 = "xiron";
kurangApa[adaBerapa] = "iron";
adaBerapa++;
}
if (_root["xclay" + menujuKe] < arrayIron[jenisBangunan]) {
kurangAjar5 = "xclay";
kurangApa[adaBerapa] = "clay";
adaBerapa++;
}
if (_root["worker" + menujuKe] < arrayWorker[jenisBangunan]) {
kurangAjar6 = "worker";
kurangApa[adaBerapa] = "worker";
adaBerapa++;
}
if (adaBerapa == 1) {
if (kurangAjar1 != "") {
informasi = "Unable to create buildings. No enough gold.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough gold.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else if (kurangAjar2 != "") {
informasi = "Unable to create buildings. No enough food.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough food.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else if (kurangAjar3 != "") {
informasi = "Unable to create buildings. No enough wood.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough wood.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else if (kurangAjar4 != "") {
informasi = "Unable to create buildings. No enough iron.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough iron.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else if (kurangAjar5 != "") {
informasi = "Unable to create buildings. No enough clay.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough clay.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
} else if (kurangAjar6 != "") {
informasi = "Unable to create buildings. No enough worker.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough worker.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
} else {
total = "";
w = 0;
while (w <= (adaBerapa - 1)) {
total = total + kurangApa[w];
if (w == (adaBerapa - 2)) {
total = total + " & ";
} else if (w == (adaBerapa - 1)) {
total = total + ". ";
} else {
total = total + ", ";
}
w++;
}
informasi = "Unable to create buildings. No enough " + total;
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to create buildings. No enough " + total;
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
}
}
function klikSell() {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] + Math.ceil((arrayGold[idKlik] * upgradeKotak[menujuKe][indi]) / 2);
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] + Math.ceil((arrayFood[idKlik] * upgradeKotak[menujuKe][indi]) / 2);
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] + Math.ceil((arrayWood[idKlik] * upgradeKotak[menujuKe][indi]) / 2);
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] + Math.ceil((arrayIron[idKlik] * upgradeKotak[menujuKe][indi]) / 2);
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] + Math.ceil((arrayClay[idKlik] * upgradeKotak[menujuKe][indi]) / 2);
if (idKlik == 1) {
_root["people" + menujuKe] = _root["people" + menujuKe] - (50 * upgradeKotak[menujuKe][indi]);
_root["worker" + menujuKe] = _root["worker" + menujuKe] - (25 * upgradeKotak[menujuKe][indi]);
} else {
_root["worker" + menujuKe] = _root["worker" + menujuKe] + (arrayWorker[idKlik] * upgradeKotak[menujuKe][indi]);
}
upgradeKotak[menujuKe][indi] = 1;
_root["kotak" + indi].levelx = "Level " + upgradeKotak[menujuKe][indi];
cekInfo(menujuKe);
if ((idKlik == 2) || (idKlik == 11)) {
_root["kotak" + indi].gotoAndStop(1);
_root["kotak" + (indi - 1)].gotoAndStop(1);
_root["kotak" + (indi - 10)].gotoAndStop(1);
_root["kotak" + (indi - 11)].gotoAndStop(1);
jenisKotak[menujuKe][indi] = 0;
jenisKotak[menujuKe][indi - 1] = 0;
jenisKotak[menujuKe][indi - 10] = 0;
jenisKotak[menujuKe][indi - 11] = 0;
} else if (idKlik <= 4) {
_root["kotak" + indi].gotoAndStop(1);
jenisKotak[menujuKe][indi] = 0;
} else if (idKlik <= 7) {
_root["kotak" + indi].gotoAndStop(1);
_root["kotak" + (indi - 1)].gotoAndStop(1);
_root["kotak" + (indi - 10)].gotoAndStop(1);
_root["kotak" + (indi - 11)].gotoAndStop(1);
jenisKotak[menujuKe][indi] = 0;
jenisKotak[menujuKe][indi - 1] = 0;
jenisKotak[menujuKe][indi - 10] = 0;
jenisKotak[menujuKe][indi - 11] = 0;
} else if (idKlik <= 13) {
_root["kotak" + indi].gotoAndStop(1);
_root["kotak" + (indi - 1)].gotoAndStop(1);
_root["kotak" + (indi - 2)].gotoAndStop(1);
_root["kotak" + (indi - 10)].gotoAndStop(1);
_root["kotak" + (indi - 11)].gotoAndStop(1);
_root["kotak" + (indi - 12)].gotoAndStop(1);
_root["kotak" + (indi - 20)].gotoAndStop(1);
_root["kotak" + (indi - 21)].gotoAndStop(1);
_root["kotak" + (indi - 22)].gotoAndStop(1);
jenisKotak[menujuKe][indi] = 0;
jenisKotak[menujuKe][indi - 1] = 0;
jenisKotak[menujuKe][indi - 2] = 0;
jenisKotak[menujuKe][indi - 10] = 0;
jenisKotak[menujuKe][indi - 11] = 0;
jenisKotak[menujuKe][indi - 12] = 0;
jenisKotak[menujuKe][indi - 20] = 0;
jenisKotak[menujuKe][indi - 21] = 0;
jenisKotak[menujuKe][indi - 22] = 0;
} else if (idKlik == 23) {
_root["kotak" + indi].gotoAndStop(1);
_root["kotak" + (indi - 1)].gotoAndStop(1);
_root["kotak" + (indi - 2)].gotoAndStop(1);
_root["kotak" + (indi - 10)].gotoAndStop(1);
_root["kotak" + (indi - 11)].gotoAndStop(1);
_root["kotak" + (indi - 12)].gotoAndStop(1);
_root["kotak" + (indi - 20)].gotoAndStop(1);
_root["kotak" + (indi - 21)].gotoAndStop(1);
_root["kotak" + (indi - 22)].gotoAndStop(1);
jenisKotak[menujuKe][indi] = 0;
jenisKotak[menujuKe][indi - 1] = 0;
jenisKotak[menujuKe][indi - 2] = 0;
jenisKotak[menujuKe][indi - 10] = 0;
jenisKotak[menujuKe][indi - 11] = 0;
jenisKotak[menujuKe][indi - 12] = 0;
jenisKotak[menujuKe][indi - 20] = 0;
jenisKotak[menujuKe][indi - 21] = 0;
jenisKotak[menujuKe][indi - 22] = 0;
}
if (idKlik == 23) {
_root["worker" + menujuKe] = _root["worker" + menujuKe] * 0.5;
_root["worker" + menujuKe] = Math.ceil(_root["worker" + menujuKe]);
}
bisaKlik(true);
msgBox2_mc._visible = false;
}
function klikSell2() {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] + Math.ceil((arrayGold[idKlik] * upgradeKotak[menujuKe][indi]) / 2);
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] + Math.ceil((arrayFood[idKlik] * upgradeKotak[menujuKe][indi]) / 2);
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] + Math.ceil((arrayWood[idKlik] * upgradeKotak[menujuKe][indi]) / 2);
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] + Math.ceil((arrayIron[idKlik] * upgradeKotak[menujuKe][indi]) / 2);
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] + Math.ceil((arrayClay[idKlik] * upgradeKotak[menujuKe][indi]) / 2);
if (idKlik == 1) {
_root["people" + menujuKe] = _root["people" + menujuKe] - (50 * upgradeKotak[menujuKe][indi]);
_root["worker" + menujuKe] = _root["worker" + menujuKe] - (25 * upgradeKotak[menujuKe][indi]);
} else {
_root["worker" + menujuKe] = _root["worker" + menujuKe] + (arrayWorker[idKlik] * upgradeKotak[menujuKe][indi]);
}
upgradeKotak[menujuKe][indi] = 1;
_root["kotak" + indi].levelx = "Level " + upgradeKotak[menujuKe][indi];
cekInfo(menujuKe);
if ((idKlik == 2) || (idKlik == 11)) {
_root["kotak" + indi].gotoAndStop(1);
_root["kotak" + (indi - 1)].gotoAndStop(1);
_root["kotak" + (indi - 10)].gotoAndStop(1);
_root["kotak" + (indi - 11)].gotoAndStop(1);
jenisKotak[menujuKe][indi] = 0;
jenisKotak[menujuKe][indi - 1] = 0;
jenisKotak[menujuKe][indi - 10] = 0;
jenisKotak[menujuKe][indi - 11] = 0;
} else if (idKlik <= 4) {
_root["kotak" + indi].gotoAndStop(1);
jenisKotak[menujuKe][indi] = 0;
} else if (idKlik <= 7) {
_root["kotak" + indi].gotoAndStop(1);
_root["kotak" + (indi - 1)].gotoAndStop(1);
_root["kotak" + (indi - 10)].gotoAndStop(1);
_root["kotak" + (indi - 11)].gotoAndStop(1);
jenisKotak[menujuKe][indi] = 0;
jenisKotak[menujuKe][indi - 1] = 0;
jenisKotak[menujuKe][indi - 10] = 0;
jenisKotak[menujuKe][indi - 11] = 0;
} else if (idKlik <= 13) {
_root["kotak" + indi].gotoAndStop(1);
_root["kotak" + (indi - 1)].gotoAndStop(1);
_root["kotak" + (indi - 2)].gotoAndStop(1);
_root["kotak" + (indi - 10)].gotoAndStop(1);
_root["kotak" + (indi - 11)].gotoAndStop(1);
_root["kotak" + (indi - 12)].gotoAndStop(1);
_root["kotak" + (indi - 20)].gotoAndStop(1);
_root["kotak" + (indi - 21)].gotoAndStop(1);
_root["kotak" + (indi - 22)].gotoAndStop(1);
jenisKotak[menujuKe][indi] = 0;
jenisKotak[menujuKe][indi - 1] = 0;
jenisKotak[menujuKe][indi - 2] = 0;
jenisKotak[menujuKe][indi - 10] = 0;
jenisKotak[menujuKe][indi - 11] = 0;
jenisKotak[menujuKe][indi - 12] = 0;
jenisKotak[menujuKe][indi - 20] = 0;
jenisKotak[menujuKe][indi - 21] = 0;
jenisKotak[menujuKe][indi - 22] = 0;
} else if (idKlik == 23) {
_root["kotak" + indi].gotoAndStop(1);
_root["kotak" + (indi - 1)].gotoAndStop(1);
_root["kotak" + (indi - 2)].gotoAndStop(1);
_root["kotak" + (indi - 10)].gotoAndStop(1);
_root["kotak" + (indi - 11)].gotoAndStop(1);
_root["kotak" + (indi - 12)].gotoAndStop(1);
_root["kotak" + (indi - 20)].gotoAndStop(1);
_root["kotak" + (indi - 21)].gotoAndStop(1);
_root["kotak" + (indi - 22)].gotoAndStop(1);
jenisKotak[menujuKe][indi] = 0;
jenisKotak[menujuKe][indi - 1] = 0;
jenisKotak[menujuKe][indi - 2] = 0;
jenisKotak[menujuKe][indi - 10] = 0;
jenisKotak[menujuKe][indi - 11] = 0;
jenisKotak[menujuKe][indi - 12] = 0;
jenisKotak[menujuKe][indi - 20] = 0;
jenisKotak[menujuKe][indi - 21] = 0;
jenisKotak[menujuKe][indi - 22] = 0;
}
if (idKlik == 23) {
_root["worker" + menujuKe] = _root["worker" + menujuKe] * 0.5;
_root["worker" + menujuKe] = Math.ceil(_root["worker" + menujuKe]);
}
bisaKlik(true);
msgBox2_mc._visible = false;
jenisUpgrade1 = false;
jenisUpgrade2 = false;
jenisUpgrade3 = false;
jenisUpgrade4 = false;
jenisUpgrade5 = false;
if (jenisUpgrade5 == true) {
arrayGold = new Array("", 300, 400, 600, 800, 1000, 1500, 4000, 6000, 7000, 11000, 2250, 7500, 20000, 35000, 100, 200, 70, 200, 100, 150);
} else {
arrayGold = new Array("", 500, 750, 1000, 1250, 1500, 2000, 5000, 7500, 10000, 15000, 2500, 10000, 25000, 50000, 150, 250, 100, 250, 150, 200);
}
}
function bisaKlik(indi) {
i = 1;
while (i <= 100) {
if (((jenisKotak[menujuKe][i] != -1) && (jenisKotak[menujuKe][i] != 0)) && (jenisKotak[menujuKe][i] != 1)) {
_root["kotak" + i].enabled = indi;
}
i++;
}
}
stop();
sedangTekan = false;
cekInfo(menujuKe);
background_mc.gotoAndStop(_root["jenisBackgron" + menujuKe]);
jenisBangunan = 0;
msgBox_mc._visible = false;
msgBox2_mc._visible = false;
msgBox5_mc._visible = false;
info_mc._visible = true;
if (zzawalMain == true) {
tutorial_mc._visible = true;
zzawalMain = false;
} else {
tutorial_mc._visible = false;
}
jenisTempat = "daerah";
informasi = "";
arrayNama = new Array("", "House", "Farm", "Lumber Mill", "Gold Mine", "Market", "Iron Mine", "Black Smith", "Barracks", "Horse Stable", "Catapult Factory", "Brickyard", "Embassy", "Academy", "Palace", "Tree 1", "Tree 2", "Tree 3", "Tree 4", "Tree 5", "Tree 6", "", "", "Palace");
if (jenisUpgrade5 == true) {
arrayGold = new Array("", 300, 400, 600, 800, 1000, 1500, 4000, 6000, 7000, 11000, 2250, 30000, 20000, 35000, 100, 200, 70, 200, 100, 150, 0, 0, 35000);
} else {
arrayGold = new Array("", 500, 750, 1000, 1250, 1500, 2000, 5000, 7500, 10000, 25000, 2500, 40000, 25000, 50000, 150, 250, 100, 250, 150, 200, 0, 0, 50000);
}
arrayFood = new Array("", 500, 0, 1000, 1000, 1500, 2000, 5000, 7000, 9500, 15000, 2000, 20000, 15000, 35000, 0, 0, 0, 0, 0, 0, 0, 0, 35000);
arrayWood = new Array("", 100, 75, 0, 200, 250, 300, 750, 1000, 1250, 3000, 200, 4000, 3500, 4000, 0, 0, 0, 0, 0, 0, 0, 0, 4000);
arrayIron = new Array("", 75, 50, 100, 150, 200, 0, 500, 750, 1000, 4000, 150, 3000, 3000, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 5000);
arrayClay = new Array("", 50, 45, 75, 100, 150, 175, 350, 500, 750, 2500, 0, 2500, 2500, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 3000);
arrayWorker = new Array("", 0, 5, 10, 20, 30, 25, 30, 10, 20, 75, 20, 25, 50, 15, 0, 0, 0, 0, 0, 0, 0, 0, 15);
arrayPenjelasan = new Array("", "Every house in level 1 can host a maximum of 50 persons. Therefor 1 construction will generate 50 people and 25 workers. every resident requires 1 food every day.", "Each rice barn on level 1 needs 5 workers 5 gold per day, the barn can produce 300 meals every day.", "Each wood storage on level 1 requires 10 workers and 10 gold per day, it can produce 80 timber every day.", "Each gold mine on level 1needs 20 workers and 20 golds per day, it can produce 250 golds per day.", "Every market on level 1 requires 30 workers and 45 gold per day, can produce a tax of 500 gold every day, from the market you can move the resource to another city.", "Each iron mines on level 1 requires 25 workers and 50 gold per day, it can produce 60 ironsevery day.", "Blacksmith is the place to make a new weapon better than before, each blacksmith on level 1 needs 30 workers.", "Each army barracks on level 1 requires 10 workers and 120 gold per day, it can produce at least 2 unit troops with various weapons each day.", "Each stable on level 1 requires 20 workers and 50 gold per day, it can produce at least 1 troop of horses every day.", "Each catapult plant on level 1 requires 75 workers and 70 gold per day, it can produce at least 1 catapult every 40 days.", "Each brickyard on level 1 requiress 25 workers and 25 gold per day, produce 40 clay every day.", "Embassy is a place for connecting this city to other cities, either for export or import, every embassy on level 1 requires 25 workers.", "Academy is a learning place, so the city can produce a new war units, each academy on level 1 requires 50 workers.", "Palace is the royal capital , every capital city has special advantages not possessed by other cities, each palace on level 1 requires 15 workers.", "Pohon selain berfungsi untuk menghias kota, dapat juga menjadi sumber utama dalam membuat kayu.", "Pohon selain berfungsi untuk menghias kota, dapat juga menjadi sumber utama dalam membuat kayu.", "Pohon selain berfungsi untuk menghias kota, dapat juga menjadi sumber utama dalam membuat kayu.", "Pohon selain berfungsi untuk menghias kota, dapat juga menjadi sumber utama dalam membuat kayu.", "Pohon selain berfungsi untuk menghias kota, dapat juga menjadi sumber utama dalam membuat kayu.", "Pohon selain berfungsi untuk menghias kota, dapat juga menjadi sumber utama dalam membuat kayu.", "", "", "Palace is the royal capital , every capital city has special advantages not possessed by other cities, each palace on level 1 requires 15 workers.");
i = 1;
while (i <= 100) {
if (jenisKotak[menujuKe][i] == -1) {
_root["kotak" + i].gotoAndStop(25);
} else if (jenisKotak[menujuKe][i] != 99) {
_root["kotak" + i].gotoAndStop(jenisKotak[menujuKe][i]);
}
_root["kotak" + i].levelx = "Level " + upgradeKotak[menujuKe][i];
i++;
}
back_btn.onRelease = function () {
removeMovieClip(xbangunan);
jenisPerintah = "";
gotoAndStop (217);
};
war_btn.onRelease = function () {
if (_root["soldier" + menujuKe] > 0) {
removeMovieClip(xbangunan);
jenisPerintah = "war";
gotoAndStop (217);
} else {
informasi = "Can not do the battle, no army in this city.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Can not do the battle, no army in this city.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
move_btn.onRelease = function () {
cekBangunanAda(6);
if (bisaBangunan == true) {
removeMovieClip(xbangunan);
jenisPerintah = "move";
gotoAndStop (217);
} else {
informasi = "Unable to move, build the Market first.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to move, build the Market first.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
export_btn.onRelease = function () {
cekBangunanAda(13);
if (bisaBangunan == true) {
removeMovieClip(xbangunan);
gotoAndStop (227);
} else {
informasi = "Unable to export, Set up the Embassy first.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to export, Set up the Embassy first.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
import_btn.onRelease = function () {
cekBangunanAda(13);
if (bisaBangunan == true) {
removeMovieClip(xbangunan);
gotoAndStop (228);
} else {
informasi = "Unable to import, Set up the Embassy first.";
msgBox5_mc._visible = true;
msgBox5_mc._x = 400;
msgBox5_mc._y = 300;
msgBox5_mc.info = "Unable to import, Set up the Embassy first.";
msgBox5_mc.ok_btn.onRelease = function () {
msgBox5_mc._visible = false;
};
}
};
i = 1;
while (i <= 20) {
_root["bangunan" + i].onPress = pressBangunan;
_root["bangunan" + i].onRollOver = overBangunan;
_root["bangunan" + i].onRollOut = outBangunan;
i++;
}
i = 1;
while (i <= 100) {
_root["kotak" + i].onRelease = klikKotak;
_root["kotak" + i].onRollOver = overBangunan2;
_root["kotak" + i].onRollOut = outBangunan2;
_root["kotak" + i]._alpha = 100;
if (((jenisKotak[menujuKe][i] == -1) || (jenisKotak[menujuKe][i] == 0)) || (jenisKotak[menujuKe][i] == 1)) {
_root["kotak" + i].enabled = false;
} else {
_root["kotak" + i].enabled = true;
}
i++;
}
_root.cancel_mc.onRelease = function () {
sedangTekan = false;
removeMovieClip(xbangunan);
jenisBangunan = 0;
};
i = 1;
while (i <= 100) {
if (jenisKotak[menujuKe][i] == 99) {
_root["kotak" + i].enabled = false;
}
i++;
}
Instance of Symbol 24 MovieClip in Frame 224
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 226
stop();
moveKemana = (("Move resource from area " + menujuKe) + " to area ") + targetArea;
cancel_btn.onRelease = function () {
gotoAndStop (224);
};
move_btn.onRelease = function () {
bisaMove = true;
if (Number(move1.text) > _root["xgold" + menujuKe]) {
bisaMove = false;
}
if (Number(move2.text) > _root["xfood" + menujuKe]) {
bisaMove = false;
}
if (Number(move3.text) > _root["xwood" + menujuKe]) {
bisaMove = false;
}
if (Number(move4.text) > _root["xiron" + menujuKe]) {
bisaMove = false;
}
if (Number(move5.text) > _root["xclay" + menujuKe]) {
bisaMove = false;
}
if (Number(move6.text) > _root["sword" + menujuKe]) {
bisaMove = false;
}
if (Number(move7.text) > _root["axe" + menujuKe]) {
bisaMove = false;
}
if (Number(move8.text) > _root["spear" + menujuKe]) {
bisaMove = false;
}
if (Number(move9.text) > _root["bow" + menujuKe]) {
bisaMove = false;
}
if (Number(move10.text) > _root["horse" + menujuKe]) {
bisaMove = false;
}
if (Number(move11.text) > _root["catapult" + menujuKe]) {
bisaMove = false;
}
if (bisaMove == true) {
_root["xgold" + targetArea] = _root["xgold" + targetArea] + Number(move1.text);
_root["xfood" + targetArea] = _root["xfood" + targetArea] + Number(move2.text);
_root["xwood" + targetArea] = _root["xwood" + targetArea] + Number(move3.text);
_root["xiron" + targetArea] = _root["xiron" + targetArea] + Number(move4.text);
_root["xclay" + targetArea] = _root["xclay" + targetArea] + Number(move5.text);
_root["sword" + targetArea] = _root["sword" + targetArea] + Number(move6.text);
_root["axe" + targetArea] = _root["axe" + targetArea] + Number(move7.text);
_root["spear" + targetArea] = _root["spear" + targetArea] + Number(move8.text);
_root["bow" + targetArea] = _root["bow" + targetArea] + Number(move9.text);
_root["horse" + targetArea] = _root["horse" + targetArea] + Number(move10.text);
_root["catapult" + targetArea] = _root["catapult" + targetArea] + Number(move11.text);
_root["xcatapult" + targetArea] = _root["catapult" + targetArea];
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - Number(move1.text);
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - Number(move2.text);
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - Number(move3.text);
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - Number(move4.text);
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - Number(move5.text);
_root["sword" + menujuKe] = _root["sword" + menujuKe] - Number(move6.text);
_root["axe" + menujuKe] = _root["axe" + menujuKe] - Number(move7.text);
_root["spear" + menujuKe] = _root["spear" + menujuKe] - Number(move8.text);
_root["bow" + menujuKe] = _root["bow" + menujuKe] - Number(move9.text);
_root["horse" + menujuKe] = _root["horse" + menujuKe] - Number(move10.text);
_root["catapult" + menujuKe] = _root["catapult" + menujuKe] - Number(move11.text);
_root["xcatapult" + menujuKe] = _root["catapult" + menujuKe];
_root["worker" + menujuKe] = _root["worker" + menujuKe] + Number(move6.text);
_root["worker" + menujuKe] = _root["worker" + menujuKe] + Number(move7.text);
_root["worker" + menujuKe] = _root["worker" + menujuKe] + Number(move8.text);
_root["worker" + menujuKe] = _root["worker" + menujuKe] + Number(move9.text);
_root["worker" + menujuKe] = _root["worker" + menujuKe] + Number(move10.text);
_root["worker" + menujuKe] = _root["worker" + menujuKe] + Number(move11.text);
jenisPerintah = "";
gotoAndStop (217);
} else {
informasi = "No goods to be moved.";
}
};
food = _root["xfood" + menujuKe];
gold = _root["xgold" + menujuKe];
wood = _root["xwood" + menujuKe];
iron = _root["xiron" + menujuKe];
clay = _root["xclay" + menujuKe];
sword = _root["sword" + menujuKe];
axe = _root["axe" + menujuKe];
bow = _root["bow" + menujuKe];
spear = _root["spear" + menujuKe];
horse = _root["horse" + menujuKe];
catapult = _root["catapult" + menujuKe];
xfood = 0;
xgold = 0;
xwood = 0;
xiron = 0;
xclay = 0;
xsword = 0;
xaxe = 0;
xbow = 0;
xspear = 0;
xhorse = 0;
xcatapult = 0;
i = 1;
while (i <= 10) {
_root["move" + i].text = 0;
i++;
}
maximum_btn.onRelease = function () {
move1.text = Number(_root["xgold" + menujuKe]);
move2.text = Number(_root["xfood" + menujuKe]);
move3.text = Number(_root["xwood" + menujuKe]);
move4.text = Number(_root["xiron" + menujuKe]);
move5.text = Number(_root["xclay" + menujuKe]);
move6.text = Number(_root["sword" + menujuKe]);
move7.text = Number(_root["axe" + menujuKe]);
move8.text = Number(_root["spear" + menujuKe]);
move9.text = Number(_root["bow" + menujuKe]);
move10.text = Number(_root["horse" + menujuKe]);
move11.text = Number(_root["catapult" + menujuKe]);
};
half1.onRelease = function () {
move1.text = Number(Math.ceil(_root["xgold" + menujuKe] / 2));
};
half2.onRelease = function () {
move2.text = Number(Math.ceil(_root["xfood" + menujuKe] / 2));
};
half3.onRelease = function () {
move3.text = Number(Math.ceil(_root["xwood" + menujuKe] / 2));
};
half4.onRelease = function () {
move4.text = Number(Math.ceil(_root["xiron" + menujuKe] / 2));
};
half5.onRelease = function () {
move5.text = Number(Math.ceil(_root["xclay" + menujuKe] / 2));
};
half6.onRelease = function () {
move6.text = Number(Math.ceil(_root["sword" + menujuKe] / 2));
};
half7.onRelease = function () {
move7.text = Number(Math.ceil(_root["axe" + menujuKe] / 2));
};
half8.onRelease = function () {
move8.text = Number(Math.ceil(_root["spear" + menujuKe] / 2));
};
half9.onRelease = function () {
move9.text = Number(Math.ceil(_root["bow" + menujuKe] / 2));
};
half10.onRelease = function () {
move10.text = Number(Math.ceil(_root["horse" + menujuKe] / 2));
};
half11.onRelease = function () {
move11.text = Number(Math.ceil(_root["catapult" + menujuKe] / 2));
};
Instance of Symbol 24 MovieClip in Frame 226
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 227
function cekResource() {
food = _root["xfood" + menujuKe];
gold = _root["xgold" + menujuKe];
wood = _root["xwood" + menujuKe];
iron = _root["xiron" + menujuKe];
clay = _root["xclay" + menujuKe];
sword = _root["sword" + menujuKe];
axe = _root["axe" + menujuKe];
bow = _root["bow" + menujuKe];
spear = _root["spear" + menujuKe];
horse = _root["horse" + menujuKe];
xfood = "";
xgold = "";
xwood = "";
xiron = "";
xclay = "";
xsword = "";
xaxe = "";
xbow = "";
xspear = "";
xhorse = "";
i = 1;
while (i <= 10) {
_root["bahan" + i].text = 0;
i++;
}
}
stop();
moveKemana = "Export resource from area " + menujuKe;
hargaSatuan = new Array("", 5, 7, 10, 12, 50, 65, 70, 60, 100, 150);
cancel_btn.onRelease = function () {
gotoAndStop (224);
};
cekResource();
i = 1;
while (i <= 10) {
_root["gain" + i] = 0;
_root["bahan" + i].onChanged = function () {
myStr = new String(this);
if (myStr.length == 14) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 2);
}
_root["gain" + indi] = hargaSatuan[indi] * this.text;
};
i++;
}
export_btn.onRelease = function () {
bisaExport = true;
if (Number(bahan1.text) > _root["xfood" + menujuKe]) {
bisaExport = false;
}
if (Number(bahan2.text) > _root["xwood" + menujuKe]) {
bisaExport = false;
}
if (Number(bahan3.text) > _root["xiron" + menujuKe]) {
bisaExport = false;
}
if (Number(bahan4.text) > _root["xclay" + menujuKe]) {
bisaExport = false;
}
if (Number(bahan5.text) > _root["sword" + menujuKe]) {
bisaExport = false;
}
if (Number(bahan6.text) > _root["axe" + menujuKe]) {
bisaExport = false;
}
if (Number(bahan7.text) > _root["spear" + menujuKe]) {
bisaExport = false;
}
if (Number(bahan8.text) > _root["bow" + menujuKe]) {
bisaExport = false;
}
if (Number(bahan9.text) > _root["horse" + menujuKe]) {
bisaExport = false;
}
if (bisaExport == true) {
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - Number(bahan1.text);
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] - Number(bahan2.text);
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] - Number(bahan3.text);
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] - Number(bahan4.text);
_root["sword" + menujuKe] = _root["sword" + menujuKe] - Number(bahan5.text);
_root["axe" + menujuKe] = _root["axe" + menujuKe] - Number(bahan6.text);
_root["spear" + menujuKe] = _root["spear" + menujuKe] - Number(bahan7.text);
_root["bow" + menujuKe] = _root["bow" + menujuKe] - Number(bahan8.text);
_root["horse" + menujuKe] = _root["horse" + menujuKe] - Number(bahan9.text);
i = 1;
while (i <= 10) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] + _root["gain" + i];
i++;
}
i = 1;
while (i <= 10) {
_root["gain" + i] = 0;
i++;
}
cekResource();
} else {
informasi = "No goods to be exported.";
}
};
maximum_btn.onRelease = function () {
bahan1.text = _root["xfood" + menujuKe];
bahan2.text = _root["xwood" + menujuKe];
bahan3.text = _root["xiron" + menujuKe];
bahan4.text = _root["xclay" + menujuKe];
bahan5.text = _root["sword" + menujuKe];
bahan6.text = _root["axe" + menujuKe];
bahan7.text = _root["spear" + menujuKe];
bahan8.text = _root["bow" + menujuKe];
bahan9.text = _root["horse" + menujuKe];
i = 1;
while (i <= 10) {
_root["gain" + i] = hargaSatuan[i] * _root["bahan" + i].text;
i++;
}
};
half1.onRelease = function () {
bahan1.text = Number(Math.ceil(_root["xfood" + menujuKe] / 2));
};
half2.onRelease = function () {
bahan2.text = Number(Math.ceil(_root["xwood" + menujuKe] / 2));
};
half3.onRelease = function () {
bahan3.text = Number(Math.ceil(_root["xiron" + menujuKe] / 2));
};
half4.onRelease = function () {
bahan4.text = Number(Math.ceil(_root["xclay" + menujuKe] / 2));
};
half5.onRelease = function () {
bahan5.text = Number(Math.ceil(_root["sword" + menujuKe] / 2));
};
half6.onRelease = function () {
bahan6.text = Number(Math.ceil(_root["axe" + menujuKe] / 2));
};
half7.onRelease = function () {
bahan7.text = Number(Math.ceil(_root["spear" + menujuKe] / 2));
};
half8.onRelease = function () {
bahan8.text = Number(Math.ceil(_root["bow" + menujuKe] / 2));
};
half9.onRelease = function () {
bahan9.text = Number(Math.ceil(_root["horse" + menujuKe] / 2));
};
Instance of Symbol 24 MovieClip in Frame 227
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 228
function cekResource() {
food = _root["xfood" + menujuKe];
gold = _root["xgold" + menujuKe];
wood = _root["xwood" + menujuKe];
iron = _root["xiron" + menujuKe];
clay = _root["xclay" + menujuKe];
sword = _root["sword" + menujuKe];
axe = _root["axe" + menujuKe];
bow = _root["bow" + menujuKe];
spear = _root["spear" + menujuKe];
horse = _root["horse" + menujuKe];
xfood = "";
xgold = "";
xwood = "";
xiron = "";
xclay = "";
xsword = "";
xaxe = "";
xbow = "";
xspear = "";
xhorse = "";
i = 1;
while (i <= 10) {
_root["bahan" + i].text = 0;
i++;
}
}
stop();
moveKemana = "Import resource to area " + menujuKe;
hargaSatuan = new Array("", 10, 14, 20, 24, 100, 500, 750, 1000, 1250, 1500);
cancel_btn.onRelease = function () {
gotoAndStop (224);
};
cekResource();
i = 1;
while (i <= 10) {
_root["cost" + i] = 0;
_root["bahan" + i].onChanged = function () {
myStr = new String(this);
if (myStr.length == 14) {
indi = myStr.substr(myStr.length - 1, 1);
} else {
indi = myStr.substr(myStr.length - 2, 2);
}
_root["cost" + indi] = hargaSatuan[indi] * this.text;
};
i++;
}
import_btn.onRelease = function () {
totalCost = 0;
i = 1;
while (i <= 10) {
totalCost = totalCost + _root["cost" + i];
i++;
}
if (totalCost <= _root["xgold" + menujuKe]) {
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] + Number(bahan1.text);
_root["xwood" + menujuKe] = _root["xwood" + menujuKe] + Number(bahan2.text);
_root["xiron" + menujuKe] = _root["xiron" + menujuKe] + Number(bahan3.text);
_root["xclay" + menujuKe] = _root["xclay" + menujuKe] + Number(bahan4.text);
_root["sword" + menujuKe] = _root["sword" + menujuKe] + Number(bahan5.text);
_root["axe" + menujuKe] = _root["axe" + menujuKe] + Number(bahan6.text);
_root["spear" + menujuKe] = _root["spear" + menujuKe] + Number(bahan7.text);
_root["bow" + menujuKe] = _root["bow" + menujuKe] + Number(bahan8.text);
_root["horse" + menujuKe] = _root["horse" + menujuKe] + Number(bahan9.text);
i = 1;
while (i <= 10) {
_root["xgold" + menujuKe] = _root["xgold" + menujuKe] - _root["cost" + i];
i++;
}
i = 1;
while (i <= 10) {
_root["cost" + i] = 0;
i++;
}
cekResource();
} else {
informasi = "Can not import, not enough funds.";
}
};
maximum_btn.onRelease = function () {
bahan1.text = _root["xfood" + menujuKe];
bahan2.text = _root["xwood" + menujuKe];
bahan3.text = _root["xiron" + menujuKe];
bahan4.text = _root["xclay" + menujuKe];
bahan5.text = _root["sword" + menujuKe];
bahan6.text = _root["axe" + menujuKe];
bahan7.text = _root["spear" + menujuKe];
bahan8.text = _root["bow" + menujuKe];
bahan9.text = _root["horse" + menujuKe];
i = 1;
while (i <= 10) {
_root["cost" + i] = hargaSatuan[i] * _root["bahan" + i].text;
i++;
}
};
half1.onRelease = function () {
bahan1.text = Number(Math.ceil(_root["xfood" + menujuKe] / 2));
};
half2.onRelease = function () {
bahan2.text = Number(Math.ceil(_root["xwood" + menujuKe] / 2));
};
half3.onRelease = function () {
bahan3.text = Number(Math.ceil(_root["xiron" + menujuKe] / 2));
};
half4.onRelease = function () {
bahan4.text = Number(Math.ceil(_root["xclay" + menujuKe] / 2));
};
half5.onRelease = function () {
bahan5.text = Number(Math.ceil(_root["sword" + menujuKe] / 2));
};
half6.onRelease = function () {
bahan6.text = Number(Math.ceil(_root["axe" + menujuKe] / 2));
};
half7.onRelease = function () {
bahan7.text = Number(Math.ceil(_root["spear" + menujuKe] / 2));
};
half8.onRelease = function () {
bahan8.text = Number(Math.ceil(_root["bow" + menujuKe] / 2));
};
half9.onRelease = function () {
bahan9.text = Number(Math.ceil(_root["horse" + menujuKe] / 2));
};
Instance of Symbol 24 MovieClip in Frame 228
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 229
stop();
if (kondisiSerangan == "bertahan") {
moveKemana = menujuKe + " is under attack!!";
} else {
moveKemana = (("Attack area " + targetArea) + " from area ") + menujuKe;
}
if (kondisiSerangan == "bertahan") {
cancel_btn._visible = false;
retreat_btn._visible = true;
} else {
cancel_btn._visible = true;
retreat_btn._visible = false;
}
retreat_btn.onRelease = function () {
gotoAndStop (217);
menu_btn._visible = true;
paketArea(true);
clearInterval(idWaktu);
jenisPerintah = "";
instruction_mc._visible = false;
if (speedGame == 3) {
idWaktu = setInterval(waktuJalan, 10);
} else if (speedGame == 2) {
idWaktu = setInterval(waktuJalan, 20);
} else if (speedGame == 1) {
idWaktu = setInterval(waktuJalan, 40);
}
_root["milik" + pilihSerang] = w;
_root["area" + pilihSerang].gotoAndStop(w + 1);
j = 1;
while (j <= 100) {
rand = random(3);
if (rand == 0) {
jenisKotak[pilihSerang][j] = random(6) + 15;
} else {
jenisKotak[pilihSerang][j] = 0;
}
upgradeKotak[pilihSerang][j] = 1;
j++;
}
i = 1;
while (i <= 96) {
if (_root["milik" + i] > 1) {
_root["sword" + i] = _root["sword" + i] * 0.5;
_root["axe" + i] = _root["axe" + i] * 0.6;
_root["spear" + i] = _root["spear" + i] * 0.6;
_root["bow" + i] = _root["bow" + i] * 0.7;
_root["horse" + i] = _root["horse" + i] * 0.8;
_root["catapult" + i] = _root["catapult" + i] * 0.9;
_root["sword" + i] = Math.floor(_root["sword" + i]);
_root["axe" + i] = Math.floor(_root["axe" + i]);
_root["spear" + i] = Math.floor(_root["axe" + i]);
_root["bow" + i] = Math.floor(_root["bow" + i]);
_root["horse" + i] = Math.floor(_root["horse" + i]);
_root["catapult" + i] = Math.floor(_root["catapult" + i]);
}
i++;
}
};
cancel_btn.onRelease = function () {
gotoAndStop (224);
};
war_btn.onRelease = function () {
bisaSerang = true;
if ((((((_root["sword" + menujuKe] <= 0) && (_root["axe" + menujuKe] <= 0)) && (_root["spear" + menujuKe] <= 0)) && (_root["bow" + menujuKe] <= 0)) && (_root["horse" + menujuKe] <= 0)) && (_root["catapult" + menujuKe] <= 0)) {
bisaSerang = false;
}
if (Number(attack1.text) > _root["xfood" + menujuKe]) {
bisaSerang = false;
}
if (Number(attack2.text) > _root["sword" + menujuKe]) {
bisaSerang = false;
}
if (Number(attack3.text) > _root["axe" + menujuKe]) {
bisaSerang = false;
}
if (Number(attack4.text) > _root["spear" + menujuKe]) {
bisaSerang = false;
}
if (Number(attack5.text) > _root["bow" + menujuKe]) {
bisaSerang = false;
}
if (Number(attack6.text) > _root["horse" + menujuKe]) {
bisaSerang = false;
}
if (Number(attack7.text) > _root["catapult" + menujuKe]) {
bisaSerang = false;
}
if (bisaSerang == true) {
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] - Number(attack1.text);
_root["sword" + menujuKe] = _root["sword" + menujuKe] - Number(attack2.text);
_root["axe" + menujuKe] = _root["axe" + menujuKe] - Number(attack3.text);
_root["spear" + menujuKe] = _root["spear" + menujuKe] - Number(attack4.text);
_root["bow" + menujuKe] = _root["bow" + menujuKe] - Number(attack5.text);
_root["horse" + menujuKe] = _root["horse" + menujuKe] - Number(attack6.text);
_root["catapult" + menujuKe] = _root["catapult" + menujuKe] - Number(attack7.text);
_root["xcatapult" + menujuKe] = _root["catapult" + menujuKe];
dibawaFood = Number(attack1.text);
dibawaSword = Number(attack2.text);
dibawaAxe = Number(attack3.text);
dibawaBow = Number(attack4.text);
dibawaSpear = Number(attack5.text);
dibawaHorse = Number(attack6.text);
dibawaCatapult = Number(attack7.text);
if (kondisiSerangan != "bertahan") {
_root["worker" + menujuKe] = _root["worker" + menujuKe] + dibawaSword;
_root["worker" + menujuKe] = _root["worker" + menujuKe] + dibawaAxe;
_root["worker" + menujuKe] = _root["worker" + menujuKe] + dibawaBow;
_root["worker" + menujuKe] = _root["worker" + menujuKe] + dibawaSpear;
_root["worker" + menujuKe] = _root["worker" + menujuKe] + dibawaHorse;
_root["worker" + menujuKe] = _root["worker" + menujuKe] + dibawaCatapult;
}
gotoAndStop (230);
} else {
informasi = "There are no troops who will attack, input the troops to the input text first.";
}
};
food = _root["xfood" + menujuKe];
sword = _root["sword" + menujuKe];
axe = _root["axe" + menujuKe];
bow = _root["bow" + menujuKe];
spear = _root["spear" + menujuKe];
horse = _root["horse" + menujuKe];
catapult = _root["catapult" + menujuKe];
xfood = 0;
xsword = 0;
xaxe = 0;
xbow = 0;
xspear = 0;
xhorse = 0;
xcatapult = 0;
i = 1;
while (i <= 10) {
_root["attack" + i].text = 0;
i++;
}
maximum_btn.onRelease = function () {
attack1.text = Number(_root["xfood" + menujuKe]);
attack2.text = Number(_root["sword" + menujuKe]);
attack3.text = Number(_root["axe" + menujuKe]);
attack4.text = Number(_root["spear" + menujuKe]);
attack5.text = Number(_root["bow" + menujuKe]);
attack6.text = Number(_root["horse" + menujuKe]);
attack7.text = Number(_root["catapult" + menujuKe]);
};
half1.onRelease = function () {
attack1.text = Number(Math.ceil(_root["xfood" + menujuKe] / 2));
};
half2.onRelease = function () {
attack2.text = Number(Math.ceil(_root["sword" + menujuKe] / 2));
};
half3.onRelease = function () {
attack3.text = Number(Math.ceil(_root["axe" + menujuKe] / 2));
};
half4.onRelease = function () {
attack4.text = Number(Math.ceil(_root["spear" + menujuKe] / 2));
};
half5.onRelease = function () {
attack5.text = Number(Math.ceil(_root["bow" + menujuKe] / 2));
};
half6.onRelease = function () {
attack6.text = Number(Math.ceil(_root["horse" + menujuKe] / 2));
};
half7.onRelease = function () {
attack7.text = Number(Math.ceil(_root["catapult" + menujuKe] / 2));
};
Instance of Symbol 24 MovieClip in Frame 229
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 230
function zinit() {
speedGeser = 10;
keJagoan = 10;
kePanah = 100000 /* 0x0186A0 */;
moral1 = 100;
moral2 = 100;
dalamFrame = 500000 /* 0x07A120 */;
jmlMakanan1 = dibawaFood;
jmlMakanan2 = ((random(5) + 1) * 4000) + (punyaWilayahz * 5000);
jmlUnit1 = dibawaSword;
jmlUnit2 = dibawaAxe;
jmlUnit3 = dibawaBow;
jmlUnit4 = dibawaSpear;
jmlUnit5 = dibawaHorse;
jmlUnit6 = dibawaCatapult;
unit1 = ((((jmlUnit1 + jmlUnit2) + jmlUnit3) + jmlUnit4) + jmlUnit5) + jmlUnit6;
bykUnit1 = 0;
bykUnit2 = 0;
if (ztipeMusuh == "barbar") {
xjmlUnit1 = 6 * punyaWilayahz;
xjmlUnit2 = 4 * punyaWilayahz;
xjmlUnit3 = 3 * punyaWilayahz;
xjmlUnit4 = 3 * punyaWilayahz;
xjmlUnit5 = 0;
xjmlUnit6 = 0;
xjmlUnit1 = xjmlUnit1 + random(3);
xjmlUnit2 = xjmlUnit2 + random(3);
xjmlUnit3 = xjmlUnit3 + random(2);
xjmlUnit4 = xjmlUnit4 + random(2);
} else {
if (days <= 100) {
xjmlUnit1 = 5 * punyaWilayahz;
xjmlUnit2 = 5 * punyaWilayahz;
xjmlUnit3 = 0;
xjmlUnit4 = 0;
xjmlUnit5 = 0;
xjmlUnit6 = 0;
} else if (days <= 150) {
xjmlUnit1 = 5 * punyaWilayahz;
xjmlUnit2 = 5 * punyaWilayahz;
xjmlUnit3 = 3 * punyaWilayahz;
xjmlUnit4 = 0;
xjmlUnit5 = 0;
xjmlUnit6 = 0;
} else if (days <= 200) {
xjmlUnit1 = 5 * punyaWilayahz;
xjmlUnit2 = 5 * punyaWilayahz;
xjmlUnit3 = 3 * punyaWilayahz;
xjmlUnit4 = 3 * punyaWilayahz;
xjmlUnit5 = 0;
xjmlUnit6 = 0;
} else if (days <= 250) {
xjmlUnit1 = 5 * punyaWilayahz;
xjmlUnit2 = 5 * punyaWilayahz;
xjmlUnit3 = 3 * punyaWilayahz;
xjmlUnit4 = 3 * punyaWilayahz;
xjmlUnit5 = 1 * punyaWilayahz;
xjmlUnit6 = 0;
} else {
xjmlUnit1 = 5 * punyaWilayahz;
xjmlUnit2 = 5 * punyaWilayahz;
xjmlUnit3 = 3 * punyaWilayahz;
xjmlUnit4 = 3 * punyaWilayahz;
xjmlUnit5 = 1 * punyaWilayahz;
xjmlUnit6 = Math.floor(0.25 * punyaWilayahz);
}
xjmlUnit1 = xjmlUnit1 + random(3);
xjmlUnit2 = xjmlUnit2 + random(3);
xjmlUnit3 = xjmlUnit3 + random(2);
xjmlUnit4 = xjmlUnit4 + random(2);
xjmlUnit5 = xjmlUnit5 + random(2);
}
unit2 = ((((xjmlUnit1 + xjmlUnit2) + xjmlUnit3) + xjmlUnit4) + xjmlUnit5) + xjmlUnit6;
masihMain = true;
}
function munculBackground() {
randBack = random(4) + 1;
back = attachMovie("back" + randBack, "back_mc", 9);
back._x = 0;
back._y = 0;
}
function buatAtribut() {
if (ztipeMusuh == "barbar") {
if (jenisUpgrade4 == true) {
speedJagoan = new Array("", 4, 3, 3.5, 4.5, 7, 2);
} else {
speedJagoan = new Array("", 3, 2, 2.5, 3.5, 6, 1);
}
if (jenisUpgrade2 == true) {
damageJagoan = new Array("", 8, 15, 10, 6, 11, 17);
} else {
damageJagoan = new Array("", 6, 12, 7, 4, 9, 15);
}
if (jenisUpgrade3 == true) {
nyawaJagoan = new Array("", 45, 35, 30, 15, 60, 125);
} else {
nyawaJagoan = new Array("", 30, 25, 20, 10, 45, 100);
}
speedMusuh = new Array("", 4, 3, 3.5, 4.5);
damageMusuh = new Array("", 5, 10, 6, 4);
nyawaMusuh = new Array("", 20, 15, 10, 5);
} else {
if (jenisUpgrade4 == true) {
speedJagoan = new Array("", 4, 3, 3.5, 4.5, 7, 2);
speedMusuh = new Array("", 3, 2, 2.5, 3.5, 6, 1);
} else {
speedJagoan = (speedMusuh = new Array("", 3, 2, 2.5, 3.5, 6, 1));
}
if (jenisUpgrade2 == true) {
damageJagoan = new Array("", 8, 15, 10, 6, 11, 17);
damageMusuh = new Array("", 6, 12, 7, 4, 9, 15);
} else {
damageJagoan = (damageMusuh = new Array("", 6, 12, 7, 4, 9, 15));
}
if (jenisUpgrade3 == true) {
nyawaJagoan = new Array("", 45, 35, 30, 15, 60, 125);
nyawaMusuh = new Array("", 30, 25, 20, 10, 45, 100);
} else {
nyawaJagoan = (nyawaMusuh = new Array("", 30, 25, 20, 10, 45, 100));
}
}
namaPasukan = new Array("", "Swordsman", "Axeman", "Spearman", "Bowman", "Knight", "Catapult");
if (days <= 100) {
i = 1;
while (i <= 6) {
nyawaMusuh[i] = nyawaMusuh[i] * 1;
i++;
}
} else if (days <= 200) {
i = 1;
while (i <= 6) {
nyawaMusuh[i] = nyawaMusuh[i] * 1.25;
i++;
}
} else if (days <= 300) {
i = 1;
while (i <= 6) {
nyawaMusuh[i] = nyawaMusuh[i] * 1.5;
i++;
}
} else {
i = 1;
while (i <= 6) {
nyawaMusuh[i] = nyawaMusuh[i] * 1.75;
i++;
}
}
}
function buatFrame() {
frame = attachMovie("frame_mc", "frame_mc", dalamFrame);
frame._x = 0;
frame._y = 500;
i = 1;
while (i <= 6) {
frame["pasukan" + i].msgBox_mc._visible = false;
frame["pasukan" + i].onRelease = function () {
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
if (_root["jmlUnit" + indi] > 0) {
if (this._currentframe == 1) {
if (bykUnit1 <= 20) {
bykUnit1++;
if (jenisUpgrade1 == true) {
this.gotoAndPlay(400);
} else {
this.gotoAndPlay(2);
}
} else {
frame_mc.info_mc.gotoAndPlay(2);
frame_mc.info_mc.informasi = "Can't create any unit, too many units.";
}
} else {
frame_mc.info_mc.gotoAndPlay(2);
frame_mc.info_mc.informasi = "This unit already training.";
}
} else {
frame_mc.info_mc.gotoAndPlay(2);
frame_mc.info_mc.informasi = "There's no unit available.";
}
this.msgBox_mc._visible = false;
};
frame["pasukan" + i].onRollOver = function () {
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
this.msgBox_mc._visible = true;
this.msgBox_mc.info = (((((namaPasukan[indi] + "\nAttack: ") + damageJagoan[indi]) + "\nLive: ") + nyawaJagoan[indi]) + "\nSpeed: ") + speedJagoan[indi];
};
frame["pasukan" + i].onRollOut = function () {
this.msgBox_mc._visible = false;
};
i++;
}
}
function buatPasukan(indi) {
if (_root["jmlUnit" + indi] > 0) {
randJenis = indi;
munculJagoan();
}
}
function munculJagoan() {
if (_root["jagoan_mc" + keJagoan] == undefined) {
randPosisi = random(3);
if (randJenis == 1) {
jagoan = attachMovie("pedang_mc", "jagoan_mc" + keJagoan, (keJagoan + 3000) + (randPosisi * 7500));
jmlUnit1--;
} else if (randJenis == 2) {
jagoan = attachMovie("kapak_mc", "jagoan_mc" + keJagoan, (keJagoan + 1000) + (randPosisi * 7500));
jmlUnit2--;
} else if (randJenis == 3) {
jagoan = attachMovie("tombak_mc", "jagoan_mc" + keJagoan, (keJagoan + 2000) + (randPosisi * 7500));
jmlUnit3--;
} else if (randJenis == 4) {
jagoan = attachMovie("panah_mc", "jagoan_mc" + keJagoan, (keJagoan + 4000) + (randPosisi * 7500));
jmlUnit4--;
} else if (randJenis == 5) {
jagoan = attachMovie("kuda_mc", "jagoan_mc" + keJagoan, (keJagoan + 5000) + (randPosisi * 7500));
jmlUnit5--;
} else if (randJenis == 6) {
jagoan = attachMovie("ketapel_mc", "jagoan_mc" + keJagoan, (keJagoan + 6000) + (randPosisi * 7500));
jmlUnit6--;
}
if (randJenis == 6) {
jagoan.tipex = "ketapel";
jagoan._xscale = (jagoan._yscale = 50);
} else {
jagoan.tipex = "";
jagoan._xscale = (jagoan._yscale = 50);
}
jagoan.damage = damageJagoan[randJenis];
jagoan.nyawa = nyawaJagoan[randJenis];
jagoan.speed = speedJagoan[randJenis] / 1.5;
jagoan.xtarget = undefined;
if (randJenis == 6) {
jagoan._x = ((back._x - 50) - random(50)) + 100;
} else {
jagoan._x = ((back._x - 50) - random(50)) - 150;
}
jagoan.jenis = "jagoan";
if (randJenis == 1) {
jagoan._y = (260 + (randPosisi * 50)) + 20;
} else if (randJenis == 2) {
jagoan._y = 260 + (randPosisi * 50);
} else if (randJenis == 3) {
jagoan._y = (260 + (randPosisi * 50)) + 10;
} else if (randJenis == 4) {
jagoan._y = (260 + (randPosisi * 50)) + 30;
} else if (randJenis == 5) {
jagoan._y = (260 + (randPosisi * 50)) + 40;
} else if (randJenis == 6) {
jagoan._y = (260 + (randPosisi * 50)) + 50;
}
jagoan.tipeJenis = randJenis;
jagoan.gotoAndStop(2);
jagoan.onEnterFrame = enterJagoan;
keJagoan++;
if (keJagoan >= 100) {
keJagoan = 10;
}
} else {
keJagoan++;
if (keJagoan >= 100) {
keJagoan = 10;
}
}
}
function enterJagoan() {
adaMusuh = false;
i = 1;
while (i <= 100) {
if (this.indi.hitTest(_root["musuh_mc" + i].body) && (_root["musuh_mc" + i].nyawa > 0)) {
adaMusuh = true;
if (this.xtarget == undefined) {
this.xtarget = _root["musuh_mc" + i];
} else if (this.xtarget.nyawa <= 0) {
this.xtarget = undefined;
adaMusuh = false;
}
}
i++;
}
if (this.nyawa <= 0) {
if (this._currentframe != 4) {
unit1--;
bykUnit1--;
if (this.tipeJenis == 1) {
swordMati1++;
} else if (this.tipeJenis == 2) {
axeMati1++;
} else if (this.tipeJenis == 3) {
spearMati1++;
} else if (this.tipeJenis == 4) {
bowMati1++;
} else if (this.tipeJenis == 5) {
horseMati1++;
} else if (this.tipeJenis == 6) {
catapultMati1++;
}
this.gotoAndStop(4);
if (unit1 <= 0) {
if (masihMain == true) {
masihMain = false;
unit1 = 0;
cekSelesai("kalah");
}
}
}
} else if (adaMusuh == false) {
if (this.tipex != "ketapel") {
this.adaSentuh = false;
i = 1;
while (i <= 100) {
if (this.body.hitTest(_root["jagoan_mc" + i].body2) && (_root["jagoan_mc" + i].tipex == "ketapel")) {
this.adaSentuh = true;
i = 100;
}
i++;
}
if (this.adaSentuh == true) {
this.gotoAndStop(1);
} else {
this._x = this._x + this.speed;
this.gotoAndStop(2);
}
this._x = this._x + this.speed;
this.gotoAndStop(2);
} else {
this._x = this._x + this.speed;
this.gotoAndStop(2);
}
} else {
this.gotoAndStop(3);
}
if (this._x >= (back._x + 1600)) {
bykUnit1--;
unit1--;
if (unit1 <= 0) {
if (masihMain == true) {
masihMain = false;
unit1 = 0;
cekSelesai("kalah");
}
}
moral2 = moral2 - Math.ceil(this.damage * 0.2);
if (moral2 <= 0) {
if (masihMain == true) {
masihMain = false;
moral2 = 0;
cekSelesai("menang");
}
}
removeMovieClip(this);
}
}
function munculMusuh() {
if (ztipeMusuh == "barbar") {
randArray2 = new Array();
banyakRand2 = 0;
i = 1;
while (i <= 4) {
if (_root["xjmlUnit" + i] > 0) {
randArray2[banyakRand2] = i;
banyakRand2++;
}
i++;
}
xrand2 = random(banyakRand2);
randJenis2 = randArray2[xrand2];
randPosisi2 = random(3);
} else {
randArray2 = new Array();
banyakRand2 = 0;
i = 1;
while (i <= 6) {
if (_root["xjmlUnit" + i] > 0) {
randArray2[banyakRand2] = i;
banyakRand2++;
}
i++;
}
xrand2 = random(banyakRand2);
randJenis2 = randArray2[xrand2];
randPosisi2 = random(3);
}
if (banyakRand2 > 0) {
if (bykUnit2 <= 20) {
if (_root["musuh_mc" + keJagoan] == undefined) {
if (randJenis2 == 1) {
if (ztipeMusuh == "barbar") {
musuh = attachMovie("barbar1", "musuh_mc" + keJagoan, (keJagoan + 3000) + (randPosisi2 * 7500));
bykUnit2++;
} else {
musuh = attachMovie("pedang_mc2", "musuh_mc" + keJagoan, (keJagoan + 3000) + (randPosisi2 * 7500));
bykUnit2++;
}
xjmlUnit1--;
} else if (randJenis2 == 2) {
if (ztipeMusuh == "barbar") {
musuh = attachMovie("barbar2", "musuh_mc" + keJagoan, (keJagoan + 3000) + (randPosisi2 * 7500));
bykUnit2++;
} else {
musuh = attachMovie("kapak_mc2", "musuh_mc" + keJagoan, (keJagoan + 1000) + (randPosisi2 * 7500));
bykUnit2++;
}
xjmlUnit2--;
} else if (randJenis2 == 3) {
if (ztipeMusuh == "barbar") {
musuh = attachMovie("barbar3", "musuh_mc" + keJagoan, (keJagoan + 3000) + (randPosisi2 * 7500));
bykUnit2++;
} else {
musuh = attachMovie("tombak_mc2", "musuh_mc" + keJagoan, (keJagoan + 2000) + (randPosisi2 * 7500));
bykUnit2++;
}
xjmlUnit3--;
} else if (randJenis2 == 4) {
if (ztipeMusuh == "barbar") {
musuh = attachMovie("barbar4", "musuh_mc" + keJagoan, (keJagoan + 3000) + (randPosisi2 * 7500));
bykUnit2++;
} else {
musuh = attachMovie("panah_mc2", "musuh_mc" + keJagoan, (keJagoan + 4000) + (randPosisi2 * 7500));
bykUnit2++;
}
xjmlUnit4--;
} else if (randJenis2 == 5) {
musuh = attachMovie("kuda_mc2", "musuh_mc" + keJagoan, (keJagoan + 5000) + (randPosisi2 * 7500));
bykUnit2++;
xjmlUnit5--;
} else if (randJenis2 == 6) {
musuh = attachMovie("ketapel_mc2", "musuh_mc" + keJagoan, (keJagoan + 6000) + (randPosisi2 * 7500));
musuh.tipex = "ketapel";
bykUnit2++;
xjmlUnit6--;
}
musuh.damage = damageMusuh[randJenis2];
musuh.nyawa = nyawaMusuh[randJenis2];
musuh.speed = speedMusuh[randJenis2] / 1.5;
musuh._x = ((back._x + 1600) + 50) + random(50);
if (randJenis == 6) {
musuh._x = (((back._x + 1600) + 50) + random(50)) - 100;
} else {
musuh._x = (((back._x + 1600) + 50) + random(50)) + 150;
}
musuh.jenis = "musuh";
musuh._xscale = (musuh._yscale = 50);
if (randJenis2 == 1) {
musuh._y = (260 + (randPosisi2 * 50)) + 20;
} else if (randJenis2 == 2) {
musuh._y = 260 + (randPosisi2 * 50);
} else if (randJenis2 == 3) {
musuh._y = (260 + (randPosisi2 * 50)) + 10;
} else if (randJenis2 == 4) {
musuh._y = (260 + (randPosisi2 * 50)) + 30;
} else if (randJenis2 == 5) {
musuh._y = (260 + (randPosisi2 * 50)) + 40;
} else if (randJenis2 == 6) {
musuh._y = (260 + (randPosisi2 * 50)) + 100;
}
musuh.tipeJenis = randJenis2;
musuh.gotoAndStop(2);
musuh.onEnterFrame = enterMusuh;
keJagoan++;
if (keJagoan >= 100) {
keJagoan = 10;
}
} else {
keJagoan++;
if (keJagoan >= 100) {
keJagoan = 10;
}
}
}
}
}
function enterMusuh() {
adaMusuh2 = false;
i = 1;
while (i <= 100) {
if (this.indi.hitTest(_root["jagoan_mc" + i].body) && (_root["jagoan_mc" + i].nyawa > 0)) {
adaMusuh2 = true;
if (this.xtarget == undefined) {
this.xtarget = _root["jagoan_mc" + i];
} else if (this.xtarget.nyawa <= 0) {
this.xtarget = undefined;
adaMusuh2 = false;
}
}
i++;
}
if (this.nyawa <= 0) {
if (this._currentframe != 4) {
unit2--;
bykUnit2--;
if (this.tipeJenis == 1) {
swordMati2++;
} else if (this.tipeJenis == 2) {
axeMati2++;
} else if (this.tipeJenis == 3) {
spearMati2++;
} else if (this.tipeJenis == 4) {
bowMati2++;
} else if (this.tipeJenis == 5) {
horseMati2++;
} else if (this.tipeJenis == 6) {
catapultMati2++;
}
totalKilled++;
this.gotoAndStop(4);
if (unit2 <= 0) {
if (masihMain == true) {
masihMain = false;
unit2 = 0;
cekSelesai("menang");
}
}
}
} else if (adaMusuh2 == false) {
if (this.tipex != "ketapel") {
this.adaSentuh = false;
i = 1;
while (i <= 100) {
if (this.body.hitTest(_root["musuh_mc" + i].body2) && (_root["musuh_mc" + i].tipex == "ketapel")) {
this.adaSentuh = true;
i = 100;
}
i++;
}
if (this.adaSentuh == true) {
this.gotoAndStop(1);
} else {
this._x = this._x - this.speed;
this.gotoAndStop(2);
}
this._x = this._x - this.speed;
this.gotoAndStop(2);
} else {
this._x = this._x - this.speed;
this.gotoAndStop(2);
}
} else {
this.gotoAndStop(3);
}
if (this._x <= back._x) {
bykUnit2--;
unit2--;
if (unit2 <= 0) {
if (masihMain == true) {
masihMain = false;
unit2 = 0;
cekSelesai("menang");
}
}
moral1 = moral1 - Math.ceil(this.damage * 0.2);
if (moral1 <= 0) {
if (masihMain == true) {
masihMain = false;
moral1 = 0;
cekSelesai("kalah");
}
}
removeMovieClip(this);
}
}
function cekKena(indi) {
indi.xtarget.nyawa = indi.xtarget.nyawa - indi.damage;
randz = random(2);
if (ranz == 0) {
backDarah();
}
}
function cekPanah(indi) {
panah = attachMovie("panahx", "panah_mc" + kePanah, kePanah);
panah._x = indi._x;
panah._y = (indi._y - 30) + random(10);
if (indi.jenis == "jagoan") {
panah.jenis = "jagoan";
panah.speed = 30;
} else if (indi.jenis == "musuh") {
panah.jenis = "musuh";
panah.speed = 30;
}
panah._xscale = (panah._yscale = 60);
panah.batasBawah = panah._y + 150;
panah.damage = indi.damage;
panah.indi = indi;
panah.xtarget = indi.xtarget;
panah.onEnterFrame = enterBatu;
kePanah++;
if (kePanah >= 110000) {
kePanah = 100000 /* 0x0186A0 */;
}
}
function cekBatu2(indi) {
panah = attachMovie("batu_mc", "panah_mc" + kePanah, kePanah);
panah._x = indi._x;
panah._y = (indi._y - 30) + random(10);
if (indi.jenis == "jagoan") {
panah.jenis = "jagoan";
panah.speed = 30;
} else if (indi.jenis == "musuh") {
panah.jenis = "musuh";
panah.speed = 30;
}
panah._xscale = (panah._yscale = 20);
panah.batasBawah = panah._y + 150;
panah.damage = indi.damage;
panah.indi = indi;
panah.xtarget = indi.xtarget;
panah.onEnterFrame = enterBatu;
kePanah++;
if (kePanah >= 110000) {
kePanah = 100000 /* 0x0186A0 */;
}
}
function cekKetapel(indi) {
batu = attachMovie("batu_mc", "batu_mc" + kePanah, kePanah);
batu._x = indi._x + 50;
batu._y = indi._y - 150;
if (indi.jenis == "jagoan") {
batu.jenis = "jagoan";
batu.speed = 20;
} else if (indi.jenis == "musuh") {
batu.jenis = "musuh";
batu.speed = 20;
}
batu._xscale = (batu._yscale = 60);
batu.batasBawah = batu._y + 150;
batu.damage = indi.damage;
batu.indi = indi;
batu.xtarget = indi.xtarget;
batu.onEnterFrame = enterBatu;
kePanah++;
if (kePanah >= 110000) {
kePanah = 100000 /* 0x0186A0 */;
}
}
function enterPanah() {
this._x = this._x + this.speed;
this._y = this._y + 0.5;
if (this.jenis == "jagoan") {
this.speed = this.speed + 2;
} else if (this.jenis == "musuh") {
this.speed = this.speed - 2;
}
i = 1;
while (i <= 100) {
if (this.hitTest(_root["jagoan_mc" + i].body) && (this.jenis == "musuh")) {
_root["jagoan_mc" + i].nyawa = _root["jagoan_mc" + i].nyawa - this.damage;
randz = random(2);
if (ranz == 0) {
backDarah();
}
removeMovieClip(this);
} else if (this.hitTest(_root["musuh_mc" + i].body) && (this.jenis == "jagoan")) {
_root["musuh_mc" + i].nyawa = _root["musuh_mc" + i].nyawa - this.damage;
randz = random(2);
if (ranz == 0) {
backDarah();
}
removeMovieClip(this);
}
i++;
}
if (this._y >= this.batasBawah) {
removeMovieClip(this);
}
}
function enterBatu() {
deltaX = this._x - this.xtarget._x;
deltaY = (this._y - this.xtarget._y) + 25;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._rotation = angle;
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speed) {
this._y = this._y - (this.speed * Math.cos(angle * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(angle * (Math.PI/180)));
} else if (this.jenis == "musuh") {
this.xtarget.nyawa = this.xtarget.nyawa - this.damage;
randz = random(2);
if (ranz == 0) {
backDarah();
}
this._rotation = 0;
this.gotoAndStop(2);
delete this.onEnterFrame;
} else if (this.jenis == "jagoan") {
this.xtarget.nyawa = this.xtarget.nyawa - this.damage;
randz = random(2);
if (ranz == 0) {
backDarah();
}
this._rotation = 0;
this.gotoAndStop(2);
delete this.onEnterFrame;
}
}
function kurangMakan() {
jmlMakanan1 = jmlMakanan1 - (1 * unit1);
jmlMakanan2 = jmlMakanan2 - (1 * unit2);
if (jmlMakanan1 <= 0) {
jmlMakanan1 = 0;
frame_mc.makanan1 = jmlMakanan1;
moral1 = moral1 - 2;
if (moral1 <= 0) {
if (masihMain == true) {
masihMain = false;
moral1 = 0;
cekSelesai("kalah");
}
}
}
if (jmlMakanan2 <= 0) {
jmlMakanan2 = 0;
frame_mc.makanan2 = jmlMakanan2;
moral2 = moral2 - 2;
if (moral2 <= 0) {
if (masihMain == true) {
masihMain = false;
moral2 = 0;
cekSelesai("menang");
}
}
}
}
function clearSemua() {
clearInterval(idJagoan);
clearInterval(idMusuh);
clearInterval(idMakan);
Key.removeListener(myListener);
delete myListener.onKeyDown;
delete myListener.onKeyUp;
removeMovieClip(back_mc);
removeMovieClip(frame_mc);
i = 10;
while (i <= 100) {
removeMovieClip(_root["jagoan_mc" + i]);
i++;
}
i = 10;
while (i <= 100) {
removeMovieClip(_root["musuh_mc" + i]);
i++;
}
i = 100000 /* 0x0186A0 */;
while (i <= 110000) {
removeMovieClip(_root["panah_mc" + i]);
i++;
}
i = 100000 /* 0x0186A0 */;
while (i <= 110000) {
removeMovieClip(_root["batu_mc" + i]);
i++;
}
}
function cekSelesai(indi) {
clearSemua();
jenisPerintah = "selesaiWar";
if (indi == "menang") {
kondisiPerang = "menang";
} else if (indi == "kalah") {
kondisiPerang = "kalah";
}
if (indi == "menang") {
totalWin1++;
if (kondisiSerangan == "bertahan") {
_root["sword" + pilihSerang] = jmlUnit1;
_root["axe" + pilihSerang] = jmlUnit2;
_root["spear" + pilihSerang] = jmlUnit3;
_root["bow" + pilihSerang] = jmlUnit4;
_root["horse" + pilihSerang] = jmlUnit5;
_root["catapult" + pilihSerang] = jmlUnit6;
_root["xcatapult" + pilihSerang] = _root["catapult" + pilihSerang];
_root["xfood" + pilihSerang] = jmlMakanan1;
} else {
_root["sword" + targetArea] = jmlUnit1;
_root["axe" + targetArea] = jmlUnit2;
_root["spear" + targetArea] = jmlUnit3;
_root["bow" + targetArea] = jmlUnit4;
_root["horse" + targetArea] = jmlUnit5;
_root["catapult" + targetArea] = jmlUnit6;
_root["xcatapult" + targetArea] = _root["catapult" + targetArea];
_root["xfood" + targetArea] = jmlMakanan1;
}
} else if (indi == "kalah") {
totalWin2++;
if (kondisiSerangan != "bertahan") {
_root["sword" + menujuKe] = _root["sword" + menujuKe] + jmlUnit1;
_root["axe" + menujuKe] = _root["axe" + menujuKe] + jmlUnit2;
_root["bow" + menujuKe] = _root["bow" + menujuKe] + jmlUnit3;
_root["spear" + menujuKe] = _root["spear" + menujuKe] + jmlUnit4;
_root["horse" + menujuKe] = _root["horse" + menujuKe] + jmlUnit5;
_root["catapult" + menujuKe] = _root["catapult" + menujuKe] + jmlUnit6;
_root["xcatapult" + menujuKe] = _root["catapult" + menujuKe];
_root["xfood" + menujuKe] = _root["xfood" + menujuKe] + jmlMakanan1;
_root["worker" + menujuKe] = _root["worker" + menujuKe] - _root["sword" + menujuKe];
_root["worker" + menujuKe] = _root["worker" + menujuKe] - _root["axe" + menujuKe];
_root["worker" + menujuKe] = _root["worker" + menujuKe] - _root["bow" + menujuKe];
_root["worker" + menujuKe] = _root["worker" + menujuKe] - _root["spear" + menujuKe];
_root["worker" + menujuKe] = _root["worker" + menujuKe] - _root["horse" + menujuKe];
_root["worker" + menujuKe] = _root["worker" + menujuKe] - _root["catapult" + menujuKe];
}
}
victory = attachMovie("victory", "victory", 800001);
victory._x = 400;
victory._y = 300;
if (indi == "menang") {
victory.gotoAndStop(1);
} else if (indi == "kalah") {
victory.gotoAndStop(2);
}
if (totalKilled >= 50) {
medal21 = true;
}
if (totalKilled >= 100) {
medal22 = true;
_root.scoreHTTPSender("FL091021", "CH005");
}
if (totalKilled >= 150) {
medal23 = true;
}
if (totalKilled >= 200) {
medal24 = true;
_root.scoreHTTPSender("FL091021", "CH006");
}
if (totalKilled >= 250) {
medal25 = true;
}
if (totalKilled >= 300) {
medal26 = true;
_root.scoreHTTPSender("FL091021", "CH007");
}
if (totalKilled >= 350) {
medal27 = true;
}
if (totalKilled >= 400) {
medal28 = true;
_root.scoreHTTPSender("FL091021", "CH008");
}
if (totalKilled >= 450) {
medal29 = true;
}
if (totalKilled >= 500) {
medal210 = true;
}
victory.continue_btn.onRelease = function () {
removeMovieClip(victory);
gotoAndStop (217);
};
}
function geserKiri() {
back._x = back._x - speedGeser;
ki = 1;
while (ki <= 100) {
_root["jagoan_mc" + ki]._x = _root["jagoan_mc" + ki]._x - speedGeser;
_root["musuh_mc" + ki]._x = _root["musuh_mc" + ki]._x - speedGeser;
ki++;
}
ki = 10000;
while (ki <= 11000) {
_root["batu_mc" + ki]._x = _root["batu_mc" + ki]._x - speedGeser;
ki++;
}
}
function geserKanan() {
back._x = back._x + speedGeser;
ka = 1;
while (ka <= 100) {
_root["jagoan_mc" + ka]._x = _root["jagoan_mc" + ka]._x + speedGeser;
_root["musuh_mc" + ka]._x = _root["musuh_mc" + ka]._x + speedGeser;
ka++;
}
ka = 10000;
while (ka <= 11000) {
_root["batu_mc" + ka]._x = _root["batu_mc" + ka]._x + speedGeser;
ka++;
}
}
stop();
sedangBattle = true;
if (ztipeMusuh == "barbar") {
backBattle();
} else {
backNaval();
}
punyaWilayahz = 0;
i = 1;
while (i <= 96) {
if (_root["milik" + i] == 1) {
punyaWilayahz++;
}
i++;
}
zinit();
munculBackground();
buatFrame();
buatAtribut();
if (punyaWilayahz <= 20) {
idMusuh = setInterval(munculMusuh, 3000);
} else if (punyaWilayahz <= 40) {
idMusuh = setInterval(munculMusuh, 2500);
} else if (punyaWilayahz <= 80) {
idMusuh = setInterval(munculMusuh, 2000);
} else {
idMusuh = setInterval(munculMusuh, 1500);
}
idMakan = setInterval(kurangMakan, 15000);
_root.onEnterFrame = function () {
if ((_root._xmouse >= 700) || (jalanKanan == true)) {
if (back._x > -800) {
geserKiri();
}
} else if ((_root._xmouse <= 100) || (jalanKiri == true)) {
if (back._x < 0) {
geserKanan();
}
}
frame_mc.morale1 = "Morale: " + moral1;
frame_mc.morale2 = "Morale: " + moral2;
frame_mc.unite1 = "Total Unit : " + unit1;
frame_mc.unite2 = "Total Unit : " + unit2;
frame_mc.jmlUnit1 = jmlUnit1;
frame_mc.jmlUnit2 = jmlUnit2;
frame_mc.jmlUnit3 = jmlUnit3;
frame_mc.jmlUnit4 = jmlUnit4;
frame_mc.jmlUnit5 = jmlUnit5;
frame_mc.jmlUnit6 = jmlUnit6;
frame_mc.makanan1 = jmlMakanan1;
frame_mc.makanan2 = jmlMakanan2;
};
myListener = new Object();
myListener.onKeyDown = function () {
if ((Key.getCode() == 90) || (Key.getCode() == 89)) {
moveCastle(0);
}
if (Key.getCode() == 67) {
moveCastle(2);
}
if (Key.getCode() == 88) {
moveCastle(3);
}
if (Key.getCode() == 49) {
sedangTekan = true;
if (frame.tipe1.enabled == true) {
klikTipe(1);
}
}
if (Key.getCode() == 50) {
sedangTekan = true;
if (frame.tipe2.enabled == true) {
klikTipe(2);
}
}
if (Key.getCode() == 51) {
sedangTekan = true;
if (frame.tipe3.enabled == true) {
klikTipe(3);
}
}
if (Key.getCode() == 52) {
sedangTekan = true;
if (frame.tipe4.enabled == true) {
klikTipe(4);
}
}
if (Key.getCode() == 53) {
sedangTekan = true;
if (frame.tipe7.enabled == true) {
klikTipe(7);
}
}
if (Key.getCode() == 54) {
sedangTekan = true;
if (frame.tipe5.enabled == true) {
klikTipe(5);
}
}
if (Key.getCode() == 55) {
sedangTekan = true;
if (frame.tipe6.enabled == true) {
klikTipe(6);
}
}
if (Key.getCode() == 56) {
sedangTekan = true;
if (frame.tipe8.enabled == true) {
klikTipe(8);
}
}
if (Key.getCode() == 57) {
sedangTekan = true;
if (frame.tipe9.enabled == true) {
klikTipe(9);
}
}
if (Key.getCode() == 80) {
if (tutorialWar == true) {
sedangTekan = true;
cekPause();
}
}
if (Key.getCode() == 17) {
sedangTekan = true;
tekanCtrl = true;
}
if (Key.getCode() == 32) {
sedangTekan = true;
tekanSpaceBar = true;
}
if ((Key.getCode() == 87) || (Key.getCode() == 38)) {
sedangTekan = true;
panahAtas = true;
kePanah--;
if (kePanah < 1) {
kePanah = 4;
}
}
if ((Key.getCode() == 83) || (Key.getCode() == 40)) {
sedangTekan = true;
panahBawah = true;
kePanah++;
if (kePanah > 4) {
kePanah = 1;
}
}
if ((Key.getCode() == 39) || (Key.getCode() == 68)) {
sedangTekan = true;
jalanKanan = true;
}
if ((Key.getCode() == 37) || (Key.getCode() == 65)) {
sedangTekan = true;
jalanKiri = true;
}
};
myListener.onKeyUp = function () {
if (Key.getCode() == 49) {
sedangTekan = false;
}
if (Key.getCode() == 50) {
sedangTekan = false;
}
if (Key.getCode() == 51) {
sedangTekan = false;
}
if (Key.getCode() == 52) {
sedangTekan = false;
}
if (Key.getCode() == 53) {
sedangTekan = false;
}
if (Key.getCode() == 54) {
sedangTekan = false;
}
if (Key.getCode() == 55) {
sedangTekan = false;
}
if (Key.getCode() == 56) {
sedangTekan = false;
}
if (Key.getCode() == 57) {
sedangTekan = false;
}
if (Key.getCode() == 80) {
sedangTekan = false;
}
if (Key.getCode() == 17) {
sedangTekan = false;
tekanCtrl = false;
}
if (Key.getCode() == 32) {
sedangTekan = false;
tekanSpaceBar = false;
}
if ((Key.getCode() == 87) || (Key.getCode() == 38)) {
sedangTekan = false;
panahAtas = false;
}
if ((Key.getCode() == 83) || (Key.getCode() == 40)) {
sedangTekan = false;
panahBawah = false;
}
if ((Key.getCode() == 39) || (Key.getCode() == 68)) {
sedangTekan = false;
jalanKanan = false;
}
if ((Key.getCode() == 37) || (Key.getCode() == 65)) {
sedangTekan = false;
jalanKiri = false;
}
};
Key.addListener(myListener);
Frame 231
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
Instance of Symbol 24 MovieClip in Frame 231
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 232
stop();
back_btn.onRelease = function () {
gotoAndStop (184);
};
Instance of Symbol 24 MovieClip in Frame 232
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 14 MovieClip Frame 1
stop();
Symbol 27 Button
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Symbol 43 MovieClip [victory] Frame 1
stop();
Symbol 70 MovieClip Frame 8
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backPedang();
}
Symbol 70 MovieClip Frame 13
_root.cekKena(_parent);
Symbol 109 MovieClip Frame 1
_root.backMati();
Symbol 109 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 110 MovieClip [pedang_mc] Frame 1
stop();
Symbol 128 MovieClip Frame 8
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backKapak();
}
Symbol 128 MovieClip Frame 14
_root.cekKena(_parent);
Symbol 138 MovieClip Frame 1
_root.backMati();
Symbol 138 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 139 MovieClip [kapak_mc] Frame 1
stop();
Symbol 168 MovieClip Frame 8
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backTombak();
}
Symbol 168 MovieClip Frame 13
_root.cekKena(_parent);
Symbol 178 MovieClip Frame 1
_root.backMati();
Symbol 178 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 179 MovieClip [tombak_mc] Frame 1
stop();
Symbol 203 MovieClip Frame 13
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backPanah();
}
Symbol 203 MovieClip Frame 15
_root.cekPanah(_parent);
Symbol 213 MovieClip Frame 1
_root.backMati();
Symbol 213 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 214 MovieClip [panah_mc] Frame 1
stop();
Symbol 240 MovieClip Frame 3
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backKuda2();
}
Symbol 250 MovieClip Frame 8
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backTombak2();
}
Symbol 250 MovieClip Frame 13
_root.cekKena(_parent);
Symbol 273 MovieClip Frame 1
_root.backMati();
Symbol 273 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 274 MovieClip [kuda_mc] Frame 1
stop();
Symbol 321 MovieClip Frame 21
_root.backKetapel();
Symbol 321 MovieClip Frame 25
_root.cekKetapel(_parent);
Symbol 332 MovieClip Frame 60
stop();
Symbol 336 MovieClip Frame 70
stop();
removeMovieClip(_parent);
Symbol 337 MovieClip [ketapel_mc] Frame 1
stop();
Symbol 365 MovieClip Frame 1
stop();
Symbol 371 MovieClip Frame 1
stop();
Symbol 373 MovieClip Frame 1
stop();
Symbol 373 MovieClip Frame 60
_root.buatPasukan(1);
gotoAndStop (1);
Symbol 373 MovieClip Frame 430
_root.buatPasukan(1);
gotoAndStop (1);
Symbol 377 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 100
_root.buatPasukan(2);
gotoAndStop (1);
Symbol 377 MovieClip Frame 450
_root.buatPasukan(2);
gotoAndStop (1);
Symbol 380 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 80
_root.buatPasukan(3);
gotoAndStop (1);
Symbol 380 MovieClip Frame 440
_root.buatPasukan(3);
gotoAndStop (1);
Symbol 383 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 80
_root.buatPasukan(4);
gotoAndStop (1);
Symbol 383 MovieClip Frame 440
_root.buatPasukan(4);
gotoAndStop (1);
Symbol 386 MovieClip Frame 1
stop();
Symbol 386 MovieClip Frame 175
_root.buatPasukan(5);
gotoAndStop (1);
Symbol 386 MovieClip Frame 475
_root.buatPasukan(5);
gotoAndStop (1);
Symbol 389 MovieClip Frame 1
stop();
Symbol 389 MovieClip Frame 300
_root.buatPasukan(6);
gotoAndStop (1);
Symbol 389 MovieClip Frame 600
_root.buatPasukan(6);
gotoAndStop (1);
Instance of Symbol 24 MovieClip in Symbol 396 MovieClip [frame_mc] Frame 1
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 421 MovieClip Frame 8
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backKapak();
}
Symbol 421 MovieClip Frame 12
_root.cekKena(_parent);
Symbol 435 MovieClip Frame 1
_root.backMati();
Symbol 435 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 436 MovieClip [kapak_mc2] Frame 1
stop();
Symbol 461 MovieClip Frame 3
_root.backKuda2();
Symbol 471 MovieClip Frame 8
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backTombak2();
}
Symbol 471 MovieClip Frame 13
_root.cekKena(_parent);
Symbol 482 MovieClip Frame 1
_root.backMati();
Symbol 482 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 483 MovieClip [kuda_mc2] Frame 1
stop();
Symbol 506 MovieClip Frame 13
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backPanah();
}
Symbol 506 MovieClip Frame 15
_root.cekPanah(_parent);
Symbol 516 MovieClip Frame 1
_root.backMati();
Symbol 516 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 517 MovieClip [panah_mc2] Frame 1
stop();
Symbol 534 MovieClip Frame 8
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backPedang();
}
Symbol 534 MovieClip Frame 13
_root.cekKena(_parent);
Symbol 544 MovieClip Frame 1
_root.backMati();
Symbol 544 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 545 MovieClip [pedang_mc2] Frame 1
stop();
Symbol 573 MovieClip Frame 8
if ((_parent._x >= 0) && (_parent._x <= 800)) {
_root.backTombak();
}
Symbol 573 MovieClip Frame 13
_root.cekKena(_parent);
Symbol 583 MovieClip Frame 1
_root.backMati();
Symbol 583 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 584 MovieClip [tombak_mc2] Frame 1
stop();
Symbol 586 MovieClip [panahx] Frame 1
stop();
Symbol 586 MovieClip [panahx] Frame 2
removeMovieClip(this);
Symbol 622 MovieClip Frame 23
stop();
removeMovieClip(_parent);
Symbol 623 MovieClip [batu_mc] Frame 1
stop();
Symbol 649 MovieClip Frame 13
_root.backPukul();
Symbol 649 MovieClip Frame 15
_root.cekKena(_parent);
Symbol 660 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 661 MovieClip [barbar1] Frame 1
stop();
Symbol 661 MovieClip [barbar1] Frame 4
_root.backMati5();
Symbol 678 MovieClip Frame 12
_root.backGada();
Symbol 678 MovieClip Frame 14
_root.cekKena(_parent);
Symbol 688 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 689 MovieClip [barbar2] Frame 1
stop();
Symbol 689 MovieClip [barbar2] Frame 4
_root.backMati5();
Symbol 710 MovieClip Frame 13
_root.backKetapel2();
Symbol 710 MovieClip Frame 17
_root.cekBatu2(_parent);
Symbol 720 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 721 MovieClip [barbar3] Frame 1
stop();
Symbol 721 MovieClip [barbar3] Frame 4
_root.backMati5();
Symbol 742 MovieClip Frame 13
_root.backPanah2();
Symbol 742 MovieClip Frame 15
_root.cekPanah(_parent);
Symbol 752 MovieClip Frame 65
stop();
removeMovieClip(_parent);
Symbol 753 MovieClip [barbar4] Frame 1
stop();
Symbol 753 MovieClip [barbar4] Frame 4
_root.backMati5();
Symbol 774 MovieClip Frame 21
_root.backKetapel();
Symbol 774 MovieClip Frame 25
_root.cekKetapel(_parent);
Symbol 784 MovieClip Frame 60
stop();
Symbol 785 MovieClip [ketapel_mc2] Frame 1
stop();
Symbol 807 MovieClip Frame 1
stop();
Symbol 815 Button
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 818 MovieClip Frame 60
stop();
Symbol 832 MovieClip Frame 14
stop();
Symbol 839 MovieClip Frame 55
stop();
Symbol 840 MovieClip Frame 350
stop();
_root.gotoAndStop("preload");
Symbol 882 MovieClip Frame 1
stop();
Symbol 936 MovieClip Frame 1
stop();
Symbol 939 MovieClip Frame 1
stop();
Symbol 991 MovieClip Frame 1
stop();
Symbol 1028 MovieClip Frame 1
stop();
Symbol 1028 MovieClip Frame 60
_root.buatPasukan(1);
gotoAndStop (1);
Symbol 1028 MovieClip Frame 430
_root.buatPasukan(1);
gotoAndStop (1);
Symbol 1029 MovieClip Frame 1
stop();
Symbol 1029 MovieClip Frame 80
_root.buatPasukan(3);
gotoAndStop (1);
Symbol 1029 MovieClip Frame 440
_root.buatPasukan(3);
gotoAndStop (1);
Symbol 1030 MovieClip Frame 1
stop();
Symbol 1030 MovieClip Frame 80
_root.buatPasukan(4);
gotoAndStop (1);
Symbol 1030 MovieClip Frame 440
_root.buatPasukan(4);
gotoAndStop (1);
Symbol 1031 MovieClip Frame 1
stop();
Symbol 1031 MovieClip Frame 100
_root.buatPasukan(2);
gotoAndStop (1);
Symbol 1031 MovieClip Frame 450
_root.buatPasukan(2);
gotoAndStop (1);
Symbol 1032 MovieClip Frame 1
stop();
Symbol 1032 MovieClip Frame 175
_root.buatPasukan(5);
gotoAndStop (1);
Symbol 1032 MovieClip Frame 475
_root.buatPasukan(5);
gotoAndStop (1);
Symbol 1033 MovieClip Frame 1
stop();
Symbol 1033 MovieClip Frame 300
_root.buatPasukan(6);
gotoAndStop (1);
Symbol 1033 MovieClip Frame 600
_root.buatPasukan(6);
gotoAndStop (1);
Symbol 1043 MovieClip Frame 1
play();
Symbol 1056 MovieClip Frame 1
stop();
Symbol 1059 MovieClip Frame 1
stop();
Symbol 1068 MovieClip Frame 1
stop();
Symbol 1071 MovieClip Frame 1
stop();
Symbol 1075 MovieClip Frame 1
stop();
Symbol 1078 MovieClip Frame 1
stop();
Symbol 1081 MovieClip Frame 1
stop();
Symbol 1084 MovieClip Frame 1
stop();
Symbol 1087 MovieClip Frame 1
stop();
Symbol 1090 MovieClip Frame 1
stop();
Symbol 1093 MovieClip Frame 1
stop();
Symbol 1096 MovieClip Frame 1
stop();
Symbol 1099 MovieClip Frame 1
stop();
Symbol 1102 MovieClip Frame 1
stop();
Symbol 1105 MovieClip Frame 1
stop();
Symbol 1108 MovieClip Frame 1
stop();
Symbol 1111 MovieClip Frame 1
stop();
Symbol 1114 MovieClip Frame 1
stop();
Symbol 1117 MovieClip Frame 1
stop();
Symbol 1120 MovieClip Frame 1
stop();
Symbol 1123 MovieClip Frame 1
stop();
Symbol 1126 MovieClip Frame 1
stop();
Symbol 1129 MovieClip Frame 1
stop();
Symbol 1132 MovieClip Frame 1
stop();
Symbol 1135 MovieClip Frame 1
stop();
Symbol 1138 MovieClip Frame 1
stop();
Symbol 1141 MovieClip Frame 1
stop();
Symbol 1144 MovieClip Frame 1
stop();
Symbol 1147 MovieClip Frame 1
stop();
Symbol 1150 MovieClip Frame 1
stop();
Symbol 1153 MovieClip Frame 1
stop();
Symbol 1156 MovieClip Frame 1
stop();
Symbol 1159 MovieClip Frame 1
stop();
Symbol 1162 MovieClip Frame 1
stop();
Symbol 1200 MovieClip Frame 1
stop();
Symbol 1211 MovieClip Frame 2
stop();
Symbol 1312 MovieClip Frame 1
stop();
Symbol 1372 MovieClip Frame 1
stop();
Symbol 1372 MovieClip Frame 2
stop();
Symbol 1386 MovieClip Frame 1
stop();
Symbol 1386 MovieClip Frame 2
play();
Symbol 1386 MovieClip Frame 3
_root.simpanData();
Symbol 1386 MovieClip Frame 5
stop();
back_btn.onRelease = function () {
gotoAndStop (1);
_root.cekMenuTombol();
};
Symbol 1386 MovieClip Frame 20
play();
Symbol 1386 MovieClip Frame 21
_root.simpanData();
Symbol 1386 MovieClip Frame 23
stop();
_root.quitSave();
Symbol 1386 MovieClip Frame 30
function cekSpeedQuality() {
i = 1;
while (i <= 3) {
this["speed" + i].angka = i;
this["quality" + i].angka = i;
this["speed" + i].gotoAndStop(1);
this["quality" + i].gotoAndStop(1);
this["speed" + i].onRelease = klikSpeed;
this["quality" + i].onRelease = klikQuality;
this["speed" + i].onRollOver = function () {
over();
};
this["quality" + i].onRollOver = function () {
over();
};
i++;
}
this["speed" + _root.speedGame].gotoAndStop(2);
this["quality" + _root.qualityGame].gotoAndStop(2);
}
function klikSpeed() {
klik();
indi = new String(this);
_root.speedGame = Number(indi.substr(indi.length - 1, 1));
cekSpeedQuality();
}
function klikQuality() {
klik();
indi = new String(this);
_root.qualityGame = Number(indi.substr(indi.length - 1, 1));
if (_root.qualityGame == 1) {
_quality = "HIGH";
} else if (_root.qualityGame == 2) {
_quality = "MEDIUM";
} else if (_root.qualityGame == 3) {
_quality = "LOW";
}
cekSpeedQuality();
}
stop();
msgBox_mc._visible = false;
msgBox_mc2._visible = false;
clear_btn.onRelease = function () {
initAwal();
initStatistik();
datasaveImperium2 = undefined;
simpanData();
loadData();
gotoAndStop (1);
};
bar1_mc.bar_mc._x = Math.ceil((_root.volum / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volum = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volum);
bar1_mc.persen1 = _root.volum + " %";
};
bar1_mc.indi_mc.onPress = function () {
klik();
startDrag (bar1_mc.bar_mc, true, -115, 0, 115, 0);
};
bar1_mc.indi_mc.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volum1 = int(0.434782608695652 * (this._x + 115));
_root.volum2 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volum1);
_root.mySound2.setVolume(_root.volum2);
bar2_mc.persen2 = _root.volum1 + " %";
};
bar2_mc.indi_mc.onPress = function () {
klik();
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
cekSpeedQuality();
if (_root.musikNyala == true) {
xxmusic1.gotoAndStop(2);
xxmusic2.gotoAndStop(1);
xxmusic1.onRelease = function () {
_root.backTittle();
_root.musikNyala = true;
xxmusic1.gotoAndStop(2);
xxmusic2.gotoAndStop(1);
};
xxmusic2.onRelease = function () {
_root.myMusic4.stop();
_root.musikNyala = false;
xxmusic1.gotoAndStop(1);
xxmusic2.gotoAndStop(2);
};
} else {
xxmusic1.gotoAndStop(1);
xxmusic2.gotoAndStop(2);
xxmusic1.onRelease = function () {
_root.musikNyala = true;
xxmusic1.gotoAndStop(2);
xxmusic2.gotoAndStop(1);
};
xxmusic2.onRelease = function () {
_root.musikNyala = false;
xxmusic1.gotoAndStop(1);
xxmusic2.gotoAndStop(2);
};
}
if (_root.soundNyala == true) {
xxsound1.gotoAndStop(2);
xxsound2.gotoAndStop(1);
xxsound1.onRelease = function () {
_root.soundNyala = true;
xxsound1.gotoAndStop(2);
xxsound2.gotoAndStop(1);
};
xxsound2.onRelease = function () {
_root.soundNyala = false;
xxsound1.gotoAndStop(1);
xxsound2.gotoAndStop(2);
};
} else {
xxsound1.gotoAndStop(1);
xxsound2.gotoAndStop(2);
xxsound1.onRelease = function () {
_root.soundNyala = true;
xxsound1.gotoAndStop(2);
xxsound2.gotoAndStop(1);
};
xxsound2.onRelease = function () {
_root.soundNyala = false;
xxsound1.gotoAndStop(1);
xxsound2.gotoAndStop(2);
};
}
Symbol 1399 MovieClip Frame 1
stop();
Symbol 1401 MovieClip Frame 1
stop();
Symbol 1402 MovieClip Frame 1
stop();
Symbol 1404 MovieClip Frame 1
stop();
Symbol 1405 MovieClip Frame 1
stop();
Symbol 1407 MovieClip Frame 1
stop();
Symbol 1408 MovieClip Frame 1
stop();
Symbol 1409 MovieClip Frame 1
stop();
Symbol 1410 MovieClip Frame 1
stop();
Symbol 1411 MovieClip Frame 1
stop();
Symbol 1412 MovieClip Frame 1
stop();
Symbol 1414 MovieClip Frame 1
stop();
Symbol 1416 MovieClip Frame 1
stop();
Symbol 1419 MovieClip Frame 1
stop();
Symbol 1438 MovieClip Frame 1
stop();
quit_btn.onRelease = function () {
_root.tutorial_mc._visible = false;
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
back_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Symbol 1438 MovieClip Frame 2
stop();
quit_btn.onRelease = function () {
_root.tutorial_mc._visible = false;
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
back_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Symbol 1438 MovieClip Frame 3
stop();
quit_btn.onRelease = function () {
_root.tutorial_mc._visible = false;
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
back_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Symbol 1438 MovieClip Frame 4
stop();
quit_btn.onRelease = function () {
_root.tutorial_mc._visible = false;
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
back_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Symbol 1438 MovieClip Frame 5
stop();
quit_btn.onRelease = function () {
_root.tutorial_mc._visible = false;
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
back_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Symbol 1438 MovieClip Frame 6
stop();
quit_btn.onRelease = function () {
_root.tutorial_mc._visible = false;
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
back_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Symbol 1438 MovieClip Frame 7
stop();
quit_btn.onRelease = function () {
_root.tutorial_mc._visible = false;
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
back_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Symbol 1438 MovieClip Frame 8
stop();
quit_btn.onRelease = function () {
_root.tutorial_mc._visible = false;
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
back_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Symbol 1438 MovieClip Frame 9
stop();
quit_btn.onRelease = function () {
_root.tutorial_mc._visible = false;
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
back_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Symbol 1438 MovieClip Frame 10
stop();
quit_btn.onRelease = function () {
_root.tutorial_mc._visible = false;
};
next_btn.onRelease = function () {
nextFrame();
gotoAndStop;
};
back_btn.onRelease = function () {
prevFrame();
gotoAndStop;
};
Symbol 1470 MovieClip Frame 1
stop();
Symbol 1472 MovieClip Frame 1
stop();
Symbol 1474 MovieClip Frame 1
stop();
Symbol 1476 MovieClip Frame 1
stop();
Symbol 1478 MovieClip Frame 1
stop();
Symbol 1488 MovieClip Frame 1
stop();
Symbol 1489 MovieClip Frame 1
stop();
Symbol 1490 MovieClip Frame 1
stop();
Symbol 1491 MovieClip Frame 1
stop();
Symbol 1497 MovieClip Frame 1
stop();
Symbol 1508 MovieClip Frame 1
stop();
Symbol 1510 MovieClip Frame 1
stop();
Symbol 1512 MovieClip Frame 1
stop();
Symbol 1514 MovieClip Frame 1
stop();
Symbol 1516 MovieClip Frame 1
stop();
Symbol 1518 MovieClip Frame 1
stop();
Symbol 1520 MovieClip Frame 1
stop();
Symbol 1522 MovieClip Frame 1
stop();