Combined Code
movieClip 61 gw_horse_running {
}
movieClip 86 be_horse_running {
}
movieClip 111 rb_horse_running {
}
movieClip 134 bf_horse_running {
}
movieClip 159 enemy_horse_running {
}
movieClip 184 horse_running {
}
movieClip 194 mc_spirit {
frame 46 {
stop();
this.removeMovieClip();
}
}
// unknown tag 88 length 148
movieClip 202 warning {
}
movieClip 210 {
}
movieClip 231 {
frame 1 {
stop();
}
}
movieClip 232 {
frame 1 {
stop();
}
}
// unknown tag 88 length 80
movieClip 237 {
frame 1 {
this._alpha = 0;
}
}
movieClip 238 tower_battle {
frame 1 {
stop();
}
}
movieClip 243 swordman1_part1 {
}
movieClip 247 swordman1_part3 {
}
movieClip 253 swordman1_part2 {
}
movieClip 260 {
frame 1 {
stop();
}
}
movieClip 261 {
frame 1 {
stop();
}
}
movieClip 262 {
frame 1 {
stop();
}
}
movieClip 265 {
frame 69 {
stop();
}
}
movieClip 266 {
frame 1 {
this.benteng.gotoAndStop(_root.daftarMap[_root.map]);
}
frame 51 {
stop();
_root.tampilKalah();
delete this._parent.onEnterFrame;
}
}
movieClip 267 mc_benteng {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
frame 1 {
stop();
Stage.showMenu = false;
fscommand('trapallkeys', true);
mochi.as2.MochiAd.showPreGameAd({'id': 'f80022c0d07ef145', 'res': '800x600'});
}
movieClip 3601 __Packages.mochi.as2.MochiAd {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiAd) {
var v1 = function () {};
mochi.as2.MochiAd = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showPreGameAd = function (options) {
var v26 = {'clip': _root, 'ad_timeout': 3000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showPreloaderAd', 'color': 16747008, 'background': 16777161, 'outline': 13994812, 'no_progress_bar': false, 'ad_started': function () {
this.clip.stop();
}, 'ad_finished': function () {
this.clip.play();
}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_loaded': function (width, height) {}, 'ad_skipped': function () {}, 'ad_progress': function (percent) {}};
options = mochi.as2.MochiAd._parseOptions(options, v26);
if ('c862232051e0a94e1c3609b3916ddb17'.substr(0) == 'dfeada81ac97cde83665f81c12da7def') {
options.ad_started();
options.ad_finished();
return undefined;
}
var clip = options.clip;
var v22 = 11000;
var v25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v14 = mochi.as2.MochiAd._getRes(options);
var v4 = v14[0];
var v13 = v14[1];
mc._x = v4 * 0.5;
mc._y = v13 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk._x = v4 * -0.5;
chk._y = v13 * -0.5;
var v6 = chk.createEmptyMovieClip('_mochiad_bar', 4);
if (options.no_progress_bar) {
v6._visible = false;
delete options.no_progress_bar;
} else {
v6._x = 10;
v6._y = v13 - 20;
}
var v21 = options.color;
delete options.color;
var v19 = options.background;
delete options.background;
var v23 = options.outline;
delete options.outline;
var v5 = v6.createEmptyMovieClip('_outline', 1);
v5.beginFill(v19);
v5.moveTo(0, 0);
v5.lineTo(v4 - 20, 0);
v5.lineTo(v4 - 20, 10);
v5.lineTo(0, 10);
v5.lineTo(0, 0);
v5.endFill();
var v3 = v6.createEmptyMovieClip('_inside', 2);
v3.beginFill(v21);
v3.moveTo(0, 0);
v3.lineTo(v4 - 20, 0);
v3.lineTo(v4 - 20, 10);
v3.lineTo(0, 10);
v3.lineTo(0, 0);
v3.endFill();
v3._xscale = 0;
var v7 = v6.createEmptyMovieClip('_outline', 3);
v7.lineStyle(0, v23, 100);
v7.moveTo(0, 0);
v7.lineTo(v4 - 20, 0);
v7.lineTo(v4 - 20, 10);
v7.lineTo(0, 10);
v7.lineTo(0, 0);
chk.ad_msec = v22;
chk.ad_timeout = v25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time);
if (v2 > 0) {
this._parent._alpha = v2;
} else {
var v3 = this._parent._parent;
mochi.as2.MochiAd.unload(v3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var v2 = this.mc._mochiad_wait;
v2.server_control = true;
v2.started = getTimer();
v2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
chk.onEnterFrame = function () {
var v6 = this._parent._parent;
var v11 = this._parent._mochiad_ctr;
var v5 = getTimer() - this.started;
var v3 = false;
var v4 = v6.getBytesTotal();
var v8 = v6.getBytesLoaded();
var v2 = 100 * v8 / v4;
var v10 = 100 * v5 / chk.ad_msec;
var v9 = this._mochiad_bar._inside;
var v13 = Math.min(100, Math.min(v2 || 0, v10));
v13 = Math.max(this.last_pcnt, v13);
this.last_pcnt = v13;
v9._xscale = v13;
options.ad_progress(v13);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {'id': 'hostLoadPcnt', 'pcnt': v2}, clip._mochiad._containerLCName);
if (v2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var v7 = v11.getBytesTotal();
if (v7 > 0 || typeof v7 == 'undefined') {
chk.showing = true;
chk.started = getTimer();
} else {
if (v5 > chk.ad_timeout && v2 == 100) {
options.ad_failed();
v3 = true;
}
}
}
if (v5 > chk.ad_msec) {
v3 = true;
}
if (v4 > 0 && v8 >= v4 && v3) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
};
v1.showClickAwayAd = function (options) {
var v9 = {'clip': _root, 'ad_timeout': 2000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showClickAwayAd', 'res': '300x250', 'no_bg': true, 'ad_started': function () {}, 'ad_finished': function () {}, 'ad_loaded': function (width, height) {}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_skipped': function () {}};
options = mochi.as2.MochiAd._parseOptions(options, v9);
var clip = options.clip;
var v8 = options.ad_timeout;
delete options.ad_timeout;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v4 = mochi.as2.MochiAd._getRes(options);
var v10 = v4[0];
var v7 = v4[1];
mc._x = v10 * 0.5;
mc._y = v7 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk.ad_timeout = v8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
var v20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var v5 = this._parent._mochiad_ctr;
var v4 = getTimer() - this.started;
var v2 = false;
if (!chk.showing) {
var v3 = v5.getBytesTotal();
if (v3 > 0 || typeof v3 == 'undefined') {
v2 = true;
chk.showing = true;
chk.started = getTimer();
} else {
if (v4 > chk.ad_timeout) {
options.ad_failed();
v2 = true;
}
}
}
if (v2) {
delete this.onEnterFrame;
}
};
};
v1.showInterLevelAd = function (options) {
var v13 = {'clip': _root, 'ad_timeout': 2000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showTimedAd', 'ad_started': function () {
this.clip.stop();
}, 'ad_finished': function () {
this.clip.play();
}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_loaded': function (width, height) {}, 'ad_skipped': function () {}};
options = mochi.as2.MochiAd._parseOptions(options, v13);
var clip = options.clip;
var v10 = 11000;
var v12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v5 = mochi.as2.MochiAd._getRes(options);
var v14 = v5[0];
var v11 = v5[1];
mc._x = v14 * 0.5;
mc._y = v11 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk.ad_msec = v10;
chk.ad_timeout = v12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time);
if (v2 > 0) {
this._parent._alpha = v2;
} else {
var v3 = this._parent._parent;
mochi.as2.MochiAd.unload(v3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var v2 = this.mc._mochiad_wait;
v2.server_control = true;
v2.started = getTimer();
v2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
chk.onEnterFrame = function () {
var v5 = this._parent._mochiad_ctr;
var v4 = getTimer() - this.started;
var v2 = false;
if (!chk.showing) {
var v3 = v5.getBytesTotal();
if (v3 > 0 || typeof v3 == 'undefined') {
chk.showing = true;
chk.started = getTimer();
} else {
if (v4 > chk.ad_timeout) {
options.ad_failed();
v2 = true;
}
}
}
if (v4 > chk.ad_msec) {
v2 = true;
}
if (v2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
};
v1.showPreloaderAd = function (options) {
trace('[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0');
mochi.as2.MochiAd.showPreGameAd(options);
};
v1.showTimedAd = function (options) {
trace('[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0');
mochi.as2.MochiAd.showInterLevelAd(options);
};
v1._allowDomains = function (server) {
var v1 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v1);
}
}
return v1;
};
v1.load = function (options) {
var v13 = {'clip': _root, 'server': 'http://x.mochiads.com/srv/1/', 'method': 'load', 'depth': 10333, 'id': '_UNKNOWN_'};
options = mochi.as2.MochiAd._parseOptions(options, v13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = mochi.as2.MochiAd.getVersion();
var v7 = options.clip;
if (!mochi.as2.MochiAd._isNetworkAvailable()) {
return null;
}
if (v7._mochiad_loaded) {
return null;
}
var v12 = options.depth;
delete options.depth;
var v6 = v7.createEmptyMovieClip('_mochiad', v12);
var v11 = mochi.as2.MochiAd._getRes(options);
options.res = v11[0] + 'x' + v11[1];
options.server += options.id;
delete options.id;
v7._mochiad_loaded = true;
if (v7._url.indexOf('http') != 0) {
trace('[MochiAd] NOTE: Security Sandbox Violation errors below are normal');
}
var v4 = v6.createEmptyMovieClip('_mochiad_ctr', 1);
for (var v8 in options) {
v4[v8] = options[v8];
}
var v10 = v4.server;
delete v4.server;
var v14 = mochi.as2.MochiAd._allowDomains(v10);
v6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var v5 = new Object();
var v9 = ['', Math.floor((new Date()).getTime()), random(999999)].join('_');
v5.mc = v6;
v5.name = v9;
v5.hostname = v14;
v5.allowDomain = function (d) {
return true;
};
v5.allowInsecureDomain = v5.allowDomain;
v5.connect(v9);
v6.lc = v5;
v4.lc = v9;
v4.st = getTimer();
v4.loadMovie(v10 + '.swf', 'POST');
return v6;
};
v1.unload = function (clip) {
if (typeof clip == 'undefined') {
clip = _root;
}
if (clip.clip && clip.clip._mochiad) {
clip = clip.clip;
}
if (!clip._mochiad) {
return false;
}
mochi.as2.MochiAd.containerNotify(clip, {'id': 'unload'}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return true;
};
v1._isNetworkAvailable = function () {
if (System.security) {
var v1 = System.security;
if (v1.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
v1._getRes = function (options) {
var v3 = options.clip.getBounds();
var v2 = 0;
var v1 = 0;
if (typeof options.res != 'undefined') {
var v4 = options.res.split('x');
v2 = parseFloat(v4[0]);
v1 = parseFloat(v4[1]);
} else {
v2 = v3.xMax - v3.xMin;
v1 = v3.yMax - v3.yMin;
}
if (v2 == 0 || v1 == 0) {
v2 = Stage.width;
v1 = Stage.height;
}
return [v2, v1];
};
v1._parseOptions = function (options, defaults) {
var v4 = {};
for (var v8 in defaults) {
v4[v8] = defaults[v8];
}
if (options) {
for (v8 in options) {
v4[v8] = options[v8];
}
}
if (_root.mochiad_options) {
var v5 = _root.mochiad_options.split('&');
var v2 = 0;
while (v2 < v5.length) {
var v3 = v5[v2].split('=');
v4[unescape(v3[0])] = unescape(v3[1]);
++v2;
}
}
if (v4.id == 'test') {
trace('[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!');
}
return v4;
};
v1.rpc = function (clip, callbackID, arg) {
switch (arg.id) {
case 'setValue':
mochi.as2.MochiAd.setValue(clip, arg.objectName, arg.value);
break;
case 'getValue':
var v4 = mochi.as2.MochiAd.getValue(clip, arg.objectName);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, v4, clip._mochiad._containerLCName);
break;
case 'runMethod':
var v3 = mochi.as2.MochiAd.runMethod(clip, arg.method, arg.args);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, v3, clip._mochiad._containerLCName);
break;
default:
trace('[mochiads rpc] unknown rpc id: ' + arg.id);
}
};
v1.setValue = function (base, objectName, value) {
var v2 = objectName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
base[v2[v1]] = value;
};
v1.getValue = function (base, objectName) {
var v2 = objectName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
return base[v2[v1]];
};
v1.runMethod = function (base, methodName, argsArray) {
var v2 = methodName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
if (typeof base[v2[v1]] == 'function') {
return base[v2[v1]].apply(base, argsArray);
} else {
return undefined;
}
};
v1.containerNotify = function (clip, args, lcName) {
var v1 = clip._mochiad._mochiad_ctr.ad.app;
if (v1.notify) {
v1.notify(args);
} else {
(new LocalConnection()).send(lcName, 'notify', args);
}
};
v1.containerRpcResult = function (clip, callbackID, val, lcName) {
var v1 = clip._mochiad._mochiad_ctr.ad.app;
if (v1.rpcResult) {
v1.rpcResult(callbackID, val);
} else {
(new LocalConnection()).send(lcName, 'rpcResult', callbackID, val);
}
};
ASSetPropFlags(mochi.as2.MochiAd.prototype, null, 1);
}
#endinitclip
}
movieClip 3602 __Packages.mochi.as2.MochiSync {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiSync) {
var v1 = function () {
this._syncContainer = {};
};
mochi.as2.MochiSync = v1;
var v2 = v1.prototype;
v2.getProp = function (name) {
return this._syncContainer[name];
};
v2.setProp = function (name, value) {
if (this._syncContainer[name] == value) {
return undefined;
}
this._syncContainer[name] = value;
mochi.as2.MochiServices.send('sync_propUpdate', {'name': name, 'value': value});
};
v2.triggerEvent = function (eventType, args) {
switch (eventType) {
case mochi.as2.MochiSync.SYNC_REQUEST:
mochi.as2.MochiServices.send('sync_syncronize', this._syncContainer);
break;
case mochi.as2.MochiSync.SYNC_PROPERTY:
this._syncContainer[args.name] = args.value;
}
};
v1.SYNC_REQUEST = 'SyncRequest';
v1.SYNC_PROPERTY = 'UpdateProperty';
ASSetPropFlags(mochi.as2.MochiSync.prototype, null, 1);
}
#endinitclip
}
movieClip 3603 __Packages.mochi.as2.MochiServices {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiServices) {
var v1 = function () {};
mochi.as2.MochiServices = v1;
var v2 = v1.prototype;
v1.__get__id = function () {
return mochi.as2.MochiServices._id;
};
v1.__get__clip = function () {
return mochi.as2.MochiServices._container;
};
v1.__get__childClip = function () {
return mochi.as2.MochiServices._clip;
};
v1.getVersion = function () {
return '3.3 as2';
};
v1.allowDomains = function (server) {
var v1 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v1);
}
}
return v1;
};
v1.__get__isNetworkAvailable = function () {
if (System.security) {
var v1 = System.security;
if (v1.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
v1.__set__comChannelName = function (val) {
if (val != undefined) {
if (val.length > 3) {
mochi.as2.MochiServices._sendChannelName = val + '_fromgame';
mochi.as2.MochiServices.initComChannels();
}
}
return mochi.as2.MochiServices.__get__comChannelName();
};
v1.__get__connected = function () {
return mochi.as2.MochiServices._connected;
};
v1.connect = function (id, clip, onError) {
mochi.as2.MochiServices.warnID(id, false);
if (!mochi.as2.MochiServices._connected && mochi.as2.MochiServices._clip == undefined) {
trace('MochiServices Connecting...');
mochi.as2.MochiServices._connecting = true;
mochi.as2.MochiServices.init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else {
if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
};
v1.disconnect = function () {
if (mochi.as2.MochiServices._connected || mochi.as2.MochiServices._connecting) {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._connecting = mochi.as2.MochiServices._connected;
mochi.as2.MochiServices.flush(true);
if (mochi.as2.MochiServices._clip != undefined) {
mochi.as2.MochiServices._clip.removeMovieClip();
delete mochi.as2.MochiServices._clip;
}
mochi.as2.MochiServices._listenChannel.close();
}
};
v1.init = function (id, clip) {
mochi.as2.MochiServices._id = id;
if (clip != undefined) {
mochi.as2.MochiServices._container = clip;
} else {
mochi.as2.MochiServices._container = _root;
}
mochi.as2.MochiServices.loadCommunicator(id, mochi.as2.MochiServices._container);
};
v1.loadCommunicator = function (id, clip) {
var v6 = '_mochiservices_com_' + id;
var v5 = new MovieClipLoader();
var v3 = {};
if (mochi.as2.MochiServices._clip != null) {
return mochi.as2.MochiServices._clip;
}
if (!mochi.as2.MochiServices.__get__isNetworkAvailable()) {
return null;
}
if ((mochi.as2.MochiServices.urlOptions()).servURL) {
mochi.as2.MochiServices._servURL = (mochi.as2.MochiServices.urlOptions()).servURL;
}
var v4 = mochi.as2.MochiServices._servURL + mochi.as2.MochiServices._services;
if ((mochi.as2.MochiServices.urlOptions()).servicesURL) {
v4 = (mochi.as2.MochiServices.urlOptions()).servicesURL;
}
mochi.as2.MochiServices.allowDomains(v4);
mochi.as2.MochiServices._clip = clip.createEmptyMovieClip(v6, 10336, false);
mochi.as2.MochiServices._listenChannelName += Math.floor((new Date()).getTime()) + '_' + Math.floor(Math.random() * 99999);
mochi.as2.MochiServices.listen();
if (v3.waitInterval != null) {
clearInterval(v3.waitInterval);
}
v3.onLoadError = mochi.as2.MochiServices.loadError;
v3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
v3.startTime = getTimer();
v3.wait = function () {
if (getTimer() - this.startTime > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
}
clearInterval(this.waitInterval);
}
};
v3.waitInterval = setInterval(v3, 'wait', 1000);
v5.addListener(v3);
v5.loadClip(v4 + '?listenLC=' + mochi.as2.MochiServices._listenChannelName + '&mochiad_options=' + escape(_root.mochiad_options) + '&api_version=' + /:$version, mochi.as2.MochiServices._clip);
mochi.as2.MochiServices._sendChannel = new LocalConnection();
mochi.as2.MochiServices._sendChannel._queue = [];
return mochi.as2.MochiServices._clip;
};
v1.loadError = function (target_mc, errorCode, httpStatus) {
trace('MochiServices could not load.');
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, [errorCode]);
};
v1.onStatus = function (infoObject) {
if (infoObject.level !== 'error') {
} else {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
}
};
v1.listen = function () {
mochi.as2.MochiServices._listenChannel = new LocalConnection();
mochi.as2.MochiServices._listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
mochi.as2.MochiServices._listenChannel.allowDomain = function (d) {
return true;
};
mochi.as2.MochiServices._listenChannel.allowInsecureDomain = mochi.as2.MochiServices._listenChannel.allowDomain;
mochi.as2.MochiServices._listenChannel._nextcallbackID = 0;
mochi.as2.MochiServices._listenChannel._callbacks = {};
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
trace('Waiting for MochiAds services to connect...');
};
v1.initComChannels = function () {
if (!mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'handshakeDone'});
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'registerGame', 'id': mochi.as2.MochiServices._id, 'clip': mochi.as2.MochiServices._clip, 'version': mochi.as2.MochiServices.getVersion()});
mochi.as2.MochiServices._listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._listenChannel.onReceive = function (pkg) {
var v5 = pkg.callbackID;
var v4 = this._callbacks[v5];
if (!v4) {
return undefined;
}
var v2 = v4.callbackMethod;
var v3 = v4.callbackObject;
if (v3 && typeof v2 == 'string') {
v2 = v3[v2];
}
if (v2 != undefined) {
v2.apply(v3, pkg.args);
}
delete this._callbacks[v5];
};
mochi.as2.MochiServices._listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case 'events':
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case 'coins':
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case 'sync':
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
mochi.as2.MochiServices._listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
};
trace('[SERVICES_API] connected!');
mochi.as2.MochiServices._connecting = false;
mochi.as2.MochiServices._connected = true;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', mochi.as2.MochiServices._sendChannel._queue.shift());
}
}
};
v1.flush = function (error) {
var v1;
var v2;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
v1 = mochi.as2.MochiServices._sendChannel._queue.shift();
false;
if (v1.callbackID != null) {
v2 = mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID];
}
delete mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID];
if (error) {
mochi.as2.MochiServices.handleError(v1.args, v2.callbackObject, v2.callbackMethod);
}
}
};
v1.handleError = function (args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ['NotConnected']);
}
if (args.options != null && args.options.onError != null) {
args.options.onError.apply(null, ['NotConnected']);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = 'NotConnected';
if (callbackObject != null && typeof callbackMethod == 'string') {
callbackObject[callbackMethod](args);
} else {
if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
};
v1.send = function (methodName, args, callbackObject, callbackMethod) {
if (mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
} else {
if (mochi.as2.MochiServices._clip == undefined || !mochi.as2.MochiServices._connecting) {
trace('Error: MochiServices not connected. Please call MochiServices.connect(). Function: ' + methodName);
mochi.as2.MochiServices.handleError(args, callbackObject, callbackMethod);
mochi.as2.MochiServices.flush(true);
return undefined;
} else {
mochi.as2.MochiServices._sendChannel._queue.push({'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
}
}
mochi.as2.MochiServices._listenChannel._callbacks[mochi.as2.MochiServices._listenChannel._nextcallbackID] = {'callbackObject': callbackObject, 'callbackMethod': callbackMethod};
++mochi.as2.MochiServices._listenChannel._nextcallbackID;
};
v1.urlOptions = function () {
var v5 = {};
var v6;
if (_root._url.indexOf('mochiad_options') != -1) {
var v2 = _root._url.indexOf('mochiad_options') + 'mochiad_options'.length + 1;
v6 = _root._url.substr(v2, _root._url.length);
} else {
if (_root.mochiad_options) {
v6 = _root.mochiad_options;
}
}
if (v6) {
var v4 = _root.mochiad_options.split('&');
var v2 = 0;
while (v2 < v4.length) {
var v3 = v4[v2].split('=');
v5[unescape(v3[0])] = unescape(v3[1]);
++v2;
}
}
return v5;
};
v1.warnID = function (bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace('WARNING: ' + (leaderboard ? 'board' : 'game') + ' ID is not the appropriate length');
return undefined;
} else {
if (bid == '1e113c7239048b3f') {
if (leaderboard) {
trace('WARNING: Using testing board ID');
} else {
trace('WARNING: Using testing board ID as game ID');
}
return undefined;
} else {
if (bid == '84993a1de4031cd8') {
if (leaderboard) {
trace('WARNING: Using testing game ID as board ID');
} else {
trace('WARNING: Using testing game ID');
}
return undefined;
}
}
}
var v1 = 0;
while (v1 < bid.length) {
switch (bid.charAt(v1)) {
if (bid.charAt(v1) !== 'f') {
} else {
case '0':
case '1':
case '2':
case '3':
break;
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
}
default:
trace('WARNING: Board ID contains illegal characters: ' + bid);
return undefined;
}
++v1;
}
};
v1.addLinkEvent = function (url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var v2 = new Object();
v2.mav = mochi.as2.MochiServices.getVersion();
v2.swfv = btn.getSWFVersion() || 6;
v2.swfurl = btn._url;
v2.fv = System.capabilities.version;
v2.os = System.capabilities.os;
v2.lang = System.capabilities.language;
v2.scres = System.capabilities.screenResolutionX + 'x' + System.capabilities.screenResolutionY;
var s = '?';
var v3 = 0;
for (var v6 in v2) {
if (v3 != 0) {
s += '&';
}
++v3;
s = s + v6 + '=' + escape(v2[v6]);
}
if (!(mochi.as2.MochiServices.netupAttempted || mochi.as2.MochiServices._connected)) {
var ping = btn.createEmptyMovieClip('ping', 777);
var v7 = btn.createEmptyMovieClip('nettest', 778);
mochi.as2.MochiServices.netupAttempted = true;
ping.loadMovie('http://x.mochiads.com/linkping.swf?t=' + getTimer());
v7.onEnterFrame = function () {
if (ping._totalframes > 0 && ping._totalframes == ping._framesloaded) {
delete this.onEnterFrame;
} else {
if (getTimer() - t0 > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
}
};
}
var v4 = btn.createEmptyMovieClip('clk', 1001);
v4._alpha = 0;
v4.beginFill(1044735);
v4.moveTo(0, 0);
v4.lineTo(0, btn._height);
v4.lineTo(btn._width, btn._height);
v4.lineTo(btn._width, 0);
v4.lineTo(0, 0);
v4.endFill();
v4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL(url + s, '_blank');
} else {
getURL(burl, '_blank');
}
if (onClick != undefined) {
onClick();
}
};
};
v1.setContainer = function (clip) {};
v1.stayOnTop = function (clip) {};
v1._servURL = 'http://www.mochiads.com/static/lib/services/';
v1._services = 'services.swf';
v1._mochiLC = 'MochiLC.swf';
v1._listenChannelName = '__ms_';
v1._connecting = false;
v1._connected = false;
v1.netup = true;
v1.netupAttempted = false;
v1.servicesSync = new mochi.as2.MochiSync();
v1.addProperty('childClip', v1.__get__childClip, function () {});
v1.addProperty('clip', v1.__get__clip, function () {});
v1.addProperty('comChannelName', function () {}, v1.__set__comChannelName);
v1.addProperty('connected', v1.__get__connected, function () {});
v1.addProperty('id', v1.__get__id, function () {});
v1.addProperty('isNetworkAvailable', v1.__get__isNetworkAvailable, function () {});
ASSetPropFlags(mochi.as2.MochiServices.prototype, null, 1);
}
#endinitclip
}
movieClip 3604 __Packages.mochi.as2.MochiEventDispatcher {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEventDispatcher) {
var v1 = function () {
this.eventTable = {};
};
mochi.as2.MochiEventDispatcher = v1;
var v2 = v1.prototype;
v2.buildDelegate = function (thisObject, thatObject) {
var v2 = {'thisObject': thisObject, 'thatObject': thatObject};
if (thatObject != undefined) {
var funct = (typeof thatObject == 'string') ? thisObject[thatObject] : thatObject;
v2.delegate = function (args) {
funct.call(thisObject, args);
};
return v2;
}
v2.delegate = thisObject;
return v2;
};
v2.compareDelegate = function (d_A, d_B) {
if (d_A.thisObject != d_B.thisObject || d_A.thatObject != d_B.thatObject) {
return false;
}
return true;
};
v2.addEventListener = function (event, thisObject, thatObject) {
this.removeEventListener(event, thisObject, thatObject);
this.eventTable[event].push(this.buildDelegate(thisObject, thatObject));
};
v2.removeEventListener = function (event, thisObject, thatObject) {
var v3 = this.buildDelegate(thisObject, thatObject);
if (this.eventTable[event] == undefined) {
this.eventTable[event] = [];
return undefined;
}
for (var v4 in this.eventTable[event]) {
if (!this.compareDelegate(this.eventTable[event][v4], v3)) {
continue;
}
this.eventTable[event].splice(Number(v4), 1);
}
};
v2.triggerEvent = function (event, args) {
if (this.eventTable[event] == undefined) {
return undefined;
}
for (var v4 in this.eventTable[event]) {
this.eventTable[event][v4].delegate(args);
}
};
ASSetPropFlags(mochi.as2.MochiEventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 3605 __Packages.mochi.as2.MochiEvents {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEvents) {
var v1 = function () {};
mochi.as2.MochiEvents = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.startSession = function (achievementID) {
mochi.as2.MochiServices.send('events_beginSession', {'achievementID': achievementID}, null, null);
};
v1.trigger = function (kind, obj) {
if (obj == undefined) {
obj = {};
} else {
if (obj.kind != undefined) {
trace('WARNING: optional arguements package contains key \'id\', it will be overwritten');
obj.kind = kind;
}
}
mochi.as2.MochiServices.send('events_triggerEvent', {'eventObject': obj}, null, null);
};
v1.setNotifications = function (clip, style) {
var v2 = {};
for (var v3 in style) {
v2[v3] = style[v3];
}
v2.clip = clip;
mochi.as2.MochiServices.send('events_setNotifications', v2, null, null);
};
v1.addEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.addEventListener(eventType, thisObject, thatObject);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiEvents._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.removeEventListener(eventType, thisObject, thatObject);
};
v1.startGame = function () {
mochi.as2.MochiEvents.gameStart = (new Date()).getTime();
mochi.as2.MochiEvents.trigger('start_game');
};
v1.endGame = function () {
var v1 = (new Date()).getTime() - mochi.as2.MochiEvents.gameStart;
mochi.as2.MochiEvents.trigger('end_game', {'time': v1});
};
v1.startLevel = function () {
mochi.as2.MochiEvents.levelStart = (new Date()).getTime();
mochi.as2.MochiEvents.trigger('start_level');
};
v1.endLevel = function () {
var v1 = (new Date()).getTime() - mochi.as2.MochiEvents.levelStart;
mochi.as2.MochiEvents.trigger('end_level', {'time': v1});
};
v1.ACHIEVEMENT_RECEIVED = 'AchievementReceived';
v1.ALIGN_TOP_LEFT = 'ALIGN_TL';
v1.ALIGN_TOP = 'ALIGN_T';
v1.ALIGN_TOP_RIGHT = 'ALIGN_TR';
v1.ALIGN_LEFT = 'ALIGN_L';
v1.ALIGN_CENTER = 'ALIGN_C';
v1.ALIGN_RIGHT = 'ALIGN_R';
v1.ALIGN_BOTTOM_LEFT = 'ALIGN_BL';
v1.ALIGN_BOTTOM = 'ALIGN_B';
v1.ALIGN_BOTTOM_RIGHT = 'ALIGN_BR';
v1.FORMAT_SHORT = 'ShortForm';
v1.FORMAT_LONG = 'LongForm';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiEvents.prototype, null, 1);
}
#endinitclip
}
movieClip 3606 __Packages.mochi.as2.MochiCoins {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiCoins) {
var v1 = function () {};
mochi.as2.MochiCoins = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showStore = function (options) {
mochi.as2.MochiServices.send('coins_showStore', {'options': options}, null, null);
};
v1.showItem = function (options) {
if (options == undefined || typeof options.item != 'string') {
trace('ERROR: showItem call must pass an Object with an item key');
return undefined;
}
mochi.as2.MochiServices.send('coins_showItem', {'options': options}, null, null);
};
v1.showVideo = function (options) {
if (options == undefined || typeof options.item != 'string') {
trace('ERROR: showVideo call must pass an Object with an item key');
return undefined;
}
mochi.as2.MochiServices.send('coins_showVideo', {'options': options}, null, null);
};
v1.showLoginWidget = function (options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send('coins_showLoginWidget', {'options': options});
};
v1.hideLoginWidget = function () {
mochi.as2.MochiServices.send('coins_hideLoginWidget');
};
v1.getStoreItems = function () {
mochi.as2.MochiServices.send('coins_getStoreItems');
};
v1.getUserInfo = function () {
mochi.as2.MochiServices.send('coins_getUserInfo');
};
v1.saveUserProperties = function (properties) {
mochi.as2.MochiServices.send('coins_saveUserProperties', properties);
};
v1.addEventListener = function (eventType, delegate) {
mochi.as2.MochiCoins._dispatcher.addEventListener(eventType, delegate);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiCoins._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, delegate) {
mochi.as2.MochiCoins._dispatcher.removeEventListener(eventType, delegate);
};
v1.LOGGED_IN = 'LoggedIn';
v1.LOGGED_OUT = 'LoggedOut';
v1.LOGIN_SHOW = 'LoginShow';
v1.LOGIN_HIDE = 'LoginHide';
v1.STORE_SHOW = 'StoreShow';
v1.STORE_HIDE = 'StoreHide';
v1.PROFILE_SHOW = 'ProfileShow';
v1.PROFILE_HIDE = 'ProfileHide';
v1.PROPERTIES_SAVED = 'PropertySaved';
v1.WIDGET_LOADED = 'WidgetLoaded';
v1.ITEM_OWNED = 'ItemOwned';
v1.ITEM_NEW = 'ItemNew';
v1.STORE_ITEMS = 'StoreItems';
v1.USER_INFO = 'UserInfo';
v1.ERROR = 'Error';
v1.IO_ERROR = 'IOError';
v1.NO_USER = 'NoUser';
v1.PROPERTIES_SIZE = 'PropertiesSize';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiCoins.prototype, null, 1);
}
#endinitclip
}
frame 2 {
}
frame 3 {
stopAllSounds();
gotoAndStop('ludo');
}
movieClip 282 battle_ilustration {
}
movieClip 285 blood_mc {
}
movieClip 300 {
}
movieClip 317 mark {
}
movieClip 319 {
frame 1 {
stop();
}
}
movieClip 328 {
}
movieClip 329 command_center {
frame 1 {
tulisan.gotoAndStop(_root.bahasa + 1);
}
}
// unknown tag 88 length 153
movieClip 363 {
frame 1 {
this._visible = 0;
}
}
movieClip 367 {
frame 1 {
this._visible = 0;
}
}
movieClip 371 {
frame 1 {
this._visible = 0;
}
}
movieClip 375 {
frame 1 {
this._visible = 0;
}
}
movieClip 379 {
frame 1 {
this._visible = 0;
}
}
movieClip 383 {
}
movieClip 386 {
frame 6 {
this.papan._visible = 0;
}
}
movieClip 387 commander_location {
}
movieClip 413 comStat {
}
movieClip 425 {
}
movieClip 426 cursor_mc {
frame 1 {
stop();
}
}
movieClip 430 {
frame 1 {
tulisan.text = _root.dayBahasa[_root.bahasa];
}
}
movieClip 436 day_tween {
frame 91 {
stop();
_root.aktifTombol = true;
if (_root.serangan) {
_root.serangan = false;
}
_root.gantiPeta();
this.removeMovieClip();
}
}
movieClip 453 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 471 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 472 description_map {
frame 1 {
stop();
}
}
movieClip 478 fog_mc {
}
movieClip 482 icon_musuh {
}
movieClip 487 {
frame 1 {
stop();
}
}
movieClip 492 {
frame 1 {
stop();
}
}
movieClip 497 {
frame 1 {
stop();
}
}
movieClip 502 {
frame 1 {
stop();
}
}
movieClip 507 {
frame 1 {
stop();
}
}
movieClip 512 {
frame 1 {
stop();
}
}
movieClip 513 icon_panglima {
}
movieClip 516 {
}
movieClip 517 life_span {
}
movieClip 519 main_blur {
}
movieClip 521 main_fadeout {
frame 26 {
stop();
this.removeMovieClip();
}
}
movieClip 543 {
}
movieClip 544 {
}
movieClip 545 {
frame 1 {
stop();
}
}
movieClip 552 {
}
movieClip 562 {
}
movieClip 563 {
}
movieClip 564 {
frame 1 {
stop();
}
}
movieClip 577 {
}
movieClip 578 {
}
movieClip 581 {
}
movieClip 584 {
}
movieClip 585 {
frame 1 {
stop();
}
}
movieClip 588 {
}
movieClip 589 {
}
movieClip 592 {
}
movieClip 593 {
}
movieClip 606 {
}
movieClip 607 {
}
movieClip 610 {
}
movieClip 613 {
}
movieClip 614 {
frame 1 {
stop();
}
}
movieClip 629 {
}
movieClip 630 {
}
movieClip 633 {
}
movieClip 636 {
}
movieClip 637 {
frame 1 {
stop();
}
}
movieClip 646 {
}
movieClip 647 {
}
movieClip 650 {
}
movieClip 653 {
}
movieClip 654 {
frame 1 {
stop();
}
}
movieClip 657 {
}
movieClip 660 {
}
movieClip 663 {
}
movieClip 664 {
frame 1 {
stop();
}
}
movieClip 667 {
}
movieClip 670 {
}
movieClip 673 {
}
movieClip 674 {
frame 1 {
stop();
}
}
movieClip 677 {
}
movieClip 680 {
}
movieClip 683 {
}
movieClip 684 {
frame 1 {
stop();
}
}
movieClip 691 {
}
movieClip 696 {
}
movieClip 697 {
}
movieClip 700 {
}
movieClip 703 {
}
movieClip 704 {
frame 1 {
stop();
}
}
movieClip 710 {
}
movieClip 711 {
}
movieClip 714 {
}
movieClip 717 {
}
movieClip 718 {
frame 1 {
stop();
}
}
movieClip 721 {
}
movieClip 724 {
}
movieClip 727 {
}
movieClip 728 {
frame 1 {
stop();
}
}
movieClip 737 {
}
movieClip 738 {
}
movieClip 741 {
}
movieClip 744 {
}
movieClip 745 {
frame 1 {
stop();
}
}
movieClip 748 {
}
movieClip 749 {
frame 1 {
stop();
}
}
movieClip 756 {
}
movieClip 757 main_minimap {
}
movieClip 786 {
}
movieClip 804 {
}
movieClip 825 {
}
movieClip 844 {
}
movieClip 863 {
}
movieClip 882 {
}
movieClip 883 {
}
movieClip 890 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 897 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 901 {
}
movieClip 902 {
frame 1 {
stop();
}
}
movieClip 904 {
}
movieClip 911 {
}
button 919 {
on (release) {
_root.getURL('http://www.ludobox.com', _blank);
}
}
movieClip 934 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 935 main_strategy {
}
movieClip 938 {
}
movieClip 939 {
}
movieClip 940 main_tutorial {
frame 15 {
stop();
this.removeMovieClip();
}
}
movieClip 953 {
frame 1 {
_root.soundFX('sungai');
}
}
movieClip 956 {
frame 1 {
stop();
}
}
movieClip 959 mc_flower {
}
movieClip 968 {
}
movieClip 981 {
frame 1 {
_root.soundFX('sungai');
}
}
movieClip 994 {
frame 1 {
_root.soundFX('sungai');
}
}
movieClip 1007 {
frame 1 {
_root.soundFX('sungai');
}
}
movieClip 1020 {
frame 1 {
_root.soundFX('sungai');
}
}
movieClip 1043 {
frame 1 {
stop();
}
}
movieClip 1080 {
frame 1 {
_root.soundFX('laut');
}
}
movieClip 1099 {
frame 1 {
_root.soundFX('laut');
}
}
movieClip 1120 {
frame 1 {
_root.soundFX('laut');
}
}
movieClip 1141 {
frame 1 {
_root.soundFX('laut');
}
}
movieClip 1162 {
frame 1 {
_root.soundFX('laut');
}
}
movieClip 1163 map_general {
frame 1 {
stop();
}
}
movieClip 1166 mark2 {
}
movieClip 1171 {
}
movieClip 1172 {
frame 1 {
stop();
}
}
movieClip 1174 mc_arrow2 {
frame 1 {
stop();
}
}
movieClip 1175 {
frame 1 {
this._alpha = 0;
}
}
movieClip 1184 {
}
movieClip 1195 {
}
movieClip 1238 {
frame 17 {
_root.soundFX('horse');
}
frame 74 {
++_root.battle_mc.depthObj;
nameHorse = 'horse' + _root.battle_mc.depthObj;
_root.battle_mc.attachMovie('bf_horse_running', nameHorse, _root.battle_mc.depthObj + 5000 * this._parent.posY);
_root.battle_mc[nameHorse]._xscale = 200;
_root.battle_mc[nameHorse]._yscale = 200;
_root.battle_mc[nameHorse]._x = this._parent._x;
_root.battle_mc[nameHorse]._y = this._parent._y;
_root.battle_mc[nameHorse].spd = this._parent.spd;
if (this._parent._xscale < 0) {
_root.battle_mc[nameHorse]._xscale *= -1;
_root.battle_mc[nameHorse].spd = this._parent.spd;
}
_root.battle_mc[nameHorse].onEnterFrame = function () {
if (!_root.isPaused) {
this.play();
this._x += this.spd;
if (this._x < -100 || this._x > 1300) {
this.removeMovieClip();
}
} else {
this.stop();
}
};
}
frame 82 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[14];
}
}
movieClip 1239 mc_beautyflower {
frame 1 {
stop();
this.attacking = false;
}
frame 19 {
this.attacking = false;
}
frame 51 {
gotoAndStop(1);
}
frame 52 {
stop();
_root['special_btn' + this.armyNum].enabled = false;
_root['special_btn' + this.armyNum].special = false;
_root['special_btn' + this.armyNum].gotoAndStop(2);
}
}
movieClip 1247 {
}
movieClip 1263 {
}
movieClip 1282 {
frame 79 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = 0;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[14];
}
}
movieClip 1283 mc_bigbear {
frame 1 {
stop();
}
frame 48 {
gotoAndStop(1);
}
frame 49 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
_root['special_btn' + this.armyNum].enabled = false;
_root['special_btn' + this.armyNum].special = false;
_root['special_btn' + this.armyNum].gotoAndStop(2);
}
}
movieClip 1292 {
}
movieClip 1312 {
}
movieClip 1319 {
}
movieClip 1344 {
frame 17 {
_root.soundFX('horse');
}
frame 74 {
++_root.battle_mc.depthObj;
nameHorse = 'horse' + _root.battle_mc.depthObj;
_root.battle_mc.attachMovie('be_horse_running', nameHorse, _root.battle_mc.depthObj + 5000 * this._parent.posY);
_root.battle_mc[nameHorse]._xscale = 200;
_root.battle_mc[nameHorse]._yscale = 200;
_root.battle_mc[nameHorse]._x = this._parent._x;
_root.battle_mc[nameHorse]._y = this._parent._y;
_root.battle_mc[nameHorse].spd = this._parent.spd;
if (this._parent._xscale < 0) {
_root.battle_mc[nameHorse]._xscale *= -1;
_root.battle_mc[nameHorse].spd = this._parent.spd;
}
_root.battle_mc[nameHorse].onEnterFrame = function () {
if (!_root.isPaused) {
this.play();
this._x += this.spd;
if (this._x < -100 || this._x > 1300) {
this.removeMovieClip();
}
} else {
this.stop();
}
};
}
frame 82 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = -30;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[14];
}
}
movieClip 1345 mc_broadeagle {
frame 1 {
stop();
this.attacking = false;
}
frame 46 {
gotoAndStop(1);
}
frame 47 {
stop();
_root['special_btn' + this.armyNum].enabled = false;
_root['special_btn' + this.armyNum].special = false;
_root['special_btn' + this.armyNum].gotoAndStop(2);
}
}
movieClip 1347 mc_bullet {
frame 5 {
stop();
this.removeMovieClip();
}
}
movieClip 1367 {
}
movieClip 1375 {
}
movieClip 1380 {
}
movieClip 1396 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.posPengurang[_root.perangDi];
--_root.battle_mc.enemyLeft;
++_root.statisticList[4];
}
}
movieClip 1397 mc_enemy_cowboy1 {
frame 1 {
stop();
this.attacking = false;
}
frame 36 {
gotoAndStop(1);
}
frame 37 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1402 {
}
movieClip 1410 {
}
movieClip 1416 {
}
movieClip 1426 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.posPengurang[_root.perangDi];
--_root.battle_mc.enemyLeft;
++_root.statisticList[4];
}
}
movieClip 1427 mc_enemy_cowboy2 {
frame 1 {
stop();
this.attacking = false;
}
frame 36 {
gotoAndStop(1);
}
frame 37 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1433 {
}
movieClip 1456 {
}
movieClip 1463 {
}
movieClip 1493 {
frame 17 {
_root.soundFX('horse');
}
frame 74 {
++_root.battle_mc.depthObj;
nameHorse = 'horse' + _root.battle_mc.depthObj;
_root.battle_mc.attachMovie('enemy_horse_running', nameHorse, _root.battle_mc.depthObj + 5000 * this._parent.posY);
_root.battle_mc[nameHorse]._xscale = 200;
_root.battle_mc[nameHorse]._yscale = 200;
_root.battle_mc[nameHorse]._x = this._parent._x;
_root.battle_mc[nameHorse]._y = this._parent._y;
_root.battle_mc[nameHorse].spd = this._parent.spd;
if (this._parent._xscale < 0) {
_root.battle_mc[nameHorse]._xscale *= -1;
_root.battle_mc[nameHorse].spd = this._parent.spd;
}
_root.battle_mc[nameHorse].onEnterFrame = function () {
if (!_root.isPaused) {
this.play();
this._x += this.spd;
if (this._x < -100 || this._x > 1300) {
this.removeMovieClip();
}
} else {
this.stop();
}
};
}
frame 82 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.posPengurang[_root.perangDi];
--_root.battle_mc.enemyLeft;
++_root.statisticList[4];
}
}
movieClip 1494 mc_enemy_cowboy3 {
frame 1 {
stop();
this.attacking = false;
}
frame 41 {
gotoAndStop(1);
}
frame 42 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1511 {
}
movieClip 1520 {
}
movieClip 1534 {
}
movieClip 1554 {
frame 17 {
_root.soundFX('horse');
}
frame 74 {
++_root.battle_mc.depthObj;
nameHorse = 'horse' + _root.battle_mc.depthObj;
_root.battle_mc.attachMovie('enemy_horse_running', nameHorse, _root.battle_mc.depthObj + 5000 * this._parent.posY);
_root.battle_mc[nameHorse]._xscale = 200;
_root.battle_mc[nameHorse]._yscale = 200;
_root.battle_mc[nameHorse]._x = this._parent._x;
_root.battle_mc[nameHorse]._y = this._parent._y;
_root.battle_mc[nameHorse].spd = this._parent.spd;
if (this._parent._xscale < 0) {
_root.battle_mc[nameHorse]._xscale *= -1;
_root.battle_mc[nameHorse].spd = this._parent.spd;
}
_root.battle_mc[nameHorse].onEnterFrame = function () {
if (!_root.isPaused) {
this.play();
this._x += this.spd;
if (this._x < -100 || this._x > 1300) {
this.removeMovieClip();
}
} else {
this.stop();
}
};
}
frame 82 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.posPengurang[perangDi];
--_root.battle_mc.enemyLeft;
++_root.statisticList[2];
}
}
movieClip 1555 mc_enemy_horsearcher1 {
frame 1 {
stop();
this.attacking = false;
}
frame 41 {
gotoAndStop(1);
}
frame 42 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1560 {
}
movieClip 1561 mc_enemy_horsearcher2 {
frame 1 {
stop();
this.attacking = false;
}
frame 41 {
gotoAndStop(1);
}
frame 42 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1579 {
}
movieClip 1587 {
}
movieClip 1605 {
}
movieClip 1618 {
frame 51 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = this._width / 1.5;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.posPengurang[_root.perangDi];
--_root.battle_mc.enemyLeft;
++_root.statisticList[5];
}
}
movieClip 1619 mc_enemy_magician1 {
frame 1 {
stop();
this.attacking = false;
}
frame 39 {
gotoAndStop(1);
}
frame 40 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1626 {
}
movieClip 1634 {
}
movieClip 1655 {
}
movieClip 1668 {
frame 51 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = this._width / 1.5;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.posPengurang[_root.perangDi];
--_root.battle_mc.enemyLeft;
++_root.statisticList[5];
}
}
movieClip 1669 mc_enemy_magician2 {
frame 1 {
stop();
this.attacking = false;
}
frame 60 {
gotoAndStop(1);
}
frame 61 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1689 {
}
movieClip 1697 {
}
movieClip 1708 {
}
movieClip 1719 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 3) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.posPengurang[_root.perangDi];
--_root.battle_mc.enemyLeft;
++_root.statisticList[3];
}
}
movieClip 1720 mc_enemy_spearman1 {
frame 1 {
stop();
this.attacking = false;
}
frame 40 {
gotoAndStop(1);
}
frame 41 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1725 {
}
movieClip 1733 {
}
movieClip 1746 {
}
movieClip 1756 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 3) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.posPengurang[_root.perangDi];
--_root.battle_mc.enemyLeft;
++_root.statisticList[3];
}
}
movieClip 1757 mc_enemy_spearman2 {
frame 1 {
stop();
this.attacking = false;
}
frame 48 {
gotoAndStop(1);
}
frame 49 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1776 {
}
movieClip 1784 {
}
movieClip 1791 {
}
movieClip 1802 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.posPengurang[_root.perangDi];
--_root.battle_mc.enemyLeft;
++_root.statisticList[1];
trace(_root.battle_mc.enemyLeft);
}
}
movieClip 1803 mc_enemy_swordman1 {
frame 1 {
stop();
this.attacking = false;
}
frame 36 {
gotoAndStop(1);
}
frame 37 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1808 {
}
movieClip 1816 {
}
movieClip 1821 {
}
movieClip 1837 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.posPengurang[_root.perangDi];
--_root.battle_mc.enemyLeft;
++_root.statisticList[1];
}
}
movieClip 1838 mc_enemy_swordman2 {
frame 1 {
stop();
this.attacking = false;
}
frame 22 {
gotoAndStop(1);
}
frame 23 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1848 mc_explosion {
frame 11 {
stop();
this.removeMovieClip();
}
}
movieClip 1857 {
}
movieClip 1889 {
}
movieClip 1906 {
}
movieClip 1931 {
}
movieClip 1953 {
frame 17 {
_root.soundFX('horse');
}
frame 74 {
++_root.battle_mc.depthObj;
nameHorse = 'horse' + _root.battle_mc.depthObj;
_root.battle_mc.attachMovie('gw_horse_running', nameHorse, _root.battle_mc.depthObj + 5000 * this._parent.posY);
_root.battle_mc[nameHorse]._xscale = 200;
_root.battle_mc[nameHorse]._yscale = 200;
_root.battle_mc[nameHorse]._x = this._parent._x;
_root.battle_mc[nameHorse]._y = this._parent._y;
_root.battle_mc[nameHorse].spd = this._parent.spd;
if (this._parent._xscale < 0) {
_root.battle_mc[nameHorse]._xscale *= -1;
_root.battle_mc[nameHorse].spd = this._parent.spd;
}
_root.battle_mc[nameHorse].onEnterFrame = function () {
if (!_root.isPaused) {
this.play();
this._x += this.spd;
if (this._x < -100 || this._x > 1300) {
this.removeMovieClip();
}
} else {
this.stop();
}
};
}
frame 82 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = -30;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
}
}
movieClip 1954 mc_greatwinstar {
frame 1 {
stop();
this.attacking = false;
}
frame 53 {
gotoAndStop(1);
}
frame 113 {
gotoAndStop(1);
}
frame 172 {
gotoAndStop(1);
}
frame 173 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 1974 {
}
movieClip 1982 {
}
movieClip 1988 {
}
movieClip 2003 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
++_root.battleSummary[2];
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[12];
}
}
movieClip 2004 mc_gunman1 {
frame 1 {
stop();
this.attacking = false;
}
frame 36 {
gotoAndStop(1);
}
frame 37 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 2009 {
}
movieClip 2017 {
}
movieClip 2023 {
}
movieClip 2033 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
++_root.battleSummary[2];
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[12];
}
}
movieClip 2034 mc_gunman2 {
frame 1 {
stop();
this.attacking = false;
}
frame 36 {
gotoAndStop(1);
}
frame 37 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 2037 {
}
movieClip 2038 mc_heal {
}
movieClip 2055 {
}
movieClip 2064 {
}
movieClip 2078 {
}
movieClip 2098 {
frame 17 {
_root.soundFX('horse');
}
frame 74 {
++_root.battle_mc.depthObj;
nameHorse = 'horse' + _root.battle_mc.depthObj;
_root.battle_mc.attachMovie('horse_running', nameHorse, _root.battle_mc.depthObj + 5000 * this._parent.posY);
_root.battle_mc[nameHorse]._xscale = 200;
_root.battle_mc[nameHorse]._yscale = 200;
_root.battle_mc[nameHorse]._x = this._parent._x;
_root.battle_mc[nameHorse]._y = this._parent._y;
_root.battle_mc[nameHorse].spd = this._parent.spd;
if (this._parent._xscale < 0) {
_root.battle_mc[nameHorse]._xscale *= -1;
_root.battle_mc[nameHorse].spd = this._parent.spd;
}
_root.battle_mc[nameHorse].onEnterFrame = function () {
if (!_root.isPaused) {
this.play();
this._x += this.spd;
if (this._x < -100 || this._x > 1300) {
this.removeMovieClip();
}
} else {
this.stop();
}
};
}
frame 82 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
++_root.battleSummary[2];
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[10];
}
}
movieClip 2099 mc_horsearcher1 {
frame 1 {
stop();
this.attacking = false;
}
frame 41 {
gotoAndStop(1);
}
frame 42 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 2103 {
}
movieClip 2104 mc_horsearcher2 {
frame 1 {
stop();
this.attacking = false;
}
frame 41 {
gotoAndStop(1);
}
frame 42 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 2106 mc_indicator {
}
movieClip 2109 mc_info {
}
movieClip 2112 mc_knife {
}
movieClip 2113 mc_kosong {
}
movieClip 2130 {
}
movieClip 2138 {
}
movieClip 2154 {
}
movieClip 2166 {
frame 51 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
++_root.battleSummary[2];
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = this._width / 1.5;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[13];
}
}
movieClip 2167 mc_magician1 {
frame 1 {
stop();
this.attacking = false;
}
frame 39 {
gotoAndStop(1);
}
frame 40 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 2174 {
}
movieClip 2182 {
}
movieClip 2202 {
}
movieClip 2215 {
frame 51 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
++_root.battleSummary[2];
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = this._width / 1.5;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[13];
}
}
movieClip 2216 mc_magician2 {
frame 1 {
stop();
this.attacking = false;
}
frame 60 {
gotoAndStop(1);
}
frame 61 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 2218 {
}
movieClip 2220 mc_poison {
}
movieClip 2235 {
}
movieClip 2236 mc_rage {
}
movieClip 2245 {
}
movieClip 2260 {
}
movieClip 2281 {
frame 17 {
_root.soundFX('horse');
}
frame 74 {
++_root.battle_mc.depthObj;
nameHorse = 'horse' + _root.battle_mc.depthObj;
_root.battle_mc.attachMovie('rb_horse_running', nameHorse, _root.battle_mc.depthObj + 5000 * this._parent.posY);
_root.battle_mc[nameHorse]._xscale = 200;
_root.battle_mc[nameHorse]._yscale = 200;
_root.battle_mc[nameHorse]._x = this._parent._x;
_root.battle_mc[nameHorse]._y = this._parent._y;
_root.battle_mc[nameHorse].spd = this._parent.spd;
if (this._parent._xscale < 0) {
_root.battle_mc[nameHorse]._xscale *= -1;
_root.battle_mc[nameHorse].spd = this._parent.spd;
}
_root.battle_mc[nameHorse].onEnterFrame = function () {
if (!_root.isPaused) {
this.play();
this._x += this.spd;
if (this._x < -100 || this._x > 1300) {
this.removeMovieClip();
}
} else {
this.stop();
}
};
}
frame 82 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[14];
}
}
movieClip 2282 mc_runningbow {
frame 1 {
stop();
this.attacking = false;
}
frame 41 {
gotoAndStop(1);
}
frame 42 {
stop();
_root['special_btn' + this.armyNum].enabled = false;
_root['special_btn' + this.armyNum].special = false;
_root['special_btn' + this.armyNum].gotoAndStop(2);
}
}
movieClip 2290 {
}
movieClip 2308 {
}
movieClip 2319 {
}
movieClip 2336 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
delete this.onEnterFrame;
}
};
++_root.statisticList[14];
}
}
movieClip 2337 mc_sharpwolf {
frame 1 {
stop();
this.attacking = false;
}
frame 41 {
gotoAndStop(1);
}
frame 68 {
gotoAndStop(1);
}
frame 69 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
_root['special_btn' + this.armyNum].enabled = false;
_root['special_btn' + this.armyNum].special = false;
_root['special_btn' + this.armyNum].gotoAndStop(2);
}
}
movieClip 2340 mc_spear {
frame 1 {
stop();
}
}
movieClip 2359 {
}
movieClip 2367 {
}
movieClip 2378 {
}
movieClip 2388 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
++_root.battleSummary[2];
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 3) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[11];
}
}
movieClip 2389 mc_spearman1 {
frame 1 {
stop();
}
frame 40 {
gotoAndStop(1);
}
frame 41 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 2394 {
}
movieClip 2402 {
}
movieClip 2414 {
}
movieClip 2424 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
++_root.battleSummary[2];
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 3) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[11];
}
}
movieClip 2425 mc_spearman2 {
frame 1 {
stop();
}
frame 48 {
gotoAndStop(1);
}
frame 49 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 2427 mc_stone {
}
movieClip 2438 {
}
movieClip 2446 {
}
movieClip 2453 {
}
movieClip 2463 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
++_root.battleSummary[2];
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[9];
}
}
movieClip 2464 mc_swordman1 {
frame 1 {
stop();
char.gotoAndStop(1);
}
frame 36 {
gotoAndStop(1);
}
frame 37 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 2468 {
}
movieClip 2476 {
}
movieClip 2481 {
}
movieClip 2497 {
frame 43 {
function alphaMundur(who) {
--who._alpha;
}
stop();
delete this._parent.onEnterFrame;
this._parent.penghitung = 60;
++_root.battleSummary[2];
this._parent.onEnterFrame = function () {
--this.penghitung;
if (this.penghitung <= 0) {
this.attachMovie('mc_spirit', 'spirit', 99);
this.spirit._x = (this._width / 2) * -1;
this.fading = setInterval(alphaMundur, 20, this);
this.penghitung = 9999;
}
if (this._alpha <= 0) {
clearInterval(this.fading);
this.removeMovieClip();
}
};
++_root.statisticList[9];
}
}
movieClip 2498 mc_swordman2 {
frame 1 {
stop();
this.attacking = false;
}
frame 22 {
gotoAndStop(1);
}
frame 23 {
stop();
_root.soundFX('man_dead' + (1 + random(6)));
}
}
movieClip 2544 menu_blacksmith {
frame 1 {
judulList = ['What would you do?', 'Que voulez-vous faire?', 'Apa yang kamu butuhkan?'];
judul.text = judulList[_root.bahasa];
}
}
movieClip 2566 menu_confirm {
}
movieClip 2596 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 2597 menu_kiosResource {
}
movieClip 2607 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 2608 menu_kiosSenjata {
}
// unknown tag 88 length 138
movieClip 2614 menu_strategy {
}
movieClip 2628 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 2629 menu_temple {
}
movieClip 2640 menu_upgrade {
}
movieClip 2643 mouse_traill {
frame 22 {
stop();
this.removeMovieClip();
}
}
movieClip 2645 smoke_mc1 {
}
movieClip 2647 smoke_mc2 {
}
movieClip 2649 smoke_mc3 {
}
movieClip 2651 smoke_mc4 {
}
movieClip 2722 {
}
movieClip 2723 statistic {
frame 1 {
tulisan.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 2726 trap {
frame 1 {
stop();
}
}
movieClip 2732 win_new {
}
movieClip 2766 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 2767 win_summary {
}
movieClip 2775 {
}
movieClip 2780 {
}
movieClip 2785 {
}
movieClip 2790 {
}
movieClip 2795 {
}
movieClip 2800 {
}
movieClip 2805 {
}
movieClip 2810 {
}
movieClip 2815 {
}
movieClip 2820 {
}
movieClip 2825 {
}
movieClip 2830 {
}
movieClip 2836 {
}
movieClip 2837 window_achievement {
frame 1 {
achievement_teks.gotoAndStop(_root.bahasa + 1);
}
}
// unknown tag 88 length 86
button 2854 {
on (release) {
getURL('http://www.belugerinstudios.com/', _blank);
}
}
movieClip 2855 {
}
movieClip 2869 {
}
movieClip 2870 window_lose {
frame 1 {
judul.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 2878 {
}
movieClip 2883 {
}
movieClip 2888 {
}
movieClip 2893 {
}
movieClip 2898 {
}
movieClip 2903 {
}
movieClip 2904 window_medals {
frame 1 {
medals_teks.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 2917 {
}
movieClip 2918 {
}
movieClip 2935 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 2939 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 2940 window_warning {
frame 1 {
stop();
}
}
movieClip 2946 {
}
movieClip 2947 window_win {
frame 1 {
judul.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 2964 {
}
movieClip 2976 {
frame 1 {
stop();
}
}
movieClip 2981 {
frame 1 {
stop();
}
}
movieClip 2986 {
frame 1 {
stop();
}
}
movieClip 2991 {
}
movieClip 2992 {
}
movieClip 2997 {
frame 1 {
stop();
}
}
movieClip 3004 {
}
movieClip 3005 {
}
movieClip 3006 windows_option {
frame 1 {
stop();
tulisan.gotoAndStop(_root.bahasa + 1);
tulisan2.gotoAndStop(_root.bahasa + 1);
}
frame 2 {
stop();
tulisan.gotoAndStop(_root.bahasa + 1);
tulisan2.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 3013 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 3042 window_credit {
}
movieClip 3046 menu_surrender {
}
movieClip 3050 win_new2 {
}
movieClip 3056 {
}
movieClip 3060 {
}
movieClip 3063 main_tutorial2 {
frame 1 {
_root.isPaused = true;
tutorialBattle = [0, ['Use the left and right arrow keys or move the mouse to the left and right corners to scroll the landscape.', 'Pour faire défiler le paysage, utilisez les flèches droite et gauche ou déplacez la souris.', 'Gunakan tombol kiri dan kanan, atau gerakkan mouse ke pojok kiri dan kanan untuk men-scroll landscape ke kiri dan kanan'], ['Click on the icon of available units to create an army, then click on the line in the landscape to block enemy attacks.', 'Cliquez sur une des icônes des guerriers disponibles pour créer une unité, puis sélectionnez une rangée dans le paysage pour contrer une attaque ennemie.', 'Klik pada icon unit yang tersedia untuk meng-create pasukan kemudian klik pada line di landscape untuk memblok serangan musuh'], ['Defense statistics is your base lifepoint. If your base lifepoint reaches 0, it means that the enemy has beaten your defenses.', 'La case défense recense vos points de vie. Si cette valeur tombe à zéro, l’ennemi a réussi à vaincre votre défense.', 'Statistik defense adalah lifepoint dari base kita, jika base lifepoint menjadi 0, itu artinya musuh berhasil menembus pertahanan kita'], ['Food stock indicates the number of meal stocks available. If we do not enough food stock, we won\'t be able to feed our armies.', 'La case nourriture en stock indique le niveau de vivres disponibles. Si nous n’avons plus de nourriture en stock, nous ne pouvons plus nourrir nos armées.', 'Food Stock menunjukkan jumlah stock makanan yg kita punya untuk berperang, jika kita tidak mempunyai stock makanan, kita tidak dapat membuat pasukan'], ['Enemy left shows the number of remaining enemy forces. You have to defend the base until there are no enemies left.', 'La case ennemis indique le nombre d’ennemis encore en vie. Vous devez combattre jusqu’à ce qu’il n’y ait plus d’ennemis.', 'Enemy left menunjukkan jumlah pasukan musuh yang tersisa, kamu harus pertahankan base hingga musuh tidak tersisa'], ['Your army will steal enemy\'s gold after every successful battle', 'Votre armée voleront l\'or ennemi après chaque victoire', 'pasukan kamu akan merampas gold ketika mereka sampai ke base musuh'], ['Special ability is the ability possesed by each commander. You must use them wisely to get maximum results.', 'Chaque chef possède un pouvoir spécial. Vous devez l’utiliser judicieusement pour obtenir un résultat optimal.', 'Special ability adalah kemampuan yang dimiliki tiap panglima, Kau harus menggunakan secara tepat untuk mendapat hasil yg maksimal'], ['At the bottom right, there is a button to retreat. It is better to retreat when you see no possibility of winning the battle. Retreat gives you time to prepare a counter-attack', 'En bas à droite, le bouton repli vous permet de battre en retraite. Cela peut être utile si vous sentez que vous ne pourrez pas gagner la bataille. Cela vous donnera le temps de préparer une contre-attaque', 'Di pojok bawah ada tombol menu untuk menyerah, jika kamu merasa tidak akan menang sebaiknya mundur untuk menyusun penyerangan balik']];
judul = ['Battle Tutorial', 'TUTORIEL DE COMBAT', 'Tutorial Pertempuran'];
this.onEnterFrame = function () {
this.tulisan.text = tutorialBattle[this._currentframe][_root.bahasa];
this.tulisan3.text = judul[_root.bahasa];
};
}
frame 9 {
_root.isPaused = false;
_root.battleTutorial = true;
_root.newAchievement(1);
this.removeMovieClip();
}
}
movieClip 3064 main_tutorial3 {
frame 6 {
stop();
this.removeMovieClip();
}
}
movieClip 3065 main_tutorial4 {
frame 7 {
stop();
this.removeMovieClip();
}
}
movieClip 3071 {
}
movieClip 3075 {
}
movieClip 3079 {
}
movieClip 3083 {
}
movieClip 3087 {
}
movieClip 3091 {
}
movieClip 3095 {
}
movieClip 3099 {
}
movieClip 3100 main_tutorial_str {
frame 1 {
this.onEnterFrame = function () {
this.tulisan.gotoAndStop(_root.bahasa + 1);
this.cancel_btn.onRelease = function () {
this._parent._visible = false;
};
};
}
frame 9 {
stop();
}
}
movieClip 3104 description_map2 {
frame 1 {
stop();
}
}
movieClip 3107 description_map3 {
frame 1 {
stop();
}
}
frame 4 {
stop();
inv_btn.onRelease = function () {
getURL('http://www.ludobox.com', _blank);
};
}
movieClip 3110 {
}
movieClip 3150 {
frame 339 {
stop();
_root.play();
}
}
frame 5 {
stop();
var bahasa = 0;
var i = 0;
while (i <= 2) {
_root['bah' + i].i = i;
_root['bah' + i].onRelease = function () {
bahasa = this.i;
gotoAndStop(7);
};
++i;
}
}
frame 6 {
stop();
}
frame 7 {
function showCustomCursor() {
Mouse.hide();
_root.attachMovie('cursor_mc', 'cursor_mc', 999991);
cursor_mc._x = _xmouse;
cursor_mc._y = _ymouse;
cursor_mc.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
};
cursor_mc.onMouseDown = function () {
this.gotoAndStop(2);
_root.attachMovie('mouse_traill', 'trail', 999990);
trail._x = _xmouse;
trail._y = _ymouse;
};
cursor_mc.onMouseUp = function () {
this.gotoAndStop(1);
};
}
function showNormalCursor() {
cursor_mc.removeMovieClip();
Mouse.show();
}
function efekFade(who) {
who._alpha += 20;
if (who._alpha > 100) {
who._alpha = 100;
}
}
function newAchievement(number) {
if (_root.achievementList[number] == 0) {
_root.achievementList[number] = 1;
_root.attachMovie('win_new', 'achiv', 9989);
achiv.count = 0;
achiv.gotoAndStop(_root.bahasa + 1);
achiv._alpha = 0;
achiv.onEnterFrame = function () {
++this.count;
if (this.count >= 200) {
this.removeMovieClip();
}
efekFade(this);
};
}
}
function newMedals(number) {
if (_root.medalsList[number] == 0) {
_root.medalsList[number] = 1;
_root.attachMovie('win_new2', 'achiv', 9989);
achiv.count = 0;
achiv.gotoAndStop(_root.bahasa + 1);
achiv._alpha = 0;
achiv.onEnterFrame = function () {
++this.count;
if (this.count >= 200) {
this.removeMovieClip();
}
efekFade(this);
};
}
}
function enemyMoving() {
this.coordinate = _root['jalurMusuh' + this.pos][this.stepLeft][this.nextStep].substr(3, 2);
this._x = minimap.coordinate[_root['jalurMusuh' + this.pos][this.stepLeft][this.nextStep]]._x;
this._y = minimap.coordinate[_root['jalurMusuh' + this.pos][this.stepLeft][this.nextStep]]._y;
if (this.stepLeft - 3 > 0) {
this.dayLeft.text = this.stepLeft - 3;
} else {
this.dayLeft.text = 'A';
}
if (this.coordinate == undefined) {
this.removeMovieClip();
}
}
function saveData() {
Cookies = SharedObject.getLocal('TLV', '/');
Cookies.data.volBGM = volBGM;
Cookies.data.volFX = volFX;
var v2 = 1;
while (v2 <= 5) {
Cookies.data['weaponList' + v2] = String(weaponList[v2]);
Cookies.data['weaponProduce' + v2] = String(weaponProduce[v2]);
Cookies.data['armyList' + v2] = String(armyList[v2]);
Cookies.data['armyProduce' + v2] = String(armyProduce[v2]);
++v2;
}
Cookies.data.days = days;
var v5 = 1;
while (v5 <= 4) {
Cookies.data['resource' + v5] = String(resourceList[v5]);
Cookies.data['resourceProduce' + v5] = String(resourceProduce[v5]);
++v5;
}
Cookies.data.dataPosisi1 = '';
Cookies.data.dataPosisi2 = '';
Cookies.data.dataPosisi3 = '';
var v3 = 1;
while (v3 <= 25) {
Cookies.data.dataPosisi1 += String(_root['objectMap' + v3][0][0]);
if (_root['objectMap' + v3][1][0] != undefined) {
Cookies.data.dataPosisi2 += String(_root['objectMap' + v3][1][0]);
} else {
Cookies.data.dataPosisi2 += String(0);
}
if (_root['objectMap' + v3][2][0] != undefined) {
Cookies.data.dataPosisi3 += String(_root['objectMap' + v3][2][0]);
} else {
Cookies.data.dataPosisi3 += String(0);
}
++v3;
}
Cookies.data.comLoc = '';
Cookies.data.comLocBaru = '';
var v7 = 1;
while (v7 <= 6) {
Cookies.data.comLoc += String(comLoc[v7]);
Cookies.data.comLocBaru += String(comLocBaru[v7]);
++v7;
}
Cookies.data.townEcoStat = '';
Cookies.data.townMilStat = '';
Cookies.data.townSpeStat = '';
var v6 = 1;
while (v6 <= 4) {
Cookies.data.townEcoStat += String(townEcoStat[v6]);
Cookies.data.townMilStat += String(townMilStat[v6]);
Cookies.data.townSpeStat += String(townSpeStat[v6]);
++v6;
}
Cookies.data.tempStat = '';
var v9 = 1;
while (v9 <= 5) {
Cookies.data.tempStat += String(tempStat[v9]);
++v9;
}
Cookies.data.trapEnable = '';
var v8 = 1;
while (v8 < trapEnable.length) {
Cookies.data.trapEnable += String(trapEnable[v8][0]);
++v8;
}
Cookies.data.posSerang = posSerang;
Cookies.data.enemyID = enemyID;
Cookies.data.daftarMusuhSerang = daftarMusuhSerang;
Cookies.data.ID = new Array();
Cookies.data.posArrayEnemy = new Array();
Cookies.data.stepLeftEnemy = new Array();
Cookies.data.pos = new Array();
Cookies.data.trapped = new Array();
var v4 = 0;
while (v4 < daftarMusuhSerang.length) {
Cookies.data.ID.push(minimap.coordinate[daftarMusuhSerang[v4]].ID);
Cookies.data.posArrayEnemy.push(minimap.coordinate[daftarMusuhSerang[v4]].posArray);
Cookies.data.stepLeftEnemy.push(minimap.coordinate[daftarMusuhSerang[v4]].stepLeft);
Cookies.data.pos.push(minimap.coordinate[daftarMusuhSerang[v4]].pos);
Cookies.data.trapped.push(minimap.coordinate[daftarMusuhSerang[v4]].trapped);
++v4;
}
Cookies.data.statisticList = statisticList;
Cookies.data.achievementList = achievementList;
Cookies.data.medalsList = medalsList;
Cookies.data.flowerID = flowerID;
Cookies.data.flowerList = flowerList;
Cookies.data.bunga = bunga;
Cookies.data.bungaPos = new Array();
var v10 = 0;
while (v10 < flowerList.length) {
Cookies.data.bungaPos.push(minimap.coordinate[flowerList[v10]].pos);
++v10;
}
Cookies.flush(10);
}
function loadData() {
Cookies = SharedObject.getLocal('TLV', '/');
if (Cookies.data.volBGM != undefined) {
volBGM = Cookies.data.volBGM;
volFX = Cookies.data.volFX;
}
days = Cookies.data.days;
var v5 = 1;
while (v5 <= 5) {
weaponList[v5] = Number(Cookies.data['weaponList' + v5]);
weaponProduce[v5] = Number(Cookies.data['weaponProduce' + v5]);
armyList[v5] = Number(Cookies.data['armyList' + v5]);
armyProduce[v5] = Number(Cookies.data['armyProduce' + v5]);
++v5;
}
var v8 = 1;
while (v8 <= 4) {
resourceList[v8] = Number(Cookies.data['resource' + v8]);
resourceProduce[v8] = Number(Cookies.data['resourceProduce' + v8]);
++v8;
}
var v4 = 1;
while (v4 <= 25) {
_root['objectMap' + v4][0][0] = Number(Cookies.data.dataPosisi1.substr(v4 - 1, 1));
if (_root['objectMap' + v4][1][0] != undefined) {
_root['objectMap' + v4][1][0] = Number(Cookies.data.dataPosisi2.substr(v4 - 1, 1));
}
if (_root['objectMap' + v4][2][0] != undefined) {
_root['objectMap' + v4][2][0] = Number(Cookies.data.dataPosisi3.substr(v4 - 1, 1));
}
++v4;
}
var v7 = 1;
while (v7 <= 6) {
comLoc[v7] = Number(Cookies.data.comLoc.substr((v7 - 1) * 2, 2));
comLocBaru[v7] = Number(Cookies.data.comLocBaru.substr((v7 - 1) * 2, 2));
++v7;
}
var v6 = 1;
while (v6 <= 4) {
townEcoStat[v6] = Number(Cookies.data.townEcoStat.substr(v6 - 1, 1));
townMilStat[v6] = Number(Cookies.data.townMilStat.substr(v6 - 1, 1));
townSpeStat[v6] = Number(Cookies.data.townSpeStat.substr(v6 - 1, 1));
++v6;
}
var v10 = 1;
while (v10 <= 5) {
tempStat[v10] = Number(Cookies.data.tempStat.substr(v10 - 1, 1));
++v10;
}
var v9 = 1;
while (v9 < trapEnable.length) {
trapEnable[v9][0] = Number(Cookies.data.trapEnable.substr(v9 - 1, 1));
++v9;
}
posSerang = Cookies.data.posSerang;
enemyID = Cookies.data.enemyID;
daftarMusuhSerang = Cookies.data.daftarMusuhSerang;
var v2 = 0;
while (v2 < Cookies.data.daftarMusuhSerang.length) {
if (Cookies.data.pos[v2] != undefined) {
minimap.coordinate.attachMovie('icon_musuh', daftarMusuhSerang[v2], 100 + Cookies.data.ID[v2]);
minimap.coordinate[daftarMusuhSerang[v2]].ID = Cookies.data.ID[v2];
minimap.coordinate[daftarMusuhSerang[v2]].posArray = Cookies.data.posArrayEnemy[v2];
minimap.coordinate[daftarMusuhSerang[v2]].stepLeft = Cookies.data.stepLeftEnemy[v2];
minimap.coordinate[daftarMusuhSerang[v2]].pos = Cookies.data.pos[v2];
minimap.coordinate[daftarMusuhSerang[v2]].trapped = Cookies.data.trapped[v2];
minimap.coordinate[daftarMusuhSerang[v2]].nextStep = random(_root['jalurMusuh' + minimap.coordinate[daftarMusuhSerang[v2]].pos][minimap.coordinate[daftarMusuhSerang[v2]].stepLeft].length);
minimap.coordinate[daftarMusuhSerang[v2]].onEnterFrame = enemyMoving;
posSerang[minimap.coordinate[daftarMusuhSerang[v2]].pos] = 1;
}
++v2;
}
statisticList = Cookies.data.statisticList;
achievementList = Cookies.data.achievementList;
medalsList = Cookies.data.medalsList;
flowerID = Cookies.data.flowerID;
flowerList = Cookies.data.flowerList;
bunga = Cookies.data.bunga;
var v3 = 0;
while (v3 < flowerList.length) {
if (Cookies.data.bungaPos[v3] != undefined) {
minimap.coordinate.attachMovie('mc_flower', flowerList[v3], 500 + v3);
minimap.coordinate[flowerList[v3]].pos = Cookies.data.bungaPos[v3];
minimap.coordinate[flowerList[v3]]._x = minimap.coordinate['map' + minimap.coordinate[flowerList[v3]].pos]._x;
minimap.coordinate[flowerList[v3]]._y = minimap.coordinate['map' + minimap.coordinate[flowerList[v3]].pos]._y;
}
++v3;
}
Cookies.flush(10);
}
function resetData() {
Cookies = SharedObject.getLocal('TLV', '/');
var v1 = 1;
while (v1 <= 5) {
delete Cookies.data['weaponList' + v1];
delete Cookies.data['weaponProduce' + v1];
delete Cookies.data['armyList' + v1];
delete Cookies.data['armyProduce' + v1];
++v1;
}
delete Cookies.data.days;
var v2 = 1;
while (v2 <= 4) {
delete Cookies.data['resource' + v2];
delete Cookies.data['resourceProduce' + v2];
++v2;
}
delete Cookies.data.dataPosisi1;
delete Cookies.data.dataPosisi2;
delete Cookies.data.dataPosisi3;
delete Cookies.data.comLoc;
delete Cookies.data.comLocBaru;
delete Cookies.data.townEcoStat;
delete Cookies.data.townMilStat;
delete Cookies.data.townSpeStat;
delete Cookies.data.tempStat;
delete Cookies.data.trapEnable;
delete Cookies.data.enemyID;
delete Cookies.data.daftarMusuhSerang;
delete Cookies.data.ID;
delete Cookies.data.posArrayEnemy;
delete Cookies.data.stepLeftEnemy;
delete Cookies.data.pos;
delete Cookies.data.trapped;
delete Cookies.data.statisticList;
delete Cookies.data.achievementList;
delete Cookies.data.medalsList;
delete Cookies.data.flowerID;
delete Cookies.data.flowerList;
delete Cookies.data.bunga;
delete Cookies.data.bungaPos;
Cookies.flush(10);
}
function soundFX(idSound) {
sEffect = new Sound(slevel1);
sEffect.attachSound(idSound);
sEffect.start(0, 0);
sEffect.setVolume(_root.volFX);
}
function soundBGM(idSound) {
stopAllSounds();
sBGM = new Sound(slevel2);
sBGM.attachSound(idSound);
sBGM.start(0, 999999);
sBGM.setVolume(_root.volBGM);
}
function MD5(string) {
function RotateLeft(lValue, iShiftBits) {
return lValue << iShiftBits | lValue >>> 32 - iShiftBits;
}
function AddUnsigned(lX, lY) {
var v5;
var v4;
var v3;
var v2;
var v1;
v3 = lX & 2147483648.0;
v2 = lY & 2147483648.0;
v5 = lX & 1073741824;
v4 = lY & 1073741824;
v1 = (lX & 1073741823) + (lY & 1073741823);
if (v5 & v4) {
return v1 ^ 2147483648.0 ^ v3 ^ v2;
}
if (v5 | v4) {
if (v1 & 1073741824) {
return v1 ^ 3221225472.0 ^ v3 ^ v2;
} else {
return v1 ^ 1073741824 ^ v3 ^ v2;
}
} else {
return v1 ^ v3 ^ v2;
}
}
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 v2;
var v5 = string.length;
var v8 = v5 + 8;
var v9 = (v8 - v8 % 64) / 64;
var v7 = (v9 + 1) * 16;
var v3 = Array(v7 - 1);
var v4 = 0;
var v1 = 0;
while (v1 < v5) {
v2 = (v1 - v1 % 4) / 4;
v4 = (v1 % 4) * 8;
v3[v2] |= string.charCodeAt(v1) << v4;
++v1;
}
v2 = (v1 - v1 % 4) / 4;
v4 = (v1 % 4) * 8;
v3[v2] |= 128 << v4;
v3[v7 - 2] = v5 << 3;
v3[v7 - 1] = v5 >>> 29;
return v3;
}
function WordToHex(lValue) {
var v3 = '';
var v2 = '';
var v4;
var v1;
v1 = 0;
while (v1 <= 3) {
v4 = lValue >>> v1 * 8 & 255;
v2 = '0' + v4.toString(16);
v3 += v2.substr(v2.length - 2, 2);
++v1;
}
return v3;
}
function Utf8Encode(string) {
var v2 = '';
var v3 = 0;
while (v3 < string.length) {
var v1 = string.charCodeAt(v3);
if (v1 < 128) {
v2 += String.fromCharCode(v1);
} else {
if (v1 > 127 && v1 < 2048) {
v2 += String.fromCharCode(v1 >> 6 | 192);
v2 += String.fromCharCode(v1 & 63 | 128);
} else {
v2 += String.fromCharCode(v1 >> 12 | 224);
v2 += String.fromCharCode(v1 >> 6 & 63 | 128);
v2 += String.fromCharCode(v1 & 63 | 128);
}
}
++v3;
}
return v2;
}
var v6 = Array();
var v5;
var v35;
var v36;
var v37;
var v34;
var v4;
var v3;
var v2;
var v1;
var v21 = 7;
var v19 = 12;
var v16 = 17;
var v13 = 22;
var v20 = 5;
var v17 = 9;
var v14 = 14;
var v11 = 20;
var v18 = 4;
var v15 = 11;
var v12 = 16;
var v10 = 23;
var v25 = 6;
var v24 = 10;
var v23 = 15;
var v22 = 21;
string = Utf8Encode(string);
v6 = ConvertToWordArray(string);
v4 = 1732584193;
v3 = 4023233417.0;
v2 = 2562383102.0;
v1 = 271733878;
v5 = 0;
while (v5 < v6.length) {
v35 = v4;
v36 = v3;
v37 = v2;
v34 = v1;
v4 = FF(v4, v3, v2, v1, v6[v5 + 0], v21, 3614090360.0);
v1 = FF(v1, v4, v3, v2, v6[v5 + 1], v19, 3905402710.0);
v2 = FF(v2, v1, v4, v3, v6[v5 + 2], v16, 606105819);
v3 = FF(v3, v2, v1, v4, v6[v5 + 3], v13, 3250441966.0);
v4 = FF(v4, v3, v2, v1, v6[v5 + 4], v21, 4118548399.0);
v1 = FF(v1, v4, v3, v2, v6[v5 + 5], v19, 1200080426);
v2 = FF(v2, v1, v4, v3, v6[v5 + 6], v16, 2821735955.0);
v3 = FF(v3, v2, v1, v4, v6[v5 + 7], v13, 4249261313.0);
v4 = FF(v4, v3, v2, v1, v6[v5 + 8], v21, 1770035416);
v1 = FF(v1, v4, v3, v2, v6[v5 + 9], v19, 2336552879.0);
v2 = FF(v2, v1, v4, v3, v6[v5 + 10], v16, 4294925233.0);
v3 = FF(v3, v2, v1, v4, v6[v5 + 11], v13, 2304563134.0);
v4 = FF(v4, v3, v2, v1, v6[v5 + 12], v21, 1804603682);
v1 = FF(v1, v4, v3, v2, v6[v5 + 13], v19, 4254626195.0);
v2 = FF(v2, v1, v4, v3, v6[v5 + 14], v16, 2792965006.0);
v3 = FF(v3, v2, v1, v4, v6[v5 + 15], v13, 1236535329);
v4 = GG(v4, v3, v2, v1, v6[v5 + 1], v20, 4129170786.0);
v1 = GG(v1, v4, v3, v2, v6[v5 + 6], v17, 3225465664.0);
v2 = GG(v2, v1, v4, v3, v6[v5 + 11], v14, 643717713);
v3 = GG(v3, v2, v1, v4, v6[v5 + 0], v11, 3921069994.0);
v4 = GG(v4, v3, v2, v1, v6[v5 + 5], v20, 3593408605.0);
v1 = GG(v1, v4, v3, v2, v6[v5 + 10], v17, 38016083);
v2 = GG(v2, v1, v4, v3, v6[v5 + 15], v14, 3634488961.0);
v3 = GG(v3, v2, v1, v4, v6[v5 + 4], v11, 3889429448.0);
v4 = GG(v4, v3, v2, v1, v6[v5 + 9], v20, 568446438);
v1 = GG(v1, v4, v3, v2, v6[v5 + 14], v17, 3275163606.0);
v2 = GG(v2, v1, v4, v3, v6[v5 + 3], v14, 4107603335.0);
v3 = GG(v3, v2, v1, v4, v6[v5 + 8], v11, 1163531501);
v4 = GG(v4, v3, v2, v1, v6[v5 + 13], v20, 2850285829.0);
v1 = GG(v1, v4, v3, v2, v6[v5 + 2], v17, 4243563512.0);
v2 = GG(v2, v1, v4, v3, v6[v5 + 7], v14, 1735328473);
v3 = GG(v3, v2, v1, v4, v6[v5 + 12], v11, 2368359562.0);
v4 = HH(v4, v3, v2, v1, v6[v5 + 5], v18, 4294588738.0);
v1 = HH(v1, v4, v3, v2, v6[v5 + 8], v15, 2272392833.0);
v2 = HH(v2, v1, v4, v3, v6[v5 + 11], v12, 1839030562);
v3 = HH(v3, v2, v1, v4, v6[v5 + 14], v10, 4259657740.0);
v4 = HH(v4, v3, v2, v1, v6[v5 + 1], v18, 2763975236.0);
v1 = HH(v1, v4, v3, v2, v6[v5 + 4], v15, 1272893353);
v2 = HH(v2, v1, v4, v3, v6[v5 + 7], v12, 4139469664.0);
v3 = HH(v3, v2, v1, v4, v6[v5 + 10], v10, 3200236656.0);
v4 = HH(v4, v3, v2, v1, v6[v5 + 13], v18, 681279174);
v1 = HH(v1, v4, v3, v2, v6[v5 + 0], v15, 3936430074.0);
v2 = HH(v2, v1, v4, v3, v6[v5 + 3], v12, 3572445317.0);
v3 = HH(v3, v2, v1, v4, v6[v5 + 6], v10, 76029189);
v4 = HH(v4, v3, v2, v1, v6[v5 + 9], v18, 3654602809.0);
v1 = HH(v1, v4, v3, v2, v6[v5 + 12], v15, 3873151461.0);
v2 = HH(v2, v1, v4, v3, v6[v5 + 15], v12, 530742520);
v3 = HH(v3, v2, v1, v4, v6[v5 + 2], v10, 3299628645.0);
v4 = II(v4, v3, v2, v1, v6[v5 + 0], v25, 4096336452.0);
v1 = II(v1, v4, v3, v2, v6[v5 + 7], v24, 1126891415);
v2 = II(v2, v1, v4, v3, v6[v5 + 14], v23, 2878612391.0);
v3 = II(v3, v2, v1, v4, v6[v5 + 5], v22, 4237533241.0);
v4 = II(v4, v3, v2, v1, v6[v5 + 12], v25, 1700485571);
v1 = II(v1, v4, v3, v2, v6[v5 + 3], v24, 2399980690.0);
v2 = II(v2, v1, v4, v3, v6[v5 + 10], v23, 4293915773.0);
v3 = II(v3, v2, v1, v4, v6[v5 + 1], v22, 2240044497.0);
v4 = II(v4, v3, v2, v1, v6[v5 + 8], v25, 1873313359);
v1 = II(v1, v4, v3, v2, v6[v5 + 15], v24, 4264355552.0);
v2 = II(v2, v1, v4, v3, v6[v5 + 6], v23, 2734768916.0);
v3 = II(v3, v2, v1, v4, v6[v5 + 13], v22, 1309151649);
v4 = II(v4, v3, v2, v1, v6[v5 + 4], v25, 4149444226.0);
v1 = II(v1, v4, v3, v2, v6[v5 + 11], v24, 3174756917.0);
v2 = II(v2, v1, v4, v3, v6[v5 + 2], v23, 718787259);
v3 = II(v3, v2, v1, v4, v6[v5 + 9], v22, 3951481745.0);
v4 = AddUnsigned(v4, v35);
v3 = AddUnsigned(v3, v36);
v2 = AddUnsigned(v2, v37);
v1 = AddUnsigned(v1, v34);
v5 += 16;
}
var v46 = WordToHex(v4) + WordToHex(v3) + WordToHex(v2) + WordToHex(v1);
return v46.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);
};
}
stop();
_quality = 'medium';
btn_text.gotoAndStop(bahasa + 1);
play2._visible = false;
play2.gotoAndStop(bahasa + 1);
main_btn.onEnterFrame = function () {
this.inv.onRelease = function () {
play2._visible = true;
play2.gotoAndStop(bahasa + 1);
};
play2.mulai_btn.onRelease = function () {
battleTutorial = false;
firstWar = true;
firstFlower = true;
firstStrategy = true;
_root.gotoAndStop('story');
};
Cookies = SharedObject.getLocal('TLV', '/');
if (Cookies.data.days != undefined) {
this.pop_right.lanjut_btn.enabled = true;
play2.lanjut_btn.onRelease = function () {
battleTutorial = true;
_root.gotoAndStop('main');
loadData();
};
} else {
play2.lanjut_btn.enabled = false;
}
};
statistik_btn.onRelease = function () {
_root.attachMovie('statistic', 'statistic', 999);
statistic._x = Stage.width / 2;
statistic._y = Stage.height / 2;
statistic._alpha = 0;
var v3 = 1;
while (v3 <= 16) {
statistic['stat' + v3].text = statisticList[v3];
++v3;
}
statistic.cancel_btn.onRelease = function () {
statistic.removeMovieClip();
};
statistic.onEnterFrame = function () {
efekFade(this);
};
};
achievement_btn.onRelease = function () {
_root.attachMovie('window_achievement', 'achievement', 999);
achievement._x = Stage.width / 2;
achievement._y = Stage.height / 2;
achievement._alpha = 0;
achievement.hint1.text = rollText[bahasa];
achievement.hint.text = '';
var i = 1;
while (i <= 12) {
achievement['ach' + i].i = i;
achievement['ach' + i].gotoAndStop(achievementList[i] + 1);
achievement['ach' + i].onRollOver = function () {
achievement.hint1.text = achievementStory[this.i][bahasa];
achievement.hint.text = '(' + achievementDes[this.i][bahasa] + ')';
};
achievement['ach' + i].onRollOut = function () {
achievement.hint1.text = rollText[bahasa];
achievement.hint.text = '';
};
++i;
}
achievement.cancel_btn.onRelease = function () {
achievement.removeMovieClip();
};
achievement.onEnterFrame = function () {
efekFade(this);
};
};
medals_btn.onRelease = function () {
_root.attachMovie('window_medals', 'medals', 999);
medals._x = Stage.width / 2;
medals._y = Stage.height / 2;
medals._alpha = 0;
medals.hint1.text = rollText[bahasa];
var i = 1;
while (i <= 5) {
medals['medals' + i].i = i;
medals['medals' + i].gotoAndStop(medalsList[i] + 1);
medals['medals' + i].onRollOver = function () {
medals.hint1.text = medalsDes[this.i][bahasa];
};
medals['medals' + i].onRollOut = function () {
medals.hint1.text = rollText[bahasa];
};
++i;
}
medals.cancel_btn.onRelease = function () {
medals.removeMovieClip();
};
medals.onEnterFrame = function () {
efekFade(this);
};
};
credit_btn.onRelease = function () {
_root.attachMovie('window_credit', 'credit', 999);
credit._x = Stage.width / 2;
credit._y = Stage.height / 2;
credit._alpha = 0;
credit.inv.onRelease = function () {
_root.getURL('http://belugerinstudios.com', _blank);
};
credit.cancel_btn.onRelease = function () {
credit.removeMovieClip();
};
credit.onEnterFrame = function () {
efekFade(this);
};
};
moregames_btn.onRelease = function () {
_root.getURL('http://www.ludobox.com', _blank);
};
inv.onRelease = function () {
_root.getURL('http://belugerinstudios.com', _blank);
};
add_btn.gotoAndStop(Number(bahasa) + 1);
add_btn.onRelease = function () {
if (bahasa == 1) {
_root.getURL('http://fr.ludobox.com/gratuit.html', _blank);
} else {
_root.getURL('http://www.ludobox.com/free-content.html', _blank);
}
};
var flowerID = 0;
var flowerList = new Array();
var bunga = 0;
var jamuMode = false;
var haveMove = false;
var firstWar = false;
var firstFlower = false;
var firstStrategy = false;
var days = 1;
var populationMax = 50;
var population = 0;
var commander = 1;
var habisPerang = false;
var battleTutorial = true;
var kualitasList = [0, 'low', 'medium', 'best'];
var kualitas = [0, false, true, false];
var aktifTombol = true;
var enemyArmy1 = new Array();
var enemyArmy2 = new Array();
var enemyArmy3 = new Array();
var enemyArmy4 = new Array();
var daftarMusuhSerang = new Array();
var enemyID = 0;
var posPengurang = [0, 0, 0, 0, 0];
var posSerang = [0, 0, 0, 0, 0];
var gateName = [0, ['Northern', 'Du Nord', 'utara'], ['Eastern', 'Est', 'timur'], ['Southern', 'Du sud', 'selatan'], ['Western', 'Ouest', 'barat']];
var jalurMusuh1 = ['North', ['map33'], ['map22', 'map23', 'map24'], ['map13'], ['mapGate1'], ['mapGate1'], ['mapGate1'], ['mapGate1'], ['mapGate1']];
var jalurMusuh2 = ['East', ['map33'], ['map24', 'map34', 'map44'], ['map35'], ['mapGate2'], ['mapGate2'], ['mapGate2'], ['mapGate2'], ['mapGate2']];
var jalurMusuh3 = ['South', ['map33'], ['map42', 'map43', 'map44'], ['map53'], ['mapGate3'], ['mapGate3'], ['mapGate3'], ['mapGate3'], ['mapGate3']];
var jalurMusuh4 = ['West', ['map33'], ['map22', 'map32', 'map42'], ['map31'], ['mapGate4'], ['mapGate4'], ['mapGate4'], ['mapGate4'], ['mapGate4']];
statisticList = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
achievementList = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
medalsList = [0, 0, 0, 0, 0, 0];
resourceListDes = [0, 'Gold', 'Food', 'Iron', 'Wood'];
resourceList = [0, 2000, 2000, 2000, 2000];
resourcePrice = [0, 0, 25, 15, 20];
weaponPrice = [0, 40, 60, 40, 100, 120];
weaponList = [0, 20, 15, 25, 8, 10];
armyList = [0, 20, 20, 20, 15, 15];
resourceProduce = [0, 0, 0, 0, 0];
weaponProduce = [0, 0, 0, 0, 0, 0];
armyProduce = [0, 0, 0, 0, 0, 0];
armyProduceTot = armyProduce;
var rollText = ['roll over to view hint', 'Passer le pointeur pour voir l’aide', 'arahkan mouse ke obyek untuk menampilkan keterangan'];
enemyLevDes0 = [[6, 'Swordman', 1], [2, 'Horse Archer', 1]];
enemyLevDes1 = [[10, 'Swordman', 1], [5, 'Horse Archer', 1]];
enemyLevDes2 = [[15, 'Swordman', 2], [10, 'Horse Archer', 1], [5, 'Gunman', 1]];
enemyLevDes3 = [[15, 'Swordman', 2], [15, 'Horse Archer', 2], [10, 'Gunman', 1]];
enemyLevDes4 = [[20, 'Swordman', 2], [20, 'Horse Archer', 2], [10, 'Gunman', 1], [10, 'Spearman', 1]];
enemyLevDes5 = [[20, 'Swordman', 2], [20, 'Horse Archer', 2], [15, 'Gunman', 2], [10, 'Spearman', 1]];
enemyLevDes6 = [[20, 'Swordman', 2], [20, 'Horse Archer', 2], [20, 'Gunman', 3], [20, 'Spearman', 2], [10, 'Spell Caster', 2]];
enemyLevDes7 = [[20, 'Swordman', 2], [20, 'Horse Archer', 2], [25, 'Gunman', 3], [25, 'Spearman', 2], [15, 'Spell Caster', 2]];
var enemyLevDesList = new Array();
var i = 0;
while (i <= 7) {
enemyLevDesList.push(_root['enemyLevDes' + i]);
++i;
}
ar0 = null;
ar1 = ['sharpwolf_army', 'Pasukan bersenjata pedang dan pisau terbang', 1, [180, 15, 3, 2], [0, 10, 20, 5, 10]];
ar2 = ['runningbow_army', 'Pasukan berkuda bersenjatakan panah', 1, [200, 10, 5, 3], [0, 10, 15, 5, 30]];
ar3 = ['bigbear_army', 'Pasukan bersenjata kapak berujung tombak', 1, [180, 15, 3, 2], [0, 10, 30, 5, 5]];
ar4 = ['beautyflower_army', 'Pasukan bersenjata senapan', 1, [180, 15, 3, 2], [0, 20, 20, 25, 5]];
ar5 = ['broadeagle_army', 'Pasukan sihir bersenjata tongkat sihir', 1, [180, 15, 3, 2], [0, 30, 10, 5, 25]];
var armyDescList = new Array();
var a = 0;
while (a <= 5) {
armyDescList.push(_root['ar' + a]);
++a;
}
com0 = null;
com1 = ['sharpwolf', 'SHARP WOLF', 'Panglima bersenjata pedang dan pisau terbang', 1, [170, 5.5, 4.5, 2], [10, 20, 5, 5], 2];
com2 = ['runningbow', 'RUNNING BOW', 'Panglima pasukan berkuda bersenjatakan panah', 1, [120, 4.5, 3, 3], [10, 20, 5, 5], 2];
com3 = ['bigbear', 'BIG BEAR', 'Panglima pasukan bersenjata kapak berujung tombak', 1, [180, 6.5, 3.5, 2], [10, 20, 5, 5], 1];
com4 = ['beautyflower', 'BEAUTY FLOWER', 'Panglima wanita bersenjata senapan', 1, [80, 4.5, 2, 2], [10, 20, 5, 5], 2];
com5 = ['broadeagle', 'BROAD EAGLE', 'Panglima sihir bersenjata tongkat sihir', 1, [100, 6.5, 3.5, 3], [10, 20, 5, 5], 3];
com6 = ['greatwinstar', 'GREAT WINSTAR', 'Panglima sihir bersenjata tongkat sihir', 1, [200, 7, 5, 3], [10, 20, 5, 5], 0];
var comList = new Array();
var a = 0;
while (a <= 6) {
comList.push(_root['com' + a]);
++a;
}
info0 = 0;
info1 = ['TOCHO', ['Tocho is a proud warrior of Apache tribe. With his amazing speed and swordsmanship he can utilize the speed of his hands and legs to the limit and beat his opponents down. His agility is second to none. His only weakness is his quick temper; he can easily chase his opponents into the battlefield without thinking much. His sense of justice is the only way to guide him to be the greatest warrior in his tribe. His army consists of swordsmen.', 'Tocho est un fier guerrier de la tribu des Apaches. Il peut battre ses adversaires grâce à sa grande habileté au poignard et à une rapidité d’exécution étonnante. Son agilité n’a pas d’égale. Sa seule faiblesse est son impatience, il lui arrive de se lancer à la poursuite de ses adversaires sans réfléchir. C’est son sens aigu de la justice qui l’a conduit à devenir le plus grand guerrier de sa tribu. Ses hommes sont armés de poignards.', 'Tocho adalah prajurit kebanggaan suku Apache. Dengan kecepatan dan keahlian berpedangnya, dia dapat menggunakan kecepatan lengan dan kakinya hingga ke ambang batas kemampuan dan mengalahkan musuhnya. Kelincahannya tidak ada yang menandingi. Satu satunya kelemahannya adalah terlalu mudah naik darah; dia dapat dengan mudah mengejar musuhnya ke tengah medan perang tanpa berpikir panjang. Naluri membela keadilannya adalah satu-satunya jalan yang membimbingnya menjadi salah satu pejuang terhebat dalam sukunya. Pasukannya terdiri dari para prajurit berpedang.'], ['male', 'homme', 'pria'], 27];
info2 = ['CHEVEYO', ['Cheveyo is a natural hunter. Since he was a child he has been gifted with an amazing sense of smell and hearing. His eyes are also extraordinarily sharp among his peers. He is Otoahnacto\'s best childhood friend, although they often act as rivals. This rivalry has Cheveyo always on the lookout for better skills and achievements in battle. Despite the rivalry, Cheveyo is loyal to the village and will defend it until the end with his trusty bow. His army consists of bowmen.', 'Cheveyo est un chasseur né. Depuis l’enfance, il est doté d’un odorat et d’une ouïe remarquables. Sa vue est également plus acérée que la moyenne. Il est le meilleur ami d’enfance de Otoahnacto, bien qu’ils soient souvent rivaux. Cette rivalité pousse Cheveyo à toujours chercher à améliorer ses compétences et à combattre avec habileté. Et malgré cette rivalité, Cheveyo est fidèle au village et le défendra jusqu’au bout avec son arc. Sa troupe est composée d’archers.', 'Cheveyo adalah pemburu alami. Sejak kecil dia telah dianugerahi dengan naluri yang luar biasa dalam hal pendengaran dan penciuman. Kedua belah matanya juga luar biasa tajam dibandingkan tekan-rekannya. Dia adalah teman baik Otoahnacto, meskipun mereka sering juga bersaing sebagai rival. Persaingan ini membuat cheveyo selalu mencari pencapaian dan keahlian yang lebih baik dalam pertempuran. Disamping persaingan itu, Cheveyo sangat setia terhadap desanya dan akan mempertahankannya hingga akhir bersama dengan Busur dan anak panah yang dia percayai. Pasukannya terdiri dari pemanah.'], ['male', 'homme', 'pria'], 32];
info3 = ['OTOAHNACTO', ['Otoahnacto is one of the greatest, strongest men in his tribe\'s history. He has beaten the legendary Grizzly Bear with his bare hands in a one-on-one battle. His massive figure makes him stand tall in the battlefield like the Rocky Mountains, and he beats his opponents like ragdolls with his great axe. As one of the 5 Apache Warlords he bears the mark of the Bear, the sign of the power of the wild. He combines his natural strengths with Cheveyo the hunter to increase the efficacy of their guerilla tactics in the battlefield. His army consists of spearmen.', 'Otoahnacto est un des hommes les plus grands et les plus forts dans toute l’histoire de la tribu. Il est sorti vainqueur d’un combat à mains nues contre le légendaire Ours Grizzly. Sur le champ de bataille, on repère de loin sa silhouette massive, comme les Montagnes Rocheuses au-dessus des grandes plaines, et avec son immense hache il renverse ses adversaires comme des poupées de chiffons. En tant qu’un des 5 chefs de guerre apaches, il porte la marque de l’Ours, symbole de la puissance sauvage. Il combine sa force naturelle avec les qualités de chasseur de Cheveyo pour augmenter l’efficacité des tactiques de guérilla. Ses hommes sont armés de lances.', 'Otoahnacto adalah manusia yang terkuat dalam sejarah sukunya. Dia telah mengalahkan beruang Grizzly yang legendaris hanya dengan tangan kosong dalam pertarungan satu lawan satu. Perawakannya yang tinggi besar membuatnya menonjol di dalam medan pertempuran, dan dia dapat dengan mudah mengalahkan musuhnya seperti boneka jerami dengan Kapak Besarnya. Sebagai satu dari 5 panglima perang Apache dia memiliki tanda totem Beruang, simbol dari kekuatan alam liar. Dia memadukan kekuatan alaminya bersama Cheveyo si pemburu dan meningkatkan efisiensi taktik gerilya mereka di medan pertempuran. Pasukannya terdiri dari tentara bertombak.'], ['male', 'homme', 'pria'], 35];
info4 = ['NIDAWI', ['Nidawi is the youngest warrior and the only female of her compatriots. Her beauty is her deadliest weapon, although her calm nature and gentle gestures assure her opponents never realize how dangerous she is until it is too late. The long rifle is her best friend in battle, but outside the battlefield she lives an ordinary life as Tocho\'s beloved little sister. She is his opposite in personality, always counting her steps and predicting the outcome of her actions far into the future. Her army consists of gunmen.', 'Nidawi est la plus jeune et la seule femme parmi les guerriers. Sa beauté est son arme la plus meurtrière, bien que sa nature calme et ses gestes doux ne laissent pas ses adversaires soupçonner combien elle est dangereuse avant qu’il ne soit trop tard. Au combat, son fusil est son meilleur ami, mais en dehors du champ de bataille elle mène une vie ordinaire, en tant que petite sœur adorée de Tocho. Sa personnalité est à l’opposé de celle de son frère, elle avance à pas comptés et envisage toujours les conséquences de ses actes sur le long terme. Ses troupes sont armées de fusils.', 'Nidawi adalah pejuang termuda dan sekaligus satu satunya wanita diantara rekan-rekan panglima perangnya. Kecantikannya adalah senjata mematikan, meskipun kelemah lembutannya membuat lawannya tidak pernah menyadari betapa berbahayanya dia sampai terlambat. Senapan adalah rekan terpercayanya dalam pertempuran, tetapi diluar medan tempur dia menjalani kehidupan biasanya sebagai adik tercinta dari Tocho. Nidawi memiliki sikap yang berlawanan dengan kakaknya, selalu memperhitungkan langkahnya dan memprediksi hasil dari aksinya jauh kedepan. Pasukannya terdiri dari para penembak.'], ['female', 'femmme', 'wanita'], 23];
info5 = ['KACHADA', ['Kachada is the Elder of the Apache tribe and one of their 5 Warlords. He is the oldest and wisest man of the tribe, and holder of their secret magic. His knowledge of nature is very vast, and has helped his tribe survive the harsh savage land. He foresaw the bad omens of the invasion long before it actually began, and warned other villages of the threat. Not many believed his vision, and so they fell to the invaders. He is the only one who can pick the legendary magic flowers that grow rarely in the village area. His army consists of spellcasters.', 'Kachada est le doyen de la tribu Apache et l’un de ses 5 chefs de guerre. Il est l’homme le plus âgé et le plus sage de la tribu, et aussi le détenteur des secrets de la Magie. Il a une excellente connaissance de la nature, qui a permis à sa tribu de survivre dans un environnement très dur. Il a su prédire les ravages de l’invasion bien avant qu’elle n’ait lieu et a prévenu les autres villages du danger. Très peu ont cru à ses visions, et tous ont été vaincus par les envahisseurs. Il est le seul à pouvoir cueillir les légendaires fleurs magiques qui poussent parfois autour du village. Son armée est composée de sorciers.', 'Kachada adalah tetua dari suku Apache dan salah satu dari 5 panglima perang mereka. Dia adalah yang tertua dan paling bijaksana di dalam sukunya, dan pewaris ilmu sihir rahasia suku mereka. Pengetahuannya tentang alam amat luas, dan telah membantu sukunya bertahan dari kejamnya dataran liar. Dia telah melihat pertanda invasi jauh sebelum terjadi, dan telah memperingatkan penduduk desa yang lain. Tidak banyak yang percaya, dan maka jatuhlah mereka ke tangan para penjajah. Kachada adalah satu-satunya yang bisa mengambil bunga ajaib yang legendaris yang sangat jarang tumbuh di area desa mereka. Pasukannya terdiri dari para Penyihir.'], ['male', 'homme', 'pria'], 72];
info6 = ['WAMBLEESKA', ['Wambleeska is the Chief of the Apache tribe. He is not as old as Kachada the wizard, but his vast knowledge and balanced skills in battle make him a dangerous opponent. The invasion of the foreigners has forced him to fiercely defend his village. He has a strong will, handed down from his ancestors, that no one will be allowed to take their freedom away.', 'Wambleeska est le chef de la tribu Apache. Il n’est pas aussi âgé que le sorcier Kachada, mais l’étendue de son savoir et l’équilibre de ses compétences au combat en font un adversaire redoutable. L’invasion l’a amené à défendre farouchement son village. Il a une volonté de fer, qui lui vient de ses ancêtres, et il ne laissera personne réduire son peuple en esclavage.', 'Wambleeska adalah kepala suku Apache. Tidak setua Kachada si Penyihir, namun pengetahuannya yang luas dan keahliannya yang merata di berbagai bidang dalam perang membuatnya lawan yang berbahaya. Invasi dari para orang asing telah memaksanya mempertahankan desanya dengan gagah berani. Kemauannya yang kuat berasal turun temurun dari nenek moyangnya, dan selalu menekankan bahwa tiada seorangpun yang bisa merebut kemerdekaan mereka.'], ['male', 'homme', 'pria'], 53];
var comInfo = new Array();
var i = 0;
while (i <= 6) {
comInfo.push(_root['info' + i]);
++i;
}
comLoc = [0, 32, 23, 43, 34, 33, 33];
comLocBaru = [0, 32, 23, 43, 34, 33, 33];
des0 = ['pusat_desa', ['Center command in The Last Village increases the commanders\' attack and defense and supports more population.', 'Le centre de commandement dans le Dernier Village améliore les capacités d’attaque et de défense des chefs, et permet d’augmenter la population.', 'Pusat desa tempat mengatur desa, meningkatkan kekuatan pasukan dan meningkatkan jumlah populasi maksimal'], [undefined, 0, 0, 0, 0], [0, 500, 500, 500, 500], ['TOWN CENTER', 'CENTRE VILLE', 'PUSAT DESA'], 100];
des1 = ['sawmill', ['Wood cutters produce wood every turn to allow more building', 'Les bûcherons produisent du bois à chaque tour pour permettre la construction de bâtiments.', 'Tempat mencari kayu untuk membuat bahan bangunan'], [undefined, 0, 0, 0, 60], [0, 80, 250, 200, 0], ['SAWMIll', 'Scierie', 'PENEBANG KAYU']];
des2 = ['tower', ['Part of the fortification is equipped with a place to shoot arrows from within. This is one of the main defense features', 'Cet élément de fortification est équipé de meurtrières pour pouvoir tirer à l’arc en restant protégé. C’est un des principaux ouvrages défensifs.', 'Bangunan pertahanan dengan pemanah untuk membantu bertahan dari serangan musuh'], [undefined, 0, 0, 0, 0], [0, 120, 250, 300, 200], ['WATCH TOWER', 'Tour de guet', 'MENARA PENGAWAS']];
des3 = ['blacksmith', ['Blacksmiths produce things like weapons and armor', 'Les forgerons fabriquent des armes et des armures.', 'Pandai besi tempat produksi senjata dan pakaian pelindung'], [undefined, 0, 0, 0, 0], [0, 180, 200, 300, 180], ['BLACKSMITH', 'Forgeron', 'PANDAI BESI']];
des4 = ['kios_hasilBumi', ['The market is the place to sell resource and collect taxes, increasing your gold', 'Le marché est l’endroit où vous pouvez vendre des armes et collecter des taxes, de façon à augmenter le nombre de vos pièces d’or.', 'Pasar tempat jual beli sumber daya, meningkatkan pendapatan emas'], [undefined, 30, 0, 0, 0], [0, 50, 80, 100, 250], ['MARKET', 'Marché', 'PASAR']];
des5 = ['kios_senjata', ['The market is the place to sell weapon and collect taxes, increasing your gold', 'Le marché est l’endroit où vous pouvez vendre des armes et collecter des taxes, de façon à augmenter le nombre de vos pièces d’or.', 'Pasar tempat jual beli senjata, meningkatkan pendapatan emas'], [undefined, 30, 0, 0, 0], [0, 75, 200, 100, 220], ['WEAPON SELLER', 'Armurerie', 'PENJUAL SENJATA']];
des6 = ['sawah', ['An area of land, including various structures, devoted primarily to the practice of producing and managing food', 'Une étendue de terrain, comportant diverses structures, consacrée principalement à la production de nourriture.', 'Sawah untuk menanam dan mencari makanan'], [undefined, 0, 30, 0, 0], [0, 50, 0, 150, 150], ['FARM', 'Ferme', 'SAWAH']];
des7 = ['peternakan', ['A place to breed animals for food supplies.', 'Un endroit où on élève des animaux destinés à la boucherie.', 'Peternakan untuk mencari makanan'], [undefined, 0, 30, 0, 0], [0, 70, 0, 100, 180], ['BARN', 'Grange', 'PETERNAKAN']];
des8 = ['pelabuhan', ['A fishing place and source of fish for food', 'Un lieu de pêche pour se nourrir de poissons.', 'Tempat memancing dan mencari ikan'], [undefined, 0, 40, 0, 0], [0, 100, 0, 120, 250], ['HARBOUR', 'Port', 'PELABUHAN']];
des9 = ['iron_mine', ['Gather iron from the mine to create weapons', 'Exploitez la mine pour en tirer du fer qui servira à fabriquer des armes.', 'Tempat mencari besi untuk membuat senjata'], [undefined, 0, 0, 60, 0], [0, 150, 150, 0, 200], ['IRON MINE', 'Mine de fer', 'TAMBANG BESI']];
des10 = ['barrack', ['A training place used to train fighters and armies, increase attack, and support more population.', 'Un centre d’entraînement pour aguerrir les combattants, améliorer leur potentiel d’attaque, et loger plus de population.', 'Tempat melatih pasukan, meningkatkan serangan, dan meningkatkan jumlah populasi'], [undefined, 0, 0, 0, 0], [0, 200, 400, 300, 100], ['BARRACK', 'Caserne', 'BARAK'], 25];
des11 = ['tenda', ['A place to live, supports more population', 'Un type d’habitation qui permet loger plus de population.', 'tempat tinggal, meningkatkan jumlah populasi maksimal'], [undefined, 0, 0, 0, 0], [0, 80, 200, 100, 100], ['TENT', 'Tente', 'TENDA'], 50];
des12 = ['temple', ['Increases the morale and defense power of the army in battle', 'Améliore le moral des troupes et leur capacité de défense pendant la bataille.', 'meningkatkan moral dan pertahanan pasukan saat bertempur'], [undefined, 0, 0, 0, 0], [0, 500, 500, 500, 500], ['TEMPLE', 'Temple', 'KUIL']];
var desList = new Array();
var a = 0;
while (a <= 12) {
desList.push(_root['des' + a]);
++a;
}
objectMap1 = [[0, desList[8][0], 8]];
objectMap2 = [[0, desList[1][0], 1], [0, desList[8][0], 8]];
objectMap3 = [[0, desList[2][0], 2]];
objectMap4 = [[0, desList[6][0], 6], [0, desList[7][0], 7]];
objectMap5 = [[0, desList[6][0], 6], [0, desList[7][0], 7]];
objectMap6 = [[0, desList[9][0], 9]];
objectMap7 = [[1, desList[1][0], 1], [0, desList[11][0], 11]];
objectMap8 = [[0, desList[2][0], 2], [0, desList[10][0], 10], [0, desList[11][0], 11]];
objectMap9 = [[0, desList[4][0], 4], [0, desList[11][0], 11]];
objectMap10 = [[1, desList[9][0], 9]];
objectMap11 = [[0, desList[2][0], 2]];
objectMap12 = [[0, desList[2][0], 2], [0, desList[10][0], 10], [0, desList[11][0], 11]];
objectMap13 = [[1, desList[0][0], 0], [0, desList[3][0], 3], [0, desList[12][0], 12]];
objectMap14 = [[0, desList[2][0], 2], [0, desList[10][0], 10], [0, desList[11][0], 11]];
objectMap15 = [[0, desList[2][0], 2]];
objectMap16 = [[0, desList[9][0], 9]];
objectMap17 = [[0, desList[5][0], 5], [0, desList[11][0], 11]];
objectMap18 = [[0, desList[2][0], 2], [0, desList[10][0], 10], [0, desList[11][0], 11]];
objectMap19 = [[0, desList[1][0], 1], [0, desList[11][0], 11]];
objectMap20 = [[0, desList[9][0], 9]];
objectMap21 = [[1, desList[6][0], 6], [0, desList[7][0], 7]];
objectMap22 = [[0, desList[6][0], 6], [0, desList[7][0], 7]];
objectMap23 = [[0, desList[2][0], 2]];
objectMap24 = [[0, desList[1][0], 1], [0, desList[8][0], 8]];
objectMap25 = [[0, desList[8][0], 8]];
var objectMapAll = new Array();
var o = 0;
while (o < desList.length) {
objectMapAll.push(desList[o][0]);
++o;
}
var trapEnable = [0, [0, 13], [0, 22], [0, 23], [0, 24], [0, 31], [0, 32], [0, 33], [0, 34], [0, 35], [0, 42], [0, 43], [0, 44], [0, 53]];
var trapPrice = [0, 150, 150, 150, 150];
townEco0 = 0;
townEco1 = [['FAIR TRADING', 'Commerce équitable', 'PERDAGANGAN ADIL'], ['Reduce resource prices when trading at the market', 'Réduit le prix des ressources au marché.', 'Mengurangi harga penjualan sumber daya di pasar']];
townEco2 = [['TAXES', 'Taxes', 'PAJAK'], ['Increase gold production per turn if you have any marketable items', 'Augmente la production d’or à chaque tour si vous avez des denrées négociables.', 'Meningkatkan produksi emas tiap putaran untuk setiap pasar']];
townEco3 = [['IRRIGRATION SYTEM', 'Système d\'irrigation', 'SISTIM IRIGRASI'], ['Increase food production per turn', 'Augmente la production de nourriture à chaque tour.', 'Meningkatkan produksi makanan tiap putaran']];
townEco4 = [['TOOLS REFINE', 'Outils', 'PENGEMBANGAN ALAT'], ['Increase iron production per turn', 'Augmente la production de fer à chaque tour.', 'Meningkatkan produksi besi tiap putaran']];
var townEcoDes = new Array();
var eco = 0;
while (eco <= 4) {
townEcoDes.push(_root['townEco' + eco]);
++eco;
}
townMil0 = 0;
townMil1 = [['ARMORY', 'Arsenal', 'GUDANG SENJATA'], ['Increase army\'s defense', 'Améliore la capacité de défense de l’armée.', 'Meningkatkan pertahanan pasukan']];
townMil2 = [['TRAINING', 'Entrainement', 'PELATIHAN'], ['Increase army\'s life point', 'Augmente les points de vie de l’armée.', 'Meningkatkan nyawa pasukan']];
townMil3 = [['OUTPOST', 'Avant-poste', 'POS PENGINTAI'], ['Increase tower and building attack', 'Améliore la capacité d’attaque des tours et des bâtiments.', 'Meningkatkan serangan bangunan dan menara']];
townMil4 = [['CONSTRUCTIVE BUILD', 'Constructions', 'PEMBANGUNAN'], ['Increase tower and building defense', 'Améliore la capacité de défense des tours et des bâtiments.', 'Meningkatkan pertahanan bangunan dan menara']];
var townMilDes = new Array();
var eco = 0;
while (eco <= 4) {
townMilDes.push(_root['townMil' + eco]);
++eco;
}
townSpe0 = 0;
townSpe1 = [['PICK POCKET', 'Pillage', 'TRIK COPET'], ['Increase the gold you get after winning a battle by 10%', 'Augmente de 10% la quantité d’or que vous recevez après avoir gagné une bataille.', 'Meningkatkan pendapatan emas dari hasil rampokan sebesar 10%']];
townSpe2 = [['AMBUSH', 'Embuscade', 'PENYERGAPAN'], ['Increase trap efficacy', 'Améliore l’efficacité des pièges.', 'Meningkatkan efektifitas perangkap']];
townSpe3 = [['WE ARE AT WAR', 'Etat de guerre', 'SITUASI PERANG'], ['Increase army\'s reloading at battle', 'Augmente la cadence de tir au combat.', 'Mempercepat proses pembuatan pasukan saat battle']];
townSpe4 = [['PLENTY VAULT', 'CORNE D\'ABONDANCE', 'GUDANG KEKAYAAN'], ['Produce less resources per turn', 'Produit moins de ressources à chaque tour.', 'Memproduksi sumber daya persediaan sedikit demi sedikit tiap putaran']];
var townSpeDes = new Array();
var eco = 0;
while (eco <= 4) {
townSpeDes.push(_root['townSpe' + eco]);
++eco;
}
townEcoStat = [0, 0, 0, 0, 0];
townMilStat = [0, 0, 0, 0, 0];
townSpeStat = [0, 0, 0, 0, 0];
townEcoPrice = [0, [0, 500, 520, 650, 580], [0, 200, 500, 400, 600], [0, 300, 650, 550, 800], [0, 350, 600, 650, 700]];
townMilPrice = [0, [0, 300, 500, 650, 720], [0, 400, 620, 500, 500], [0, 250, 400, 800, 750], [0, 350, 500, 720, 800]];
townSpePrice = [0, [0, 500, 1200, 1000, 1000], [0, 400, 900, 800, 1000], [0, 500, 900, 950, 1000], [0, 800, 1000, 1000, 1000]];
temp0 = 0;
temp1 = [['SWORD', 'EPEE', 'PEDANG'], ['Upgrade throwing-knife to swordsman', 'Passer du lanceur de couteaux au fantassin.', 'Meningkatkan pelempar pisau menjadi pasukan pedang']];
temp2 = [['FIRE ARROW', 'FLECHE DE FEU', 'PANAH API'], ['Upgrade normal arrow to fire arrow', 'Passer des flèches normales aux flèches enflammées', 'Meningkatkan pasukan pemanah menjadi pasukan pemanah api']];
temp3 = [['AXE', 'AXE', 'KAPAK'], ['Upgrade spearman to halberdier', 'Passer du lancier au hallebardier', 'Meningkatkan pasukan bertombak menjadi pasukan berkapak']];
temp4 = [['LONG GUN', 'FUSIL', 'SENAPAN LARAS PANJANG'], ['Upgrade pistol to gun', 'Passer du pistolet au fusil', 'Meningkatkan pasukan senapan laras pendek menjadi pasukan senapan laras panjang']];
temp5 = [['STAFF', 'BATON MAGIQUE', 'TONGKAT SIHIR'], ['Upgrade wizard to high wizard with staff', 'Passer du sorcier au grand sorcier avec bâton.', 'Meningkatkan pasukan dukun menjadi pasukan tongkat sihir']];
var tempList = new Array();
var eco = 0;
while (eco <= 5) {
tempList.push(_root['temp' + eco]);
++eco;
}
tempStat = [0, 0, 0, 0, 0, 0];
tempPrice = [0, [0, 700, 1200, 1000, 1000], [0, 650, 1000, 1000, 1200], [0, 700, 1000, 1200, 1000], [0, 750, 1000, 1200, 1000], [0, 750, 1000, 1000, 1200]];
tipsList = [['Build more barracks. Each barrack increases your army\'s attack.', 'Construisez plus de casernes. Chaque caserne augmente le potentiel d’attaque de votre armée.', 'Bangunlah banyak barrack. Setiap barrack yg kamu punya meningkatkan serangan pasukan kamu'], ['A commander\'s special ability is a really powerful and useful skill when used at the right time.', 'La capacité spéciale d’un chef est un outil très puissant et très utile quand elle est employée au bon moment.', 'Kekuatan special para panglima sangatlah kuat dan berguna jika digunakan disaat yg tepat'], ['Build and upgrade your tower, it will really help your battle.', 'Construisez et améliorez votre tour de guet, elle vous sera très utile pour les batailles.', 'Bangun dan tingkatkan tower, karena akan sangat membantu dalam pertempuran'], ['Your army will steal the enemy\'s gold when they reach the enemy\'s base in every battle.', 'Votre armée récupérera l’or de l’ennemi à chaque fois qu’elle prendra la base adverse dans une bataille.', 'Pasukanmu akan merampas gold musuh ketika mereka mencapai base musuh dalam pertempuran'], ['Collect gold resource from selling weapons or another resource at the market.', 'Gagnez des pièces d’or en vendant des armes ou toute autre ressource sur le marché.', 'Kumpulkan gold dengan jual belu senjata atau bahan makanan di pasar'], ['Upgrade your army\'s class level in the temple, it increases your army\'s strength and stolen gold.', 'Améliorez le niveau de votre armée au temple, cela permet d’augmenter sa force et la quantité d’or volé.', 'Tingkatkan classlevel pasukan kamu di temple, itu akan meningkatkan kekuatan pasukanmu'], ['Enemies will destroy your buildings when they pass the village.', 'L’ennemi détruit tous les bâtiments d’un village quand il le traverse.', 'Pasukan musuh akan menghancurkan bangunan-bangunan yg dilewatinya di desa'], ['Town centers can upgrade economy, military, and special abilities of village.', 'Un centre-ville peut améliorer l’économie, la force militaire et les capacités spéciales d’un village.', 'Pusat desa dapat meningkatkan ekonomi, militer, dan kekuatan special yg dimiliki desa'], ['Manufacturing weapons at the blacksmith is cheaper than buying them at the weapons market.', 'Fabriquer des armes chez un forgeron coûte moins cher que les acheter sur le marché.', 'Membuat senjata di blacksmith lebih murah daripada membeli di penjual senjata'], ['Fighting with more than 2 commanders will allow more possibilities to win, because there are more troops to fight.', 'Engager le combat avec plus de 2 chefs augmente les chances de succès, car cela permet de combattre avec plus de troupes.', 'Bertempur dengan lebih dari 2 panglima akan lebih memungkinkan untuk menang, karena akan lebih banyak pasukan yg maju'], ['If you have only a small possibility to win, a retreat is suggested to minimize the loss.', 'Si vous avez peu de chances de gagner un combat, il est conseillé de battre en retraite pour minimiser les pertes.', 'Jika pertempuran tidak memungkinkan menang, lebih baik mundur agar tidak banyak pasukan yg tewas'], ['Upgrade temple to increase attack and defense for all commander', 'Améliorer le temple pour augmenter le potentiel d’attaque et de défense de tous les chefs', 'Upgrade temple untuk meningkatkan kekuatan para panglima']];
achievementStory = [0, ['Warbonnets\n\nWarbonnets or headdresses were one of the magical charms worn by Plains Indians in battle. The eagle was considered as the greatest and most powerful of all birds and thus, the finest bonnets were made out of eagle feathers. A chief\'s war bonnet is made of the feathers he has received for good deeds to his community and is worn in high honor. A warrior\'s war bonnet, such as the famous war bonnet of Roman Nose, the Cheyenne warrior, served to protect him during battle. In several instances Roman Nose, wearing his war bonnet, rode back and forth before soldiers of the United States Army during battles of the Indian Wars and despite many shots, was never hit.', 'Coiffure de guerre\n\nles coiffures de guerre ou bonnets de guerre faisaient partie des accessoires magiques portés au combat par les Indiens des plaines. L’aigle étant considéré comme le plus grand et le plus puissant des oiseaux, les bonnets les plus précieux étaient confectionnés avec des plumes d’aigle. Le bonnet de guerre d’un chef est composé des plumes qu’il a reçues pour son action bénéfique envers sa tribu, et c’est un grand honneur de le porter. Le bonnet de guerre d’un combattant, comme celui du guerrier Cheyenne Roman Nose, sert aussi à le protéger pendant la bataille. A plusieurs reprises, pendant les guerres indiennes, Roman Nose passa et repassa au galop devant les lignes des soldats de l’US Army, et bien qu’il ait essuyé de nombreux tirs ennemis, il ne fut jamais touché.', 'Warbonnets\n\nTopi Indian atau hiasan kepala khas Indian adalah salah satu simbol magis yang dikenakan oleh Indian dataran rendah dalam pertempuran. Elang dianggap sebagai burung yang paling kuat dan hebat, maka dari itu hiasan kepala indian yang paling bagus dibuat dari bulu elang. Hiasan Bulu untuk kepala suku dibuat dari bulu-bulu yang diterimanya dari perbuatan baiknya terhadap rakyatnya dan di pakai untuk kehormatan yang tinggi. Hiasan bulu untuk pejuang, seperti yang digunakan oleh Roman Nose, pejuang Cheyenne, bertujuan untuk melindungi dia sepanjang perang. Dalam beberapa kejadian, Roman Nose, dengan memakai hiasan bulu, berkeliaran diantara serdadu Amerika sepanjang perang Indian dan meski seharusnya tertembak oleh banyak peluru, dia tidak pernah tertembak.'], ['Bear tooth\n\nBear teeth are usually worn as necklaces, pendants, or amulets. They sometimes acted as proof of bravery for the youngsters in the tribe.', 'Dent d’ours\n\nLes dents d’ours étaient généralement portées en colliers, pendentifs ou amulettes. Elles étaient parfois considérées comme une preuve de bravoure pour les jeunes de la tribu.', 'Gigi beruang\n\nBiasa digunakan sebagai bagian dari kalung, liontin atau amulet/jimat. Kadang berlaku sebagai bukti keberanian para pemuda (bagian dari ujian kedewasaan) di dalam suku.'], ['Skull\n\nUsually used for ritual purpose by some Indian tribes. Not many Indian tribes used human skulls for their rituals', 'Crâne\n\nUtilisé principalement pour des rituels par quelques tribus indiennes. Peu d’entre elles utilisaient des crânes humains pour leurs rituels.', 'Tengkorak \n\nBiasanya digunakan untuk tujuan ritual oleh beberapa suku Indian. Tidak banyak suku Indian yang menggunakan tengkorak manusia untuk ritual mereka.'], ['Bone Bracelet\n\nParts of the Native American jewelry made from bone or jade, sometimes made from buffalo bones', 'Bracelet en os\n\nUne grande partie des bijoux amérindiens était à base d’os ou de jade, parfois d’os de bison.', 'Gelang Tulang\n\nBagian dari perhiasan suku Indian asli Amerika, perhiasan yang dibuat dari tulang atau bebatuan mulia, sering juga dibuat dari tulang bison.'], ['Indian Flute\n\nThe Native American flute was originally very personal; its music was played without accompaniment in courtship, healing, meditation, and spiritual rituals. Native American flutes can be made from various materials. Juniper, Redwood, and Cedar are popular, as they provide a nice aroma. There are two different types of Native American flute, the plains flute and the woodlands flute, each with slightly different construction.', 'Flûte indienne\n\nl’usage de la flûte amérindienne était à l’origine très individuel. On jouait de la flûte pour faire la cour, pendant les rituels de guérison, de méditation, ou d’invocation des esprits. Les flûtes amérindiennes pouvaient être taillées dans différents matériaux. Le genévrier, le séquoia et le cèdre étaient populaires pour leur odeur. Il y avait 2 types de flûte amérindienne : la flûte des plaines et celle des bois, légèrement différentes dans leur mode de fabrication.', 'Seruling Indian\n\nSeruling asli suku Indian Amerika, sebenarnya sangat unik; musiknya di mainkan tanpa musik pengiring di mimbar suku, mimbar penyembuhan, meditasi dan ritual spiritual. Seruling ini bisa terbuat dari bermacam-macam materi. Juniper, Redwood dan Kayu Cedar lebih populer, karena mereka menimbulkan aroma yang khas dan enak. Ada 2 jenis seruling, seruling dataran rendah dan seruling woodlands yang masing masing punya struktur yang sedikit berbeda.'], ['Navajo Rug\n\nNative American weaving has evolved into a true art form. As these Navajo weavers expand their innate sense of design and harmony, their weavings are constantly improving. The weaving of a Native American rug involves both the spiritual and temporal world. From the spiritual side, the Navajos believe that the art of weaving was passed on to them by Spider Woman, a deity of the Navajo emergence story. From a temporal view, they respond to both artistic pride and augmentation of their meager income.', 'Tapis Navajo\n\nAu fil du temps, la pratique du tissage des Amérindiens a évolué en une véritable forme d’art. Alors que les tisserands navajos développaient leur sens inné du design et de l’harmonie, la qualité de leur tissage s’améliorait constamment. Le tissage d’un tapis navajo est une action située à la limite des univers matériel et spirituel. Sur le plan spirituel, les Navajos pensent que l’art du tissage leur avait été transmis par la Femme Araignée, une divinité de la mythologie navajo. Sur le plan matériel, le tissage apporte une satisfaction artistique et une augmentation de leurs maigres revenus.', 'Karpet navajo\n\ntenunan asli Indian telah berubah menjadi bentuk kesenian. Para penyulam Navajo memperluas selera design mereka dan juga harmoninya, tenunan mereka berkembang. Tenunan Indian mencakup baik tema dunia spiritual dan dunia nyata. Dari segi spiritual mereka percaya bahwa tenunan telah diwariskan oleh wanita laba-laba, dewa dari Legenda Navajo. Dari sudut dunia nyata, mereka mencerminkan sisi kebanggaan artistik dan sumber pemasukan mereka.'], ['Calumet\n\nA Calumet is a ceremonial smoking pipe used by some Native American Nations. Traditionally it has been smoked to seal a covenant or treaty, or to offer prayers in a religious ceremony. A common material for calumet pipe bowls is red pipestone or catlinite, a fine-grained easily-worked stone of a rich red color of the Coteau des Prairies, west of the Big Stone Lake in South Dakota. Various types of ceremonial pipes have been used by multiple Native American cultures, with the style of pipe, herbs smoked, and ceremonies being unique to the distinct religions of those Nations. In ceremonial usage, the smoke is believed to carry prayers to the attention of the Creator or other powerful spirits.', 'Calumet\n\nUn calumet est une pipe de cérémonie utilisée par certaines nations amérindiennes. Traditionnellement on l’allume pour sceller une alliance ou un traité, ou pour célébrer une cérémonie religieuse. Le fourneau est en terre de pipe ou catlinite, un minéral rouge au grain fin, facile à graver, provenant du Coteau des Prairies, à l’ouest du lac Big Stone dans le Dakota du Sud. De nombreux types de calumets de cérémonie ont été utilisés par les différentes nations amérindiennes, chacune ayant un type de calumet, de tabac et de cérémonial lié à ses croyances religieuses. Durant une cérémonie, la fumée est censée porter les prières à l’attention du Créateur ou de tout autre esprit divin.', 'Calumet\n\nadalah sebuah pipa untuk merokok yang digunakan untuk upacara oleh beberapa Suku Indian. Secara tradisional pipa ini digunakan sebagai ritual sahnya perjanjian atau kesepakatan, atau untuk menyampaikan doa-doa dalam upacara keagamaan. Materi yang umum untuk calumet adalah red pipestone atau catlinite, sebuah batu yang mudah dibentuk yang berwarna merah dari Coteau des Praries, sebelah barat dari Big Stone Lake di South Dakota. Banyak jenis calumet tekah dipergunakan oleh berbagai macam suku Indian, baik itu bentuk pipanya, obat obatan yang di hisap lewat pipanya, dan upacara yang berbeda-beda dari suku Indian. Dalam hal upacara, asapnya dipercaya untuk menyampaikan doa-doa kepada Sang Pencipta ataupun mahkluk spritual yang lain.'], ['Indian Pot\n\nAbout two thousand years ago, the beginning of agriculture in North America caused the previously nomadic Indian peoples to settle down. Soon, pottery shapes developed according to various customs and techniques of gathering water, storing grains and liquids, and preserving seeds for the next planting. The craft culminated in the development of cooking pots that were made to sit on rocks in open fires, water jars with indented bases so they could sit comfortably on the heads of water gatherers, and large storage vessels for grains and water. Indian villages all over the United States became known for their different pot shapes and decorative styles.', 'Poterie indienne\n\nIl y a environ 2.000 ans, les peuples indiens d’Amérique du Nord cessèrent d’être nomades pour commencer à cultiver la terre et ainsi se sédentariser. Peu après, la fabrication de poteries commença à se développer, et les coutumes de chaque tribu, la manière de puiser de l’eau, de conserver les grains et les liquides, ou de protéger les graines pour les prochaines semences, donnèrent naissance à plusieurs styles. Cet art atteint son apogée avec la réalisation de poteries qui pouvaient être placées directement sur un foyer ouvert, de jarres avec une base concave pour que les porteurs d’eau puissent les tenir plus facilement sur leur tête, et de grands silos pour le grain et l’eau. Certains villages indiens devinrent renommés à travers tout le territoire américain pour la forme et le style décoratif de leurs poteries.', 'Guci Khas Indian\n\nkira-kira 2000 tahun yang lalu, awal dari masa agrikultur di America Utara menyebabkan Indian yang sebelumnya adalah suku nomaden untuk mulai menetap. Tidak lama kemudian kerajinan tanah liat berkembang sesuai kebiasaan dan kebutuhan serta teknik mereka mengumpulkan air, menyimpan gandum dan carian lain, dan merawat benih untuk masa tanam berikutnya. Kerajinan ini berkembang dengan munculnya pot pot untuk memasak yang dibuat dengan dudukan untuk di atas tungku yang terbuat dari bebatuan di alam bebas, guci untuk menyimpan air dengan dasar yang agak cekung sehingga dapat diletakkan dengan nyaman di atas kepala para pembawa air, dan tempat penyimpanan yang besar untuk gandum dan air. Ada banyak bentuk dari pot/guci ini dari berbagai suku Indian.'], ['Dreamcatcher\n\nIn Ojibwa (Chippewa) culture, a dreamcatcher is a handmade object based on a willow hoop, on which is woven a loose net or web. The dreamcatcher is then decorated with personal and sacred items such as feathers and beads. The legend of the Native American dreamcatcher varies somewhat from tribe to tribe, but the basic theme or intention was to allow good dreams to slip through the web and into the sleeper during the night while the bad dreams were caught in the web and would perish at morning\'s light', 'Attrape-rêves\n\nDans la culture Ojibwa (Chippewa), un attrape-rêves est un objet fait à la main, constitué d’un anneau en saule sur lequel est noué un filet assez ample. L’attrape-rêves est ensuite personnalisé avec des petits accessoires sacrés comme des plumes ou des perles. La légende de l’attrape-rêves amérindien varie quelque peu d’une tribu à l’autre, mais la base est commune : il s’agit de laisser passer les bons rêves à travers le filet pour arriver jusqu’au dormeur, et de retenir les cauchemars dans le filet jusqu’au matin, quand la lumière du jour les fera disparaître.', 'Dreamcatcher\n\nPenangkap Mimpi, dalam bahasa budaya Chippewa, penangkap Mimpi adalah kerajinan tangan yang dibuat dari bulatan willow, yang kemudian disulami dengan jaring. Dreamcatcher ini kemudian di dekorasi dengan benda-benda pribadi dan benda suci semacam bulu dan biji kalung. Legenda mengenai benda ini bermacam-macam dari suku ke suku, tapi pada dasarnya adalah untuk mengijinkan mimpi baik untuk lewat dari jaring masuk ke dalam tidur selama malam, sementara mimpi buruk terperangkap di dalam jala/jaring dan akan musnah pada pagi hari.'], ['Buffalo Skull\n\nAnimal skulls are usually used by Indian people for many purposes, from ceremonial to war. They most often used Buffalo skulls.', 'Crâne de bison\n\nLes crânes d’animaux étaient beaucoup utilisés dans la culture amérindienne, dans des contextes très divers, comme la guerre ou les cérémonies. Les crânes de bison étaient les plus répandus. ', 'Tengkorak Bison/Kerbau\n\ntengkorak binatang biasa digunakan oleh Suku Indian untuk berbagai tujuan, mulai dari upacara sampai perang, mereka paling sering menggunakan tengkorak bison/kerbau liar.'], ['Indian Necklace\n- Sometimes made from small bones, but sometimes also using animal leather for the amulet.', 'Collier indien\n\nCertains étaient composés de petits os, avec parfois aussi du cuir pour l’amulette', 'Kalung Khas Indian\n\nkadang terbuat dari tulang tulang kecil, tapi kadang kadang menggunakan kulit hewan untuk amulet / jimatnya.'], ['Plains Indian Shield\n\nThe shield, as could be expected, was a very important item to the Native American, not only due to the obvious physical protection, but also because of the Spiritual Protection it provided. Because of the latter, shields did not disappear from the cultural identity of the Native American as they did from the European, where the shield provided familial linkage and/or identity of the bearer and was judged quite inadequate with the advent of weapons using gunpowder.', 'Bouclier indien des Plaines\n\nLe bouclier était bien sûr un objet très important dans la culture amérindienne, pas seulement pour son rôle évident de protection physique, mais aussi dans un rôle de protection spirituelle. C’est pour cette raison que les boucliers n’ont pas disparu aussi vite dans la culture amérindienne que dans la culture européenne, où le bouclier, symbole de la lignée et de l’identité de celui qui le portait, disparut quand il se révéla inefficace avec l’avènement des armes à feu.', 'Perisai Indian\n\nPerisai adalah benda yang amat penting untuk para Indian Amerika, tidak hanya untuk perlindungan fisik, tetapi juga karena perlindungan spiritualnya. Karena hal yang terakhir, perisai tidak menghilang dari identitas budaya Suku Indian, tidak seperti yang terjadi di Eropa karena perisa menunjukkan hubungan keluarga dan atau identitas dari sang pemilik dan telah dinilai tidak cukup melindungi karena ditemukannya senjata dengan mesiu.']];
achievementDes = [0, ['Completing and saving the tutorial games', 'Terminer et sauvegarder les tutoriaux', 'Menyelesaikan dan menyimpan tutorial game'], ['Fighting with all 5 commanders in a single battle', 'Combattre avec les 5 chefs dans une même bataille', 'Bertempur dengan semua 5 panglima dalam 1 kali pertarungan'], ['Using 3 special powers in 1 battle', 'Utiliser 3 pouvoirs spéciaux dans une même bataille', 'Menggunakan 3 kekuatan spesial dalam 1 kali pertempuran'], ['Building all 4 available barracks', 'Construire les 4 casernes disponibles', 'Membangun semua 4 barak yang tersedia'], ['Upgrading the temple to level 9', 'Améliorer le temple jusqu’au niveau 9', 'Meningkatkan kuil hingga level 9'], ['Upgrading all 5 classlevel available', 'Améliorer les 5 classes de guerrier disponibles', 'Meningkatkan semua 5 tingkat pasukan yg tersedia'], ['Stealing 5000 golds from the enemies in battle', 'Voler 5.000 pièces d’or à l’ennemi dans une bataille', 'Mencuri 5000 emas dari musuh ketika pertempuran'], ['Collecting 10,000 Golds', 'Rassembler 10.000 pièces d’or', 'Mengumpulkan 10.000 emas'], ['Collecting 10,000 Foods', 'Rassembler 10.000 unités de nourriture', 'Mengumpulkan 10.000 makanan'], ['Collecting 10,000 Irons', 'Rassembler 10.000 unités de fer', 'Mengumpulkan 10.000 besi'], ['Collecting 10,000 Woods', 'Rassembler 10.000 unités de bois', 'Mengumpulkan 10.000 kayu'], ['Gathering 30 Flowers', 'Recueillir 30 fleurs', 'Mengumpulkan 30 bunga ajaib']];
medalsDes = [0, ['GOLD COIN\nSurvive for 75 days', 'Pièce d\'or\nSurvivre 75 jours', 'KOIN EMAS\nBertahan selama 75 hari'], ['SILVER COIN\nSurvive for 50 days', 'Pièce d\'argent\nSurvivre 50 jours', 'KOIN PERAK\nBertahan selama 50 hari'], ['BRONZE COIN\nSurvive for 40 days', 'Pièce de bronze\nSurvivre 40 jours', 'PERUNGGU\nBertahan selama 40 hari'], ['LEAD COIN\nSurvive for 25 days', 'Pièce de plomb\nSurvivre 25 jours', 'KOIN TIMAH\nBertahan selama 25 hari'], ['KOIN TEMBAGA\nSurvive for 10 days', 'Pièce de cuivre\nSurvivre 10 jours', 'COPPER COIN\nBertahan selama 10 hari']];
var serangan = false;
Cookies = SharedObject.getLocal('TLV', '/');
if (Cookies.data.statisticList != undefined) {
statisticList = Cookies.data.statisticList;
}
if (Cookies.data.achievementList != undefined) {
achievementList = Cookies.data.achievementList;
}
if (Cookies.data.medalsList != undefined) {
medalsList = Cookies.data.medalsList;
}
var volBGM = 80;
var volFX = 100;
soundBGM('bgm1');
var i = 1;
while (i <= 16) {
_root['challenge' + i] = false;
++i;
}
}
movieClip 3163 {
frame 1 {
this.gotoAndStop(_root.bahasa + 1);
}
}
movieClip 3170 {
}
movieClip 3191 {
}
movieClip 3193 {
frame 1 {
stop();
}
}
movieClip 3204 {
}
frame 8 {
stop();
stopAllSounds();
soundFX('bgm0');
skip_btn.gotoAndStop(_root.bahasa + 1);
skip_btn.onRelease = function () {
_root.gotoAndStop('main');
};
}
// unknown tag 88 length 146
movieClip 3230 {
frame 1 {
cerita = [0, ['One day on the American shore,\nan unknown ship came out of nowhere...', 'Un jour, sur la côte américaine, un navire inconnu arrive de nulle part...', 'Suatu hari di pantai Benua Amerika,\nSebuah kapal megah datang dengan tiba-tiba...'], ['Seeds of evil radiating prominently from within...', 'Des ondes maléfiques s’en dégagent... ', 'Aura kejahatan memancar dari dalam kapal itu...'], ['A curse had fallen upon the Indians...\nand escape shall be the only salvation..', 'Le mauvais sort vient de s’abattre sur les Indiens...\net le salut réside dans la fuite... ', 'Firasat buruk untuk para penduduk Indian...\nSatu-satunya jalan harus melarikan diri...'], ['Vicious and ruthless, these guests are consumed by greed... \nThey slaughtered the villagers, burned their villages to ashes..', 'Brutaux et impitoyables, ces nouveaux arrivants sont dévorés par l’appât du gain... Ils réduisent les villages en cendres et massacrent leurs habitants…', 'Tamu tak diundang yang sangat kejam dan serakah...\nMereka membunuh para penduduk dan membumihanguskan Desa-desa.'], ['Their purpose is to overtake the continent..\nThe prisoners, fearing for their life, eventually joined these invaders...\nThey become traitors, tainted by the thirst of power and gold...', 'Leur objectif est de conquérir le continent...\nDe peur d’être exécutés, leurs prisonniers finissent par se joindre aux envahisseurs…\nIls deviennent des traîtres, corrompus par leur soif de pouvoir et de richesse.', 'Tujuan mereka adalah menguasai Benua Amerika...\nPara tawanan yang tidak ingin dibunuh akhirnya bergabung bersama mereka...\nmenjadi pengkhianat yang haus akan kekuasaan dan kekayaan...'], ['Only one village remains...\nThe last hope for the Indians...', 'Seul un village résiste encore…\nLe dernier espoir pour le peuple indien…', 'Tinggal 1 Desa yang tersisa....\nHarapan yang tersisa bagi bangsa Indian...'], ['These words eventually reach Wambleeska,\nElder Chief of the Last Village', 'Le récit de ces événements est parvenu aux oreilles de Wambleeska, le doyen et le chef du Dernier Village.', 'Salah satu penduduk yang selamat memberi informasi tersebut kepada Wambleeska,\nsang kepala suku The Last Village.'], ['Thus, \nThe Last Village prepares their army to face\nthe greatest battle of their time...', 'Le Dernier Village prépare donc son armée pour le combat le plus important de son histoire...', 'Maka bersiaplah The Last Village untuk mengatur strategy menghadapi perang terbesar sepanjang sejarah mereka...']];
cerita2 = [0, ['They spared no survivors...', 'Ils n’épargnent personne...', 'Tak ada yang selamat...']];
}
frame 15 {
tulisan.text = cerita[1][_root.bahasa];
}
frame 137 {
tulisan.text = cerita[2][_root.bahasa];
}
frame 245 {
tulisan.text = cerita[3][_root.bahasa];
}
frame 382 {
tulisan.text = cerita[4][_root.bahasa];
}
frame 452 {
tulisan.text = cerita[4][_root.bahasa];
tulisan2.text = cerita2[1][_root.bahasa];
}
frame 543 {
tulisan.text = cerita[5][_root.bahasa];
}
frame 754 {
tulisan.text = cerita[6][_root.bahasa];
}
frame 934 {
tulisan.text = cerita[7][_root.bahasa];
}
frame 1102 {
tulisan.text = cerita[8][_root.bahasa];
}
frame 1329 {
_root.play();
}
}
movieClip 3232 {
}
frame 9 {
function bikinMapBayangan() {
var v3 = new Array();
var v2 = 1;
while (v2 <= 5) {
var v1 = 1;
while (v1 <= 5) {
v3.push('map' + v2 + v1);
++v1;
}
++v2;
}
}
function tampilBunga(arrayTempat) {
if (days == 3) {
var v3 = 0;
} else {
var v3 = 1 + Math.ceil(days / 20);
}
var v2 = arrayTempat[random(arrayTempat.length)];
if (1 + random(v3) == 1) {
++flowerID;
minimap.coordinate.attachMovie('mc_flower', 'flower' + flowerID, 500 + flowerID);
minimap.coordinate['flower' + flowerID]._x = minimap.coordinate[v2]._x;
minimap.coordinate['flower' + flowerID]._y = minimap.coordinate[v2]._y;
minimap.coordinate['flower' + flowerID].daysLeft = 1;
minimap.coordinate['flower' + flowerID].pos = v2.substr(3, 2);
flowerList.push('flower' + flowerID);
tampilAlertFlower(bungaTampilBahasa[_root.bahasa]);
}
}
function resetBunga() {
for (var v1 in flowerList) {
if (minimap.coordinate[flowerList[v1]].daysLeft > 0) {
--minimap.coordinate[flowerList[v1]].daysLeft;
} else {
delete minimap.coordinate[flowerList[v1]].pos;
minimap.coordinate[flowerList[v1]].removeMovieClip();
}
}
}
function cekDapatBunga() {
for (var v2 in flowerList) {
if (minimap.coordinate[flowerList[v2]].hitTest(minimap.coordinate.panglima5)) {
++_root.bunga;
minimap.coordinate[flowerList[v2]].removeMovieClip();
tampilAlertFlower(dapatBungaBahasa[_root.bahasa] + _root.bunga);
if (!challenge5) {
if (_root.bunga >= 5 && _root.bunga < 10) {
_root.scoreHTTPSender('FL091017', 'CH005');
challenge5 = true;
}
}
if (!challenge6) {
if (_root.bunga >= 10 && _root.bunga < 15) {
_root.scoreHTTPSender('FL091017', 'CH006');
challenge6 = true;
}
}
if (!challenge7) {
if (_root.bunga >= 15 && _root.bunga < 25) {
_root.scoreHTTPSender('FL091017', 'CH007');
challenge7 = true;
}
}
if (!challenge8) {
if (_root.bunga >= 25) {
_root.scoreHTTPSender('FL091017', 'CH008');
challenge8 = true;
}
}
}
}
}
function cekPosBunga() {
map_general.flower._visible = false;
for (var v2 in flowerList) {
for (var v1 in posMap) {
if (minimap.coordinate[flowerList[v2]].pos == posMap[v1]) {
if (map == Number(v1) + 1) {
map_general.flower._visible = true;
}
}
}
}
}
function tampilBlur() {
_root.attachMovie('main_blur', 'blur', 99);
blur._x = Stage.width / 2;
blur._y = Stage.height / 2;
}
function tampilOption(nomor) {
isPaused = true;
tampilBlur();
aktifTombol = false;
_root.attachMovie('windows_option', 'option', 1000);
option._x = Stage.width / 2;
option._y = Stage.height / 2;
option._alpha = 0;
option.gotoAndStop(nomor);
option.onEnterFrame = function () {
efekFade(this);
var v3 = 0;
while (v3 <= 3) {
if (_root.kualitas[v3]) {
option['kualitas' + v3].gotoAndStop(2);
} else {
option['kualitas' + v3].gotoAndStop(1);
}
option['kualitas' + v3].kw = v3;
option['kualitas' + v3].onRelease = function () {
var v3 = 0;
while (v3 <= 3) {
_root.kualitas[v3] = false;
++v3;
}
_root.kualitas[this.kw] = true;
_root._quality = _root.kualitasList[this.kw];
};
++v3;
}
};
option.bgm_slider.tombol._x = _root.volBGM * _root.option.bgm_slider.bar._width / 100;
option.bgm_slider.tombol.onPress = function () {
startDrag(this, true, 0, 0, _root.option.bgm_slider.bar._width, 0);
this.onEnterFrame = function () {
_root.volBGM = (this._x / _root.option.fx_slider.bar._width) * 100;
sBGM.setVolume(_root.volBGM);
};
};
option.bgm_slider.tombol.onReleaseOutside = function () {
this.stopDrag();
delete this.onEnterFrame;
};
option.bgm_slider.tombol.onRelease = option.bgm_slider.tombol.onReleaseOutside;
option.fx_slider.tombol._x = _root.volFX * _root.option.fx_slider.bar._width / 100;
option.fx_slider.tombol.onPress = function () {
startDrag(this, true, 0, 0, _root.option.fx_slider.bar._width, 0);
this.onEnterFrame = function () {
_root.volFX = (this._x / _root.option.fx_slider.bar._width) * 100;
};
};
option.fx_slider.tombol.onReleaseOutside = function () {
this.stopDrag();
delete this.onEnterFrame;
};
option.fx_slider.tombol.onRelease = option.fx_slider.tombol.onReleaseOutside;
option.cursormode_btn.gotoAndStop(2 - Number(customCursor));
option.cursormode_btn.onRelease = function () {
if (customCursor) {
this.gotoAndStop(2);
showNormalCursor();
customCursor = false;
} else {
this.gotoAndStop(1);
showCustomCursor();
customCursor = true;
}
};
option.continue_btn.onRelease = function () {
aktifTombol = true;
isPaused = false;
blur.removeMovieClip();
this._parent.removeMovieClip();
};
option.cancel_btn.onRelease = option.continue_btn.onRelease;
option.close_btn.onRelease = function () {
saveData();
for (var v3 in daftarMusuhSerang) {
minimap.coordinate[daftarMusuhSerang[v3]].removeMovieClip();
}
for (var v4 in flowerList) {
minimap.coordinate[flowerList[v4]].removeMovieClip();
}
_root.gotoAndStop('menu');
aktifTombol = true;
isPaused = false;
blur.removeMovieClip();
this._parent.removeMovieClip();
};
}
function tampilDeskripsiNone(who) {
_root.attachMovie('description_map', 'des', 999);
des._x = _xmouse;
des._y = _ymouse;
des._alpha = 0;
des.lvl.text = 1;
des.judul.text = _root.desList[who.id][4][bahasa];
des.des.text = cantBahasa[_root.bahasa];
des.gold.text = _root.desList[who.id][3][1];
des.food.text = _root.desList[who.id][3][2];
des.iron.text = _root.desList[who.id][3][3];
des.wood.text = _root.desList[who.id][3][4];
des.onEnterFrame = function () {
efekFade(this);
if (_xmouse > Stage.width / 2) {
des._x = _xmouse - des._width;
} else {
des._x = _xmouse;
}
if (_ymouse > Stage.height / 2) {
des._y = _ymouse - des._height;
} else {
des._y = _ymouse;
}
};
}
function tampilDeskripsi(who) {
_root.attachMovie('description_map', 'des', 999);
des._x = _xmouse - des._width;
des._y = _ymouse;
des._alpha = 0;
des.judul.text = _root.desList[who.id][4][bahasa];
des.lvl.text = 1;
des.des.text = _root.desList[who.id][1][bahasa];
des.gold.text = _root.desList[who.id][3][1];
des.food.text = _root.desList[who.id][3][2];
des.iron.text = _root.desList[who.id][3][3];
des.wood.text = _root.desList[who.id][3][4];
des.onEnterFrame = function () {
efekFade(this);
if (_xmouse > Stage.width / 2) {
des._x = _xmouse - des._width;
} else {
des._x = _xmouse;
}
if (_ymouse > Stage.height / 2) {
des._y = _ymouse - des._height;
} else {
des._y = _ymouse;
}
};
}
function tampilDeskripsiMap(who) {
_root.attachMovie('description_map', 'des', 999);
des._x = _xmouse;
des._y = _ymouse;
des._alpha = 0;
des.gotoAndStop(2);
if (who._name == 'sawmill' || who._name == 'peternakan' || who._name == 'sawah' || who._name == 'pelabuhan' || who._name == 'iron_mine') {
des.gotoAndStop(4);
des.gold.text = _root.desList[who.id][2][1] * who.isSetLevel;
des.food.text = _root.desList[who.id][2][2] * who.isSetLevel;
des.iron.text = _root.desList[who.id][2][3] * who.isSetLevel;
des.wood.text = _root.desList[who.id][2][4] * who.isSetLevel;
}
if (who._name == 'barrack' || who._name == 'kios_hasilBumi' || who._name == 'kios_senjata' || who._name == 'pusat_desa' || who._name == 'blacksmith') {
des.gotoAndStop(3);
}
des.lvl.text = who.isSetLevel;
des.judul.text = _root.desList[who.id][4][bahasa];
des.des.text = _root.desList[who.id][1][bahasa];
if (who._name == 'tenda') {
des.des.text += '\n\nSupport: \n' + _root.desList[who.id][5] * who.isSetLevel + ' populations';
}
des.onEnterFrame = function () {
efekFade(this);
if (_xmouse > Stage.width / 2) {
des._x = _xmouse - des._width;
} else {
des._x = _xmouse;
}
if (_ymouse > Stage.height / 2) {
des._y = _ymouse - des._height;
} else {
des._y = _ymouse;
}
};
}
function upgradeSomething() {
var v3;
des.removeMovieClip();
for (var v4 in resourceList) {
if (resourceList[v4] - desList[this.id][3][v4] * ((1 + _root['objectMap' + map][this.j][0]) / 2) >= 0) {
v3 = true;
} else {
soundFX('error');
tampilDialog(4);
v3 = false;
break;
}
}
if (v3) {
if (_root['objectMap' + map][this.j][0] + 1 <= 9) {
for (v4 in resourceList) {
resourceList[v4] -= desList[this.id][3][v4] * ((1 + _root['objectMap' + map][this.j][0]) / 2);
}
soundFX('build');
if (this.j == undefined) {
this.j = 0;
}
_root['objectMap' + map][this.j][0] += 1;
if (!challenge14) {
if (this.id == 12 && _root['objectMap' + map][this.j][0] == 9) {
_root.scoreHTTPSender('FL091017', 'CH014');
challenge14 = true;
}
}
_root.gantiPeta();
this._parent.removeMovieClip();
} else {
soundFX('error');
tampilDialog(5);
v3 = false;
this._parent.removeMovieClip();
}
}
}
function tampilMenuUpgrade(who) {
aktifTombol = false;
_root.attachMovie('menu_upgrade', 'menu_bs', 1000);
menu_bs._x = Stage.width / 2;
menu_bs._y = Stage.height / 2;
menu_bs.des.text = rollText[bahasa];
menu_bs.jual_btn.onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Gold: ' + desList[who.id][3][1] + ' Food: ' + desList[who.id][3][2] + ' Iron: ' + desList[who.id][3][3] + ' Wood: ' + desList[who.id][3][4];
} else {
if (bahasa == 1) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Or: ' + desList[who.id][3][1] + ' Nourriture: ' + desList[who.id][3][2] + ' Fer: ' + desList[who.id][3][3] + ' Boil: ' + desList[who.id][3][4];
} else {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Emas: ' + desList[who.id][3][1] + ' Makanan: ' + desList[who.id][3][2] + ' Besi: ' + desList[who.id][3][3] + ' Kayu: ' + desList[who.id][3][4];
}
}
};
menu_bs.jual_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.jual_btn.onRelease = function () {
aktifTombol = true;
who._visible = 0;
for (var v3 in resourceList) {
resourceList[v3] += desList[who.id][3][v3];
}
_root['objectMap' + map][who.j][0] = 0;
_root.gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.upgrade_btn.id = who.id;
menu_bs.upgrade_btn.j = who.j;
menu_bs.upgrade_btn.onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = upgradeBahasa[bahasa] + 'Gold: ' + desList[this.id][3][1] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Food: ' + desList[this.id][3][2] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Iron: ' + desList[this.id][3][3] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Wood: ' + desList[this.id][3][4] * ((1 + _root['objectMap' + map][this.j][0]) / 2);
} else {
if (bahasa == 1) {
menu_bs.des.text = upgradeBahasa[bahasa] + 'Or: ' + desList[this.id][3][1] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Nourriture: ' + desList[this.id][3][2] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Fer: ' + desList[this.id][3][3] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Bois: ' + desList[this.id][3][4] * ((1 + _root['objectMap' + map][this.j][0]) / 2);
} else {
menu_bs.des.text = upgradeBahasa[bahasa] + 'Emas: ' + desList[this.id][3][1] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Makanan: ' + desList[this.id][3][2] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Besi: ' + desList[this.id][3][3] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Kayu: ' + desList[this.id][3][4] * ((1 + _root['objectMap' + map][this.j][0]) / 2);
}
}
};
menu_bs.upgrade_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.upgrade_btn.onRelease = upgradeSomething;
menu_bs.oke_btn.onRelease = function () {
aktifTombol = true;
gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.cancel_btn.onRelease = menu_bs.oke_btn.onRelease;
}
function sellWeapon() {
if (weaponList[this.i] - 1 >= 0) {
--weaponList[this.i];
resourceList[1] += weaponPrice[this.i] / 2;
} else {
soundFX('error');
tampilDialog(4);
}
}
function buyWeapon() {
if (resourceList[1] - weaponPrice[this.j] >= 0) {
++weaponList[this.j];
resourceList[1] -= weaponPrice[this.j];
} else {
soundFX('error');
tampilDialog(4);
}
}
function tampilMenuSenjata(who) {
aktifTombol = false;
var v4 = [0, 'sell_pedang_btn', 'sell_panah_btn', 'sell_tombak_btn', 'sell_pistol_btn', 'sell_tongkat_btn'];
var desJual = [0, ['Sell swords weapon from stock', 'Vendre un poignard du stock d’armes.', 'Jual pedang dari gudang senjata'], ['Sell bows weapon from stock', 'Vendre un arc du stock d’armes', 'Jual busur dari gudang senjata'], ['Sell spears weapon from stock', 'Vendre une lance du stock d’armes', 'Jual tombak dari gudang senjata'], ['Sell guns weapon from stock', 'Vendre un fusil du stock d’armes', 'Jual senapan dari gudang senjata'], ['Sell staves weapon from stock', 'Vendre un bâton du stock d’armes', 'Jual tongkat sihir dari gudang senjata']];
var v3 = [0, 'buy_pedang_btn', 'buy_panah_btn', 'buy_tombak_btn', 'buy_pistol_btn', 'buy_tongkat_btn'];
_root.attachMovie('menu_kiosSenjata', 'menu_bs', 1000);
var desBeli = [0, ['Buy swords weapon from stock', 'Acheter un poignard', 'Beli pedang dari penjual senjata'], ['Buy bows weapon from stock', 'Acheter un arc', 'Beli busur dari penjual senjata'], ['Buy spears weapon from stock', 'Acheter une lance', 'Beli tombak dari penjual senjata'], ['Buy guns weapon from stock', 'Acheter un fusil', 'Beli senapan dari penjual senjata'], ['Buy staves weapon from stock', 'Acheter un bâton', 'Beli tongkat sihir dari penjual senjata']];
menu_bs._x = 300;
menu_bs._y = 350;
menu_bs.des.text = rollText[bahasa];
menu_bs.onEnterFrame = function () {
this.gold_text.text = Math.round(resourceList[1]);
};
for (var i in v4) {
menu_bs[v4[i]].i = i;
menu_bs[v4[i]].onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = desJual[this.i][bahasa] + '\nWeapon price: \n' + weaponPrice[this.i] / 2 + ' gold';
} else {
if (bahasa == 1) {
menu_bs.des.text = desJual[this.i][bahasa] + '\narme de prix: \n' + weaponPrice[this.i] / 2 + ' or';
} else {
menu_bs.des.text = desJual[this.i][bahasa] + '\nHarga senjata: \n' + weaponPrice[this.i] / 2 + ' emas';
}
}
};
menu_bs[v4[i]].onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs[v4[i]].onRelease = sellWeapon;
}
for (var j in v3) {
menu_bs[v3[j]].j = j;
menu_bs[v3[j]].onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = desBeli[this.j][bahasa] + '\nWeapon price: \n' + weaponPrice[this.j] + ' gold';
} else {
if (bahasa == 1) {
menu_bs.des.text = desBeli[this.j][bahasa] + '\narme de prix: \n' + weaponPrice[this.j] + ' or';
} else {
menu_bs.des.text = desBeli[this.j][bahasa] + '\nHarga senjata: \n' + weaponPrice[this.j] + ' emas';
}
}
};
menu_bs[v3[j]].onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs[v3[j]].onRelease = buyWeapon;
}
menu_bs.jual_btn.onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Gold: ' + desList[who.id][3][1] + ' Food: ' + desList[who.id][3][2] + ' Iron: ' + desList[who.id][3][3] + ' Wood: ' + desList[who.id][3][4];
} else {
if (bahasa == 1) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Or: ' + desList[who.id][3][1] + ' Nourriture: ' + desList[who.id][3][2] + ' Fer: ' + desList[who.id][3][3] + ' Bois: ' + desList[who.id][3][4];
} else {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Emas: ' + desList[who.id][3][1] + ' Makanan: ' + desList[who.id][3][2] + ' Besi: ' + desList[who.id][3][3] + ' Kayu: ' + desList[who.id][3][4];
}
}
};
menu_bs.jual_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.jual_btn.onRelease = function () {
aktifTombol = true;
who._visible = 0;
for (var v3 in resourceList) {
resourceList[v3] += desList[who.id][3][v3];
}
_root['objectMap' + map][who.j][0] = 0;
_root.gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.oke_btn.onRollOver = function () {
menu_bs.des.text = acceptBahasa[bahasa];
};
menu_bs.oke_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.oke_btn.onRelease = function () {
gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.cancel_btn.onRelease = menu_bs.oke_btn.onRelease;
}
function sellResource() {
if (Key.isDown(16)) {
var v2 = 5;
} else {
var v2 = 1;
}
if (transaksi - 1 * v2 >= 0) {
if (resourceList[this.i] - resourcePrice[this.i] * v2 >= 0) {
resourceList[this.i] -= resourcePrice[this.i] * v2;
resourceList[1] += (5 + townEcoStat[1]) * v2;
transaksi -= 1 * v2;
} else {
soundFX('error');
this._parent.removeMovieClip();
tampilDialog(4);
}
} else {
soundFX('error');
this._parent.removeMovieClip();
tampilDialog(8);
}
}
function buyResource() {
if (Key.isDown(16)) {
var v2 = 5;
} else {
var v2 = 1;
}
if (transaksi - 1 * v2 >= 0) {
if (resourceList[1] - 10 * v2 >= 0) {
resourceList[this.j] += resourcePrice[this.j] * v2;
resourceList[1] -= 10 * v2;
transaksi -= 1 * v2;
} else {
soundFX('error');
this._parent.removeMovieClip();
tampilDialog(4);
}
} else {
soundFX('error');
this._parent.removeMovieClip();
tampilDialog(8);
}
}
function tampilMenuResource(who) {
aktifTombol = false;
var v3 = [0, 0, 'sell_food_btn', 'sell_iron_btn', 'sell_wood_btn'];
var v7 = [0, 0, 'Sell food resource to get gold', 'Sell iron resource to get gold', 'Sell wood resource to get gold'];
var v4 = [0, 0, 'buy_food_btn', 'buy_iron_btn', 'buy_wood_btn'];
var v6 = [0, 0, 'Buy food resource with gold', 'Buy iron resource with gold', 'Buy wood resource with gold'];
_root.attachMovie('menu_kiosResource', 'menu_bs', 1000);
menu_bs._x = 300;
menu_bs._y = 350;
menu_bs.onEnterFrame = function () {
this.gold_text.text = Math.round(resourceList[1]);
};
for (var i in v3) {
menu_bs[v3[i]].i = i;
menu_bs[v3[i]].onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = 'Sell ' + resourcePrice[this.i] + ' ' + resList[this.i][bahasa] + ' for ' + (5 + townEcoStat[1]) + ' golds';
} else {
if (bahasa == 1) {
menu_bs.des.text = 'vendre ' + resourcePrice[this.i] + ' ' + resList[this.i][bahasa] + ' pour ' + (5 + townEcoStat[1]) + ' pièces d\'or';
} else {
menu_bs.des.text = 'Jual ' + resourcePrice[this.i] + ' ' + resList[this.i][bahasa] + ' seharga ' + (5 + townEcoStat[1]) + ' emas';
}
}
};
menu_bs[v3[i]].onRollOut = function () {
menu_bs.des.text = multiplyBahasa[bahasa];
};
menu_bs[v3[i]].onRelease = sellResource;
}
for (var j in v4) {
menu_bs[v4[j]].j = j;
menu_bs[v4[j]].onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = 'Buy ' + resourcePrice[this.j] + ' ' + resList[this.j][bahasa] + ' for 10 golds';
} else {
if (bahasa == 1) {
menu_bs.des.text = 'acheter ' + resourcePrice[this.j] + ' ' + resList[this.j][bahasa] + 'pour 10 pièces d’or';
} else {
menu_bs.des.text = 'Beli ' + resourcePrice[this.j] + ' ' + resList[this.j][bahasa] + ' seharga 10 emas';
}
}
};
menu_bs[v4[j]].onRollOut = function () {
menu_bs.des.text = multiplyBahasa[bahasa];
};
menu_bs[v4[j]].onRelease = buyResource;
}
menu_bs.jual_btn.onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Gold: ' + desList[who.id][3][1] + ' Food: ' + desList[who.id][3][2] + ' Iron: ' + desList[who.id][3][3] + ' Wood: ' + desList[who.id][3][4];
} else {
if (bahasa == 1) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Or: ' + desList[who.id][3][1] + ' Nourriture: ' + desList[who.id][3][2] + ' Fer: ' + desList[who.id][3][3] + ' Bois: ' + desList[who.id][3][4];
} else {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Emas: ' + desList[who.id][3][1] + ' Makanan: ' + desList[who.id][3][2] + ' Besi: ' + desList[who.id][3][3] + ' Kayu: ' + desList[who.id][3][4];
}
}
};
menu_bs.jual_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.jual_btn.onRelease = function () {
aktifTombol = true;
who._visible = 0;
for (var v3 in resourceList) {
resourceList[v3] += desList[who.id][3][v3];
}
_root['objectMap' + map][who.j][0] = 0;
_root.gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.oke_btn.onRollOver = function () {
menu_bs.des.text = acceptBahasa[bahasa];
};
menu_bs.oke_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.oke_btn.onRelease = function () {
aktifTombol = true;
gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.cancel_btn.onRelease = menu_bs.oke_btn.onRelease;
}
function beliSenjata() {
if (Key.isDown(16)) {
var v2 = 5;
} else {
var v2 = 1;
}
var v3;
des.removeMovieClip();
for (var v4 in resourceList) {
if (resourceList[v4] - Math.round(armyDescList[this.i][4][v4] / 2) * v2 >= 0) {
v3 = true;
} else {
soundFX('error');
v3 = false;
break;
}
}
if (v3) {
for (v4 in resourceList) {
resourceBuyWeapon[v4] += Math.round(armyDescList[this.i][4][v4] / 2) * v2;
resourceList[v4] -= Math.round(armyDescList[this.i][4][v4] / 2) * v2;
}
soundFX('build');
weaponProduce[this.i] += 1 * v2;
}
}
function tampilMenuBlacksmith(who) {
aktifTombol = false;
var v3 = [0, 'ppedang_btn', 'ppanah_btn', 'ptombak_btn', 'ppistol_btn', 'ptongkat_btn'];
var ketTombol = [0, ['Make sword weapon and add it to weapon stock\nResource to produce:\n', 'Fabriquer un poignard et l’ajouter au stock d’armes.\nressources pour produire:\n', 'Pesan senjata pedang dan menyimpannya di gudang senjata\nSumber daya yang diperlukan:\n'], ['Make bow weapon and add it to weapon stock\nResource to produce:\n', 'Fabriquer un arc et l’ajouter au stock d’armes\nressources pour produire:\n', 'Pesan senjata busur dan menyimpannya di gudang senjata\nSumber daya yang diperlukan:\n'], ['Make spear weapon and add it to weapon stock\nResource to produce:\n', 'Fabriquer une lance et l’ajouter au stock d’armes\nressources pour produire:\n', 'Pesan senjata tombak dan menyimpannya di gudang senjata\nSumber daya yang diperlukan:\n'], ['Make gun weapon and add it to weapon stock\nResource to produce:\n', 'Fabriquer un fusil et l’ajouter au stock d’armes\nressources pour produire:\n', 'Pesan senjata senapan dan menyimpannya di gudang senjata\nSumber daya yang diperlukan:\n'], ['Make magic staff weapon and add it to weapon stock\nResource to produce:\n', 'Fabriquer un bâton et l’ajouter au stock d’armes\nressources pour produire:\n', 'Pesan senjata tongkat sihir dan menyimpannya di gudang senjata\nSumber daya yang diperlukan:\n']];
_root.attachMovie('menu_blacksmith', 'menu_bs', 1000);
menu_bs._x = 300;
menu_bs._y = 350;
menu_bs.des.text = multiplyBahasa[bahasa];
menu_bs.onEnterFrame = function () {
var v1 = 0;
while (v1 <= 5) {
menu_bs['ket' + v1].text = weaponProduce[v1];
++v1;
}
};
var i = 0;
while (i <= v3.length) {
menu_bs[v3[i]].i = i;
menu_bs['ket' + i].text = menu_bs[v3[i]].i;
menu_bs[v3[i]].onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = ketTombol[this.i][bahasa] + 'Gold: ' + Math.round(armyDescList[this.i][4][1] / 2) + ' Food: ' + Math.round(armyDescList[this.i][4][2] / 2) + ' Iron: ' + Math.round(armyDescList[this.i][4][3] / 2) + ' Wood: ' + Math.round(armyDescList[this.i][4][4] / 2);
} else {
if (bahasa == 1) {
menu_bs.des.text = ketTombol[this.i][bahasa] + 'Or: ' + Math.round(armyDescList[this.i][4][1] / 2) + ' Nourriture: ' + Math.round(armyDescList[this.i][4][2] / 2) + ' Fer: ' + Math.round(armyDescList[this.i][4][3] / 2) + ' Bois: ' + Math.round(armyDescList[this.i][4][4] / 2);
} else {
menu_bs.des.text = ketTombol[this.i][bahasa] + 'Emas: ' + Math.round(armyDescList[this.i][4][1] / 2) + ' Makanan: ' + Math.round(armyDescList[this.i][4][2] / 2) + ' Besi: ' + Math.round(armyDescList[this.i][4][3] / 2) + ' Kayu: ' + Math.round(armyDescList[this.i][4][4] / 2);
}
}
};
menu_bs[v3[i]].onRollOut = function () {
menu_bs.des.text = multiplyBahasa[bahasa];
};
menu_bs[v3[i]].onRelease = beliSenjata;
++i;
}
menu_bs.jual_btn.onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Gold: ' + desList[who.id][3][1] + ' Food: ' + desList[who.id][3][2] + ' Iron: ' + desList[who.id][3][3] + ' Wood: ' + desList[who.id][3][4];
} else {
if (bahasa == 1) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Or: ' + desList[who.id][3][1] + ' Nourriture: ' + desList[who.id][3][2] + ' Fer: ' + desList[who.id][3][3] + ' Bois: ' + desList[who.id][3][4];
} else {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Emas: ' + desList[who.id][3][1] + ' Makanan: ' + desList[who.id][3][2] + ' Besi: ' + desList[who.id][3][3] + ' Kayu: ' + desList[who.id][3][4];
}
}
};
menu_bs.jual_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.jual_btn.onRelease = function () {
aktifTombol = true;
who._visible = 0;
for (var v3 in resourceList) {
resourceList[v3] += desList[who.id][3][v3];
}
_root['objectMap' + map][who.j][0] = 0;
_root.gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.cancel_btn.onRollOver = function () {
menu_bs.des.text = cancelBahasa[bahasa];
};
menu_bs.cancel_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.cancel_btn.onRelease = function () {
for (var v3 in armyProduce) {
weaponProduce[v3] = 0;
}
for (var v2 in resourceList) {
resourceList[v2] += resourceBuyWeapon[v2];
resourceBuyWeapon[v2] = 0;
}
gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.oke_btn.onRollOver = function () {
menu_bs.des.text = produceAllBahasa[bahasa];
};
menu_bs.oke_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.oke_btn.onRelease = function () {
gantiPeta();
this._parent.removeMovieClip();
};
}
function beliPasukan() {
if (Key.isDown(16)) {
var v2 = 5;
} else {
var v2 = 1;
}
var v3;
des.removeMovieClip();
for (var v4 in resourceList) {
if (resourceList[v4] - armyDescList[this.i][4][v4] * v2 >= 0 && weaponList[this.i] - v2 >= 0) {
v3 = true;
} else {
soundFX('error');
v3 = false;
break;
}
}
if (v3) {
for (v4 in resourceList) {
resourceBuyArmy[v4] += armyDescList[this.i][4][v4] * v2;
resourceList[v4] -= armyDescList[this.i][4][v4] * v2;
}
soundFX('build');
armyProduce[this.i] += v2;
weaponList[this.i] -= v2;
resourceWeaponBuy[this.i] += v2;
}
}
function tampilMenuBarrack(who) {
aktifTombol = false;
var v3 = [0, 'ppedang_btn', 'ppanah_btn', 'ptombak_btn', 'ppistol_btn', 'ptongkat_btn'];
var ketTombol = [0, ['Produce swordman, army of Tocho\nResource to produce:\n', 'Créer un fantassin, armée de Tocho\nRessources pour produire:\n', 'Memproduksi pasukan pedang, pasukan Tocho\nSumber daya yang dibutuhkan\n'], ['Produce bowman, army of Cheveyo\nResource to produce:\n', 'Créer un archer, armée de Cheveyo\nRessources pour produire:\n', 'Memproduksi pasukan pemanah, pasukan Cheveyo\nSumber daya yang dibutuhkan\n'], ['Produce spearman, army of Otoahnacto\nResource to produce:\n', 'Créer un lancier, armée de Otoahnacto\nRessources pour produire:\n', 'Memproduksi pasukan tombak, pasukan Otoachnacto\nSumber daya yang dibutuhkan\n'], ['Produce gunman, army of Nidawi\nResource to produce:\n', 'Créer un fusilier, armée de Nidawi\nRessources pour produire:\n', 'Memproduksi pasukan penembak, pasukan Nidawi\nSumber daya yang dibutuhkan\n'], ['Produce magician, army of Kachada\nResource to produce:\n', 'Créer un sorcier, armée de Kachada\nRessources pour produire:\n', 'Memproduksi pasukan penyihir, pasukan Kachada\nSumber daya yang dibutuhkan\n']];
_root.attachMovie('menu_blacksmith', 'menu_bs', 1000);
menu_bs._x = 300;
menu_bs._y = 350;
menu_bs.des.text = multiplyBahasa[bahasa];
menu_bs.onEnterFrame = function () {
var v1 = 0;
while (v1 <= 5) {
menu_bs['ket' + v1].text = armyProduce[v1];
++v1;
}
};
var i = 0;
while (i <= v3.length) {
menu_bs[v3[i]].i = i;
menu_bs['ket' + i].text = menu_bs[v3[i]].i;
menu_bs[v3[i]].onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = ketTombol[this.i][bahasa] + 'Gold: ' + armyDescList[this.i][4][1] + ' Food: ' + armyDescList[this.i][4][2] + ' Iron: ' + armyDescList[this.i][4][3] + ' Wood: ' + armyDescList[this.i][4][4];
} else {
if (bahasa == 1) {
menu_bs.des.text = ketTombol[this.i][bahasa] + 'Or: ' + armyDescList[this.i][4][1] + ' Nourriture: ' + armyDescList[this.i][4][2] + ' Fer: ' + armyDescList[this.i][4][3] + ' Bois: ' + armyDescList[this.i][4][4];
} else {
menu_bs.des.text = ketTombol[this.i][bahasa] + 'Emas: ' + armyDescList[this.i][4][1] + ' Makanan: ' + armyDescList[this.i][4][2] + ' Besi: ' + armyDescList[this.i][4][3] + ' Kayu: ' + armyDescList[this.i][4][4];
}
}
};
menu_bs[v3[i]].onRollOut = function () {
menu_bs.des.text = multiplyBahasa[bahasa];
};
menu_bs[v3[i]].onRelease = beliPasukan;
++i;
}
menu_bs.jual_btn.onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Gold: ' + desList[who.id][3][1] + ' Food: ' + desList[who.id][3][2] + ' Iron: ' + desList[who.id][3][3] + ' Wood: ' + desList[who.id][3][4];
} else {
if (bahasa == 1) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Or: ' + desList[who.id][3][1] + ' Nourriture: ' + desList[who.id][3][2] + ' Fer: ' + desList[who.id][3][3] + ' Bois: ' + desList[who.id][3][4];
} else {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Emas: ' + desList[who.id][3][1] + ' Makanan: ' + desList[who.id][3][2] + ' Besi: ' + desList[who.id][3][3] + ' Kayu: ' + desList[who.id][3][4];
}
}
};
menu_bs.jual_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.jual_btn.onRelease = function () {
aktifTombol = true;
who._visible = 0;
for (var v3 in resourceList) {
resourceList[v3] += desList[who.id][3][v3];
}
_root['objectMap' + map][who.j][0] = 0;
_root.gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.cancel_btn.onRollOver = function () {
menu_bs.des.text = cancelBahasa[bahasa];
};
menu_bs.cancel_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.cancel_btn.onRelease = function () {
for (var v3 in armyProduce) {
armyProduce[v3] = 0;
}
for (var v2 in resourceList) {
resourceList[v2] += resourceBuyArmy[v2];
resourceBuyArmy[v2] = 0;
weaponList[v2] += resourceWeaponBuy[v2];
resourceWeaponBuy[v2] = 0;
}
gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.oke_btn.onRollOver = function () {
menu_bs.des.text = produce2Bahasa[bahasa];
};
menu_bs.oke_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.oke_btn.onRelease = function () {
gantiPeta();
this._parent.removeMovieClip();
};
}
function upgradeTemple() {
var v2;
des.removeMovieClip();
for (var v3 in resourceList) {
if (tempStat[this.i] == 0) {
if (resourceList[v3] - tempPrice[this.i][v3] >= 0) {
v2 = true;
} else {
soundFX('error');
v2 = false;
break;
}
}
}
if (v2) {
for (v3 in resourceList) {
resourceList[v3] -= tempPrice[this.i][v3];
}
soundFX('build');
tempStat[this.i] = 1;
this.gotoAndStop(3);
}
}
function tampilMenuTemple(who) {
aktifTombol = false;
_root.attachMovie('menu_temple', 'menu_bs', 1000);
menu_bs._x = 300;
menu_bs._y = 350;
menu_bs.des.text = rollText[bahasa];
var i = 1;
while (i <= 5) {
menu_bs['upgrade' + i].i = i;
menu_bs['upgrade' + i].onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = tempList[this.i][0][bahasa] + '\n' + tempList[this.i][1][bahasa] + '\nResource to build:' + '\nGold: ' + tempPrice[this.i][1] + ' Food: ' + tempPrice[this.i][2] + ' Iron: ' + tempPrice[this.i][3] + ' Wood: ' + tempPrice[this.i][4];
} else {
if (bahasa == 1) {
menu_bs.des.text = tempList[this.i][0][bahasa] + '\n' + tempList[this.i][1][bahasa] + '\nRessources nécessaires:' + '\nOr: ' + tempPrice[this.i][1] + ' Nourriture: ' + tempPrice[this.i][2] + ' Fer: ' + tempPrice[this.i][3] + ' Bois: ' + tempPrice[this.i][4];
} else {
menu_bs.des.text = tempList[this.i][0][bahasa] + '\n' + tempList[this.i][1][bahasa] + '\nSumber daya yang dibutuhkan:' + '\nEmas: ' + tempPrice[this.i][1] + ' Makanan: ' + tempPrice[this.i][2] + ' Besi: ' + tempPrice[this.i][3] + ' Kayu: ' + tempPrice[this.i][4];
}
}
};
menu_bs['upgrade' + i].onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
if (tempStat[i] == 0) {
menu_bs['upgrade' + i].gotoAndStop(1);
} else {
menu_bs['upgrade' + i].gotoAndStop(3);
}
menu_bs['upgrade' + i].onRelease = upgradeTemple;
++i;
}
menu_bs.jual_btn.onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Gold: ' + desList[who.id][3][1] + ' Food: ' + desList[who.id][3][2] + ' Iron: ' + desList[who.id][3][3] + ' Wood: ' + desList[who.id][3][4];
} else {
if (bahasa == 1) {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Or: ' + desList[who.id][3][1] + ' Nourriture: ' + desList[who.id][3][2] + ' Fer: ' + desList[who.id][3][3] + ' Bois: ' + desList[who.id][3][4];
} else {
menu_bs.des.text = sellBahasa[_root.bahasa] + 'Emas: ' + desList[who.id][3][1] + ' Makanan: ' + desList[who.id][3][2] + ' Besi: ' + desList[who.id][3][3] + ' Kayu: ' + desList[who.id][3][4];
}
}
};
menu_bs.jual_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.jual_btn.onRelease = function () {
aktifTombol = true;
who._visible = 0;
for (var v3 in resourceList) {
resourceList[v3] += desList[who.id][3][v3];
}
_root['objectMap' + map][who.j][0] = 0;
_root.gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.upgrade_btn.id = who.id;
menu_bs.upgrade_btn.j = who.j;
menu_bs.upgrade_btn.onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = upgradeBahasa[bahasa] + 'Gold: ' + desList[this.id][3][1] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Food: ' + desList[this.id][3][2] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Iron: ' + desList[this.id][3][3] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Wood: ' + desList[this.id][3][4] * ((1 + _root['objectMap' + map][this.j][0]) / 2);
} else {
if (bahasa == 1) {
menu_bs.des.text = upgradeBahasa[bahasa] + 'Or: ' + desList[this.id][3][1] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Nourriture: ' + desList[this.id][3][2] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Fer: ' + desList[this.id][3][3] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Bois: ' + desList[this.id][3][4] * ((1 + _root['objectMap' + map][this.j][0]) / 2);
} else {
menu_bs.des.text = upgradeBahasa[bahasa] + 'Emas: ' + desList[this.id][3][1] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Makanan: ' + desList[this.id][3][2] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Besi: ' + desList[this.id][3][3] * ((1 + _root['objectMap' + map][this.j][0]) / 2) + ' Kayu: ' + desList[this.id][3][4] * ((1 + _root['objectMap' + map][this.j][0]) / 2);
}
}
};
menu_bs.upgrade_btn.onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
menu_bs.upgrade_btn.onRelease = upgradeSomething;
menu_bs.oke_btn.onRelease = function () {
aktifTombol = true;
gantiPeta();
this._parent.removeMovieClip();
};
menu_bs.cancel_btn.onRelease = menu_bs.oke_btn.onRelease;
}
function upgradeTownEco() {
var v3;
des.removeMovieClip();
for (var v4 in resourceList) {
if (resourceList[v4] - townEcoPrice[this.i][v4] * ((1 + townEcoStat[this.i]) / 2) >= 0 && townEcoStat[this.i] < 9) {
v3 = true;
} else {
soundFX('error');
v3 = false;
break;
}
}
if (v3) {
for (v4 in resourceList) {
resourceList[v4] -= townEcoPrice[this.i][v4] * ((1 + townEcoStat[this.i]) / 2);
}
soundFX('build');
_root.townEcoStat[this.i] += 1;
this.gotoAndStop(2);
if (bahasa == 0) {
menu_bs.des.text = 'upgraded!';
} else {
if (bahasa == 1) {
menu_bs.des.text = 'mis à jour !';
} else {
menu_bs.des.text = 'berhasil di upgrade!';
}
}
}
}
function upgradeTownMil() {
var v3;
des.removeMovieClip();
for (var v4 in resourceList) {
if (resourceList[v4] - townMilPrice[this.i][v4] * ((1 + townMilStat[this.i]) / 2) >= 0 && townMilStat[this.i] < 9) {
v3 = true;
} else {
soundFX('error');
v3 = false;
break;
}
}
if (v3) {
for (v4 in resourceList) {
resourceList[v4] -= townMilPrice[this.i][v4] * ((1 + townMilStat[this.i]) / 2);
}
soundFX('build');
_root.townMilStat[this.i] += 1;
this.gotoAndStop(2);
if (bahasa == 0) {
menu_bs.des.text = 'upgraded!';
} else {
if (bahasa == 1) {
menu_bs.des.text = 'mis à jour !';
} else {
menu_bs.des.text = 'berhasil di upgrade!';
}
}
}
}
function upgradeTownSpe() {
if (townSpeStat[this.i] == 0) {
var v3;
des.removeMovieClip();
for (var v4 in resourceList) {
if (resourceList[v4] - townSpePrice[this.i][v4] >= 0) {
v3 = true;
} else {
soundFX('error');
v3 = false;
break;
}
}
if (v3) {
for (v4 in resourceList) {
resourceList[v4] -= townSpePrice[this.i][v4];
}
soundFX('build');
_root.townSpeStat[this.i] += 1;
this.gotoAndStop(2);
if (bahasa == 0) {
menu_bs.des.text = 'upgraded!';
} else {
if (bahasa == 1) {
menu_bs.des.text = 'mis à jour !';
} else {
menu_bs.des.text = 'berhasil di upgrade!';
}
}
if (!challenge13) {
if (this.i == 4) {
_root.scoreHTTPSender('FL091017', 'CH013');
challenge13 = true;
}
}
}
} else {
soundFX('error');
}
}
function tampilMenuTowncenter(who) {
aktifTombol = false;
_root.attachMovie('command_center', 'menu_bs', 1000);
menu_bs._x = 300;
menu_bs._y = 350;
menu_bs.des.text = rollText[bahasa];
menu_bs._alpha = 0;
menu_bs.onEnterFrame = function () {
efekFade(this);
};
var i = 0;
while (i <= 4) {
menu_bs['economy' + i].i = i;
menu_bs['economy' + i].onEnterFrame = function () {
this.lev.text = townEcoStat[this.i];
};
menu_bs['economy' + i].onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = _root.townEcoDes[this.i][0][bahasa] + '\n' + _root.townEcoDes[this.i][1][bahasa] + '\nResource to build:' + '\nGold: ' + townEcoPrice[this.i][1] * ((1 + townEcoStat[this.i]) / 2) + ' Food: ' + townEcoPrice[this.i][2] * ((1 + townEcoStat[this.i]) / 2) + ' Iron: ' + townEcoPrice[this.i][3] * ((1 + townEcoStat[this.i]) / 2) + ' Wood: ' + townEcoPrice[this.i][4] * ((1 + townEcoStat[this.i]) / 2);
} else {
if (bahasa == 1) {
menu_bs.des.text = _root.townEcoDes[this.i][0][bahasa] + '\n' + _root.townEcoDes[this.i][1][bahasa] + '\nRessources nécessaires:' + '\nOr: ' + townEcoPrice[this.i][1] * ((1 + townEcoStat[this.i]) / 2) + ' Nourriture: ' + townEcoPrice[this.i][2] * ((1 + townEcoStat[this.i]) / 2) + ' Fer: ' + townEcoPrice[this.i][3] * ((1 + townEcoStat[this.i]) / 2) + ' Bois: ' + townEcoPrice[this.i][4] * ((1 + townEcoStat[this.i]) / 2);
} else {
menu_bs.des.text = _root.townEcoDes[this.i][0][bahasa] + '\n' + _root.townEcoDes[this.i][1][bahasa] + '\nSumber daya yang dibutuhkan:' + '\nEmas: ' + townEcoPrice[this.i][1] * ((1 + townEcoStat[this.i]) / 2) + ' Makanan: ' + townEcoPrice[this.i][2] * ((1 + townEcoStat[this.i]) / 2) + ' Besi: ' + townEcoPrice[this.i][3] * ((1 + townEcoStat[this.i]) / 2) + ' Kayu: ' + townEcoPrice[this.i][4] * ((1 + townEcoStat[this.i]) / 2);
}
}
};
menu_bs['economy' + i].onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
if (townEcoStat[i] > 0) {
menu_bs['economy' + i].gotoAndStop(2);
} else {
menu_bs['economy' + i].gotoAndStop(1);
}
if (townEcoStat[i] <= 9) {
menu_bs['economy' + i].onRelease = upgradeTownEco;
} else {
soundFX('error');
}
menu_bs['military' + i].i = i;
menu_bs['military' + i].onEnterFrame = function () {
this.lev.text = townMilStat[this.i];
};
menu_bs['military' + i].onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = _root.townMilDes[this.i][0][bahasa] + '\n' + _root.townMilDes[this.i][1][bahasa] + '\nResource to build:' + '\nGold: ' + townMilPrice[this.i][1] * ((1 + townMilStat[this.i]) / 2) + ' Food: ' + townMilPrice[this.i][2] * ((1 + townMilStat[this.i]) / 2) + ' Iron: ' + townMilPrice[this.i][3] * ((1 + townMilStat[this.i]) / 2) + ' Wood: ' + townMilPrice[this.i][4] * ((1 + townMilStat[this.i]) / 2);
} else {
if (bahasa == 1) {
menu_bs.des.text = _root.townMilDes[this.i][0][bahasa] + '\n' + _root.townMilDes[this.i][1][bahasa] + '\nRessources nécessaires:' + '\nOr: ' + townMilPrice[this.i][1] * ((1 + townMilStat[this.i]) / 2) + ' Nourriture: ' + townMilPrice[this.i][2] * ((1 + townMilStat[this.i]) / 2) + ' Fer: ' + townMilPrice[this.i][3] * ((1 + townMilStat[this.i]) / 2) + ' Bois: ' + townMilPrice[this.i][4] * ((1 + townMilStat[this.i]) / 2);
} else {
menu_bs.des.text = _root.townMilDes[this.i][0][bahasa] + '\n' + _root.townMilDes[this.i][1][bahasa] + '\nSumber daya yang dibutuhkan:' + '\nEmas: ' + townMilPrice[this.i][1] * ((1 + townMilStat[this.i]) / 2) + ' Makanan: ' + townMilPrice[this.i][2] * ((1 + townMilStat[this.i]) / 2) + ' Besi: ' + townMilPrice[this.i][3] * ((1 + townMilStat[this.i]) / 2) + ' Kayu: ' + townMilPrice[this.i][4] * ((1 + townMilStat[this.i]) / 2);
}
}
};
menu_bs['military' + i].onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
if (townMilStat[i] > 0) {
menu_bs['military' + i].gotoAndStop(2);
} else {
menu_bs['military' + i].gotoAndStop(1);
}
if (townMilStat[i] <= 9) {
menu_bs['military' + i].onRelease = upgradeTownMil;
} else {
soundFX('error');
}
menu_bs['special' + i].i = i;
menu_bs['special' + i].onRollOver = function () {
if (bahasa == 0) {
menu_bs.des.text = _root.townSpeDes[this.i][0][bahasa] + '\n' + _root.townSpeDes[this.i][1][bahasa] + '\nResource to build:' + '\nGold: ' + townSpePrice[this.i][1] + ' Food: ' + townSpePrice[this.i][2] + ' Iron: ' + townSpePrice[this.i][3] + ' Wood: ' + townSpePrice[this.i][4];
} else {
if (bahasa == 1) {
menu_bs.des.text = _root.townSpeDes[this.i][0][bahasa] + '\n' + _root.townSpeDes[this.i][1][bahasa] + '\nRessources nécessaires:' + '\nOr: ' + townSpePrice[this.i][1] + ' Nourriture: ' + townSpePrice[this.i][2] + ' Fer: ' + townSpePrice[this.i][3] + ' Bois: ' + townSpePrice[this.i][4];
} else {
menu_bs.des.text = _root.townSpeDes[this.i][0][bahasa] + '\n' + _root.townSpeDes[this.i][1][bahasa] + '\nSumber daya yang dibutuhkan:' + '\nEmas: ' + townSpePrice[this.i][1] + ' Makanan: ' + townSpePrice[this.i][2] + ' Besi: ' + townSpePrice[this.i][3] + ' Kayu: ' + townSpePrice[this.i][4];
}
}
};
menu_bs['special' + i].onRollOut = function () {
menu_bs.des.text = rollText[bahasa];
};
if (townSpeStat[i] > 0) {
menu_bs['special' + i].gotoAndStop(2);
} else {
menu_bs['special' + i].gotoAndStop(1);
}
menu_bs['special' + i].onRelease = upgradeTownSpe;
++i;
}
menu_bs.upgrade_btn.id = who.id;
menu_bs.upgrade_btn.j = who.j;
menu_bs.upgrade_btn.onRelease = upgradeSomething;
menu_bs.cancel_btn.onRelease = function () {
aktifTombol = true;
gantiPeta();
this._parent.removeMovieClip();
};
}
function cekTrap() {
for (var v4 in daftarMusuhSerang) {
for (var v3 in trapEnable) {
if (minimap.coordinate[daftarMusuhSerang[v4]].coordinate == trapEnable[v3][1]) {
if (trapEnable[v3][0] == 1) {
trapEnable[v3][0] = 0;
var v1 = 1 + random(9 - townSpeStat[2]);
if (v1 <= 3 + townSpeStat[2]) {
for (var v2 in posMap) {
if (posMap[v2] == trapEnable[v3][1]) {
map = 1 + Number(v2);
tampilTrap();
}
}
minimap.coordinate[daftarMusuhSerang[v4]].trapped += 1;
}
}
}
}
}
}
function enemyAttack(where) {
_root.serangan = true;
++enemyID;
minimap.coordinate.attachMovie('icon_musuh', 'musuh' + enemyID, 100 * where);
minimap.coordinate['musuh' + enemyID].ID = enemyID;
minimap.coordinate['musuh' + enemyID].posArray = enemyID - 1;
minimap.coordinate['musuh' + enemyID].stepLeft = 6 + random(3);
minimap.coordinate['musuh' + enemyID].pos = where;
minimap.coordinate['musuh' + enemyID].trapped = 0;
if (bahasa == 0) {
tampilAlertPerang('Enemy attack from ' + gateName[where][bahasa] + ' gate\n' + Number(minimap.coordinate['musuh' + enemyID].stepLeft - 4) + ' days left');
} else {
if (bahasa == 1) {
tampilAlertPerang('Attaque ennemie à l\'entrée ' + gateName[where][bahasa] + '\n' + Number(minimap.coordinate['musuh' + enemyID].stepLeft - 4) + ' jours restant');
} else {
tampilAlertPerang('Serangan musuh dari gerbang ' + gateName[where][bahasa] + '\n' + Number(minimap.coordinate['musuh' + enemyID].stepLeft - 4) + ' hari lagi');
}
}
minimap.coordinate['musuh' + enemyID].onEnterFrame = enemyMoving;
daftarMusuhSerang.push('musuh' + enemyID);
}
function cekPerang() {
map_general.serangan._visible = false;
for (var v7 in daftarMusuhSerang) {
for (var v5 in comLoc) {
if (minimap.coordinate[daftarMusuhSerang[v7]].coordinate == comLoc[v5]) {
for (var v3 in posMap) {
if (posMap[v3] == comLoc[v5]) {
if (minimap.coordinate[daftarMusuhSerang[v7]].menang) {
posSerang[minimap.coordinate[daftarMusuhSerang[v7]].pos] = 0;
var v2 = minimap.coordinate[daftarMusuhSerang[v7]];
v2.removeMovieClip();
} else {
map = 1 + Number(v3);
perangDi = minimap.coordinate[daftarMusuhSerang[v7]].pos;
tampilWarningPerang(minimap.coordinate[daftarMusuhSerang[v7]]);
}
}
}
}
}
for (var v6 in posMap) {
if (minimap.coordinate[daftarMusuhSerang[v7]].coordinate == posMap[v6]) {
if (map == Number(v6) + 1) {
map_general.serangan._visible = true;
map_general.serangan.gotoAndStop(minimap.coordinate[daftarMusuhSerang[v7]].pos);
}
}
if (minimap.coordinate[daftarMusuhSerang[v7]].lastPos == posMap[v6]) {
if (Number(v6) + 1 != 13) {
for (var v4 in _root['objectMap' + (Number(v6) + 1)]) {
_root['objectMap' + (Number(v6) + 1)][v4][0] = 0;
}
}
}
}
}
}
function cekMusuh() {
var v3 = 1 + random(4);
var v4 = random(2 - Math.floor(days / 20));
if (days == 2) {
v4 = 0;
}
var v5 = 1 + v4;
if (v5 <= 1) {
if (posSerang[v3] == 0) {
posSerang[v3] = 1;
enemyAttack(v3);
}
}
for (var v2 in daftarMusuhSerang) {
minimap.coordinate[daftarMusuhSerang[v2]].lastPos = minimap.coordinate[daftarMusuhSerang[v2]].coordinate;
--minimap.coordinate[daftarMusuhSerang[v2]].stepLeft;
minimap.coordinate[daftarMusuhSerang[v2]].nextStep = random(_root['jalurMusuh' + minimap.coordinate[daftarMusuhSerang[v2]].pos][minimap.coordinate[daftarMusuhSerang[v2]].stepLeft].length);
}
cekPerang();
}
function tampilWarningPerang(what) {
cekPosPanglima();
aktifTombol = false;
pasukanMusuh = what;
tampilWarning = true;
_root.attachMovie('window_warning', 'warning', 1999);
warning._x = 300;
warning._y = 350;
warning._alpha = 0;
warning.gotoAndStop(1);
warning.gambar.gotoAndStop(1);
warning.isi.text = perangBahasa[_root.bahasa];
warning.potionLeft.text = _root.bunga;
warning.onEnterFrame = function () {
efekFade(this);
};
if (_root.bunga > 0) {
warning.potion_btn.gotoAndStop(1);
warning.potion_btn.onRelease = function () {
jamuMode = true;
--_root.bunga;
tampilWarning = false;
_root.gotoAndStop('ilustration');
this._parent.removeMovieClip();
};
} else {
warning.potion_btn.gotoAndStop('pressed');
}
warning.oke_btn.onRelease = function () {
jamuMode = false;
tampilWarning = false;
_root.gotoAndStop('ilustration');
this._parent.removeMovieClip();
};
}
function tampilTrap() {
aktifTombol = false;
tampilWarning = true;
_root.attachMovie('window_warning', 'warning', 1999);
warning._x = 300;
warning._y = 350;
warning._alpha = 0;
warning.gotoAndStop(2);
warning.gambar.gotoAndStop(2);
warning.isi.text = trapBahasa[_root.bahasa];
warning.onEnterFrame = function () {
efekFade(this);
};
warning.oke_btn.onRelease = function () {
gantiPeta();
this._parent.removeMovieClip();
};
}
function buildSomething() {
var v3;
des.removeMovieClip();
for (var v4 in resourceList) {
if (resourceList[v4] - desList[this.id][3][v4] >= 0) {
v3 = true;
} else {
soundFX('error');
tampilDialog(4);
v3 = false;
break;
}
}
if (v3) {
++statisticList[7];
for (v4 in resourceList) {
resourceList[v4] -= desList[this.id][3][v4];
}
soundFX('build');
_root['objectMap' + map][this.j][0] = 1;
_root.gantiPeta();
}
}
function hitungBarrack() {
var v3 = 0;
var v2 = 0;
while (v2 <= 25) {
for (var v4 in _root['objectMap' + v2]) {
if (_root['objectMap' + v2][v4][2] == 10) {
if (_root['objectMap' + v2][v4][0] > 0) {
++v3;
}
}
}
++v2;
}
return v3;
}
function cekPosPanglima() {
map_general.createEmptyMovieClip('panglimaGrup', 100);
map_general.panglimaGrup.count = 0;
for (var v1 in comLoc) {
if (posMap[map - 1] == comLoc[v1]) {
++map_general.panglimaGrup.count;
map_general.panglimaGrup.attachMovie('icon_panglima', 'icon' + v1, v1);
map_general.panglimaGrup['icon' + v1]._x = 70;
map_general.panglimaGrup['icon' + v1]._y = 75 * map_general.panglimaGrup.count;
map_general.panglimaGrup['icon' + v1].gotoAndStop(v1);
}
}
}
function gantiPeta() {
aktifTombol = true;
_root.blur.removeMovieClip();
_root.minimap.attachMovie('mc_indicator', 'indicator', 99);
_root.minimap.indicator._x = _root.minimap['map' + map]._x + _root.minimap['map' + map]._width / 2;
_root.minimap.indicator._y = _root.minimap['map' + map]._y + _root.minimap['map' + map]._height / 2;
_root.minimap.enabled = true;
_root.endturn_btn.enabled = true;
minimap.countPanglima = 0;
map_general.createEmptyMovieClip('panglimaGrup', 100);
map_general.panglimaGrup.count = 0;
cekPosPanglima();
cekTrap();
cekPerang();
cekDapatBunga();
cekPosBunga();
if (hitungBarrack() == 4) {
newAchievement(4);
}
if (objectMap13[2][0] == 9) {
newAchievement(5);
}
if (tempStat == [0, 0, 0, 0, 0, 0]) {
newAchievement(6);
}
map_general.gotoAndStop(map);
for (var v4 in objectMapAll) {
_root.map_general[objectMapAll[v4]].id = v4;
_root.bt_group[objectMapAll[v4]].id = v4;
_root.bt_group[objectMapAll[v4]]._alpha = 30;
_root.bt_group[objectMapAll[v4]].onRollOver = function () {
tampilDeskripsiNone(this);
};
_root.bt_group[objectMapAll[v4]].onRollOut = function () {
des.removeMovieClip();
};
_root.bt_group[objectMapAll[v4]].onRelease = function () {
soundFX('error');
};
}
for (var v3 in _root['objectMap' + map]) {
_root.bt_group[_root['objectMap' + map][v3][1]].j = v3;
_root.map_general[_root['objectMap' + map][v3][1]].j = v3;
_root.map_general[_root['objectMap' + map][v3][1]].isSetLevel = _root['objectMap' + map][v3][0];
if (_root.map_general[_root['objectMap' + map][v3][1]].isSetLevel > 0) {
_root.map_general[_root['objectMap' + map][v3][1]]._visible = true;
_root.bt_group[_root['objectMap' + map][v3][1]]._alpha = 30;
} else {
_root.map_general[_root['objectMap' + map][v3][1]]._visible = false;
_root.bt_group[_root['objectMap' + map][v3][1]]._alpha = 100;
_root.bt_group[_root['objectMap' + map][v3][1]].onRollOver = function () {
tampilDeskripsi(this);
};
_root.bt_group[_root['objectMap' + map][v3][1]].onRollOut = function () {
des.removeMovieClip();
};
_root.bt_group[_root['objectMap' + map][v3][1]].onRelease = buildSomething;
}
_root.map_general[_root['objectMap' + map][v3][1]].onRollOver = function () {
_root.tampilDeskripsiMap(this);
soundFX(desList[this.id][0]);
};
_root.map_general[_root['objectMap' + map][v3][1]].onRollOut = function () {
des.removeMovieClip();
};
_root.map_general[_root['objectMap' + map][v3][1]].onRelease = function () {
tampilMenuUpgrade(this);
des.removeMovieClip();
};
_root.map_general[_root['objectMap' + map][v3][1]].onEnterFrame = function () {
this.gotoAndStop(this.isSetLevel);
};
}
if (daftarMusuhSerang.length == 1) {
if (firstWar) {
tampilDialog(6);
firstWar = false;
}
} else {
if (daftarMusuhSerang.length > 1) {
firstWar = false;
}
}
if (!firstWar) {
if (flowerList.length == 1 && !tampilWarning) {
if (firstFlower) {
tampilDialog(7);
firstFlower = false;
}
} else {
if (flowerList.length > 1) {
firstFlower = false;
}
}
}
}
function findPath(who) {
var v4 = new Array();
var v5 = who.xPos + who.jarakTempuh;
var v6 = who.xPos - who.jarakTempuh;
var v2 = 0;
while (v2 <= who.jarakTempuh) {
var v1 = 0;
while (v1 <= v2) {
v4.push('map' + String(v6 + v2) + (who.yPos + v1));
v4.push('map' + String(v6 + v2) + (who.yPos - v1));
v4.push('map' + String(v5 - v2) + (who.yPos + v1));
v4.push('map' + String(v5 - v2) + (who.yPos - v1));
++v1;
}
++v2;
}
return v4;
}
function setTrap() {
var v2;
des.removeMovieClip();
for (var v3 in resourceList) {
if (resourceList[v3] - trapPrice[v3] >= 0) {
v2 = true;
} else {
soundFX('error');
v2 = false;
break;
}
}
if (v2) {
for (v3 in resourceList) {
resourceList[v3] -= trapPrice[v3];
}
soundFX('build');
trapEnable[this.i][0] = 1;
}
}
function tampilAlertPerang(isi) {
warNotification.hitung = 0;
warNotification.atasY = 535;
warNotification.bawahY = 610;
warNotification.des.text = isi;
warNotification.onEnterFrame = function () {
if (aktifTombol) {
this.atasY = resourceCollected.atasY - this._height;
this._y -= 2;
if (this._y <= this.atasY) {
this._y = this.atasY;
++this.hitung;
if (this.hitung >= 200) {
delete this.onEnterFrame;
this.onEnterFrame = function () {
this._y += 2;
if (this._y >= this.bawahY) {
delete this.onEnterFrame;
}
};
}
}
if (this.hitTest(_root.resourceCollected)) {
this._y -= 2;
}
}
};
}
function tampilSummaryResource() {
resourceCollected.gotoAndStop(bahasa + 1);
resourceCollected.hitung = 0;
resourceCollected.atasY = 515;
resourceCollected.bawahY = 600;
resourceCollected.onEnterFrame = function () {
var v3 = 1;
while (v3 <= 4) {
this['res' + v3].text = '+' + _root.resourceProduce[v3];
++v3;
}
if (aktifTombol) {
this._y -= 2;
if (this._y <= this.atasY) {
this._y = this.atasY;
++this.hitung;
if (this.hitung >= 200) {
delete this.onEnterFrame;
this.onEnterFrame = function () {
this._y += 2;
if (this._y >= this.bawahY) {
delete this.onEnterFrame;
}
};
}
}
}
};
}
function tampilAlertFlower(isi) {
flowerNotification.hitung = 0;
flowerNotification.atasY = 500;
flowerNotification.bawahY = 610;
flowerNotification.des.text = isi;
flowerNotification.onEnterFrame = function () {
if (aktifTombol) {
this._y -= 2;
if (this._y <= this.atasY) {
this._y = this.atasY;
++this.hitung;
if (this.hitung >= 150) {
delete this.onEnterFrame;
this.onEnterFrame = function () {
this._y += 2;
if (this._y >= this.bawahY) {
delete this.onEnterFrame;
}
};
}
}
if (this.hitTest(_root.resourceCollected)) {
this._y -= 2;
this.atasY = resourceCollected._y - this._height;
}
if (this.hitTest(_root.warNotification)) {
this._y -= 2;
this.atasY = warNotification._y - this._height;
}
}
};
}
function tampilSummaryBattle() {
aktifTombol = false;
tampilWarning = true;
_root.attachMovie('win_summary', 'warning', 1999);
warning._x = 300;
warning._y = 350;
warning._alpha = 0;
var v3 = 1;
while (v3 <= 5) {
warning['sum' + v3].text = battleSummary[v3];
++v3;
}
warning.onEnterFrame = function () {
efekFade(this);
};
warning.cancel_btn.onRelease = function () {
this._parent.removeMovieClip();
tampilWarning = false;
gantiPeta();
};
}
function tampilDesRes(isi) {
_root.attachMovie('description_map2', 'des', 999);
des._x = _xmouse;
des._y = _ymouse;
des._alpha = 0;
des.des.text = isi;
des.onEnterFrame = function () {
efekFade(this);
if (_xmouse > Stage.width / 2) {
des._x = _xmouse - des._width;
} else {
des._x = _xmouse;
}
if (_ymouse > Stage.height / 2) {
des._y = _ymouse - des._height;
} else {
des._y = _ymouse;
}
};
}
function tampilDesSerangan() {
_root.attachMovie('description_map3', 'des', 999);
des._x = _xmouse;
des._y = _ymouse;
des._alpha = 0;
des.des.text = typeBahasa[bahasa];
var v3 = 0;
for (var v4 in enemyLevDesList[Math.floor(days / 10)]) {
v3 += enemyLevDesList[Math.floor(days / 10)][v4][0];
des.des.text += '\n - ' + enemyLevDesList[Math.floor(days / 10)][v4][1];
}
des.des.text += totalEnemyBahasa[bahasa] + v3;
des.onEnterFrame = function () {
efekFade(this);
if (_xmouse > Stage.width / 2) {
des._x = _xmouse - des._width;
} else {
des._x = _xmouse;
}
if (_ymouse > Stage.height / 2) {
des._y = _ymouse - des._height;
} else {
des._y = _ymouse;
}
};
}
function sumArray(array) {
var v3 = 0;
var v1 = 0;
while (v1 < array.length) {
v3 += array[v1];
++v1;
}
return v3;
}
function tambahKata() {
aktifTombol = false;
++dialogBar.awalAmbil;
var v1 = dialogList[dialogBar.eventNomor][dialogBar.teksNomor][bahasa].substr(0, dialogBar.awalAmbil);
dialogBar.dialog.text = v1;
if (dialogBar.awalAmbil + 1 >= dialogList[dialogBar.eventNomor][dialogBar.teksNomor][bahasa].length) {
dialogBar.awalAmbil = dialogList[dialogBar.eventNomor][dialogBar.teksNomor][bahasa].length - 1;
}
des.removeMovieClip();
}
function tampilDialog(eventNomor) {
dialogBar.skip_btn._visible = false;
dialogBar.skip_btn.onRelease = function () {
tutorial.removeMovieClip();
dialogBar._visible = false;
skip_btn._visible = false;
gantiPeta();
delete dialogBar.onMouseDown;
clearInterval(dialogBar.tampil);
};
dialogBar._visible = true;
dialogBar.awalAmbil = 0;
dialogBar.teksNomor = 1;
dialogBar.eventNomor = eventNomor;
dialogBar.char.gotoAndStop(1);
dialogBar.tampil = setInterval(tambahKata, 15);
dialogBar.onMouseDown = function () {
_root.des.removeMovieClip();
++dialogBar.teksNomor;
dialogBar.awalAmbil = 0;
if (dialogBar.teksNomor >= dialogList[dialogBar.eventNomor].length) {
dialogBar._visible = false;
skip_btn._visible = false;
gantiPeta();
if (eventNomor == 1) {
tampilSummaryBattle();
}
delete dialogBar.onMouseDown;
clearInterval(dialogBar.tampil);
}
if (eventNomor == 0) {
dialogBar.skip_btn._visible = true;
dialogBar.skip_btn.gotoAndStop(_root.bahasa + 1);
_root.attachMovie('main_tutorial', 'tutorial', 10009);
tutorial.gotoAndStop(dialogBar.teksNomor);
}
if (eventNomor == 6) {
dialogBar.skip_btn._visible = true;
dialogBar.skip_btn.gotoAndStop(_root.bahasa + 1);
_root.attachMovie('main_tutorial3', 'tutorial', 10009);
tutorial.gotoAndStop(dialogBar.teksNomor);
}
if (eventNomor == 7) {
dialogBar.skip_btn._visible = true;
dialogBar.skip_btn.gotoAndStop(_root.bahasa + 1);
_root.attachMovie('main_tutorial4', 'tutorial', 10009);
tutorial.gotoAndStop(dialogBar.teksNomor);
}
};
}
stop();
soundBGM('bgm2');
_root.attachMovie('main_fadeout', 'fadeout', this.getNextHighestDepth());
var dayBahasa = ['day', 'jour', 'hari'];
dayTeks.text = dayBahasa[bahasa];
interface_teks.gotoAndStop(_root.bahasa + 1);
var aktifTombol = true;
var transaksi = 10000;
var trapSuccess = false;
var map = 13;
var posMap = new Array();
var i = 1;
while (i <= 5) {
posMap.push(i + '1');
posMap.push(i + '2');
posMap.push(i + '3');
posMap.push(i + '4');
posMap.push(i + '5');
++i;
}
if (statisticList[6] >= 5000) {
achievement[7] = 1;
}
var posibility = new Array(0, 1, 2, 3, 4);
var total = 15;
var banyak = total;
var panglimaMove = [true, true, true, true, true, true];
var customCursor = true;
var trap = new Array();
bikinMapBayangan();
var tempat1 = ['map45', 'map54', 'map55'];
var tempat2 = ['map11', 'map21', 'map12'];
var tempat3 = ['map14', 'map25', 'map15'];
var tempat4 = ['map41', 'map51', 'map52'];
var bungaTampilBahasa = ['The magic flower has been sighted, take the flower before it disappears!', 'Une fleur magique a été repérée, cueillez la fleur avant qu’elle ne disparaisse!', 'Terlihat kemunculan bunga ajaib, ambil sebelum menghilang!'];
var dapatBungaBahasa = ['Magical flower has been collected!\nStock potion: ', 'La fleur magique a été cueillie!\nConservez la potion: ', 'Berhasil mendapatkan bunga ajaib,\nBunga ajaib: '];
map_general.flower._visible = false;
var cantBahasa = ['Cannot build this object in this map', 'Impossible de construire ceci sur cette carte.', 'Tidak dapat dibangun di peta ini'];
var sellBahasa = ['Sell this building\nResource get:\n', 'Vendre ce bâtiment\nRessource collectée:\n', 'Jual bangunan ini\nSumber daya yang didapat:\n'];
var upgradeBahasa = ['Upgrade this building\nResource to upgrade:\n', 'Améliorer ce bâtiment\nRessources nécessaires:\n', 'Tingkatkan bangunan ini\nSumber daya yang dibutuhkan:\n'];
var multiplyBahasa = ['While pressing “shift†on keyboard, click the button to multiply', 'Garder la touche “shift†enfoncée, et cliquer pour multiplier.', 'Tahan tombol “shift†di keyboard sambil klik pada tombol jual/beli untuk kelipatan 5'];
var acceptBahasa = ['accept all progress', 'accepter tous les progrès', 'lakukan semua proses'];
var resourceBuyWeapon = [0, 0, 0, 0, 0];
var cancelBahasa = ['cancel all production', 'Annuler toutes les productions', 'gagalkan semua produksi'];
var produceAllBahasa = ['produce all production at the end of this turn', 'produire toute la production à la fin de ce tour', 'proses semua produksi di akhir turn ini'];
var resourceBuyArmy = [0, 0, 0, 0, 0];
var resourceWeaponBuy = [0, 0, 0, 0, 0];
var produce2Bahasa = ['produce all production', 'produire toute la production', 'hasilkan semua produksi'];
var gateID = [0, 3, 15, 23, 11];
var perangDi = 0;
var musuhID = 0;
cekPerang();
var pasukanMusuh = 0;
var perangBahasa = ['Our armies have contact with enemy, get ready to go to the battlefield!', 'Nos armées sont au contact de l’ennemi, préparez-vous au combat!', 'Pasukan kita bertemu dengan pasukan musuh, besiap untuk pertempuran!'];
trapBahasa = ['Our trap is working, some enemies are trapped!', 'Notre piège a fonctionné, plusieurs ennemis se sont faits prendre!', 'Perangkap berhasil, beberapa pasukan musuh terperangkap!'];
map_general.onEnterFrame = function () {
if (aktifTombol) {
this.kios_senjata.onRelease = function () {
tampilMenuSenjata(this);
des.removeMovieClip();
};
this.kios_hasilBumi.onRelease = function () {
tampilMenuResource(this);
des.removeMovieClip();
};
this.blacksmith.onRelease = function () {
tampilMenuBlacksmith(this);
des.removeMovieClip();
};
this.barrack.onRelease = function () {
tampilMenuBarrack(this);
des.removeMovieClip();
};
this.pusat_desa.onRelease = function () {
tampilMenuTowncenter(this);
des.removeMovieClip();
};
this.temple.onRelease = function () {
tampilMenuTemple(this);
des.removeMovieClip();
};
if (map - 5 > 0) {
this.atas.enabled = true;
this.atas._visible = 1;
this.atas.onRollOver = function () {
this.gotoAndStop(2);
};
this.atas.onRollOut = function () {
this.gotoAndStop(1);
};
this.atas.onRelease = function () {
map -= 5;
gantiPeta();
};
} else {
this.atas.enabled = false;
this.atas.gotoAndStop(1);
this.atas._visible = 0;
}
if (map + 5 <= 25) {
this.bawah.enabled = true;
this.bawah._visible = 1;
this.bawah.onRollOver = function () {
this.gotoAndStop(2);
};
this.bawah.onRollOut = function () {
this.gotoAndStop(1);
};
this.bawah.onRelease = function () {
map += 5;
gantiPeta();
};
} else {
this.bawah.enabled = false;
this.bawah.gotoAndStop(1);
this.bawah._visible = 0;
}
if (map % 5 != 0) {
this.kanan.enabled = true;
this.kanan._visible = 1;
this.kanan.onRollOver = function () {
this.gotoAndStop(2);
};
this.kanan.onRollOut = function () {
this.gotoAndStop(1);
};
this.kanan.onRelease = function () {
map += 1;
gantiPeta();
};
} else {
this.kanan.enabled = false;
this.kanan.gotoAndStop(1);
this.kanan._visible = 0;
}
if (map % 5 != 1) {
this.kiri.enabled = true;
this.kiri._visible = 1;
this.kiri.onRollOver = function () {
this.gotoAndStop(2);
};
this.kiri.onRollOut = function () {
this.gotoAndStop(1);
};
this.kiri.onRelease = function () {
map -= 1;
gantiPeta();
};
} else {
this.kiri.enabled = false;
this.kiri.gotoAndStop(1);
this.kiri._visible = 0;
}
} else {
this.atas._visible = false;
this.bawah._visible = false;
this.kanan._visible = false;
this.kiri._visible = false;
}
};
var minimapItem = new Array();
var p = 1;
while (p <= 11) {
var q = 1;
while (q <= 25) {
minimapItem.push(desList[p][0] + '_' + q);
++q;
}
++p;
}
minimap.onEnterFrame = function () {
var v3 = 1;
while (v3 <= 6) {
++minimap.countPanglima;
minimap.coordinate.attachMovie('icon_panglima', 'panglima' + v3, v3);
minimap.coordinate['panglima' + v3]._x = minimap.coordinate['map' + comLoc[v3]]._x;
minimap.coordinate['panglima' + v3]._y = minimap.coordinate['map' + comLoc[v3]]._y;
minimap.coordinate['panglima' + v3]._xscale = 70;
minimap.coordinate['panglima' + v3]._yscale = 60;
minimap.coordinate['panglima' + v3].gotoAndStop(v3);
bigMap.coordinate.attachMovie('icon_panglima', 'panglima' + v3, v3);
bigMap.coordinate['panglima' + v3]._x = bigMap.coordinate['map' + comLoc[v3]]._x;
bigMap.coordinate['panglima' + v3]._y = bigMap.coordinate['map' + comLoc[v3]]._y;
bigMap.coordinate['panglima' + v3]._xscale = 70;
bigMap.coordinate['panglima' + v3]._yscale = 60;
bigMap.coordinate['panglima' + v3].gotoAndStop(v3);
++v3;
}
var v2 = 1;
while (v2 <= 25) {
for (var v4 in _root['objectMap' + v2]) {
if (_root['objectMap' + v2][v4][0] != 0) {
bigMap[_root['objectMap' + v2][v4][1] + '_' + v2]._visible = 1;
bigMap[_root['objectMap' + v2][v4][1] + '_' + v2].gotoAndStop(_root['objectMap' + v2][v4][0]);
minimap[_root['objectMap' + v2][v4][1] + '_' + v2]._visible = 1;
minimap[_root['objectMap' + v2][v4][1] + '_' + v2].gotoAndStop(_root['objectMap' + v2][v4][0]);
} else {
bigMap[_root['objectMap' + v2][v4][1] + '_' + v2]._visible = 0;
minimap[_root['objectMap' + v2][v4][1] + '_' + v2]._visible = 0;
}
}
++v2;
}
};
minimap.onRelease = function () {
aktifTombol = false;
tampilBlur();
_root.attachMovie('main_minimap', 'bigMap', 1000);
bigMap._x = Stage.width / 2;
bigMap._y = Stage.height / 2;
bigMap._xscale = 90;
bigMap._yscale = 90;
bigMap._alpha = 0;
for (var i in daftarMusuhSerang) {
bigMap.coordinate.attachMovie('icon_musuh', 'enemyArmy' + i, 100 + Number(i));
bigMap.coordinate['enemyArmy' + i]._x = minimap.coordinate[daftarMusuhSerang[i]]._x;
bigMap.coordinate['enemyArmy' + i]._y = minimap.coordinate[daftarMusuhSerang[i]]._y;
bigMap.coordinate['enemyArmy' + i].dayLeft.text = minimap.coordinate[daftarMusuhSerang[i]].dayLeft.text;
if (minimap.coordinate[daftarMusuhSerang[i]]._x == undefined) {
bigMap.coordinate['enemyArmy' + i].removeMovieClip();
}
}
for (var v6 in flowerList) {
bigMap.coordinate.attachMovie('mc_flower', 'flower' + v6, 200 + Number(v6));
bigMap.coordinate['flower' + v6]._x = minimap.coordinate[flowerList[v6]]._x;
bigMap.coordinate['flower' + v6]._y = minimap.coordinate[flowerList[v6]]._y;
if (minimap.coordinate[flowerList[v6]]._x == undefined) {
bigMap.coordinate['flower' + v6].removeMovieClip();
}
}
var availableBahasa = ['Building Available: ', 'Contruction(s) disponible(s): ', 'Bangunan yang tersedia: '];
bigMap.onEnterFrame = function () {
efekFade(this);
var i = 1;
while (i <= 25) {
this['map' + i].i = i;
this['map' + i].onRollOver = function () {
bigMap.createEmptyMovieClip('teks_mc', this.getNextHighestDepth());
bigMap.teks_mc._x = -280;
bigMap.teks_mc._y = 300;
bigMap.teks_mc.createTextField('my_txt', 1, 0, 0, 500, 100);
bigMap.teks_mc.my_txt.multiline = true;
bigMap.teks_mc.my_txt.wordWrap = true;
bigMap.teks_mc.my_txt.selectable = false;
var v5 = new TextFormat();
v5.color = 16777215;
v5.font = 'Arial';
var v3 = new Array();
for (var v4 in _root['objectMap' + this.i]) {
v3.push(' ' + _root.desList[_root['objectMap' + this.i][v4][2]][4][bahasa]);
}
bigMap.teks_mc.my_txt.text = availableBahasa[bahasa] + v3;
bigMap.teks_mc.my_txt.setTextFormat(v5);
this._alpha = 100;
};
this['map' + i].onRollOut = function () {
this._alpha = 0;
};
this['map' + i].onRelease = function () {
aktifTombol = true;
_root.map = this.i;
_root.gantiPeta();
_root.bigMap.removeMovieClip();
};
++i;
}
this.cancel_btn.onRelease = function () {
aktifTombol = true;
gantiPeta();
_root.bigMap.removeMovieClip();
};
};
};
menu_btn.onRelease = function () {
tampilOption(1);
tampilBlur();
};
var colorType = [0, 16711680, 153, 26112, 10701705, 16777215, 16750899];
strategy_btn.onRelease = function () {
aktifTombol = false;
_root.attachMovie('main_strategy', 'main_strategy', 1000);
main_strategy._x = Stage.width / 2;
main_strategy._y = Stage.height / 2;
main_strategy._alpha = 0;
main_strategy.onEnterFrame = function () {
efekFade(this);
};
jarakMapX = main_strategy.peta.coordinate.map11._width;
jarakMapY = main_strategy.peta.coordinate.map11._height;
main_strategy.trap._visible = false;
main_strategy.panglimaAktif = 6;
main_strategy.nama.text = comInfo[main_strategy.panglimaAktif][0];
main_strategy.info_text.text = comInfo[main_strategy.panglimaAktif][1][bahasa];
main_strategy.sex.text = comInfo[main_strategy.panglimaAktif][2][bahasa];
main_strategy.age.text = comInfo[main_strategy.panglimaAktif][3];
main_strategy.infobunga._visible = false;
main_strategy.figure.gotoAndStop(main_strategy.panglimaAktif);
var p = 1;
while (p <= 6) {
main_strategy['panglima' + p].gotoAndStop(p);
main_strategy['panglima' + p].p = p;
main_strategy['panglima' + p].photo.gotoAndStop(2);
main_strategy['panglima' + main_strategy.panglimaAktif].photo.gotoAndStop(1);
main_strategy['panglima' + p].onRelease = function () {
main_strategy.peta._visible = true;
main_strategy.trap._visible = false;
if (!haveMove) {
main_strategy.execute_move.enabled = true;
}
this.xPos = Number((String(comLoc[this.p])).substr(0, 1));
this.yPos = Number((String(comLoc[this.p])).substr(1, 1));
this.jarakTempuh = comList[this.p][6];
var v4 = 1;
while (v4 <= 55) {
main_strategy.peta.coordinate['map' + v4].enabled = false;
++v4;
}
main_strategy.peta.createEmptyMovieClip('walkpath', main_strategy.peta.coordinate.getDepth() + 1);
if (panglimaMove[this.p]) {
for (v4 in findPath(this)) {
main_strategy.peta.coordinate[(findPath(this))[v4]].enabled = true;
main_strategy.peta.coordinate[(findPath(this))[v4]].onRelease = function () {
var v2 = Number((String(this._name)).substr(3, 2));
comLocBaru[main_strategy.panglimaAktif] = v2;
if (tutorial.firstPanglima) {
tutorial.gotoAndStop(3);
tutorial.firstPanglima = true;
} else {
tutorial.gotoAndStop(4);
}
};
main_strategy.peta.walkpath.attachMovie('mark2', (findPath(this))[v4], v4);
main_strategy.peta.walkpath[(findPath(this))[v4]]._x = main_strategy.peta.coordinate[(findPath(this))[v4]]._x;
main_strategy.peta.walkpath[(findPath(this))[v4]]._y = main_strategy.peta.coordinate[(findPath(this))[v4]]._y;
if (main_strategy.peta.walkpath[(findPath(this))[v4]]._x == undefined) {
main_strategy.peta.walkpath[(findPath(this))[v4]].removeMovieClip();
}
}
}
main_strategy['panglima' + main_strategy.panglimaAktif].photo.gotoAndStop(2);
main_strategy.panglimaAktif = this.p;
main_strategy['panglima' + this.p].photo.gotoAndStop(1);
main_strategy.nama.text = comInfo[this.p][0];
main_strategy.info_text.text = comInfo[this.p][1][bahasa];
main_strategy.sex.text = comInfo[this.p][2][bahasa];
main_strategy.age.text = comInfo[this.p][3];
main_strategy.figure.gotoAndStop(this.p);
if (this.p == 5) {
main_strategy.infobunga._visible = true;
main_strategy.infobunga.isi.text = _root.bunga;
} else {
main_strategy.infobunga._visible = false;
}
main_strategy.trapMode = false;
main_strategy.trap._visible = false;
main_strategy.trap_btn.gotoAndStop(1);
if (!haveMove) {
main_strategy.execute_move.enabled = true;
}
main_strategy.info_btn.enabled = true;
if (!haveMove) {
tutorial.gotoAndStop(2);
} else {
tutorial.gotoAndStop(9);
}
};
main_strategy.peta['panglima' + p].papan._visible = 0;
main_strategy.peta['panglima' + p]._x = main_strategy.peta.coordinate['map' + comLoc[p]]._x;
main_strategy.peta['panglima' + p]._y = main_strategy.peta.coordinate['map' + comLoc[p]]._y;
main_strategy.peta['panglima' + p].gotoAndStop(p);
main_strategy.peta['panglima' + p].p = p;
++p;
}
main_strategy.peta.onEnterFrame = function () {
main_strategy.peta.fokus._x = main_strategy.peta['panglima' + main_strategy.panglimaAktif]._x;
main_strategy.peta.fokus._y = main_strategy.peta['panglima' + main_strategy.panglimaAktif]._y;
var v2 = 1;
while (v2 <= 6) {
main_strategy.peta.createEmptyMovieClip('garis' + v2, v2);
main_strategy.peta['garis' + v2].lineStyle(3, _root.colorType[v2], 100);
main_strategy.peta['garis' + v2].moveTo(main_strategy.peta['panglima' + v2]._x, main_strategy.peta['panglima' + v2]._y);
main_strategy.peta['garis' + v2].lineTo(main_strategy.peta.coordinate['map' + comLocBaru[v2]]._x, main_strategy.peta.coordinate['map' + comLocBaru[v2]]._y);
if (!main_strategy.trapMode) {
main_strategy.peta['garis' + v2]._visible = true;
main_strategy.peta['panglima' + v2]._visible = true;
} else {
main_strategy.peta['garis' + v2]._visible = false;
main_strategy.peta['panglima' + v2]._visible = false;
}
++v2;
}
main_strategy.peta['garis' + main_strategy.panglimaAktif].swapDepths(99);
};
main_strategy.execute_move.onRelease = function () {
haveMove = true;
this.gotoAndStop(2);
this.enabled = false;
main_strategy.peta.createEmptyMovieClip('walkpath', this.getNextHighestDepth());
var p = 1;
while (p <= 6) {
panglimaMove[p] = false;
main_strategy['disX' + p] = main_strategy.peta.coordinate['map' + comLocBaru[p]]._x - main_strategy.peta['panglima' + p]._x;
main_strategy['disY' + p] = main_strategy.peta.coordinate['map' + comLocBaru[p]]._y - main_strategy.peta['panglima' + p]._y;
main_strategy.peta['panglima' + p].p = p;
main_strategy.peta['panglima' + p].onEnterFrame = function () {
if (Math.abs(main_strategy.peta.coordinate['map' + comLocBaru[this.p]]._x - this._x) + Math.abs(main_strategy.peta.coordinate['map' + comLocBaru[this.p]]._y - this._y) > 5) {
this.moving = true;
main_strategy.execute_move.enabled = false;
main_strategy.set_trap.enabled = false;
main_strategy.close_btn.enabled = false;
this._x += 4 * Math.cos(Math.atan2(main_strategy['disY' + this.p], main_strategy['disX' + this.p]));
this._y += 4 * Math.sin(Math.atan2(main_strategy['disY' + this.p], main_strategy['disX' + this.p]));
} else {
this.moving = false;
if (!haveMove) {
main_strategy.execute_move.enabled = true;
}
main_strategy.set_trap.enabled = true;
main_strategy.close_btn.enabled = true;
this._x = main_strategy.peta.coordinate['map' + comLocBaru[this.p]]._x;
this._y = main_strategy.peta.coordinate['map' + comLocBaru[this.p]]._y;
delete this.onEnterFrame;
}
};
++p;
}
for (isi in comLocBaru) {
comLoc[isi] = comLocBaru[isi];
}
var v2 = 1;
while (v2 <= 55) {
main_strategy.peta.coordinate['map' + v2].enabled = false;
++v2;
}
tutorial.gotoAndStop(5);
};
if (!haveMove) {
main_strategy.execute_move.enabled = true;
main_strategy.execute_move.gotoAndStop(1);
} else {
main_strategy.execute_move.enabled = false;
main_strategy.execute_move.gotoAndStop(2);
}
main_strategy.trap_btn.stop();
main_strategy.trap_btn.onRelease = function () {
main_strategy.trap._visible = true;
if (!main_strategy.trapMode) {
for (var v2 in trapEnable) {
main_strategy.trap.coordinate.attachMovie('trap', 'trap' + v2, 100 + v2);
main_strategy.trap.coordinate['trap' + v2]._x = main_strategy.trap.coordinate['map' + trapEnable[v2][1]]._x;
main_strategy.trap.coordinate['trap' + v2]._y = main_strategy.trap.coordinate['map' + trapEnable[v2][1]]._y;
main_strategy.trap.coordinate['trap' + v2].i = v2;
main_strategy.trap.coordinate['trap' + v2].onRelease = setTrap;
main_strategy.trap.coordinate['trap' + v2].onEnterFrame = function () {
this.gotoAndStop(trapEnable[this.i][0] + 1);
};
}
main_strategy.trapMode = true;
main_strategy.trap_btn.gotoAndStop(2);
main_strategy.execute_move.enabled = false;
main_strategy.info_btn.enabled = false;
tutorial.gotoAndStop(6);
} else {
main_strategy.trapMode = false;
main_strategy.trap._visible = false;
main_strategy.trap_btn.gotoAndStop(1);
if (!haveMove) {
main_strategy.execute_move.enabled = true;
}
main_strategy.info_btn.enabled = true;
tutorial.gotoAndStop(8);
}
};
main_strategy.info_btn.onRelease = function () {
main_strategy.peta._visible = false;
main_strategy.trap._visible = false;
tutorial.gotoAndStop(7);
};
main_strategy.close_btn.onRelease = function () {
aktifTombol = true;
gantiPeta();
tutorial.removeMovieClip();
main_strategy.removeMovieClip();
};
if (firstStrategy) {
_root.attachMovie('main_tutorial_str', 'tutorial', 10009);
tutorial.stop();
tutorial.onEnterFrame = function () {
this.cancel_btn.onRelease = function () {
tutorial.gotoAndStop(9);
};
};
tutorial.firstPanglima = false;
firstStrategy = false;
}
};
endturn_btn.onRelease = function () {
if (days + 1 >= 76) {
_root.gotoAndStop('end');
} else {
aktifTombol = false;
tampilBlur();
_root.attachMovie('menu_confirm', 'confirm', 1000);
confirm._x = Stage.width / 2;
confirm._y = Stage.height / 2;
confirm.gotoAndStop(Number(bahasa) + 1);
confirm._alpha = 0;
confirm.onEnterFrame = function () {
efekFade(this);
};
confirm.yes_btn.onRelease = function () {
if (!challenge1) {
if (days + 1 >= 15 && days < 30) {
_root.scoreHTTPSender('FL091017', 'CH001');
challenge1 = true;
}
}
if (!challenge2) {
if (days + 1 >= 30 && days < 50) {
_root.scoreHTTPSender('FL091017', 'CH002');
challenge2 = true;
}
}
if (!challenge3) {
if (days + 1 >= 50 && days < 75) {
_root.scoreHTTPSender('FL091017', 'CH003');
challenge3 = true;
}
}
if (!challenge4) {
if (days + 1 >= 75) {
_root.scoreHTTPSender('FL091017', 'CH004');
challenge4 = true;
}
}
++days;
if (days >= 10) {
newMedals(5);
} else {
if (days >= 25) {
newMedals(4);
} else {
if (days >= 40) {
newMedals(3);
} else {
if (days >= 50) {
newMedals(2);
} else {
if (days >= 75) {
newMedals(1);
}
}
}
}
}
haveMove = false;
if (!tampilWarning) {
if (daftarMusuhSerang.length > 0) {
var v3 = 1;
while (v3 <= Math.ceil(days / 25)) {
tampilBunga(_root['tempat' + v3]);
++v3;
}
}
}
resetBunga();
transaksi = 100;
_root.attachMovie('day_tween', 'day_tween', this.getNextHighestDepth());
day_tween.text_mc.hari.text = days;
resourceBuyWeapon = [0, 0, 0, 0, 0];
resourceBuyArmy = [0, 0, 0, 0, 0];
panglimaMove = [true, true, true, true, true, true];
resourceProduce = [0, 0, 0, 0, 0];
v3 = 1;
while (v3 <= 25) {
for (var v4 in _root['objectMap' + v3]) {
for (var v5 in desList[_root['objectMap' + v3][v4][2]][2]) {
resourceProduce[v5] += desList[_root['objectMap' + v3][v4][2]][2][v5] * _root['objectMap' + v3][v4][0];
}
}
++v3;
}
resourceProduce[1] += Math.round((resourceProduce[1] / 50) * townEcoStat[2]);
resourceProduce[2] += Math.round((resourceProduce[2] / 10) * townEcoStat[3]);
resourceProduce[3] += Math.round((resourceProduce[3] / 10) * townEcoStat[4]);
if (population + sumArray(armyProduce) < populationMax) {
for (v5 in armyList) {
armyList[v5] += armyProduce[v5];
}
} else {
tampilDialog(3);
}
for (v5 in weaponList) {
weaponList[v5] += weaponProduce[v5];
}
for (v5 in resourceList) {
if (townSpeStat[4] > 0) {
resourceProduce[v5] += 100;
}
resourceList[v5] += resourceProduce[v5];
}
var v6 = 10000;
if (resourceList[1] >= v6) {
newAchievement(8);
}
if (resourceList[2] >= v6) {
newAchievement(9);
}
if (resourceList[3] >= v6) {
newAchievement(10);
}
if (resourceList[4] >= v6) {
newAchievement(11);
}
if (!challenge9) {
if (resourceList[2] >= 8000) {
_root.scoreHTTPSender('FL091017', 'CH009');
challenge9 = true;
}
}
if (!challenge10) {
if (resourceList[4] >= 8000) {
_root.scoreHTTPSender('FL091017', 'CH010');
challenge10 = true;
}
}
if (!challenge11) {
if (resourceList[3] >= 8000) {
_root.scoreHTTPSender('FL091017', 'CH011');
challenge11 = true;
}
}
if (!challenge12) {
if (resourceList[1] >= 8000) {
_root.scoreHTTPSender('FL091017', 'CH012');
challenge12 = true;
}
}
if (!challenge15) {
if (weaponList[1] >= 150) {
_root.scoreHTTPSender('FL091017', 'CH015');
challenge15 = true;
}
}
if (!challenge16) {
if (armyList[4] >= 100) {
_root.scoreHTTPSender('FL091017', 'CH016');
challenge16 = true;
}
}
for (v5 in armyProduce) {
armyProduce[v5] = 0;
weaponProduce[v5] = 0;
}
tampilSummaryResource();
cekMusuh();
blur.removeMovieClip();
aktifTombol = false;
trace('end of day :' + (days - 1));
trace('===============');
confirm.removeMovieClip();
};
confirm.no_btn.onRelease = function () {
aktifTombol = true;
gantiPeta();
confirm.removeMovieClip();
};
}
};
var pasList = [0, ['Swordman', 'Fantassin', 'Pasukan Pedang'], ['Bowman', 'Archer', 'Pemanah'], ['Spearman', 'Lancier', 'Pasukan Tombak'], ['Gunman', 'Tireur', 'Penembak'], ['Spellcaster', 'Sorcier', 'Penyihir']];
var resList = [0, ['Gold', 'Or', 'Emas'], ['Food', 'Nourriture', 'Makanan'], ['Iron', 'Fer', 'Besi'], ['Wood', 'Bois', 'Kayu'], ['Population', 'Population', 'Populasi']];
var weList = [0, ['Sword', 'épée', 'Pedang'], ['Bow', 'arc', 'Busur panah'], ['Spear', 'lance', 'Tombak'], ['Gun', 'Fusil', 'Senapan'], ['Staff', 'Bâton', 'Tongkat Sihir']];
var typeBahasa = ['ENEMY TYPE', 'ENNEMI DE TYPE', 'TIPE MUSUH'];
var totalEnemyBahasa = ['\nTOTAL ENEMY: ', '\\OTAL ENEMY: ', '\nTOTAL MUSUH: '];
main_resources.onEnterFrame = function () {
this.tulisan.gotoAndStop(_root.bahasa + 1);
_root.day_text.text = days;
this.gold.text = Math.round(resourceList[1]);
this.food.text = Math.round(resourceList[2]);
this.iron.text = Math.round(resourceList[3]);
this.wood.text = Math.round(resourceList[4]);
this.population.text = population + '/' + populationMax;
this.sword.text = weaponList[1];
this.bow.text = weaponList[2];
this.spear.text = weaponList[3];
this.gun.text = weaponList[4];
this.staff.text = weaponList[5];
this.swordman.text = armyList[1];
this.horsearcher.text = armyList[2];
this.spearman.text = armyList[3];
this.gunman.text = armyList[4];
this.magician.text = armyList[5];
var i = 1;
while (i <= 5) {
this['res' + i].i = i;
this['res' + i].onRollOver = function () {
tampilDesRes(resList[this.i][bahasa]);
};
this['res' + i].onRollOut = function () {
des.removeMovieClip();
};
this['pas' + i].i = i;
this['pas' + i].onRollOver = function () {
tampilDesRes(pasList[this.i][bahasa]);
};
this['pas' + i].onRollOut = function () {
des.removeMovieClip();
};
this['we' + i].i = i;
this['we' + i].onRollOver = function () {
tampilDesRes(weList[this.i][bahasa]);
};
this['we' + i].onRollOut = function () {
des.removeMovieClip();
};
++i;
}
this.resource.onRelease = function () {
main_resources.gotoAndStop(1);
this.enabled = false;
this.gotoAndStop(2);
};
this.weapon.onRelease = function () {
main_resources.gotoAndStop(2);
this.enabled = false;
this.gotoAndStop(2);
};
this.army.onRelease = function () {
main_resources.gotoAndStop(3);
this.enabled = false;
this.gotoAndStop(2);
};
};
_root.onEnterFrame = function () {
for (var v4 in objectMapAll) {
if (!aktifTombol) {
_root.map_general[objectMapAll[v4]].enabled = false;
_root.bt_group[objectMapAll[v4]].enabled = false;
_root.minimap.enabled = false;
_root.endturn_btn.enabled = false;
_root.menu_btn.enabled = false;
_root.strategy_btn.enabled = false;
} else {
_root.map_general[objectMapAll[v4]].enabled = true;
_root.bt_group[objectMapAll[v4]].enabled = true;
_root.minimap.enabled = true;
_root.endturn_btn.enabled = true;
_root.menu_btn.enabled = true;
_root.strategy_btn.enabled = true;
}
}
populationMax = 0;
var v2 = 1;
while (v2 <= 25) {
for (var v3 in _root['objectMap' + v2]) {
if (desList[_root['objectMap' + v2][v3][2]][5] != undefined) {
populationMax += desList[_root['objectMap' + v2][v3][2]][5] * _root['objectMap' + v2][v3][0];
}
}
++v2;
}
population = sumArray(armyList);
};
var dialogList = new Array();
dialogList[0] = [0, ['Welcome to The Last Village. I am Aiyanna, I will guide you through this game.', 'Bienvenue au Dernier Village. Je m’appelle Aiyanna, je vais vous guider dans ce jeu.', 'Selamat datang di The Last Village'], ['In this game, you will defend your village from enemy invasion.', 'Dans ce jeu, vous allez défendre votre village face à une invasion ennemie.', 'di game ini, kamu harus berusaha mempertahankan desa kamu dari serangan musuh'], ['You can train 5 different armies to help you protect the village. Each army is led by a commander who has a special ability.', 'Vous pouvez entraîner 5 armées différentes pour vous aider à protéger le village. Chaque armée est menée par un chef qui a une capacité spéciale.', 'kamu dapat melatih 5 jenis pasukan berbeda untuk membantu kamu mempertahankan desa, setiap pasukan dipimpin oleh seorang panglima'], ['At the top left corner you can see how many days you have kept the village unharmed. Every time you end your round, the number will increase by one.', 'Dans le coin en haut à gauche vous pouvez voir le nombre de jours durant lequel vous avez protégé le village. A chaque fin de tour, ce nombre augmente de 1.', 'di pojok kiri atas kamu dapat melihat penghitung hari selama permainan kamu, tiap kali kamu mengakhiri putaran, maka angka disitu akan bertambah banyak'], ['At the top center you can see your resources statistics, which consists of gold, food, iron, wood, and the population of your village. Do not forget to keep your resources stocked.', 'En haut au centre vous pouvez voir les statistiques de vos ressources : or, nourriture, fer, bois, et population de votre village. N’oubliez pas de stocker des ressources.', 'di bagian atas tengah kamu dapat melihat statistik sumber daya kamu, yang terdiri dari emas, makanan, besi, kayu, dan jumlah populasi, jangan lupa untuk selalu menjaga stock sumber daya kamu'], ['At the right you can switch to other statistics of your weapons as well as troop count.', 'A droite vous pouvez cliquer pour afficher d’autres statistiques concernant vos armes ou vos troupes.', 'di bagian kanannya kamu dapat melihat statistik lainnya yaitu jumlah senjata, dan juga jumlah pasukan kamu'], ['At the top right is one of the most important parts of this game, the MiniMap.', 'En haut à droite on trouve un des plus importants éléments du jeu : la mini-carte.', 'di bagian kanan atas adalah salah satu bagian terpenting dalam game ini, yaitu minimap'], ['From here you can see the position of each commander and his troops, the enemy\'s attack direction, and the condition of buildings in your village.', 'Vous pouvez y voir la position de chaque chef et de ses troupes, la localisation des attaques ennemies, et l’état des bâtiments de votre village.', 'di minimap kamu dapat melihat posisi panglima beserta pasukannya, arah serangan musuh, dan juga kondisi bangunan desa kamu'], ['On the right is a list of buildings that can help you set up your defense.', 'Sur la droite, une liste des bâtiments qui vous aideront à organiser votre défense.', 'di panel sebelah kanan adalah daftar bangunan yang bisa kamu bangun untuk membantu pertahanan desa kamu'], ['You cannot build in just any place. If you are on the right spot, the icon in the panel will light up. That means you can build the object in that map.', 'Vous ne pouvez pas construire n’importe quel bâtiment à n’importe quel endroit. Sur un secteur donné, les bâtiments que vous pouvez construire sont ceux dont les icônes sont allumées', 'tidak semua bangunan bisa dibangun di sembarang tempat, jika kamu sudah berada di area yang tepat, ikon di panel tersebut akan menyala, itu artinya kamu bisa membangun bangunan tersebut di area itu'], ['Remember, every building\'s essential function is to help defend the village. Mouse over the building to find out its function.', 'N’oubliez pas, la principale fonction de chaque bâtiment est de contribuer à la protection du village. Placez le pointeur de la souris sur un bâtiment pour connaître sa fonction exacte.', 'Ingat, setiap bangunan mempunyai masing-masing fungsi yang sangat penting untuk membantu kamu mempertahankan desa ini, untuk mengetahui kegunaan bangunan itu kamu bisa menggerakkan kursor pada bangunan tersebut'], ['Some buildings can be upgraded to increase productivity. This affects the quality of these buildings\' ability to defend the village.', 'Certains bâtiments peuvent être améliorés pour augmenter leur efficacité. Cela permet d’accroître leur capacité à défendre le village.', 'Beberapa bangunan juga bisa dikembangkan untuk meningkatkan produktifitasnya dan dapat mempengaruhi kualitas bangunan tersebut'], ['I guess that\'s all for now. Please try all the features, and defend our village as best you can.', 'Je crois que c’est tout pour l’instant. Vous pouvez essayer toutes les fonctions du jeu, et faire de votre mieux pour défendre notre village.', 'Mungkin itu saja yang perlu saya jelaskan untuk saat ini, pasti akan lebih cepat jika anda belajar dengan mencoba sendiri dan bereksperimen dengan fitur-fitur yang ada'], ['Good luck, hope to see you again ..', 'Bonne chance, j’espère vous revoir bientôt...', 'Saya akan menemuimu lagi nanti, semoga sukses..']];
dialogList[1] = [0, ['Welcome back soldier..', 'Bon retour parmi nous, soldat...', 'Selamat datang kembali..'], ['We have received some information about our last battle', 'Nous avons reçu quelques informations sur ta dernière bataille.', 'Kami telah menerima laporan pertempuran terakhir']];
dialogList[2] = [0, ['Watch out!! Our scout has detected some movement from the enemy’s army!', 'Attention ! Notre éclaireur a détecté un mouvement de l’armée ennemie !', 'Awas!! Mata-mata kita telah mendeteksi pergerakan dari musuh'], ['Prepare to defend our village, and be careful!', 'Préparez-vous à défendre le village, et soyez prudent !', 'Persiapkan pasikan kita dan berhati hati lah']];
dialogList[3] = [0, ['Not enough population for barracks production.', 'Pas assez de population pour le fonctionnement des casernes.', 'Tidak cukup populasi untuk produksi di barak'], ['Set up or upgrade more tents to support more population', 'Installez plus de tentes ou améliorez-les pour permettre une augmentation de la population.', 'Bangun atau upgrade tenda lagi untuk mensuport populasi']];
dialogList[4] = [0, ['Not enough resources', 'Pas assez de ressources', 'sumber daya tidak mencukupi']];
dialogList[5] = [0, ['This building has reached its maximum level', 'Ce bâtiment a atteint son niveau maximal', 'Bangunan ini telah mencapai level maksimal']];
dialogList[6] = [0, ['You are under attack for the first time!', 'Vous êtes attaqué pour la première fois !', 'Ini adalah pertama kali kamu diserang oleh pasukan musuh!!'], ['At the lower left corner, there is a notification to bookmark attacks every time our spies see the enemy coming.', 'Dans le coin en bas à gauche, une note apparaîtra pour vous avertir chaque fois que nos espions verront l’ennemi arriver.', 'Perhatikan pada pojok kiri bawah, disitu ada notifikasi untuk penanda serangan setiap kali mata-mata kita melihat datangnya musuh'], ['To prevent enemy forces from attacking the village center, you must move the commander and his troops to blockade the movements of the enemy.', 'Pour empêcher l’ennemi d’attaquer le centre du village, vous devez déplacer le chef et ses troupes pour bloquer les mouvements adverses.', 'Untuk mencegah pasukan musuh menyerang pusat desa, kamu harus menggerakkan panglima beserta pasukannya untuk memblokir pergerakan musuh'], ['Use at least 2 commanders and their troops to stop the enemy attack, because each troop has its own commander.', 'Utilisez au moins 2 chefs avec leur troupes pour arrêter l’attaque ennemie, car chaque unité a son propre chef.', 'Gunakan paling tidak 2 panglima beserta pasukannya untuk menghentikan serangan musuh, karena setiap pasukan diwakili oleh panglima masing2'], ['You can move the commanders and troops using the menu at the right, but the chief Wambeeska cannot leave the village center.', 'Vous pouvez déplacer les chefs et leurs troupes en utilisant le menu à droite, mais le chef Wambleeska ne peut pas quitter le centre du village.', 'Kamu dapat menggerakkan panglima dan pasukannya di menu strategy di panel bagian kanan, tapi Wambeeska sang kepala suku tidak dapat meninggalkan pusat desa'], ['Remember, sending more commanders and their troops to the war gives you more chances to win!', 'Rappelez-vous : plus vous envoyez de chefs et de troupes au combat, plus vous augmentez vos chances de gagner la bataille !', 'Ingat, semakin banyak panglima beserta pasukan yang kamu kirim untuk berperang, akan semakin besar kemungkinan untuk menang!']];
dialogList[7] = [0, ['Look!! There is a magical flower in this village!', 'Regardez ! Il y a une fleur magique dans ce village !', 'Lihat!! muncul bunga ajaib di desa ini!'], ['It is for making potions that strengthen our troops to resist the enemy attacks.', 'Elle sera utile pour fabriquer des potions qui amélioreront la résistance de vos troupes face à l’ennemi.', 'Bunga ajaib dapat digunakan untuk membuat ramuan obat yang menjadikan pasukan kita menjadi sangat kuat untuk melawan serangan pasukan musuh'], ['Unfortunately this flower is very rare and hard to find. If we are not careful enough, the flower will disappear and we will have to wait for it to appear again.', 'Malheureusement cette fleur est très rare et difficile à trouver. Si nous ne prenons pas assez de précautions, la fleur disparaîtra et nous devrons attendre qu’elle réapparaisse.', 'Namun sayangnya bunga ini sangat langka dan susah dicari, jika tidak hati2 maka bunga ini akan menghilang dan harus menunggu kemunculannya lagi'], ['Only the wizard Kachada can pick the flowers and make potions to strengthen the army.', 'Seul le sorcier Kachada peut cueillir la fleur et fabriquer la potion pour renforcer notre armée.', 'Oleh karena itu hanya KACHADA sang penyihir yang bisa mengambil bunga itu dan menjadikannya ramuan untuk memperkuat pasukan'], ['Once you get the magic potion, use it carefully. The effect only applies to one battle', 'Quand vous aurez la potion magique, utilisez-la à bon escient. Elle n’aura d’effet que sur une bataille.', 'Sekali kamu mendapatkan ramuan ajaibnya, gunakan dengan hati2, karena efek ramuan itu hanya berlaku untuk satu kali pertempuran'], ['Flowers appear for only 1 day, then they disappear. Move Kachada to take the flower through the strategy menu on the side panel', 'Chaque fleur n’apparaît que pendant une journée, et disparaît ensuite. Déplacez Kachada pour cueillir la fleur à l’aide du menu “Stratégie†sur la droite de l’écran.', 'Bunga itu hanya muncul 1 hari sebelum hilang lagi, gerakkan KACHADA untuk mengambil bunga tersebut melalui strategy menu di panel samping']];
dialogList[8] = [0, ['you have excedeed the limit of transaction for today', 'Vous avez dépassé le nombre de transactions maximum pour la journée', 'Kamu telah melebihi batas transaksi hari ini'], ['please end this turn to do the transaction again', 'Mettez fin à ce tour pour pouvoir effectuer de nouvelles transactions', 'Silakan akhiri turn ini untuk melakukan transaksi lagi']];
saveData();
for (var m in armyList) {
if (armyList[m] < 0) {
armyList[m] = 0;
}
}
dialogBar._visible = false;
if (days == 1) {
tampilDialog(0);
} else {
if (!tampilWarning) {
if (habisPerang) {
tampilDialog(1);
habisPerang = false;
} else {
dialogBar._visible = false;
aktifTombol = true;
}
}
}
keyListener = new Object();
keyListener.onKeyDown = function () {
des.removeMovieClip();
if (aktifTombol) {
if (map - 5 > 0) {
if (Key.isDown(38)) {
map -= 5;
gantiPeta();
}
}
if (map + 5 <= 25) {
if (Key.isDown(40)) {
map += 5;
gantiPeta();
}
}
if (map % 5 != 0) {
if (Key.isDown(39)) {
map += 1;
gantiPeta();
}
}
if (map % 5 != 1) {
if (Key.isDown(37)) {
map -= 1;
gantiPeta();
}
}
}
};
Key.addListener(keyListener);
gantiPeta();
}
movieClip 3263 {
}
movieClip 3267 {
}
movieClip 3269 {
}
movieClip 3271 {
}
movieClip 3299 {
}
movieClip 3360 {
frame 1 {
stop();
}
}
movieClip 3384 {
}
movieClip 3407 {
frame 1 {
stop();
}
}
movieClip 3412 {
}
movieClip 3416 {
}
frame 10 {
function heal(who) {
if (!who.isHealed) {
who.attachMovie('mc_heal', 'heal', this.getNextHighestDepth());
who.heal.timer = 100;
who.heal._alpha = 0;
who.heal.cacheAsBitmap = true;
who.heal.onEnterFrame = function () {
if (who.life < who.lifeAwal) {
who.life += who.lifeAwal / 50;
}
--this.timer;
if (this.timer <= 0) {
this.timer = 0;
this._alpha -= 2;
if (this._alpha <= 0) {
who.isHealed = false;
isSpecial = false;
this.removeMovieClip();
}
} else {
efekFade(this);
}
};
who.isHealed = true;
}
}
function healingSpring() {
for (index in battle_mc.swordmanList) {
heal(battle_mc[battle_mc.swordmanList[index]]);
}
for (index in battle_mc.spearmanList) {
heal(battle_mc[battle_mc.spearmanList[index]]);
}
for (index in battle_mc.horsearcherList) {
heal(battle_mc[battle_mc.horsearcherList[index]]);
}
for (index in battle_mc.gunmanList) {
heal(battle_mc[battle_mc.gunmanList[index]]);
}
for (index in battle_mc.magicianList) {
heal(battle_mc[battle_mc.magicianList[index]]);
}
}
function rage(who) {
if (!who.isRage) {
who.att *= 5;
who.spd *= 1.5;
who.attachMovie('mc_rage', 'rage', this.getNextHighestDepth());
who.rage.timer = 500;
who.rage._alpha = 0;
who.rage.cacheAsBitmap = true;
who.rage.onEnterFrame = function () {
--this.timer;
if (this.timer <= 0) {
this.timer = 0;
this._alpha -= 2;
if (this._alpha <= 0) {
who.isRage = false;
who.att /= 5;
who.spd /= 1.5;
isSpecial = false;
this.removeMovieClip();
}
} else {
efekFade(this);
}
};
who.isRage = true;
}
}
function rageStorm() {
for (index in battle_mc.swordmanList) {
rage(battle_mc[battle_mc.swordmanList[index]]);
}
for (index in battle_mc.spearmanList) {
rage(battle_mc[battle_mc.spearmanList[index]]);
}
for (index in battle_mc.horsearcherList) {
rage(battle_mc[battle_mc.horsearcherList[index]]);
}
for (index in battle_mc.gunmanList) {
rage(battle_mc[battle_mc.gunmanList[index]]);
}
for (index in battle_mc.magicianList) {
rage(battle_mc[battle_mc.magicianList[index]]);
}
}
function earthQuake() {
special = true;
battle_mcAwalY = battle_mc._y;
battlebg_mcAwalX = battlebg_mc._x;
semak_mcAwalX = semak_mc._x;
battle_mc.createEmptyMovieClip('gempa', this.getNextHighestDepth());
battle_mc.gempa.onEnterFrame = function () {
if (this.count == undefined) {
this.count = 0;
}
++this.count;
if (this.count % 2 == 1) {
battle_mc._y += -5 + random(11);
battlebg_mc._x += -3 + random(7);
semak_mc._x += -6 + random(14);
} else {
battle_mc._y = battle_mcAwalY;
battlebg_mc._x = battlebg_mcAwalX;
semak_mc._x = semak_mcAwalX;
}
for (index in battle_mc.enemyObjList) {
if (battle_mc[battle_mc.enemyObjList[index]].life - 0.2 > 0) {
battle_mc[battle_mc.enemyObjList[index]].life -= 0.2;
} else {
battle_mc[battle_mc.enemyObjList[index]].v = 0;
battle_mc[battle_mc.enemyObjList[index]].gotoAndStop('dead');
}
}
if (this.count >= 200) {
battle_mc._y = battle_mcAwalY;
battlebg_mc._x = battlebg_mcAwalX;
semak_mc._x = semak_mcAwalX;
delete battle_mc.gempa.onEnterFrame;
isSpecial = false;
battle_mc.gempa.removeMovieClip();
this.count = 0;
special = false;
}
};
}
function rainArrow() {
battle_mc.createEmptyMovieClip('rainArrow', this.getNextHighestDepth());
battle_mc.rainArrow.onEnterFrame = function () {
if (!isPaused) {
if (count == undefined) {
count = 0;
}
++count;
arrowIndexName = 'arrowIndex' + count;
battle_mc.attachMovie('mc_arrow2', arrowIndexName, count + 3000);
battle_mc[arrowIndexName]._x = -400 + random(battle_mc._width);
battle_mc[arrowIndexName]._y = 0;
battle_mc[arrowIndexName]._rotation = 45;
battle_mc[arrowIndexName].spd = 45;
battle_mc[arrowIndexName].att = 25;
battle_mc[arrowIndexName].batasY = 380 + random(50);
battle_mc[arrowIndexName].onEnterFrame = function () {
if (!isPaused) {
this._y += this.spd;
this._x += this.spd;
for (index in battle_mc.enemyObjList) {
if (this.hitTest(battle_mc[battle_mc.enemyObjList[index]].area)) {
this.damage = this.att - battle_mc[battle_mc.enemyObjList[index]].def;
bloodEffect(battle_mc[battle_mc.enemyObjList[index]]);
if (battle_mc[battle_mc.enemyObjList[index]].life - this.damage > 0) {
if (this.att > 0) {
battle_mc[battle_mc.enemyObjList[index]].life -= this.damage;
} else {
battle_mc[battle_mc.enemyObjList[index]].life -= 1;
}
} else {
battle_mc[battle_mc.enemyObjList[index]].v = 0;
battle_mc[battle_mc.enemyObjList[index]].gotoAndStop('dead');
delete battle_mc[battle_mc.enemyObjList[index]].onEnterFrame;
}
this.removeMovieClip();
}
}
if (this._y > this.batasY) {
this.gotoAndStop(2);
delete this.onEnterFrame;
this.hapus = setInterval(hapusObject, 1000, this);
}
}
};
if (count >= 300) {
delete battle_mc.rainArrow.onEnterFrame;
isSpecial = false;
battle_mc.rainArrow.removeMovieClip();
count = 0;
}
}
};
}
function explosionEffect(who) {
soundFX('gun3');
who.attachMovie('mc_explosion', 'explosion', this.getNextHighestDepth());
who.explosion._y = -(who._height / 2);
}
function explodingFrenzy() {
for (index in battle_mc.enemyObjList) {
explosionEffect(battle_mc[battle_mc.enemyObjList[index]]);
battle_mc[battle_mc.enemyObjList[index]].life -= 100;
if (battle_mc[battle_mc.enemyObjList[index]].life > 0) {
battle_mc[battle_mc.enemyObjList[index]].life -= 20;
} else {
battle_mc[battle_mc.enemyObjList[index]].v = 0;
battle_mc[battle_mc.enemyObjList[index]].gotoAndStop('dead');
isSpecial = false;
delete battle_mc[battle_mc.enemyObjList[index]].onEnterFrame;
}
}
}
function counter(max) {
if (penghitungTimer >= max) {
clearInterval(jurusAktif);
clearInterval(mulaiHitungJurus);
penghitungTimer = 0;
} else {
++penghitungTimer;
}
}
function hapusObject(who) {
if (who.penghitungTimer == undefined) {
who.penghitungTimer = 5;
}
--who.penghitungTimer;
if (who.penghitungTimer <= 0) {
who.removeMovieClip();
}
}
function smokeEffect(who) {
var v2 = 1;
while (v2 <= 1 + random(3)) {
battle_mc.depthObj += 1;
battle_mc.attachMovie('smoke_mc' + (1 + random(4)), 'smoke' + battle_mc.depthObj, who.getDepth() + battle_mc.depthObj + 5000 * who.posY);
battle_mc['smoke' + battle_mc.depthObj].skala = 10;
battle_mc['smoke' + battle_mc.depthObj]._xscale = battle_mc['smoke' + battle_mc.depthObj].skala;
battle_mc['smoke' + battle_mc.depthObj]._yscale = battle_mc['smoke' + battle_mc.depthObj].skala;
battle_mc['smoke' + battle_mc.depthObj]._x = who.frontX;
battle_mc['smoke' + battle_mc.depthObj]._y = who.frontY;
battle_mc['smoke' + battle_mc.depthObj].posY = battle_mc['smoke' + battle_mc.depthObj]._y;
battle_mc['smoke' + battle_mc.depthObj].vel = 1 + random(2);
battle_mc['smoke' + battle_mc.depthObj].velX = -2 + random(5);
battle_mc['smoke' + battle_mc.depthObj].cacheAsBitmap = true;
battle_mc['smoke' + battle_mc.depthObj].onEnterFrame = function () {
if (!isPaused) {
this._x += this.v * gameSpeedelX;
this._y -= this.vel;
this._xscale += 1;
this._yscale += 1;
this._alpha -= 3;
if (this._alpha < 0) {
this.removeMovieClip();
}
}
};
++v2;
}
}
function bloodEffect(who) {
var v2 = 1;
while (v2 <= 1 + random(3)) {
battle_mc.depthObj += 1;
battle_mc.attachMovie('blood_mc', 'blood' + battle_mc.depthObj, battle_mc.depthObj + 5000 * who.posY);
battle_mc['blood' + battle_mc.depthObj]._xscale = battle_mc['blood' + battle_mc.depthObj].skala;
battle_mc['blood' + battle_mc.depthObj]._yscale = battle_mc['blood' + battle_mc.depthObj].skala;
battle_mc['blood' + battle_mc.depthObj]._x = who._x;
battle_mc['blood' + battle_mc.depthObj]._y = who._y - 50;
battle_mc['blood' + battle_mc.depthObj].posY = battle_mc['blood' + battle_mc.depthObj]._y;
battle_mc['blood' + battle_mc.depthObj].vel = 3 + random(3);
battle_mc['blood' + battle_mc.depthObj].velX = -3 + random(6);
battle_mc['blood' + battle_mc.depthObj].rot = 3 + random(2);
battle_mc['blood' + battle_mc.depthObj].skala = 30 + random(50);
battle_mc['blood' + battle_mc.depthObj].cacheAsBitmap = true;
battle_mc['blood' + battle_mc.depthObj].onEnterFrame = function () {
if (!isPaused) {
this.vel -= 0.3;
this._x += this.v * gameSpeedelX;
this._y -= this.vel;
this._rotation += this.rot;
this._xscale += 5;
this._yscale += 9;
this._alpha -= 3;
if (this._alpha < 0) {
this.removeMovieClip();
}
}
};
++v2;
}
}
function fightMelee(who, target) {
if (who.hit.hitTest(target.area)) {
if (Math.abs(target._y - who._y) <= 20 || target._name == 'benteng') {
who._x -= who.v;
who.v = 0;
who.gotoAndPlay('menyerang');
}
}
if (who.attack.hitTest(target.area)) {
if (Math.abs(target._y - who._y) <= 20 || target._name == 'benteng') {
soundFX(who.soundFX);
bloodEffect(target);
if (who.att - target.def > 0) {
who.damage = Math.ceil(who.att - target.def);
} else {
who.damage = 1;
}
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
if (who.kills == undefined) {
who.kills = 0;
}
++who.kills;
if (who.kills >= 2) {
rage(who);
}
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
}
}
if (who.v == 0) {
who.standby = true;
}
}
function fightRange(who, target) {
if (who.hit.hitTest(target.area)) {
if (Math.abs(target._y - who._y) <= 60 || target._name == 'benteng') {
who._x -= who.v;
who.v = 0;
who.gotoAndPlay('menyerang');
}
}
if (who.attack.hitTest(target.area)) {
if (!who.attacking) {
shootArrow(who, target);
who.attacking = true;
}
}
if (who.v == 0) {
who.standby = true;
}
}
function shootArrow(who, target) {
soundFX('arrow1');
battle_mc.depthObj += 1;
nameArrow = 'arrow' + battle_mc.depthObj;
battle_mc.attachMovie('mc_arrow2', nameArrow, battle_mc.depthObj + 5000 * who.posY);
battle_mc[nameArrow]._x = who._x;
battle_mc[nameArrow]._y = who._y - 70;
battle_mc[nameArrow].arrow_mc.gotoAndStop(who.classLevel);
battle_mc[nameArrow].spd = 35;
if (who._xscale < 0) {
battle_mc[nameArrow].spd *= -1;
}
battle_mc[nameArrow].velY = 4;
battle_mc[nameArrow].batasY = battle_mc.rowPos[target.posY + 1];
battle_mc[nameArrow].cacheAsBitmap = true;
battle_mc[nameArrow].onEnterFrame = function () {
if (!isPaused) {
this.velY -= 1;
this._x += this.spd;
this._y -= this.velY;
this._rotation = -Math.atan2(this.velY, this.spd) * 180 / Math.PI;
if (this._y >= this.batasY) {
this.gotoAndStop(2);
delete this.onEnterFrame;
this.hapus = setInterval(hapusObject, 1000, this);
}
if (this.hitTest(target.area)) {
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
bloodEffect(target);
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
function fightMultipleRange(who, target) {
if (who.hit.hitTest(target.area)) {
who._x -= who.v;
who.v = 0;
who.gotoAndPlay('menyerang');
}
if (who.attack.hitTest(target.area)) {
if (!who.attacking) {
shootMultipleArrow(who, target);
who.attacking = true;
}
}
if (who.v == 0) {
who.standby = true;
}
}
function shootMultipleArrow(who, target) {
var v2 = 1;
while (v2 <= 3) {
soundFX('arrow1');
battle_mc.depthObj += 1;
nameArrow = 'arrow' + battle_mc.depthObj;
battle_mc.attachMovie('mc_arrow2', nameArrow, battle_mc.depthObj + 5000 * who.posY);
battle_mc[nameArrow]._x = who._x;
battle_mc[nameArrow]._y = who._y - 80;
battle_mc[nameArrow].arrow_mc.gotoAndStop(who.classLevel);
battle_mc[nameArrow].spd = 30;
battle_mc[nameArrow].rot = 1.25;
if (who._xscale < 0) {
battle_mc[nameArrow].rot *= -1;
}
battle_mc[nameArrow].xdiff = target._x - (who._x + 20);
battle_mc[nameArrow].ydiff = target._y - 40 * (v2 + 1) - (who._y - 80);
battle_mc[nameArrow]._rotation = Math.atan2(battle_mc[nameArrow].ydiff, battle_mc[nameArrow].xdiff) * 180 / Math.PI;
battle_mc[nameArrow].batasY = battle_mc.rowPos[target.posY + 1];
battle_mc[nameArrow].cacheAsBitmap = true;
battle_mc[nameArrow].onEnterFrame = function () {
if (!isPaused) {
this._x += this.spd * Math.cos(this._rotation * 0.0174532925199433);
this._y += this.spd * Math.sin(this._rotation * 0.0174532925199433);
this._rotation += this.rot;
if (this._y >= this.batasY) {
this.gotoAndStop(2);
delete this.onEnterFrame;
this.hapus = setInterval(hapusObject, 1000, this);
}
if (this.hitTest(target.area)) {
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
bloodEffect(target);
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
++v2;
}
}
function fightThrow(who, target) {
if (who.hit.hitTest(target.area)) {
if (Math.abs(target._y - who._y) <= 20 || target._name == 'benteng') {
who._x -= who.v;
who.v = 0;
who.gotoAndPlay('menyerang');
}
}
if (who.attack.hitTest(target.area)) {
shootKnife(who, target);
}
if (who.v == 0) {
who.standby = true;
}
}
function shootKnife(who, target) {
battle_mc.depthObj += 1;
nameKnife = 'knife' + battle_mc.depthObj;
battle_mc.attachMovie('mc_knife', nameKnife, battle_mc.depthObj + 5000 * who.posY);
if (who._xscale == -100) {
battle_mc[nameKnife]._yscale = -100;
}
battle_mc[nameKnife]._x = who._x;
battle_mc[nameKnife]._y = who._y - 60;
battle_mc[nameKnife].spd = 20;
battle_mc[nameKnife].batasY = who._y;
battle_mc[nameKnife].onEnterFrame = function () {
if (!isPaused) {
this._rotation += 50;
if (who._xscale < 0) {
this._x -= this.spd;
} else {
this._x += this.spd;
}
if (this.hitTest(target.area)) {
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
bloodEffect(target);
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
this.removeMovieClip();
}
if (this._x > battle_mc._width || this._x < 0) {
this.removeMovieClip();
}
}
};
}
function fightShoot(who, target) {
if (who.hit.hitTest(target.area)) {
who.attacking = false;
who._x -= who.v;
who.v = 0;
who.gotoAndPlay('menyerang');
}
if (who.attack.hitTest(target.area)) {
if (!who.attacking) {
smokeEffect(who);
shootBullet(who, target);
who.attacking = true;
}
}
if (who.v == 0) {
who.standby = true;
}
}
function shootBullet(who, target) {
soundFX('gun' + who.classLevel);
battle_mc.depthObj += 1;
nameBullet = 'bullet' + battle_mc.depthObj;
battle_mc.attachMovie('mc_bullet', nameBullet, battle_mc.depthObj + 5000 * who.posY);
battle_mc[nameBullet]._x = who.frontX;
battle_mc[nameBullet]._y = who.frontY;
battle_mc[nameBullet].spd = 100;
battle_mc[nameBullet].batasY = who._y;
battle_mc[nameBullet].xdiff = target._x - who._x;
battle_mc[nameBullet].ydiff = target._y - target._height / 2 - (who._y - who._height / 1.5);
battle_mc[nameBullet]._rotation = Math.atan2(battle_mc[nameBullet].ydiff, battle_mc[nameBullet].xdiff) * 180 / Math.PI;
battle_mc[nameBullet].onEnterFrame = function () {
if (!isPaused) {
this._x += this.spd * Math.cos((this._rotation / 180) * Math.PI);
this._y += this.spd * Math.sin((this._rotation / 180) * Math.PI);
if (this.hitTest(target.area)) {
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
bloodEffect(target);
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
this.removeMovieClip();
}
}
};
}
function fightMagic(who, target) {
if (who.hit.hitTest(target.area)) {
if (Math.abs(target._y - who._y) <= 20 || target._name == 'benteng') {
who._x -= who.v;
who.v = 0;
who.gotoAndPlay('menyerang');
}
}
if (who.attack.hitTest(target.area)) {
soundFX('magic' + who.classLevel);
bloodEffect(target);
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
if (target.life - who.damage / 5 > 0) {
if (who.damage > 0) {
target.life -= who.damage / 5;
} else {
target.life -= 0.2;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
}
if (who.v == 0) {
who.standby = true;
}
}
function minumJamu(who) {
var v3 = new flash.filters.GlowFilter(16750848, 30, 5, 5, 3, 3, false, false);
var v2 = new Array();
v2.push(v3);
who.filters = v2;
who.att *= 10;
who.def *= 10;
who.lifeAwal *= 10;
who.life = who.lifeAwal;
who.minumJamu = true;
}
function stealResource(who) {
resourceList[1] += 10 * who.lifeAwal * who.classLevel;
if (townSpeStat[1] > 0) {
resourceList[1] += 10 * who.lifeAwal * who.classLevel / 10;
}
battleSummary[5] += 10 * who.lifeAwal * who.classLevel;
statisticList[6] += 10 * who.lifeAwal * who.classLevel;
if (statisticList[6] >= 5000) {
newAchievement(7);
}
}
function summonSwordman(classLevel) {
battle_mc.depthObj += 1;
nameSwordman = 'swordman' + battle_mc.depthObj;
battle_mc.attachMovie(armyStock[2][classLevel][0], nameSwordman, battle_mc.depthObj + 5000 * battle_mc.armyID);
battle_mc[nameSwordman].posY = battle_mc.armyID;
battle_mc[nameSwordman].classLevel = classLevel;
battle_mc[nameSwordman]._x = 0;
battle_mc[nameSwordman]._y = battle_mc.rowPos[battle_mc.armyID];
battle_mc[nameSwordman].lifeAwal = armyStock[2][classLevel][1] + 2.5 * townMilStat[2];
battle_mc[nameSwordman].life = battle_mc[nameSwordman].lifeAwal;
battle_mc[nameSwordman].att = armyStock[2][classLevel][2] + hitungBarrack();
battle_mc[nameSwordman].def = armyStock[2][classLevel][3] + townMilStat[1];
battle_mc[nameSwordman].spd = armyStock[2][classLevel][4];
battle_mc[nameSwordman].v = battle_mc[nameSwordman].spd;
battle_mc[nameSwordman].timer = 50;
battle_mc[nameSwordman].soundFX = 'sword1';
battle_mc[nameSwordman].cacheAsBitmap = true;
battle_mc.swordmanList.push(nameSwordman);
battle_mc[nameSwordman].onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
if (this.classLevel == 1) {
for (index in battle_mc.enemyObjList) {
fightThrow(this, battle_mc[battle_mc.enemyObjList[index]]);
}
} else {
if (this.classLevel == 2) {
for (index in battle_mc.enemyObjList) {
fightMelee(this, battle_mc[battle_mc.enemyObjList[index]]);
}
}
}
if (this.standby) {
--this.timer;
if (this.timer <= 0 || this.timer == undefined) {
this.timer = 50;
this.v = this.spd;
}
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
stealResource(this);
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function summonSpearman(classLevel) {
battle_mc.depthObj += 1;
nameSpearman = 'spearman' + battle_mc.depthObj;
battle_mc.attachMovie(armyStock[3][classLevel][0], nameSpearman, battle_mc.depthObj + 5000 * battle_mc.armyID);
battle_mc[nameSpearman].posY = battle_mc.armyID;
battle_mc[nameSpearman]._x = 0;
battle_mc[nameSpearman]._y = battle_mc.rowPos[battle_mc.armyID];
battle_mc[nameSpearman].classLevel = classLevel;
battle_mc[nameSpearman].lifeAwal = armyStock[3][classLevel][1] + 2.5 * townMilStat[2];
battle_mc[nameSpearman].life = battle_mc[nameSpearman].lifeAwal;
battle_mc[nameSpearman].att = armyStock[3][classLevel][2] + hitungBarrack();
battle_mc[nameSpearman].def = armyStock[3][classLevel][3] + townMilStat[1];
battle_mc[nameSpearman].spd = armyStock[3][classLevel][4];
battle_mc[nameSpearman].v = battle_mc[nameSpearman].spd;
battle_mc[nameSpearman].timer = 50;
battle_mc[nameSpearman].soundFX = 'spear1';
battle_mc[nameSpearman].cacheAsBitmap = true;
battle_mc.spearmanList.push(nameSpearman);
battle_mc[nameSpearman].onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
for (index in battle_mc.enemyObjList) {
fightMelee(this, battle_mc[battle_mc.enemyObjList[index]]);
}
if (this.standby) {
--this.timer;
if (this.timer <= 0 || this.timer == undefined) {
this.timer = 50;
this.v = this.spd;
}
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
stealResource(this);
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function summonHorsearcher(classLevel) {
battle_mc.depthObj += 1;
nameHorsearcher = 'horseacher' + battle_mc.depthObj;
battle_mc.attachMovie(armyStock[1][classLevel][0], nameHorsearcher, battle_mc.depthObj + 5000 * battle_mc.armyID);
battle_mc[nameHorsearcher].posY = battle_mc.armyID;
battle_mc[nameHorsearcher]._x = 0;
battle_mc[nameHorsearcher]._y = battle_mc.rowPos[battle_mc.armyID];
battle_mc[nameHorsearcher].classLevel = classLevel;
battle_mc[nameHorsearcher].lifeAwal = armyStock[1][classLevel][1] + 2.5 * townMilStat[2];
battle_mc[nameHorsearcher].life = battle_mc[nameHorsearcher].lifeAwal;
battle_mc[nameHorsearcher].att = armyStock[1][classLevel][2] + hitungBarrack();
battle_mc[nameHorsearcher].def = armyStock[1][classLevel][3] + townMilStat[1];
battle_mc[nameHorsearcher].spd = armyStock[1][classLevel][4];
battle_mc[nameHorsearcher].v = battle_mc[nameHorsearcher].spd;
battle_mc[nameHorsearcher].timer = 50;
battle_mc[nameHorsearcher].jedaAwal = 30;
battle_mc[nameHorsearcher].jeda = battle_mc[nameHorsearcher].jedaAwal;
battle_mc[nameHorsearcher].cacheAsBitmap = true;
battle_mc.horsearcherList.push(nameHorsearcher);
battle_mc[nameHorsearcher].onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
for (index in battle_mc.enemyObjList) {
fightRange(this, battle_mc[battle_mc.enemyObjList[index]]);
}
if (this.standby) {
--this.timer;
if (this.timer <= 0 || this.timer == undefined) {
this.v = this.spd;
this.timer = 50;
}
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
stealResource(this);
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function summonGunman(classLevel) {
battle_mc.depthObj += 1;
nameGunman = 'gunman' + battle_mc.depthObj;
battle_mc.attachMovie(armyStock[4][classLevel][0], nameGunman, battle_mc.depthObj + 5000 * battle_mc.armyID);
battle_mc[nameGunman].posY = battle_mc.armyID;
battle_mc[nameGunman]._x = 0;
battle_mc[nameGunman]._y = battle_mc.rowPos[battle_mc.armyID];
battle_mc[nameGunman].classLevel = classLevel;
battle_mc[nameGunman].lifeAwal = armyStock[4][classLevel][1] + 2.5 * townMilStat[2];
battle_mc[nameGunman].life = battle_mc[nameGunman].lifeAwal;
battle_mc[nameGunman].att = armyStock[4][classLevel][2] + hitungBarrack();
battle_mc[nameGunman].def = armyStock[4][classLevel][3] + townMilStat[1];
battle_mc[nameGunman].spd = armyStock[4][classLevel][4];
battle_mc[nameGunman].v = battle_mc[nameGunman].spd;
battle_mc[nameGunman].timer = 50;
battle_mc[nameGunman].jedaAwal = 30;
battle_mc[nameGunman].jeda = battle_mc[nameGunman].jedaAwal;
battle_mc[nameGunman].cacheAsBitmap = true;
battle_mc.gunmanList.push(nameGunman);
battle_mc[nameGunman].onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this.frontX = this._x + 25;
this.frontY = this._y - this._height / 1.5;
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
for (index in battle_mc.enemyObjList) {
fightShoot(this, battle_mc[battle_mc.enemyObjList[index]]);
}
if (this.standby) {
--this.timer;
if (this.timer <= 0 || this.timer == undefined) {
this.timer = 50;
this.v = this.spd;
}
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
stealResource(this);
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function summonMagician(classLevel) {
battle_mc.depthObj += 1;
nameMagician = 'magician' + battle_mc.depthObj;
battle_mc.attachMovie(armyStock[5][classLevel][0], nameMagician, battle_mc.depthObj + 5000 * battle_mc.armyID);
battle_mc[nameMagician].posY = battle_mc.armyID;
battle_mc[nameMagician]._x = 0;
battle_mc[nameMagician]._y = battle_mc.rowPos[battle_mc.armyID];
battle_mc[nameMagician].classLevel = classLevel;
battle_mc[nameMagician].lifeAwal = armyStock[5][classLevel][1] + 2.5 * townMilStat[2];
battle_mc[nameMagician].life = battle_mc[nameMagician].lifeAwal;
battle_mc[nameMagician].att = armyStock[5][classLevel][2] + hitungBarrack();
battle_mc[nameMagician].def = armyStock[5][classLevel][3] + townMilStat[1];
battle_mc[nameMagician].spd = armyStock[5][classLevel][4];
battle_mc[nameMagician].v = battle_mc[nameMagician].spd;
battle_mc[nameMagician].timer = 50;
battle_mc[nameMagician].jedaAwal = 50;
battle_mc[nameMagician].jeda = battle_mc[nameMagician].jedaAwal;
battle_mc[nameMagician].cacheAsBitmap = true;
battle_mc.magicianList.push(nameMagician);
battle_mc[nameMagician].onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
for (index in battle_mc.enemyObjList) {
fightMagic(this, battle_mc[battle_mc.enemyObjList[index]]);
}
if (this.standby) {
--this.timer;
if (this.timer <= 0 || this.timer == undefined) {
this.timer = 50;
this.v = this.spd;
}
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
stealResource(this);
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function deployingUnit() {
++battleSummary[1];
isDeploying = true;
if (_root.armyList[this.s] > 0) {
this.gotoAndStop(2);
this.isChoosen = true;
--_root.armyList[this.s];
this.sisa = _root.armyList[this.s];
var v3 = 1;
while (v3 <= 4) {
battle_mc['row' + v3].enabled = true;
battle_mc['row' + v3].s = this.s;
battle_mc['row' + v3].pos = v3;
battle_mc['row' + v3].who = this;
if (resourceList[2] - Math.round(armyDescList[s][4][2] / 2) >= 0) {
battle_mc['row' + v3].onRelease = function () {
isDeploying = false;
this.gotoAndStop(1);
this.who.jeda = 0;
this.who.isChoosen = false;
this.who.gotoAndStop(1);
battle_mc.armyID = this.pos;
_root['summon' + tombolSummon[this.s]](Number(tempStat[this.s]) + 1);
resourceList[2] -= Math.round(armyDescList[this.s][4][2] / 2);
battleSummary[3] += Math.round(armyDescList[this.s][4][2] / 2);
var v3 = 1;
while (v3 <= 4) {
battle_mc['row' + v3].enabled = false;
++v3;
}
};
} else {
resourceList[2] = 0;
}
++v3;
}
}
}
function fightMeleeExtreme(who, target) {
if (who.hit.hitTest(target.area)) {
who.v = 0;
if (target._x - who._x < 150 && Math.abs(target._y - who._y) <= 20) {
who.gotoAndPlay('menyerang');
}
}
if (who.attack.hitTest(target.area)) {
var v2 = 1;
while (v2 <= 3) {
bloodEffect(target);
battle_mc.depthObj += 1;
battle_mc.attachMovie('swordman1_part' + v2, 'part' + battle_mc.depthObj, battle_mc.depthObj);
battle_mc['part' + battle_mc.depthObj].posY = target._y;
battle_mc['part' + battle_mc.depthObj].vel = 8 + random(4);
battle_mc['part' + battle_mc.depthObj].velX = -3 + random(6);
battle_mc['part' + battle_mc.depthObj].rot = 20 + random(10);
battle_mc['part' + battle_mc.depthObj].timer = 100;
battle_mc['part' + battle_mc.depthObj]._x = target._x;
battle_mc['part' + battle_mc.depthObj]._y = target._y - 100;
battle_mc['part' + battle_mc.depthObj].onEnterFrame = function () {
if (!isPaused) {
if (this._y > this.posY) {
--this.timer;
if (this.timer <= 0) {
this._alpha -= 3;
if (this._alpha <= 0) {
this.removeMovieClip();
delete this.onEnterFrame;
}
}
} else {
this.vel -= 0.3;
this._x += this.v * gameSpeedelX;
this._y -= this.vel;
this._rotation += this.rot;
}
}
};
++v2;
}
target.removeMovieClip();
}
if (who.v == 0) {
who.standby = true;
}
}
function fightBigbear(who, target) {
if (who.hit.hitTest(target.area)) {
if (Math.abs(target._y - who._y) <= 30) {
who._x -= who.v;
who.v = 0;
who.gotoAndPlay('menyerang');
}
}
if (who.attack.hitTest(target.area)) {
if (Math.abs(target._y - who._y) <= 30) {
soundFX(who.soundFX);
bloodEffect(target);
smokeEffect(who);
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
if (who.kills == undefined) {
who.kills = 0;
}
++who.kills;
if (who.kills % 3 == 1) {
rage(who);
}
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
}
}
if (who.v == 0) {
who.standby = true;
}
}
function fightSharpwolf(who, target) {
if (who.hit.hitTest(target.area)) {
if (Math.abs(target._y - who._y) <= 30) {
if (target._x - who._x < 400 && target._x - who._x > 150) {
who._x -= who.v;
who.v = 0;
who.gotoAndPlay('menyerang2');
} else {
who._x -= who.v;
who.v = 0;
who.gotoAndPlay('menyerang1');
}
}
}
if (who.attack.hitTest(target.area)) {
if (!who.attacking) {
battle_mc.depthObj += 1;
nameKnife = 'knife' + battle_mc.depthObj;
battle_mc.attachMovie('mc_knife', nameKnife, battle_mc.depthObj + 5000 * who.posY);
battle_mc[nameKnife]._x = who._x + 20;
battle_mc[nameKnife]._y = who._y - 50;
battle_mc[nameKnife].spd = 30;
battle_mc[nameKnife].batasY = who._y;
battle_mc[nameKnife].difX = target._x - who._x;
battle_mc[nameKnife].difY = target._y - who._y;
battle_mc[nameKnife]._rotation = 57.29577951308232 * Math.atan2(battle_mc[nameKnife].difY, battle_mc[nameKnife].difX);
battle_mc[nameKnife].onEnterFrame = function () {
if (!isPaused) {
this._x += this.spd * Math.cos((this._rotation / 180) * Math.PI);
this._y += this.spd * Math.sin((this._rotation / 180) * Math.PI);
if (this.hitTest(target.area)) {
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
bloodEffect(target);
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
this.removeMovieClip();
}
if (this._x > battle_mc._width) {
this.removeMovieClip();
}
}
};
who.attacking = true;
}
}
if (who.attack2.hitTest(target.area)) {
soundFX('sword1');
bloodEffect(target);
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
}
if (who.v == 0) {
who.standby = true;
}
}
function fightBroadeagle(who, target) {
if (who.hit.hitTest(target.area)) {
if (!who.isAttacking) {
soundFX(who.soundFX);
who._x -= who.v;
who.v = 0;
who.gotoAndPlay('menyerang');
who.isAttacking = true;
}
}
if (who.attack.hitTest(target.area)) {
if (who.isAttacking) {
bloodEffect(target);
explosionEffect(target);
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
who.isAttacking = false;
}
}
if (who._currentframe == 1) {
who.isAttacking = false;
}
if (who.v == 0) {
who.standby = true;
}
}
function fightGreatwinstar(who, target) {
if (who.hit.hitTest(target.area)) {
if (target._x - who._x >= 400) {
who.gotoAndPlay('menyerang3');
} else {
if (target._x - who._x < 400 && target._x - who._x > 150) {
who.gotoAndPlay('menyerang2');
} else {
who.gotoAndPlay('menyerang1');
}
}
who._x -= who.v;
}
if (who.attack.hitTest(target.area)) {
if (!who.attacking) {
battle_mc.depthObj += 1;
nameKnife = 'knife' + battle_mc.depthObj;
battle_mc.attachMovie('mc_spear', nameKnife, battle_mc.depthObj + 5000 * who.posY);
battle_mc[nameKnife]._x = who._x + 20;
battle_mc[nameKnife]._y = who._y - 80;
battle_mc[nameKnife].spd = 40;
battle_mc[nameKnife].batasY = who._y;
battle_mc[nameKnife].difX = target._x - who._x;
battle_mc[nameKnife].difY = target._y - 30 - (who._y - 80);
battle_mc[nameKnife]._rotation = 57.29577951308232 * Math.atan2(battle_mc[nameKnife].difY, battle_mc[nameKnife].difX);
battle_mc[nameKnife].onEnterFrame = function () {
if (!isPaused) {
this._x += this.spd * Math.cos((this._rotation / 180) * Math.PI);
this._y += this.spd * Math.sin((this._rotation / 180) * Math.PI);
if (this.hitTest(target.area)) {
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
bloodEffect(target);
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
}
if (this._y > who._y) {
this.gotoAndStop(2);
delete this.onEnterFrame;
this.countDown = 200;
this.onEnterFrame = function () {
--this.countDown;
if (this.countDown <= 0) {
this.removeMovieClip();
}
};
}
if (this._x > battle_mc._width) {
this.removeMovieClip();
}
}
};
who.attacking = true;
}
}
if (who.attack3.hitTest(target.area)) {
if (!who.attacking) {
soundFX('arrow1');
battle_mc.depthObj += 1;
nameArrow = 'arrow' + battle_mc.depthObj;
battle_mc.attachMovie('mc_arrow2', nameArrow, battle_mc.depthObj + 5000 * who.posY);
battle_mc[nameArrow]._x = who._x;
battle_mc[nameArrow]._y = who._y - 80;
battle_mc[nameArrow].arrow_mc.gotoAndStop(who.classLevel);
battle_mc[nameArrow].spd = 30;
battle_mc[nameArrow].velY = 5;
battle_mc[nameArrow].batasY = battle_mc.rowPos[target.posY + 1];
battle_mc[nameArrow].cacheAsBitmap = true;
battle_mc[nameArrow].onEnterFrame = function () {
if (!isPaused) {
this.clip.play();
this.velY -= 1;
this._x += this.spd;
this._y -= this.velY;
this._rotation = -Math.atan2(this.velY, this.spd) * 180 / Math.PI;
if (this._y >= this.batasY) {
this.gotoAndStop(2);
delete this.onEnterFrame;
this.hapus = setInterval(hapusObject, 1000, this);
}
if (this.hitTest(target.area)) {
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
bloodEffect(target);
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
who.attacking = true;
}
}
if (who.attack2.hitTest(target.area)) {
soundFX('sword1');
bloodEffect(target);
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
}
if (who._currentframe == 1) {
who.attacking = false;
}
}
function summonBigbear() {
++battle_mc.battlePosPanglima;
battle_mc.depthObj += 1;
battle_mc.attachMovie('mc_bigbear', 'bigbear', battle_mc.depthObj + 5000 * battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][1]);
battle_mc.bigbear.posY = 2;
battle_mc.bigbear.armyNum = 3;
battle_mc.bigbear._x = 350;
battle_mc.bigbear._y = battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][0];
battle_mc.bigbear.lifeAwal = comList[3][4][0] + objectMap13[2][0] * 10;
battle_mc.bigbear.life = battle_mc.bigbear.lifeAwal;
battle_mc.bigbear.att = comList[3][4][1] + objectMap13[2][0];
battle_mc.bigbear.def = comList[3][4][2] + objectMap13[2][0];
battle_mc.bigbear.spd = comList[3][4][3];
battle_mc.bigbear.v = battle_mc.bigbear.spd;
battle_mc.bigbear.timer = 10;
battle_mc.spearmanList.push('bigbear');
battle_mc.bigbear.onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this.frontX = this._x + 50;
this.frontY = this._y;
if (armyList[this.armyNum] <= 0) {
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
if (this.standby) {
--this.timer;
if (this.timer <= 0 || this.timer == undefined) {
this.timer = 50;
this.v = this.spd;
}
}
}
for (index in battle_mc.enemyObjList) {
fightBigbear(this, battle_mc[battle_mc.enemyObjList[index]]);
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function summonBeautyflower() {
++battle_mc.battlePosPanglima;
battle_mc.depthObj += 1;
battle_mc.attachMovie('mc_beautyflower', 'beautyflower', battle_mc.depthObj + 5000 * battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][1]);
battle_mc.beautyflower.posY = 2;
battle_mc.beautyflower.armyNum = 4;
battle_mc.beautyflower._x = 300;
battle_mc.beautyflower._y = battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][0];
battle_mc.beautyflower.classLevel = 3;
battle_mc.beautyflower.lifeAwal = comList[4][4][0] + objectMap13[2][0] * 10;
battle_mc.beautyflower.life = battle_mc.beautyflower.lifeAwal;
battle_mc.beautyflower.att = comList[4][4][1] + objectMap13[2][0];
battle_mc.beautyflower.def = comList[4][4][2] + objectMap13[2][0];
battle_mc.beautyflower.spd = comList[4][4][3];
battle_mc.beautyflower.v = battle_mc.beautyflower.spd;
battle_mc.beautyflower.timer = 50;
battle_mc.gunmanList.push('beautyflower');
battle_mc.beautyflower.onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this.frontX = this._x + 50;
this.frontY = this._y - this._height / 1.3;
for (index in battle_mc.enemyObjList) {
fightShoot(this, battle_mc[battle_mc.enemyObjList[index]]);
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function summonBroadeagle() {
++battle_mc.battlePosPanglima;
battle_mc.depthObj += 1;
battle_mc.attachMovie('mc_broadeagle', 'broadeagle', battle_mc.depthObj + 5000 * battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][1]);
battle_mc.broadeagle.posY = 3;
battle_mc.broadeagle.armyNum = 5;
battle_mc.broadeagle._x = 300;
battle_mc.broadeagle._y = battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][0];
battle_mc.broadeagle.soundFX = 'magic1';
battle_mc.broadeagle.lifeAwal = comList[5][4][0] + objectMap13[2][0] * 10;
battle_mc.broadeagle.life = battle_mc.broadeagle.lifeAwal;
battle_mc.broadeagle.att = comList[5][4][1] + objectMap13[2][0];
battle_mc.broadeagle.def = comList[5][4][2] + objectMap13[2][0];
battle_mc.broadeagle.spd = comList[5][4][3];
battle_mc.broadeagle.v = battle_mc.broadeagle.spd;
battle_mc.broadeagle.timer = 50;
battle_mc.broadeagle.jedaAwal = 50;
battle_mc.broadeagle.jeda = battle_mc.broadeagle.jedaAwal;
battle_mc.broadeagle.cacheAsBitmap = true;
battle_mc.magicianList.push('broadeagle');
battle_mc.broadeagle.onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
for (index in battle_mc.enemyObjList) {
fightBroadeagle(this, battle_mc[battle_mc.enemyObjList[index]]);
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function summonRunningbow() {
++battle_mc.battlePosPanglima;
battle_mc.depthObj += 1;
battle_mc.attachMovie('mc_runningbow', 'runningbow', battle_mc.depthObj + 5000 * battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][1]);
battle_mc.runningbow.posY = 2;
battle_mc.runningbow.armyNum = 2;
battle_mc.runningbow._x = 300;
battle_mc.runningbow._y = battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][0];
battle_mc.runningbow.lifeAwal = comList[2][4][0] + objectMap13[2][0] * 10;
battle_mc.runningbow.life = battle_mc.runningbow.lifeAwal;
battle_mc.runningbow.att = comList[2][4][1] + objectMap13[2][0];
battle_mc.runningbow.def = comList[2][4][2] + objectMap13[2][0];
battle_mc.runningbow.spd = comList[2][4][3];
battle_mc.runningbow.v = battle_mc.runningbow.spd;
battle_mc.runningbow.timer = 50;
battle_mc.horsearcherList.push('runningbow');
battle_mc.runningbow.onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
for (index in battle_mc.enemyObjList) {
fightMultipleRange(this, battle_mc[battle_mc.enemyObjList[index]]);
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function summonSharpwolf() {
++battle_mc.battlePosPanglima;
battle_mc.depthObj += 1;
nameSwordman = 'swordman' + battle_mc.depthObj;
battle_mc.attachMovie('mc_sharpwolf', 'sharpwolf', battle_mc.depthObj + 5000 * battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][1]);
battle_mc.sharpwolf.posY = 2;
battle_mc.sharpwolf.armyNum = 1;
battle_mc.sharpwolf._x = 350;
battle_mc.sharpwolf._y = battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][0];
battle_mc.sharpwolf.lifeAwal = comList[1][4][0] + objectMap13[2][0] * 10;
battle_mc.sharpwolf.life = battle_mc.sharpwolf.lifeAwal;
battle_mc.sharpwolf.att = comList[1][4][1] + objectMap13[2][0];
battle_mc.sharpwolf.def = comList[1][4][2] + objectMap13[2][0];
battle_mc.sharpwolf.spd = comList[1][4][3];
battle_mc.sharpwolf.v = battle_mc.sharpwolf.spd;
battle_mc.sharpwolf.range = 300;
battle_mc.sharpwolf.timer = 50;
battle_mc.sharpwolf.soundFX = 'sword1';
battle_mc.sharpwolf.cacheAsBitmap = true;
battle_mc.swordmanList.push('sharpwolf');
battle_mc.sharpwolf.onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
if (armyList[this.armyNum] <= 0) {
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
if (this.standby) {
--this.timer;
if (this.timer <= 0 || this.timer == undefined) {
this.timer = 50;
this.v = this.spd;
}
}
}
for (index in battle_mc.enemyObjList) {
fightSharpwolf(this, battle_mc[battle_mc.enemyObjList[index]]);
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function summonGreatwinstar() {
++battle_mc.battlePosPanglima;
battle_mc.depthObj += 1;
nameSwordman = 'swordman' + battle_mc.depthObj;
battle_mc.attachMovie('mc_greatwinstar', 'gw', battle_mc.depthObj + 5000 * battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][1]);
battle_mc.gw.posY = 2;
battle_mc.gw.armyNum = 1;
battle_mc.gw._x = 300;
battle_mc.gw._y = battle_mc.rowPosPanglima[battle_mc.battlePosPanglima][0];
battle_mc.gw.lifeAwal = comList[6][4][0] + objectMap13[2][0] * 10;
battle_mc.gw.life = battle_mc.gw.lifeAwal;
battle_mc.gw.att = comList[6][4][1] + objectMap13[2][0];
battle_mc.gw.def = comList[6][4][2] + objectMap13[2][0];
battle_mc.gw.spd = comList[6][4][3];
battle_mc.gw.v = battle_mc[gw].spd;
battle_mc.gw.range = 300;
battle_mc.gw.timer = 50;
battle_mc.gw.soundFX = 'sword1';
battle_mc.gw.cacheAsBitmap = true;
battle_mc.swordmanList.push('gw');
battle_mc.gw.onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
if (this.life < this.lifeAwal) {
this.life += 0.01;
}
for (index in battle_mc.enemyObjList) {
fightGreatwinstar(this, battle_mc[battle_mc.enemyObjList[index]]);
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x > 1300) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function tambahPowerCommander(who) {
who.att += objectMap13[0][0];
who.def += objectMap13[0][0];
}
function fightTower(who, target) {
if (who.hit.hitTest(target.area)) {
xdiff = target._x - who._x;
if (xdiff <= 350) {
who.tower.gotoAndStop(3);
} else {
if (xdiff <= 600 && xdiff > 350) {
who.tower.gotoAndStop(2);
} else {
who.tower.gotoAndStop(1);
}
}
--who.jeda;
if (who.jeda <= 0) {
who.tower.archer.play();
battle_mc.depthObj += 1;
nameArrow = 'arrow' + battle_mc.depthObj;
battle_mc.attachMovie('mc_arrow2', nameArrow, battle_mc.depthObj + 5000 * who.posY);
battle_mc[nameArrow].xdiff = target._x - battle_mc[nameArrow]._x;
battle_mc[nameArrow].ydiff = target._y - 30 - battle_mc[nameArrow]._y;
if (battle_mc[nameArrow].xdiff <= 420) {
battle_mc[nameArrow]._x = who._x + 100;
battle_mc[nameArrow]._y = who._y - 290;
} else {
if (battle_mc[nameArrow].xdiff <= 600 && battle_mc[nameArrow].xdiff > 420) {
battle_mc[nameArrow]._x = who._x + 100;
battle_mc[nameArrow]._y = who._y - 295;
} else {
battle_mc[nameArrow]._x = who._x + 100;
battle_mc[nameArrow]._y = who._y - 300;
}
}
battle_mc[nameArrow].sudut = Math.atan2(battle_mc[nameArrow].ydiff, battle_mc[nameArrow].xdiff);
battle_mc[nameArrow].sudut *= 57.29577951308232;
battle_mc[nameArrow]._rotation = battle_mc[nameArrow].sudut;
battle_mc[nameArrow].sudutb = battle_mc[nameArrow].sudut;
battle_mc[nameArrow].sudutb *= 0.0174532925199433;
battle_mc[nameArrow].xmov = 55 * Math.cos(battle_mc[nameArrow].sudutb);
battle_mc[nameArrow].ymov = 55 * Math.sin(battle_mc[nameArrow].sudutb);
battle_mc[nameArrow].batasY = target._y;
battle_mc[nameArrow].cacheAsBitmap = true;
battle_mc[nameArrow].onEnterFrame = function () {
if (!isPaused) {
this._x += this.xmov;
this._y += this.ymov;
if (this._y >= this.batasY) {
this.gotoAndStop(2);
delete this.onEnterFrame;
this.hapus = setInterval(hapusObject, 1000, this);
}
if (this.hitTest(target.area)) {
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
bloodEffect(target);
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
this.removeMovieClip();
}
}
};
who.gotoAndPlay('menyerang');
who.jeda = who.jedaAwal;
}
}
if (who.v == 0) {
who.standby = true;
}
}
function fightTower2(who, target) {
if (who.hit.hitTest(target.area)) {
xdiff = target._x - who._x;
if (xdiff <= 350) {
who.tower.gotoAndStop(3);
} else {
if (xdiff <= 600 && xdiff > 350) {
who.tower.gotoAndStop(2);
} else {
who.tower.gotoAndStop(1);
}
}
--who.jeda;
if (who.jeda <= 0) {
who.tower.archer.play();
battle_mc.depthObj += 1;
nameArrow = 'arrow' + battle_mc.depthObj;
who.attachMovie('mc_arrow2', nameArrow, battle_mc.depthObj + 5000 * who.posY);
who[nameArrow].xdiff = target._x - who[nameArrow]._x;
who[nameArrow].ydiff = target._y - 30 - who[nameArrow]._y;
who[nameArrow]._x = who._x + 90;
who[nameArrow]._y = who._y - 440;
who[nameArrow].sudut = Math.atan2(who[nameArrow].ydiff, who[nameArrow].xdiff);
who[nameArrow].sudut *= 57.29577951308232;
who[nameArrow]._rotation = who[nameArrow].sudut;
who[nameArrow].sudutb = who[nameArrow].sudut;
who[nameArrow].sudutb *= 0.0174532925199433;
who[nameArrow].xmov = 55 * Math.cos(who[nameArrow].sudutb);
who[nameArrow].ymov = 55 * Math.sin(who[nameArrow].sudutb);
who[nameArrow].batasY = target._y;
who[nameArrow].cacheAsBitmap = true;
who[nameArrow].onEnterFrame = function () {
if (!isPaused) {
this._x += this.xmov;
this._y += this.ymov;
if (this._y >= this.batasY) {
this.gotoAndStop(2);
delete this.onEnterFrame;
this.hapus = setInterval(hapusObject, 1000, this);
}
if (this.hitTest(target.area)) {
if (who.att - target.def > 0) {
who.damage = who.att - target.def;
} else {
who.damage = 1;
}
bloodEffect(target);
if (target.life - who.damage > 0) {
if (who.damage > 0) {
target.life -= who.damage;
} else {
target.life -= 1;
}
} else {
target.isDead = true;
target.v = 0;
target.life = 0;
target.gotoAndStop('dead');
delete target.onEnterFrame;
}
this.removeMovieClip();
}
}
};
who.gotoAndPlay('menyerang');
who.jeda = who.jedaAwal;
}
}
if (who.v == 0) {
who.standby = true;
}
}
function addTower() {
battle_mc.attachMovie('tower_battle', 'tower', 14998);
battle_mc.tower._x = 120;
battle_mc.tower._y = 412;
battle_mc.tower.posY = 2;
for (var v3 in _root['objectMap' + map]) {
if (_root['objectMap' + map][v3][1] == 'tower') {
battle_mc.tower.lev = _root['objectMap' + map][v3][0];
battle_mc.tower.lev_ket.text = _root['objectMap' + map][v3][0];
}
}
battle_mc.tower.lifeAwal = 300 * battle_mc.tower.lev;
battle_mc.tower.life = battle_mc[tower].lifeAwal;
battle_mc.tower.att = 8 * (battle_mc.tower.lev / 2) + townMilStat[3];
battle_mc.tower.def = 3 * (battle_mc.tower.lev / 2) + townMilStat[4];
battle_mc.tower.spd = 0;
battle_mc.tower.v = battle_mc[tower].spd;
battle_mc.tower.timer = 50;
battle_mc.tower.jedaAwal = 100;
battle_mc.tower.jeda = battle_mc[tower].jedaAwal;
battle_mc.swordmanList.push('tower');
battle_mc.tower.onEnterFrame = function () {
if (!isPaused) {
for (index in battle_mc.enemyObjList) {
fightTower(this, battle_mc[battle_mc.enemyObjList[index]]);
}
}
};
}
function upLevelPower() {
if (days < 40) {
var v2 = Math.ceil(_root.days / 20);
return v2;
}
v2 = Math.ceil(_root.days / 10);
return v2;
}
function enemySwordman(classLevel) {
battle_mc.armyEID = 1 + random(4);
battle_mc.depthObj += 1;
nameSwordmanE = 'swordmanE' + battle_mc.depthObj;
battle_mc.attachMovie('mc_enemy_swordman' + classLevel, nameSwordmanE, battle_mc.depthObj + 5000 * battle_mc.armyEID);
battle_mc[nameSwordmanE].posY = battle_mc.armyEID;
battle_mc[nameSwordmanE]._xscale = -100;
battle_mc[nameSwordmanE]._x = 1200;
battle_mc[nameSwordmanE]._y = battle_mc.rowPos[battle_mc.armyEID];
battle_mc[nameSwordmanE].classLevel = classLevel;
battle_mc[nameSwordmanE].lifeAwal = 15 + upLevelPower() * 2 + 10 * (classLevel - 1);
battle_mc[nameSwordmanE].life = battle_mc[nameSwordmanE].lifeAwal;
battle_mc[nameSwordmanE].att = 4.5 + upLevelPower() + 3 * (classLevel - 1);
battle_mc[nameSwordmanE].def = 2 + upLevelPower() + 2 * (classLevel - 1);
battle_mc[nameSwordmanE].spd = -2;
battle_mc[nameSwordmanE].v = battle_mc[nameSwordmanE].spd;
battle_mc[nameSwordmanE].timer = 50;
battle_mc[nameSwordmanE].cacheAsBitmap = true;
battle_mc.enemyObjList.push(nameSwordmanE);
battle_mc[nameSwordmanE].nomor = battle_mc.enemyObjList.length;
battle_mc[nameSwordmanE].onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
if (this.classLevel == 1) {
for (index in battle_mc.swordmanList) {
fightThrow(this, battle_mc[battle_mc.swordmanList[index]]);
}
for (index in battle_mc.spearmanList) {
fightThrow(this, battle_mc[battle_mc.spearmanList[index]]);
}
for (index in battle_mc.horsearcherList) {
fightThrow(this, battle_mc[battle_mc.horsearcherList[index]]);
}
for (index in battle_mc.gunmanList) {
fightThrow(this, battle_mc[battle_mc.gunmanList[index]]);
}
for (index in battle_mc.magicianList) {
fightThrow(this, battle_mc[battle_mc.magicianList[index]]);
}
} else {
if (this.classLevel == 2) {
for (index in battle_mc.swordmanList) {
fightMelee(this, battle_mc[battle_mc.swordmanList[index]]);
}
for (index in battle_mc.spearmanList) {
fightMelee(this, battle_mc[battle_mc.spearmanList[index]]);
}
for (index in battle_mc.horsearcherList) {
fightMelee(this, battle_mc[battle_mc.horsearcherList[index]]);
}
for (index in battle_mc.gunmanList) {
fightMelee(this, battle_mc[battle_mc.gunmanList[index]]);
}
for (index in battle_mc.magicianList) {
fightMelee(this, battle_mc[battle_mc.magicianList[index]]);
}
}
}
if (this.standby) {
--this.timer;
if (this.timer <= 0) {
this.timer = 50;
this.v = this.spd;
}
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x <= -100) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function enemySpearman(classLevel) {
battle_mc.armyEID = 1 + random(4);
battle_mc.depthObj += 1;
nameSpearmanE = 'spearmanE' + battle_mc.depthObj;
battle_mc.attachMovie('mc_enemy_spearman' + classLevel, nameSpearmanE, battle_mc.depthObj + 5000 * battle_mc.armyEID);
battle_mc[nameSpearmanE].posY = battle_mc.armyEID;
battle_mc[nameSpearmanE]._xscale = -100;
battle_mc[nameSpearmanE]._x = 1200;
battle_mc[nameSpearmanE]._y = battle_mc.rowPos[battle_mc.armyEID];
battle_mc[nameSpearmanE].classLevel = classLevel;
battle_mc[nameSpearmanE].lifeAwal = 15 + upLevelPower() * 2 + 5 * (classLevel - 1);
battle_mc[nameSpearmanE].life = battle_mc[nameSpearmanE].lifeAwal;
battle_mc[nameSpearmanE].att = 5 + upLevelPower() + 3 * (classLevel - 1);
battle_mc[nameSpearmanE].def = 3 + upLevelPower() + 2 * (classLevel - 1);
battle_mc[nameSpearmanE].spd = -2;
battle_mc[nameSpearmanE].v = battle_mc[nameSpearmanE].spd;
battle_mc[nameSpearmanE].timer = 50;
battle_mc[nameSpearmanE].cacheAsBitmap = true;
battle_mc.enemyObjList.push(nameSpearmanE);
battle_mc[nameSpearmanE].nomor = battle_mc.enemyObjList.length;
battle_mc[nameSpearmanE].onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
for (index in battle_mc.swordmanList) {
fightMelee(this, battle_mc[battle_mc.swordmanList[index]]);
}
for (index in battle_mc.spearmanList) {
fightMelee(this, battle_mc[battle_mc.spearmanList[index]]);
}
for (index in battle_mc.horsearcherList) {
fightMelee(this, battle_mc[battle_mc.horsearcherList[index]]);
}
for (index in battle_mc.gunmanList) {
fightMelee(this, battle_mc[battle_mc.gunmanList[index]]);
}
for (index in battle_mc.magicianList) {
fightMelee(this, battle_mc[battle_mc.magicianList[index]]);
}
if (this.standby) {
--this.timer;
if (this.timer <= 0) {
this.timer = 50;
this.v = this.spd;
}
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x <= -100) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function enemyHorsearcher(classLevel) {
battle_mc.armyEID = 1 + random(4);
battle_mc.depthObj += 1;
nameHorsearcherE = 'horseacherE' + battle_mc.depthObj;
battle_mc.attachMovie('mc_enemy_horsearcher' + classLevel, nameHorsearcherE, battle_mc.depthObj + 5000 * battle_mc.armyEID);
battle_mc[nameHorsearcherE].posY = battle_mc.armyEID;
battle_mc[nameHorsearcherE]._xscale = -100;
battle_mc[nameHorsearcherE]._x = 1200;
battle_mc[nameHorsearcherE]._y = battle_mc.rowPos[battle_mc.armyEID];
battle_mc[nameHorsearcherE].classLevel = classLevel;
battle_mc[nameHorsearcherE].lifeAwal = 15 + upLevelPower() * 2 + 5 * (classLevel - 1);
battle_mc[nameHorsearcherE].life = battle_mc[nameHorsearcherE].lifeAwal;
battle_mc[nameHorsearcherE].att = 4 + upLevelPower() + 3 * (classLevel - 1);
battle_mc[nameHorsearcherE].def = 2 + upLevelPower() + 2 * (classLevel - 1);
battle_mc[nameHorsearcherE].spd = -4;
battle_mc[nameHorsearcherE].v = battle_mc[nameHorsearcherE].spd;
battle_mc[nameHorsearcherE].timer = 50;
battle_mc[nameHorsearcherE].jedaAwal = 30;
battle_mc[nameHorsearcherE].jeda = battle_mc[nameHorsearcherE].jedaAwal;
battle_mc[nameHorsearcherE].cacheAsBitmap = true;
battle_mc.enemyObjList.push(nameHorsearcherE);
battle_mc[nameHorsearcherE].onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
for (index in battle_mc.swordmanList) {
fightRange(this, battle_mc[battle_mc.swordmanList[index]]);
}
for (index in battle_mc.spearmanList) {
fightRange(this, battle_mc[battle_mc.spearmanList[index]]);
}
for (index in battle_mc.horsearcherList) {
fightRange(this, battle_mc[battle_mc.horsearcherList[index]]);
}
for (index in battle_mc.gunmanList) {
fightRange(this, battle_mc[battle_mc.gunmanList[index]]);
}
for (index in battle_mc.magicianList) {
fightRange(this, battle_mc[battle_mc.magicianList[index]]);
}
if (this.standby) {
--this.timer;
if (this.timer <= 0 || this.timer == undefined) {
this.timer = 50;
this.v = this.spd;
}
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x <= -100) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function enemyMagician(classLevel) {
battle_mc.armyEID = 1 + random(4);
battle_mc.depthObj += 1;
nameSwordmanE = 'magicianE' + battle_mc.depthObj;
battle_mc.attachMovie('mc_enemy_magician' + classLevel, nameSwordmanE, battle_mc.depthObj + 5000 * battle_mc.armyEID);
battle_mc[nameSwordmanE].posY = battle_mc.armyEID;
battle_mc[nameSwordmanE]._xscale = -100;
battle_mc[nameSwordmanE]._x = 1200;
battle_mc[nameSwordmanE]._y = battle_mc.rowPos[battle_mc.armyEID];
battle_mc[nameSwordmanE].classLevel = classLevel;
battle_mc[nameSwordmanE].lifeAwal = 12 + upLevelPower() * 2 + 5 * (classLevel - 1);
battle_mc[nameSwordmanE].life = battle_mc[nameSwordmanE].lifeAwal;
battle_mc[nameSwordmanE].att = 5 + upLevelPower() + 3 * (classLevel - 1);
battle_mc[nameSwordmanE].def = 2 + upLevelPower() + 2 * (classLevel - 1);
battle_mc[nameSwordmanE].spd = -1.5;
battle_mc[nameSwordmanE].v = battle_mc[nameSwordmanE].spd;
battle_mc[nameSwordmanE].timer = 50;
battle_mc.enemyObjList.push(nameSwordmanE);
battle_mc[nameSwordmanE].nomor = battle_mc.enemyObjList.length;
battle_mc[nameSwordmanE].cacheAsBitmap = true;
battle_mc[nameSwordmanE].onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
for (index in battle_mc.swordmanList) {
fightMagic(this, battle_mc[battle_mc.swordmanList[index]]);
}
for (index in battle_mc.spearmanList) {
fightMagic(this, battle_mc[battle_mc.spearmanList[index]]);
}
for (index in battle_mc.horsearcherList) {
fightMagic(this, battle_mc[battle_mc.horsearcherList[index]]);
}
for (index in battle_mc.gunmanList) {
fightMagic(this, battle_mc[battle_mc.gunmanList[index]]);
}
for (index in battle_mc.magicianList) {
fightMagic(this, battle_mc[battle_mc.magicianList[index]]);
}
if (this.standby) {
--this.timer;
if (this.timer <= 0) {
this.timer = 50;
this.v = this.spd;
}
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x <= -100) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function enemyCowboy(classLevel) {
battle_mc.armyEID = 1 + random(4);
battle_mc.depthObj += 1;
nameSwordmanE = 'cowboyE' + battle_mc.depthObj;
battle_mc.attachMovie('mc_enemy_cowboy' + classLevel, nameSwordmanE, battle_mc.depthObj + 5000 * battle_mc.armyEID);
battle_mc[nameSwordmanE].posY = battle_mc.armyEID;
battle_mc[nameSwordmanE]._xscale = -100;
battle_mc[nameSwordmanE]._x = 1200;
battle_mc[nameSwordmanE]._y = battle_mc.rowPos[battle_mc.armyEID];
battle_mc[nameSwordmanE].classLevel = classLevel;
battle_mc[nameSwordmanE].lifeAwal = 15 + upLevelPower() * 2 + 5 * (classLevel - 1);
battle_mc[nameSwordmanE].life = battle_mc[nameSwordmanE].lifeAwal;
battle_mc[nameSwordmanE].att = 5 + upLevelPower() + 3 * (classLevel - 1);
battle_mc[nameSwordmanE].def = 1 + upLevelPower() + 2 * (classLevel - 1);
battle_mc[nameSwordmanE].spd = -(1 + classLevel);
battle_mc[nameSwordmanE].v = battle_mc[nameSwordmanE].spd;
battle_mc[nameSwordmanE].timer = 50;
battle_mc.enemyObjList.push(nameSwordmanE);
battle_mc[nameSwordmanE].nomor = battle_mc.enemyObjList.length;
battle_mc[nameSwordmanE].cacheAsBitmap = true;
battle_mc[nameSwordmanE].onEnterFrame = function () {
if (habisPerang) {
delete this.onEnterFrame;
}
if (!isPaused) {
this.clip.play();
this.frontX = this._x - 40;
this.frontY = this._y - this._height / 1.5;
this._x += this.v * gameSpeed;
if (this.v != 0) {
this.gotoAndStop('walking');
}
for (index in battle_mc.swordmanList) {
fightShoot(this, battle_mc[battle_mc.swordmanList[index]]);
}
for (index in battle_mc.spearmanList) {
fightShoot(this, battle_mc[battle_mc.spearmanList[index]]);
}
for (index in battle_mc.horsearcherList) {
fightShoot(this, battle_mc[battle_mc.horsearcherList[index]]);
}
for (index in battle_mc.gunmanList) {
fightShoot(this, battle_mc[battle_mc.gunmanList[index]]);
}
for (index in battle_mc.magicianList) {
fightShoot(this, battle_mc[battle_mc.magicianList[index]]);
}
if (this.standby) {
--this.timer;
if (this.timer <= 0) {
this.timer = 50;
this.v = this.spd;
}
}
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
if (this._x <= -100) {
this.removeMovieClip();
}
} else {
this.clip.stop();
}
};
}
function tampilMenang() {
habisPerang = true;
soundFX('win');
posPengurang[perangDi] = 0;
isPaused = true;
tampilBlur();
++_root.statisticList[8];
menangBattle = true;
pasukanMusuh.menang = true;
var v3 = [0, 0, 0, 0, 0, 0];
var v4 = [0, 'swordmanList', 'horsearcherList', 'spearmanList', 'gunmanList', 'magicianList'];
for (var v6 in v3) {
for (var v5 in battle_mc[v4[v6]]) {
if (battle_mc[battle_mc[v4[v6]][v5]].life > 0) {
++v3[v6];
}
}
armyList[v6] += v3[v6];
}
battleSummary[4] = battle_mc.benteng.life + '/' + battle_mc.benteng.lifeAwal;
_root.attachMovie('window_win', 'window_win', 1000);
window_win._x = Stage.width / 2;
window_win._y = Stage.height / 2;
window_win._alpha = 0;
window_win.onEnterFrame = function () {
efekFade(this);
};
window_win.continue_btn.onRelease = function () {
_root.gotoAndStop('main');
isPaused = false;
blur.removeMovieClip();
window_win.removeMovieClip();
};
}
function tampilKalah() {
habisPerang = true;
isPaused = true;
tampilBlur();
pasukanMusuh.menang = false;
++_root.statisticList[16];
for (var v3 in comLoc) {
if (posMap[map - 1] == comLoc[v3]) {
comLoc[v3] = 33;
comLocBaru[v3] = 33;
}
}
_root.attachMovie('window_lose', 'window_lose', 1000);
window_lose._x = Stage.width / 2;
window_lose._y = Stage.height / 2;
window_lose._alpha = 0;
window_lose.onEnterFrame = function () {
efekFade(this);
};
window_lose.continue_btn.onRelease = function () {
if (map == 13) {
_root.gotoAndStop('gameover');
} else {
_root.gotoAndStop('main');
}
isPaused = false;
blur.removeMovieClip();
window_lose.removeMovieClip();
};
}
stop();
soundBGM('bgm3');
var gameSpeed = 1;
ctrl1.onRelease = function () {
tampilOption(2);
};
ctrl2.onRelease = function () {
if (!isPaused) {
gameSpeed = 1;
}
};
ctrl3.onRelease = function () {
if (!isPaused) {
gameSpeed = 2;
}
};
tulisan.gotoAndStop(_root.bahasa + 1);
var battleSummary = [0, 0, 0, 0, 0, 0];
var penghitungTimer = 0;
var jurusAktif = none;
var isPaused = false;
var isSpecial = false;
var habisPerang = false;
army0 = [null];
army1 = ['Horse Archer', ['mc_horsearcher1', 12, 5, 2, 4, 50], ['mc_horsearcher2', 25, 7, 3, 5, 80]];
army2 = ['Swordman', ['mc_swordman1', 15, 5, 3, 2, 40], ['mc_swordman2', 30, 8, 4, 3, 60]];
army3 = ['Spearman', ['mc_spearman1', 18, 7, 4, 3, 50], ['mc_spearman2', 35, 9, 5, 3, 70]];
army4 = ['Gunman', ['mc_gunman1', 10, 5, 2, 2, 40], ['mc_gunman2', 20, 10, 2, 3, 60]];
army5 = ['Magician', ['mc_magician1', 12, 10, 2.5, 1.5, 40], ['mc_magician2', 25, 15, 3, 3, 60]];
var armyStock = new Array();
var i = 0;
while (i <= 5) {
armyStock.push(_root['army' + i]);
++i;
}
enemyLev0 = [[6, enemySwordman, 1], [2, enemyHorsearcher, 1]];
enemyLev1 = [[10, enemySwordman, 1], [5, enemyHorsearcher, 1]];
enemyLev2 = [[15, enemySwordman, 2], [10, enemyHorsearcher, 1], [5, enemyCowboy, 1]];
enemyLev3 = [[15, enemySwordman, 2], [15, enemyHorsearcher, 2], [5, enemyCowboy, 1], [5, enemySpearman, 1]];
enemyLev4 = [[20, enemySwordman, 2], [20, enemyHorsearcher, 2], [10, enemyCowboy, 1], [10, enemySpearman, 1]];
enemyLev5 = [[20, enemySwordman, 2], [20, enemyHorsearcher, 2], [15, enemyCowboy, 2], [10, enemySpearman, 2]];
enemyLev6 = [[20, enemySwordman, 2], [20, enemyHorsearcher, 2], [20, enemyCowboy, 3], [20, enemySpearman, 2], [10, enemyMagician, 2]];
enemyLev7 = [[20, enemySwordman, 2], [20, enemyHorsearcher, 2], [25, enemyCowboy, 3], [25, enemySpearman, 2], [15, enemyMagician, 2]];
var enemyLevList = new Array();
var i = 0;
while (i <= 7) {
enemyLevList.push(_root['enemyLev' + i]);
++i;
}
var daftarMap = new Array();
var a = 0;
while (a <= 25) {
daftarMap.push('map' + a);
++a;
}
specialList = [undefined, rageStorm, rainArrow, earthQuake, explodingFrenzy, healingSpring];
Key.removeListener(keyListener);
for (index in battle_mc.swordmanList) {
delete battle_mc[battle_mc.swordmanList[index]].onEnterFrame;
}
for (index in battle_mc.spearmanList) {
delete battle_mc[battle_mc.spearmanList[index]].onEnterFrame;
}
for (index in battle_mc.horsearcherList) {
delete battle_mc[battle_mc.horsearcherList[index]].onEnterFrame;
}
for (index in battle_mc.gunmanList) {
delete battle_mc[battle_mc.gunmanList[index]].onEnterFrame;
}
for (index in battle_mc.magicianList) {
delete battle_mc[battle_mc.magicianList[index]].onEnterFrame;
}
for (index in battle_mc.enemyObjList) {
delete battle_mc[battle_mc.enemyObjList[index]].onEnterFrame;
}
var enemyoutbahasa = ['Enemy Left', 'Ennemis restant', 'Musuh Tersisa'];
_root.onEnterFrame = function () {
_root.enemyOut.text = enemyoutbahasa[bahasa] + ': ' + battle_mc.enemyLeft;
_root.base_food.text = _root.resourceList[2];
if (!isPaused && !isSpecial) {
menu_btn.enabled = true;
surrender_btn.enabled = true;
} else {
menu_btn.enabled = false;
surrender_btn.enabled = false;
}
if (_ymouse < 500 && _ymouse > 100) {
if (_xmouse <= 100 || Key.isDown(37)) {
if (battle_mc._x < 0) {
semak_mc._x += 9;
battle_mc._x += 5;
battlebg_mc._x += 2;
}
}
if (_xmouse >= 700 || Key.isDown(39)) {
if (battle_mc._x > -400) {
semak_mc._x -= 9;
battle_mc._x -= 5;
battlebg_mc._x -= 2;
}
}
}
};
var i = 1;
while (i <= pasukanMusuh.trapped) {
for (var index in enemyLevList[Math.floor(days / 10)]) {
enemyLevList[Math.floor(days / 10)][index][0] -= Math.round(enemyLevList[Math.floor(days / 10)][index][0] / 5);
}
++i;
}
battle_mc.enemyCount = 0;
var totalEnemy = 0;
for (var index in enemyLevList[Math.floor(days / 10)]) {
totalEnemy += enemyLevList[Math.floor(days / 10)][index][0];
}
battle_mc.enemyCount = totalEnemy - posPengurang[perangDi];
battle_mc.enemyLeft = battle_mc.enemyCount;
battle_mc.depthObj = 0;
battle_mc.armyID = 1;
battle_mc.armyEID = 0;
battle_mc.rowPos = [0, 370, 395, 435, 460, 500];
battle_mc.rowPosPanglima = [0, [410, 3], [390, 2], [435, 4], [460, 5], [370, 1], [500, 6]];
battle_mc.battlePosPanglima = 0;
battle_mc.swordmanList = new Array();
battle_mc.spearmanList = new Array();
battle_mc.horsearcherList = new Array();
battle_mc.gunmanList = new Array();
battle_mc.magicianList = new Array();
battle_mc.enemyObjList = new Array();
var d = 1;
while (d <= 4) {
battle_mc['row' + d].enabled = false;
++d;
}
var armyBattle = new Array();
for (var isi in comLoc) {
if (posMap[map - 1] == comLoc[isi]) {
armyBattle.push(isi);
}
}
var summonCommander = [undefined, summonSharpwolf, summonRunningbow, summonBigbear, summonBeautyflower, summonBroadeagle, summonGreatwinstar];
var specialDesList = [undefined, ['Force our armies to be rage!', 'Les troupes alliées ont la rage de vaincre !', 'Membuat para pasukan mengamuk!'], ['Call rain arrow for reinforcement!', 'Faire tomber une pluie de flèches en soutien!', 'Mengeluarkan hujan panah!'], ['Summon tremors to disband enemies', 'Faire trembler la terre pour anéantir l\'ennemi', 'Memanggil gempa bumi untuk menghancurkan musuh'], ['Explode enemies with explosive bomb', 'Lancer des bombes sur les ennemis', 'Meledakkan musuh dengan bom'], ['Heal allies unit', 'Soigne les unités alliées', 'Menyembuhkan pasukan kita']];
var abilitiesBahasa = ['SPECIAL ABILITIES', 'Pouvoirs spéciaux', 'KEMAMPUAN SPESIAL'];
var isDeploying = false;
var tombolSummon = [0, 'Swordman', 'Horsearcher', 'Spearman', 'Gunman', 'Magician'];
var commanderCount = 0;
var specialUsedCount = 0;
specialDes.text = abilitiesBahasa[bahasa];
for (var s in tombolSummon) {
for (var r in armyBattle) {
if (s == armyBattle[r]) {
++commanderCount;
if (commanderCount >= 5) {
newAchievement(2);
}
summonCommander[s]();
if (armyList[s] > 0) {
_root[tombolSummon[s] + '_btn'].sisa = armyList[s];
_root[tombolSummon[s] + '_btn'].s = s;
_root[tombolSummon[s] + '_btn'].photo.gotoAndStop(s);
_root[tombolSummon[s] + '_btn'].photo_mask.gotoAndStop(s);
_root[tombolSummon[s] + '_btn'].jedaAwal = 75 - 25 * townSpeStat[3];
_root[tombolSummon[s] + '_btn'].jeda = _root[tombolSummon[s] + '_btn'].jedaAwal;
_root[tombolSummon[s] + '_btn'].enabled = false;
_root[tombolSummon[s] + '_btn'].onEnterFrame = function () {
if (armyList[this.s] <= 0) {
this.gotoAndStop(5);
this.photo_mask._visible = 0;
delete this.onEnterFrame;
}
this.photo_mask.gotoAndStop(this.s);
if (!isPaused) {
if (resourceList[2] >= 0) {
if (!isDeploying && this.sisa > 0) {
this.enabled = true;
this.gotoAndStop(1);
} else {
this.enabled = false;
if (!this.isChoosen) {
this.gotoAndStop(4);
}
}
this.jeda += 1 * gameSpeed;
if (this.jeda >= this.jedaAwal) {
this.jeda = this.jedaAwal;
this.onRelease = deployingUnit;
} else {
this.enabled = false;
this.gotoAndStop(3);
this.preloader._yscale = 100 - (this.jeda / this.jedaAwal) * 100;
}
} else {
resourceList[2] = 0;
this.enabled = false;
this.gotoAndStop(5);
}
}
};
}
_root['special_btn' + s].special = true;
_root['special_btn' + s].mc.gotoAndStop(s);
_root['special_btn' + s].s = s;
_root['special_btn' + s].onEnterFrame = function () {
this.mc.gotoAndStop(this.s);
if (this.special) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (isPaused && isSpecial) {
this.enabled = false;
} else {
this.enabled = true;
}
};
_root['special_btn' + s].onRollOver = function () {
specialDes.text = specialDesList[this.s][bahasa];
};
_root['special_btn' + s].onRollOut = function () {
specialDes.text = abilitiesBahasa[bahasa];
};
_root['special_btn' + s].onRelease = function () {
isSpecial = true;
++specialUsedCount;
if (specialUsedCount >= 3) {
newAchievement(3);
}
if (this.special) {
specialDes.text = abilitiesBahasa[bahasa];
_root.isPaused = true;
_root.attachMovie('battle_ilustration', 'ilustration', this.getNextHighestDepth());
ilustration._x = -150;
ilustration._y = 500;
ilustration.gotoAndStop(this.s);
ilustration.timer = 100;
ilustration.onEnterFrame = function () {
this.difX = -this._x;
this._x += this.difX / 10;
--this.timer;
if (this.timer <= 0) {
_root.isPaused = false;
specialList[this._currentframe]();
delete this.onEnterFrame;
this.onEnterFrame = function () {
this.difX = -750 - this._x;
this._x += this.difX / 8;
if (Math.abs(this.difX) <= 20) {
this.removeMovieClip();
}
};
}
};
this.special = false;
this.enabled = false;
this.gotoAndStop(2);
}
};
} else {
_root[tombolSummon[s] + '_btn'].gotoAndStop(6);
_root[tombolSummon[s] + '_btn'].photo.gotoAndStop(s);
_root[tombolSummon[s] + '_btn'].photo_mask.gotoAndStop(s);
_root['special_btn' + s].gotoAndStop(2);
}
}
}
if (map == 13) {
summonGreatwinstar();
for (var s in tombolSummon) {
if (armyList[s] > 0) {
_root[tombolSummon[s] + '_btn'].sisa = armyList[s];
_root[tombolSummon[s] + '_btn'].s = s;
_root[tombolSummon[s] + '_btn'].photo.gotoAndStop(s);
_root[tombolSummon[s] + '_btn'].photo_mask.gotoAndStop(s);
_root[tombolSummon[s] + '_btn'].jedaAwal = 75 - 25 * townSpeStat[3];
_root[tombolSummon[s] + '_btn'].jeda = _root[tombolSummon[s] + '_btn'].jedaAwal;
_root[tombolSummon[s] + '_btn'].enabled = false;
_root[tombolSummon[s] + '_btn'].onEnterFrame = function () {
if (armyList[this.s] <= 0) {
this.gotoAndStop(5);
this.photo_mask._visible = 0;
delete this.onEnterFrame;
}
this.photo_mask.gotoAndStop(this.s);
if (!isPaused) {
if (resourceList[2] >= 0) {
if (!isDeploying && this.sisa > 0) {
this.enabled = true;
this.gotoAndStop(1);
} else {
this.enabled = false;
if (!this.isChoosen) {
this.gotoAndStop(4);
}
}
if (this.sisa <= 0) {
this.gotoAndStop(6);
}
this.jeda += gameSpeed;
if (this.jeda >= this.jedaAwal) {
this.jeda = this.jedaAwal;
this.onRelease = function () {
++battleSummary[1];
isDeploying = true;
if (_root.armyList[this.s] > 0) {
this.gotoAndStop(2);
this.isChoosen = true;
--_root.armyList[this.s];
this.sisa = _root.armyList[this.s];
var v3 = 1;
while (v3 <= 4) {
battle_mc['row' + v3].enabled = true;
battle_mc['row' + v3].s = this.s;
battle_mc['row' + v3].pos = v3;
battle_mc['row' + v3].who = this;
battle_mc['row' + v3].onRelease = function () {
isDeploying = false;
this.gotoAndStop(1);
this.who.jeda = 0;
this.who.isChoosen = false;
this.who.gotoAndStop(1);
battle_mc.armyID = this.pos;
_root['summon' + tombolSummon[this.s]](Number(tempStat[this.s]) + 1);
resourceList[2] -= Math.round(armyDescList[this.s][4][2] / 2);
battleSummary[3] += Math.round(armyDescList[this.s][4][2] / 2);
var v3 = 1;
while (v3 <= 4) {
battle_mc['row' + v3].enabled = false;
++v3;
}
};
++v3;
}
}
};
} else {
this.enabled = false;
this.gotoAndStop(3);
this.preloader._yscale = 100 - (this.jeda / this.jedaAwal) * 100;
}
} else {
resourceList[2] = 0;
this.enabled = false;
this.gotoAndStop(5);
}
} else {
_root[tombolSummon[s] + '_btn'].gotoAndStop(6);
_root[tombolSummon[s] + '_btn'].photo.gotoAndStop(s);
_root[tombolSummon[s] + '_btn'].photo_mask.gotoAndStop(s);
_root['special_btn' + s].gotoAndStop(2);
}
};
}
}
}
if (_root.jamuMode) {
minumJamu(battle_mc.bigbear);
minumJamu(battle_mc.sharpwolf);
minumJamu(battle_mc.runningbow);
minumJamu(battle_mc.beautyflower);
minumJamu(battle_mc.broadeagle);
minumJamu(battle_mc.gw);
}
for (var i in comList) {
tambahPowerCommander(battle_mc[comList[i][0]]);
}
for (var a in _root['objectMap' + map]) {
if (_root['objectMap' + map][a][1] == 'tower') {
if (_root['objectMap' + map][a][0] > 0) {
addTower();
}
}
}
battle_mc.attachMovie('mc_benteng', 'benteng', 80000);
battle_mc.benteng._x = 0;
battle_mc.benteng._y = 500;
battle_mc.benteng.benteng.gotoAndStop(daftarMap[_root.map]);
battle_mc.benteng.posY = 3;
battle_mc.benteng.lifeAwal = 200;
battle_mc.benteng.life = battle_mc.benteng.lifeAwal;
battle_mc.benteng.def = 5 + townMilStat[4];
battle_mc.benteng.frontX = this._x + 150;
battle_mc.benteng.frontY = this._y - 100;
battle_mc.swordmanList.push('benteng');
battle_mc.benteng.onEnterFrame = function () {
this.life_span.span._xscale = 100 * (this.life / this.lifeAwal);
_root.our_base.text = Math.floor(this.life);
this.benteng.gotoAndStop(daftarMap[_root.map]);
this.benteng.benteng.gotoAndStop(daftarMap[_root.map]);
};
battle_mc.benteng.benteng.towncenter.att = 8 + townMilStat[3];
battle_mc.benteng.benteng.towncenter.jedaAwal = 100;
battle_mc.benteng.benteng.towncenter.jeda = battle_mc.benteng.benteng.towncenter.jedaAwal;
battle_mc.benteng.benteng.towncenter.onEnterFrame = function () {
if (!isPaused) {
for (index in battle_mc.enemyObjList) {
fightTower2(this, battle_mc[battle_mc.enemyObjList[index]]);
}
}
};
battle_mc.gotoAndStop(daftarMap[_root.map]);
battlebg_mc.gotoAndStop(daftarMap[_root.map]);
var menangBattle = false;
foodStock = resourceList[2];
battle_mc.onEnterFrame = function () {
if (!isPaused) {
if (battle_mc.enemyCount > 0) {
this.timer -= gameSpeed;
if (this.timer <= 0 || this.timer == undefined) {
var v3 = random(enemyLevList[Math.floor(days / 10)].length);
if (enemyLevList[Math.floor(days / 10)][v3][0] - 1 >= 0) {
enemyLevList[Math.floor(days / 10)][v3][0] -= 1;
battle_mc.enemyCount -= 1;
enemyLevList[Math.floor(days / 10)][v3][1](1 + random(enemyLevList[Math.floor(days / 10)][v3][2]));
this.timer = Math.round((80 + random(50)) / (1 + Math.floor(days / 30)));
} else {
this.timer = 0;
}
}
} else {
battle_mc.enemyCount = 0;
if (battle_mc.enemyLeft <= 0) {
delete this.onEnterFrame;
tampilMenang();
}
}
}
_root.life_span.teks.text = Math.round(battle_mc.benteng.life) + '/' + battle_mc.benteng.lifeAwal;
_root.life_span.span._xscale = (battle_mc.benteng.life / battle_mc.benteng.lifeAwal) * 100;
_root.food_span.teks.text = Math.round(_root.resourceList[2]) + '/' + foodStock;
_root.food_span.span._xscale = (_root.resourceList[2] / foodStock) * 100;
};
surrender_btn.onRelease = function () {
isPaused = true;
tampilBlur();
_root.attachMovie('menu_surrender', 'confirm', 1000);
confirm._x = Stage.width / 2;
confirm._y = Stage.height / 2;
confirm.gotoAndStop(_root.bahasa + 1);
confirm._alpha = 0;
confirm.onEnterFrame = function () {
efekFade(this);
};
confirm.yes_btn.onRelease = function () {
isPaused = false;
habisPerang = true;
pasukanMusuh.menang = false;
++_root.statisticList[16];
for (var v2 in comLoc) {
if (posMap[map - 1] == comLoc[v2]) {
comLoc[v2] = 33;
comLocBaru[v2] = 33;
}
}
if (map == 13) {
_root.gotoAndStop('gameover');
} else {
_root.gotoAndStop('main');
}
blur.removeMovieClip();
confirm.removeMovieClip();
};
confirm.no_btn.onRelease = function () {
isPaused = false;
blur.removeMovieClip();
confirm.removeMovieClip();
};
};
menu_btn.onRelease = function () {
tampilOption(2);
};
if (!battleTutorial) {
var tempTut = 1;
_root.attachMovie('main_tutorial2', 'tutorial', 777);
tutorial._x = Stage.width / 2;
tutorial._y = Stage.height / 2;
tutorial.stop();
tutorial.next_btn.gotoAndStop(_root.bahasa + 1);
tutorial.next_btn.onRelease = function () {
++tempTut;
tutorial.gotoAndStop(tempTut);
};
tutorial.skip_btn.gotoAndStop(_root.bahasa + 1);
tutorial.skip_btn.onRelease = function () {
tutorial.gotoAndStop(9);
};
}
}
movieClip 3443 {
frame 1 {
stop();
}
}
movieClip 3474 {
frame 1 {
stop();
}
}
movieClip 3479 {
}
movieClip 3482 {
}
movieClip 3485 {
}
movieClip 3488 {
}
movieClip 3491 {
}
movieClip 3492 {
frame 1 {
stop();
daftarItem = ['pohon1', 'pohon2', 'kaktus1', 'kaktus2'];
for (var daf in daftarItem) {
this[daftarItem[daf]]._visible = 0;
this[daftarItem[daf]].daf = daf;
if (random(2) == 1) {
this[daftarItem[daf]]._visible = 1;
this[daftarItem[daf]]._x = random(200 + (1 + daf) * 100);
}
}
}
}
movieClip 3497 {
}
movieClip 3505 {
}
movieClip 3509 {
}
movieClip 3523 {
}
movieClip 3536 {
frame 1 {
stop();
}
}
movieClip 3539 {
}
movieClip 3543 {
frame 1 {
stop();
}
}
movieClip 3569 {
}
movieClip 3570 {
frame 1 {
stop();
}
}
frame 11 {
stop();
stopAllSounds();
var loadingBattle = 0;
hint.text = tipsList[random(tipsList.length)][_root.bahasa];
onEnterFrame = function () {
++loadingBattle;
if (loadingBattle >= 200) {
delete onEnterFrame;
gotoAndStop('battle');
}
};
gametips_teks.gotoAndStop(_root.bahasa + 1);
tutorial.removeMovieClip();
}
movieClip 3577 {
}
frame 12 {
stop();
stopAllSounds();
soundFX('bgm0');
}
movieClip 3590 {
frame 1 {
cerita = [0, ['Our struggle is finally a success!\nPeople are celebrating the victory...', 'Notre combat se termine par un succès total ! Le peuple célèbre la victoire…', 'Perjuangan kita akhirnya membuahkan hasil!\nRakyat pun berpesta pora...'], ['A few moment later,\nWambeeska\'s spies give reports to their master.', 'Quelques instants plus tard, les espions font leur rapport à Wambeeska.', 'Beberapa waktu kemudian,\nmata2 Wambleeska datang melapor kepada tuannya,'], ['They report that the enemy has brought a large, unpredicted number of troops.\nFar more than number of current residents remaining', 'Alors qu’on ne s’y attendait plus, ils révèlent que l’ennemi approche avec un grand nombre de troupes. Son armée est beaucoup plus importante que la nôtre. ', 'Dia melaporkan bahwa musuh telah menghimpun pasukan dengan jumlah tak terkira.\nJauh lebih banyak daripada jumlah penduduknya saat ini yang tersisa...'], ['A moment where the soul of a leader is tested...\nArmed with a magic potion that has helped the soldiers', 'C’est l’instant de vérité, celui où l’âme du chef est mise à l’épreuve... ', 'Suatu detik2 dimana jiwa seorang pemimpin diuji...\nDengan berbekal ramuan ajaib yang selama ini membantu para prajurit'], ['there is no other option\nbut to fight all out until the last breath...', 'Il n’y a pas d’autre option que de combattre jusqu’au dernier souffle, avec l’aide de la potion magique qui a déjà servi nos guerriers…', 'Tidak ada pilihan lain selain kembali bertarung habis2an dengan sekuat tenaga untuk terakhir kali...']];
}
frame 37 {
tulisan.text = cerita[1][_root.bahasa];
}
frame 169 {
tulisan.text = cerita[2][_root.bahasa];
}
frame 314 {
tulisan.text = cerita[3][_root.bahasa];
}
frame 471 {
tulisan.text = cerita[4][_root.bahasa];
}
frame 653 {
tulisan.text = cerita[5][_root.bahasa];
}
frame 980 {
stop();
var loadingBattle = 0;
onEnterFrame = function () {
++loadingBattle;
if (loadingBattle >= 200) {
delete onEnterFrame;
_root.gotoAndStop('menu');
}
};
}
}
frame 13 {
stop();
_root.kongregateStats.submit('GameOver', 1);
soundBGM('bgm_end');
game_teks.gotoAndStop(_root.bahasa + 1);
return_btn.gotoAndStop(_root.bahasa + 1);
return_btn.onRelease = function () {
delete onEnterFrame;
_root.gotoAndStop('menu');
};
}
movieClip 3596 {
}
movieClip 3600 {
}