STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228056
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2560 · P5120

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/34813056?noj=FRM34813056-26DC" width="1" height="1"></div>

Imperium.swf

This is the info page for
Flash #117857

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
frame 1 { stop(); Stage.showMenu = false; fscommand('fullscreen', false); fscommand('allowscale', false); fscommand('showmenu', false); loader.onEnterFrame = function () { this._xscale = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100; if (this._xscale == 100) { delete loader.onEnterFrame; gotoAndStop('completed'); } }; } movieClip 3 { } instance of movieClip 3 { onClipEvent (release) { getURL('http://www.maxgames.com', '_blank'); } } movieClip 6 { } movieClip 21 { } movieClip 22 { } movieClip 30 { } movieClip 31 { } movieClip 40 { } movieClip 41 { frame 9 { _root.backPedang(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 48 { frame 15 { stop(); _root.cekDarah2(_parent); } } movieClip 49 xxsuper_mc { frame 1 { stop(); } } movieClip 56 { } movieClip 57 { } movieClip 58 { } movieClip 71 { frame 28 { stop(); } } movieClip 72 { frame 9 { _root.yycekBatu(_parent, _parent._currentframe); _root.backSihir1(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 73 { frame 15 { stop(); } } movieClip 74 xwitch_mc { frame 1 { stop(); } } movieClip 78 { } movieClip 79 { } movieClip 80 { } movieClip 81 { } movieClip 83 { } movieClip 84 { frame 9 { _root.backPedang(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 91 { frame 15 { stop(); _root.cekDarah2(_parent); } } movieClip 92 xsuper_mc { frame 1 { stop(); } } movieClip 97 { } movieClip 107 { } movieClip 111 { frame 9 { _root.backPedang(); } } movieClip 119 { frame 1 { _root.backKuda(); } frame 15 { stop(); _root.cekDarah2(_parent); } } movieClip 120 xkuda_mc { frame 1 { stop(); } } movieClip 127 { } movieClip 131 { } movieClip 134 { } movieClip 135 { } movieClip 136 { } movieClip 142 { } movieClip 148 { } movieClip 153 { } movieClip 154 { } movieClip 155 { } movieClip 164 { } movieClip 165 { } movieClip 166 { frame 9 { _root.xxcekBatu(_parent, _parent._currentframe); _root.backBatu(); } } movieClip 173 { frame 20 { stop(); } } movieClip 177 { frame 27 { stop(); _root.cekDarah2(_parent); } } movieClip 178 xketapel_mc { frame 1 { stop(); } } movieClip 181 { } movieClip 187 { } movieClip 189 { frame 9 { _root.backPedang(); } } movieClip 203 { frame 27 { stop(); _root.cekDarah2(_parent); } } movieClip 204 xgajah_mc { frame 1 { stop(); } } movieClip 207 { } movieClip 216 { } movieClip 231 { frame 9 { _root.cekPanahApi(_parent, _parent._currentframe); _root.backPanah(); } } movieClip 242 { frame 9 { stop(); _root.cekDarah2(_parent); } } movieClip 243 xfire_mc { frame 1 { stop(); } } movieClip 249 { } movieClip 250 { } movieClip 254 { } movieClip 255 { } movieClip 262 { } movieClip 263 { frame 9 { _root.cekSihir5(_parent, _parent._currentframe); _root.backSihir5(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 264 { frame 15 { stop(); } } movieClip 265 witch5 { frame 1 { stop(); } } movieClip 266 { frame 9 { _root.cekSihir4(_parent, _parent._currentframe); _root.backSihir4(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 267 witch4 { frame 1 { stop(); } } movieClip 268 { frame 9 { _root.cekSihir3(_parent, _parent._currentframe); _root.backSihir3(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 269 witch3 { frame 1 { stop(); } } movieClip 270 { frame 9 { _root.cekSihir2(_parent, _parent._currentframe); _root.backSihir2(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 271 witch2 { frame 1 { stop(); } } movieClip 272 { frame 9 { _root.cekSihir1(_parent, _parent._currentframe); _root.backSihir1(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 273 witch1 { frame 1 { stop(); } } movieClip 275 { } movieClip 277 { } movieClip 279 { } movieClip 280 { } movieClip 282 { } movieClip 284 { } movieClip 286 { } movieClip 287 { } movieClip 299 { } movieClip 307 { frame 1 { stop(); } } movieClip 326 witch { frame 1 { stop(); } } movieClip 328 water2_mc { frame 1 { gotoAndPlay(random(20) + 1); } frame 100 { removeMovieClip(this); } } movieClip 338 { } movieClip 348 tutor_mc { frame 1 { stop(); next_btn.onRelease = function () { _root.tutor.gotoAndStop(_root.tutor._currentframe + 1); }; back_btn.onRelease = function () { _root.tutor.gotoAndStop(_root.tutor._currentframe - 1); }; skip_btn.onRelease = function () { _root.skipTutor(); }; } frame 2 { stop(); next_btn.onRelease = function () { _root.tutor.gotoAndStop(_root.tutor._currentframe + 1); }; back_btn.onRelease = function () { _root.tutor.gotoAndStop(_root.tutor._currentframe - 1); }; skip_btn.onRelease = function () { _root.skipTutor(); }; } frame 6 { stop(); next_btn.onRelease = function () { _root.tutor.gotoAndStop(_root.tutor._currentframe + 1); }; back_btn.onRelease = function () { _root.tutor.gotoAndStop(_root.tutor._currentframe - 1); }; skip_btn.onRelease = function () { _root.skipTutor(); }; } frame 7 { stop(); next_btn.onRelease = function () { _root.tutor.gotoAndStop(_root.tutor._currentframe + 1); }; back_btn.onRelease = function () { _root.tutor.gotoAndStop(_root.tutor._currentframe - 1); }; skip_btn.onRelease = function () { _root.skipTutor(); }; } } movieClip 350 { } movieClip 359 { } movieClip 371 { frame 9 { _root.backPedang(); } frame 19 { _root.cekDarah1(_parent); } } movieClip 376 { frame 15 { stop(); _root.cekDarah2(_parent); } } movieClip 377 sword2_mc { frame 1 { stop(); } } movieClip 386 { } movieClip 395 { } movieClip 406 { frame 9 { _root.backPedang(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 419 { frame 15 { stop(); _root.cekDarah2(_parent); } } movieClip 420 sword_mc { frame 1 { stop(); } } movieClip 438 { } movieClip 443 { } movieClip 457 fx7 { frame 12 { removeMovieClip(this); } } movieClip 458 { frame 1 { gotoAndPlay(random(50) + 1); } } movieClip 471 { frame 13 { gotoAndPlay(random(20) + 15); } } movieClip 472 { } movieClip 474 { } movieClip 475 { frame 10 { gotoAndStop(this._currentframe + random(50)); } } movieClip 477 sword { frame 1 { stop(); } } movieClip 506 { frame 35 { gotoAndPlay(this._currentframe + random(30)); } } movieClip 515 { } movieClip 520 { } movieClip 529 { } movieClip 548 { frame 20 { gotoAndPlay(this._currentframe + random(50)); } } movieClip 550 super { frame 1 { stop(); } } movieClip 559 steel { frame 1 { stop(); } } movieClip 562 { } movieClip 565 { } movieClip 573 { frame 5 { _root.backTombak(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 580 { frame 15 { stop(); _root.cekDarah2(_parent); } } movieClip 581 spear2_mc { frame 1 { stop(); } } movieClip 583 { } movieClip 584 { } movieClip 588 { frame 5 { _root.backTombak(); } frame 20 { _root.cekDarah1(_parent); } } movieClip 593 { frame 15 { stop(); _root.cekDarah2(_parent); } } movieClip 594 spear_mc { frame 1 { stop(); } } movieClip 596 { } movieClip 605 spear { frame 1 { stop(); } } movieClip 607 sound_mc { } movieClip 624 sihir5 { frame 8 { stop(); } } movieClip 651 sihir4 { } movieClip 662 sihir3 { } movieClip 665 sihir2 { } movieClip 667 sihir1 { } movieClip 674 shrimp { frame 1 { stop(); } } movieClip 677 serpih12 { } movieClip 680 serpih11 { } movieClip 682 serpih10 { } movieClip 684 serpih9 { } movieClip 686 serpih8 { } movieClip 688 serpih7 { } movieClip 690 serpih6 { } movieClip 692 serpih5 { } movieClip 694 serpih4 { } movieClip 696 serpih3 { } movieClip 698 serpih2 { } movieClip 700 serpih1 { } movieClip 702 rumput_mc { } movieClip 710 pearl { frame 1 { stop(); } } movieClip 714 { frame 1 { stop(); } } movieClip 733 { } movieClip 735 { } movieClip 737 { } movieClip 741 options_mc { frame 1 { function cekSpeedQuality() { i = 1; while (i <= 5) { this['speed' + i].angka = i; this['quality' + i].angka = i; this['speed' + i].gotoAndStop(1); this['quality' + i].gotoAndStop(1); this['speed' + i].onRelease = klikSpeed; this['quality' + i].onRelease = klikQuality; ++i; } this['speed' + _root.speedGame].gotoAndStop(2); this['quality' + _root.qualityGame].gotoAndStop(2); } function klikSpeed() { indi = new String(this); _root.speedGame = Number(indi.substr(indi.length - 1, 1)); if (_root.speedGame == 1) { _root.delayHari = 9000; } else { if (_root.speedGame == 2) { _root.delayHari = 4000; } else { if (_root.speedGame == 3) { _root.delayHari = 2000; } else { if (_root.speedGame == 4) { _root.delayHari = 1000; } else { if (_root.speedGame == 5) { _root.delayHari = 500; } } } } } cekSpeedQuality(); } function klikQuality() { indi = new String(this); _root.qualityGame = Number(indi.substr(indi.length - 1, 1)); if (_root.qualityGame == 1) { _quality = 'HIGH'; } else { if (_root.qualityGame == 2) { _quality = 'MEDIUM'; } else { if (_root.qualityGame == 3) { _quality = 'LOW'; } } } cekSpeedQuality(); } stop(); bar1_mc.bar_mc._x = Math.ceil(_root.volum1 / 0.4347826086956522 - 115); bar1_mc.bar_mc.onEnterFrame = function () { _root.volum1 = int(0.4347826086956522 * (this._x + 115)); _root.myMusic.setVolume(_root.volum1); bar1_mc.persen1 = _root.volum1 + ' %'; }; bar1_mc.indi_mc.onPress = function () { klik(); startDrag(bar1_mc.bar_mc, true, -115, 0, 115, 0); }; bar1_mc.bar_mc.onRollOver = function () { over(); }; bar1_mc.indi_mc.onReleaseOutside = function () { over(); stopDrag(); }; bar1_mc.indi_mc.onRelease = bar1_mc.indi_mc.onReleaseOutside; bar2_mc.bar_mc._x = Math.ceil(_root.volum2 / 0.4347826086956522 - 115); bar2_mc.bar_mc.onEnterFrame = function () { _root.volum2 = int(0.4347826086956522 * (this._x + 115)); _root.volum3 = int(0.4347826086956522 * (this._x + 115)); _root.mySound.setVolume(_root.volum2); _root.mySound2.setVolume(_root.volum3); bar2_mc.persen2 = _root.volum2 + ' %'; }; bar2_mc.indi_mc.onPress = function () { klik(); startDrag(bar2_mc.bar_mc, true, -115, 0, 115, 0); }; bar2_mc.bar_mc.onRollOver = function () { over(); }; bar2_mc.indi_mc.onReleaseOutside = function () { over(); stopDrag(); }; bar2_mc.indi_mc.onRelease = bar2_mc.indi_mc.onReleaseOutside; cekSpeedQuality(); } instance of movieClip 3 { onClipEvent (release) { getURL('http://www.maxgames.com', '_blank'); } } } movieClip 751 oil { frame 1 { stop(); } } movieClip 831 msgBox_mc { frame 1 { stop(); } } movieClip 839 semak_mc { } movieClip 849 { } movieClip 860 { } movieClip 863 { frame 1 { stop(); } } movieClip 869 { } movieClip 872 { } movieClip 874 { } movieClip 876 { } movieClip 878 { } movieClip 880 mine { frame 1 { stop(); } instance of movieClip 863 { onClipEvent (release) { if (this._currentframe == 1) { this.gotoAndStop(2); } else { if (this._currentframe == 2) { this.gotoAndStop(1); } } } } } movieClip 889 { } movieClip 898 { } movieClip 904 { frame 10 { gotoAndPlay(this._currentframe + random(30)); } } movieClip 908 { } movieClip 916 { } movieClip 918 { } movieClip 922 { } movieClip 929 pasar1 { } movieClip 932 pasar2 { } movieClip 934 pasar6 { } movieClip 938 pasar3 { } movieClip 943 { } movieClip 948 { } movieClip 951 { } movieClip 956 { } movieClip 961 { } movieClip 965 { } movieClip 968 { } movieClip 970 { } movieClip 975 { } movieClip 980 market { frame 1 { stop(); } } movieClip 984 { } movieClip 986 { } movieClip 989 anak_panah { } movieClip 999 { } movieClip 1003 { } movieClip 1007 jewel_mc { frame 1 { stop(); } } movieClip 1009 { } movieClip 1013 { } movieClip 1015 { } movieClip 1018 { } movieClip 1020 { } movieClip 1023 { } movieClip 1026 houses_mc { frame 1 { stop(); } } movieClip 1033 farm_mc { frame 1 { stop(); } } movieClip 1036 market_mc { frame 1 { stop(); } } movieClip 1038 log_mc { frame 1 { stop(); } } movieClip 1040 tambang_mc { frame 1 { stop(); } } movieClip 1047 { } movieClip 1050 { frame 10 { gotoAndStop(this._currentframe + random(50)); } } movieClip 1051 pedang_mc { frame 1 { stop(); } } movieClip 1054 { frame 15 { gotoAndPlay(this._currentframe + random(50)); } } movieClip 1062 panah_mc { frame 1 { stop(); } } movieClip 1070 { frame 1 { stop(); } } movieClip 1075 { frame 20 { gotoAndPlay(this._currentframe + random(50)); } } movieClip 1078 barak_mc { frame 1 { stop(); } } movieClip 1081 fish_mc { frame 1 { stop(); } } movieClip 1082 gold_mc { frame 1 { stop(); } } movieClip 1083 tombak_mc { frame 1 { stop(); } } movieClip 1086 pearl_mc { frame 1 { stop(); } } movieClip 1090 horse_mc { frame 1 { stop(); } } movieClip 1094 cow_mc { frame 1 { stop(); } } movieClip 1098 shrimp_mc { frame 1 { stop(); } } movieClip 1102 elephant_mc { frame 1 { stop(); } } movieClip 1106 coal_mc { frame 1 { stop(); } } movieClip 1109 oil_mc { frame 1 { stop(); } } movieClip 1113 catapult_mc { frame 1 { stop(); } } movieClip 1116 witch_mc { frame 1 { stop(); } } movieClip 1119 steel_mc { frame 1 { stop(); } } movieClip 1128 fire_mc { frame 1 { stop(); } } movieClip 1131 super_mc { frame 1 { stop(); } } movieClip 1132 { frame 1 { stop(); } } movieClip 1134 { } movieClip 1142 { frame 1 { stop(); } frame 2 { play(); } frame 3 { play(); } frame 4 { play(); } frame 5 { play(); } frame 6 { play(); } frame 7 { play(); } frame 8 { play(); } frame 9 { play(); } frame 10 { play(); } frame 11 { play(); } frame 12 { play(); } frame 13 { play(); } frame 14 { play(); } frame 15 { play(); } frame 16 { play(); } frame 17 { play(); } frame 18 { play(); } frame 19 { play(); } frame 20 { play(); } frame 21 { play(); } frame 22 { play(); } frame 23 { play(); } frame 24 { play(); } frame 25 { play(); } frame 26 { play(); } frame 27 { play(); } frame 28 { play(); } frame 29 { play(); } frame 30 { play(); } frame 31 { play(); } frame 32 { play(); } frame 33 { play(); } frame 34 { play(); } frame 35 { play(); } frame 36 { play(); } frame 37 { play(); } frame 38 { play(); } frame 39 { play(); } frame 40 { play(); } frame 41 { play(); } frame 42 { play(); } frame 43 { play(); } frame 44 { play(); } frame 45 { play(); } frame 46 { play(); } frame 47 { play(); } frame 48 { play(); } frame 49 { play(); } frame 50 { play(); } frame 51 { play(); } frame 52 { play(); } frame 53 { play(); } frame 54 { play(); } frame 55 { play(); } frame 56 { play(); } frame 57 { play(); } frame 58 { play(); } frame 59 { play(); } frame 60 { play(); } frame 61 { play(); } frame 62 { play(); } frame 63 { play(); } frame 64 { play(); } frame 65 { play(); } frame 66 { play(); } frame 67 { play(); } frame 68 { play(); } frame 69 { play(); } frame 70 { play(); } frame 71 { play(); } frame 72 { play(); } frame 73 { play(); } frame 74 { play(); } frame 75 { play(); } frame 76 { play(); } frame 77 { play(); } frame 78 { play(); } frame 79 { play(); } frame 80 { play(); } frame 81 { play(); } frame 82 { play(); } frame 83 { play(); } frame 84 { play(); } frame 85 { play(); } frame 86 { play(); } frame 87 { play(); } frame 88 { play(); } frame 89 { play(); } frame 90 { play(); } frame 91 { play(); } frame 92 { play(); } frame 93 { play(); } frame 94 { play(); } frame 95 { play(); } frame 96 { play(); } frame 97 { play(); } frame 98 { play(); } frame 99 { play(); } frame 100 { play(); } frame 101 { play(); } frame 102 { play(); } frame 103 { play(); } frame 104 { play(); } frame 105 { play(); } frame 106 { play(); } frame 107 { play(); } frame 108 { play(); } frame 109 { play(); } frame 110 { play(); } frame 111 { play(); } frame 112 { play(); } frame 113 { play(); } frame 114 { play(); } frame 115 { play(); } frame 116 { play(); } frame 117 { play(); } frame 118 { play(); } frame 119 { play(); } frame 120 { play(); } frame 121 { play(); } frame 122 { play(); } frame 123 { play(); } frame 124 { play(); } frame 125 { play(); } frame 126 { play(); } frame 127 { play(); } frame 128 { play(); } frame 129 { play(); } frame 130 { play(); } frame 131 { play(); } frame 132 { play(); } frame 133 { play(); } frame 134 { play(); } frame 135 { play(); } frame 136 { play(); } frame 137 { play(); } frame 138 { play(); } frame 139 { play(); } frame 140 { play(); } frame 141 { play(); } frame 142 { play(); } frame 143 { play(); } frame 144 { play(); } frame 145 { play(); } frame 146 { play(); } frame 147 { play(); } frame 148 { play(); } frame 149 { play(); } frame 150 { play(); } frame 151 { play(); } frame 152 { play(); } frame 153 { play(); } frame 154 { play(); } frame 155 { play(); } frame 156 { play(); } frame 157 { play(); } frame 158 { play(); } frame 159 { play(); } frame 160 { play(); } frame 161 { play(); } frame 162 { play(); } frame 163 { play(); } frame 164 { play(); } frame 165 { play(); } frame 166 { play(); } frame 167 { play(); } frame 168 { play(); } frame 169 { play(); } frame 170 { play(); } frame 171 { play(); } frame 172 { play(); } frame 173 { play(); } frame 174 { play(); } frame 175 { play(); } frame 176 { play(); } frame 177 { play(); } frame 178 { play(); } frame 179 { play(); } frame 180 { play(); } frame 181 { play(); } frame 182 { play(); } frame 183 { play(); } frame 184 { play(); } frame 185 { play(); } frame 186 { play(); } frame 187 { play(); } frame 188 { play(); } frame 189 { play(); } frame 190 { play(); } frame 191 { play(); } frame 192 { play(); } frame 193 { play(); } frame 194 { play(); } frame 195 { play(); } frame 196 { play(); } frame 197 { play(); } frame 198 { play(); } frame 199 { play(); } frame 200 { play(); } frame 201 { play(); } frame 202 { play(); } frame 203 { play(); } frame 204 { play(); } frame 205 { play(); } frame 206 { play(); } frame 207 { play(); } frame 208 { play(); } frame 209 { play(); } frame 210 { play(); } frame 211 { play(); } frame 212 { play(); } frame 213 { play(); } frame 214 { play(); } frame 215 { play(); } frame 216 { play(); } frame 217 { play(); } frame 218 { play(); } frame 219 { play(); } frame 220 { play(); } frame 221 { play(); } frame 222 { play(); } frame 223 { play(); } frame 224 { play(); } frame 225 { play(); } frame 226 { play(); } frame 227 { play(); } frame 228 { play(); } frame 229 { play(); } frame 230 { play(); } frame 231 { play(); } frame 232 { play(); } frame 233 { play(); } frame 234 { play(); } frame 235 { play(); } frame 236 { play(); } frame 237 { play(); } frame 238 { play(); } frame 239 { play(); } frame 240 { play(); } frame 241 { play(); } frame 242 { play(); } frame 243 { play(); } frame 244 { play(); } frame 245 { play(); } frame 246 { play(); } frame 247 { play(); } frame 248 { play(); } frame 249 { play(); } frame 250 { play(); } frame 251 { play(); } frame 252 { play(); } frame 253 { play(); } frame 254 { play(); } frame 255 { play(); } frame 256 { play(); } frame 257 { play(); } frame 258 { play(); } frame 259 { play(); } frame 260 { play(); } frame 261 { play(); } frame 262 { play(); } frame 263 { play(); } frame 264 { play(); } frame 265 { play(); } frame 266 { play(); } frame 267 { play(); } frame 268 { play(); } frame 269 { play(); } frame 270 { play(); } frame 271 { play(); } frame 272 { play(); } frame 273 { play(); } frame 274 { play(); } frame 275 { play(); } frame 276 { play(); } frame 277 { play(); } frame 278 { play(); } frame 279 { play(); } frame 280 { play(); } frame 281 { play(); } frame 282 { play(); } frame 283 { play(); } frame 284 { play(); } frame 285 { play(); } frame 286 { play(); } frame 287 { play(); } frame 288 { play(); } frame 289 { play(); } frame 290 { play(); } frame 291 { play(); } frame 292 { play(); } frame 293 { play(); } frame 294 { play(); } frame 295 { play(); } frame 296 { play(); } frame 297 { play(); } frame 298 { play(); } frame 299 { play(); } frame 300 { play(); } frame 301 { play(); } frame 302 { play(); } frame 303 { play(); } frame 304 { play(); } frame 305 { play(); } frame 306 { play(); } frame 307 { play(); } frame 308 { play(); } frame 309 { play(); } frame 310 { play(); } frame 311 { play(); } frame 312 { play(); } frame 313 { play(); } frame 314 { play(); } frame 315 { play(); } frame 316 { play(); } frame 317 { play(); } frame 318 { play(); } frame 319 { play(); } frame 320 { play(); } frame 321 { play(); } frame 322 { play(); } frame 323 { play(); } frame 324 { play(); } frame 325 { play(); } frame 326 { play(); } frame 327 { play(); } frame 328 { play(); } frame 329 { play(); } frame 330 { play(); } frame 331 { play(); } frame 332 { play(); } frame 333 { play(); } frame 334 { play(); } frame 335 { play(); } frame 336 { play(); } frame 337 { play(); } frame 338 { play(); } frame 339 { play(); } frame 340 { play(); } frame 341 { play(); } frame 342 { play(); } frame 343 { play(); } frame 344 { play(); } frame 345 { play(); } frame 346 { play(); } frame 347 { play(); } frame 348 { play(); } frame 349 { play(); } frame 350 { play(); } frame 351 { play(); } frame 352 { play(); } frame 353 { play(); } frame 354 { play(); } frame 355 { play(); } frame 356 { play(); } frame 357 { play(); } frame 358 { play(); } frame 359 { play(); } frame 360 { play(); } frame 361 { play(); } frame 362 { play(); } frame 363 { play(); } frame 364 { play(); } frame 365 { play(); } frame 366 { play(); } frame 367 { play(); } frame 368 { play(); } frame 369 { play(); } frame 370 { play(); } frame 371 { play(); } frame 372 { play(); } frame 373 { play(); } frame 374 { play(); } frame 375 { play(); } frame 376 { play(); } frame 377 { play(); } frame 378 { play(); } frame 379 { play(); } frame 380 { play(); } frame 381 { play(); } frame 382 { play(); } frame 383 { play(); } frame 384 { play(); } frame 385 { play(); } frame 386 { play(); } frame 387 { play(); } frame 388 { play(); } frame 389 { play(); } frame 390 { play(); } frame 391 { play(); } frame 392 { play(); } frame 393 { play(); } frame 394 { play(); } frame 395 { play(); } frame 396 { play(); } frame 397 { play(); } frame 398 { play(); } frame 399 { play(); } frame 400 { play(); } frame 401 { play(); } frame 402 { play(); } frame 403 { play(); } frame 404 { play(); } frame 405 { play(); } frame 406 { play(); } frame 407 { play(); } frame 408 { play(); } frame 409 { play(); } frame 410 { play(); } frame 411 { play(); } frame 412 { play(); } frame 413 { play(); } frame 414 { play(); } frame 415 { play(); } frame 416 { play(); } frame 417 { play(); } frame 418 { play(); } frame 419 { play(); } frame 420 { play(); } frame 421 { play(); } frame 422 { play(); } frame 423 { play(); } frame 424 { play(); } frame 425 { play(); } frame 426 { play(); } frame 427 { play(); } frame 428 { play(); } frame 429 { play(); } frame 430 { play(); } frame 431 { play(); } frame 432 { play(); } frame 433 { play(); } frame 434 { play(); } frame 435 { play(); } frame 436 { play(); } frame 437 { play(); } frame 438 { play(); } frame 439 { play(); } frame 440 { play(); } frame 441 { play(); } frame 442 { play(); } frame 443 { play(); } frame 444 { play(); } frame 445 { play(); } frame 446 { play(); } frame 447 { play(); } frame 448 { play(); } frame 449 { play(); } frame 450 { play(); } frame 451 { play(); } frame 452 { play(); } frame 453 { play(); } frame 454 { play(); } frame 455 { play(); } frame 456 { play(); } frame 457 { play(); } frame 458 { play(); } frame 459 { play(); } frame 460 { play(); } frame 461 { play(); } frame 462 { play(); } frame 463 { play(); } frame 464 { play(); } frame 465 { play(); } frame 466 { play(); } frame 467 { play(); } frame 468 { play(); } frame 469 { play(); } frame 470 { play(); } frame 471 { play(); } frame 472 { play(); } frame 473 { play(); } frame 474 { play(); } frame 475 { play(); } frame 476 { play(); } frame 477 { play(); } frame 478 { play(); } frame 479 { play(); } frame 480 { play(); } frame 481 { play(); } frame 482 { play(); } frame 483 { play(); } frame 484 { play(); } frame 485 { play(); } frame 486 { play(); } frame 487 { play(); } frame 488 { play(); } frame 489 { play(); } frame 490 { play(); } frame 491 { play(); } frame 492 { play(); } frame 493 { play(); } frame 494 { play(); } frame 495 { play(); } frame 496 { play(); } frame 497 { play(); } frame 498 { play(); } frame 499 { play(); } frame 500 { play(); } frame 501 { play(); } frame 502 { play(); } frame 503 { play(); } frame 504 { play(); } frame 505 { play(); } frame 506 { play(); } frame 507 { play(); } frame 508 { play(); } frame 509 { play(); } frame 510 { play(); } frame 511 { play(); } frame 512 { play(); } frame 513 { play(); } frame 514 { play(); } frame 515 { play(); } frame 516 { play(); } frame 517 { play(); } frame 518 { play(); } frame 519 { play(); } frame 520 { play(); } frame 521 { play(); } frame 522 { play(); } frame 523 { play(); } frame 524 { play(); } frame 525 { play(); } frame 526 { play(); } frame 527 { play(); } frame 528 { play(); } frame 529 { play(); } frame 530 { play(); } frame 531 { play(); } frame 532 { play(); } frame 533 { play(); } frame 534 { play(); } frame 535 { play(); } frame 536 { play(); } frame 537 { play(); } frame 538 { play(); } frame 539 { play(); } frame 540 { play(); } frame 541 { play(); } frame 542 { play(); } frame 543 { play(); } frame 544 { play(); } frame 545 { play(); } frame 546 { play(); } frame 547 { play(); } frame 548 { play(); } frame 549 { play(); } frame 550 { play(); } frame 551 { play(); } frame 552 { play(); } frame 553 { play(); } frame 554 { play(); } frame 555 { play(); } frame 556 { play(); } frame 557 { play(); } frame 558 { play(); } frame 559 { play(); } frame 560 { play(); } frame 561 { play(); } frame 562 { play(); } frame 563 { play(); } frame 564 { play(); } frame 565 { play(); } frame 566 { play(); } frame 567 { play(); } frame 568 { play(); } frame 569 { play(); } frame 570 { play(); } frame 571 { play(); } frame 572 { play(); } frame 573 { play(); } frame 574 { play(); } frame 575 { play(); } frame 576 { play(); } frame 577 { play(); } frame 578 { play(); } frame 579 { play(); } frame 580 { play(); } frame 581 { play(); } frame 582 { play(); } frame 583 { play(); } frame 584 { play(); } frame 585 { play(); } frame 586 { play(); } frame 587 { play(); } frame 588 { play(); } frame 589 { play(); } frame 590 { play(); } frame 591 { play(); } frame 592 { play(); } frame 593 { play(); } frame 594 { play(); } frame 595 { play(); } frame 596 { play(); } frame 597 { play(); } frame 598 { play(); } frame 599 { play(); } frame 600 { play(); } frame 601 { play(); } frame 602 { play(); } frame 603 { play(); } frame 604 { play(); } frame 605 { play(); } frame 606 { play(); } frame 607 { play(); } frame 608 { play(); } frame 609 { play(); } frame 610 { play(); } frame 611 { play(); } frame 612 { play(); } frame 613 { play(); } frame 614 { play(); } frame 615 { play(); } frame 616 { play(); } frame 617 { play(); } frame 618 { play(); } frame 619 { play(); } frame 620 { play(); } frame 621 { play(); } frame 622 { play(); } frame 623 { play(); } frame 624 { play(); } frame 625 { play(); } frame 626 { play(); } frame 627 { play(); } frame 628 { play(); } frame 629 { play(); } frame 630 { play(); } frame 631 { play(); } frame 632 { play(); } frame 633 { play(); } frame 634 { play(); } frame 635 { play(); } frame 636 { play(); } frame 637 { play(); } frame 638 { play(); } frame 639 { play(); } frame 640 { play(); } frame 641 { play(); } frame 642 { play(); } frame 643 { play(); } frame 644 { play(); } frame 645 { play(); } frame 646 { play(); } frame 647 { play(); } frame 648 { play(); } frame 649 { play(); } frame 650 { play(); } frame 651 { play(); } frame 652 { play(); } frame 653 { play(); } frame 654 { play(); } frame 655 { play(); } frame 656 { play(); } frame 657 { play(); } frame 658 { play(); } frame 659 { play(); } frame 660 { play(); } frame 661 { play(); } frame 662 { play(); } frame 663 { play(); } frame 664 { play(); } frame 665 { play(); } frame 666 { play(); } frame 667 { play(); } frame 668 { play(); } frame 669 { play(); } frame 670 { play(); } frame 671 { play(); } frame 672 { play(); } frame 673 { play(); } frame 674 { play(); } frame 675 { play(); } frame 676 { play(); } frame 677 { play(); } frame 678 { play(); } frame 679 { play(); } frame 680 { play(); } frame 681 { play(); } frame 682 { play(); } frame 683 { play(); } frame 684 { play(); } frame 685 { play(); } frame 686 { play(); } frame 687 { play(); } frame 688 { play(); } frame 689 { play(); } frame 690 { play(); } frame 691 { play(); } frame 692 { play(); } frame 693 { play(); } frame 694 { play(); } frame 695 { play(); } frame 696 { play(); } frame 697 { play(); } frame 698 { play(); } frame 699 { play(); } frame 700 { play(); } frame 701 { play(); } frame 702 { play(); } frame 703 { play(); } frame 704 { play(); } frame 705 { play(); } frame 706 { play(); } frame 707 { play(); } frame 708 { play(); } frame 709 { play(); } frame 710 { play(); } frame 711 { play(); } frame 712 { play(); } frame 713 { play(); } frame 714 { play(); } frame 715 { play(); } frame 716 { play(); } frame 717 { play(); } frame 718 { play(); } frame 719 { play(); } frame 720 { play(); } frame 721 { play(); } frame 722 { play(); } frame 723 { play(); } frame 724 { play(); } frame 725 { play(); } frame 726 { play(); } frame 727 { play(); } frame 728 { play(); } frame 729 { play(); } frame 730 { play(); } frame 731 { play(); } frame 732 { play(); } frame 733 { play(); } frame 734 { play(); } frame 735 { play(); } frame 736 { play(); } frame 737 { play(); } frame 738 { play(); } frame 739 { play(); } frame 740 { play(); } frame 741 { play(); } frame 742 { play(); } frame 743 { play(); } frame 744 { play(); } frame 745 { play(); } frame 746 { play(); } frame 747 { play(); } frame 748 { play(); } frame 749 { play(); } frame 750 { play(); } frame 751 { play(); } frame 752 { play(); } frame 753 { play(); } frame 754 { play(); } frame 755 { play(); } frame 756 { play(); } frame 757 { play(); } frame 758 { play(); } frame 759 { play(); } frame 760 { play(); } frame 761 { play(); } frame 762 { play(); } frame 763 { play(); } frame 764 { play(); } frame 765 { play(); } frame 766 { play(); } frame 767 { play(); } frame 768 { play(); } frame 769 { play(); } frame 770 { play(); } frame 771 { play(); } frame 772 { play(); } frame 773 { play(); } frame 774 { play(); } frame 775 { play(); } frame 776 { play(); } frame 777 { play(); } frame 778 { play(); } frame 779 { play(); } frame 780 { play(); } frame 781 { play(); } frame 782 { play(); } frame 783 { play(); } frame 784 { play(); } frame 785 { play(); } frame 786 { play(); } frame 787 { play(); } frame 788 { play(); } frame 789 { play(); } frame 790 { play(); } frame 791 { play(); } frame 792 { play(); } frame 793 { play(); } frame 794 { play(); } frame 795 { play(); } frame 796 { play(); } frame 797 { play(); } frame 798 { play(); } frame 799 { play(); } frame 800 { play(); } frame 801 { play(); } frame 802 { play(); } frame 803 { play(); } frame 804 { play(); } frame 805 { play(); } frame 806 { play(); } frame 807 { play(); } frame 808 { play(); } frame 809 { play(); } frame 810 { play(); } frame 811 { play(); } frame 812 { play(); } frame 813 { play(); } frame 814 { play(); } frame 815 { play(); } frame 816 { play(); } frame 817 { play(); } frame 818 { play(); } frame 819 { play(); } frame 820 { play(); } frame 821 { play(); } frame 822 { play(); } frame 823 { play(); } frame 824 { play(); } frame 825 { play(); } frame 826 { play(); } frame 827 { play(); } frame 828 { play(); } frame 829 { play(); } frame 830 { play(); } frame 831 { play(); } frame 832 { play(); } frame 833 { play(); } frame 834 { play(); } frame 835 { play(); } frame 836 { play(); } frame 837 { play(); } frame 838 { play(); } frame 839 { play(); } frame 840 { play(); } frame 841 { play(); } frame 842 { play(); } frame 843 { play(); } frame 844 { play(); } frame 845 { play(); } frame 846 { play(); } frame 847 { play(); } frame 848 { play(); } frame 849 { play(); } frame 850 { play(); } frame 851 { play(); } frame 852 { play(); } frame 853 { play(); } frame 854 { play(); } frame 855 { play(); } frame 856 { play(); } frame 857 { play(); } frame 858 { play(); } frame 859 { play(); } frame 860 { play(); } frame 861 { play(); } frame 862 { play(); } frame 863 { play(); } frame 864 { play(); } frame 865 { play(); } frame 866 { play(); } frame 867 { play(); } frame 868 { play(); } frame 869 { play(); } frame 870 { play(); } frame 871 { play(); } frame 872 { play(); } frame 873 { play(); } frame 874 { play(); } frame 875 { play(); } frame 876 { play(); } frame 877 { play(); } frame 878 { play(); } frame 879 { play(); } frame 880 { play(); } frame 881 { play(); } frame 882 { play(); } frame 883 { play(); } frame 884 { play(); } frame 885 { play(); } frame 886 { play(); } frame 887 { play(); } frame 888 { play(); } frame 889 { play(); } frame 890 { play(); } frame 891 { play(); } frame 892 { play(); } frame 893 { play(); } frame 894 { play(); } frame 895 { play(); } frame 896 { play(); } frame 897 { play(); } frame 898 { play(); } frame 899 { play(); } frame 900 { gotoAndStop(2); } } movieClip 1147 area122 { } movieClip 1149 { } movieClip 1151 { } movieClip 1152 area121 { } movieClip 1153 { } movieClip 1156 area124 { } movieClip 1157 { } movieClip 1159 { } movieClip 1168 { frame 1 { stop(); } } movieClip 1169 area123 { } movieClip 1170 { frame 1 { stop(); } } movieClip 1172 { } movieClip 1186 { } movieClip 1188 { } movieClip 1189 { frame 1 { stop(); } } movieClip 1190 { frame 1 { stop(); } } movieClip 1197 { frame 1 { stop(); } } movieClip 1229 { frame 1 { stop(); } instance of movieClip 3 { onClipEvent (release) { getURL('http://www.maxgames.com', '_blank'); } } } movieClip 1232 map12 { } movieClip 1234 { } movieClip 1236 { } movieClip 1237 { } movieClip 1238 { } movieClip 1242 { } movieClip 1247 { frame 1 { stop(); } } movieClip 1248 area112 { frame 1 { stop(); } } movieClip 1249 { } movieClip 1251 area111 { frame 1 { stop(); } } movieClip 1252 { } movieClip 1254 area114 { frame 1 { stop(); } } movieClip 1255 { } movieClip 1257 area113 { frame 1 { stop(); } } movieClip 1258 { frame 1 { stop(); } } movieClip 1261 map11 { } movieClip 1263 { } movieClip 1264 { } movieClip 1267 { } movieClip 1270 area102 { } movieClip 1271 { } movieClip 1272 area101 { } movieClip 1273 { } movieClip 1275 area104 { } movieClip 1276 { } movieClip 1279 area103 { } movieClip 1280 { frame 1 { stop(); } } movieClip 1283 map10 { } movieClip 1289 { } movieClip 1297 { } movieClip 1298 { } movieClip 1306 { } movieClip 1307 { } movieClip 1309 pohon_mc { } movieClip 1311 pohon_mc2 { } movieClip 1312 { } movieClip 1314 area92 { frame 1 { stop(); } } movieClip 1315 { } movieClip 1318 area91 { } movieClip 1319 { } movieClip 1321 area94 { } movieClip 1322 { } movieClip 1327 area93 { frame 1 { stop(); } } movieClip 1328 { frame 1 { stop(); } } movieClip 1331 map9 { } movieClip 1332 { } movieClip 1333 { } movieClip 1335 area82 { frame 1 { stop(); } } movieClip 1337 { } movieClip 1339 area81 { frame 1 { stop(); } } movieClip 1340 { } movieClip 1341 area84 { frame 1 { stop(); } } movieClip 1342 { } movieClip 1343 area83 { frame 1 { stop(); } } movieClip 1344 { frame 1 { stop(); } } movieClip 1347 map8 { } movieClip 1349 { } movieClip 1350 { } movieClip 1351 area72 { frame 1 { stop(); } } movieClip 1352 { } movieClip 1353 area71 { frame 1 { stop(); } } movieClip 1354 { } movieClip 1356 area74 { frame 1 { stop(); } } movieClip 1357 { frame 1 { stop(); } } movieClip 1359 area73 { frame 1 { stop(); } } movieClip 1360 { frame 1 { stop(); } } movieClip 1363 map7 { } movieClip 1366 { } movieClip 1367 area62 { frame 1 { stop(); } } movieClip 1368 { } movieClip 1373 { frame 1 { stop(); } frame 2 { play(); } frame 3 { play(); } frame 4 { play(); } frame 5 { play(); } frame 6 { play(); } frame 7 { play(); } frame 8 { play(); } frame 9 { play(); } frame 10 { play(); } frame 11 { play(); } frame 12 { play(); } frame 13 { play(); } frame 14 { play(); } frame 15 { play(); } frame 16 { play(); } frame 17 { play(); } frame 18 { play(); } frame 19 { play(); } frame 20 { play(); } frame 21 { play(); } frame 22 { play(); } frame 23 { play(); } frame 24 { play(); } frame 25 { play(); } frame 26 { play(); } frame 27 { play(); } frame 28 { play(); } frame 29 { play(); } frame 30 { play(); } frame 31 { play(); } frame 32 { play(); } frame 33 { play(); } frame 34 { play(); } frame 35 { play(); } frame 36 { play(); } frame 37 { play(); } frame 38 { play(); } frame 39 { play(); } frame 40 { play(); } frame 41 { play(); } frame 42 { play(); } frame 43 { play(); } frame 44 { play(); } frame 45 { play(); } frame 46 { play(); } frame 47 { play(); } frame 48 { play(); } frame 49 { play(); } frame 50 { play(); } frame 51 { play(); } frame 52 { play(); } frame 53 { play(); } frame 54 { play(); } frame 55 { play(); } frame 56 { play(); } frame 57 { play(); } frame 58 { play(); } frame 59 { play(); } frame 60 { play(); } frame 61 { play(); } frame 62 { play(); } frame 63 { play(); } frame 64 { play(); } frame 65 { play(); } frame 66 { play(); } frame 67 { play(); } frame 68 { play(); } frame 69 { play(); } frame 70 { play(); } frame 71 { play(); } frame 72 { play(); } frame 73 { play(); } frame 74 { play(); } frame 75 { play(); } frame 76 { play(); } frame 77 { play(); } frame 78 { play(); } frame 79 { play(); } frame 80 { play(); } frame 81 { play(); } frame 82 { play(); } frame 83 { play(); } frame 84 { play(); } frame 85 { play(); } frame 86 { play(); } frame 87 { play(); } frame 88 { play(); } frame 89 { play(); } frame 90 { play(); } frame 91 { play(); } frame 92 { play(); } frame 93 { play(); } frame 94 { play(); } frame 95 { play(); } frame 96 { play(); } frame 97 { play(); } frame 98 { play(); } frame 99 { play(); } frame 100 { play(); } frame 101 { play(); } frame 102 { play(); } frame 103 { play(); } frame 104 { play(); } frame 105 { play(); } frame 106 { play(); } frame 107 { play(); } frame 108 { play(); } frame 109 { play(); } frame 110 { play(); } frame 111 { play(); } frame 112 { play(); } frame 113 { play(); } frame 114 { play(); } frame 115 { play(); } frame 116 { play(); } frame 117 { play(); } frame 118 { play(); } frame 119 { play(); } frame 120 { play(); } frame 121 { play(); } frame 122 { play(); } frame 123 { play(); } frame 124 { play(); } frame 125 { play(); } frame 126 { play(); } frame 127 { play(); } frame 128 { play(); } frame 129 { play(); } frame 130 { play(); } frame 131 { play(); } frame 132 { play(); } frame 133 { play(); } frame 134 { play(); } frame 135 { play(); } frame 136 { play(); } frame 137 { play(); } frame 138 { play(); } frame 139 { play(); } frame 140 { play(); } frame 141 { play(); } frame 142 { play(); } frame 143 { play(); } frame 144 { play(); } frame 145 { play(); } frame 146 { play(); } frame 147 { play(); } frame 148 { play(); } frame 149 { play(); } frame 150 { play(); } frame 151 { play(); } frame 152 { play(); } frame 153 { play(); } frame 154 { play(); } frame 155 { play(); } frame 156 { play(); } frame 157 { play(); } frame 158 { play(); } frame 159 { play(); } frame 160 { play(); } frame 161 { play(); } frame 162 { play(); } frame 163 { play(); } frame 164 { play(); } frame 165 { play(); } frame 166 { play(); } frame 167 { play(); } frame 168 { play(); } frame 169 { play(); } frame 170 { play(); } frame 171 { play(); } frame 172 { play(); } frame 173 { play(); } frame 174 { play(); } frame 175 { play(); } frame 176 { play(); } frame 177 { play(); } frame 178 { play(); } frame 179 { play(); } frame 180 { play(); } frame 181 { play(); } frame 182 { play(); } frame 183 { play(); } frame 184 { play(); } frame 185 { play(); } frame 186 { play(); } frame 187 { play(); } frame 188 { play(); } frame 189 { play(); } frame 190 { play(); } frame 191 { play(); } frame 192 { play(); } frame 193 { play(); } frame 194 { play(); } frame 195 { play(); } frame 196 { play(); } frame 197 { play(); } frame 198 { play(); } frame 199 { play(); } frame 200 { play(); } frame 201 { play(); } frame 202 { play(); } frame 203 { play(); } frame 204 { play(); } frame 205 { play(); } frame 206 { play(); } frame 207 { play(); } frame 208 { play(); } frame 209 { play(); } frame 210 { play(); } frame 211 { play(); } frame 212 { play(); } frame 213 { play(); } frame 214 { play(); } frame 215 { play(); } frame 216 { play(); } frame 217 { play(); } frame 218 { play(); } frame 219 { play(); } frame 220 { play(); } frame 221 { play(); } frame 222 { play(); } frame 223 { play(); } frame 224 { play(); } frame 225 { play(); } frame 226 { play(); } frame 227 { play(); } frame 228 { play(); } frame 229 { play(); } frame 230 { play(); } frame 231 { play(); } frame 232 { play(); } frame 233 { play(); } frame 234 { play(); } frame 235 { play(); } frame 236 { play(); } frame 237 { play(); } frame 238 { play(); } frame 239 { play(); } frame 240 { play(); } frame 241 { play(); } frame 242 { play(); } frame 243 { play(); } frame 244 { play(); } frame 245 { play(); } frame 246 { play(); } frame 247 { play(); } frame 248 { play(); } frame 249 { play(); } frame 250 { play(); } frame 251 { play(); } frame 252 { play(); } frame 253 { play(); } frame 254 { play(); } frame 255 { play(); } frame 256 { play(); } frame 257 { play(); } frame 258 { play(); } frame 259 { play(); } frame 260 { play(); } frame 261 { play(); } frame 262 { play(); } frame 263 { play(); } frame 264 { play(); } frame 265 { play(); } frame 266 { play(); } frame 267 { play(); } frame 268 { play(); } frame 269 { play(); } frame 270 { play(); } frame 271 { play(); } frame 272 { play(); } frame 273 { play(); } frame 274 { play(); } frame 275 { play(); } frame 276 { play(); } frame 277 { play(); } frame 278 { play(); } frame 279 { play(); } frame 280 { play(); } frame 281 { play(); } frame 282 { play(); } frame 283 { play(); } frame 284 { play(); } frame 285 { play(); } frame 286 { play(); } frame 287 { play(); } frame 288 { play(); } frame 289 { play(); } frame 290 { play(); } frame 291 { play(); } frame 292 { play(); } frame 293 { play(); } frame 294 { play(); } frame 295 { play(); } frame 296 { play(); } frame 297 { play(); } frame 298 { play(); } frame 299 { play(); } frame 300 { play(); } frame 301 { play(); } frame 302 { play(); } frame 303 { play(); } frame 304 { play(); } frame 305 { play(); } frame 306 { play(); } frame 307 { play(); } frame 308 { play(); } frame 309 { play(); } frame 310 { play(); } frame 311 { play(); } frame 312 { play(); } frame 313 { play(); } frame 314 { play(); } frame 315 { play(); } frame 316 { play(); } frame 317 { play(); } frame 318 { play(); } frame 319 { play(); } frame 320 { play(); } frame 321 { play(); } frame 322 { play(); } frame 323 { play(); } frame 324 { play(); } frame 325 { play(); } frame 326 { play(); } frame 327 { play(); } frame 328 { play(); } frame 329 { play(); } frame 330 { play(); } frame 331 { play(); } frame 332 { play(); } frame 333 { play(); } frame 334 { play(); } frame 335 { play(); } frame 336 { play(); } frame 337 { play(); } frame 338 { play(); } frame 339 { play(); } frame 340 { play(); } frame 341 { play(); } frame 342 { play(); } frame 343 { play(); } frame 344 { play(); } frame 345 { play(); } frame 346 { play(); } frame 347 { play(); } frame 348 { play(); } frame 349 { play(); } frame 350 { play(); } frame 351 { play(); } frame 352 { play(); } frame 353 { play(); } frame 354 { play(); } frame 355 { play(); } frame 356 { play(); } frame 357 { play(); } frame 358 { play(); } frame 359 { play(); } frame 360 { play(); } frame 361 { play(); } frame 362 { play(); } frame 363 { play(); } frame 364 { play(); } frame 365 { play(); } frame 366 { play(); } frame 367 { play(); } frame 368 { play(); } frame 369 { play(); } frame 370 { play(); } frame 371 { play(); } frame 372 { play(); } frame 373 { play(); } frame 374 { play(); } frame 375 { play(); } frame 376 { play(); } frame 377 { play(); } frame 378 { play(); } frame 379 { play(); } frame 380 { play(); } frame 381 { play(); } frame 382 { play(); } frame 383 { play(); } frame 384 { play(); } frame 385 { play(); } frame 386 { play(); } frame 387 { play(); } frame 388 { play(); } frame 389 { play(); } frame 390 { play(); } frame 391 { play(); } frame 392 { play(); } frame 393 { play(); } frame 394 { play(); } frame 395 { play(); } frame 396 { play(); } frame 397 { play(); } frame 398 { play(); } frame 399 { play(); } frame 400 { play(); } frame 401 { play(); } frame 402 { play(); } frame 403 { play(); } frame 404 { play(); } frame 405 { play(); } frame 406 { play(); } frame 407 { play(); } frame 408 { play(); } frame 409 { play(); } frame 410 { play(); } frame 411 { play(); } frame 412 { play(); } frame 413 { play(); } frame 414 { play(); } frame 415 { play(); } frame 416 { play(); } frame 417 { play(); } frame 418 { play(); } frame 419 { play(); } frame 420 { play(); } frame 421 { play(); } frame 422 { play(); } frame 423 { play(); } frame 424 { play(); } frame 425 { play(); } frame 426 { play(); } frame 427 { play(); } frame 428 { play(); } frame 429 { play(); } frame 430 { play(); } frame 431 { play(); } frame 432 { play(); } frame 433 { play(); } frame 434 { play(); } frame 435 { play(); } frame 436 { play(); } frame 437 { play(); } frame 438 { play(); } frame 439 { play(); } frame 440 { play(); } frame 441 { play(); } frame 442 { play(); } frame 443 { play(); } frame 444 { play(); } frame 445 { play(); } frame 446 { play(); } frame 447 { play(); } frame 448 { play(); } frame 449 { play(); } frame 450 { play(); } frame 451 { play(); } frame 452 { play(); } frame 453 { play(); } frame 454 { play(); } frame 455 { play(); } frame 456 { play(); } frame 457 { play(); } frame 458 { play(); } frame 459 { play(); } frame 460 { play(); } frame 461 { play(); } frame 462 { play(); } frame 463 { play(); } frame 464 { play(); } frame 465 { play(); } frame 466 { play(); } frame 467 { play(); } frame 468 { play(); } frame 469 { play(); } frame 470 { play(); } frame 471 { play(); } frame 472 { play(); } frame 473 { play(); } frame 474 { play(); } frame 475 { play(); } frame 476 { play(); } frame 477 { play(); } frame 478 { play(); } frame 479 { play(); } frame 480 { play(); } frame 481 { play(); } frame 482 { play(); } frame 483 { play(); } frame 484 { play(); } frame 485 { play(); } frame 486 { play(); } frame 487 { play(); } frame 488 { play(); } frame 489 { play(); } frame 490 { play(); } frame 491 { play(); } frame 492 { play(); } frame 493 { play(); } frame 494 { play(); } frame 495 { play(); } frame 496 { play(); } frame 497 { play(); } frame 498 { play(); } frame 499 { play(); } frame 500 { play(); } frame 501 { play(); } frame 502 { play(); } frame 503 { play(); } frame 504 { play(); } frame 505 { play(); } frame 506 { play(); } frame 507 { play(); } frame 508 { play(); } frame 509 { play(); } frame 510 { play(); } frame 511 { play(); } frame 512 { play(); } frame 513 { play(); } frame 514 { play(); } frame 515 { play(); } frame 516 { play(); } frame 517 { play(); } frame 518 { play(); } frame 519 { play(); } frame 520 { play(); } frame 521 { play(); } frame 522 { play(); } frame 523 { play(); } frame 524 { play(); } frame 525 { play(); } frame 526 { play(); } frame 527 { play(); } frame 528 { play(); } frame 529 { play(); } frame 530 { play(); } frame 531 { play(); } frame 532 { play(); } frame 533 { play(); } frame 534 { play(); } frame 535 { play(); } frame 536 { play(); } frame 537 { play(); } frame 538 { play(); } frame 539 { play(); } frame 540 { play(); } frame 541 { play(); } frame 542 { play(); } frame 543 { play(); } frame 544 { play(); } frame 545 { play(); } frame 546 { play(); } frame 547 { play(); } frame 548 { play(); } frame 549 { play(); } frame 550 { play(); } frame 551 { play(); } frame 552 { play(); } frame 553 { play(); } frame 554 { play(); } frame 555 { play(); } frame 556 { play(); } frame 557 { play(); } frame 558 { play(); } frame 559 { play(); } frame 560 { play(); } frame 561 { play(); } frame 562 { play(); } frame 563 { play(); } frame 564 { play(); } frame 565 { play(); } frame 566 { play(); } frame 567 { play(); } frame 568 { play(); } frame 569 { play(); } frame 570 { play(); } frame 571 { play(); } frame 572 { play(); } frame 573 { play(); } frame 574 { play(); } frame 575 { play(); } frame 576 { play(); } frame 577 { play(); } frame 578 { play(); } frame 579 { play(); } frame 580 { play(); } frame 581 { play(); } frame 582 { play(); } frame 583 { play(); } frame 584 { play(); } frame 585 { play(); } frame 586 { play(); } frame 587 { play(); } frame 588 { play(); } frame 589 { play(); } frame 590 { play(); } frame 591 { play(); } frame 592 { play(); } frame 593 { play(); } frame 594 { play(); } frame 595 { play(); } frame 596 { play(); } frame 597 { play(); } frame 598 { play(); } frame 599 { play(); } frame 600 { play(); } frame 601 { play(); } frame 602 { play(); } frame 603 { play(); } frame 604 { play(); } frame 605 { play(); } frame 606 { play(); } frame 607 { play(); } frame 608 { play(); } frame 609 { play(); } frame 610 { play(); } frame 611 { play(); } frame 612 { play(); } frame 613 { play(); } frame 614 { play(); } frame 615 { play(); } frame 616 { play(); } frame 617 { play(); } frame 618 { play(); } frame 619 { play(); } frame 620 { play(); } frame 621 { play(); } frame 622 { play(); } frame 623 { play(); } frame 624 { play(); } frame 625 { play(); } frame 626 { play(); } frame 627 { play(); } frame 628 { play(); } frame 629 { play(); } frame 630 { play(); } frame 631 { play(); } frame 632 { play(); } frame 633 { play(); } frame 634 { play(); } frame 635 { play(); } frame 636 { play(); } frame 637 { play(); } frame 638 { play(); } frame 639 { play(); } frame 640 { play(); } frame 641 { play(); } frame 642 { play(); } frame 643 { play(); } frame 644 { play(); } frame 645 { play(); } frame 646 { play(); } frame 647 { play(); } frame 648 { play(); } frame 649 { play(); } frame 650 { play(); } frame 651 { play(); } frame 652 { play(); } frame 653 { play(); } frame 654 { play(); } frame 655 { play(); } frame 656 { play(); } frame 657 { play(); } frame 658 { play(); } frame 659 { play(); } frame 660 { play(); } frame 661 { play(); } frame 662 { play(); } frame 663 { play(); } frame 664 { play(); } frame 665 { play(); } frame 666 { play(); } frame 667 { play(); } frame 668 { play(); } frame 669 { play(); } frame 670 { play(); } frame 671 { play(); } frame 672 { play(); } frame 673 { play(); } frame 674 { play(); } frame 675 { play(); } frame 676 { play(); } frame 677 { play(); } frame 678 { play(); } frame 679 { play(); } frame 680 { play(); } frame 681 { play(); } frame 682 { play(); } frame 683 { play(); } frame 684 { play(); } frame 685 { play(); } frame 686 { play(); } frame 687 { play(); } frame 688 { play(); } frame 689 { play(); } frame 690 { play(); } frame 691 { play(); } frame 692 { play(); } frame 693 { play(); } frame 694 { play(); } frame 695 { play(); } frame 696 { play(); } frame 697 { play(); } frame 698 { play(); } frame 699 { play(); } frame 700 { play(); } frame 701 { play(); } frame 702 { play(); } frame 703 { play(); } frame 704 { play(); } frame 705 { play(); } frame 706 { play(); } frame 707 { play(); } frame 708 { play(); } frame 709 { play(); } frame 710 { play(); } frame 711 { play(); } frame 712 { play(); } frame 713 { play(); } frame 714 { play(); } frame 715 { play(); } frame 716 { play(); } frame 717 { play(); } frame 718 { play(); } frame 719 { play(); } frame 720 { play(); } frame 721 { play(); } frame 722 { play(); } frame 723 { play(); } frame 724 { play(); } frame 725 { play(); } frame 726 { play(); } frame 727 { play(); } frame 728 { play(); } frame 729 { play(); } frame 730 { play(); } frame 731 { play(); } frame 732 { play(); } frame 733 { play(); } frame 734 { play(); } frame 735 { play(); } frame 736 { play(); } frame 737 { play(); } frame 738 { play(); } frame 739 { play(); } frame 740 { play(); } frame 741 { play(); } frame 742 { play(); } frame 743 { play(); } frame 744 { play(); } frame 745 { play(); } frame 746 { play(); } frame 747 { play(); } frame 748 { play(); } frame 749 { play(); } frame 750 { play(); } frame 751 { play(); } frame 752 { play(); } frame 753 { play(); } frame 754 { play(); } frame 755 { play(); } frame 756 { play(); } frame 757 { play(); } frame 758 { play(); } frame 759 { play(); } frame 760 { play(); } frame 761 { play(); } frame 762 { play(); } frame 763 { play(); } frame 764 { play(); } frame 765 { play(); } frame 766 { play(); } frame 767 { play(); } frame 768 { play(); } frame 769 { play(); } frame 770 { play(); } frame 771 { play(); } frame 772 { play(); } frame 773 { play(); } frame 774 { play(); } frame 775 { play(); } frame 776 { play(); } frame 777 { play(); } frame 778 { play(); } frame 779 { play(); } frame 780 { play(); } frame 781 { play(); } frame 782 { play(); } frame 783 { play(); } frame 784 { play(); } frame 785 { play(); } frame 786 { play(); } frame 787 { play(); } frame 788 { play(); } frame 789 { play(); } frame 790 { play(); } frame 791 { play(); } frame 792 { play(); } frame 793 { play(); } frame 794 { play(); } frame 795 { play(); } frame 796 { play(); } frame 797 { play(); } frame 798 { play(); } frame 799 { play(); } frame 800 { play(); } frame 801 { play(); } frame 802 { play(); } frame 803 { play(); } frame 804 { play(); } frame 805 { play(); } frame 806 { play(); } frame 807 { play(); } frame 808 { play(); } frame 809 { play(); } frame 810 { play(); } frame 811 { play(); } frame 812 { play(); } frame 813 { play(); } frame 814 { play(); } frame 815 { play(); } frame 816 { play(); } frame 817 { play(); } frame 818 { play(); } frame 819 { play(); } frame 820 { play(); } frame 821 { play(); } frame 822 { play(); } frame 823 { play(); } frame 824 { play(); } frame 825 { play(); } frame 826 { play(); } frame 827 { play(); } frame 828 { play(); } frame 829 { play(); } frame 830 { play(); } frame 831 { play(); } frame 832 { play(); } frame 833 { play(); } frame 834 { play(); } frame 835 { play(); } frame 836 { play(); } frame 837 { play(); } frame 838 { play(); } frame 839 { play(); } frame 840 { play(); } frame 841 { play(); } frame 842 { play(); } frame 843 { play(); } frame 844 { play(); } frame 845 { play(); } frame 846 { play(); } frame 847 { play(); } frame 848 { play(); } frame 849 { play(); } frame 850 { play(); } frame 851 { play(); } frame 852 { play(); } frame 853 { play(); } frame 854 { play(); } frame 855 { play(); } frame 856 { play(); } frame 857 { play(); } frame 858 { play(); } frame 859 { play(); } frame 860 { play(); } frame 861 { play(); } frame 862 { play(); } frame 863 { play(); } frame 864 { play(); } frame 865 { play(); } frame 866 { play(); } frame 867 { play(); } frame 868 { play(); } frame 869 { play(); } frame 870 { play(); } frame 871 { play(); } frame 872 { play(); } frame 873 { play(); } frame 874 { play(); } frame 875 { play(); } frame 876 { play(); } frame 877 { play(); } frame 878 { play(); } frame 879 { play(); } frame 880 { play(); } frame 881 { play(); } frame 882 { play(); } frame 883 { play(); } frame 884 { play(); } frame 885 { play(); } frame 886 { play(); } frame 887 { play(); } frame 888 { play(); } frame 889 { play(); } frame 890 { play(); } frame 891 { play(); } frame 892 { play(); } frame 893 { play(); } frame 894 { play(); } frame 895 { play(); } frame 896 { play(); } frame 897 { play(); } frame 898 { play(); } frame 899 { play(); } frame 900 { gotoAndStop(2); } } movieClip 1375 area61 { frame 1 { stop(); } } movieClip 1376 { } movieClip 1379 area64 { frame 1 { stop(); } } movieClip 1380 { frame 1 { stop(); } } movieClip 1383 area63 { frame 1 { stop(); } } movieClip 1384 { frame 1 { stop(); } } movieClip 1387 map6 { } movieClip 1388 { } movieClip 1389 { } movieClip 1391 area51 { } movieClip 1392 { } movieClip 1393 area54 { } movieClip 1394 { frame 1 { stop(); } } movieClip 1395 area53 { } movieClip 1396 { frame 1 { stop(); } } movieClip 1399 map5 { } movieClip 1401 area42 { frame 1 { stop(); } } movieClip 1402 { } movieClip 1404 area41 { frame 1 { stop(); } } movieClip 1405 { } movieClip 1406 area44 { frame 1 { stop(); } } movieClip 1407 { frame 1 { stop(); } } movieClip 1408 area43 { frame 1 { stop(); } } movieClip 1409 { frame 1 { stop(); } } movieClip 1412 map4 { } movieClip 1414 area32 { frame 1 { stop(); } } movieClip 1415 { } movieClip 1419 area31 { frame 1 { stop(); } } movieClip 1420 { } movieClip 1421 area34 { frame 1 { stop(); } } movieClip 1422 { frame 1 { stop(); } } movieClip 1423 area33 { frame 1 { stop(); } } movieClip 1424 { frame 1 { stop(); } } movieClip 1427 map3 { } movieClip 1430 area22 { frame 1 { stop(); } } movieClip 1431 { } movieClip 1434 area21 { frame 1 { stop(); } } movieClip 1435 { } movieClip 1436 area24 { frame 1 { stop(); } } movieClip 1437 { frame 1 { stop(); } } movieClip 1439 area23 { frame 1 { stop(); } } movieClip 1440 { frame 1 { stop(); } } movieClip 1443 map2 { } movieClip 1445 area12 { frame 1 { stop(); } } movieClip 1447 { } movieClip 1449 { frame 1 { stop(); } frame 2 { play(); } frame 3 { play(); } frame 4 { play(); } frame 5 { play(); } frame 6 { play(); } frame 7 { play(); } frame 8 { play(); } frame 9 { play(); } frame 10 { play(); } frame 11 { play(); } frame 12 { play(); } frame 13 { play(); } frame 14 { play(); } frame 15 { play(); } frame 16 { play(); } frame 17 { play(); } frame 18 { play(); } frame 19 { play(); } frame 20 { play(); } frame 21 { play(); } frame 22 { play(); } frame 23 { play(); } frame 24 { play(); } frame 25 { play(); } frame 26 { play(); } frame 27 { play(); } frame 28 { play(); } frame 29 { play(); } frame 30 { play(); } frame 31 { play(); } frame 32 { play(); } frame 33 { play(); } frame 34 { play(); } frame 35 { play(); } frame 36 { play(); } frame 37 { play(); } frame 38 { play(); } frame 39 { play(); } frame 40 { play(); } frame 41 { play(); } frame 42 { play(); } frame 43 { play(); } frame 44 { play(); } frame 45 { play(); } frame 46 { play(); } frame 47 { play(); } frame 48 { play(); } frame 49 { play(); } frame 50 { play(); } frame 51 { play(); } frame 52 { play(); } frame 53 { play(); } frame 54 { play(); } frame 55 { play(); } frame 56 { play(); } frame 57 { play(); } frame 58 { play(); } frame 59 { play(); } frame 60 { play(); } frame 61 { play(); } frame 62 { play(); } frame 63 { play(); } frame 64 { play(); } frame 65 { play(); } frame 66 { play(); } frame 67 { play(); } frame 68 { play(); } frame 69 { play(); } frame 70 { play(); } frame 71 { play(); } frame 72 { play(); } frame 73 { play(); } frame 74 { play(); } frame 75 { play(); } frame 76 { play(); } frame 77 { play(); } frame 78 { play(); } frame 79 { play(); } frame 80 { play(); } frame 81 { play(); } frame 82 { play(); } frame 83 { play(); } frame 84 { play(); } frame 85 { play(); } frame 86 { play(); } frame 87 { play(); } frame 88 { play(); } frame 89 { play(); } frame 90 { play(); } frame 91 { play(); } frame 92 { play(); } frame 93 { play(); } frame 94 { play(); } frame 95 { play(); } frame 96 { play(); } frame 97 { play(); } frame 98 { play(); } frame 99 { play(); } frame 100 { play(); } frame 101 { play(); } frame 102 { play(); } frame 103 { play(); } frame 104 { play(); } frame 105 { play(); } frame 106 { play(); } frame 107 { play(); } frame 108 { play(); } frame 109 { play(); } frame 110 { play(); } frame 111 { play(); } frame 112 { play(); } frame 113 { play(); } frame 114 { play(); } frame 115 { play(); } frame 116 { play(); } frame 117 { play(); } frame 118 { play(); } frame 119 { play(); } frame 120 { play(); } frame 121 { play(); } frame 122 { play(); } frame 123 { play(); } frame 124 { play(); } frame 125 { play(); } frame 126 { play(); } frame 127 { play(); } frame 128 { play(); } frame 129 { play(); } frame 130 { play(); } frame 131 { play(); } frame 132 { play(); } frame 133 { play(); } frame 134 { play(); } frame 135 { play(); } frame 136 { play(); } frame 137 { play(); } frame 138 { play(); } frame 139 { play(); } frame 140 { play(); } frame 141 { play(); } frame 142 { play(); } frame 143 { play(); } frame 144 { play(); } frame 145 { play(); } frame 146 { play(); } frame 147 { play(); } frame 148 { play(); } frame 149 { play(); } frame 150 { play(); } frame 151 { play(); } frame 152 { play(); } frame 153 { play(); } frame 154 { play(); } frame 155 { play(); } frame 156 { play(); } frame 157 { play(); } frame 158 { play(); } frame 159 { play(); } frame 160 { play(); } frame 161 { play(); } frame 162 { play(); } frame 163 { play(); } frame 164 { play(); } frame 165 { play(); } frame 166 { play(); } frame 167 { play(); } frame 168 { play(); } frame 169 { play(); } frame 170 { play(); } frame 171 { play(); } frame 172 { play(); } frame 173 { play(); } frame 174 { play(); } frame 175 { play(); } frame 176 { play(); } frame 177 { play(); } frame 178 { play(); } frame 179 { play(); } frame 180 { play(); } frame 181 { play(); } frame 182 { play(); } frame 183 { play(); } frame 184 { play(); } frame 185 { play(); } frame 186 { play(); } frame 187 { play(); } frame 188 { play(); } frame 189 { play(); } frame 190 { play(); } frame 191 { play(); } frame 192 { play(); } frame 193 { play(); } frame 194 { play(); } frame 195 { play(); } frame 196 { play(); } frame 197 { play(); } frame 198 { play(); } frame 199 { play(); } frame 200 { play(); } frame 201 { play(); } frame 202 { play(); } frame 203 { play(); } frame 204 { play(); } frame 205 { play(); } frame 206 { play(); } frame 207 { play(); } frame 208 { play(); } frame 209 { play(); } frame 210 { play(); } frame 211 { play(); } frame 212 { play(); } frame 213 { play(); } frame 214 { play(); } frame 215 { play(); } frame 216 { play(); } frame 217 { play(); } frame 218 { play(); } frame 219 { play(); } frame 220 { play(); } frame 221 { play(); } frame 222 { play(); } frame 223 { play(); } frame 224 { play(); } frame 225 { play(); } frame 226 { play(); } frame 227 { play(); } frame 228 { play(); } frame 229 { play(); } frame 230 { play(); } frame 231 { play(); } frame 232 { play(); } frame 233 { play(); } frame 234 { play(); } frame 235 { play(); } frame 236 { play(); } frame 237 { play(); } frame 238 { play(); } frame 239 { play(); } frame 240 { play(); } frame 241 { play(); } frame 242 { play(); } frame 243 { play(); } frame 244 { play(); } frame 245 { play(); } frame 246 { play(); } frame 247 { play(); } frame 248 { play(); } frame 249 { play(); } frame 250 { play(); } frame 251 { play(); } frame 252 { play(); } frame 253 { play(); } frame 254 { play(); } frame 255 { play(); } frame 256 { play(); } frame 257 { play(); } frame 258 { play(); } frame 259 { play(); } frame 260 { play(); } frame 261 { play(); } frame 262 { play(); } frame 263 { play(); } frame 264 { play(); } frame 265 { play(); } frame 266 { play(); } frame 267 { play(); } frame 268 { play(); } frame 269 { play(); } frame 270 { play(); } frame 271 { play(); } frame 272 { play(); } frame 273 { play(); } frame 274 { play(); } frame 275 { play(); } frame 276 { play(); } frame 277 { play(); } frame 278 { play(); } frame 279 { play(); } frame 280 { play(); } frame 281 { play(); } frame 282 { play(); } frame 283 { play(); } frame 284 { play(); } frame 285 { play(); } frame 286 { play(); } frame 287 { play(); } frame 288 { play(); } frame 289 { play(); } frame 290 { play(); } frame 291 { play(); } frame 292 { play(); } frame 293 { play(); } frame 294 { play(); } frame 295 { play(); } frame 296 { play(); } frame 297 { play(); } frame 298 { play(); } frame 299 { play(); } frame 300 { play(); } frame 301 { play(); } frame 302 { play(); } frame 303 { play(); } frame 304 { play(); } frame 305 { play(); } frame 306 { play(); } frame 307 { play(); } frame 308 { play(); } frame 309 { play(); } frame 310 { play(); } frame 311 { play(); } frame 312 { play(); } frame 313 { play(); } frame 314 { play(); } frame 315 { play(); } frame 316 { play(); } frame 317 { play(); } frame 318 { play(); } frame 319 { play(); } frame 320 { play(); } frame 321 { play(); } frame 322 { play(); } frame 323 { play(); } frame 324 { play(); } frame 325 { play(); } frame 326 { play(); } frame 327 { play(); } frame 328 { play(); } frame 329 { play(); } frame 330 { play(); } frame 331 { play(); } frame 332 { play(); } frame 333 { play(); } frame 334 { play(); } frame 335 { play(); } frame 336 { play(); } frame 337 { play(); } frame 338 { play(); } frame 339 { play(); } frame 340 { play(); } frame 341 { play(); } frame 342 { play(); } frame 343 { play(); } frame 344 { play(); } frame 345 { play(); } frame 346 { play(); } frame 347 { play(); } frame 348 { play(); } frame 349 { play(); } frame 350 { play(); } frame 351 { play(); } frame 352 { play(); } frame 353 { play(); } frame 354 { play(); } frame 355 { play(); } frame 356 { play(); } frame 357 { play(); } frame 358 { play(); } frame 359 { play(); } frame 360 { play(); } frame 361 { play(); } frame 362 { play(); } frame 363 { play(); } frame 364 { play(); } frame 365 { play(); } frame 366 { play(); } frame 367 { play(); } frame 368 { play(); } frame 369 { play(); } frame 370 { play(); } frame 371 { play(); } frame 372 { play(); } frame 373 { play(); } frame 374 { play(); } frame 375 { play(); } frame 376 { play(); } frame 377 { play(); } frame 378 { play(); } frame 379 { play(); } frame 380 { play(); } frame 381 { play(); } frame 382 { play(); } frame 383 { play(); } frame 384 { play(); } frame 385 { play(); } frame 386 { play(); } frame 387 { play(); } frame 388 { play(); } frame 389 { play(); } frame 390 { play(); } frame 391 { play(); } frame 392 { play(); } frame 393 { play(); } frame 394 { play(); } frame 395 { play(); } frame 396 { play(); } frame 397 { play(); } frame 398 { play(); } frame 399 { play(); } frame 400 { play(); } frame 401 { play(); } frame 402 { play(); } frame 403 { play(); } frame 404 { play(); } frame 405 { play(); } frame 406 { play(); } frame 407 { play(); } frame 408 { play(); } frame 409 { play(); } frame 410 { play(); } frame 411 { play(); } frame 412 { play(); } frame 413 { play(); } frame 414 { play(); } frame 415 { play(); } frame 416 { play(); } frame 417 { play(); } frame 418 { play(); } frame 419 { play(); } frame 420 { play(); } frame 421 { play(); } frame 422 { play(); } frame 423 { play(); } frame 424 { play(); } frame 425 { play(); } frame 426 { play(); } frame 427 { play(); } frame 428 { play(); } frame 429 { play(); } frame 430 { play(); } frame 431 { play(); } frame 432 { play(); } frame 433 { play(); } frame 434 { play(); } frame 435 { play(); } frame 436 { play(); } frame 437 { play(); } frame 438 { play(); } frame 439 { play(); } frame 440 { play(); } frame 441 { play(); } frame 442 { play(); } frame 443 { play(); } frame 444 { play(); } frame 445 { play(); } frame 446 { play(); } frame 447 { play(); } frame 448 { play(); } frame 449 { play(); } frame 450 { play(); } frame 451 { play(); } frame 452 { play(); } frame 453 { play(); } frame 454 { play(); } frame 455 { play(); } frame 456 { play(); } frame 457 { play(); } frame 458 { play(); } frame 459 { play(); } frame 460 { play(); } frame 461 { play(); } frame 462 { play(); } frame 463 { play(); } frame 464 { play(); } frame 465 { play(); } frame 466 { play(); } frame 467 { play(); } frame 468 { play(); } frame 469 { play(); } frame 470 { play(); } frame 471 { play(); } frame 472 { play(); } frame 473 { play(); } frame 474 { play(); } frame 475 { play(); } frame 476 { play(); } frame 477 { play(); } frame 478 { play(); } frame 479 { play(); } frame 480 { play(); } frame 481 { play(); } frame 482 { play(); } frame 483 { play(); } frame 484 { play(); } frame 485 { play(); } frame 486 { play(); } frame 487 { play(); } frame 488 { play(); } frame 489 { play(); } frame 490 { play(); } frame 491 { play(); } frame 492 { play(); } frame 493 { play(); } frame 494 { play(); } frame 495 { play(); } frame 496 { play(); } frame 497 { play(); } frame 498 { play(); } frame 499 { play(); } frame 500 { play(); } frame 501 { play(); } frame 502 { play(); } frame 503 { play(); } frame 504 { play(); } frame 505 { play(); } frame 506 { play(); } frame 507 { play(); } frame 508 { play(); } frame 509 { play(); } frame 510 { play(); } frame 511 { play(); } frame 512 { play(); } frame 513 { play(); } frame 514 { play(); } frame 515 { play(); } frame 516 { play(); } frame 517 { play(); } frame 518 { play(); } frame 519 { play(); } frame 520 { play(); } frame 521 { play(); } frame 522 { play(); } frame 523 { play(); } frame 524 { play(); } frame 525 { play(); } frame 526 { play(); } frame 527 { play(); } frame 528 { play(); } frame 529 { play(); } frame 530 { play(); } frame 531 { play(); } frame 532 { play(); } frame 533 { play(); } frame 534 { play(); } frame 535 { play(); } frame 536 { play(); } frame 537 { play(); } frame 538 { play(); } frame 539 { play(); } frame 540 { play(); } frame 541 { play(); } frame 542 { play(); } frame 543 { play(); } frame 544 { play(); } frame 545 { play(); } frame 546 { play(); } frame 547 { play(); } frame 548 { play(); } frame 549 { play(); } frame 550 { play(); } frame 551 { play(); } frame 552 { play(); } frame 553 { play(); } frame 554 { play(); } frame 555 { play(); } frame 556 { play(); } frame 557 { play(); } frame 558 { play(); } frame 559 { play(); } frame 560 { play(); } frame 561 { play(); } frame 562 { play(); } frame 563 { play(); } frame 564 { play(); } frame 565 { play(); } frame 566 { play(); } frame 567 { play(); } frame 568 { play(); } frame 569 { play(); } frame 570 { play(); } frame 571 { play(); } frame 572 { play(); } frame 573 { play(); } frame 574 { play(); } frame 575 { play(); } frame 576 { play(); } frame 577 { play(); } frame 578 { play(); } frame 579 { play(); } frame 580 { play(); } frame 581 { play(); } frame 582 { play(); } frame 583 { play(); } frame 584 { play(); } frame 585 { play(); } frame 586 { play(); } frame 587 { play(); } frame 588 { play(); } frame 589 { play(); } frame 590 { play(); } frame 591 { play(); } frame 592 { play(); } frame 593 { play(); } frame 594 { play(); } frame 595 { play(); } frame 596 { play(); } frame 597 { play(); } frame 598 { play(); } frame 599 { play(); } frame 600 { play(); } frame 601 { play(); } frame 602 { play(); } frame 603 { play(); } frame 604 { play(); } frame 605 { play(); } frame 606 { play(); } frame 607 { play(); } frame 608 { play(); } frame 609 { play(); } frame 610 { play(); } frame 611 { play(); } frame 612 { play(); } frame 613 { play(); } frame 614 { play(); } frame 615 { play(); } frame 616 { play(); } frame 617 { play(); } frame 618 { play(); } frame 619 { play(); } frame 620 { play(); } frame 621 { play(); } frame 622 { play(); } frame 623 { play(); } frame 624 { play(); } frame 625 { play(); } frame 626 { play(); } frame 627 { play(); } frame 628 { play(); } frame 629 { play(); } frame 630 { play(); } frame 631 { play(); } frame 632 { play(); } frame 633 { play(); } frame 634 { play(); } frame 635 { play(); } frame 636 { play(); } frame 637 { play(); } frame 638 { play(); } frame 639 { play(); } frame 640 { play(); } frame 641 { play(); } frame 642 { play(); } frame 643 { play(); } frame 644 { play(); } frame 645 { play(); } frame 646 { play(); } frame 647 { play(); } frame 648 { play(); } frame 649 { play(); } frame 650 { play(); } frame 651 { play(); } frame 652 { play(); } frame 653 { play(); } frame 654 { play(); } frame 655 { play(); } frame 656 { play(); } frame 657 { play(); } frame 658 { play(); } frame 659 { play(); } frame 660 { play(); } frame 661 { play(); } frame 662 { play(); } frame 663 { play(); } frame 664 { play(); } frame 665 { play(); } frame 666 { play(); } frame 667 { play(); } frame 668 { play(); } frame 669 { play(); } frame 670 { play(); } frame 671 { play(); } frame 672 { play(); } frame 673 { play(); } frame 674 { play(); } frame 675 { play(); } frame 676 { play(); } frame 677 { play(); } frame 678 { play(); } frame 679 { play(); } frame 680 { play(); } frame 681 { play(); } frame 682 { play(); } frame 683 { play(); } frame 684 { play(); } frame 685 { play(); } frame 686 { play(); } frame 687 { play(); } frame 688 { play(); } frame 689 { play(); } frame 690 { play(); } frame 691 { play(); } frame 692 { play(); } frame 693 { play(); } frame 694 { play(); } frame 695 { play(); } frame 696 { play(); } frame 697 { play(); } frame 698 { play(); } frame 699 { play(); } frame 700 { play(); } frame 701 { play(); } frame 702 { play(); } frame 703 { play(); } frame 704 { play(); } frame 705 { play(); } frame 706 { play(); } frame 707 { play(); } frame 708 { play(); } frame 709 { play(); } frame 710 { play(); } frame 711 { play(); } frame 712 { play(); } frame 713 { play(); } frame 714 { play(); } frame 715 { play(); } frame 716 { play(); } frame 717 { play(); } frame 718 { play(); } frame 719 { play(); } frame 720 { play(); } frame 721 { play(); } frame 722 { play(); } frame 723 { play(); } frame 724 { play(); } frame 725 { play(); } frame 726 { play(); } frame 727 { play(); } frame 728 { play(); } frame 729 { play(); } frame 730 { play(); } frame 731 { play(); } frame 732 { play(); } frame 733 { play(); } frame 734 { play(); } frame 735 { play(); } frame 736 { play(); } frame 737 { play(); } frame 738 { play(); } frame 739 { play(); } frame 740 { play(); } frame 741 { play(); } frame 742 { play(); } frame 743 { play(); } frame 744 { play(); } frame 745 { play(); } frame 746 { play(); } frame 747 { play(); } frame 748 { play(); } frame 749 { play(); } frame 750 { play(); } frame 751 { play(); } frame 752 { play(); } frame 753 { play(); } frame 754 { play(); } frame 755 { play(); } frame 756 { play(); } frame 757 { play(); } frame 758 { play(); } frame 759 { play(); } frame 760 { play(); } frame 761 { play(); } frame 762 { play(); } frame 763 { play(); } frame 764 { play(); } frame 765 { play(); } frame 766 { play(); } frame 767 { play(); } frame 768 { play(); } frame 769 { play(); } frame 770 { play(); } frame 771 { play(); } frame 772 { play(); } frame 773 { play(); } frame 774 { play(); } frame 775 { play(); } frame 776 { play(); } frame 777 { play(); } frame 778 { play(); } frame 779 { play(); } frame 780 { play(); } frame 781 { play(); } frame 782 { play(); } frame 783 { play(); } frame 784 { play(); } frame 785 { play(); } frame 786 { play(); } frame 787 { play(); } frame 788 { play(); } frame 789 { play(); } frame 790 { play(); } frame 791 { play(); } frame 792 { play(); } frame 793 { play(); } frame 794 { play(); } frame 795 { play(); } frame 796 { play(); } frame 797 { play(); } frame 798 { play(); } frame 799 { play(); } frame 800 { play(); } frame 801 { play(); } frame 802 { play(); } frame 803 { play(); } frame 804 { play(); } frame 805 { play(); } frame 806 { play(); } frame 807 { play(); } frame 808 { play(); } frame 809 { play(); } frame 810 { play(); } frame 811 { play(); } frame 812 { play(); } frame 813 { play(); } frame 814 { play(); } frame 815 { play(); } frame 816 { play(); } frame 817 { play(); } frame 818 { play(); } frame 819 { play(); } frame 820 { play(); } frame 821 { play(); } frame 822 { play(); } frame 823 { play(); } frame 824 { play(); } frame 825 { play(); } frame 826 { play(); } frame 827 { play(); } frame 828 { play(); } frame 829 { play(); } frame 830 { play(); } frame 831 { play(); } frame 832 { play(); } frame 833 { play(); } frame 834 { play(); } frame 835 { play(); } frame 836 { play(); } frame 837 { play(); } frame 838 { play(); } frame 839 { play(); } frame 840 { play(); } frame 841 { play(); } frame 842 { play(); } frame 843 { play(); } frame 844 { play(); } frame 845 { play(); } frame 846 { play(); } frame 847 { play(); } frame 848 { play(); } frame 849 { play(); } frame 850 { play(); } frame 851 { play(); } frame 852 { play(); } frame 853 { play(); } frame 854 { play(); } frame 855 { play(); } frame 856 { play(); } frame 857 { play(); } frame 858 { play(); } frame 859 { play(); } frame 860 { play(); } frame 861 { play(); } frame 862 { play(); } frame 863 { play(); } frame 864 { play(); } frame 865 { play(); } frame 866 { play(); } frame 867 { play(); } frame 868 { play(); } frame 869 { play(); } frame 870 { play(); } frame 871 { play(); } frame 872 { play(); } frame 873 { play(); } frame 874 { play(); } frame 875 { play(); } frame 876 { play(); } frame 877 { play(); } frame 878 { play(); } frame 879 { play(); } frame 880 { play(); } frame 881 { play(); } frame 882 { play(); } frame 883 { play(); } frame 884 { play(); } frame 885 { play(); } frame 886 { play(); } frame 887 { play(); } frame 888 { play(); } frame 889 { play(); } frame 890 { play(); } frame 891 { play(); } frame 892 { play(); } frame 893 { play(); } frame 894 { play(); } frame 895 { play(); } frame 896 { play(); } frame 897 { play(); } frame 898 { play(); } frame 899 { play(); } frame 900 { gotoAndStop(2); } } movieClip 1451 area11 { frame 1 { stop(); } } movieClip 1452 { } movieClip 1454 area14 { frame 1 { stop(); } } movieClip 1455 { frame 1 { stop(); } } movieClip 1457 area13 { frame 1 { stop(); } } movieClip 1458 { frame 1 { stop(); } } movieClip 1461 map1 { } movieClip 1464 { } movieClip 1469 { } movieClip 1472 { frame 9 { _root.cekPanahApi(_parent, _parent._currentframe); _root.backPanah(); } } movieClip 1477 { frame 1 { _root.backKuda(); } frame 15 { stop(); _root.cekDarah2(_parent); } } movieClip 1478 kuda_mc3 { frame 1 { stop(); } } movieClip 1480 { frame 9 { _root.backPedang(); } } movieClip 1481 kuda_mc2 { frame 1 { stop(); } } movieClip 1483 { frame 9 { _root.cekPanah(_parent, _parent._currentframe); _root.backPanah(); } } movieClip 1484 kuda_mc { frame 1 { stop(); } } movieClip 1485 { } movieClip 1486 { } movieClip 1487 { } movieClip 1488 { frame 9 { _root.cekBatu5(_parent, _parent._currentframe); _root.backBatu(); } } movieClip 1489 { frame 20 { stop(); } } movieClip 1490 { frame 27 { stop(); _root.cekDarah2(_parent); } } movieClip 1491 ketapel_mc4 { frame 1 { stop(); } } movieClip 1492 { frame 9 { _root.cekBatu4(_parent, _parent._currentframe); _root.backBatu(); } } movieClip 1493 ketapel_mc3 { frame 1 { stop(); } } movieClip 1494 { frame 9 { _root.cekBatu3(_parent, _parent._currentframe); _root.backBatu(); } } movieClip 1495 ketapel_mc2 { frame 1 { stop(); } } movieClip 1496 { frame 9 { _root.cekBatu2(_parent, _parent._currentframe); _root.backBatu(); } } movieClip 1497 ketapel_mc { frame 1 { stop(); } } movieClip 1499 kecil_mc { } movieClip 1505 jewel { frame 1 { stop(); } } movieClip 1511 info_mc { frame 1 { stop(); } } movieClip 1527 { } movieClip 1530 { } movieClip 1533 { } movieClip 1541 { } movieClip 1543 { } movieClip 1544 { } movieClip 1552 { frame 1 { stop(); } } movieClip 1554 { } movieClip 1560 houses { frame 1 { stop(); } instance of movieClip 1552 { onClipEvent (release) { if (this._currentframe == 1) { this.gotoAndStop(2); } else { if (this._currentframe == 2) { this.gotoAndStop(1); } } } } } movieClip 1568 horse { frame 1 { stop(); } } movieClip 1576 gold { frame 1 { stop(); } instance of movieClip 863 { onClipEvent (release) { if (this._currentframe == 1) { this.gotoAndStop(2); } else { if (this._currentframe == 2) { this.gotoAndStop(1); } } } } } movieClip 1579 { } movieClip 1584 { } movieClip 1587 { frame 9 { _root.cekPanahApi(_parent, _parent._currentframe); _root.backPanah(); } } movieClip 1602 { frame 27 { stop(); _root.cekDarah2(_parent); } } movieClip 1603 gajah_mc3 { frame 1 { stop(); } } movieClip 1604 { frame 9 { _root.backPedang(); } } movieClip 1605 gajah_mc2 { frame 1 { stop(); } } movieClip 1613 { frame 1 { stop(); } } movieClip 1617 fish { frame 1 { stop(); } instance of movieClip 1613 { onClipEvent (release) { if (this._currentframe == 1) { this.gotoAndStop(2); } else { if (this._currentframe == 2) { this.gotoAndStop(1); } } } } } movieClip 1637 fire { frame 1 { stop(); } } movieClip 1646 { frame 1 { stop(); } } movieClip 1659 farm { frame 1 { stop(); } instance of movieClip 1646 { onClipEvent (release) { if (this._currentframe == 1) { this.gotoAndStop(2); } else { if (this._currentframe == 2) { this.gotoAndStop(1); } } } } } movieClip 1692 { } movieClip 1711 { } movieClip 1712 end_mc { frame 1 { stop(); } } movieClip 1720 elephant { frame 1 { stop(); } } movieClip 1723 { frame 1 { stop(); } } movieClip 1725 { } movieClip 1728 { } movieClip 1731 { } movieClip 1734 { frame 1 { stop(); } } movieClip 1739 { } movieClip 1748 { frame 1 { stop(); } } movieClip 1754 { frame 1 { stop(); } } movieClip 1760 { frame 1 { stop(); } } movieClip 1766 { frame 1 { stop(); } } movieClip 1772 { frame 1 { stop(); } } movieClip 1778 { frame 1 { stop(); } } movieClip 1784 { frame 1 { stop(); } } movieClip 1790 { frame 1 { stop(); } } movieClip 1796 { frame 1 { stop(); } } movieClip 1802 { frame 1 { stop(); } } movieClip 1808 { frame 1 { stop(); } } movieClip 1814 { frame 1 { stop(); } } movieClip 1817 dunia_mc { } movieClip 1819 darah3_mc { frame 1 { } frame 20 { stop(); } } movieClip 1820 darah2_mc { frame 1 { } frame 15 { stop(); } } movieClip 1828 darah_mc { frame 15 { removeMovieClip(this); } } movieClip 1832 cow { frame 1 { stop(); } } movieClip 1838 coal { frame 1 { stop(); } } movieClip 1848 catapult { frame 1 { stop(); } } movieClip 1861 { frame 1 { stop(); } } movieClip 1863 carpenter { frame 1 { stop(); } instance of movieClip 1861 { onClipEvent (release) { if (this._currentframe == 1) { this.gotoAndStop(2); } else { if (this._currentframe == 2) { this.gotoAndStop(1); } } } } } movieClip 1865 { } movieClip 1878 { frame 1 { stop(); } } movieClip 1892 bawah_mc { } movieClip 1904 { } movieClip 1907 batu_panah2 { } movieClip 1908 batu_panah { } movieClip 1919 barracks { frame 1 { stop(); } } movieClip 1922 asap2_mc { } movieClip 1923 asap_mc { } movieClip 1926 { } movieClip 1935 { } movieClip 1946 { frame 9 { _root.cekBatu(_parent, _parent._currentframe); _root.backBatu(); } } movieClip 1952 { frame 9 { stop(); _root.cekDarah2(_parent); } } movieClip 1953 arrow2_mc { frame 1 { stop(); } } movieClip 1954 { frame 9 { _root.cekPanah(_parent, _parent._currentframe); _root.backPanah(); } } movieClip 1955 arrow_mc { frame 1 { stop(); } } movieClip 1970 arrow { frame 1 { stop(); } } movieClip 1971 area52 { } movieClip 1972 api_mc { frame 25 { stop(); removeMovieClip(this); } } movieClip 1974 anak_panah_api { } movieClip 1982 air2_mc { frame 15 { removeMovieClip(this); } } movieClip 2027 { frame 1 { stop(); } } movieClip 2045 tombak_panah { } movieClip 2046 { frame 1 { stop(); } } movieClip 2250 { } movieClip 2282 { frame 1 { stop(); } } movieClip 2372 actions_mc { frame 1 { stop(); } frame 5 { stop(); } } frame 5 { enter_btn.onRelease = function () { gotoAndStop(36); }; } instance of movieClip 3 { onClipEvent (release) { getURL('http://www.maxgames.com', '_blank'); } } frame 6 { function initAwalan() { petamaKali = false; delayHari = 9000; qualityGame = 1; posSatu = 0; posDua = 0; jenisKerajaan = 1; jenisMusuh = 2; tingkatSulit = 1; xpilihKota = 1; xpilihMap = 1; } function backMusic() { myMusic.stop(); myMusic = new Sound(music); myMusic.attachSound('backMusic'); myMusic.setVolume(volum1); myMusic.start(0, 1); myMusic.onSoundComplete = function () { backMusic(); }; } function backPerang() { myMusic.stop(); myMusic = new Sound(music); myMusic.attachSound('backPerang'); myMusic.setVolume(volum1); myMusic.start(0, 1); myMusic.onSoundComplete = function () { backPerang(); }; } function backDarah() { rand = random(2); if (rand == 0) { mySound = new Sound(sound); mySound.attachSound('backDarah'); mySound.start(0, 1); mySound.setVolume(volum2); } } function backPedang() { rand = random(4); if (rand == 0) { mySound = new Sound(sound); mySound.attachSound('backPedang'); mySound.start(0, 1); mySound.setVolume(volum2); } } function backPanah() { rand = random(3); if (rand == 0) { mySound = new Sound(sound); mySound.attachSound('backPanah'); mySound.start(0, 1); mySound.setVolume(volum2); } } function backBatu() { rand = random(3); if (rand == 0) { mySound = new Sound(sound); mySound.attachSound('backPanah'); mySound.start(0, 1); mySound.setVolume(volum2); } } function backTombak() { rand = random(3); if (rand == 0) { mySound = new Sound(sound); mySound.attachSound('backTombak'); mySound.start(0, 1); mySound.setVolume(volum2); } } function backMati() { mySound = new Sound(sound); mrand = random(4) + 1; mySound.attachSound('backMati' + mrand); mySound.start(0, 1); mySound.setVolume(volum2); } function backKuda() { mySound = new Sound(sound); mySound.attachSound('backKuda'); mySound.start(0, 1); mySound.setVolume(volum2); } function backBangun() { mySound = new Sound(sound); mySound.attachSound('backBangun'); mySound.start(0, 1); mySound.setVolume(volum2); } function backMenang() { mySound = new Sound(sound); mySound.attachSound('backMenang'); mySound.start(0, 1); mySound.setVolume(volum2); } function backKalah() { mySound = new Sound(sound); mySound.attachSound('backKalah'); mySound.start(0, 1); mySound.setVolume(volum2); } function backSalah() { mySound = new Sound(sound); mySound.attachSound('backSalah'); mySound.start(0, 1); mySound.setVolume(volum2); } function backApi() { mySound = new Sound(sound); mySound.attachSound('backApi'); mySound.start(0, 1); mySound.setVolume(volum2); } function klik() { mySound = new Sound(sound); mySound.attachSound('klik'); mySound.start(0, 1); mySound.setVolume(volum2); } function over() { mySound = new Sound(sound); mySound.attachSound('over'); mySound.start(0, 1); mySound.setVolume(volum2); } function simpanBangun() { bykKota = 12; bykArea = 12; xbykArea2 = 12; bykProperti = 12; bykBangunan = 25; namaKota = new Array('', 'Arigal', 'Bibaluz', 'Carex', 'Deresium', 'Eradite', 'Fargaz', 'Gigelium', 'Haze', 'Istanada', 'Jerax', 'Konselium', 'Liures'); namaEmpire = new Array('', 'Zargas', 'Artavera'); if (tingkatSulit == 1) { lawanNyerang = random(75) + 100; lawanNyerang2 = random(50) + 75; } else { if (tingkatSulit == 2) { lawanNyerang = random(50) + 75; lawanNyerang2 = random(25) + 50; } else { if (tingkatSulit == 3) { lawanNyerang = random(25) + 50; lawanNyerang2 = random(15) + 35; } else { if (tingkatSulit == 4) { lawanNyerang = random(15) + 35; lawanNyerang2 = random(10) + 25; } } } } if (lawanNyerang == lawanNyerang2) { lawanNyerang += random(10) + 10; } kotaDiserang = xpilihKota; jenisBangunan = new Array(); bisaSungai = new Array(); bisaHutan = new Array(); bisaGunung = new Array(); linkWilayah = new Array(); i = 1; while (i <= 12) { linkWilayah[i] = new Array(); if (i == 1) { linkWilayah[i][1] = 2; linkWilayah[i][2] = 3; } else { if (i == 2) { linkWilayah[i][1] = 1; linkWilayah[i][2] = 3; linkWilayah[i][3] = 6; linkWilayah[i][4] = 7; } else { if (i == 3) { linkWilayah[i][1] = 1; linkWilayah[i][2] = 2; linkWilayah[i][3] = 4; linkWilayah[i][4] = 8; } else { if (i == 4) { linkWilayah[i][1] = 3; linkWilayah[i][2] = 5; linkWilayah[i][3] = 8; } else { if (i == 5) { linkWilayah[i][1] = 4; linkWilayah[i][2] = 8; linkWilayah[i][3] = 9; linkWilayah[i][4] = 12; } else { if (i == 6) { linkWilayah[i][1] = 2; linkWilayah[i][2] = 7; } else { if (i == 7) { linkWilayah[i][1] = 2; linkWilayah[i][2] = 6; linkWilayah[i][3] = 8; linkWilayah[i][4] = 10; } else { if (i == 8) { linkWilayah[i][1] = 3; linkWilayah[i][2] = 4; linkWilayah[i][3] = 5; linkWilayah[i][4] = 7; linkWilayah[i][5] = 9; linkWilayah[i][6] = 10; } else { if (i == 9) { linkWilayah[i][1] = 5; linkWilayah[i][2] = 8; linkWilayah[i][3] = 10; linkWilayah[i][4] = 11; linkWilayah[i][5] = 12; } else { if (i == 10) { linkWilayah[i][1] = 7; linkWilayah[i][2] = 8; linkWilayah[i][3] = 9; linkWilayah[i][4] = 11; } else { if (i == 11) { linkWilayah[i][1] = 9; linkWilayah[i][2] = 10; linkWilayah[i][3] = 12; } else { if (i == 12) { linkWilayah[i][1] = 5; linkWilayah[i][2] = 9; linkWilayah[i][3] = 11; } } } } } } } } } } } } ++i; } i = 1; while (i <= bykKota) { bisaSungai[i] = new Array(); bisaHutan[i] = new Array(); bisaGunung[i] = new Array(); j = 1; while (j <= bykArea) { bisaSungai[i][j] = new Array(); bisaHutan[i][j] = new Array(); bisaGunung[i][j] = new Array(); k = 1; while (k <= bykProperti) { bisaSungai[i[j][k]] = 0; bisaHutan[i][j][k] = 0; bisaGunung[i][j][k] = 0; ++k; } ++j; } ++i; } } function initBangun() { judulButton = new Array('Building Area', 'House', 'Farm', 'Market', 'Carpenter House', 'Iron Mine', 'Sword Blacksmith', 'Arrow Blacksmith', 'Barracks', 'Fish Pond', 'Gold Mine', 'Spear Blacksmith', 'Pearl Pond', 'Horse Stable', 'Cow Farm', 'Shirmp Pond', 'Elephant Stable', 'Coal Mine', 'Oil Refinery', 'Catapult Factory', 'Witch House', 'Steel Mine', 'Fire Arrow Blacksmith', 'Jewel Shop', 'Super Soldier Barracks'); judulButton2 = new Array('', 'Money', 'Foods', 'Irons', 'Logs', 'Swords', 'Arrows', 'Soldiers', 'Workers (Unemployment)', 'Pearls', 'Coals', 'Oils', 'Horses', 'Spears', 'Catapults', 'Witches', 'Elephants', 'Fire Arrows', 'Steel', 'Super Soldiers', 'Ice Ball Magic', 'Fire Ball Magic', 'Poison Magic', 'Hurricane Magic', 'Earthquake Magic'); isiButton = new Array('A place to put down a building, you can put a building here. Please note; there are some buildings that only can be put down in certain areas.', 'Residence house, one house can be occupied by 50 workers. Every house requires 25 food units per day.', 'Farm area. Produce agriculture pickings, like grist, maize and potato, can produce 200 food units per day. (Only place near the water)', 'Traditional Market, a place where\'s residents go to shopping. One market requires 50 food units for sale and produces $100 of income tax per day.', 'Deforestation Place. Produces logs. One carpenter house requires 20 food units and $10 of wages per day and can produce 10 logs per day. (Only place near the forest)', 'Iron Mine Area. Produces iron. One iron mine requires 25 food units and $20 in wages per day and can produce 5 iron units per day. (Only place near a mountain)', 'Produce swords that are used by soldiers. One blacksmith requires 10 food units, 2 logs, 5 irons and $15 in wages per day and can produce 1 sword per day.', 'Produce arrows that are used by soldiers. One blacksmith requires 10 food units, 4 logs, 2 iron units and $15 in wages per day and can produce 1 arrow set per day.', 'A place to train the soldiers. One barracks requires 10 food units and $30 in wages and can train 2 workers to be 2 soldiers per day. One soldier requires $2 in wages per day.', 'A place for a fish net in the ocean. Produces Food, can produce 250 food units per day. (Only place near the water)', 'Gold Mine Area. Produces gold. One gold mine requires 10 food units and $15 in wages per day and can produce 200 gold units per day. (Only place near a mountain)', 'Produces spears that are used by soldiers. One blacksmith requires 10 food units, 10 iron units and $15 in wages per day and can produce 1 spear per day.', 'A place to find pearls in the ocean. Produces Pearls, can produce 4 pearls per day. (Only place near the water)', 'Horse stable. Produces Horses, One horse stable requires 30 food units and $20 in wages per day and can produce 2 workers to be 2 horse knight per day. One horse knight requires $3 in wages per day.', 'Cow Farm. A place to process meat, Produces Food, can produce 300 food units per day.', 'A place for a shrimp net in the ocean. Produces Food, can produce 300 food units per day. (Only place near the water)', 'Elephant stable. Produces Elephants, One elephant stable requires 40 food units and $30 in wages per day and can train 1 worker to be 1 elephant soldier per day. One elephant soldier requires $4 in wages per day.', 'Coal Mine Area. Produces coal. One coal mine requires 15 food units and $20 in wages per day and can produce 3 coal units per day. (Only place near the forest)', 'Oil Refinery, a place to produce oil, One oil refinery requires 25 food units and $40 in wages per day and can produce 100 oil units per day', 'Catapult Factory. Produces catapults, one catapult factory requires 25 food units, 10 logs, 5 iron units and $50 in wages per day and can train 1 worker to be 1 catapult soldier per day, one catapult soldier requires $7 in wages per day', 'Witch Houses. Produces witches, one witch houses requires 50 food units and $75 in wages per day and can train 2 witches per day, one witch requires $5 in wages per day', 'Steel Mine. Produces steel, one steel mine requires 30 food units and $45 in wages per day and can produce 5 steel units per day. (Only place near a mountain)', 'Produces fire arrows that are used by soldiers. One blacksmith requires 10 food units, 4 logs, 2 iron units, 200 oil units and $25 in wages per day and can produce 1 fire arrow set per day.', 'Jewel Shop, sell various jewels and other accesories, one jewel shop requires 20 pearls and can produce $2000 of income tax per day.', 'Super Soldier Barracks, a place to train super soldiers, one super soldier barracks requires 30 food units, 25 steel units and $60 in wages and can train 1 super soldier per day, one super soldier requires $10 in wages per day.'); isiButton2 = new Array('A place to put down a building, you can put a building here. Please note; there are some buildings that only can be put down in certain area.', 'Residence house, one house can be occupied by 100 workers. Every house requires 50 foods per day', 'Farm area. Produce agriculture pickings, like grist, maize and potato, can produce 400 foods per day. (Only place at near the water)', 'Traditional Market, a place where\'s residents go to shopping. One market requires 100 foods for sell and produce $200 income tax per day.', 'Deforestation Place. Produce logs. One carpenter house requires 40 foods and $20 wages per day and can produce 20 logs per day. (Only place at near the forest)', 'Iron Mine Area. Produce iron. One iron mine requires 50 foods and $40 wages per day and can produce 10 irons per day. (Only place at near the mount)', 'Produce swords that are used by soldiers. One blacksmith requires 20 foods, 4 logs, 10 irons and $30 wages per day and can produce 2 sword per day.', 'Produce arrows that are used by soldiers. One blacksmith requires 20 foods, 8 logs, 4 irons and $30 wages per day and can produce 2 arrow set per day.', 'A place to train the soldiers. One barracks requires 20 foods and $60 wages and can train 4 workers to be 4 soldiers per day. One soldier requires $2 wage per day.', 'Place for fish net in ocean. Produce Food, can produce 300 foods per day. (Only place at near the water)', 'Gold Mine Area. Produce gold. One gold mine requires 20 foods and $30 wages per day and can produce 400 golds per day. (Only place at near the mount)', 'Produce spear that are used by soldiers. One blacksmith requires 20 foods, 20 irons and $30 wages per day and can produce 2 spear per day.', 'Place for find the pearl in ocean. Produce Pearl, can produce 8 pearls per day (Only place at near the water)', 'Horse stable. Produce Horse, One horse stable requires 60 foods and $40 wages per day and can produce 4 workers to be 4 horses knight per day. One horses knight requires $3 wage per day.', 'Cow Farm. Place to process meat, Produce Food, can produce 600 foods per day.', 'Place for shrimp net in ocean. Produce Food, can produce 600 foods per day. (Only place at near the water)', 'Elephant stable. Produce Elephant, One elephant stable requires 80 foods and $60 wages per day and can train 2 workers to be 2 elephant soldier per day. One elephant soldiers requires $4 per day', 'Coal Mine Area. Produce coal. One coal mine requires 30 foods and $40 wages per day and can produce 6 coals per day. (Only place at near the forest)', 'Oil Refinery, place to produce oil, One oil refinery requires 50 foods and $80 wages per day and can produce 200 oils per day', 'Catapult Factory. Produce catapult, one catapult factory requires 50 foods, 20 logs, 10 irons and $100 wages per day and can train 2 workers to be 2 catapult army per 4 day, one catapult army requires $7 per day', 'Witch Houses. Produce witch, one witch houses requires 100 foods and $150 wages per day and can train 4 witch per 4 day, one witch requires $5 per day', 'Steel Mine. Produce steel, one steel mine requires 60 foods and 90 wages per day and can produce 10 steel per day (Only place at near the mount)', 'Produce fire arrows that are used by soldiers. One blacksmith requires 20 foods, 8 logs, 4 irons, 400 oils and $50 wages per day and can produce 2 fire arrow set per day.', 'Jewel Shop, sell various of jewel and other accesories, one jewel shop requires 40 pearls and can produce $4000 income tax per day.', 'Super Soldier Barracks, place to train super soldiers, one super soldier barracks requires 60 foods, 50 steel and $120 wages and can train 2 super soldier per 5 day, one super soldier requires $10 per day'); xisiButton = new Array('A place to put down a building, you can put a building here. Please note; there are some buildings that only can be put down in certain area.', 'Residence house, one house can be occupied by 50 workers. Every house requires 25 foods per day', 'Farm area. Produce agriculture pickings, like grist, maize and potato, can produce 200 foods per day. (Only place at near the water)', 'Traditional Market, a place where\'s residents go to shopping. One market requires 50 foods for sell and produce $100 income tax per day.', 'Deforestation Place. Produce logs. One carpenter house requires 20 foods and $10 wages per day and can produce 10 logs per day. (Only place at near the forest)', 'Iron Mine Area. Produce iron. One iron mine requires 25 foods and $20 wages per day and can produce 5 irons per day. (Only place at near the mount)', 'Produce swords that are used by soldiers. One blacksmith requires 10 foods, 2 logs, 5 irons and $15 wages per day and can produce 1 sword per day.', 'Produce arrows that are used by soldiers. One blacksmith requires 10 foods, 4 logs, 2 irons and $15 wages per day and can produce 1 arrow set per day.', 'A place to train the soldiers. One barracks requires 10 foods and $30 wages and can train 2 workers to be 2 soldiers per day.', 'Place for fish net in ocean. Produce Food, can produce 250 foods per day. (Only place at near the water)', 'Gold Mine Area. Produce gold. One gold mine requires 10 foods and $15 wages per day and can produce 200 golds per day. (Only place at near the mount)', 'Produce spear that are used by soldiers. One blacksmith requires 10 foods, 10 irons and $15 wages per day and can produce 1 spear per day.', 'Place for find the pearl in ocean. Produce Pearl, can produce 4 pearls per day (Only place at near the water)', 'Horse stable. Produce Horse, One horse stable requires 30 foods and $20 wages per day and can produce 2 workers to be 2 horses knight per day.', 'Cow Farm. Place to process meat, Produce Food, can produce 300 foods per day.', 'Place for shrimp net in ocean. Produce Food, can produce 300 foods per day. (Only place at near the water)', 'Elephant stable. Produce Elephant, One elephant stable requires 40 foods and $30 wages per day and can train 1 worker to be 1 elephant soldier per day.', 'Coal Mine Area. Produce coal. One coal mine requires 15 foods and $20 wages per day and can produce 3 coals per day. (Only place at near the forest)', 'Oil Refinery, place to produce oil, One oil refinery requires 25 foods and $40 wages per day and can produce 100 oils per day', 'Catapult Factory. Produce catapult, one catapult factory requires 25 foods, 10 logs, 5 irons and $50 wages per day and can train 1 worker to be 1 catapult army per day.', 'Witch Houses. Produce witch, one witch houses requires 50 foods and $75 wages per day and can train 2 witch per day.', 'Steel Mine. Produce steel, one steel mine requires 30 foods and 45 wages per day and can produce 5 steel per day (Only place at near the mount)', 'Produce fire arrows that are used by soldiers. One blacksmith requires 10 foods, 4 logs, 2 irons, 200 oils and $25 wages per day and can produce 1 fire arrow set per day.', 'Jewel Shop, sell various of jewel and other accesories, one jewel shop requires 20 pearls and can produce $2000 income tax per day.', 'Super Soldier Barracks, place to train super soldiers, one super soldier barracks requires 30 foods, 25 steel and $60 wages and can train 1 super soldier per day.'); xisiButton2 = new Array('A place to put down a building, you can put a building here. Please note; there are some buildings that only can be put down in certain area.', 'Residence house, one house can be occupied by 100 workers. Every house requires 50 foods per day', 'Farm area. Produce agriculture pickings, like grist, maize and potato, can produce 400 foods per day. (Only place at near the water)', 'Traditional Market, a place where\'s residents go to shopping. One market requires 100 foods for sell and produce $200 income tax per day.', 'Deforestation Place. Produce logs. One carpenter house requires 40 foods and $20 wages per day and can produce 20 logs per day. (Only place at near the forest)', 'Iron Mine Area. Produce iron. One iron mine requires 50 foods and $40 wages per day and can produce 10 irons per day. (Only place at near the mount)', 'Produce swords that are used by soldiers. One blacksmith requires 20 foods, 4 logs, 10 irons and $30 wages per day and can produce 2 sword per day.', 'Produce arrows that are used by soldiers. One blacksmith requires 20 foods, 8 logs, 4 irons and $30 wages per day and can produce 2 arrow set per day.', 'A place to train the soldiers. One barracks requires 20 foods and $60 wages and can train 4 workers to be 4 soldiers per day.', 'Place for fish net in ocean. Produce Food, can produce 300 foods per day. (Only place at near the water)', 'Gold Mine Area. Produce gold. One gold mine requires 20 foods and $30 wages per day and can produce 400 golds per day. (Only place at near the mount)', 'Produce spear that are used by soldiers. One blacksmith requires 20 foods, 20 irons and $30 wages per day and can produce 2 spear per day.', 'Place for find the pearl in ocean. Produce Pearl, can produce 8 pearls per day (Only place at near the water)', 'Horse stable. Produce Horse, One horse stable requires 60 foods and $40 wages per day and can produce 4 workers to be 4 horses knight per day.', 'Cow Farm. Place to process meat, Produce Food, can produce 600 foods per day.', 'Place for shrimp net in ocean. Produce Food, can produce 600 foods per day. (Only place at near the water)', 'Elephant stable. Produce Elephant, One elephant stable requires 80 foods and $60 wages per day and can train 2 workers to be 2 elephant soldier per day.', 'Coal Mine Area. Produce coal. One coal mine requires 30 foods and $40 wages per day and can produce 6 coals per day. (Only place at near the forest)', 'Oil Refinery, place to produce oil, One oil refinery requires 50 foods and $80 wages per day and can produce 200 oils per day', 'Catapult Factory. Produce catapult, one catapult factory requires 50 foods, 20 logs, 10 irons and $100 wages per day and can train 2 workers to be 2 catapult army per 4 day.', 'Witch Houses. Produce witch, one witch houses requires 100 foods and $150 wages per day and can train 4 witch per 4 day.', 'Steel Mine. Produce steel, one steel mine requires 60 foods and 90 wages per day and can produce 10 steel per day (Only place at near the mount)', 'Produce fire arrows that are used by soldiers. One blacksmith requires 20 foods, 8 logs, 4 irons, 400 oils and $50 wages per day and can produce 2 fire arrow set per day.', 'Jewel Shop, sell various of jewel and other accesories, one jewel shop requires 40 pearls and can produce $4000 income tax per day.', 'Super Soldier Barracks, place to train super soldiers, one super soldier barracks requires 60 foods, 50 steel and $120 wages and can train 2 super soldier per 5 day.'); kebutuhanMoney = new Array('', 300, 200, 350, 300, 400, 500, 450, 400, 350, 600, 500, 750, 450, 350, 400, 600, 500, 800, 850, 500, 800, 450, 900, 1000); kebutuhanFood = new Array('', 25, 20, 30, 20, 25, 15, 15, 35, 25, 25, 15, 25, 20, 25, 20, 40, 20, 15, 30, 50, 25, 15, 15, 25); kebutuhanIron = new Array('', 5, 0, 0, 10, 25, 15, 10, 20, 10, 15, 20, 5, 10, 5, 10, 25, 15, 20, 30, 0, 25, 10, 30, 50); kebutuhanWood = new Array('', 25, 15, 30, 25, 20, 10, 15, 35, 20, 15, 0, 5, 25, 15, 10, 35, 20, 15, 40, 15, 15, 15, 30, 10); kebutuhanWorker = new Array('', -50, 10, 20, 5, 10, 5, 5, 10, 10, 10, 5, 10, 10, 10, 10, 15, 10, 15, 25, 5, 10, 5, 5, 30); } function ygDiSave() { namaData = 'Empty'; day = 1; sudahTutor = false; moneyKota = new Array(); foodKota = new Array(); ironKota = new Array(); woodKota = new Array(); swordKota = new Array(); xarrowKota = new Array(); soldierKota = new Array(); workerKota = new Array(); spearKota = new Array(); diamondKota = new Array(); coalKota = new Array(); oilKota = new Array(); horseKota = new Array(); catapultKota = new Array(); witchKota = new Array(); elephantKota = new Array(); fireKota = new Array(); steelKota = new Array(); xsuperKota = new Array(); iceballKota = new Array(); fireballKota = new Array(); poisonKota = new Array(); hurricaneKota = new Array(); earthquakeKota = new Array(); upgradeProperti = new Array(); punyaWilayah = new Array(); spellBuat = new Array(); waktuBuat = new Array(); i = 1; while (i <= 12) { if (i == 1) { punyaWilayah[i] = 1; posSatu = 1; } else { if (i == 9) { punyaWilayah[i] = 2; posDua = 9; } else { punyaWilayah[i] = 0; } } ++i; } i = 1; while (i <= bykKota) { jenisBangunan[i] = new Array(); upgradeProperti[i] = new Array(); spellBuat[i] = new Array(); waktuBuat[i] = new Array(); if (i == 1) { moneyKota[i] = 175 * _root.jenisBonus1; foodKota[i] = 50 * _root.jenisBonus2; ironKota[i] = 25 * _root.jenisBonus3; woodKota[i] = 20 * _root.jenisBonus4; swordKota[i] = 0; xarrowKota[i] = 0; soldierKota[i] = 0; workerKota[i] = 0; diamondKota[i] = 0; coalKota[i] = 0; oilKota[i] = 0; spearKota[i] = 0; horseKota[i] = 0; catapultKota[i] = 0; witchKota[i] = 0; elephantKota[i] = 0; fireKota[i] = 0; steelKota[i] = 0; xsuperKota[i] = 0; iceballKota[i] = 0; fireballKota[i] = 0; poisonKota[i] = 0; hurricaneKota[i] = 0; earthquakeKota[i] = 0; } else { if (i == 9) { moneyKota[i] = 150 * _root.jenisBonus1; foodKota[i] = 40 * _root.jenisBonus2; ironKota[i] = 10 * _root.jenisBonus3; woodKota[i] = 15 * _root.jenisBonus4; swordKota[i] = 0; xarrowKota[i] = 0; soldierKota[i] = 0; workerKota[i] = 0; diamondKota[i] = 0; coalKota[i] = 0; oilKota[i] = 0; spearKota[i] = 0; horseKota[i] = 0; catapultKota[i] = 0; witchKota[i] = 0; elephantKota[i] = 0; fireKota[i] = 0; steelKota[i] = 0; xsuperKota[i] = 0; iceballKota[i] = 0; fireballKota[i] = 0; poisonKota[i] = 0; hurricaneKota[i] = 0; earthquakeKota[i] = 0; } else { moneyKota[i] = 0; foodKota[i] = 0; ironKota[i] = 0; woodKota[i] = 0; swordKota[i] = 0; xarrowKota[i] = 0; soldierKota[i] = 0; workerKota[i] = 0; diamondKota[i] = 0; coalKota[i] = 0; oilKota[i] = 0; spearKota[i] = 0; horseKota[i] = 0; catapultKota[i] = 0; witchKota[i] = 0; elephantKota[i] = 0; fireKota[i] = 0; steelKota[i] = 0; xsuperKota[i] = 0; iceballKota[i] = 0; fireballKota[i] = 0; poisonKota[i] = 0; hurricaneKota[i] = 0; earthquakeKota[i] = 0; } } j = 1; while (j <= bykArea) { jenisBangunan[i][j] = new Array(); upgradeProperti[i][j] = new Array(); spellBuat[i][j] = new Array(); waktuBuat[i][j] = new Array(); k = 1; while (k <= bykProperti) { jenisBangunan[i][j][k] = 1; upgradeProperti[i][j][k] = 1; spellBuat[i][j][k] = 1; waktuBuat[i][j][k] = 0; ++k; } ++j; } ++i; } } function simpanJeda(dataKe) { if (keJeda == 1) { i = 0; while (i <= simpanSemua.length - 1) { _root['idatSimp' + i] = simpanSemua[i] + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp' + i], '/'); Cookies.data['isoData' + i] = eval(simpanSemua[i]); Cookies.flush(); ++i; } } else { if (keJeda == 2) { i = 1; while (i <= 12) { _root['idatSimp1' + i] = String('punyaWilayah' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp1' + i], '/'); Cookies.data['isoData1' + i] = punyaWilayah[i]; Cookies.flush(); ++i; } } else { if (keJeda == 3) { i = 1; while (i <= 12) { _root['idatSimp2' + i] = String('moneyKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp2' + i], '/'); Cookies.data['isoData2' + i] = moneyKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 4) { i = 1; while (i <= 12) { _root['idatSimp3' + i] = String('foodKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp3' + i], '/'); Cookies.data['isoData3' + i] = foodKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 5) { i = 1; while (i <= 12) { _root['idatSimp4' + i] = String('foodKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp4' + i], '/'); Cookies.data['isoData4' + i] = ironKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 6) { i = 1; while (i <= 12) { _root['idatSimp5' + i] = String('woodKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp5' + i], '/'); Cookies.data['isoData5' + i] = woodKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 7) { i = 1; while (i <= 12) { _root['idatSimp6' + i] = String('swordKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp6' + i], '/'); Cookies.data['isoData6' + i] = swordKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 8) { i = 1; while (i <= 12) { _root['idatSimp7' + i] = String('xarrowKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp7' + i], '/'); Cookies.data['isoData7' + i] = xarrowKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 9) { i = 1; while (i <= 12) { _root['idatSimp8' + i] = String('soldierKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp8' + i], '/'); Cookies.data['isoData8' + i] = soldierKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 10) { i = 1; while (i <= 12) { _root['idatSimp9' + i] = String('workerKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp9' + i], '/'); Cookies.data['isoData9' + i] = workerKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 11) { i = 1; while (i <= 12) { _root['idatSimp10' + i] = String('diamondKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp10' + i], '/'); Cookies.data['isoData10' + i] = diamondKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 12) { i = 1; while (i <= 12) { _root['idatSimp11' + i] = String('coalKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp11' + i], '/'); Cookies.data['isoData11' + i] = coalKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 13) { i = 1; while (i <= 12) { _root['idatSimp12' + i] = String('oilKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp12' + i], '/'); Cookies.data['isoData12' + i] = oilKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 14) { i = 1; while (i <= 12) { _root['idatSimp13' + i] = String('spearKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp13' + i], '/'); Cookies.data['isoData13' + i] = spearKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 15) { i = 1; while (i <= 12) { _root['idatSimp14' + i] = String('horseKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp14' + i], '/'); Cookies.data['isoData14' + i] = horseKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 16) { i = 1; while (i <= 12) { _root['idatSimp15' + i] = String('catapultKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp15' + i], '/'); Cookies.data['isoData15' + i] = catapultKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 17) { i = 1; while (i <= 12) { _root['idatSimp16' + i] = String('witchKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp16' + i], '/'); Cookies.data['isoData16' + i] = witchKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 18) { i = 1; while (i <= 12) { _root['idatSimp17' + i] = String('elephantKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp17' + i], '/'); Cookies.data['isoData17' + i] = elephantKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 19) { i = 1; while (i <= 12) { _root['idatSimp18' + i] = String('fireKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp18' + i], '/'); Cookies.data['isoData18' + i] = fireKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 20) { i = 1; while (i <= 12) { _root['idatSimp19' + i] = String('steelKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp19' + i], '/'); Cookies.data['isoData19' + i] = steelKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 21) { i = 1; while (i <= 12) { _root['idatSimp20' + i] = String('xsuperKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp20' + i], '/'); Cookies.data['isoData20' + i] = xsuperKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 22) { i = 1; while (i <= 12) { _root['idatSimp21' + i] = String('iceballKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp21' + i], '/'); Cookies.data['isoData21' + i] = iceballKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 23) { i = 1; while (i <= 12) { _root['idatSimp22' + i] = String('fireballKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp22' + i], '/'); Cookies.data['isoData22' + i] = fireballKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 24) { i = 1; while (i <= 12) { _root['idatSimp23' + i] = String('poisonKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp23' + i], '/'); Cookies.data['isoData23' + i] = poisonKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 25) { i = 1; while (i <= 12) { _root['idatSimp24' + i] = String('hurricaneKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp24' + i], '/'); Cookies.data['isoData24' + i] = hurricaneKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 26) { i = 1; while (i <= 12) { _root['idatSimp25' + i] = String('earthquakeKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp25' + i], '/'); Cookies.data['isoData25' + i] = earthquakeKota[i]; Cookies.flush(); ++i; } } else { if (keJeda == 27) { i = 1; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 28) { i = 2; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 29) { i = 3; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 30) { i = 4; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 31) { i = 5; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 32) { i = 6; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 33) { i = 7; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 34) { i = 8; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 35) { i = 9; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 36) { i = 10; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 37) { i = 11; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } else { if (keJeda == 38) { i = 12; j = 1; while (j <= xbykArea2) { k = 1; while (k <= bykProperti) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); Cookies.data['isoData30' + i + j + k] = jenisBangunan[i][j][k]; Cookies.flush(); _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); Cookies.data['isoData31' + i + j + k] = upgradeProperti[i][j][k]; Cookies.flush(); _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); Cookies.data['isoData32' + i + j + k] = spellBuat[i][j][k]; Cookies.flush(); ++k; } ++j; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } msgBox_mc.bar.gotoAndStop(keJeda); if (keJeda == 38) { clearInterval(idJeda); initData(); xloadData(zindi); cekData(); } else { ++keJeda; } } function simpanData(dataKe) { keJeda = 1; idJeda = setInterval(simpanJeda, 500, dataKe); } function loadJeda(dataKe) { if (keJeda == 1) { i = 0; while (i <= simpanSemua.length - 1) { _root['idatSimp' + i] = simpanSemua[i] + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp' + i], '/'); _root[simpanSemua[i]] = Cookies.data['isoData' + i]; ++i; } } else { if (keJeda == 2) { i = 1; while (i <= 12) { _root['idatSimp1' + i] = String('punyaWilayah' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp1' + i], '/'); punyaWilayah[i] = Cookies.data['isoData1' + i]; ++i; } } else { if (keJeda == 3) { i = 1; while (i <= 12) { _root['idatSimp2' + i] = String('moneyKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp2' + i], '/'); moneyKota[i] = Cookies.data['isoData2' + i]; ++i; } } else { if (keJeda == 4) { i = 1; while (i <= 12) { _root['idatSimp3' + i] = String('foodKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp3' + i], '/'); foodKota[i] = Cookies.data['isoData3' + i]; ++i; } } else { if (keJeda == 5) { i = 1; while (i <= 12) { _root['idatSimp4' + i] = String('foodKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp4' + i], '/'); ironKota[i] = Cookies.data['isoData4' + i]; ++i; } } else { if (keJeda == 6) { i = 1; while (i <= 12) { _root['idatSimp5' + i] = String('woodKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp5' + i], '/'); woodKota[i] = Cookies.data['isoData5' + i]; ++i; } } else { if (keJeda == 7) { i = 1; while (i <= 12) { _root['idatSimp6' + i] = String('swordKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp6' + i], '/'); swordKota[i] = Cookies.data['isoData6' + i]; ++i; } } else { if (keJeda == 8) { i = 1; while (i <= 12) { _root['idatSimp7' + i] = String('xarrowKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp7' + i], '/'); xarrowKota[i] = Cookies.data['isoData7' + i]; ++i; } } else { if (keJeda == 9) { i = 1; while (i <= 12) { _root['idatSimp8' + i] = String('soldierKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp8' + i], '/'); soldierKota[i] = Cookies.data['isoData8' + i]; ++i; } } else { if (keJeda == 10) { i = 1; while (i <= 12) { _root['idatSimp9' + i] = String('workerKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp9' + i], '/'); workerKota[i] = Cookies.data['isoData9' + i]; ++i; } } else { if (keJeda == 11) { i = 1; while (i <= 12) { _root['idatSimp10' + i] = String('diamondKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp10' + i], '/'); diamondKota[i] = Cookies.data['isoData10' + i]; ++i; } } else { if (keJeda == 12) { i = 1; while (i <= 12) { _root['idatSimp11' + i] = String('coalKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp11' + i], '/'); coalKota[i] = Cookies.data['isoData11' + i]; ++i; } } else { if (keJeda == 13) { i = 1; while (i <= 12) { _root['idatSimp12' + i] = String('oilKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp12' + i], '/'); oilKota[i] = Cookies.data['isoData12' + i]; ++i; } } else { if (keJeda == 14) { i = 1; while (i <= 12) { _root['idatSimp13' + i] = String('spearKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp13' + i], '/'); spearKota[i] = Cookies.data['isoData13' + i]; ++i; } } else { if (keJeda == 15) { i = 1; while (i <= 12) { _root['idatSimp14' + i] = String('horseKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp14' + i], '/'); horseKota[i] = Cookies.data['isoData14' + i]; ++i; } } else { if (keJeda == 16) { i = 1; while (i <= 12) { _root['idatSimp15' + i] = String('catapultKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp15' + i], '/'); catapultKota[i] = Cookies.data['isoData15' + i]; ++i; } } else { if (keJeda == 17) { i = 1; while (i <= 12) { _root['idatSimp16' + i] = String('witchKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp16' + i], '/'); witchKota[i] = Cookies.data['isoData16' + i]; ++i; } } else { if (keJeda == 18) { i = 1; while (i <= 12) { _root['idatSimp17' + i] = String('elephantKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp17' + i], '/'); elephantKota[i] = Cookies.data['isoData17' + i]; ++i; } } else { if (keJeda == 19) { i = 1; while (i <= 12) { _root['idatSimp18' + i] = String('fireKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp18' + i], '/'); fireKota[i] = Cookies.data['isoData18' + i]; ++i; } } else { if (keJeda == 20) { i = 1; while (i <= 12) { _root['idatSimp19' + i] = String('steelKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp19' + i], '/'); steelKota[i] = Cookies.data['isoData19' + i]; ++i; } } else { if (keJeda == 21) { i = 1; while (i <= 12) { _root['idatSimp20' + i] = String('xsuperKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp20' + i], '/'); xsuperKota[i] = Cookies.data['isoData20' + i]; ++i; } } else { if (keJeda == 22) { i = 1; while (i <= 12) { _root['idatSimp21' + i] = String('iceballKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp21' + i], '/'); iceballKota[i] = Cookies.data['isoData21' + i]; ++i; } } else { if (keJeda == 23) { i = 1; while (i <= 12) { _root['idatSimp22' + i] = String('fireballKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp22' + i], '/'); fireballKota[i] = Cookies.data['isoData22' + i]; ++i; } } else { if (keJeda == 24) { i = 1; while (i <= 12) { _root['idatSimp23' + i] = String('poisonKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp23' + i], '/'); poisonKota[i] = Cookies.data['isoData23' + i]; ++i; } } else { if (keJeda == 25) { i = 1; while (i <= 12) { _root['idatSimp24' + i] = String('hurricaneKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp24' + i], '/'); hurricaneKota[i] = Cookies.data['isoData24' + i]; ++i; } } else { if (keJeda == 26) { i = 1; while (i <= 12) { _root['idatSimp25' + i] = String('earthquakeKota' + i) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp25' + i], '/'); earthquakeKota[i] = Cookies.data['isoData25' + i]; ++i; } } else { if (keJeda == 27) { i = 1; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 28) { i = 2; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 29) { i = 3; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 30) { i = 4; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 31) { i = 5; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 32) { i = 6; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 33) { i = 7; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 34) { i = 8; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 35) { i = 9; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 36) { i = 10; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 37) { i = 11; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } else { if (keJeda == 38) { i = 12; j = 1; while (j <= 4) { k = 1; while (k <= 12) { _root['idatSimp30' + i + j + k] = String('jenisBangunan' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp30' + i + j + k], '/'); jenisBangunan[i][j][k] = Cookies.data['isoData30' + i + j + k]; _root['idatSimp31' + i + j + k] = String('upgradeProperti' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp31' + i + j + k], '/'); upgradeProperti[i][j][k] = Cookies.data['isoData31' + i + j + k]; _root['idatSimp32' + i + j + k] = String('spellBuat' + i + j + k) + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp32' + i + j + k], '/'); spellBuat[i][j][k] = Cookies.data['isoData32' + i + j + k]; ++k; } ++j; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } msgBox_mc.bar.gotoAndStop(keJeda); if (keJeda == 38) { clearInterval(idJeda2); wi = 0; while (wi <= 9) { delete _root['data' + wi].onRollOver; delete _root['data' + wi].onRollOut; delete _root['data' + wi].onRelease; ++wi; } gotoAndStop(129); } else { ++keJeda; } } function loadData(dataKe) { initBangun(); simpanBangun(); ygDiSave(); keJeda = 1; idJeda2 = setInterval(loadJeda, 500, dataKe); } function xloadData(dataKe) { i = 0; while (i <= simpanSemua.length - 1) { _root['idatSimp' + i] = simpanSemua[i] + dataKe; Cookies = SharedObject.getLocal(_root['idatSimp' + i], '/'); _root['c' + simpanSemua[i]] = Cookies.data['isoData' + i]; ++i; } } stop(); xsound = attachMovie('sound_mc', 'sound', 4); xmusic = attachMovie('sound_mc', 'music', 5); volum1 = 100; volum2 = 75; _quality = 'HIGH'; speedGame = 1; initAwalan(); simpanSemua = new Array('namaData', 'day', 'posSatu', 'posDua', 'jenisKerajaan', 'jenisMusuh', 'tingkatSulit', 'xpilihKota', 'xpilihMap', 'lawanNyerang', 'lawanNyerang2', 'speedGame', 'sudahTutor'); gotoAndStop(38); } instance of movieClip 3 { onClipEvent (release) { getURL('http://www.maxgames.com', '_blank'); } } movieClip 2399 { } movieClip 2400 { } movieClip 2402 { } movieClip 2412 { } movieClip 2421 { } movieClip 2422 { frame 346 { gotoAndPlay(this._currentframe + random(40)); } frame 859 { gotoAndPlay(this._currentframe + random(40)); } } movieClip 2427 { } movieClip 2436 { } movieClip 2437 { frame 691 { gotoAndPlay(this._currentframe + random(40)); } frame 1001 { gotoAndPlay(this._currentframe + random(40)); } } movieClip 2438 { } movieClip 2446 { } movieClip 2455 { } movieClip 2463 { } movieClip 2474 { } movieClip 2475 { frame 541 { gotoAndPlay(this._currentframe + random(40)); } frame 1311 { gotoAndPlay(this._currentframe + random(40)); } } movieClip 2483 { } movieClip 2493 { } movieClip 2495 { frame 155 { gotoAndPlay(this._currentframe + random(40)); } frame 341 { gotoAndPlay(this._currentframe + random(40)); } } movieClip 2496 { frame 111 { gotoAndPlay(this._currentframe + random(40)); } frame 281 { gotoAndPlay(this._currentframe + random(40)); } } movieClip 2498 { } movieClip 2500 { } frame 36 { stop(); } button 2504 { on (release) { getURL('http://www.maxgames.com', '_blank'); } } movieClip 2507 { } movieClip 2508 { } movieClip 2511 { frame 60 { stop(); } } movieClip 2525 { frame 14 { stop(); } } movieClip 2526 { } movieClip 2527 { } movieClip 2528 { frame 9 { _root.backPedang(); } } movieClip 2529 { frame 9 { _root.backPedang(); } } movieClip 2530 { frame 328 { stop(); _root.gotoAndStop('preload'); } } frame 37 { gotoAndStop(6); } frame 38 { stop(); _root.onMouseDown = function () { delete _root.onMouseDown; gotoAndStop('menu'); }; } instance of movieClip 3 { onClipEvent (release) { getURL('http://www.maxgames.com', '_blank'); } } frame 47 { stop(); gaming_btn.onRollOver = function () { over(); }; more_btn.onRollOver = gaming_btn.onRollOver; demo_btn.onRollOver = gaming_btn.onRollOver; options_btn.onRollOver = gaming_btn.onRollOver; credits_btn.onRollOver = gaming_btn.onRollOver; help_btn.onRollOver = gaming_btn.onRollOver; back_btn.onRollOver = gaming_btn.onRollOver; load_btn.onRollOver = gaming_btn.onRollOver; new_btn.onRollOver = gaming_btn.onRollOver; new_btn.onRelease = function () { klik(); gotoAndStop(128); }; load_btn.onRelease = function () { klik(); xjenisData = 'load'; posMain = 'awal'; gotoAndStop('load'); }; back_btn.onRelease = function () { klik(); gotoAndStop('utama'); }; help_btn.onRelease = function () { klik(); gotoAndStop('help'); }; credits_btn.onRelease = function () { klik(); gotoAndStop('credits'); }; options_btn.onRelease = function () { klik(); gotoAndStop('options'); }; demo_btn.onRelease = function () { klik(); gotoAndStop(131); }; more_btn.onRelease = function () { klik(); getURL('http://www.maxgames.com', '_blank'); }; } instance of movieClip 3 { onClipEvent (release) { getURL('http://www.maxgames.com', '_blank'); } } frame 57 { stop(); _root.onMouseDown = function () { delete _root.onMouseDown; gotoAndStop('menu'); }; } frame 67 { function cekSpeedQuality() { i = 1; while (i <= 5) { this['speed' + i].angka = i; this['quality' + i].angka = i; this['speed' + i].gotoAndStop(1); this['quality' + i].gotoAndStop(1); this['speed' + i].onRelease = klikSpeed; this['quality' + i].onRelease = klikQuality; ++i; } this['speed' + _root.speedGame].gotoAndStop(2); this['quality' + _root.qualityGame].gotoAndStop(2); } function klikSpeed() { indi = new String(this); _root.speedGame = Number(indi.substr(indi.length - 1, 1)); if (_root.speedGame == 1) { _root.delayHari = 9000; } else { if (_root.speedGame == 2) { _root.delayHari = 4000; } else { if (_root.speedGame == 3) { _root.delayHari = 2000; } else { if (_root.speedGame == 4) { _root.delayHari = 1000; } else { if (_root.speedGame == 5) { _root.delayHari = 500; } } } } } cekSpeedQuality(); } function klikQuality() { indi = new String(this); _root.qualityGame = Number(indi.substr(indi.length - 1, 1)); if (_root.qualityGame == 1) { _quality = 'HIGH'; } else { if (_root.qualityGame == 2) { _quality = 'MEDIUM'; } else { if (_root.qualityGame == 3) { _quality = 'LOW'; } } } cekSpeedQuality(); } stop(); back_btn.onRelease = function () { gotoAndStop('menu'); }; bar1_mc.bar_mc._x = Math.ceil(_root.volum1 / 0.4347826086956522 - 115); bar1_mc.bar_mc.onEnterFrame = function () { _root.volum1 = int(0.4347826086956522 * (this._x + 115)); _root.myMusic.setVolume(_root.volum1); bar1_mc.persen1 = _root.volum1 + ' %'; }; bar1_mc.indi_mc.onPress = function () { klik(); startDrag(bar1_mc.bar_mc, true, -115, 0, 115, 0); }; bar1_mc.bar_mc.onRollOver = function () { over(); }; bar1_mc.indi_mc.onReleaseOutside = function () { over(); stopDrag(); }; bar1_mc.indi_mc.onRelease = bar1_mc.indi_mc.onReleaseOutside; bar2_mc.bar_mc._x = Math.ceil(_root.volum2 / 0.4347826086956522 - 115); bar2_mc.bar_mc.onEnterFrame = function () { _root.volum2 = int(0.4347826086956522 * (this._x + 115)); _root.volum3 = int(0.4347826086956522 * (this._x + 115)); _root.mySound.setVolume(_root.volum2); _root.mySound2.setVolume(_root.volum3); bar2_mc.persen2 = _root.volum2 + ' %'; }; bar2_mc.indi_mc.onPress = function () { klik(); startDrag(bar2_mc.bar_mc, true, -115, 0, 115, 0); }; bar2_mc.bar_mc.onRollOver = function () { over(); }; bar2_mc.indi_mc.onReleaseOutside = function () { over(); stopDrag(); }; bar2_mc.indi_mc.onRelease = bar2_mc.indi_mc.onReleaseOutside; cekSpeedQuality(); } frame 77 { function initData() { msgBox_mc._visible = false; msgBox_mc.bar._visible = false; quit_btn.enabled = true; wi = 0; while (wi <= 9) { xloadData(wi); if (cnamaData == undefined) { cnamaData = 'Empty'; } _root['data' + wi].data = cnamaData; _root['data' + wi].onRollOver = overData; _root['data' + wi].onRollOut = outData; _root['data' + wi].onRelease = klikData; ++wi; } } function overData() { over(); kata = new String(this); indi = Number(kata.substr(kata.length - 1, 1)); xloadData(indi); cekData(); if (vday == '-') { this.gotoAndStop(2); } else { this.gotoAndStop(3); } } function cekData() { if (cday == undefined) { vday = '-'; } else { vday = cday; } if (cjenisKerajaan == undefined) { vjenisKerajaan = '-'; } else { if (cjenisKerajaan == 1) { vjenisKerajaan = 'Zargas'; } else { vjenisKerajaan = 'Artavera'; } } if (ctingkatSulit == undefined) { vtingkatSulit = '-'; } else { if (ctingkatSulit == 1) { vtingkatSulit = 'Easy'; } else { if (ctingkatSulit == 2) { vtingkatSulit = 'Normal'; } else { if (ctingkatSulit == 3) { vtingkatSulit = 'Hard'; } else { if (ctingkatSulit == 4) { vtingkatSulit = 'Impossible'; } } } } } if (cxpilihKota == undefined) { vxpilihKota = '-'; } else { vxpilihKota = namaKota[cxpilihKota]; } if (cxpilihMap == undefined) { vxpilihMap = '-'; } else { vxpilihMap = cxpilihMap; } if (cspeedGame == undefined) { vspeedGame = '-'; } else { if (cspeedGame == 1) { vspeedGame = 'SLOW'; } else { if (cspeedGame == 2) { vspeedGame = 'NORMAL'; } else { if (cspeedGame == 3) { vspeedGame = 'FAST'; } } } } } function outData() { this.gotoAndStop(1); vday = '-'; vjenisKerajaan = '-'; vtingkatSulit = '-'; vxpilihKota = '-'; vxpilihMap = '-'; vspeedGame = '-'; } function outData2() { vday = '-'; vjenisKerajaan = '-'; vtingkatSulit = '-'; vxpilihKota = '-'; vxpilihMap = '-'; vspeedGame = '-'; } function klikData() { klik(); kata = new String(this); zindi = Number(kata.substr(kata.length - 1, 1)); if (xjenisData == 'save') { wi = 0; while (wi <= 9) { delete _root['data' + wi].onRollOver; delete _root['data' + wi].onRollOut; delete _root['data' + wi].onRelease; ++wi; } quit_btn.enabled = false; msgBox_mc._visible = true; msgBox_mc.gotoAndStop(1); msgBox_mc.dataName = _root['data' + zindi].data; msgBox_mc.ok_btn._visible = true; msgBox_mc.cancel_btn._visible = true; msgBox_mc.bar._visible = false; Selection.setFocus(msgBox_mc.nama); msgBox_mc.ok_btn.onRollOver = function () { over(); }; msgBox_mc.cancel_btn.onRollOver = msgBox_mc.ok_btn.onRollOver; msgBox_mc.cancel_btn.onRelease = function () { klik(); initData(); }; msgBox_mc.ok_btn.onRelease = function () { klik(); msgBox_mc.ok_btn._visible = false; msgBox_mc.cancel_btn._visible = false; msgBox_mc.bar._visible = true; msgBox_mc.bar.tipe = 'Saving..'; namaData = msgBox_mc.dataName; simpanData(zindi); }; } else { if (xjenisData == 'load') { if (this._currentframe == 3) { wi = 0; while (wi <= 9) { delete _root['data' + wi].onRollOver; delete _root['data' + wi].onRollOut; delete _root['data' + wi].onRelease; ++wi; } quit_btn.enabled = false; msgBox_mc._visible = true; msgBox_mc.gotoAndStop(2); msgBox_mc.ok_btn._visible = false; msgBox_mc.cancel_btn._visible = false; msgBox_mc.bar._visible = true; msgBox_mc.bar.tipe = 'Loading..'; initBangun(); simpanBangun(); ygDiSave(); loadData(zindi); } } } this.gotoAndStop(1); } stop(); namaKota = new Array('', 'Arigal', 'Bibaluz', 'Carex', 'Deresium', 'Eradite', 'Fargaz', 'Gigelium', 'Haze', 'Istanada', 'Jerax', 'Konselium', 'Liures'); outData2(); initData(); if (xjenisData == 'save') { saveload.gotoAndStop(2); jenis_mc.gotoAndStop(1); quit_btn.enabled = true; quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); if (posMain == 'awal') { gotoAndStop('menu'); } else { gotoAndStop(129); } }; } else { if (xjenisData == 'load') { saveload.gotoAndStop(1); jenis_mc.gotoAndStop(2); quit_btn.enabled = true; quit_btn.onRollOver = function () { over(); }; quit_btn.onRelease = function () { klik(); if (posMain == 'awal') { gotoAndStop('menu'); } else { gotoAndStop(129); } }; } } } movieClip 2560 { frame 1 { stop(); } } movieClip 2570 { frame 1 { stop(); } } movieClip 2576 { frame 1 { stop(); } } movieClip 2597 { frame 1 { stop(); } } movieClip 2600 { frame 1 { stop(); } } movieClip 2602 { frame 1 { stop(); } } frame 97 { stop(); close_btn.onRelease = function () { gotoAndStop('menu'); }; next_btn.onRelease = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 98 { stop(); back_btn.onRelease = function () { _root.gotoAndStop(_root._currentframe - 1); }; close_btn.onRelease = function () { gotoAndStop('menu'); }; next_btn.onRelease = function () { _root.gotoAndStop(_root._currentframe + 1); }; } movieClip 2667 { frame 1 { stop(); } instance of movieClip 3 { onClipEvent (release) { getURL('http://www.maxgames.com', '_blank'); } } } movieClip 2701 { frame 1 { stop(); } instance of movieClip 3 { onClipEvent (release) { getURL('http://www.maxgames.com', '_blank'); } } } frame 109 { stop(); back_btn.onRelease = function () { _root.gotoAndStop(_root._currentframe - 1); }; close_btn.onRelease = function () { gotoAndStop('menu'); }; next_btn.onRelease = function () { _root.gotoAndStop(_root._currentframe + 1); }; } frame 110 { stop(); back_btn.onRelease = function () { _root.gotoAndStop(_root._currentframe - 1); }; close_btn.onRelease = function () { gotoAndStop('menu'); }; } frame 128 { function cekLanjut() { delete daerah1.onRelease; delete daerah1.onRollOver; delete daerah1.onRollOut; delete daerah9.onRelease; delete daerah9.onRollOver; delete daerah9.onRollOut; select_mc._visible = true; select_mc.gotoAndStop(2); select_mc.xleft = 50; i = 1; while (i <= 4) { select_mc['level' + i] = 10; select_mc['kiri' + i].onRelease = xklikKiri; select_mc['kanan' + i].onRelease = xklikKanan; ++i; } select_mc.ok_btn.onRelease = function () { i = 1; while (i <= 4) { _root['jenisBonus' + i] = Number(select_mc['level' + i]); ++i; } select_mc.gotoAndStop(3); select_mc.easy_btn.onRelease = function () { mulaiSaja(); tingkatSulit = 1; }; select_mc.normal_btn.onRelease = function () { mulaiSaja(); tingkatSulit = 2; }; select_mc.hard_btn.onRelease = function () { mulaiSaja(); tingkatSulit = 3; }; select_mc.impossible_btn.onRelease = function () { mulaiSaja(); tingkatSulit = 4; }; }; select_mc.random_btn.onRelease = function () { select_mc.xleft = 50; i = 1; while (i <= 4) { select_mc['level' + i] = 10; ++i; } i = 1; while (i <= 50) { rand = random(4) + 1; ++select_mc['level' + rand]; --select_mc.xleft; ++i; } }; } function mulaiSaja() { initBangun(); simpanBangun(); ygDiSave(); gotoAndStop(129); } function xklikKiri() { myStr = new String(this); indi = Number(myStr.substr(myStr.length - 1, 1)); if (select_mc['level' + indi] <= 5) { select_mc['level' + indi] = 5; } else { --select_mc['level' + indi]; ++select_mc.xleft; } } function xklikKanan() { myStr = new String(this); indi = Number(myStr.substr(myStr.length - 1, 1)); if (select_mc.xleft <= 0) { select_mc.xleft = 0; } else { ++select_mc['level' + indi]; --select_mc.xleft; } } stop(); indo = 'Select your empire:'; back_btn.onRelease = function () { gotoAndStop('menu'); }; istana1.gotoAndStop(1); istana9.gotoAndStop(2); select_mc._visible = true; select_mc.gotoAndStop(1); select_mc.ok_btn.onRelease = function () { select_mc._visible = false; daerah1.onRollOver = function () { this.gotoAndStop(2); }; daerah1.onRollOut = function () { this.gotoAndStop(1); }; daerah1.onRelease = function () { indo = 'Your selected empire'; jenisKerajaan = 1; jenisMusuh = 2; xpilihKota = 1; xpilihMap = 1; this.gotoAndStop(2); empire1._visible = false; cekLanjut(); }; daerah9.onRollOver = function () { this.gotoAndStop(2); }; daerah9.onRollOut = function () { this.gotoAndStop(1); }; daerah9.onRelease = function () { indo = 'Your selected empire'; jenisKerajaan = 2; jenisMusuh = 1; xpilihKota = 9; xpilihMap = 2; this.gotoAndStop(2); empire2._visible = false; cekLanjut(); }; }; } movieClip 2795 { frame 1 { stop(); } } frame 129 { function buatTutor() { xcekInfo(); xpause = true; tutor = attachMovie('tutor_mc', 'tutor', dalamTutor); tutor._x = 500; tutor._y = 220; i = 1; while (i <= bykArea) { peta['area' + i].enabled = false; ++i; } map.actions_btn.enabled = false; map.map_btn.enabled = false; map.options_btn.enabled = false; i = 1; while (i <= bykArea) { map['button' + i].enabled = false; map['map' + i].enabled = false; ++i; } } function skipTutor() { xpause = false; removeMovieClip(tutor); map.actions_btn.enabled = true; map.map_btn.enabled = true; map.options_btn.enabled = true; i = 1; while (i <= bykArea) { peta['area' + i].enabled = true; ++i; } i = 1; while (i <= bykArea) { map['button' + i].enabled = true; map['map' + i].enabled = true; ++i; } clearInterval(dayDelay); dayDelay = setInterval(dayItung, delayHari); } function resetWilayah(xindi, windi) { punyaWilayah[xindi] = windi; moneyKota[xindi] = 0; foodKota[xindi] = 0; ironKota[xindi] = 0; woodKota[xindi] = 0; swordKota[xindi] = 0; xarrowKota[xindi] = 0; soldierKota[xindi] = 0; workerKota[xindi] = 0; diamondKota[xindi] = 0; coalKota[xindi] = 0; oilKota[xindi] = 0; spearKota[xindi] = 0; horseKota[xindi] = 0; catapultKota[xindi] = 0; witchKota[xindi] = 0; elephantKota[xindi] = 0; j = 1; while (j <= bykArea) { k = 1; while (k <= bykProperti) { jenisBangunan[xindi][j][k] = 1; upgradeProperti[xindi][j][k] = 1; ++k; } ++j; } } function cekGameOver() { sudahKalah = true; clearSemua(); gotoAndStop(132); } function cekVictory() { sudahKalah = true; clearSemua(); gotoAndStop(133); } function initSemua() { initMap(); buatKotak(); buatPeta(); buatMap(); buatMsgBox(); buatInfo(); buatInfo2(); cekAnim(); clearInterval(dayDelay); dayDelay = setInterval(dayItung, delayHari); } function xcekInfo() { xi = pilihKota; if (isNaN(moneyKota[xi]) || moneyKota[xi] == undefined) { moneyKota[xi] = 0; } if (isNaN(foodKota[xi]) || foodKota[xi] == undefined) { foodKota[xi] = 0; } if (isNaN(ironKota[xi]) || ironKota[xi] == undefined) { ironKota[xi] = 0; } if (isNaN(woodKota[xi]) || woodKota[xi] == undefined) { woodKota[xi] = 0; } if (isNaN(swordKota[xi]) || swordKota[xi] == undefined) { swordKota[xi] = 0; } if (isNaN(xarrowKota[xi]) || xarrowKota[xi] == undefined) { xarrowKota[xi] = 0; } if (isNaN(soldierKota[xi]) || soldierKota[xi] == undefined) { soldierKota[xi] = 0; } if (isNaN(diamondKota[xi]) || diamondKota[xi] == undefined) { diamondKota[xi] = 0; } if (isNaN(coalKota[xi]) || coalKota[xi] == undefined) { coalKota[xi] = 0; } if (isNaN(oilKota[xi]) || oilKota[xi] == undefined) { moneyKota[xi] = 0; } if (isNaN(spearKota[xi]) || spearKota[xi] == undefined) { spearKota[xi] = 0; } if (isNaN(horseKota[xi]) || horseKota[xi] == undefined) { horseKota[xi] = 0; } if (isNaN(catapultKota[xi]) || catapultKota[xi] == undefined) { catapultKota[xi] = 0; } if (isNaN(witchKota[xi]) || witchKota[xi] == undefined) { witchKota[xi] = 0; } if (isNaN(elephantKota[xi]) || elephantKota[xi] == undefined) { elephantKota[xi] = 0; } if (isNaN(fireKota[xi]) || fireKota[xi] == undefined) { fireKota[xi] = 0; } if (isNaN(steelKota[xi]) || steelKota[xi] == undefined) { steelKota[xi] = 0; } if (isNaN(xsuperKota[xi]) || xsuperKota[xi] == undefined) { steelKota[xi] = 0; } if (isNaN(iceballKota[xi]) || iceballKota[xi] == undefined) { iceballKota[xi] = 0; } if (isNaN(fireballKota[xi]) || fireballKota[xi] == undefined) { fireballKota[xi] = 0; } if (isNaN(poisonKota[xi]) || poisonKota[xi] == undefined) { poisonKota[xi] = 0; } if (isNaN(hurricaneKota[xi]) || hurricaneKota[xi] == undefined) { hurricaneKota[xi] = 0; } if (isNaN(earthquakeKota[xi]) || earthquakeKota[xi] == undefined) { earthquakeKota[xi] = 0; } if (map.list_mc._currentframe == 1) { map.list_mc.money = '$' + moneyKota[xi]; map.list_mc.food = foodKota[xi]; map.list_mc.iron = ironKota[xi]; map.list_mc.wood = woodKota[xi]; map.list_mc.sword = swordKota[xi]; map.list_mc.xarrow = xarrowKota[xi]; map.list_mc.soldier = soldierKota[xi]; map.list_mc.worker = workerKota[xi]; } else { if (map.list_mc._currentframe == 2) { map.list_mc.diamond = diamondKota[xi]; map.list_mc.coal = coalKota[xi]; map.list_mc.oil = oilKota[xi]; map.list_mc.spear = spearKota[xi]; map.list_mc.horse = horseKota[xi]; map.list_mc.catapult = catapultKota[xi]; map.list_mc.witch = witchKota[xi]; map.list_mc.elephant = elephantKota[xi]; } else { if (map.list_mc._currentframe == 3) { map.list_mc.fire = fireKota[xi]; map.list_mc.steel = steelKota[xi]; map.list_mc.xsuper = xsuperKota[xi]; map.list_mc.iceball = iceballKota[xi]; map.list_mc.fireball = fireballKota[xi]; map.list_mc.poison = poisonKota[xi]; map.list_mc.hurricane = hurricaneKota[xi]; map.list_mc.earthquake = earthquakeKota[xi]; } } } if (tingkatSulit == 1) { map.list_mc.xlevel = 'EASY'; } else { if (tingkatSulit == 2) { map.list_mc.xlevel = 'NORMAL'; } else { if (tingkatSulit == 3) { map.list_mc.xlevel = 'HARD'; } else { if (tingkatSulit == 4) { map.list_mc.xlevel = 'IMPOSSIBLE'; } } } } if (jenisKerajaan == 1) { map.list_mc.xkerajaan = 'ZARGAS'; } else { if (jenisKerajaan == 2) { map.list_mc.xkerajaan = 'ARTAVERA'; } } map.day = 'DAY \n' + day; } function awalSemua() { zawalMoney = moneyKota[pilihKota]; zawalFood = foodKota[pilihKota]; zawalIron = ironKota[pilihKota]; zawalWood = woodKota[pilihKota]; zawalSword = swordKota[pilihKota]; zawalArrow = xarrowKota[pilihKota]; zawalSoldier = soldierKota[pilihKota]; zawalWorker = workerKota[pilihKota]; zawalDiamond = diamondKota[pilihKota]; zawalCoal = coalKota[pilihKota]; zawalOil = oilKota[pilihKota]; zawalSpear = spearKota[pilihKota]; zawalHorse = horseKota[pilihKota]; zawalCatapult = catapultKota[pilihKota]; zawalWitch = witchKota[pilihKota]; zawalElephant = elephantKota[pilihKota]; zawalFire = fireKota[pilihKota]; zawalSteel = steelKota[pilihKota]; zawalSuper = xsuperKota[pilihKota]; zawalIceball = iceballKota[pilihKota]; zawalFireball = fireballKota[pilihKota]; zawalPoison = poisonKota[pilihKota]; zawalHurricane = hurricaneKota[pilihKota]; zawalEarthquake = earthquakeKota[pilihKota]; } function dayItung() { if (xpause == false) { ++day; awalSemua(); randomFood = 3 + random(3); randomIron = 3 * (3 + random(3)); randomLog = 2 * (3 + random(3)); randomPearl = 7 * (3 + random(3)); randomCoal = 6 * (3 + random(3)); randomOil = 5 * (3 + random(3)); randomSteel = 8 * (3 + random(3)); sekaliIlang = false; i = 1; while (i <= bykKota) { j = 1; while (j <= bykArea) { k = 1; while (k <= bykProperti) { if (jenisBangunan[i][j][k] == 3) { foodKota[i] += 200 * upgradeProperti[i][j][k]; } else { if (jenisBangunan[i][j][k] == 10) { foodKota[i] += 250 * upgradeProperti[i][j][k]; } else { if (jenisBangunan[i][j][k] == 15) { foodKota[i] += 300 * upgradeProperti[i][j][k]; } else { if (jenisBangunan[i][j][k] == 16) { foodKota[i] += 300 * upgradeProperti[i][j][k]; } else { if (jenisBangunan[i][j][k] == 13) { diamondKota[i] += 4 * upgradeProperti[i][j][k]; } else { if (jenisBangunan[i][j][k] == 22) { moneyKota[i] -= 45 * upgradeProperti[i][j][k]; foodKota[i] -= 30 * upgradeProperti[i][j][k]; if (foodKota[i] > 0 && moneyKota[i] > 0) { steelKota[i] += 5 * upgradeProperti[i][j][k]; } } } } } } } ++k; } ++j; } ++i; } i = 1; while (i <= bykKota) { j = 1; while (j <= bykArea) { k = 1; while (k <= bykProperti) { if (jenisBangunan[i][j][k] == 4) { foodKota[i] -= 50 * upgradeProperti[i][j][k]; if (foodKota[i] > 0) { moneyKota[i] += 100 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 5) { moneyKota[i] -= 10 * upgradeProperti[i][j][k]; foodKota[i] -= 20 * upgradeProperti[i][j][k]; if (foodKota[i] > 0 && moneyKota[i] > 0) { woodKota[i] += 10 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 6) { moneyKota[i] -= 20 * upgradeProperti[i][j][k]; foodKota[i] -= 25 * upgradeProperti[i][j][k]; if (foodKota[i] > 0 && moneyKota[i] > 0) { ironKota[i] += 5 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 7) { moneyKota[i] -= 15 * upgradeProperti[i][j][k]; foodKota[i] -= 10 * upgradeProperti[i][j][k]; if (foodKota[i] > 0 && moneyKota[i] > 0 && woodKota[i] > 2 * upgradeProperti[i][j][k] && ironKota[i] > 5 * upgradeProperti[i][j][k]) { swordKota[i] += 1 * upgradeProperti[i][j][k]; } if (woodKota[i] > 2 * upgradeProperti[i][j][k]) { woodKota[i] -= 2 * upgradeProperti[i][j][k]; } if (ironKota[i] > 5 * upgradeProperti[i][j][k]) { ironKota[i] -= 5 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 8) { moneyKota[i] -= 15 * upgradeProperti[i][j][k]; foodKota[i] -= 10 * upgradeProperti[i][j][k]; if (foodKota[i] > 0 && moneyKota[i] > 0 && woodKota[i] > 4 * upgradeProperti[i][j][k] && ironKota[i] > 2 * upgradeProperti[i][j][k]) { xarrowKota[i] += 1 * upgradeProperti[i][j][k]; } if (woodKota[i] > 4 * upgradeProperti[i][j][k]) { woodKota[i] -= 4 * upgradeProperti[i][j][k]; } if (ironKota[i] > 2 * upgradeProperti[i][j][k]) { ironKota[i] -= 2 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 9) { moneyKota[i] -= 30 * upgradeProperti[i][j][k]; if (workerKota[i] >= 2 * upgradeProperti[i][j][k] && moneyKota[i] > 0) { soldierKota[i] += 2 * upgradeProperti[i][j][k]; workerKota[i] -= 2 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 11) { moneyKota[i] -= 15 * upgradeProperti[i][j][k]; foodKota[i] -= 10 * upgradeProperti[i][j][k]; if (foodKota[i] > 0) { moneyKota[i] += 200 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 12) { moneyKota[i] -= 15 * upgradeProperti[i][j][k]; foodKota[i] -= 10 * upgradeProperti[i][j][k]; if (foodKota[i] > 0 && moneyKota[i] > 0 && ironKota[i] > 10 * upgradeProperti[i][j][k]) { spearKota[i] += 1 * upgradeProperti[i][j][k]; } if (ironKota[i] > 10 * upgradeProperti[i][j][k]) { ironKota[i] -= 10 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 14) { if (foodKota[i] > 0 && moneyKota[i] > 0 && workerKota[i] > 2 * upgradeProperti[i][j][k]) { horseKota[i] += 2 * upgradeProperti[i][j][k]; workerKota[i] -= 2 * upgradeProperti[i][j][k]; moneyKota[i] -= 20 * upgradeProperti[i][j][k]; foodKota[i] -= 30 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 17) { if (foodKota[i] > 0 && moneyKota[i] > 0 && workerKota[i] > 2 * upgradeProperti[i][j][k]) { elephantKota[i] += 1 * upgradeProperti[i][j][k]; workerKota[i] -= 1 * upgradeProperti[i][j][k]; moneyKota[i] -= 30 * upgradeProperti[i][j][k]; foodKota[i] -= 40 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 18) { moneyKota[i] -= 20 * upgradeProperti[i][j][k]; foodKota[i] -= 15 * upgradeProperti[i][j][k]; if (foodKota[i] > 0 && moneyKota[i] > 0) { coalKota[i] += 3 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 19) { moneyKota[i] -= 40 * upgradeProperti[i][j][k]; foodKota[i] -= 25 * upgradeProperti[i][j][k]; if (foodKota[i] > 0 && moneyKota[i] > 0) { oilKota[i] += 100 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 20) { if (foodKota[i] > 0 && moneyKota[i] > 0 && woodKota[i] > 10 * upgradeProperti[i][j][k] && ironKota[i] > 5 * upgradeProperti[i][j][k] && workerKota[i] > 5 * upgradeProperti[i][j][k]) { catapultKota[i] += 1 * upgradeProperti[i][j][k]; workerKota[i] -= 1 * upgradeProperti[i][j][k]; moneyKota[i] -= 50 * upgradeProperti[i][j][k]; foodKota[i] -= 25 * upgradeProperti[i][j][k]; } if (woodKota[i] > 10 * upgradeProperti[i][j][k]) { woodKota[i] -= 10 * upgradeProperti[i][j][k]; } if (ironKota[i] > 5 * upgradeProperti[i][j][k]) { ironKota[i] -= 5 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 21) { if (foodKota[i] > 0 && moneyKota[i] > 0 && workerKota[i] > 2 * upgradeProperti[i][j][k]) { moneyKota[i] -= 75 * upgradeProperti[i][j][k]; foodKota[i] -= 50 * upgradeProperti[i][j][k]; witchKota[i] += 2 * upgradeProperti[i][j][k]; workerKota[i] -= 2 * upgradeProperti[i][j][k]; if (spellBuat[i][j][k] == 1) { iceballKota[i] += 2 * upgradeProperti[i][j][k]; } else { if (spellBuat[i][j][k] == 2) { fireballKota[i] += 2 * upgradeProperti[i][j][k]; } else { if (spellBuat[i][j][k] == 3) { poisonKota[i] += 2 * upgradeProperti[i][j][k]; } else { if (spellBuat[i][j][k] == 4) { hurricaneKota[i] += 2 * upgradeProperti[i][j][k]; } else { earthquakeKota[i] += 2 * upgradeProperti[i][j][k]; } } } } } } else { if (jenisBangunan[i][j][k] == 23) { moneyKota[i] -= 25 * upgradeProperti[i][j][k]; foodKota[i] -= 10 * upgradeProperti[i][j][k]; if (foodKota[i] > 0 && moneyKota[i] > 0 && woodKota[i] > 4 * upgradeProperti[i][j][k] && ironKota[i] > 2 * upgradeProperti[i][j][k] && oilKota[i] > 200 * upgradeProperti[i][j][k]) { fireKota[i] += 1 * upgradeProperti[i][j][k]; } if (woodKota[i] > 4 * upgradeProperti[i][j][k]) { woodKota[i] -= 4 * upgradeProperti[i][j][k]; } if (ironKota[i] > 2 * upgradeProperti[i][j][k]) { ironKota[i] -= 2 * upgradeProperti[i][j][k]; } if (oilKota[i] > 200 * upgradeProperti[i][j][k]) { oilKota[i] -= 200 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 24) { if (diamondKota[i] > 20 * upgradeProperti[i][j][k]) { moneyKota[i] += 2000 * upgradeProperti[i][j][k]; } if (diamondKota[i] > 20 * upgradeProperti[i][j][k]) { diamondKota[i] -= 20 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 25) { if (foodKota[i] > 0 && moneyKota[i] > 0 && steelKota[i] > 25 * upgradeProperti[i][j][k] && workerKota[i] > 1 * upgradeProperti[i][j][k]) { xsuperKota[i] += 1 * upgradeProperti[i][j][k]; workerKota[i] -= 1 * upgradeProperti[i][j][k]; moneyKota[i] -= 30 * upgradeProperti[i][j][k]; foodKota[i] -= 60 * upgradeProperti[i][j][k]; } if (steelKota[i] > 25 * upgradeProperti[i][j][k]) { steelKota[i] -= 25 * upgradeProperti[i][j][k]; } } else { if (jenisBangunan[i][j][k] == 2) { foodKota[i] -= 25 * upgradeProperti[i][j][k]; if (foodKota[i] <= 0 && sekaliIlang == false) { if (punyaWilayah[i] == jenisKerajaan) { sekaliIlang = true; workerKota[i] -= 50 * upgradeProperti[i][j][k]; moneyKota[i] += 100 * upgradeProperti[i][j][k]; jenisBangunan[i][j][k] = 1; upgradeProperti[i][j][k] = 1; peta['area' + k].gotoAndStop(1); map['map' + j].xpeta_mc['area' + k].gotoAndStop(1); cekInfo(2000, 'One residence house in ' + namaKota[i] + ' has been abandoned by residents because insufficient food. (TIPS: You can import foods by click ACTIONS BUTTON, and then click IMPORT BUTTON. Build more food buildings quickly)', 2, i); cekAnim(); i = bykKota; j = bykArea; k = bykProperti; } } } } } } } } } } } } } } } } } } } } ++k; } ++j; } ++i; } xadaIlang = false; i = 1; while (i <= bykKota) { if (tingkatSulit == 3 || tingkatSulit == 4) { moneyKota[i] -= soldierKota[i] * 2; moneyKota[i] -= horseKota[i] * 3; moneyKota[i] -= catapultKota[i] * 7; moneyKota[i] -= witchKota[i] * 5; moneyKota[i] -= elephantKota[i] * 4; moneyKota[i] -= xsuperKota[i] * 10; } if (moneyKota[i] < 0) { xadaIlang = true; } else { if (workerKota[i] < 0) { xadaIlang = true; } } ++i; } if (xadaIlang == true) { adaKurangSoldier = false; i = 1; while (i <= bykKota) { if (moneyKota[i] < 0 && soldierKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (soldierKota[i] <= kurangSoldier) { kurangSoldier = soldierKota[i]; } soldierKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your troops in ' + namaKota[i] + ' have left barracks because there is no money to pay your workers wages. (TIPS: You can export goods to make enough money by click ACTIONS BUTTON, and then click EXPORT BUTTON or build more gold mine or market buildings)', 2, i); } } else { if (workerKota[i] < 0 && soldierKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (soldierKota[i] <= kurangSoldier) { kurangSoldier = soldierKota[i]; } soldierKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your troops in ' + namaKota[i] + ' have left barracks because there is not enough residence house. (TIPS: Build houses as many as possible for soldiers places)', 2, i); } } } if (moneyKota[i] < 0 && horseKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (horseKota[i] <= kurangSoldier) { kurangSoldier = horseKota[i]; } horseKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your knights in ' + namaKota[i] + ' have left barracks because there is no money to pay your workers wages. (TIPS: You can export goods to make enough money by click ACTIONS BUTTON, and then click EXPORT BUTTON or build more gold mine or market buildings)', 2, i); } } else { if (workerKota[i] < 0 && horseKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (horseKota[i] <= kurangSoldier) { kurangSoldier = horseKota[i]; } horseKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your knights in ' + namaKota[i] + ' have left barracks because there is not enough residence house. (TIPS: Build houses as many as possible for horses places)', 2, i); } } } if (moneyKota[i] < 0 && catapultKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (catapultKota[i] <= kurangSoldier) { kurangSoldier = catapultKota[i]; } catapultKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your catapult troops in ' + namaKota[i] + ' have left barracks because there is no money to pay your workers wages. (TIPS: You can export goods to make enough money by click ACTIONS BUTTON, and then click EXPORT BUTTON or build more gold mine or market buildings)', 2, i); } } else { if (workerKota[i] < 0 && catapultKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (catapultKota[i] <= kurangSoldier) { kurangSoldier = catapultKota[i]; } catapultKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your catapult troops in ' + namaKota[i] + ' have left barracks because there is not enough residence house. (TIPS: Build houses as many as possible for catapults places)', 2, i); } } } if (moneyKota[i] < 0 && witchKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (witchKota[i] <= kurangSoldier) { kurangSoldier = witchKota[i]; } witchKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your witches in ' + namaKota[i] + ' have left barracks because there is no money to pay your workers wages. (TIPS: You can export goods to make enough money by click ACTIONS BUTTON, and then click EXPORT BUTTON or build more gold mine or market buildings)', 2, i); } } else { if (workerKota[i] < 0 && witchKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (witchKota[i] <= kurangSoldier) { kurangSoldier = witchKota[i]; } witchKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your witches in ' + namaKota[i] + ' have left barracks because there is not enough residence house. (TIPS: Build houses as many as possible for witches places)', 2, i); } } } if (moneyKota[i] < 0 && elephantKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (elephantKota[i] <= kurangSoldier) { kurangSoldier = elephantKota[i]; } elephantKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your elephant troops in ' + namaKota[i] + ' have left barracks because there is no money to pay your workers wages. (TIPS: You can export goods to make enough money by click ACTIONS BUTTON, and then click EXPORT BUTTON or build more gold mine or market buildings)', 2, i); } } else { if (workerKota[i] < 0 && elephantKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (elephantKota[i] <= kurangSoldier) { kurangSoldier = elephantKota[i]; } elephantKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your elephant troops in ' + namaKota[i] + ' have left barracks because there is not enough residence house. (TIPS: Build houses as many as possible for elephants places)', 2, i); } } } if (moneyKota[i] < 0 && xsuperKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (xsuperKota[i] <= kurangSoldier) { kurangSoldier = xsuperKota[i]; } xsuperKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your super soldiers in ' + namaKota[i] + ' have left barracks because there is no money to pay your workers wages. (TIPS: You can export goods to make enough money by click ACTIONS BUTTON, and then click EXPORT BUTTON or build more gold mine or market buildings)', 2, i); } } else { if (workerKota[i] < 0 && xsuperKota[i] > 0) { if (punyaWilayah[i] == jenisKerajaan) { adaKurangSoldier = true; kurangSoldier = 5; if (xsuperKota[i] <= kurangSoldier) { kurangSoldier = xsuperKota[i]; } xsuperKota[i] -= kurangSoldier; workerKota[i] += kurangSoldier; cekInfo(2000, 'Your super soldiers in ' + namaKota[i] + ' have left barracks because there is not enough residence house. (TIPS: Build houses as many as possible for super soldiers places)', 2, i); } } } ++i; } a = bykBangunan; while (a >= 2) { i = 1; while (i <= bykKota) { j = 1; while (j <= bykArea) { k = 1; while (k <= bykProperti) { if (workerKota[i] < 0 && soldierKota[i] <= 0) { adaIlang = false; yangHilang = ''; if (jenisBangunan[i][j][k] == a) { if (a == 9) { yangHilang = 'barracks'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 25) { yangHilang = 'super soldier battacks'; workerKota[i] += 30 * upgradeProperti[i][j][k]; } else { if (a == 23) { yangHilang = 'fire arrow blacksmith'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 12) { yangHilang = 'spear blacksmith'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 8) { yangHilang = 'arrow blacksmith'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 7) { yangHilang = 'sword blacksmith'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 20) { yangHilang = 'catapult factory'; workerKota[i] += 25 * upgradeProperti[i][j][k]; } else { if (a == 21) { yangHilang = 'witch house'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 14) { yangHilang = 'horse stable'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 17) { yangHilang = 'elephant stable'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 22) { yangHilang = 'steel mine'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 24) { yangHilang = 'jewel shop'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 13) { yangHilang = 'pearl pond'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 19) { yangHilang = 'oil refinery'; workerKota[i] += 15 * upgradeProperti[i][j][k]; } else { if (a == 18) { yangHilang = 'coal mine'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 11) { yangHilang = 'gold mine'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 6) { yangHilang = 'iron mine'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 5) { yangHilang = 'carpenter house'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 15) { yangHilang = 'cow farm'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 16) { yangHilang = 'shrimp pond'; workerKota[i] += 15 * upgradeProperti[i][j][k]; } else { if (a == 4) { yangHilang = 'market'; workerKota[i] += 20 * upgradeProperti[i][j][k]; } else { if (a == 3) { yangHilang = 'farm'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 10) { yangHilang = 'fish pond'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } } } } } } } } } } } } } } } } } } } } } } } adaIlang = true; } if (adaIlang == true) { if (punyaWilayah[i] == jenisKerajaan) { upgradeProperti[i][j][k] = 1; jenisBangunan[i][j][k] = 1; peta['area' + k].gotoAndStop(1); map['map' + j].xpeta_mc['area' + k].gotoAndStop(1); cekInfo(2000, 'One ' + yangHilang + ' in ' + namaKota[i] + ' was abandoned by residents because there is not enough residence house. (TIPS: Don\'t let your houses abandoned, always check your remain worker)', 2, i); cekAnim(); i = bykKota; j = bykArea; k = bykProperti; a = 2; } } } else { if (moneyKota[i] < 0 && adaKurangSoldier == false) { adaIlang = false; yangHilang = ''; if (jenisBangunan[i][j][k] == a) { if (a == 9) { yangHilang = 'barracks'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 25) { yangHilang = 'super soldier battacks'; workerKota[i] += 30 * upgradeProperti[i][j][k]; } else { if (a == 23) { yangHilang = 'fire arrow blacksmith'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 12) { yangHilang = 'spear blacksmith'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 8) { yangHilang = 'arrow blacksmith'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 7) { yangHilang = 'sword blacksmith'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 20) { yangHilang = 'catapult factory'; workerKota[i] += 25 * upgradeProperti[i][j][k]; } else { if (a == 21) { yangHilang = 'witch house'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 14) { yangHilang = 'horse stable'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 17) { yangHilang = 'elephant stable'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 22) { yangHilang = 'steel mine'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 24) { yangHilang = 'jewel shop'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 13) { yangHilang = 'pearl pond'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 19) { yangHilang = 'oil refinery'; workerKota[i] += 15 * upgradeProperti[i][j][k]; } else { if (a == 18) { yangHilang = 'coal mine'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 11) { yangHilang = 'gold mine'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 6) { yangHilang = 'iron mine'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 5) { yangHilang = 'carpenter house'; workerKota[i] += 5 * upgradeProperti[i][j][k]; } else { if (a == 15) { yangHilang = 'cow farm'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 16) { yangHilang = 'shrimp pond'; workerKota[i] += 15 * upgradeProperti[i][j][k]; } else { if (a == 4) { yangHilang = 'market'; workerKota[i] += 20 * upgradeProperti[i][j][k]; } else { if (a == 3) { yangHilang = 'farm'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } else { if (a == 10) { yangHilang = 'fish pond'; workerKota[i] += 10 * upgradeProperti[i][j][k]; } } } } } } } } } } } } } } } } } } } } } } } adaIlang = true; } if (adaIlang == true) { if (punyaWilayah[i] == jenisKerajaan) { upgradeProperti[i][j][k] = 1; jenisBangunan[i][j][k] = 1; peta['area' + k].gotoAndStop(1); map['map' + j].xpeta_mc['area' + k].gotoAndStop(1); cekInfo(2000, 'One ' + yangHilang + ' in ' + namaKota[i] + ' has been sold because there is no money to pay your workers wages. (TIPS: You can export goods to make money by clicking ACTIONS BUTTON, and then click EXPORT BUTTON or build more market buildings or gold mine)', 2, i); cekAnim(); i = bykKota; j = bykArea; k = bykProperti; a = 2; } } } } ++k; } ++j; } ++i; } --a; } } akhirSemua(); if (day == lawanNyerang) { if (lawanNyerang2 == lawanNyerang) { lawanNyerang2 += random(25) + 25; } if (tingkatSulit == 1) { lawanNyerang += random(80) + 80; } else { if (tingkatSulit == 2) { lawanNyerang += random(70) + 70; } else { if (tingkatSulit == 3) { lawanNyerang += random(60) + 60; } else { if (tingkatSulit == 4) { lawanNyerang += random(50) + 50; } } } } if (lawanNyerang2 == lawanNyerang) { lawanNyerang2 += random(25) + 25; } xrand1 = random(2) + 1; xrand2 = random(2) + 1; xrand3 = random(2) + 1; xrand4 = random(2) + 1; xadaSerang = new Array(); xkeSerang = 0; i = 1; while (i <= bykKota) { if (punyaWilayah[i] == 0) { j = 1; while (j <= linkWilayah[i].length - 1) { if (punyaWilayah[linkWilayah[i][j]] != 0) { xadaSerang[xkeSerang] = i; ++xkeSerang; } ++j; } } ++i; } if (xkeSerang > 0) { xrand = random(xadaSerang.length - 1); i = xadaSerang[xrand]; yangMenyerang = i; adaSerang = new Array(); keSerang = 0; j = 1; while (j <= linkWilayah[i].length - 1) { if (punyaWilayah[linkWilayah[i][j]] != 0) { adaSerang[keSerang] = linkWilayah[i][j]; ++keSerang; } ++j; } if (keSerang > 0) { rand = random(adaSerang.length - 1); yangDiserang = adaSerang[rand]; if (punyaWilayah[yangDiserang] == jenisKerajaan) { cekInfo(2000, 'Barbarian soldiers have attacked your city, ' + namaKota[yangDiserang] + ' from ' + namaKota[yangMenyerang]); xrand1 = random(2) + 1; xrand2 = random(2) + 1; xrand3 = random(2) + 1; xrand4 = random(2) + 1; tipeMenyerang = 0; jenisMenyerang = 1; if (tingkatSulit == 3) { randBribe = random(100); } else { if (tingkatSulit == 4) { randBribe = random(150); } else { randBribe = -9; } } cekDiserang('Barbarian'); } else { if (tingkatSulit == 1) { wrand = random(110); } else { if (tingkatSulit == 2) { wrand = random(100); } else { if (tingkatSulit == 3) { wrand = random(90); } else { if (tingkatSulit == 4) { wrand = random(80); } } } } if (wrand >= 70) { cekInfo(2000, 'Barbarian soldiers have attacked ' + namaKota[yangDiserang] + ' from ' + namaKota[yangMenyerang] + ' and success to occupied ' + namaKota[yangDiserang] + ' city'); punyaWilayah[yangDiserang] = 0; } else { cekInfo(2000, 'Barbarian soldiers have attacked' + namaKota[yangDiserang] + ' from ' + namaKota[yangMenyerang] + ' but unsuccess to occupied ' + namaKota[yangDiserang] + ' city'); } } } } } else { if (day == lawanNyerang2) { if (lawanNyerang2 == lawanNyerang) { lawanNyerang += random(25) + 25; } if (tingkatSulit == 1) { lawanNyerang2 += random(70) + 70; } else { if (tingkatSulit == 2) { lawanNyerang2 += random(60) + 60; } else { if (tingkatSulit == 3) { lawanNyerang2 += random(50) + 50; } else { if (tingkatSulit == 4) { lawanNyerang2 += random(40) + 40; } } } } if (lawanNyerang2 == lawanNyerang) { lawanNyerang += random(25) + 25; } xrand1 = random(2) + 1; xrand2 = random(2) + 1; xrand3 = random(2) + 1; xrand4 = random(2) + 1; xadaSerang = new Array(); xkeSerang = 0; i = 1; while (i <= bykKota) { if (punyaWilayah[i] == jenisMusuh) { j = 1; while (j <= linkWilayah[i].length - 1) { if (punyaWilayah[linkWilayah[i][j]] != jenisMusuh) { xadaSerang[xkeSerang] = i; ++xkeSerang; } ++j; } } ++i; } if (xkeSerang > 0) { xrand = random(xadaSerang.length); i = xadaSerang[xrand]; yangMenyerang = i; adaSerang = new Array(); keSerang = 0; j = 1; while (j <= linkWilayah[i].length - 1) { if (punyaWilayah[linkWilayah[i][j]] != jenisMusuh) { adaSerang[keSerang] = linkWilayah[i][j]; ++keSerang; } ++j; } if (keSerang > 0) { rand = random(adaSerang.length); yangDiserang = adaSerang[rand]; if (punyaWilayah[yangDiserang] == jenisKerajaan) { cekInfo(2000, namaEmpire[jenisMusuh] + ' soldiers have attacked your city, ' + namaKota[yangDiserang] + ' from ' + namaKota[yangMenyerang]); xrand1 = random(2) + 1; xrand2 = random(2) + 1; xrand3 = random(2) + 1; xrand4 = random(2) + 1; tipeMenyerang = jenisMusuh; jenisMenyerang = 2; if (tingkatSulit == 3) { randBribe = random(100); } else { if (tingkatSulit == 4) { randBribe = random(150); } else { randBribe = -9; } } cekDiserang(namaEmpire[jenisMusuh]); } else { if (tingkatSulit == 1) { wrand = random(90); } else { if (tingkatSulit == 2) { wrand = random(100); } else { if (tingkatSulit == 3) { wrand = random(110); } else { if (tingkatSulit == 4) { wrand = random(120); } } } } if (wrand >= 20) { cekInfo(2000, namaEmpire[jenisMusuh] + ' soldiers have attacked ' + namaKota[yangDiserang] + ' from ' + namaKota[yangMenyerang] + ' and success to occupied ' + namaKota[yangDiserang] + ' city'); punyaWilayah[yangDiserang] = jenisMusuh; if (jenisMusuh == 1) { posSatu = yangDiserang; } else { if (jenisMusuh == 2) { posDua = yangDiserang; } } } else { cekInfo(2000, namaEmpire[jenisMusuh] + ' soldiers have attacked ' + namaKota[yangDiserang] + ' from ' + namaKota[yangMenyerang] + ' but unsuccess to occupied ' + namaKota[yangDiserang] + ' city'); } } } } } } } } function cekJmlMusuh() { zjmlMusuh = 0; zcity = 0; wcity = 0; i = 1; while (i <= bykKota) { if (punyaWilayah[i] == jenisKerajaan) { ++zcity; } else { if (punyaWilayah[i] == jenisMusuh) { ++wcity; } } ++i; } zcity2 = 0; if (zcity >= 6) { zcity2 = 13 - zcity; } else { zcity2 = zcity; } actions.city = zcity; if (tingkatSulit == 1) { zjmlMusuh = Math.floor(75 * (zcity2 * persenMusuh)) + Math.floor((day / 100) * 25); } else { if (tingkatSulit == 2) { zjmlMusuh = Math.floor(150 * (zcity2 * persenMusuh)) + Math.floor((day / 100) * 25); } else { if (tingkatSulit == 3) { zjmlMusuh = Math.floor(250 * (zcity2 * persenMusuh)) + Math.floor((day / 100) * 25); } else { if (tingkatSulit == 4) { zjmlMusuh = Math.floor(300 * (zcity2 * persenMusuh)) + Math.floor((day / 100) * 25); } } } } if (tingkatSulit == 3) { zjmlMusuh += wcity * 25; } else { if (tingkatSulit == 4) { zjmlMusuh += wcity * 25; } } if (jenisMenyerang == 1) { zjmlMusuh = Math.floor(zjmlMusuh / 10); } else { if (jenisMenyerang == 2) { zjmlMusuh = Math.floor(zjmlMusuh / 7.5); } } } function cekDiserang(aindi) { aindi = aindi; pilihKota = yangDiserang; xkotaDiserang = pilihKota; xpilihKota = yangDiserang; clearSemua(); initSemua(); xi = pilihKota; map.list_mc.gotoAndStop(1); map.list_mc.money = '$' + moneyKota[xi]; map.list_mc.food = foodKota[xi]; map.list_mc.iron = ironKota[xi]; map.list_mc.wood = woodKota[xi]; map.list_mc.sword = swordKota[xi]; map.list_mc.xarrow = xarrowKota[xi]; map.list_mc.soldier = soldierKota[xi]; map.list_mc.worker = workerKota[xi]; map.day = 'DAY \n' + day; bisaTombol2(false); bisaTombol(false); xpause = true; actions = attachMovie('actions_mc', 'actions_mc', dalamActions); actions.gotoAndStop(8); actions._x = 340; actions._y = 240; actions.isi = 'Your city, ' + namaKota[yangDiserang] + ' is under attacking by ' + aindi + ', what action will you choose? DEFENSE: War against enemy. BRIBE: Give enemy some goods. RETREAT: Retreat to another own city. SURENDER: Abandond city without resistance.'; tipeWar = 'bertahan'; actions.defense_btn.onRelease = function () { bisaWar = false; if (soldierKota[xkotaDiserang] > 0 || horseKota[xkotaDiserang] > 0 || elephantKota[xkotaDiserang] > 0 || catapultKota[xkotaDiserang] > 0 || xsuperKota[xkotaDiserang] > 0 || witchKota[xkotaDiserang] > 0) { if (swordKota[pilihKota] > 0 || xarrowKota[pilihKota] > 0 || spearKota[pilihKota] > 0 || fireKota[pilihKota] > 0 || coalKota[pilihKota] > 0 || iceballKota[pilihKota] > 0 || fireballKota[pilihKota] > 0 || poisonKota[pilihKota] > 0 || hurricaneKota[pilihKota] > 0 || earthquakeKota[pilihKota] > 0) { bisaWar = true; klikWar('sudah'); } } if (bisaWar == false) { if (xsuperKota[xkotaDiserang] > 0) { bisaWar = true; klikWar('sudah'); } } if (bisaWar == false) { actions.isi = 'There are no soldiers or weapons in your city, choose another actions: BRIBE: Give enemy some goods. RETREAT: Retreat to another own city. SURENDER: Abandond city without resistance.'; } }; actions.bribe_btn.onRelease = function () { if (randBribe <= 75) { actions.gotoAndStop(9); actions.winfo = ''; daftarNama = new Array('', 'Money', 'Foods', 'Irons', 'Logs'); adaPenuh = true; i = 1; while (i <= 4) { actions['nama' + i] = daftarNama[i]; if (daftarNama[i] == 'Money') { actions['owned' + i] = _root.moneyKota[_root.pilihKota]; actions['bribe' + i] = Math.floor(_root.moneyKota[_root.pilihKota] / xrand1); if (actions['bribe' + i] <= 0) { actions['bribe' + i] = random(1000) + 1000; } if (actions['owned' + i] <= 0) { adaPenuh = false; } } else { if (daftarNama[i] == 'Foods') { actions['owned' + i] = _root.foodKota[_root.pilihKota]; actions['bribe' + i] = Math.floor(_root.foodKota[_root.pilihKota] / xrand2); if (actions['bribe' + i] <= 0) { actions['bribe' + i] = random(500) + 500; } if (actions['owned' + i] <= 0) { adaPenuh = false; } } else { if (daftarNama[i] == 'Irons') { actions['owned' + i] = _root.ironKota[_root.pilihKota]; actions['bribe' + i] = Math.floor(_root.ironKota[_root.pilihKota] / xrand3); if (actions['bribe' + i] <= 0) { actions['bribe' + i] = random(50) + 50; } if (actions['owned' + i] <= 0) { adaPenuh = false; } } else { if (daftarNama[i] == 'Logs') { actions['owned' + i] = _root.woodKota[_root.pilihKota]; actions['bribe' + i] = Math.floor(_root.woodKota[_root.pilihKota] / xrand4); if (actions['bribe' + i] <= 0) { actions['bribe' + i] = random(75) + 75; } if (actions['owned' + i] <= 0) { adaPenuh = false; } } } } } ++i; } } else { actions.isi = 'Your enemies haven\'t accepted your gift, they want to attack your city'; } actions.xbribe_btn.onRelease = function () { if (adaPenuh == true) { i = 1; while (i <= 4) { if (i == 1) { _root.moneyKota[_root.pilihKota] -= actions['bribe' + i]; } else { if (i == 2) { _root.foodKota[_root.pilihKota] -= actions['bribe' + i]; } else { if (i == 3) { _root.ironKota[_root.pilihKota] -= actions['bribe' + i]; } else { if (i == 4) { _root.woodKota[_root.pilihKota] -= actions['bribe' + i]; } } } } ++i; } actions.gotoAndStop(10); actions.isi = 'Your enemies have accepted your gift, they cancell to attack your city'; actions.ok_btn.onRelease = function () { bisaTombol2(true); removeMovieClip(dunia); bisaTombol(true); removeMovieClip(actions); xpause = false; }; } else { backSalah(); actions.winfo = 'Can\'t bribe, you don\'t have goods or money'; } }; actions.back_btn.onRelease = function () { cekDiserang(aindi); }; }; actions.retreat_btn.onRelease = function () { klikMove('diserang'); }; actions.surender_btn.onRelease = function () { sudahKalah = false; removeMovieClip(actions); resetWilayah(xkotaDiserang, tipeMenyerang); masihPunya = false; i = 1; while (i <= 12) { if (punyaWilayah[i] == jenisKerajaan) { kotaSekarang = i; i = 13; masihPunya = true; } ++i; } if (masihPunya == true) { xpilihKota = kotaSekarang; cekPilihKota(xpilihKota); } else { cekGameOver(); } if (sudahKalah == false) { initSemua(); } }; } function akhirSemua() { i = 1; while (i <= 8) { naikTurun[i] = '-'; ++i; } if (map.list_mc._currentframe == 1) { if (moneyKota[pilihKota] > zawalMoney) { map.list_mc.arrow1.gotoAndStop(1); naikTurun[1] = 'Increased ' + String(moneyKota[pilihKota] - zawalMoney); } else { if (moneyKota[pilihKota] < zawalMoney) { map.list_mc.arrow1.gotoAndStop(2); naikTurun[1] = 'Decreased ' + String(zawalMoney - moneyKota[pilihKota]); } else { map.list_mc.arrow1.gotoAndStop(3); } } if (foodKota[pilihKota] > zawalFood) { map.list_mc.arrow2.gotoAndStop(1); naikTurun[2] = 'Increased ' + String(foodKota[pilihKota] - zawalFood); } else { if (foodKota[pilihKota] < zawalFood) { map.list_mc.arrow2.gotoAndStop(2); naikTurun[2] = 'Decreased ' + String(zawalFood - foodKota[pilihKota]); } else { map.list_mc.arrow2.gotoAndStop(3); } } if (ironKota[pilihKota] > zawalIron) { map.list_mc.arrow3.gotoAndStop(1); naikTurun[3] = 'Increased ' + String(ironKota[pilihKota] - zawalIron); } else { if (ironKota[pilihKota] < zawalIron) { map.list_mc.arrow3.gotoAndStop(2); naikTurun[3] = 'Decreased ' + String(zawalIron - ironKota[pilihKota]); } else { map.list_mc.arrow3.gotoAndStop(3); } } if (woodKota[pilihKota] > zawalWood) { map.list_mc.arrow4.gotoAndStop(1); naikTurun[4] = 'Increased ' + String(woodKota[pilihKota] - zawalWood); } else { if (woodKota[pilihKota] < zawalWood) { map.list_mc.arrow4.gotoAndStop(2); naikTurun[4] = 'Decreased ' + String(zawalWood - woodKota[pilihKota]); } else { map.list_mc.arrow4.gotoAndStop(3); } } if (swordKota[pilihKota] > zawalSword) { map.list_mc.arrow5.gotoAndStop(1); naikTurun[5] = 'Increased ' + String(swordKota[pilihKota] - zawalSword); } else { if (swordKota[pilihKota] < zawalSword) { map.list_mc.arrow5.gotoAndStop(2); naikTurun[5] = 'Decreased ' + String(zawalSword - swordKota[pilihKota]); } else { map.list_mc.arrow5.gotoAndStop(3); } } if (xarrowKota[pilihKota] > zawalArrow) { map.list_mc.arrow6.gotoAndStop(1); naikTurun[6] = 'Increased ' + String(xarrowKota[pilihKota] - zawalArrow); } else { if (xarrowKota[pilihKota] < zawalArrow) { map.list_mc.arrow6.gotoAndStop(2); naikTurun[6] = 'Decreased ' + String(zawalArrow - xarrowKota[pilihKota]); } else { map.list_mc.arrow6.gotoAndStop(3); } } if (soldierKota[pilihKota] > zawalSoldier) { map.list_mc.arrow7.gotoAndStop(1); naikTurun[7] = 'Increased ' + String(soldierKota[pilihKota] - zawalSoldier); } else { if (soldierKota[pilihKota] < zawalSoldier) { map.list_mc.arrow7.gotoAndStop(2); naikTurun[7] = 'Decreased ' + String(zawalSoldier - soldierKota[pilihKota]); } else { map.list_mc.arrow7.gotoAndStop(3); } } if (workerKota[pilihKota] > zawalWorker) { map.list_mc.arrow8.gotoAndStop(1); naikTurun[8] = 'Increased ' + String(workerKota[pilihKota] - zawalWorker); } else { if (workerKota[pilihKota] < zawalWorker) { map.list_mc.arrow8.gotoAndStop(2); naikTurun[8] = 'Decreased ' + String(zawalWorker - workerKota[pilihKota]); } else { map.list_mc.arrow8.gotoAndStop(3); } } } else { if (map.list_mc._currentframe == 2) { if (diamondKota[pilihKota] > zawalDiamond) { map.list_mc.arrow1.gotoAndStop(1); naikTurun[1] = 'Increased ' + String(diamondKota[pilihKota] - zawalDiamond); } else { if (diamondKota[pilihKota] < zawalDiamond) { map.list_mc.arrow1.gotoAndStop(2); naikTurun[1] = 'Decreased ' + String(zawalDiamond - diamondKota[pilihKota]); } else { map.list_mc.arrow1.gotoAndStop(3); } } if (coalKota[pilihKota] > zawalCoal) { map.list_mc.arrow2.gotoAndStop(1); naikTurun[2] = 'Increased ' + String(coalKota[pilihKota] - zawalCoal); } else { if (coalKota[pilihKota] < zawalCoal) { map.list_mc.arrow2.gotoAndStop(2); naikTurun[2] = 'Decreased ' + String(zawalCoal - coalKota[pilihKota]); } else { map.list_mc.arrow2.gotoAndStop(3); } } if (oilKota[pilihKota] > zawalOil) { map.list_mc.arrow3.gotoAndStop(1); naikTurun[3] = 'Increased ' + String(oilKota[pilihKota] - zawalOil); } else { if (oilKota[pilihKota] < zawalOil) { map.list_mc.arrow3.gotoAndStop(2); naikTurun[3] = 'Decreased ' + String(zawalOil - oilKota[pilihKota]); } else { map.list_mc.arrow3.gotoAndStop(3); } } if (horseKota[pilihKota] > zawalHorse) { map.list_mc.arrow4.gotoAndStop(1); naikTurun[4] = 'Increased ' + String(horseKota[pilihKota] - zawalHorse); } else { if (horseKota[pilihKota] < zawalHorse) { map.list_mc.arrow4.gotoAndStop(2); naikTurun[4] = 'Decreased ' + String(zawalHorse - horseKota[pilihKota]); } else { map.list_mc.arrow4.gotoAndStop(3); } } if (spearKota[pilihKota] > zawalSpear) { map.list_mc.arrow5.gotoAndStop(1); naikTurun[5] = 'Increased ' + String(spearKota[pilihKota] - zawalSpear); } else { if (spearKota[pilihKota] < zawalSpear) { map.list_mc.arrow5.gotoAndStop(2); naikTurun[5] = 'Decreased ' + String(zawalSpear - spearKota[pilihKota]); } else { map.list_mc.arrow5.gotoAndStop(3); } } if (catapultKota[pilihKota] > zawalCatapult) { map.list_mc.arrow6.gotoAndStop(1); naikTurun[6] = 'Increased ' + String(catapultKota[pilihKota] - zawalCatapult); } else { if (catapultKota[pilihKota] < zawalCatapult) { map.list_mc.arrow6.gotoAndStop(2); naikTurun[6] = 'Decreased ' + String(zawalCatapult - catapultKota[pilihKota]); } else { map.list_mc.arrow6.gotoAndStop(3); } } if (witchKota[pilihKota] > zawalWitch) { map.list_mc.arrow7.gotoAndStop(1); naikTurun[7] = 'Increased ' + String(witchKota[pilihKota] - zawalWitch); } else { if (witchKota[pilihKota] < zawalWitch) { map.list_mc.arrow7.gotoAndStop(2); naikTurun[7] = 'Decreased ' + String(zawalWitch - witchKota[pilihKota]); } else { map.list_mc.arrow7.gotoAndStop(3); } } if (elephantKota[pilihKota] > zawalElephant) { map.list_mc.arrow8.gotoAndStop(1); naikTurun[8] = 'Increased ' + String(elephantKota[pilihKota] - zawalElephant); } else { if (elephantKota[pilihKota] < zawalElephant) { map.list_mc.arrow8.gotoAndStop(2); naikTurun[8] = 'Decreased ' + String(zawalElephant - elephantKota[pilihKota]); } else { map.list_mc.arrow8.gotoAndStop(3); } } } else { if (map.list_mc._currentframe == 3) { if (fireKota[pilihKota] > zawalFire) { map.list_mc.arrow1.gotoAndStop(1); naikTurun[1] = 'Increased ' + String(fireKota[pilihKota] - zawalFire); } else { if (fireKota[pilihKota] < zawalFire) { map.list_mc.arrow1.gotoAndStop(2); naikTurun[1] = 'Decreased ' + String(zawalFire - fireKota[pilihKota]); } else { map.list_mc.arrow1.gotoAndStop(3); } } if (steelKota[pilihKota] > zawalSteel) { map.list_mc.arrow2.gotoAndStop(1); naikTurun[2] = 'Increased ' + String(steelKota[pilihKota] - zawalSteel); } else { if (steelKota[pilihKota] < zawalSteel) { map.list_mc.arrow2.gotoAndStop(2); naikTurun[2] = 'Decreased ' + String(zawalSteel - steelKota[pilihKota]); } else { map.list_mc.arrow2.gotoAndStop(3); } } if (xsuperKota[pilihKota] > zawalSuper) { map.list_mc.arrow3.gotoAndStop(1); naikTurun[3] = 'Increased ' + String(xsuperKota[pilihKota] - zawalSuper); } else { if (xsuperKota[pilihKota] < zawalSuper) { map.list_mc.arrow3.gotoAndStop(2); naikTurun[3] = 'Decreased ' + String(zawalSuper - xsuperKota[pilihKota]); } else { map.list_mc.arrow3.gotoAndStop(3); } } if (iceballKota[pilihKota] > zawalIceball) { map.list_mc.arrow4.gotoAndStop(1); naikTurun[4] = 'Increased ' + String(iceballKota[pilihKota] - zawalIceball); } else { if (iceballKota[pilihKota] < zawalIceball) { map.list_mc.arrow4.gotoAndStop(2); naikTurun[4] = 'Decreased ' + String(zawalIceball - iceballKota[pilihKota]); } else { map.list_mc.arrow4.gotoAndStop(3); } } if (fireballKota[pilihKota] > zawalFireball) { map.list_mc.arrow5.gotoAndStop(1); naikTurun[5] = 'Increased ' + String(fireballKota[pilihKota] - zawalFireball); } else { if (fireballKota[pilihKota] < zawalFireball) { map.list_mc.arrow5.gotoAndStop(2); naikTurun[5] = 'Decreased ' + String(zawalFireball - fireballKota[pilihKota]); } else { map.list_mc.arrow5.gotoAndStop(3); } } if (poisonKota[pilihKota] > zawalPoison) { map.list_mc.arrow6.gotoAndStop(1); naikTurun[6] = 'Increased ' + String(poisonKota[pilihKota] - zawalPoison); } else { if (poisonKota[pilihKota] < zawalPoison) { map.list_mc.arrow6.gotoAndStop(2); naikTurun[6] = 'Decreased ' + String(zawalPoison - poisonKota[pilihKota]); } else { map.list_mc.arrow6.gotoAndStop(3); } } if (hurricaneKota[pilihKota] > zawalHurricane) { map.list_mc.arrow7.gotoAndStop(1); naikTurun[7] = 'Increased ' + String(hurricaneKota[pilihKota] - zawalHurricane); } else { if (hurricaneKota[pilihKota] < zawalHurricane) { map.list_mc.arrow7.gotoAndStop(2); naikTurun[7] = 'Decreased ' + String(zawalHurricane - hurricaneKota[pilihKota]); } else { map.list_mc.arrow7.gotoAndStop(3); } } if (earthquakeKota[pilihKota] > zawalEarthquake) { map.list_mc.arrow8.gotoAndStop(1); naikTurun[8] = 'Increased ' + String(earthquakeKota[pilihKota] - zawalEarthquake); } else { if (earthquakeKota[pilihKota] < zawalEarthquake) { map.list_mc.arrow8.gotoAndStop(2); naikTurun[8] = 'Decreased ' + String(zawalEarthquake - earthquakeKota[pilihKota]); } else { map.list_mc.arrow8.gotoAndStop(3); } } } } } } function cekPilihKota(indi) { if (indi == 1) { xpilihMap = 1; } else { if (indi == 2) { xpilihMap = 1; } else { if (indi == 3) { xpilihMap = 1; } else { if (indi == 4) { xpilihMap = 1; } else { if (indi == 5) { xpilihMap = 2; } else { if (indi == 6) { xpilihMap = 3; } else { if (indi == 7) { xpilihMap = 1; } else { if (indi == 8) { xpilihMap = 1; } else { if (indi == 9) { xpilihMap = 2; } else { if (indi == 10) { xpilihMap = 1; } else { if (indi == 11) { xpilihMap = 4; } else { if (indi == 12) { xpilihMap = 4; } } } } } } } } } } } } } function initMap() { panjang = 20; lebar = 20; dalam1 = 9; scalaKotak = 100; bKotak = 40; posAwalX = 250; posAwalY = -200; dalamPeta = 1000; dalamMap = 1100; dalamDrag = 10000; dalamMsgBox = 10015; dalamSemua = 10002; dalamInfo = 1050; dalamInfo2 = 10004; dalamActions = 5000; dalamDunia = 10003; dalamActions2 = 10006; dalamOptions = 10010; dalamTutor = 10099; pilihKota = xpilihKota; cekPilihKota(xpilihKota); pilihMap = xpilihMap; pilihBangun = 1; overMana = 1; zjmlMusuh = 0; persenMusuh = 0.3; randomFood = 3 + random(3); randomIron = 3 * (3 + random(3)); randomLog = 2 * (3 + random(3)); randomPearl = 7 * (3 + random(3)); randomCoal = 6 * (3 + random(3)); randomOil = 5 * (3 + random(3)); randomSteel = 8 * (3 + random(3)); sedangDrag = false; xpause = false; perangMenang = false; naikTurun = new Array(); i = 1; while (i <= 8) { naikTurun[i] = '-'; ++i; } i = 1; while (i <= 4) { _root['bawaBarang' + i] = 0; ++i; } } function buatKotak() { i = 0; while (i <= panjang) { j = 0; while (j <= lebar) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; rumput = attachMovie('rumput_mc', namaBaru, dalam1); posX = i * bKotak; posY = j * bKotak; rumput._x = posAwalX + (posX - posY); rumput._y = posAwalY + (posX + posY) / 2; rumput._xscale = scalaKotak; rumput._yscale = scalaKotak; ++dalam1; ++j; } ++i; } } function buatPeta() { stopDrag(); removeMovieClip(object); sedangDrag = false; peta = attachMovie('area' + String(pilihKota) + String(pilihMap), 'xpeta_mc', dalamPeta); i = 1; while (i <= bykKota) { j = 1; while (j <= bykArea) { k = 1; while (k <= bykProperti) { if (peta['sungai' + k] != undefined) { peta['sungai' + k]._visible = false; bisaSungai[i][j][k] = 1; } else { bisaSungai[i][j][k] = 0; } if (peta['hutan' + k] != undefined) { peta['hutan' + k]._visible = false; bisaHutan[i][j][k] = 1; } else { bisaHutan[i][j][k] = 0; } if (peta['gunung' + k] != undefined) { peta['gunung' + k]._visible = false; bisaGunung[i][j][k] = 1; } else { bisaGunung[i][j][k] = 0; } ++k; } ++j; } ++i; } peta._x = 0; peta._y = 0; cekArea(peta, bykArea); cekAnim(); } function cekAnim(indi) { if (pilihKota == 9 && pilihMap == 2) { i = 1; while (i <= 4) { ++i; } } i = 1; while (i <= 4) { peta['anim' + i].gotoAndStop(1); peta['anim' + i]._visible = false; ++i; } cekKapal(); } function cekKapal() { j = 1; while (j <= bykArea) { i = 1; while (i <= bykBangunan) { if (jenisBangunan[pilihKota][j][i] == 10) { if (map['map' + j].xpeta_mc['kapal' + i]._currentframe == 1) { map['map' + j].xpeta_mc['kapal' + i]._visible = true; map['map' + j].xpeta_mc['kapal' + i].gotoAndStop(2); } } else { map['map' + j].xpeta_mc['kapal' + i]._visible = false; map['map' + j].xpeta_mc['kapal' + i].gotoAndStop(1); } ++i; } ++j; } i = 1; while (i <= bykBangunan) { if (jenisBangunan[pilihKota][pilihMap][i] == 10) { if (peta['kapal' + i]._currentframe == 1) { peta['kapal' + i]._visible = true; peta['kapal' + i].gotoAndStop(map['map' + pilihMap].xpeta_mc['kapal' + i]._currentframe); } } else { peta['kapal' + i]._visible = false; peta['kapal' + i].gotoAndStop(1); } ++i; } } function buatMsgBox() { msgBox = attachMovie('msgBox_mc', 'msgBox_mc', dalamMsgBox); msgBox._x = 0; msgBox._y = 0; msgBox._yscale = 80; msgBox._xscale = 80; msgBox._alpha = -100; sentuhMsgBox = false; msgBox.onEnterFrame = enterMsgBox; } function enterMsgBox() { this.gotoAndStop(overMana); if (sentuhMsgBox == true) { if (jenisSentuh == 'button') { if (overMana == 4) { if (map.list_mc._currentframe == 1) { this.judul = judulButton2[pilihButton]; } else { if (map.list_mc._currentframe == 2) { this.judul = judulButton2[pilihButton + 8]; } else { if (map.list_mc._currentframe == 3) { this.judul = judulButton2[pilihButton + 16]; } } } } else { if (overMana == 5) { this.judul = judulButton2[pilihButton]; } else { this.judul = judulButton[pilihButton]; } } if (overMana == 1) { if (tingkatSulit == 3 || tingkatSulit == 4) { this.isi = isiButton[pilihButton]; } else { if (tingkatSulit == 1 || tingkatSulit == 2) { this.isi = xisiButton[pilihButton]; } } } else { if (overMana == 2) { if (tingkatSulit == 3 || tingkatSulit == 4) { this.isi = isiButton2[pilihButton]; } else { if (tingkatSulit == 1 || tingkatSulit == 2) { this.isi = xisiButton2[pilihButton]; } } } else { if (overMana == 3) { if (lihatMana == 1) { if (pilihButton != 0) { if (tingkatSulit == 3 || tingkatSulit == 4) { this.isi = isiButton[pilihButton] + '\n\nPress here for upgrade or sell the building'; } else { if (tingkatSulit == 1 || tingkatSulit == 2) { this.isi = xisiButton[pilihButton] + '\n\nPress here for upgrade or sell the building'; } } } else { if (tingkatSulit == 3 || tingkatSulit == 4) { this.isi = isiButton[pilihButton]; } else { if (tingkatSulit == 1 || tingkatSulit == 2) { this.isi = xisiButton[pilihButton]; } } } } else { if (pilihButton != 0) { if (tingkatSulit == 3 || tingkatSulit == 4) { this.isi = isiButton2[pilihButton] + '\n\nPress here for upgrade or sell the building'; } else { if (tingkatSulit == 1 || tingkatSulit == 2) { this.isi = xisiButton2[pilihButton] + '\n\nPress here for upgrade or sell the building'; } } } else { if (tingkatSulit == 3 || tingkatSulit == 4) { this.isi = isiButton2[pilihButton]; } else { if (tingkatSulit == 1 || tingkatSulit == 2) { this.isi = xisiButton2[pilihButton]; } } } } } else { if (overMana == 4) { this.isi = naikTurun[pilihButton]; } else { if (overMana == 5) { this.isi = ''; } } } } } this.xmoney = kebutuhanMoney[pilihButton]; this.xfood = kebutuhanFood[pilihButton]; this.xiron = kebutuhanIron[pilihButton]; this.xwood = kebutuhanWood[pilihButton]; this.xworker = kebutuhanWorker[pilihButton]; if (this.xmoney <= 0) { this.xmoney = 0; } if (this.xfood <= 0) { this.xfood = 0; } if (this.xiron <= 0) { this.xiron = 0; } if (this.xwood <= 0) { this.xwood = 0; } if (this.xworker <= 0) { this.xworker = 0; } } else { if (jenisSentuh == 'peta') { if (overMana == 6) { this.judul = namaKota[pilihButton]; this.isi = '(Press here to go to this city)'; this.jml1 = Number(_root.soldierKota[pilihButton]); this.jml2 = Number(_root.horseKota[pilihButton]); this.jml3 = Number(_root.catapultKota[pilihButton]); this.jml4 = Number(_root.witchKota[pilihButton]); this.jml5 = Number(_root.elephantKota[pilihButton]); this.jml6 = Number(_root.xsuperKota[pilihButton]); } else { if (overMana == 7) { this.judul = namaKota[pilihButton]; } } } } this._x = _root._xmouse; this._y = _root._ymouse; if (this._alpha < 125) { this._alpha += 50; } } else { if (sentuhMsgBox == false) { if (this._alpha > -25) { this._alpha -= 50; } else { this._y = -1000; } } } if (this._x <= 300) { this.gotoAndStop(this._currentframe + 10); } else { this.gotoAndStop(this._currentframe - 10); } } function buatInfo() { info = attachMovie('info_mc', 'info_mc', dalamInfo); info._x = 0; info._y = 80; info._alpha = 0; sentuhInfo = false; info._xinfo = ''; info.onEnterFrame = enterInfo; } function buatInfo2() { info2 = attachMovie('info_mc', 'info_mc2', dalamInfo2); info2._x = 0; info2._y = 0; info2._alpha = 0; sentuhInfo2 = false; info2._xinfo = ''; info2.onEnterFrame = enterInfo2; } function enterInfo() { if (sentuhInfo == true) { this.go_btn._visible = true; this.close_btn._visible = true; if (this._alpha < lamaDelay) { this._alpha += 20; } else { sentuhInfo = false; } } else { if (sentuhInfo == false) { if (this._alpha > -100) { this._alpha -= 20; } else { this.go_btn._visible = false; this.close_btn._visible = false; } } } } function cekInfo(wdelay, winfo, wkemana, wkota) { if (info._alpha <= -50) { sentuhInfo = true; info._alpha = 0; lamaDelay = wdelay; if (wkemana == undefined) { wkemana = 1; info.gotoAndStop(wkemana); info.close_btn.onRelease = function () { close_btn._visible = false; info._alpha = -50; sentuhInfo = false; }; } else { if (wkemana == 2) { info.gotoAndStop(wkemana); info.go_btn.onRelease = function () { pilihKota = wkota; xpilihKota = wkota; clearSemua(); initSemua(); xi = pilihKota; map.list_mc.gotoAndStop(1); map.list_mc.money = '$' + moneyKota[xi]; map.list_mc.food = foodKota[xi]; map.list_mc.iron = ironKota[xi]; map.list_mc.wood = woodKota[xi]; map.list_mc.sword = swordKota[xi]; map.list_mc.xarrow = xarrowKota[xi]; map.list_mc.soldier = soldierKota[xi]; map.list_mc.worker = workerKota[xi]; map.day = 'DAY \n' + day; }; info.close_btn.onRelease = function () { go_btn._visible = false; close_btn._visible = false; info._alpha = -50; sentuhInfo = false; }; } } info.xinfo = winfo; } } function enterInfo2() { if (sentuhInfo2 == true) { this.go_btn._visible = true; this.close_btn._visible = true; if (this._alpha < lamaDelay2) { this._alpha += 20; } else { sentuhInfo2 = false; } } else { if (sentuhInfo2 == false) { if (this._alpha > -100) { this.go_btn._visible = false; this.close_btn._visible = false; this._alpha -= 20; } } } } function cekInfo2(wdelay2, winfo2, wkemana, wkota) { sentuhInfo2 = true; info2._alpha = 0; lamaDelay2 = wdelay2; info2.xinfo = winfo2; if (wkemana == undefined) { wkemana = 1; info2.gotoAndStop(wkemana); info2.close_btn.onRelease = function () { info2._alpha = -50; sentuhInfo2 = false; }; } else { if (wkemana == 2) { info2.gotoAndStop(wkemana); info2.go_btn.onRelease = function () { pilihKota = wkota; xpilihKota = wkota; clearSemua(); initSemua(); xi = pilihKota; map.list_mc.gotoAndStop(1); map.list_mc.money = '$' + moneyKota[xi]; map.list_mc.food = foodKota[xi]; map.list_mc.iron = ironKota[xi]; map.list_mc.wood = woodKota[xi]; map.list_mc.sword = swordKota[xi]; map.list_mc.xarrow = xarrowKota[xi]; map.list_mc.soldier = soldierKota[xi]; map.list_mc.worker = workerKota[xi]; map.day = 'DAY \n' + day; }; } } } function buatMap() { map = attachMovie('map' + String(pilihKota), 'map_mc', dalamMap); map._x = 0; map._y = 0; map.city = namaKota[pilihKota]; i = 1; while (i <= bykArea) { map['map' + i].onRollOver = function () { this._alpha = 50; }; map['map' + i].onRollOut = function () { this._alpha = 100; }; map['map' + i].onReleaseOutside = function () { this._alpha = 100; }; map['map' + i].onRelease = function () { myStr = new String(this); mindi = Number(myStr.substr(myStr.length - 1, 1)); pilihMap = mindi; buatPeta(); }; ++i; } i = 1; while (i <= 8) { map.list_mc['arrow' + i].gotoAndStop(3); ++i; } map.list_mc.kiri_mc.onRelease = function () { i = 1; while (i <= 8) { naikTurun[i] = '-'; ++i; } if (map.list_mc._currentframe == 2) { map.list_mc.gotoAndStop(1); xcekInfo(); } else { if (map.list_mc._currentframe == 3) { map.list_mc.gotoAndStop(2); xcekInfo(); } } i = 1; while (i <= 8) { map.list_mc['arrow' + i].gotoAndStop(3); ++i; } }; map.list_mc.kanan_mc.onRelease = function () { i = 1; while (i <= 8) { naikTurun[i] = '-'; ++i; } if (map.list_mc._currentframe == 1) { map.list_mc.gotoAndStop(2); xcekInfo(); } else { if (map.list_mc._currentframe == 2) { map.list_mc.gotoAndStop(3); xcekInfo(); } } i = 1; while (i <= 8) { map.list_mc['arrow' + i].gotoAndStop(3); ++i; } }; i = 1; while (i <= bykBangunan) { map['button' + i].onPress = klikButton; map['button' + i].onRollOver = overButton; map['button' + i].onRollOut = outButton; map['stat' + i].onRollOver = overStat; map['stat' + i].onRollOut = outStat; ++i; } map.map_btn.onRelease = klikMap; map.actions_btn.onRelease = klikActions; map.options_btn.onRelease = klikOptions; ++dalam1; cekArea2(); } function klikOptions() { stopDrag(); removeMovieClip(object); sedangDrag = false; clearInterval(dayDelay); options = attachMovie('options_mc', 'options_mc', dalamOptions); options._x = 340; options._y = 240; xpause = true; bisaTombol(false); bisaTombol2(false); options.save_btn.onRelease = function () { clearSemua(); xjenisData = 'save'; posMain = 'main'; gotoAndStop('load'); }; options.load_btn.onRelease = function () { clearSemua(); xjenisData = 'load'; posMain = 'main'; gotoAndStop('load'); }; options.quit_btn.onRelease = function () { clearSemua(); gotoAndStop(38); }; options.back_btn.onRelease = function () { removeMovieClip(options); bisaTombol(true); bisaTombol2(true); xpause = false; clearInterval(dayDelay); dayDelay = setInterval(dayItung, delayHari); }; options.more_btn.onRelease = function () { getURL('http://www.maxgames.com', '_blank'); }; } function overStat() { if (sedangDrag == false) { overMana = 4; myStr = new String(this); windi = Number(myStr.substr(myStr.length - 1, 1)); pilihButton = windi; jenisSentuh = 'button'; sentuhMsgBox = true; } else { sentuhMsgBox = false; } } function outStat() { sentuhMsgBox = false; } function overStat2() { if (sedangDrag == false) { overMana = 5; myStr = new String(this); if (myStr.length == 24) { windi = Number(myStr.substr(myStr.length - 1, 1)); } else { if (myStr.length == 25) { windi = Number(myStr.substr(myStr.length - 2, 2)); } } pilihButton = windi; jenisSentuh = 'button'; sentuhMsgBox = true; } else { sentuhMsgBox = false; } } function outStat2() { sentuhMsgBox = false; } function klikActions() { stopDrag(); removeMovieClip(object); sedangDrag = false; tipeWar = 'serang'; xpause = true; bisaTombol(false); actions = attachMovie('actions_mc', 'actions_mc', dalamActions); actions.gotoAndStop(1); actions._x = 340; actions._y = 240; actions.move_btn.onRelease = klikMove; actions.war_btn.onRelease = klikWarMap; actions.export_btn.onRelease = klikExport; actions.import_btn.onRelease = klikImport; actions.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(actions); xpause = false; }; } function kurangWar() { i = 1; while (i <= 10) { if (wsoldier[i] == 1) { _root.soldierKota[_root.pilihKota] -= wbatalion[i]; } else { if (wsoldier[i] == 2) { _root.horseKota[_root.pilihKota] -= wbatalion[i]; } else { if (wsoldier[i] == 3) { _root.catapultKota[_root.pilihKota] -= wbatalion[i]; } else { if (wsoldier[i] == 4) { _root.witchKota[_root.pilihKota] -= wbatalion[i]; } else { if (wsoldier[i] == 5) { _root.elephantKota[_root.pilihKota] -= wbatalion[i]; } else { if (wsoldier[i] == 6) { _root.xsuperKota[_root.pilihKota] -= wbatalion[i]; } } } } } } if (wjenis[i] == 1) { _root.swordKota[_root.pilihKota] -= wbatalion[i]; } else { if (wjenis[i] == 2) { _root.xarrowKota[_root.pilihKota] -= wbatalion[i]; } else { if (wjenis[i] == 3) { _root.spearKota[_root.pilihKota] -= wbatalion[i]; } else { if (wjenis[i] == 4) { _root.fireKota[_root.pilihKota] -= wbatalion[i]; } else { if (wjenis[i] == 5) { _root.coalKota[_root.pilihKota] -= wbatalion[i]; } else { if (wjenis[i] == 6) { _root.iceballKota[_root.pilihKota] -= wbatalion[i]; } else { if (wjenis[i] == 7) { _root.fireballKota[_root.pilihKota] -= wbatalion[i]; } else { if (wjenis[i] == 8) { _root.poisonKota[_root.pilihKota] -= wbatalion[i]; } else { if (wjenis[i] == 9) { _root.hurricaneKota[_root.pilihKota] -= wbatalion[i]; } else { if (wjenis[i] == 10) { _root.earthquakeKota[_root.pilihKota] -= wbatalion[i]; } } } } } } } } } } ++i; } } function klikNext() { actions.winfo = ''; bisaPasukan = 1; i = 1; while (i <= 10) { if (actions['soldier' + i] < 0) { bisaPasukan = 2; } ++i; } if (actions.brought == 0) { bisaPasukan = 3; } i = 1; while (i <= 10) { if (actions['weapon' + i] < 0) { bisaPasukan = 4; } ++i; } if (bisaPasukan == 1) { wbatalion = new Array(); wjenis = new Array(); wsoldier = new Array(); i = 1; while (i <= 10) { if (actions['jumlah' + i] <= 0 || isNaN(actions['jumlah' + i])) { actions['jumlah' + i] = 0; } wbatalion[i] = actions['jumlah' + i]; wjenis[i] = actions['tipe' + i]._currentframe; wsoldier[i] = actions['bata' + i]._currentframe; ++i; } if (tipeWar == 'serang') { actions.gotoAndStop(6); actions.winfo = ''; daftarNama = new Array('', 'Money', 'Foods', 'Irons', 'Logs'); i = 1; while (i <= 4) { actions['brought' + i] = 0; actions['nama' + i] = daftarNama[i]; if (daftarNama[i] == 'Money') { actions['owned' + i] = _root.moneyKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Foods') { actions['owned' + i] = _root.foodKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Irons') { actions['owned' + i] = _root.ironKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Logs') { actions['owned' + i] = _root.woodKota[_root.pilihKota]; } } } } actions['max' + i].onRelease = klikMax3; actions['setengah' + i].onRelease = klikSetengah3; actions['seperempat' + i].onRelease = klikSeperempat3; ++i; } actions.war2_btn.onRelease = function () { bisaWar = true; i = 1; while (i <= 4) { if (actions['brought' + i] <= 0 || isNaN(actions['brought' + i])) { actions['brought' + i] = 0; } if (actions['brought' + i] > actions['owned' + i]) { bisaWar = false; } ++i; } if (bisaWar == true) { i = 1; while (i <= 4) { _root['bawaBarang' + i] = actions['brought' + i]; ++i; } i = 1; while (i <= 4) { if (i == 1) { moneyKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 2) { foodKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 3) { ironKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 4) { woodKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } } } } ++i; } kurangWar(); clearSemua(); gotoAndStop(130); } else { backSalah(); actions.winfo = 'Can\'t brought, too many goods'; } }; actions.back_btn.onRelease = function () { klikWar(); }; } else { i = 1; while (i <= 4) { _root['bawaBarang' + i] = 0; ++i; } kurangWar(); clearSemua(); gotoAndStop(130); } } else { if (bisaPasukan == 2) { backSalah(); actions.winfo = 'Can\'t war, not enough soldier'; } else { if (bisaPasukan == 3) { backSalah(); actions.winfo = 'Can\'t war, please put your soldiers to war'; } else { if (bisaPasukan == 4) { backSalah(); actions.winfo = 'Can\'t war, not enough weapon'; } } } } } function klikWarMap() { removeMovieClip(actions); klikMap('war'); dunia.select_mc._visible = true; dunia.select_mc.gotoAndStop(1); dunia.select_mc.ok_btn.onRelease = function () { i = 1; while (i <= linkWilayah[pilihKota].length) { if (punyaWilayah[linkWilayah[pilihKota][i]] != jenisKerajaan) { dunia['daerah' + linkWilayah[pilihKota][i]].gotoAndStop(2); dunia['daerah' + linkWilayah[pilihKota][i]].onRollOver = function () { this.gotoAndStop(5); }; dunia['daerah' + linkWilayah[pilihKota][i]].onRollOut = function () { this.gotoAndStop(2); }; dunia['daerah' + linkWilayah[pilihKota][i]].onRelease = function () { myStr = new String(this); if (myStr.length == 24) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } kotaDiserang = indi; if (punyaWilayah[kotaDiserang] == 0) { jenisMenyerang = 1; } else { jenisMenyerang = 2; } actions = attachMovie('actions_mc', 'actions_mc', dalamActions); actions.gotoAndStop(1); actions._x = 340; actions._y = 240; klikWar(); removeMovieClip(dunia); }; } ++i; } dunia.select_mc._visible = false; }; } function klikWar() { cekJmlMusuh(); posWeapon = new Array(); posBata = new Array(); totalWeapon = 12; totalBata = 6; if (tipeWar == 'serang') { actions.gotoAndStop(5); actions.next_btn.onRelease = klikNext; } else { actions.gotoAndStop(2); actions.war_btn.onRelease = klikNext; } actions.close_btn.onRelease = function () { if (tipeWar == 'serang') { bisaTombol(true); actions.gotoAndStop(1); xpause = false; klikActions(); } else { cekDiserang(); } }; actions.winfo = ''; actions.soldiers = _root.soldierKota[_root.pilihKota]; actions.brought = 0; i = 1; while (i <= totalWeapon) { if (i == 1) { actions['xweapon' + i] = Number(_root.swordKota[_root.pilihKota]); } else { if (i == 2) { actions['xweapon' + i] = Number(_root.xarrowKota[_root.pilihKota]); } else { if (i == 3) { actions['xweapon' + i] = Number(_root.spearKota[_root.pilihKota]); } else { if (i == 4) { actions['xweapon' + i] = Number(_root.fireKota[_root.pilihKota]); } else { if (i == 5) { actions['xweapon' + i] = Number(_root.coalKota[_root.pilihKota]); } else { if (i == 6) { actions['xweapon' + i] = Number(_root.iceballKota[_root.pilihKota]); } else { if (i == 7) { actions['xweapon' + i] = Number(_root.fireballKota[_root.pilihKota]); } else { if (i == 8) { actions['xweapon' + i] = Number(_root.poisonKota[_root.pilihKota]); } else { if (i == 9) { actions['xweapon' + i] = Number(_root.hurricaneKota[_root.pilihKota]); } else { if (i == 10) { actions['xweapon' + i] = Number(_root.earthquakeKota[_root.pilihKota]); } else { if (i == 11) { actions['xweapon' + i] = Number(_root.xsuperKota[_root.pilihKota]); } } } } } } } } } } } ++i; } i = 1; while (i <= totalBata) { if (i == 1) { actions['xsoldier' + i] = Number(_root.soldierKota[_root.pilihKota]); } else { if (i == 2) { actions['xsoldier' + i] = Number(_root.horseKota[_root.pilihKota]); } else { if (i == 3) { actions['xsoldier' + i] = Number(_root.catapultKota[_root.pilihKota]); } else { if (i == 4) { actions['xsoldier' + i] = Number(_root.witchKota[_root.pilihKota]); } else { if (i == 5) { actions['xsoldier' + i] = Number(_root.elephantKota[_root.pilihKota]); } else { if (i == 6) { actions['xsoldier' + i] = Number(_root.xsuperKota[_root.pilihKota]); } } } } } } ++i; } actions.pasukan1 = Number(_root.soldierKota[_root.pilihKota]); actions.pasukan2 = Number(_root.horseKota[_root.pilihKota]); actions.pasukan3 = Number(_root.catapultKota[_root.pilihKota]); actions.pasukan4 = Number(_root.witchKota[_root.pilihKota]); actions.pasukan5 = Number(_root.elephantKota[_root.pilihKota]); actions.pasukan6 = Number(_root.xsuperKota[_root.pilihKota]); actions.xpasukan1 = actions.pasukan1; actions.xpasukan2 = actions.pasukan2; actions.xpasukan3 = actions.pasukan3; actions.xpasukan4 = actions.pasukan4; actions.xpasukan5 = actions.pasukan5; actions.xpasukan6 = actions.pasukan6; pilihPasukan = 1; batasKiri = new Array(); batasKanan = new Array(); i = 1; while (i <= 6) { j = 1; while (j <= 6) { if (actions['pasukan' + i] > actions['pasukan' + j]) { if (actions['pasukan' + i] > actions['pasukan' + pilihPasukan]) { pilihPasukan = i; } } ++j; } ++i; } i = 1; while (i <= 10) { posWeapon[i] = 1; posBata[i] = pilihPasukan; actions['jumlah' + i] = 0; actions['xjumlah' + i].onChanged = ubahJumlah2; actions['tipe' + i].gotoAndStop(posWeapon[i]); actions['bata' + i].gotoAndStop(posBata[i]); actions['tipe' + i].kiri_mc.onRelease = klikKiri; actions['tipe' + i].kanan_mc.onRelease = klikKanan; actions['bata' + i].kiri_mc.onRelease = klikKiri2; actions['bata' + i].kanan_mc.onRelease = klikKanan2; actions['max' + i].onRelease = klikMax2; actions['setengah' + i].onRelease = klikSetengah2; actions['seperempat' + i].onRelease = klikSeperempat2; xsenjata(i); ++i; } cekWeapon(); xxi = 1; while (xxi <= 10) { cekSoldier(xxi); ++xxi; } } function xsenjata(xindi, windi) { i = xindi; if (actions['bata' + i]._currentframe == 3) { batasKiri[i] = 2; batasKanan[i] = 5; if (windi != 1) { actions['tipe' + i].gotoAndStop(2); posWeapon[i] = 2; } } else { if (actions['bata' + i]._currentframe == 4) { batasKiri[i] = 6; batasKanan[i] = 10; if (windi != 1) { actions['tipe' + i].gotoAndStop(6); posWeapon[i] = 6; } } else { if (actions['bata' + i]._currentframe == 6) { batasKiri[i] = 11; batasKanan[i] = 11; if (windi != 1) { actions['tipe' + i].gotoAndStop(11); posWeapon[i] = 11; } } else { batasKiri[i] = 1; batasKanan[i] = 4; if (windi != 1) { actions['tipe' + i].gotoAndStop(1); posWeapon[i] = 1; } } } } actions['tipe' + i].kiri_mc.onRelease = klikKiri; actions['tipe' + i].kanan_mc.onRelease = klikKanan; } function klikMax6() { myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (indi == 22) { actions['brought' + indi] = Math.floor(_root.hurricaneKota[_root.pilihKota]); } else { if (indi == 23) { actions['brought' + indi] = Math.floor(_root.earthquakeKota[_root.pilihKota]); } } } function klikSetengah6() { myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (indi == 22) { actions['brought' + indi] = Math.floor(_root.hurricaneKota[_root.pilihKota] / 2); } else { if (indi == 23) { actions['brought' + indi] = Math.floor(_root.earthquakeKota[_root.pilihKota] / 2); } } } function klikSeperempat6() { myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (indi == 22) { actions['brought' + indi] = Math.floor(_root.hurricaneKota[_root.pilihKota] / 4); } else { if (indi == 23) { actions['brought' + indi] = Math.floor(_root.earthquakeKota[_root.pilihKota] / 4); } } } function klikMax5() { myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (indi == 15) { actions['brought' + indi] = Math.floor(_root.elephantKota[_root.pilihKota]); } else { if (indi == 16) { actions['brought' + indi] = Math.floor(_root.fireKota[_root.pilihKota]); } else { if (indi == 17) { actions['brought' + indi] = Math.floor(_root.steelKota[_root.pilihKota]); } else { if (indi == 18) { actions['brought' + indi] = Math.floor(_root.xsuperKota[_root.pilihKota]); } else { if (indi == 19) { actions['brought' + indi] = Math.floor(_root.iceballKota[_root.pilihKota]); } else { if (indi == 20) { actions['brought' + indi] = Math.floor(_root.fireballKota[_root.pilihKota]); } else { if (indi == 21) { actions['brought' + indi] = Math.floor(_root.poisonKota[_root.pilihKota]); } } } } } } } } function klikSetengah5() { myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (indi == 15) { actions['brought' + indi] = Math.floor(_root.elephantKota[_root.pilihKota] / 2); } else { if (indi == 16) { actions['brought' + indi] = Math.floor(_root.fireKota[_root.pilihKota] / 2); } else { if (indi == 17) { actions['brought' + indi] = Math.floor(_root.steelKota[_root.pilihKota] / 2); } else { if (indi == 18) { actions['brought' + indi] = Math.floor(_root.xsuperKota[_root.pilihKota] / 2); } else { if (indi == 19) { actions['brought' + indi] = Math.floor(_root.iceballKota[_root.pilihKota] / 2); } else { if (indi == 20) { actions['brought' + indi] = Math.floor(_root.fireballKota[_root.pilihKota] / 2); } else { if (indi == 21) { actions['brought' + indi] = Math.floor(_root.poisonKota[_root.pilihKota] / 2); } } } } } } } } function klikSeperempat5() { myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (indi == 15) { actions['brought' + indi] = Math.floor(_root.elephantKota[_root.pilihKota] / 4); } else { if (indi == 16) { actions['brought' + indi] = Math.floor(_root.fireKota[_root.pilihKota] / 4); } else { if (indi == 17) { actions['brought' + indi] = Math.floor(_root.steelKota[_root.pilihKota] / 4); } else { if (indi == 18) { actions['brought' + indi] = Math.floor(_root.xsuperKota[_root.pilihKota] / 4); } else { if (indi == 19) { actions['brought' + indi] = Math.floor(_root.iceballKota[_root.pilihKota] / 4); } else { if (indi == 20) { actions['brought' + indi] = Math.floor(_root.fireballKota[_root.pilihKota] / 4); } else { if (indi == 21) { actions['brought' + indi] = Math.floor(_root.poisonKota[_root.pilihKota] / 4); } } } } } } } } function klikMax4() { myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (indi == 8) { actions['brought' + indi] = Math.floor(_root.diamondKota[_root.pilihKota]); } else { if (indi == 9) { actions['brought' + indi] = Math.floor(_root.coalKota[_root.pilihKota]); } else { if (indi == 10) { actions['brought' + indi] = Math.floor(_root.oilKota[_root.pilihKota]); } else { if (indi == 11) { actions['brought' + indi] = Math.floor(_root.horseKota[_root.pilihKota]); } else { if (indi == 12) { actions['brought' + indi] = Math.floor(_root.spearKota[_root.pilihKota]); } else { if (indi == 13) { actions['brought' + indi] = Math.floor(_root.catapultKota[_root.pilihKota]); } else { if (indi == 14) { actions['brought' + indi] = Math.floor(_root.witchKota[_root.pilihKota]); } } } } } } } } function klikSetengah4() { myStr = new String(this); if (myStr.length == 28) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (indi == 8) { actions['brought' + indi] = Math.floor(_root.diamondKota[_root.pilihKota] / 2); } else { if (indi == 9) { actions['brought' + indi] = Math.floor(_root.coalKota[_root.pilihKota] / 2); } else { if (indi == 10) { actions['brought' + indi] = Math.floor(_root.oilKota[_root.pilihKota] / 2); } else { if (indi == 11) { actions['brought' + indi] = Math.floor(_root.horseKota[_root.pilihKota] / 2); } else { if (indi == 12) { actions['brought' + indi] = Math.floor(_root.spearKota[_root.pilihKota] / 2); } else { if (indi == 13) { actions['brought' + indi] = Math.floor(_root.catapultKota[_root.pilihKota] / 2); } else { if (indi == 14) { actions['brought' + indi] = Math.floor(_root.witchKota[_root.pilihKota] / 2); } } } } } } } } function klikSeperempat4() { myStr = new String(this); if (myStr.length == 30) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (indi == 8) { actions['brought' + indi] = Math.floor(_root.diamondKota[_root.pilihKota] / 4); } else { if (indi == 9) { actions['brought' + indi] = Math.floor(_root.coalKota[_root.pilihKota] / 4); } else { if (indi == 10) { actions['brought' + indi] = Math.floor(_root.oilKota[_root.pilihKota] / 4); } else { if (indi == 11) { actions['brought' + indi] = Math.floor(_root.horseKota[_root.pilihKota] / 4); } else { if (indi == 12) { actions['brought' + indi] = Math.floor(_root.spearKota[_root.pilihKota] / 4); } else { if (indi == 13) { actions['brought' + indi] = Math.floor(_root.catapultKota[_root.pilihKota] / 4); } else { if (indi == 14) { actions['brought' + indi] = Math.floor(_root.witchKota[_root.pilihKota] / 4); } } } } } } } } function klikMax3() { myStr = new String(this); indi = Number(myStr.substr(myStr.length - 1, 1)); if (indi == 1) { actions['brought' + indi] = Math.floor(_root.moneyKota[_root.pilihKota]); } else { if (indi == 2) { actions['brought' + indi] = Math.floor(_root.foodKota[_root.pilihKota]); } else { if (indi == 3) { actions['brought' + indi] = Math.floor(_root.ironKota[_root.pilihKota]); } else { if (indi == 4) { actions['brought' + indi] = Math.floor(_root.woodKota[_root.pilihKota]); } else { if (indi == 5) { actions['brought' + indi] = Math.floor(_root.swordKota[_root.pilihKota]); } else { if (indi == 6) { actions['brought' + indi] = Math.floor(_root.xarrowKota[_root.pilihKota]); } else { if (indi == 7) { actions['brought' + indi] = Math.floor(_root.soldierKota[_root.pilihKota]); } } } } } } } } function klikSetengah3() { myStr = new String(this); indi = Number(myStr.substr(myStr.length - 1, 1)); if (indi == 1) { actions['brought' + indi] = Math.floor(_root.moneyKota[_root.pilihKota] / 2); } else { if (indi == 2) { actions['brought' + indi] = Math.floor(_root.foodKota[_root.pilihKota] / 2); } else { if (indi == 3) { actions['brought' + indi] = Math.floor(_root.ironKota[_root.pilihKota] / 2); } else { if (indi == 4) { actions['brought' + indi] = Math.floor(_root.woodKota[_root.pilihKota] / 2); } else { if (indi == 5) { actions['brought' + indi] = Math.floor(_root.swordKota[_root.pilihKota] / 2); } else { if (indi == 6) { actions['brought' + indi] = Math.floor(_root.xarrowKota[_root.pilihKota] / 2); } else { if (indi == 7) { actions['brought' + indi] = Math.floor(_root.soldierKota[_root.pilihKota] / 2); } } } } } } } } function klikSeperempat3() { myStr = new String(this); indi = Number(myStr.substr(myStr.length - 1, 1)); if (indi == 1) { actions['brought' + indi] = Math.floor(_root.moneyKota[_root.pilihKota] / 4); } else { if (indi == 2) { actions['brought' + indi] = Math.floor(_root.foodKota[_root.pilihKota] / 4); } else { if (indi == 3) { actions['brought' + indi] = Math.floor(_root.ironKota[_root.pilihKota] / 4); } else { if (indi == 4) { actions['brought' + indi] = Math.floor(_root.woodKota[_root.pilihKota] / 4); } else { if (indi == 5) { actions['brought' + indi] = Math.floor(_root.swordKota[_root.pilihKota] / 4); } else { if (indi == 6) { actions['brought' + indi] = Math.floor(_root.xarrowKota[_root.pilihKota] / 4); } else { if (indi == 7) { actions['brought' + indi] = Math.floor(_root.soldierKota[_root.pilihKota] / 4); } } } } } } } } function klikMax2() { myStr = new String(this); if (myStr.length == 23) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (_root.swordKota[_root.pilihKota] + _root.xarrowKota[_root.pilihKota] + _root.spearKota[_root.pilihKota] + _root.fireKota[_root.pilihKota] + _root.coalKota[_root.pilihKota] + _root.fireballKota[_root.pilihKota] + _root.iceballKota[_root.pilihKota] + _root.poisonKota[_root.pilihKota] + _root.hurricaneKota[_root.pilihKota] + _root.earthquakeKota[_root.pilihKota] <= _root.soldierKota[_root.pilihKota] + _root.horseKota[_root.pilihKota] + _root.catapultKota[_root.pilihKota] + _root.elephantKota[_root.pilihKota] + _root.witchKota[_root.pilihKota] + _root.xsuperKota[_root.pilihKota]) { if (posWeapon[indi] == 1) { actions['xweapon' + indi] = Math.floor(_root.swordKota[_root.pilihKota] / 4); } else { if (posWeapon[indi] == 2) { actions['xweapon' + indi] = Math.floor(_root.xarrowKota[_root.pilihKota] / 4); } else { if (posWeapon[indi] == 3) { actions['xweapon' + indi] = Math.floor(_root.spearKota[_root.pilihKota] / 4); } else { if (posWeapon[indi] == 4) { actions['xweapon' + indi] = Math.floor(_root.fireKota[_root.pilihKota] / 4); } else { if (posWeapon[indi] == 5) { actions['xweapon' + indi] = Math.floor(_root.coalKota[_root.pilihKota] / 4); } else { if (posWeapon[indi] == 6) { actions['xweapon' + indi] = Math.floor(_root.iceballKota[_root.pilihKota] / 4); } else { if (posWeapon[indi] == 7) { actions['xweapon' + indi] = Math.floor(_root.fireballKota[_root.pilihKota] / 4); } else { if (posWeapon[indi] == 8) { actions['xweapon' + indi] = Math.floor(_root.poisonKota[_root.pilihKota] / 4); } else { if (posWeapon[indi] == 9) { actions['xweapon' + indi] = Math.floor(_root.hurricaneKota[_root.pilihKota] / 4); } else { if (posWeapon[indi] == 10) { actions['xweapon' + indi] = Math.floor(_root.earthquakeKota[_root.pilihKota] / 4); } else { if (posWeapon[indi] == 11) { actions['xweapon' + indi] = Math.floor(_root.xsuperKota[_root.pilihKota] / 4); } } } } } } } } } } } } else { if (posBata[indi] == 1) { actions['xweapon' + indi] = Math.floor(_root.soldierKota[_root.pilihKota] / 4); } else { if (posBata[indi] == 2) { actions['xweapon' + indi] = Math.floor(_root.horseKota[_root.pilihKota] / 4); } else { if (posBata[indi] == 3) { actions['xweapon' + indi] = Math.floor(_root.catapultKota[_root.pilihKota] / 4); } else { if (posBata[indi] == 4) { actions['xweapon' + indi] = Math.floor(_root.witchKota[_root.pilihKota] / 4); } else { if (posBata[indi] == 5) { actions['xweapon' + indi] = Math.floor(_root.elephantKota[_root.pilihKota] / 4); } else { if (posBata[indi] == 6) { actions['xweapon' + indi] = Math.floor(_root.xsuperKota[_root.pilihKota] / 4); } } } } } } } if (actions['xweapon' + indi] > 0) { actions['jumlah' + indi] = actions['xweapon' + indi]; } ubahJumlah(indi, 1); } function klikSetengah2() { myStr = new String(this); if (myStr.length == 28) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } if (_root.swordKota[_root.pilihKota] + _root.xarrowKota[_root.pilihKota] + _root.spearKota[_root.pilihKota] + _root.fireKota[_root.pilihKota] + _root.coalKota[_root.pilihKota] + _root.fireballKota[_root.pilihKota] + _root.iceballKota[_root.pilihKota] + _root.poisonKota[_root.pilihKota] + _root.hurricaneKota[_root.pilihKota] + _root.earthquakeKota[_root.pilihKota] <= _root.soldierKota[_root.pilihKota] + _root.horseKota[_root.pilihKota] + _root.catapultKota[_root.pilihKota] + _root.elephantKota[_root.pilihKota] + _root.witchKota[_root.pilihKota] + _root.xsuperKota[_root.pilihKota]) { if (posWeapon[indi] == 1) { actions['xweapon' + indi] = Math.floor(_root.swordKota[_root.pilihKota] / 5); } else { if (posWeapon[indi] == 2) { actions['xweapon' + indi] = Math.floor(_root.xarrowKota[_root.pilihKota] / 5); } else { if (posWeapon[indi] == 3) { actions['xweapon' + indi] = Math.floor(_root.spearKota[_root.pilihKota] / 5); } else { if (posWeapon[indi] == 4) { actions['xweapon' + indi] = Math.floor(_root.fireKota[_root.pilihKota] / 5); } else { if (posWeapon[indi] == 5) { actions['xweapon' + indi] = Math.floor(_root.coalKota[_root.pilihKota] / 5); } else { if (posWeapon[indi] == 6) { actions['xweapon' + indi] = Math.floor(_root.iceballKota[_root.pilihKota] / 5); } else { if (posWeapon[indi] == 7) { actions['xweapon' + indi] = Math.floor(_root.fireballKota[_root.pilihKota] / 5); } else { if (posWeapon[indi] == 8) { actions['xweapon' + indi] = Math.floor(_root.poisonKota[_root.pilihKota] / 5); } else { if (posWeapon[indi] == 9) { actions['xweapon' + indi] = Math.floor(_root.hurricaneKota[_root.pilihKota] / 5); } else { if (posWeapon[indi] == 10) { actions['xweapon' + indi] = Math.floor(_root.earthquakeKota[_root.pilihKota] / 5); } else { if (posWeapon[indi] == 11) { actions['xweapon' + indi] = Math.floor(_root.xsuperKota[_root.pilihKota] / 5); } } } } } } } } } } } } else { if (posBata[indi] == 1) { actions['xweapon' + indi] = Math.floor(_root.soldierKota[_root.pilihKota] / 5); } else { if (posBata[indi] == 2) { actions['xweapon' + indi] = Math.floor(_root.horseKota[_root.pilihKota] / 5); } else { if (posBata[indi] == 3) { actions['xweapon' + indi] = Math.floor(_root.catapultKota[_root.pilihKota] / 5); } else { if (posBata[indi] == 4) { actions['xweapon' + indi] = Math.floor(_root.witchKota[_root.pilihKota] / 5); } else { if (posBata[indi] == 5) { actions['xweapon' + indi] = Math.floor(_root.elephantKota[_root.pilihKota] / 5); } else { if (posBata[indi] == 6) { actions['xweapon' + indi] = Math.floor(_root.xsuperKota[_root.pilihKota] / 5); } } } } } } } if (actions['xweapon' + indi] > 0) { actions['jumlah' + indi] = actions['xweapon' + indi]; } ubahJumlah(indi, 1); } function klikSeperempat2() { myStr = new String(this); if (myStr.length == 30) { indi = myStr.substr(myStr.length - 1, 1); } else { indi = myStr.substr(myStr.length - 2, 2); } if (_root.swordKota[_root.pilihKota] + _root.xarrowKota[_root.pilihKota] + _root.spearKota[_root.pilihKota] + _root.fireKota[_root.pilihKota] + _root.coalKota[_root.pilihKota] + _root.fireballKota[_root.pilihKota] + _root.iceballKota[_root.pilihKota] + _root.poisonKota[_root.pilihKota] + _root.hurricaneKota[_root.pilihKota] + _root.earthquakeKota[_root.pilihKota] <= _root.soldierKota[_root.pilihKota] + _root.horseKota[_root.pilihKota] + _root.catapultKota[_root.pilihKota] + _root.elephantKota[_root.pilihKota] + _root.witchKota[_root.pilihKota] + _root.xsuperKota[_root.pilihKota]) { if (posWeapon[indi] == 1) { actions['xweapon' + indi] = Math.floor(_root.swordKota[_root.pilihKota] / 10); } else { if (posWeapon[indi] == 2) { actions['xweapon' + indi] = Math.floor(_root.xarrowKota[_root.pilihKota] / 10); } else { if (posWeapon[indi] == 3) { actions['xweapon' + indi] = Math.floor(_root.spearKota[_root.pilihKota] / 10); } else { if (posWeapon[indi] == 4) { actions['xweapon' + indi] = Math.floor(_root.fireKota[_root.pilihKota] / 10); } else { if (posWeapon[indi] == 5) { actions['xweapon' + indi] = Math.floor(_root.coalKota[_root.pilihKota] / 10); } else { if (posWeapon[indi] == 6) { actions['xweapon' + indi] = Math.floor(_root.iceballKota[_root.pilihKota] / 10); } else { if (posWeapon[indi] == 7) { actions['xweapon' + indi] = Math.floor(_root.fireballKota[_root.pilihKota] / 10); } else { if (posWeapon[indi] == 8) { actions['xweapon' + indi] = Math.floor(_root.poisonKota[_root.pilihKota] / 10); } else { if (posWeapon[indi] == 9) { actions['xweapon' + indi] = Math.floor(_root.hurricaneKota[_root.pilihKota] / 10); } else { if (posWeapon[indi] == 10) { actions['xweapon' + indi] = Math.floor(_root.earthquakeKota[_root.pilihKota] / 10); } else { if (posWeapon[indi] == 11) { actions['xweapon' + indi] = Math.floor(_root.xsuperKota[_root.pilihKota] / 10); } } } } } } } } } } } } else { if (posBata[indi] == 1) { actions['xweapon' + indi] = Math.floor(_root.soldierKota[_root.pilihKota] / 10); } else { if (posBata[indi] == 2) { actions['xweapon' + indi] = Math.floor(_root.horseKota[_root.pilihKota] / 10); } else { if (posBata[indi] == 3) { actions['xweapon' + indi] = Math.floor(_root.catapultKota[_root.pilihKota] / 10); } else { if (posBata[indi] == 4) { actions['xweapon' + indi] = Math.floor(_root.witchKota[_root.pilihKota] / 10); } else { if (posBata[indi] == 5) { actions['xweapon' + indi] = Math.floor(_root.elephantKota[_root.pilihKota] / 10); } else { if (posBata[indi] == 6) { actions['xweapon' + indi] = Math.floor(_root.xsuperKota[_root.pilihKota] / 10); } } } } } } } if (actions['xweapon' + indi] > 0) { actions['jumlah' + indi] = actions['xweapon' + indi]; } ubahJumlah(indi, 1); } function ubahJumlah(xindi, windi) { myStr = new String(this); if (myStr.length == 23) { indi = myStr.substr(myStr.length - 1, 1); } else { indi = myStr.substr(myStr.length - 2, 2); } cekRemain(); cekWeapon(); cekSoldier(xindi, windi); } function ubahJumlah2(xindi, windi) { myStr = new String(this); if (myStr.length == 27) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } cekRemain(); cekWeapon(); cekSoldier(indi, 1); } function cekRemain() { totalSemua1 = _root.soldierKota[_root.pilihKota]; totalSemua2 = _root.horseKota[_root.pilihKota]; totalSemua3 = _root.catapultKota[_root.pilihKota]; totalSemua4 = _root.witchKota[_root.pilihKota]; totalSemua5 = _root.elephantKota[_root.pilihKota]; totalSemua6 = _root.xsuperKota[_root.pilihKota]; zi = 1; while (zi <= 10) { if (posBata[zi] == 1) { if (actions['jumlah' + zi] <= 0 || isNaN(actions['jumlah' + zi]) || actions['jumlah' + zi] == undefined) { actions['jumlah' + zi] = 0; } _root.totalSemua1 -= actions['jumlah' + zi]; } else { if (posBata[zi] == 2) { if (actions['jumlah' + zi] <= 0 || isNaN(actions['jumlah' + zi]) || actions['jumlah' + zi] == undefined) { actions['jumlah' + zi] = 0; } _root.totalSemua2 -= actions['jumlah' + zi]; } else { if (posBata[zi] == 3) { if (actions['jumlah' + zi] <= 0 || isNaN(actions['jumlah' + zi]) || actions['jumlah' + zi] == undefined) { actions['jumlah' + zi] = 0; } _root.totalSemua3 -= actions['jumlah' + zi]; } else { if (posBata[zi] == 4) { if (actions['jumlah' + zi] <= 0 || isNaN(actions['jumlah' + zi]) || actions['jumlah' + zi] == undefined) { actions['jumlah' + zi] = 0; } _root.totalSemua4 -= actions['jumlah' + zi]; } else { if (posBata[zi] == 5) { if (actions['jumlah' + zi] <= 0 || isNaN(actions['jumlah' + zi]) || actions['jumlah' + zi] == undefined) { actions['jumlah' + zi] = 0; } _root.totalSemua5 -= actions['jumlah' + zi]; } else { if (posBata[zi] == 6) { if (actions['jumlah' + zi] <= 0 || isNaN(actions['jumlah' + zi]) || actions['jumlah' + zi] == undefined) { actions['jumlah' + zi] = 0; } _root.totalSemua6 -= actions['jumlah' + zi]; } } } } } } ++zi; } actions.xpasukan1 = _root.totalSemua1; actions.xpasukan2 = _root.totalSemua2; actions.xpasukan3 = _root.totalSemua3; actions.xpasukan4 = _root.totalSemua4; actions.xpasukan5 = _root.totalSemua5; actions.xpasukan6 = _root.totalSemua6; } function cekWeapon() { xbrought = 0; i = 1; while (i <= totalWeapon) { if (i == 1) { actions['xweapon' + i] = Number(_root.swordKota[_root.pilihKota]); } else { if (i == 2) { actions['xweapon' + i] = Number(_root.xarrowKota[_root.pilihKota]); } else { if (i == 3) { actions['xweapon' + i] = Number(_root.spearKota[_root.pilihKota]); } else { if (i == 4) { actions['xweapon' + i] = Number(_root.fireKota[_root.pilihKota]); } else { if (i == 5) { actions['xweapon' + i] = Number(_root.coalKota[_root.pilihKota]); } else { if (i == 6) { actions['xweapon' + i] = Number(_root.iceballKota[_root.pilihKota]); } else { if (i == 7) { actions['xweapon' + i] = Number(_root.fireballKota[_root.pilihKota]); } else { if (i == 8) { actions['xweapon' + i] = Number(_root.poisonKota[_root.pilihKota]); } else { if (i == 9) { actions['xweapon' + i] = Number(_root.hurricaneKota[_root.pilihKota]); } else { if (i == 10) { actions['xweapon' + i] = Number(_root.earthquakeKota[_root.pilihKota]); } else { if (i == 11) { actions['xweapon' + i] = Number(_root.xsuperKota[_root.pilihKota]); } } } } } } } } } } } ++i; } i = 1; while (i <= 10) { if (isNaN(actions['jumlah' + i])) { } else { xbrought += Number(actions['jumlah' + i]); } if (posWeapon[i] == 1) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } else { if (posWeapon[i] == 2) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } else { if (posWeapon[i] == 3) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } else { if (posWeapon[i] == 4) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } else { if (posWeapon[i] == 5) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } else { if (posWeapon[i] == 6) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } else { if (posWeapon[i] == 7) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } else { if (posWeapon[i] == 8) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } else { if (posWeapon[i] == 9) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } else { if (posWeapon[i] == 10) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } else { if (posWeapon[i] == 11) { if (isNaN(actions['jumlah' + i])) { } else { actions['xweapon' + posWeapon[i]] -= actions['jumlah' + i]; } } } } } } } } } } } } ++i; } actions.brought = xbrought; if (actions.brought <= 0 || isNaN(actions.brought)) { actions.brought = 0; } i = 1; while (i <= 10) { if (posWeapon[i] == 1) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } else { if (posWeapon[i] == 2) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } else { if (posWeapon[i] == 3) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } else { if (posWeapon[i] == 4) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } else { if (posWeapon[i] == 5) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } else { if (posWeapon[i] == 6) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } else { if (posWeapon[i] == 7) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } else { if (posWeapon[i] == 8) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } else { if (posWeapon[i] == 9) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } else { if (posWeapon[i] == 10) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } else { if (posWeapon[i] == 11) { actions['weapon' + i] = actions['xweapon' + posWeapon[i]]; } } } } } } } } } } } if (isNaN(actions['weapon' + i])) { actions['weapon' + i] = 0; } ++i; } } function cekSoldier(xindi, windi) { xsenjata(xindi, windi); xbrought = 0; i = 1; while (i <= totalBata) { if (i == 1) { actions['xsoldier' + i] = Number(_root.soldierKota[_root.pilihKota]); } else { if (i == 2) { actions['xsoldier' + i] = Number(_root.horseKota[_root.pilihKota]); } else { if (i == 3) { actions['xsoldier' + i] = Number(_root.catapultKota[_root.pilihKota]); } else { if (i == 4) { actions['xsoldier' + i] = Number(_root.witchKota[_root.pilihKota]); } else { if (i == 5) { actions['xsoldier' + i] = Number(_root.elephantKota[_root.pilihKota]); } else { if (i == 6) { actions['xsoldier' + i] = Number(_root.xsuperKota[_root.pilihKota]); } } } } } } ++i; } i = 1; while (i <= 10) { if (isNaN(actions['jumlah' + i])) { } else { xbrought += Number(actions['jumlah' + i]); } if (posBata[i] == 1) { if (isNaN(actions['jumlah' + i])) { } else { actions['xsoldier' + posBata[i]] -= actions['jumlah' + i]; } } else { if (posBata[i] == 2) { if (isNaN(actions['jumlah' + i])) { } else { actions['xsoldier' + posBata[i]] -= actions['jumlah' + i]; } } else { if (posBata[i] == 3) { if (isNaN(actions['jumlah' + i])) { } else { actions['xsoldier' + posBata[i]] -= actions['jumlah' + i]; } } else { if (posBata[i] == 4) { if (isNaN(actions['jumlah' + i])) { } else { actions['xsoldier' + posBata[i]] -= actions['jumlah' + i]; } } else { if (posBata[i] == 5) { if (isNaN(actions['jumlah' + i])) { } else { actions['xsoldier' + posBata[i]] -= actions['jumlah' + i]; } } else { if (posBata[i] == 6) { if (isNaN(actions['jumlah' + i])) { } else { actions['xsoldier' + posBata[i]] -= actions['jumlah' + i]; } } } } } } } ++i; } actions.brought = xbrought; if (actions.brought <= 0 || isNaN(actions.brought)) { actions.brought = 0; } i = 1; while (i <= 10) { if (posBata[i] == 1) { actions['soldier' + i] = actions['xsoldier' + posBata[i]]; } else { if (posBata[i] == 2) { actions['soldier' + i] = actions['xsoldier' + posBata[i]]; } else { if (posBata[i] == 3) { actions['soldier' + i] = actions['xsoldier' + posBata[i]]; } else { if (posBata[i] == 4) { actions['soldier' + i] = actions['xsoldier' + posBata[i]]; } else { if (posBata[i] == 5) { actions['soldier' + i] = actions['xsoldier' + posBata[i]]; } else { if (posBata[i] == 6) { actions['soldier' + i] = actions['xsoldier' + posBata[i]]; } } } } } } if (isNaN(actions['soldier' + i])) { actions['soldier' + i] = 0; } ++i; } cekWeapon(); } function klikKiri() { myStr = new String(this._parent); if (myStr.length == 24) { indi = myStr.substr(myStr.length - 1, 1); } else { indi = myStr.substr(myStr.length - 2, 2); } --posWeapon[indi]; if (posWeapon[indi] < batasKiri[indi]) { posWeapon[indi] = batasKanan[indi]; } actions['tipe' + indi].gotoAndStop(posWeapon[indi]); cekWeapon(); } function klikKanan() { myStr = new String(this._parent); if (myStr.length == 24) { indi = myStr.substr(myStr.length - 1, 1); } else { indi = myStr.substr(myStr.length - 2, 2); } ++posWeapon[indi]; if (posWeapon[indi] > batasKanan[indi]) { posWeapon[indi] = batasKiri[indi]; } actions['tipe' + indi].gotoAndStop(posWeapon[indi]); cekWeapon(); } function klikKiri2() { myStr = new String(this._parent); if (myStr.length == 24) { indi = myStr.substr(myStr.length - 1, 1); } else { indi = myStr.substr(myStr.length - 2, 2); } --posBata[indi]; if (posBata[indi] < 1) { posBata[indi] = totalBata; } actions['bata' + indi].gotoAndStop(posBata[indi]); cekRemain(); cekSoldier(indi); } function klikKanan2() { myStr = new String(this._parent); if (myStr.length == 24) { indi = myStr.substr(myStr.length - 1, 1); } else { indi = myStr.substr(myStr.length - 2, 2); } ++posBata[indi]; if (posBata[indi] > totalBata) { posBata[indi] = 1; } actions['bata' + indi].gotoAndStop(posBata[indi]); cekRemain(); cekSoldier(indi); } function klikMove2() { actions.winfo = ''; bisaTombol(false); if (halamanMove == 1) { daftarNama = new Array('', 'Money', 'Foods', 'Irons', 'Logs', 'Swords', 'Arrows', 'Soldiers', 'Pearl', 'Coal', 'Oil', 'Horse', 'Spear', 'Catapult', 'Witch', 'Elephants', 'Fire Arrows', 'Steels', 'Super', 'Ice Ball', 'Fire Ball', 'Poison', 'Hurricane', 'Earthquake'); i = 1; while (i <= 7) { actions['nama' + i] = daftarNama[i]; if (daftarNama[i] == 'Money') { actions['owned' + i] = _root.moneyKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Foods') { actions['owned' + i] = _root.foodKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Irons') { actions['owned' + i] = _root.ironKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Logs') { actions['owned' + i] = _root.woodKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Swords') { actions['owned' + i] = _root.swordKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Arrows') { actions['owned' + i] = _root.xarrowKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Soldiers') { actions['owned' + i] = _root.soldierKota[_root.pilihKota]; } } } } } } } actions['max' + i].onRelease = klikMax3; actions['setengah' + i].onRelease = klikSetengah3; actions['seperempat' + i].onRelease = klikSeperempat3; ++i; } } else { if (halamanMove == 2) { daftarNama = new Array('', 'Money', 'Foods', 'Irons', 'Logs', 'Swords', 'Arrows', 'Soldiers', 'Pearl', 'Coal', 'Oil', 'Horse', 'Spear', 'Catapult', 'Witch', 'Elephants', 'Fire Arrows', 'Steels', 'Super', 'Ice Ball', 'Fire Ball', 'Poison', 'Hurricane', 'Earthquake'); i = 8; while (i <= 14) { actions['nama' + i] = daftarNama[i]; if (daftarNama[i] == 'Pearl') { actions['owned' + i] = _root.diamondKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Coal') { actions['owned' + i] = _root.coalKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Oil') { actions['owned' + i] = _root.oilKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Horse') { actions['owned' + i] = _root.horseKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Spear') { actions['owned' + i] = _root.spearKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Catapult') { actions['owned' + i] = _root.catapultKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Witch') { actions['owned' + i] = _root.witchKota[_root.pilihKota]; } } } } } } } actions['max' + i].onRelease = klikMax4; actions['setengah' + i].onRelease = klikSetengah4; actions['seperempat' + i].onRelease = klikSeperempat4; ++i; } } else { if (halamanMove == 3) { daftarNama = new Array('', 'Money', 'Foods', 'Irons', 'Logs', 'Swords', 'Arrows', 'Soldiers', 'Pearl', 'Coal', 'Oil', 'Horse', 'Spear', 'Catapult', 'Witch', 'Elephants', 'Fire Arrows', 'Steel', 'Super', 'Ice Ball', 'Fire Ball', 'Poison', 'Hurricane', 'Earthquake'); i = 15; while (i <= 21) { actions['nama' + i] = daftarNama[i]; if (daftarNama[i] == 'Elephants') { actions['owned' + i] = _root.elephantKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Fire Arrows') { actions['owned' + i] = _root.fireKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Steel') { actions['owned' + i] = _root.steelKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Super') { actions['owned' + i] = _root.xsuperKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Ice Ball') { actions['owned' + i] = _root.iceballKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Fire Ball') { actions['owned' + i] = _root.fireballKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Poison') { actions['owned' + i] = _root.poisonKota[_root.pilihKota]; } } } } } } } actions['max' + i].onRelease = klikMax5; actions['setengah' + i].onRelease = klikSetengah5; actions['seperempat' + i].onRelease = klikSeperempat5; ++i; } } else { if (halamanMove == 4) { daftarNama = new Array('', 'Money', 'Foods', 'Irons', 'Logs', 'Swords', 'Arrows', 'Soldiers', 'Pearl', 'Coal', 'Oil', 'Horse', 'Spear', 'Catapult', 'Witch', 'Elephants', 'Fire Arrows', 'Steel', 'Super', 'Ice Ball', 'Fire Ball', 'Poison', 'Hurricane', 'Earthquake'); i = 22; while (i <= 23) { actions['nama' + i] = daftarNama[i]; if (daftarNama[i] == 'Hurricane') { actions['owned' + i] = _root.hurricaneKota[_root.pilihKota]; } else { if (daftarNama[i] == 'Earthquake') { actions['owned' + i] = _root.earthquakeKota[_root.pilihKota]; } } actions['max' + i].onRelease = klikMax6; actions['setengah' + i].onRelease = klikSetengah6; actions['seperempat' + i].onRelease = klikSeperempat6; ++i; } } } } } actions.move_btn.onRelease = function () { bisaMove = true; i = 1; while (i <= 24) { if (actions['brought' + i] <= 0 || isNaN(actions['brought' + i])) { actions['brought' + i] = 0; } if (actions['brought' + i] > actions['owned' + i]) { bisaMove = false; } ++i; } if (bisaMove == true) { i = 1; while (i <= 24) { _root['bawaBarang' + i] = actions['brought' + i]; ++i; } i = 1; while (i <= 24) { if (i == 1) { moneyKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 2) { foodKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 3) { ironKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 4) { woodKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 5) { swordKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 6) { xarrowKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 7) { soldierKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 8) { diamondKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 9) { coalKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 10) { oilKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 11) { horseKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 12) { spearKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 13) { catapultKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 14) { witchKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 15) { elephantKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 16) { fireKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 17) { steelKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 18) { xsuperKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 19) { iceballKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 20) { fireballKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 21) { poisonKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 22) { hurricaneKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } else { if (i == 23) { earthquakeKota[xpilihKota] -= Number(_root['bawaBarang' + i]); } } } } } } } } } } } } } } } } } } } } } } } if (i == 1) { moneyKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 2) { foodKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 3) { ironKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 4) { woodKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 5) { swordKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 6) { xarrowKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 7) { soldierKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 8) { diamondKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 9) { coalKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 10) { oilKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 11) { horseKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 12) { spearKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 13) { catapultKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 14) { witchKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 15) { elephantKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 16) { fireKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 17) { steelKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 18) { xsuperKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 19) { iceballKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 20) { fireballKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 21) { poisonKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 22) { hurricaneKota[kotaDituju] += Number(_root['bawaBarang' + i]); } else { if (i == 23) { earthquakeKota[kotaDituju] += Number(_root['bawaBarang' + i]); } } } } } } } } } } } } } } } } } } } } } } } ++i; } workerKota[xpilihKota] += Number(_root.bawaBarang7); workerKota[kotaDituju] -= Number(_root.bawaBarang7); workerKota[xpilihKota] += Number(_root.bawaBarang11); workerKota[kotaDituju] -= Number(_root.bawaBarang11); workerKota[xpilihKota] += Number(_root.bawaBarang13); workerKota[kotaDituju] -= Number(_root.bawaBarang13); workerKota[xpilihKota] += Number(_root.bawaBarang14); workerKota[kotaDituju] -= Number(_root.bawaBarang14); workerKota[xpilihKota] += Number(_root.bawaBarang15); workerKota[kotaDituju] -= Number(_root.bawaBarang15); workerKota[xpilihKota] += Number(_root.bawaBarang18); workerKota[kotaDituju] -= Number(_root.bawaBarang18); bisaTombol2(true); removeMovieClip(dunia); bisaTombol(true); removeMovieClip(actions); xpause = false; } else { backSalah(); actions.winfo = 'Can\'t move, too many goods'; } }; actions.back_btn.onRelease = function () { bisaTombol2(true); removeMovieClip(dunia); bisaTombol(true); removeMovieClip(actions); xpause = false; }; } function cekIstana() { if (jenisKerajaan == 1) { posSatu = xpilihKota; } else { if (jenisKerajaan == 2) { posDua = xpilihKota; } } if (jenisMusuh == 1) { if (punyaWilayah[posSatu] != jenisMusuh) { i = 1; while (i <= 12) { if (punyaWilayah[i] == jenisMusuh) { posSatu = i; } ++i; } } } else { if (jenisMusuh == 2) { if (punyaWilayah[posDua] != jenisMusuh) { i = 1; while (i <= 12) { if (punyaWilayah[i] == jenisMusuh) { posDua = i; } ++i; } } } } adaMusuh = false; i = 1; while (i <= 12) { if (punyaWilayah[i] == jenisMusuh) { adaMusuh = true; } ++i; } if (adaMusuh == false) { if (jenisMusuh == 1) { posSatu = 99; } else { if (jenisMusuh == 2) { posDua = 99; } } } i = 1; while (i <= 12) { dunia['istana' + i].gotoAndStop(3); if (posSatu == i) { dunia['istana' + i].gotoAndStop(1); } else { if (posDua == i) { dunia['istana' + i].gotoAndStop(2); } } ++i; } } function klikMove(xindi) { bisaTombol2(false); dunia = attachMovie('dunia_mc', 'dunia_mc', dalamDunia); dunia._x = 340; dunia._y = 240; dunia.select = ''; dunia.empire1._visible = false; dunia.empire2._visible = false; dunia.select_mc._visible = true; dunia.select_mc.gotoAndStop(2); i = 1; while (i <= 12) { if (punyaWilayah[i] == 1) { dunia['daerah' + i].gotoAndStop(4); } else { if (punyaWilayah[i] == 2) { dunia['daerah' + i].gotoAndStop(3); } else { if (punyaWilayah[i] == 0) { dunia['daerah' + i].gotoAndStop(1); } } } ++i; } cekIstana(); dunia.select_mc.ok_btn.onRelease = function () { i = 1; while (i <= linkWilayah[pilihKota].length - 1) { if (punyaWilayah[linkWilayah[pilihKota][i]] == jenisKerajaan) { dunia['daerah' + linkWilayah[pilihKota][i]].gotoAndStop(2); dunia['daerah' + linkWilayah[pilihKota][i]].onRollOver = function () { this.gotoAndStop(5); }; dunia['daerah' + linkWilayah[pilihKota][i]].onRollOut = function () { this.gotoAndStop(2); }; dunia['daerah' + linkWilayah[pilihKota][i]].onRelease = function () { myStr = new String(this); if (myStr.length == 24) { indi = Number(myStr.substr(myStr.length - 1, 1)); } else { indi = Number(myStr.substr(myStr.length - 2, 2)); } kotaDituju = indi; if (xindi == 'diserang') { i = 1; while (i <= 24) { randKurang = random(3) + 2; if (i == 1) { moneyKota[kotaDituju] += Math.floor(moneyKota[pilihKota] / randKurang); } else { if (i == 2) { foodKota[kotaDituju] += Math.floor(foodKota[pilihKota] / randKurang); } else { if (i == 3) { ironKota[kotaDituju] += Math.floor(ironKota[pilihKota] / randKurang); } else { if (i == 4) { woodKota[kotaDituju] += Math.floor(woodKota[pilihKota] / randKurang); } else { if (i == 5) { swordKota[kotaDituju] += Math.floor(swordKota[pilihKota] / randKurang); } else { if (i == 6) { xarrowKota[kotaDituju] += Math.floor(xarrowKota[pilihKota] / randKurang); } else { if (i == 7) { soldierKota[kotaDituju] += Math.floor(soldierKota[pilihKota] / randKurang); } else { if (i == 8) { diamondKota[kotaDituju] += Math.floor(diamondKota[pilihKota] / randKurang); } else { if (i == 9) { coalKota[kotaDituju] += Math.floor(coalKota[pilihKota] / randKurang); } else { if (i == 10) { oilKota[kotaDituju] += Math.floor(oilKota[pilihKota] / randKurang); } else { if (i == 11) { horseKota[kotaDituju] += Math.floor(horseKota[pilihKota] / randKurang); } else { if (i == 12) { spearKota[kotaDituju] += Math.floor(spearKota[pilihKota] / randKurang); } else { if (i == 13) { catapultKota[kotaDituju] += Math.floor(catapultKota[pilihKota] / randKurang); } else { if (i == 14) { witchKota[kotaDituju] += Math.floor(witchKota[pilihKota] / randKurang); } else { if (i == 15) { elephantKota[kotaDituju] += Math.floor(witchKota[pilihKota] / randKurang); } else { if (i == 16) { fireKota[kotaDituju] += Math.floor(witchKota[pilihKota] / randKurang); } else { if (i == 17) { steelKota[kotaDituju] += Math.floor(witchKota[pilihKota] / randKurang); } else { if (i == 18) { xsuperKota[kotaDituju] += Math.floor(witchKota[pilihKota] / randKurang); } else { if (i == 19) { iceballKota[kotaDituju] += Math.floor(witchKota[pilihKota] / randKurang); } else { if (i == 20) { fireballKota[kotaDituju] += Math.floor(witchKota[pilihKota] / randKurang); } else { if (i == 21) { poisonKota[kotaDituju] += Math.floor(witchKota[pilihKota] / randKurang); } else { if (i == 22) { hurricaneKota[kotaDituju] += Math.floor(witchKota[pilihKota] / randKurang); } else { if (i == 23) { earthquakeKota[kotaDituju] += Math.floor(witchKota[pilihKota] / randKurang); } } } } } } } } } } } } } } } } } } } } } } } ++i; } sudahKalah = false; removeMovieClip(actions); removeMovieClip(dunia); resetWilayah(pilihKota, tipeMenyerang); masihPunya = false; i = 1; while (i <= 12) { if (punyaWilayah[i] == jenisKerajaan) { kotaSekarang = i; i = 13; masihPunya = true; } ++i; } if (masihPunya == true) { xpilihKota = kotaSekarang; cekPilihKota(xpilihKota); } else { cekGameOver(); } if (sudahKalah == false) { initSemua(); } } else { actions = attachMovie('actions_mc', 'actions_mc', dalamActions); actions.gotoAndStop(12); actions._x = 340; actions._y = 240; halamanMove = 1; actions.kiri_mc.onRelease = klikKeKiri; actions.kanan_mc.onRelease = klikKeKanan; i = 1; while (i <= 24) { actions['brought' + i] = 0; ++i; } klikMove2(); removeMovieClip(dunia); } }; } ++i; } dunia.select_mc._visible = false; }; dunia.close_btn.onRelease = function () { if (xindi == 'diserang') { cekDiserang(aindi); } else { bisaTombol2(true); removeMovieClip(dunia); bisaTombol(true); removeMovieClip(actions); xpause = false; } }; } function klikKeKiri() { if (actions._currentframe == 13) { halamanMove = 1; actions.gotoAndStop(12); klikMove2(); } else { if (actions._currentframe == 14) { halamanMove = 2; actions.gotoAndStop(13); klikMove2(); } else { if (actions._currentframe == 15) { halamanMove = 3; actions.gotoAndStop(14); klikMove2(); } } } } function klikKeKanan() { if (actions._currentframe == 12) { halamanMove = 2; actions.gotoAndStop(13); klikMove2(); } else { if (actions._currentframe == 13) { halamanMove = 3; actions.gotoAndStop(14); klikMove2(); } else { if (actions._currentframe == 14) { halamanMove = 4; actions.gotoAndStop(15); klikMove2(); } } } } function klikDetails() { i = 1; while (i <= 12) { dunia['daerah' + i].enabled = false; ++i; } myStr = new String(this); zindi = Number(myStr.substr(myStr.length - 1, 1)); actions = attachMovie('actions_mc', 'actions_mc', dalamActions2); actions.gotoAndStop(11); actions._x = 340; actions._y = 240; actions.empire = namaEmpire[zindi]; i = 1; while (i <= 24) { actions['owned' + i] = 0; ++i; } i = 1; while (i <= bykKota) { if (punyaWilayah[i] == zindi) { actions.owned1 += moneyKota[i]; actions.owned2 += foodKota[i]; actions.owned3 += ironKota[i]; actions.owned4 += woodKota[i]; actions.owned5 += swordKota[i]; actions.owned6 += xarrowKota[i]; actions.owned7 += soldierKota[i]; actions.owned8 += workerKota[i]; actions.owned9 += diamondKota[i]; actions.owned10 += coalKota[i]; actions.owned11 += oilKota[i]; actions.owned12 += spearKota[i]; actions.owned13 += horseKota[i]; actions.owned14 += catapultKota[i]; actions.owned15 += witchKota[i]; actions.owned16 += elephantKota[i]; actions.owned17 += fireKota[i]; actions.owned18 += steelKota[i]; actions.owned19 += xsuperKota[i]; actions.owned20 += iceballKota[i]; actions.owned21 += fireballKota[i]; actions.owned22 += poisonKota[i]; actions.owned23 += hurricaneKota[i]; actions.owned24 += earthquakeKota[i]; } ++i; } zcitizen = 0; i = 1; while (i <= bykKota) { j = 1; while (j <= bykArea) { k = 1; while (k <= bykProperti) { if (jenisBangunan[i][j][k] == 2) { if (punyaWilayah[i] == zindi) { zcitizen += 50 * upgradeProperti[i][j][k]; } } ++k; } ++j; } ++i; } actions.citizen = zcitizen; zcity = 0; i = 1; while (i <= bykKota) { if (punyaWilayah[i] == zindi) { ++zcity; } ++i; } actions.city = zcity; bykOrang = zcitizen + actions.owned8; if (bykOrang == 0) { bykOrang = 1; } actions.economy = Math.floor((actions.owned1 + actions.owned2 + actions.owned3 + actions.owned4 + actions.owned9 + actions.owned10 + actions.owned11 + actions.owned18) / bykOrang); actions.military = Math.floor((actions.owned5 + actions.owned6 + actions.owned7 + actions.owned12 + actions.owned13 + actions.owned14 + actions.owned15 + actions.owned16 + actions.owned17 + actions.owned19) / bykOrang); if (actions.economy <= 0) { actions.economy = 0; } if (actions.military <= 0) { actions.military = 0; } i = 1; while (i <= 24) { actions['stat' + i].onRollOver = overStat2; actions['stat' + i].onRollOut = outStat2; ++i; } actions.close_btn.onRelease = function () { i = 1; while (i <= 12) { dunia['daerah' + i].enabled = true; ++i; } removeMovieClip(actions); }; } function klikMap(wwindi) { stopDrag(); removeMovieClip(object); sedangDrag = false; tipeWar = 'serang'; xpause = true; bisaTombol(false); dunia = attachMovie('dunia_mc', 'dunia_mc', dalamDunia); dunia._x = 340; dunia._y = 240; dunia.select = 'Click to see the detail of:'; if (jenisKerajaan == 1) { dunia.empire1._visible = true; dunia.empire2._visible = false; } else { if (jenisKerajaan == 2) { dunia.empire1._visible = false; dunia.empire2._visible = true; } } dunia.empire1.onRelease = klikDetails; dunia.empire2.onRelease = klikDetails; dunia.select_mc._visible = false; cekIstana(); i = 1; while (i <= 12) { if (punyaWilayah[i] == 1) { dunia['daerah' + i].gotoAndStop(4); } else { if (punyaWilayah[i] == 2) { dunia['daerah' + i].gotoAndStop(3); } else { if (punyaWilayah[i] == 0) { dunia['daerah' + i].gotoAndStop(1); } } } if (punyaWilayah[i] == jenisKerajaan && wwindi != 'war') { dunia['daerah' + i].onRollOver = function () { if (sedangDrag == false) { _root.overMana = 6; _root.myStr = new String(this); if (_root.myStr.length == 24) { _root.windi = Number(_root.myStr.substr(_root.myStr.length - 1, 1)); } else { if (_root.myStr.length == 25) { _root.windi = Number(_root.myStr.substr(_root.myStr.length - 2, 2)); } } _root.pilihButton = _root.windi; _root.jenisSentuh = 'peta'; _root.sentuhMsgBox = true; } else { _root.sentuhMsgBox = false; } this.gotoAndStop(2); }; dunia['daerah' + i].onRollOut = function () { _root.sentuhMsgBox = false; myStr = new String(this); if (myStr.length == 24) { cekKota = Number(myStr.substr(myStr.length - 1, 1)); } else { if (myStr.length == 25) { cekKota = Number(myStr.substr(myStr.length - 2, 2)); } } if (punyaWilayah[cekKota] == 1) { this.gotoAndStop(4); } else { if (punyaWilayah[cekKota] == 2) { this.gotoAndStop(3); } } }; dunia['daerah' + i].onRelease = function () { myStr = new String(this); if (myStr.length == 24) { cekKota = Number(myStr.substr(myStr.length - 1, 1)); } else { if (myStr.length == 25) { cekKota = Number(myStr.substr(myStr.length - 2, 2)); } } clearSemua(); xpilihKota = cekKota; cekPilihKota(xpilihKota); initSemua(); }; } else { if (punyaWilayah[i] == jenisMusuh && wwindi != 'war') { dunia['daerah' + i].onRollOver = function () { if (sedangDrag == false) { _root.overMana = 7; _root.myStr = new String(this); if (_root.myStr.length == 24) { _root.windi = Number(_root.myStr.substr(_root.myStr.length - 1, 1)); } else { if (_root.myStr.length == 25) { _root.windi = Number(_root.myStr.substr(_root.myStr.length - 2, 2)); } } _root.pilihButton = _root.windi; _root.jenisSentuh = 'peta'; _root.sentuhMsgBox = true; } else { _root.sentuhMsgBox = false; } this.gotoAndStop(2); }; dunia['daerah' + i].onRollOut = function () { _root.sentuhMsgBox = false; myStr = new String(this); if (myStr.length == 24) { cekKota = Number(myStr.substr(myStr.length - 1, 1)); } else { if (myStr.length == 25) { cekKota = Number(myStr.substr(myStr.length - 2, 2)); } } if (punyaWilayah[cekKota] == 1) { this.gotoAndStop(4); } else { if (punyaWilayah[cekKota] == 2) { this.gotoAndStop(3); } } }; } } ++i; } dunia.close_btn.onRelease = function () { bisaTombol2(true); removeMovieClip(dunia); bisaTombol(true); removeMovieClip(actions); xpause = false; }; } function klikExport() { actions.gotoAndStop(3); daftarNama = new Array('', 'Foods', 'Irons', 'Logs', 'Pearls', 'Coals', 'Oils', 'Steels'); i = 1; while (i <= 7) { actions['nama' + i] = daftarNama[i]; if (daftarNama[i] == 'Foods') { actions['owned' + i] = _root.foodKota[_root.pilihKota]; actions['xprice' + i] = String(randomFood); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Irons') { actions['owned' + i] = _root.ironKota[_root.pilihKota]; actions['xprice' + i] = String(randomIron); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Logs') { actions['owned' + i] = _root.woodKota[_root.pilihKota]; actions['xprice' + i] = String(randomLog); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Pearls') { actions['owned' + i] = _root.diamondKota[_root.pilihKota]; actions['xprice' + i] = String(randomPearl); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Coals') { actions['owned' + i] = _root.coalKota[_root.pilihKota]; actions['xprice' + i] = String(randomCoal); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Oils') { actions['owned' + i] = _root.oilKota[_root.pilihKota]; actions['xprice' + i] = String(randomOil); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Steels') { actions['owned' + i] = _root.steelKota[_root.pilihKota]; actions['xprice' + i] = String(randomSteel); actions['price' + i] = '$' + actions['xprice' + i]; } } } } } } } actions['export' + i] = 0; actions['xexport' + i].onChanged = cekHarga; actions['max' + i].onRelease = function () { myStr = new String(this); indi = myStr.substr(myStr.length - 1, 1); actions['export' + indi] = actions['owned' + indi]; cekHarga(); }; actions['setengah' + i].onRelease = function () { myStr = new String(this); indi = myStr.substr(myStr.length - 1, 1); actions['export' + indi] = Math.floor(actions['owned' + indi] / 2); cekHarga(); }; actions['seperempat' + i].onRelease = function () { myStr = new String(this); indi = myStr.substr(myStr.length - 1, 1); actions['export' + indi] = Math.floor(actions['owned' + indi] / 4); cekHarga(); }; ++i; } actions.info = ''; actions.before = '$' + _root.moneyKota[_root.pilihKota]; actions.after = '$' + _root.moneyKota[_root.pilihKota]; actions.xafter = _root.moneyKota[_root.pilihKota]; actions.export_btn.onRelease = function () { bisaEksport = true; i = 1; while (i <= 7) { if (daftarNama[i] == 'Foods') { if (Number(actions['export' + i]) > Number(_root.foodKota[_root.pilihKota])) { if (Number(_root.foodKota[_root.pilihKota]) >= 0) { bisaEksport = false; } } } if (daftarNama[i] == 'Irons') { if (Number(actions['export' + i]) > Number(_root.ironKota[_root.pilihKota])) { if (Number(_root.ironKota[_root.pilihKota]) >= 0) { bisaEksport = false; } } } if (daftarNama[i] == 'Logs') { if (Number(actions['export' + i]) > Number(_root.woodKota[_root.pilihKota])) { if (Number(_root.woodKota[_root.pilihKota]) >= 0) { bisaEksport = false; } } } if (daftarNama[i] == 'Pearls') { if (Number(actions['export' + i]) > Number(_root.diamondKota[_root.pilihKota])) { if (Number(_root.diamondKota[_root.pilihKota]) >= 0) { bisaEksport = false; } } } if (daftarNama[i] == 'Coals') { if (Number(actions['export' + i]) > Number(_root.coalKota[_root.pilihKota])) { if (Number(_root.coalKota[_root.pilihKota]) >= 0) { bisaEksport = false; } } } if (daftarNama[i] == 'Oils') { if (Number(actions['export' + i]) > Number(_root.oilKota[_root.pilihKota])) { if (Number(_root.oilKota[_root.pilihKota]) >= 0) { bisaEksport = false; } } } if (daftarNama[i] == 'Steels') { if (Number(actions['export' + i]) > Number(_root.steelKota[_root.pilihKota])) { if (Number(_root.steelKota[_root.pilihKota]) >= 0) { bisaEksport = false; } } } ++i; } if (bisaEksport == true) { awalSemua(); i = 1; while (i <= 7) { actions['nama' + i] = daftarNama[i]; if (actions['export' + i] <= 0 || actions['export' + i] == '' || actions['export' + i] == ' ' || actions['export' + i] == ' ' || actions['export' + i] == ' ' || actions['export' + i] == ' ' || actions['export' + i] == undefined || isNaN(actions['export' + i])) { actions['export' + i] = 0; } if (daftarNama[i] == 'Foods') { _root.foodKota[_root.pilihKota] -= Number(actions['export' + i]); } else { if (daftarNama[i] == 'Irons') { _root.ironKota[_root.pilihKota] -= Number(actions['export' + i]); } else { if (daftarNama[i] == 'Logs') { _root.woodKota[_root.pilihKota] -= Number(actions['export' + i]); } else { if (daftarNama[i] == 'Pearls') { _root.diamondKota[_root.pilihKota] -= Number(actions['export' + i]); } else { if (daftarNama[i] == 'Coals') { _root.coalKota[_root.pilihKota] -= Number(actions['export' + i]); } else { if (daftarNama[i] == 'Oils') { _root.oilKota[_root.pilihKota] -= Number(actions['export' + i]); } else { if (daftarNama[i] == 'Steels') { _root.steelKota[_root.pilihKota] -= Number(actions['export' + i]); } } } } } } } ++i; } _root.moneyKota[_root.pilihKota] = Number(actions.xafter); bisaTombol(true); removeMovieClip(actions); xpause = false; akhirSemua(); } else { backSalah(); actions.info = 'Can\'t Export, amount of export more than your supplies'; } }; actions.close_btn.onRelease = function () { klikActions(); }; } function cekHarga() { actions.hargaJual = 0; i = 1; while (i <= 7) { if (actions['export' + i] <= 0 || actions['export' + i] == '' || actions['export' + i] == ' ' || actions['export' + i] == ' ' || actions['export' + i] == ' ' || actions['export' + i] == ' ' || actions['export' + i] == undefined || isNaN(actions['export' + i])) { actions.hargaJual += 0; } else { myStr = new String(actions['export' + i]); h = 0; while (h <= myStr.length) { if (myStr.substr(h, 1) == '0') { actions['export' + i] = myStr.substr(h + 1, myStr.length); } else { h = myStr.length; } ++h; } actions.hargaJual += Number(actions['xprice' + i]) * Number(actions['export' + i]); } ++i; } actions.xafter = String(Number(actions.hargaJual) + Number(_root.moneyKota[_root.pilihKota])); actions.after = '$' + actions.xafter; } function klikImport() { actions.gotoAndStop(4); daftarNama = new Array('', 'Foods', 'Irons', 'Logs', 'Pearls', 'Coals', 'Oils', 'Steels'); i = 1; while (i <= 7) { actions['nama' + i] = daftarNama[i]; if (daftarNama[i] == 'Foods') { actions['owned' + i] = _root.foodKota[_root.pilihKota]; actions['xprice' + i] = String(randomFood * 2); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Irons') { actions['owned' + i] = _root.ironKota[_root.pilihKota]; actions['xprice' + i] = String(randomIron * 2); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Logs') { actions['owned' + i] = _root.woodKota[_root.pilihKota]; actions['xprice' + i] = String(randomLog * 2); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Pearls') { actions['owned' + i] = _root.diamondKota[_root.pilihKota]; actions['xprice' + i] = String(randomPearl * 3); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Coals') { actions['owned' + i] = _root.coalKota[_root.pilihKota]; actions['xprice' + i] = String(randomCoal * 3); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Oils') { actions['owned' + i] = _root.oilKota[_root.pilihKota]; actions['xprice' + i] = String(randomOil * 3); actions['price' + i] = '$' + actions['xprice' + i]; } else { if (daftarNama[i] == 'Steels') { actions['owned' + i] = _root.steelKota[_root.pilihKota]; actions['xprice' + i] = String(randomSteel * 3); actions['price' + i] = '$' + actions['xprice' + i]; } } } } } } } actions['import' + i] = 0; actions['ximport' + i].onChanged = cekHarga2; actions['max' + i].onRelease = function () { myStr = new String(this); indi = Number(myStr.substr(myStr.length - 1, 1)); actions['import' + indi] = Math.floor(Number(_root.moneyKota[_root.pilihKota]) / Number(actions['xprice' + indi])); cekHarga2(); }; actions['setengah' + i].onRelease = function () { myStr = new String(this); indi = myStr.substr(myStr.length - 1, 1); actions['import' + indi] = Math.floor(Number(_root.moneyKota[_root.pilihKota]) / Number(actions['xprice' + indi] * 2)); cekHarga2(); }; actions['seperempat' + i].onRelease = function () { myStr = new String(this); indi = myStr.substr(myStr.length - 1, 1); actions['import' + indi] = Math.floor(Number(_root.moneyKota[_root.pilihKota]) / Number(actions['xprice' + indi] * 4)); cekHarga2(); }; ++i; } actions.info = ''; actions.before = '$' + _root.moneyKota[_root.pilihKota]; actions.after = '$' + _root.moneyKota[_root.pilihKota]; actions.xafter = _root.moneyKota[_root.pilihKota]; actions.import_btn.onRelease = function () { bisaImport = true; if (actions.xafter < 0) { bisaImport = false; } if (bisaImport == true) { awalSemua(); i = 1; while (i <= 7) { actions['nama' + i] = daftarNama[i]; if (actions['import' + i] <= 0 || actions['import' + i] == '' || actions['import' + i] == ' ' || actions['import' + i] == ' ' || actions['import' + i] == ' ' || actions['import' + i] == ' ' || actions['import' + i] == undefined || isNaN(actions['import' + i])) { actions['import' + i] = 0; } if (daftarNama[i] == 'Foods') { _root.foodKota[_root.pilihKota] += Number(actions['import' + i]); } else { if (daftarNama[i] == 'Irons') { _root.ironKota[_root.pilihKota] += Number(actions['import' + i]); } else { if (daftarNama[i] == 'Logs') { _root.woodKota[_root.pilihKota] += Number(actions['import' + i]); } else { if (daftarNama[i] == 'Pearls') { _root.diamondKota[_root.pilihKota] += Number(actions['import' + i]); } else { if (daftarNama[i] == 'Coals') { _root.coalKota[_root.pilihKota] += Number(actions['import' + i]); } else { if (daftarNama[i] == 'Oils') { _root.oilKota[_root.pilihKota] += Number(actions['import' + i]); } else { if (daftarNama[i] == 'Steels') { _root.steelKota[_root.pilihKota] += Number(actions['import' + i]); } } } } } } } ++i; } _root.moneyKota[_root.pilihKota] = Number(actions.xafter); bisaTombol(true); removeMovieClip(actions); xpause = false; akhirSemua(); } else { backSalah(); actions.info = 'Can\'t Import, you have not enough money'; } }; actions.close_btn.onRelease = function () { klikActions(); }; } function cekHarga2() { actions.hargaJual = 0; i = 1; while (i <= 7) { if (actions['import' + i] <= 0 || actions['import' + i] == '' || actions['import' + i] == ' ' || actions['import' + i] == ' ' || actions['import' + i] == ' ' || actions['import' + i] == ' ' || actions['import' + i] == undefined || isNaN(actions['import' + i])) { actions.hargaJual += 0; } else { myStr = new String(actions['import' + i]); h = 0; while (h <= myStr.length) { if (myStr.substr(h, 1) == '0') { actions['import' + i] = myStr.substr(h + 1, myStr.length); } else { h = myStr.length; } ++h; } actions.hargaJual += Number(actions['xprice' + i]) * Number(actions['import' + i]); } ++i; } actions.xafter = String(Number(_root.moneyKota[_root.pilihKota]) - Number(actions.hargaJual)); actions.after = '$' + actions.xafter; } function overButton() { if (sedangDrag == false) { overMana = 1; myStr = new String(this); if (myStr.length == 22) { windi = Number(myStr.substr(myStr.length - 1, 1)); } else { windi = Number(myStr.substr(myStr.length - 2, 2)); } pilihButton = windi; jenisSentuh = 'button'; sentuhMsgBox = true; } else { sentuhMsgBox = false; } } function outButton() { sentuhMsgBox = false; } function overButton2() { if (sedangDrag == false) { overMana = 2; windi = xbangunan; pilihButton = windi; jenisSentuh = 'button'; sentuhMsgBox = true; } else { sentuhMsgBox = false; } } function outButton3() { sentuhMsgBox = false; } function overButton3() { if (sedangDrag == false) { overMana = 3; myStr = new String(this); if (myStr.length == 22) { pilihArea = Number(myStr.substr(myStr.length - 1, 1)); } else { pilihArea = Number(myStr.substr(myStr.length - 2, 2)); } lihatMana = upgradeProperti[pilihKota][pilihMap][pilihArea]; pilihButton = this._currentframe - 1; jenisSentuh = 'button'; sentuhMsgBox = true; } else { sentuhMsgBox = false; } } function outButton2() { sentuhMsgBox = false; } function klikButton() { sentuhMsgBox = false; outButton(); myStr = new String(this); if (myStr.length == 22) { xbangunan = Number(myStr.substr(myStr.length - 1, 1)); } else { xbangunan = Number(myStr.substr(myStr.length - 2, 2)); } if (sedangDrag == false) { pilihBangun = xbangunan + 1; if (pilihBangun == 2) { object = attachMovie('houses_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 3) { object = attachMovie('farm_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 4) { object = attachMovie('market_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 5) { object = attachMovie('log_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 6) { object = attachMovie('tambang_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 7) { object = attachMovie('pedang_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 8) { object = attachMovie('panah_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 9) { object = attachMovie('barak_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 10) { object = attachMovie('fish_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 11) { object = attachMovie('gold_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 12) { object = attachMovie('tombak_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 13) { object = attachMovie('pearl_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 14) { object = attachMovie('horse_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 15) { object = attachMovie('cow_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 16) { object = attachMovie('shrimp_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 17) { object = attachMovie('elephant_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 18) { object = attachMovie('coal_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 19) { object = attachMovie('oil_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 20) { object = attachMovie('catapult_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 21) { object = attachMovie('witch_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 22) { object = attachMovie('steel_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 23) { object = attachMovie('fire_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 24) { object = attachMovie('jewel_mc', 'object_mc', dalamDrag); } else { if (pilihBangun == 25) { object = attachMovie('super_mc', 'object_mc', dalamDrag); } } } } } } } } } } } } } } } } } } } } } } } } object._x = -500; object._y = -500; sedangDrag = true; object._yscale = 50; object._xscale = 50; startDrag(object, true); } else { stopDrag(); removeMovieClip(object); sedangDrag = false; } } function cekArea(indi, indi2) { i = 1; while (i <= bykArea) { indi['area' + i].gotoAndStop(jenisBangunan[pilihKota][pilihMap][i]); indi['area' + i].xupgrade.gotoAndStop(upgradeProperti[pilihKota][pilihMap][i]); j = 1; while (j <= 4) { map['map' + j].xpeta_mc['area' + i].gotoAndStop(jenisBangunan[pilihKota][j][i]); map['map' + j].xpeta_mc['area' + i].xupgrade.gotoAndStop(upgradeProperti[pilihKota][j][i]); ++j; } indi['area' + i].onPress = klikArea; indi['area' + i].onRollOver = overButton3; indi['area' + i].onRollOut = outButton3; ++i; } } function cekArea2() { i = 1; while (i <= bykArea) { j = 1; while (j <= 4) { map['map' + j].xpeta_mc['area' + i].gotoAndStop(jenisBangunan[pilihKota][j][i]); map['map' + j].xpeta_mc['area' + i].xupgrade.gotoAndStop(upgradeProperti[pilihKota][j][i]); ++j; } ++i; } } function bisaTombol(indi) { ai = 1; while (ai <= bykArea) { peta['area' + ai].enabled = indi; ++ai; } ai = 1; while (ai <= bykBangunan) { map['button' + ai].enabled = indi; map['stat' + ai].enabled = indi; ++ai; } ai = 1; while (ai <= bykArea) { map['map' + ai].enabled = indi; ++ai; } map.map_btn.enabled = indi; map.actions_btn.enabled = indi; map.options_btn.enabled = indi; } function bisaTombol2(indi) { actions.war_btn.enabled = indi; actions.export_btn.enabled = indi; actions.import_btn.enabled = indi; actions.close_btn.enabled = indi; actions.map_btn.enabled = indi; } function klikArea() { sentuhMsgBox = false; myStr = new String(this); if (myStr.length == 22) { pilihArea = Number(myStr.substr(myStr.length - 1, 1)); } else { pilihArea = Number(myStr.substr(myStr.length - 2, 2)); } if (sedangDrag == false) { if (this._currentframe == 2) { bisaTombol(false); xpause = true; semua = attachMovie('houses', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.persons = 50 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 25 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] -= 50 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 100 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 3) { bisaTombol(false); xpause = true; semua = attachMovie('farm', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 200 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 75 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 4) { bisaTombol(false); xpause = true; semua = attachMovie('market', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = '$' + String(100 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.foods = 50 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 20 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 125 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 5) { bisaTombol(false); xpause = true; semua = attachMovie('carpenter', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 20 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(10 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 125 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 6) { bisaTombol(false); xpause = true; semua = attachMovie('mine', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 25 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(20 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 125 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 7) { bisaTombol(false); xpause = true; semua = attachMovie('sword', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 1 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(15 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.logs = 2 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.iron = 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 125 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 8) { bisaTombol(false); xpause = true; semua = attachMovie('arrow', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 1 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(15 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.logs = 4 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.iron = 2 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 125 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 9) { bisaTombol(false); xpause = true; semua = attachMovie('barracks', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 2 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(30 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 125 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 10) { bisaTombol(false); xpause = true; semua = attachMovie('fish', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 250 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 100 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 11) { bisaTombol(false); xpause = true; semua = attachMovie('gold', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 200 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(15 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 250 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 12) { bisaTombol(false); xpause = true; semua = attachMovie('spear', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 1 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(15 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.iron = 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 200 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 13) { bisaTombol(false); xpause = true; semua = attachMovie('pearl', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 4 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 300 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 14) { bisaTombol(false); xpause = true; semua = attachMovie('horse', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 2 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 30 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(20 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 250 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 15) { bisaTombol(false); xpause = true; semua = attachMovie('cow', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 300 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 150 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 16) { bisaTombol(false); xpause = true; semua = attachMovie('shrimp', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 300 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 200 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 17) { bisaTombol(false); xpause = true; semua = attachMovie('elephant', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 1 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 40 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(30 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 15 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 300 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 18) { bisaTombol(false); xpause = true; semua = attachMovie('coal', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 3 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 15 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(20 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 250 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 19) { bisaTombol(false); xpause = true; semua = attachMovie('oil', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 100 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 25 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(40 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 15 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 400 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 20) { bisaTombol(false); xpause = true; semua = attachMovie('catapult', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 1 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 25 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(50 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.logs = 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.iron = 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.coal = 30 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 25 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 450 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 21) { bisaTombol(false); xpause = true; semua = attachMovie('witch', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 2 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 50 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(75 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 250 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; semua.spell.gotoAndStop(spellBuat[pilihKota][pilihMap][pilihArea]); semua.spell.kanan_mc.onRelease = function () { if (semua.spell._currentframe < 5) { ++spellBuat[pilihKota][pilihMap][pilihArea]; semua.spell.gotoAndStop(spellBuat[pilihKota][pilihMap][pilihArea]); } }; semua.spell.kiri_mc.onRelease = function () { if (semua.spell._currentframe > 1) { --spellBuat[pilihKota][pilihMap][pilihArea]; semua.spell.gotoAndStop(spellBuat[pilihKota][pilihMap][pilihArea]); } }; } else { if (this._currentframe == 22) { bisaTombol(false); xpause = true; semua = attachMovie('steel', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 30 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(45 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 250 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 23) { bisaTombol(false); xpause = true; semua = attachMovie('fire', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 1 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 10 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(25 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.logs = 4 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.iron = 2 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.oil = 200 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 125 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 24) { bisaTombol(false); xpause = true; semua = attachMovie('jewel', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 2000 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.pearl = 20 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 5 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 250 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } else { if (this._currentframe == 25) { bisaTombol(false); xpause = true; semua = attachMovie('super', 'semua', dalamSemua); semua.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.produce = 1 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.foods = 30 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.money = '$' + String(60 * upgradeProperti[pilihKota][pilihMap][pilihArea]); semua.steel = 25 * upgradeProperti[pilihKota][pilihMap][pilihArea]; semua.close_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; }; semua.sell_btn.onRelease = function () { bisaTombol(true); removeMovieClip(semua); xpause = false; awalSemua(); workerKota[pilihKota] += 30 * upgradeProperti[pilihKota][pilihMap][pilihArea]; moneyKota[pilihKota] += 500 * upgradeProperti[pilihKota][pilihMap][pilihArea]; akhirSemua(); jenisBangunan[pilihKota][pilihMap][pilihArea] = 1; peta['area' + pilihArea].gotoAndStop(1); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(1); upgradeProperti[pilihKota][pilihMap][pilihArea] = 1; }; } } } } } } } } } } } } } } } } } } } } } } } } xbangunan = this._currentframe - 1; pilihBangun = this._currentframe; if (upgradeProperti[pilihKota][pilihMap][pilihArea] > 1) { semua.upgrade_btn._visible = false; } else { semua.upgrade_btn._visible = true; } semua.upgrade_btn.onRollOver = overButton2; semua.upgrade_btn.onRollOut = outButton2; semua.upgrade_btn.onRelease = function () { sentuhMsgBox = false; z = 1; while (z <= 5) { _root['tambahan' + z] = ''; ++z; } bisaMoney = true; bisaFood = true; bisaIron = true; bisaWood = true; bisaWorker = true; bisaBangun = true; if (kebutuhanMoney[xbangunan] > moneyKota[pilihKota]) { bisaMoney = false; tambahan1 = 'Money '; } if (kebutuhanFood[xbangunan] > foodKota[pilihKota]) { bisaFood = false; tambahan2 = 'Food '; } if (kebutuhanIron[xbangunan] > ironKota[pilihKota]) { bisaIron = false; tambahan3 = 'Iron '; } if (kebutuhanWood[xbangunan] > woodKota[pilihKota]) { bisaWood = false; tambahan4 = 'Log '; } if (kebutuhanWorker[xbangunan] > workerKota[pilihKota]) { if (pilihBangun == 2) { } else { bisaWorker = false; tambahan5 = 'Worker '; } } if (bisaMoney == false || bisaFood == false || bisaIron == false || bisaWood == false || bisaWorker == false) { bisaBangun = false; } if (bisaBangun == true) { backBangun(); ++upgradeProperti[pilihKota][pilihMap][pilihArea]; jenisBangunan[pilihKota][pilihMap][pilihArea] = pilihBangun; peta['area' + pilihArea].gotoAndStop(pilihBangun); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(pilihBangun); peta['area' + pilihArea].xupgrade.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); map['map' + pilihMap].xpeta_mc['area' + pilihArea].xupgrade.gotoAndStop(upgradeProperti[pilihKota][pilihMap][pilihArea]); awalSemua(); moneyKota[pilihKota] -= Number(kebutuhanMoney[xbangunan]); foodKota[pilihKota] -= Number(kebutuhanFood[xbangunan]); ironKota[pilihKota] -= Number(kebutuhanIron[xbangunan]); woodKota[pilihKota] -= Number(kebutuhanWood[xbangunan]); workerKota[pilihKota] -= Number(kebutuhanWorker[xbangunan]); akhirSemua(); bisaTombol(true); removeMovieClip(semua); xpause = false; cekAnim(); } else { tambahanKata = ''; adaKurang = 0; tambahI = 1; i = 1; while (i <= 5) { if (_root['tambahan' + i] != '') { tambahanKata += String(tambahI + '. ' + _root['tambahan' + i]); ++adaKurang; ++tambahI; } ++i; } if (adaKurang == 1) { i = 1; while (i <= 5) { if (_root['tambahan' + i] != '') { tambahanKata = _root['tambahan' + i]; } ++i; } } backSalah(); cekInfo2(750, 'Can\'t upgrade, not enough: ' + tambahanKata); pilihBangun = 1; } }; } else { if (this._currentframe == 1) { z = 1; while (z <= 5) { _root['tambahan' + z] = ''; ++z; } bisaMoney = true; bisaFood = true; bisaIron = true; bisaWood = true; bisaWorker = true; bisaBangun = true; if (kebutuhanMoney[xbangunan] > moneyKota[pilihKota]) { bisaMoney = false; tambahan1 = 'Money '; } if (kebutuhanFood[xbangunan] > foodKota[pilihKota]) { bisaFood = false; tambahan2 = 'Food '; } if (kebutuhanIron[xbangunan] > ironKota[pilihKota]) { bisaIron = false; tambahan3 = 'Iron '; } if (kebutuhanWood[xbangunan] > woodKota[pilihKota]) { bisaWood = false; tambahan4 = 'Log '; } if (kebutuhanWorker[xbangunan] > workerKota[pilihKota]) { if (pilihBangun == 2) { } else { bisaWorker = false; tambahan5 = 'Worker '; } } if (bisaMoney == false || bisaFood == false || bisaIron == false || bisaWood == false || bisaWorker == false) { bisaBangun = false; } if (bisaBangun == true) { if (bisaSungai[pilihKota][pilihMap][pilihArea] == 0 && pilihBangun == 3) { backSalah(); cekInfo(750, 'Can\'t build, Farm must be near the water'); } else { if (bisaSungai[pilihKota][pilihMap][pilihArea] == 0 && pilihBangun == 13) { backSalah(); cekInfo(750, 'Can\'t build, Pearl Pond must be near the water'); } else { if (bisaSungai[pilihKota][pilihMap][pilihArea] == 0 && pilihBangun == 16) { backSalah(); cekInfo(750, 'Can\'t build, Shrimp Pond must be near the water'); } else { if (bisaHutan[pilihKota][pilihMap][pilihArea] == 0 && pilihBangun == 18) { backSalah(); cekInfo(750, 'Can\'t build, Coal Mine must be near the forest'); } else { if (bisaSungai[pilihKota][pilihMap][pilihArea] == 0 && pilihBangun == 10) { backSalah(); cekInfo(750, 'Can\'t build, Fish Pond must be near the water'); } else { if (bisaHutan[pilihKota][pilihMap][pilihArea] == 0 && pilihBangun == 5) { backSalah(); cekInfo(750, 'Can\'t build, Carpenter House must be near the forest'); } else { if (bisaGunung[pilihKota][pilihMap][pilihArea] == 0 && pilihBangun == 6) { backSalah(); cekInfo(750, 'Can\'t build, Iron Mine must be near the mount'); } else { if (bisaGunung[pilihKota][pilihMap][pilihArea] == 0 && pilihBangun == 11) { backSalah(); cekInfo(750, 'Can\'t build, Gold Mine must be near the mount'); } else { if (bisaGunung[pilihKota][pilihMap][pilihArea] == 0 && pilihBangun == 22) { backSalah(); cekInfo(750, 'Can\'t build, Steel Mine must be near the mount'); } else { backBangun(); if (pilihBangun == 14) { waktuBuat[pilihKota][pilihMap][pilihArea] = 0; } else { if (pilihBangun == 17) { waktuBuat[pilihKota][pilihMap][pilihArea] = 0; } else { if (pilihBangun == 20) { waktuBuat[pilihKota][pilihMap][pilihArea] = 0; } else { if (pilihBangun == 21) { waktuBuat[pilihKota][pilihMap][pilihArea] = 0; } else { if (pilihBangun == 25) { waktuBuat[pilihKota][pilihMap][pilihArea] = 0; } } } } } jenisBangunan[pilihKota][pilihMap][pilihArea] = pilihBangun; this.gotoAndStop(pilihBangun); map['map' + pilihMap].xpeta_mc['area' + pilihArea].gotoAndStop(pilihBangun); awalSemua(); moneyKota[pilihKota] -= Number(kebutuhanMoney[xbangunan]); foodKota[pilihKota] -= Number(kebutuhanFood[xbangunan]); ironKota[pilihKota] -= Number(kebutuhanIron[xbangunan]); woodKota[pilihKota] -= Number(kebutuhanWood[xbangunan]); workerKota[pilihKota] -= Number(kebutuhanWorker[xbangunan]); akhirSemua(); cekAnim(); } } } } } } } } } } else { tambahanKata = ''; adaKurang = 0; tambahI = 1; i = 1; while (i <= 5) { if (_root['tambahan' + i] != '') { tambahanKata += String(tambahI + '. ' + _root['tambahan' + i]); ++adaKurang; ++tambahI; } ++i; } if (adaKurang == 1) { i = 1; while (i <= 5) { if (_root['tambahan' + i] != '') { tambahanKata = _root['tambahan' + i]; } ++i; } } backSalah(); cekInfo(750, 'Can\'t build, not enough: ' + tambahanKata); pilihBangun = 1; } stopDrag(); removeMovieClip(object); sedangDrag = false; } } } function clearSemua() { clearInterval(dayDelay); i = 0; while (i <= panjang) { j = 0; while (j <= lebar) { ubahDalam('j', 'i', 'dalam'); namaBaru = 'rumput_mc' + dalam; removeMovieClip(_root[namaBaru]); ++j; } ++i; } removeMovieClip(xpeta_mc); removeMovieClip(msgBox_mc); removeMovieClip(info_mc); removeMovieClip(info_mc2); removeMovieClip(map_mc); removeMovieClip(actions_mc); removeMovieClip(dunia_mc); removeMovieClip(object_mc); removeMovieClip(semua); removeMovieClip(options_mc); removeMovieClip(tutor); } function ubahDalam(j, i, dalam) { if (_root[j] < 10 && _root[i] < 10) { _root[dalam] = '0' + String(_root[j]) + '0' + String(_root[i]); } else { if (_root[j] < 10 && _root[i] >= 10) { _root[dalam] = '0' + String(_root[j]) + String(_root[i]); } else { if (_root[j] >= 10 && _root[i] < 10) { _root[dalam] = String(_root[j]) + '0' + String(_root[i]); } else { _root[dalam] = String(_root[j]) + String(_root[i]); } } } } stop(); if (sudahTutor == false) { petamaKali = false; } if (_root.speedGame == 1) { _root.delayHari = 9000; } else { if (_root.speedGame == 2) { _root.delayHari = 4000; } else { if (_root.speedGame == 3) { _root.delayHari = 2000; } else { if (_root.speedGame == 4) { _root.delayHari = 1000; } else { if (_root.speedGame == 5) { _root.delayHari = 500; } } } } } clearSemua2(); backMusic(); sudahKalah = false; if (petamaKali == false) { petamaKali = true; } else { if (tipeWar == 'serang') { if (perangMenang == true) { xpilihKota = kotaDiserang; cekPilihKota(xpilihKota); punyaWilayah[kotaDiserang] = jenisKerajaan; i = 1; while (i <= 4) { if (i == 1) { moneyKota[xpilihKota] += Number(_root['bawaBarang' + i]); } else { if (i == 2) { foodKota[xpilihKota] += Number(_root['bawaBarang' + i]); } else { if (i == 3) { ironKota[xpilihKota] += Number(_root['bawaBarang' + i]); } else { if (i == 4) { woodKota[xpilihKota] += Number(_root['bawaBarang' + i]); } } } } ++i; } } } else { if (tipeWar == 'bertahan') { xpilihKota = xkotaDiserang; if (perangMenang == false) { resetWilayah(xkotaDiserang, tipeMenyerang); masihPunya = false; i = 1; while (i <= 12) { if (punyaWilayah[i] == jenisKerajaan) { kotaSekarang = i; i = 13; masihPunya = true; } ++i; } if (masihPunya == true) { xpilihKota = kotaSekarang; cekPilihKota(xpilihKota); } else { cekGameOver(); } } } } bykWill = 0; i = 1; while (i <= bykKota) { if (punyaWilayah[i] == jenisKerajaan) { ++bykWill; } ++i; } if (bykWill >= 12) { cekVictory(); } } if (sudahKalah == false) { initSemua(); } if (sudahTutor == false) { sudahTutor = true; buatTutor(); } _root.onEnterFrame = function () { if (xpause == false) { xcekInfo(); } }; } frame 130 { function init2() { dalamBawah = 1000; dalamSoldier = 3000; dalamSoldier2 = 4000; dalamDarah = 5000; dalamDarah2 = 10; dalamKecil = 9000; dalamAnakPanah = 8000; dalamEnd = 50000; sedangDrag = false; zpause = false; indi1 = 1; indi2 = 1; xjml = 10; jmlJagoan = 0; jmlMusuh = 0; } function buatMusuh() { jenisPasukan2 = new Array(); angka = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20); zi = 1; while (zi <= xjml) { acak = random(angka.length); acak2 = angka[acak]; angka[acak] = null; angka.sort(); angka.pop(); zcity = 0; i = 1; while (i <= bykKota) { if (punyaWilayah[i] == jenisKerajaan) { ++zcity; } ++i; } wcity = 0; if (tingkatSulit == 1) { if (day <= 200) { wcity = 1; } else { if (day <= 450) { wcity = 2; } else { if (day <= 700) { wcity = 3; } else { if (day <= 950) { wcity = 4; } else { if (day <= 1200) { wcity = 5; } else { if (day <= 1450) { wcity = 6; } else { wcity = 7; } } } } } } if (zcity > wcity) { vcity = zcity; } else { vcity = wcity; } if (vcity == 1) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 2) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 3) { jenisPasukan2[zi] = random(3) + 1; } if (vcity == 4) { jenisPasukan2[zi] = random(3) + 1; } if (vcity == 5) { jenisPasukan2[zi] = random(4) + 1; } if (vcity == 6) { jenisPasukan2[zi] = random(4) + 1; } if (vcity >= 7) { jenisPasukan2[zi] = random(5) + 1; } } else { if (tingkatSulit == 2) { if (day <= 200) { wcity = 1; } else { if (day <= 400) { wcity = 2; } else { if (day <= 600) { wcity = 3; } else { if (day <= 800) { wcity = 4; } else { if (day <= 1000) { wcity = 5; } else { if (day <= 1200) { wcity = 6; } else { wcity = 7; } } } } } } if (zcity > wcity) { vcity = zcity; } else { vcity = wcity; } if (vcity == 1) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 2) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 3) { jenisPasukan2[zi] = random(3) + 1; } if (vcity == 4) { jenisPasukan2[zi] = random(4) + 1; } if (vcity == 5) { jenisPasukan2[zi] = random(5) + 1; } if (vcity == 6) { jenisPasukan2[zi] = random(6) + 1; } if (vcity >= 7) { jenisPasukan2[zi] = random(6) + 1; } } else { if (tingkatSulit == 3) { if (day <= 100) { wcity = 1; } else { if (day <= 300) { wcity = 2; } else { if (day <= 500) { wcity = 3; } else { if (day <= 700) { wcity = 4; } else { if (day <= 900) { wcity = 5; } else { if (day <= 1100) { wcity = 6; } else { wcity = 7; } } } } } } if (zcity > wcity) { vcity = zcity; } else { vcity = wcity; } if (vcity == 1) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 2) { jenisPasukan2[zi] = random(2) + 2; } if (vcity == 3) { jenisPasukan2[zi] = random(3) + 2; } if (vcity == 4) { jenisPasukan2[zi] = random(3) + 3; } if (vcity == 5) { jenisPasukan2[zi] = random(4) + 3; } if (vcity == 6) { jenisPasukan2[zi] = random(4) + 4; } if (vcity >= 7) { jenisPasukan2[zi] = random(5) + 4; } } else { if (tingkatSulit == 4) { if (day <= 100) { wcity = 1; } else { if (day <= 250) { wcity = 2; } else { if (day <= 400) { wcity = 3; } else { if (day <= 550) { wcity = 4; } else { if (day <= 700) { wcity = 5; } else { if (day <= 850) { wcity = 6; } else { wcity = 7; } } } } } } if (zcity > wcity) { vcity = zcity; } else { vcity = wcity; } if (vcity == 1) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 2) { jenisPasukan2[zi] = random(3) + 2; } if (vcity == 3) { jenisPasukan2[zi] = random(4) + 3; } if (vcity == 4) { jenisPasukan2[zi] = random(5) + 4; } if (vcity == 5) { jenisPasukan2[zi] = random(4) + 5; } if (vcity == 6) { jenisPasukan2[zi] = random(3) + 6; } if (vcity >= 7) { jenisPasukan2[zi] = random(2) + 7; } } } } } masukSoldier2(acak2); ++zi; } } function masukSoldier(acak, indi1) { i = indi1; if (jenisSoldier[i] == 6) { soldier = attachMovie('xsuper_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 6; soldier.tipe = 1; soldier.range = 20; soldier.speed = random(4) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 1.25; soldier.armor = 200; } else { if (jenisPasukan[i] == 1) { if (jenisSoldier[i] == 1) { soldier = attachMovie('sword_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 1; soldier.tipe = 1; soldier.range = 10; soldier.speed = random(5) + 3; soldier.speed3 = random(3) + 3; soldier.damage = 0.05; soldier.armor = 50; } else { if (jenisSoldier[i] == 2) { soldier = attachMovie('kuda_mc2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 2; soldier.tipe = 1; soldier.range = 10; soldier.speed = random(6) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 0.1; soldier._yscale = 110; soldier._xscale = 110; soldier.armor = 100; } else { if (jenisSoldier[i] == 5) { soldier = attachMovie('gajah_mc2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 5; soldier.tipe = 1; soldier.range = 10; soldier.speed = 2; soldier.speed3 = 2; soldier.damage = 0.25; soldier.armor = 450; } } } } else { if (jenisPasukan[i] == 2) { if (jenisSoldier[i] == 1) { soldier = attachMovie('arrow_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 1; soldier.tipe = 2; soldier.range = 300; soldier.speed = random(4) + 2; soldier.speed3 = random(2) + 1; soldier.damage = 0.06; soldier._yscale = 85; soldier._xscale = 85; soldier.armor = 50; } else { if (jenisSoldier[i] == 2) { soldier = attachMovie('kuda_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 2; soldier.tipe = 2; soldier.range = 300; soldier.speed = random(6) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 0.12; soldier._yscale = 110; soldier._xscale = 110; soldier.armor = 100; } else { if (jenisSoldier[i] == 3) { soldier = attachMovie('ketapel_mc2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 3; soldier.tipe = 2; soldier.range = 500; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.8; soldier.armor = 25; } else { if (jenisSoldier[i] == 5) { soldier = attachMovie('gajah_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 5; soldier.tipe = 2; soldier.range = 300; soldier.speed = 2; soldier.speed3 = 2; soldier.damage = 0.24; soldier.armor = 450; } } } } } else { if (jenisPasukan[i] == 3) { if (jenisSoldier[i] == 1) { soldier = attachMovie('spear_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 1; soldier.tipe = 1; soldier.range = 15; soldier.speed = random(3) + 2; soldier.speed3 = random(2) + 1; soldier.damage = 0.07000000000000001; soldier.armor = 50; } else { if (jenisSoldier[i] == 2) { soldier = attachMovie('kuda_mc2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 2; soldier.tipe = 1; soldier.range = 15; soldier.speed = random(6) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 0.14; soldier._yscale = 110; soldier._xscale = 110; soldier.armor = 100; } else { if (jenisSoldier[i] == 3) { soldier = attachMovie('ketapel_mc3', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 3; soldier.tipe = 2; soldier.range = 500; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.85; soldier.armor = 25; } else { if (jenisSoldier[i] == 5) { soldier = attachMovie('gajah_mc2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 5; soldier.tipe = 1; soldier.range = 15; soldier.speed = 2; soldier.speed3 = 2; soldier.damage = 0.28; soldier.armor = 450; } } } } } else { if (jenisPasukan[i] == 4) { if (jenisSoldier[i] == 1) { soldier = attachMovie('xfire_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 1; soldier.tipe = 2; soldier.range = 350; soldier.speed = random(4) + 2; soldier.speed3 = random(2) + 1; soldier.damage = 0.06; soldier.armor = 50; } else { if (jenisSoldier[i] == 2) { soldier = attachMovie('kuda_mc3', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 2; soldier.tipe = 2; soldier.range = 300; soldier.speed = random(6) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 0.12; soldier._yscale = 110; soldier._xscale = 110; soldier.armor = 100; } else { if (jenisSoldier[i] == 3) { soldier = attachMovie('ketapel_mc4', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 3; soldier.tipe = 2; soldier.range = 500; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.9; soldier.armor = 25; } else { if (jenisSoldier[i] == 5) { soldier = attachMovie('gajah_mc3', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 5; soldier.tipe = 2; soldier.range = 300; soldier.speed = 2; soldier.speed3 = 2; soldier.damage = 0.24; soldier.armor = 450; } } } } } else { if (jenisPasukan[i] == 5) { if (jenisSoldier[i] == 3) { soldier = attachMovie('ketapel_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 3; soldier.tipe = 2; soldier.range = 500; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 1; soldier.armor = 25; } } } } } } if (jenisSoldier[i] == 4) { if (jenisPasukan[i] == 6) { soldier = attachMovie('witch1', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 4; soldier.tipe = 2; soldier.range = 500; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.15; soldier.armor = 25; } else { if (jenisPasukan[i] == 7) { soldier = attachMovie('witch2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 4; soldier.tipe = 2; soldier.range = 450; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.2; soldier.armor = 25; } else { if (jenisPasukan[i] == 8) { soldier = attachMovie('witch3', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 4; soldier.tipe = 2; soldier.range = 400; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.25; soldier.armor = 25; } else { if (jenisPasukan[i] == 9) { soldier = attachMovie('witch4', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 4; soldier.tipe = 2; soldier.range = 350; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.3; soldier.armor = 25; } else { if (jenisPasukan[i] == 10) { soldier = attachMovie('witch5', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 4; soldier.tipe = 2; soldier.range = 300; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.35; soldier.armor = 25; } } } } } } } soldier.damage *= 1; soldier.armor = 0; soldier.lari = false; soldier.gotoAndStop(1); soldier._x = _root['kotak' + acak]._x; soldier._y = _root['kotak' + acak]._y; soldier.nyawa = bawah['batalion' + i].jml; bisaPrajurit = true; sudahIsi[acak] = true; ++jmlJagoan; } function masukSoldier2(acak) { i = indi2; if (jenisPasukan2[i] == 1) { soldier2 = attachMovie('sword2_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 1; soldier2.range = 10; soldier2.speed = random(4) + 2; soldier2.speed3 = random(3) + 3; soldier2.damage = 0.05; soldier2.armor = 50; } else { if (jenisPasukan2[i] == 2) { soldier2 = attachMovie('arrow2_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 2; soldier2.range = 250; soldier2.speed = random(3) + 2; soldier2.speed3 = random(2) + 1; soldier2.damage = 0.06; soldier._yscale = 85; soldier2._xscale = 85; soldier2.armor = 50; } else { if (jenisPasukan2[i] == 3) { soldier2 = attachMovie('spear2_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 1; soldier2.range = 15; soldier2.speed = random(3) + 2; soldier2.speed3 = random(2) + 1; soldier2.damage = 0.07000000000000001; soldier2.armor = 50; } else { if (jenisPasukan2[i] == 4) { soldier2 = attachMovie('xkuda_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 1; soldier2.range = 15; soldier2.speed = random(5) + 3; soldier2.speed3 = random(3) + 3; soldier2.damage = 0.2; soldier._yscale = 110; soldier2._xscale = 110; soldier2.armor = 100; } else { if (jenisPasukan2[i] == 5) { soldier2 = attachMovie('xketapel_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 2; soldier2.range = 500; soldier2.speed = 1.5; soldier2.speed3 = 1.5; soldier2.damage = 0.8; soldier2.armor = 25; } else { if (jenisPasukan2[i] == 6) { soldier2 = attachMovie('xwitch_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 2; soldier2.range = random(200) + 200; soldier2.speed = random(2) + 2; soldier2.speed3 = random(2) + 2; rand = random(4); if (rand == 0) { soldier2.damage = 0.2; } else { if (rand == 1) { soldier2.damage = 0.25; } else { if (rand == 2) { soldier2.damage = 0.3; } else { soldier2.damage = 0.35; } } } soldier2.armor = 25; } else { if (jenisPasukan2[i] == 7) { soldier2 = attachMovie('xgajah_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 1; soldier2.range = 15; soldier2.speed = 2; soldier2.speed3 = 2; soldier2.damage = 0.3; soldier2.armor = 600; } else { if (jenisPasukan2[i] == 8) { soldier2 = attachMovie('xxsuper_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 1; soldier2.range = 20; soldier2.speed = random(4) + 4; soldier2.speed3 = random(4) + 4; soldier2.damage = 1.25; soldier2.armor = 150; } } } } } } } } soldier2.damage *= 1; soldier2.armor = 0; soldier2.lari = false; soldier2.gotoAndStop(1); soldier2._x = _root['xkotak' + acak]._x; soldier2._y = _root['xkotak' + acak]._y; soldier2.nyawa = zjmlMusuh + Math.floor(random(zjmlMusuh / 2)); ++indi2; ++jmlMusuh; } function enterSoldier() { if (zpause == false) { if (this.nyawa <= 0) { this.serang = true; } else { if (_root['soldier2_mc' + this.xtarget].nyawa <= 0) { masihHidup = new Array(); keHidup = 0; i = 1; while (i <= 20) { if (_root['soldier2_mc' + i].nyawa > 0) { masihHidup[keHidup] = i; ++keHidup; } ++i; } if (keHidup > 0) { this.serang = false; randKe = random(keHidup); this.xtarget = masihHidup[randKe]; aimX = _root['soldier2_mc' + this.xtarget]._x; aimY = _root['soldier2_mc' + this.xtarget]._y; if (this._x < aimX) { this.tambahan = 0; } else { this.tambahan = 10; } } else { cekSelesai('menang'); } } if (this._x < _root['soldier2_mc' + this.xtarget]._x) { this.tambahan = 0; } else { this.tambahan = 10; } this.serang = false; this.jarak = Math.sqrt(Math.pow(this._x - _root['soldier2_mc' + this.xtarget]._x, 2) + Math.pow(this._y - _root['soldier2_mc' + this.xtarget]._y, 2)); if (this.jarak <= this.range && _root['soldier2_mc' + this.xtarget].nyawa > 0) { this.gotoAndStop(3 + this.tambahan); this.serang = true; if (this.tipe == 1) { _root['soldier2_mc' + this.xtarget].nyawa -= this.damage; } this.rand = random(100); if (this.rand <= xjml) { this.kenaRand = true; } else { this.kenaRand = false; } } } if (this.kenaRand == true) { this.serang = true; if (this.speed3 > 0) { if (this._x >= 100 && this._x < 580) { if (this.tipe == 1) { this._x += this.speed3; } else { this._x -= this.speed3; } this.speed3 -= 0.5; } } else { this.speed3 = random(3) + 3; this.kenaRand = false; } } if (this.serang == false) { this.gotoAndStop(2 + this.tambahan); aimX = _root['soldier2_mc' + this.xtarget]._x; aimY = _root['soldier2_mc' + this.xtarget]._y; if (this._x < aimX) { this.tambahan = 0; } else { this.tambahan = 10; } deltaX = this._x - aimX; deltaY = this._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) > this.speed && _root['soldier2_mc' + this.xtarget].nyawa > 0) { this._y -= this.speed * Math.cos(angle * 0.0174532925199433); this._x += this.speed * Math.sin(angle * 0.0174532925199433); } else { this.gotoAndStop(1 + this.tambahan); this.serang = true; masihHidup = new Array(); keHidup = 0; i = 1; while (i <= 20) { if (_root['soldier2_mc' + i].nyawa > 0) { masihHidup[keHidup] = i; ++keHidup; } ++i; } if (keHidup > 0) { this.serang = false; randKe = random(keHidup); this.xtarget = masihHidup[randKe]; aimX = _root['soldier2_mc' + this.xtarget]._x; aimY = _root['soldier2_mc' + this.xtarget]._y; if (this._x < aimX) { this.tambahan = 0; } else { this.tambahan = 10; } } } } if (this.nyawa <= 0) { if (this.petamaMati == undefined) { this.petamaMati = false; this._rotation += random(50) - 25; this.swapDepths(this.getDepth() - 2000); --jmlJagoan; if (jmlJagoan <= 0) { cekSelesai('kalah'); } } this.gotoAndStop(4 + this.tambahan); if (this.speed2 > 0) { this._x -= this.speed2; --this.speed2; } } } } function enterAsap() { this._y -= this.speed / 1.5; rand = random(2); if (rand == 0) { this._x -= 0.5; } else { this._x += 0.5; } this._alpha -= random(4) + 1; if (this._alpha <= 0) { removeMovieClip(this); } } function enterSerpih() { this._y -= this.speed; if (this.rand == 0) { this._x -= this.speedY; } else { this._x += this.speedY; } this._rotation += 5; --this.speed; if (this.speed <= -10) { removeMovieClip(this); } } function cekSelesai(indi) { zpause = true; bawah.surender_btn._visible = false; bawah.atas = ''; i = 1; while (i <= 20) { if (_root['soldier_mc' + i].nyawa > 0) { _root['soldier_mc' + i].gotoAndStop(1); } if (_root['soldier2_mc' + i].nyawa > 0) { _root['soldier2_mc' + i].gotoAndStop(1); } if (indi == 'menang') { if (_root['soldier2_mc' + i]._currentframe != 4 && _root['soldier2_mc' + i]._currentframe != 14) { _root['soldier2_mc' + i].nyawa = 0; _root['soldier2_mc' + i].gotoAndStop(4); } } else { if (_root['soldier_mc' + i]._currentframe != 4 && _root['soldier_mc' + i]._currentframe != 14) { _root['soldier_mc' + i].nyawa = 0; _root['soldier_mc' + i].gotoAndStop(4); } } ++i; } end = attachMovie('end_mc', 'end_mc', dalamEnd); end._x = -60; end._y = -20; if (indi == 'menang') { backMenang(); perangMenang = true; end.gotoAndStop(1); } else { backKalah(); perangMenang = false; end.gotoAndStop(2); } pedangSisa = 0; panahSisa = 0; tombakSisa = 0; apiSisa = 0; coalSisa = 0; iceballSisa = 0; fireballSisa = 0; poisonSisa = 0; hurricaneSisa = 0; earthquakeSisa = 0; xjmlSisa1 = 0; xjmlSisa2 = 0; xjmlSisa3 = 0; xjmlSisa4 = 0; xjmlSisa5 = 0; xjmlSisa6 = 0; i = 1; while (i <= 10) { jmlSisa1 = 0; jmlSisa2 = 0; jmlSisa3 = 0; jmlSisa4 = 0; jmlSisa5 = 0; jmlSisa6 = 0; if (_root['soldier_mc' + i].nyawa <= 0 || isNaN(_root['soldier_mc' + i].nyawa) || _root['soldier_mc' + i].nyawa == undefined) { jmlSisa1 = 0; jmlSisa2 = 0; jmlSisa3 = 0; jmlSisa4 = 0; jmlSisa5 = 0; jmlSisa6 = 0; } else { if (jenisSoldier[i] == 1) { jmlSisa1 = _root['soldier_mc' + i].nyawa; } else { if (jenisSoldier[i] == 2) { jmlSisa2 = _root['soldier_mc' + i].nyawa; } else { if (jenisSoldier[i] == 3) { jmlSisa3 = _root['soldier_mc' + i].nyawa; } else { if (jenisSoldier[i] == 4) { jmlSisa4 = _root['soldier_mc' + i].nyawa; } else { if (jenisSoldier[i] == 5) { jmlSisa5 = _root['soldier_mc' + i].nyawa; } else { if (jenisSoldier[i] == 6) { jmlSisa6 = _root['soldier_mc' + i].nyawa; } } } } } } if (jenisPasukan[i] == 1) { pedangSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 2) { panahSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 3) { tombakSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 4) { apiSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 5) { coalSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 6) { iceballSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 7) { fireballSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 8) { poisonSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 9) { hurricaneSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 10) { earthquakeSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } } } } } } } } } } } xjmlSisa1 += Math.ceil(jmlSisa1); xjmlSisa2 += Math.ceil(jmlSisa2); xjmlSisa3 += Math.ceil(jmlSisa3); xjmlSisa4 += Math.ceil(jmlSisa4); xjmlSisa5 += Math.ceil(jmlSisa5); xjmlSisa6 += Math.ceil(jmlSisa6); ++i; } end.jagoan1 = xjmlPasukan1 - xjmlSisa1; end.jagoan2 = xjmlPasukan2 - xjmlSisa2; end.jagoan3 = xjmlPasukan3 - xjmlSisa3; end.jagoan4 = xjmlPasukan4 - xjmlSisa4; end.jagoan5 = xjmlPasukan5 - xjmlSisa5; end.jagoan6 = xjmlPasukan6 - xjmlSisa6; xxjmlSisa2 = 0; i = 1; while (i <= 10) { if (_root['soldier2_mc' + i].nyawa <= 0 || isNaN(_root['soldier2_mc' + i].nyawa) || _root['soldier2_mc' + i].nyawa == undefined) { xxjmlSisa2 = 0; } else { xxjmlSisa2 = _root['soldier2_mc' + i].nyawa; } xxjmlSisa2 += Math.floor(_root['soldier2_mc' + i].nyawa); ++i; } end.musuh = Math.floor(xxjmlPasukan2 - xxjmlSisa2); if (indi == 'menang') { end.money = (random(5) + 1) * 1500; end.food = (random(5) + 1) * 500; end.logs = (random(5) + 1) * 250; end.iron = (random(5) + 1) * 100; end.sword = (random(5) + 1) * 50; end.xarrow = (random(5) + 1) * 75; } else { if (tipeWar == 'serang') { end.money = Number(_root.bawaBarang1); end.food = Number(_root.bawaBarang2); end.logs = Number(_root.bawaBarang4); end.iron = Number(_root.bawaBarang3); } else { end.money = moneyKota[_root.pilihKota]; end.food = foodKota[_root.pilihKota]; end.logs = woodKota[_root.pilihKota]; end.iron = ironKota[_root.pilihKota]; } } if (tipeWar == 'bertahan' && indi == 'menang') { _root.moneyKota[_root.pilihKota] += end.money; _root.foodKota[_root.pilihKota] += end.food; _root.ironKota[_root.pilihKota] += end.iron; _root.woodKota[_root.pilihKota] += end.logs; _root.soldierKota[_root.pilihKota] += xjmlSisa1; _root.horseKota[_root.pilihKota] += xjmlSisa2; _root.catapultKota[_root.pilihKota] += xjmlSisa3; _root.witchKota[_root.pilihKota] += xjmlSisa4; _root.elephantKota[_root.pilihKota] += xjmlSisa5; _root.xsuperKota[_root.pilihKota] += xjmlSisa6; if (pedangSisa >= 2000) { pedangSisa = 2000; } if (panahSisa >= 2000) { panahSisa = 2000; } if (tombakSisa >= 2000) { tombakSisa = 2000; } if (tombakSisa >= 2000) { tombakSisa = 2000; } if (apiSisa >= 2000) { apiSisa = 2000; } if (coalSisa >= 2000) { coalSisa = 2000; } if (iceballSisa >= 2000) { iceballSisa = 2000; } if (fireballSisa >= 2000) { fireballSisa = 2000; } if (poisonSisa >= 2000) { poisonSisa = 2000; } if (hurricaneSisa >= 2000) { hurricaneSisa = 2000; } if (earthquakeSisa >= 2000) { earthquakeSisa = 2000; } _root.swordKota[_root.pilihKota] += pedangSisa; _root.xarrowKota[_root.pilihKota] += panahSisa; _root.spearKota[_root.pilihKota] += tombakSisa; _root.fireKota[_root.pilihKota] += apiSisa; _root.coalKota[_root.pilihKota] += coalSisa; _root.iceballKota[_root.pilihKota] += iceballSisa; _root.fireballKota[_root.pilihKota] += fireballSisa; _root.posionKota[_root.pilihKota] += poisonSisa; _root.hurricaneKota[_root.pilihKota] += hurricaneSisa; _root.earthquakeKota[_root.pilihKota] += earthquakeSisa; } else { if (tipeWar == 'serang' && indi == 'menang') { _root.moneyKota[_root.kotaDiserang] += end.money; _root.foodKota[_root.kotaDiserang] += end.food; _root.ironKota[_root.kotaDiserang] += end.iron; _root.woodKota[_root.kotaDiserang] += end.logs; _root.soldierKota[_root.pilihKota] += xjmlSisa1; _root.horseKota[_root.pilihKota] += xjmlSisa2; _root.catapultKota[_root.pilihKota] += xjmlSisa3; _root.witchKota[_root.pilihKota] += xjmlSisa4; _root.elephantKota[_root.pilihKota] += xjmlSisa5; _root.xsuperKota[_root.pilihKota] += xjmlSisa6; if (pedangSisa >= 2000) { pedangSisa = 2000; } if (panahSisa >= 2000) { panahSisa = 2000; } if (tombakSisa >= 2000) { tombakSisa = 2000; } if (tombakSisa >= 2000) { tombakSisa = 2000; } if (apiSisa >= 2000) { apiSisa = 2000; } if (coalSisa >= 2000) { coalSisa = 2000; } if (iceballSisa >= 2000) { iceballSisa = 2000; } if (fireballSisa >= 2000) { fireballSisa = 2000; } if (poisonSisa >= 2000) { poisonSisa = 2000; } if (hurricaneSisa >= 2000) { hurricaneSisa = 2000; } if (earthquakeSisa >= 2000) { earthquakeSisa = 2000; } _root.swordKota[_root.pilihKota] += pedangSisa; _root.xarrowKota[_root.pilihKota] += panahSisa; _root.spearKota[_root.pilihKota] += tombakSisa; _root.fireKota[_root.pilihKota] += apiSisa; _root.coalKota[_root.pilihKota] += coalSisa; _root.iceballKota[_root.pilihKota] += iceballSisa; _root.fireballKota[_root.pilihKota] += fireballSisa; _root.posionKota[_root.pilihKota] += poisonSisa; _root.hurricaneKota[_root.pilihKota] += hurricaneSisa; _root.earthquakeKota[_root.pilihKota] += earthquakeSisa; } } _root.workerKota[_root.pilihKota] += end.jagoan1; _root.workerKota[_root.pilihKota] += end.jagoan2; _root.workerKota[_root.pilihKota] += end.jagoan3; _root.workerKota[_root.pilihKota] += end.jagoan4; _root.workerKota[_root.pilihKota] += end.jagoan5; _root.workerKota[_root.pilihKota] += end.jagoan6; end.ok_btn.onRelease = function () { clearSemua2(); gotoAndStop(129); }; } function cekDarah1(indi) { drand = random(100); if (drand <= 25) { backDarah(); } darah = attachMovie('darah_mc', 'darah_mc' + dalamDarah, dalamDarah); darah._rotation = random(360); darah._yscale = random(25) + 50; darah._xscale = darah._yscale; darah._x = indi._x - random(50) + 25; darah._y = indi._y - random(50) + 25; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } } function cekAir(indi) { drand = random(100); if (drand <= 25) { backDarah(); } darah = attachMovie('air2_mc', 'darah_mc' + dalamDarah, dalamDarah); darah._rotation = random(360); darah._yscale = random(25) + 50; darah._xscale = darah._yscale; darah._x = indi._x - random(50) + 25; darah._y = indi._y - random(50) + 25; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } } function cekAir2(indi) { drand = random(100); if (drand <= 25) { backDarah(); } darah = attachMovie('water2_mc', 'darah_mc' + dalamDarah, dalamDarah2); darah._rotation = random(360); darah._yscale = random(50) + 50; darah._xscale = darah._yscale; darah._x = indi._x - random(50) + 25; darah._y = indi._y - random(50) + 25; ++dalamDarah2; if (dalamDarah2 > 99) { dalamDarah2 = 10; } } function cekApi(indi) { backApi(); drand = random(100); if (drand <= 25) { backDarah(); } darah = attachMovie('api_mc', 'darah_mc' + dalamDarah, dalamDarah); darah._yscale = random(10) + 10; darah._xscale = darah._yscale; darah._x = indi._x - random(50) + 25; darah._y = indi._y - random(50) + 25; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } xrand = random(100); if (xrand > 30) { i = 0; while (i <= 3) { rand = random(2); if (rand == 1) { asap = attachMovie('asap2_mc', 'asap_mc' + dalamDarah, dalamDarah); } else { asap = attachMovie('asap_mc', 'asap_mc' + dalamDarah, dalamDarah); } asap._x = indi._x + random(20) - 10; asap._y = indi._y + random(20) - 10; asap._xscale = random(25) + 25; asap._yscale = asap._xscale; asap._rotation = random(360); asap.speed = random(15) + 1; asap.onEnterFrame = enterAsap; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } ++i; } } xrand = random(100); if (xrand > 30) { i = 0; while (i <= 10) { rand = 12; serpih = attachMovie('serpih' + rand, 'serpih_mc' + dalamDarah, dalamDarah); serpih._x = indi._x; serpih._y = indi._y; serpih._xscale = random(5) + 3; serpih._yscale = serpih._xscale; serpih._rotation = random(360); serpih.speed = random(10) + 5; serpih.rand = random(2); serpih.speedY = random(5) + 2; serpih.onEnterFrame = enterSerpih; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } ++i; } } } function cekDarah2(indi) { backMati(); rand = random(2); if (rand == 0) { darah2 = attachMovie('darah2_mc', 'darah2_mc' + dalamDarah2, dalamDarah2); } else { darah2 = attachMovie('darah3_mc', 'darah2_mc' + dalamDarah2, dalamDarah2); } darah2._rotation = random(360); darah2._yscale = random(50) + 50; darah2._xscale = darah2._yscale; darah2._x = indi._x - random(50) + 25; darah2._y = indi._y - random(50) + 25; ++dalamDarah2; if (dalamDarah2 > 500) { dalamDarah2 = 10; } } function cekPanah(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('anak_panah', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekPanahApi(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('anak_panah_api', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak2; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekBatu(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('batu_panah', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier_mc' + indi.xtarget]._x; aimY = _root['soldier_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterBatu; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function xxcekBatu(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('batu_panah2', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier_mc' + indi.xtarget]._x; aimY = _root['soldier_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterBatu2; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function yycekBatu(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { wrand = random(4); if (wrand == 0) { anak = attachMovie('sihir1', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); } else { if (wrand == 1) { anak = attachMovie('sihir2', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); } else { if (wrand == 2) { anak = attachMovie('sihir3', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); } else { if (wrand == 3) { anak = attachMovie('sihir4', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); } } } } anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier_mc' + indi.xtarget]._x; aimY = _root['soldier_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; if (wrand == 0) { anak.onEnterFrame = enterBatu2x; } else { anak.onEnterFrame = enterBatu2; } ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekSihir1(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('sihir1', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterSihir1; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekSihir2(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('sihir2', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterSihir2; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekSihir3(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('sihir3', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterSihir3; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekSihir4(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('sihir4', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterSihir4; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekSihir5(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('sihir5', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; anak.angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak.onEnterFrame = enterSihir5; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekBatu2(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('batu_panah2', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak2; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekBatu3(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('anak_panah', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekBatu4(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('tombak_panah', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekBatu5(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('anak_panah_api', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function enterAnak() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekDarah1(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 15; removeMovieClip(this); } } function enterAnak2() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekApi(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 30; removeMovieClip(this); } } function enterBatu() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier_mc' + this.xtarget])) { cekDarah1(_root['soldier_mc' + this.xtarget]); _root['soldier_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterBatu2() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier_mc' + this.xtarget])) { cekDarah1(_root['soldier_mc' + this.xtarget]); cekApi(_root['soldier2_mc' + this.xtarget]); _root['soldier_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterBatu2x() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier_mc' + this.xtarget])) { cekAir(_root['soldier_mc' + this.xtarget]); xrand = random(100); if (xrand < 15) { cekAir2(_root['soldier_mc' + this.xtarget]); } _root['soldier_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterSihir1() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekAir(_root['soldier2_mc' + this.xtarget]); xrand = random(100); if (xrand < 15) { cekAir2(_root['soldier2_mc' + this.xtarget]); } _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 15; removeMovieClip(this); } } function enterSihir2() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekDarah(_root['soldier2_mc' + this.xtarget]); cekApi(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 15; removeMovieClip(this); } } function enterSihir3() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekDarah(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterSihir4() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekDarah(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterSihir5() { this._y -= this.speed * Math.cos(this.angle * 0.0174532925199433); this._x += this.speed * Math.sin(this.angle * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekDarah(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterSoldier2() { if (zpause == false) { zxjmlSisa2 = 0; i = 1; while (i <= 10) { if (_root['soldier2_mc' + i].nyawa <= 0 || isNaN(_root['soldier2_mc' + i].nyawa) || _root['soldier2_mc' + i].nyawa == undefined) { zjmlSisa2 = 0; } else { zjmlSisa2 = _root['soldier2_mc' + i].nyawa; } zxjmlSisa2 += Math.floor(_root['soldier2_mc' + i].nyawa); ++i; } if (this.nyawa > 0) { if (zxjmlSisa2 <= xxjmlPasukan2 / 10) { if (musuhLari == true) { this.lari = true; } } } if (this.lari == false) { if (this.nyawa <= 0) { this.serang = true; this.kenaRand = false; } else { if (_root['soldier_mc' + this.xtarget].nyawa <= 0) { masihHidup = new Array(); keHidup = 0; i = 1; while (i <= 20) { if (_root['soldier_mc' + i].nyawa > 0) { masihHidup[keHidup] = i; ++keHidup; } ++i; } if (keHidup > 0) { this.serang = false; randKe = random(keHidup); this.xtarget = masihHidup[randKe]; aimX = _root['soldier_mc' + this.xtarget]._x; aimY = _root['soldier_mc' + this.xtarget]._y; if (this._x > aimX) { this.tambahan = 0; } else { this.tambahan = 10; } } else { cekSelesai('kalah'); } } if (this._x > _root['soldier_mc' + this.xtarget]._x) { this.tambahan = 0; } else { this.tambahan = 10; } this.serang = false; this.jarak = Math.sqrt(Math.pow(this._x - _root['soldier_mc' + this.xtarget]._x, 2) + Math.pow(this._y - _root['soldier_mc' + this.xtarget]._y, 2)); if (this.jarak <= this.range && _root['soldier_mc' + this.xtarget].nyawa > 0) { this.gotoAndStop(3 + this.tambahan); this.serang = true; if (this.tipe == 1) { _root['soldier_mc' + this.xtarget].nyawa -= this.damage; } this.rand = random(100); if (this.rand <= xjml) { this.kenaRand = true; } else { this.kenaRand = false; } } } if (this.kenaRand == true) { this.serang = true; if (this.speed3 > 0) { if (this._x >= 100 && this._x < 580) { if (this.tipe == 1) { this._x -= this.speed3; } else { this._x += this.speed3; } this.speed3 -= 0.5; } } else { this.speed3 = random(3) + 3; this.kenaRand = false; } } if (this.serang == false) { this.gotoAndStop(2 + this.tambahan); aimX = _root['soldier_mc' + this.xtarget]._x; aimY = _root['soldier_mc' + this.xtarget]._y; if (this._x > aimX) { this.tambahan = 0; } else { this.tambahan = 10; } deltaX = this._x - aimX; deltaY = this._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) > this.speed && _root['soldier_mc' + this.xtarget].nyawa > 0) { this._y -= this.speed * Math.cos(angle * 0.0174532925199433); this._x += this.speed * Math.sin(angle * 0.0174532925199433); } else { this.gotoAndStop(1 + this.tambahan); this.serang = true; masihHidup = new Array(); keHidup = 0; i = 1; while (i <= 20) { if (_root['soldier_mc' + i].nyawa > 0) { masihHidup[keHidup] = i; ++keHidup; } ++i; } if (keHidup > 0) { this.serang = false; randKe = random(keHidup); this.xtarget = masihHidup[randKe]; aimX = _root['soldier_mc' + this.xtarget]._x; aimY = _root['soldier_mc' + this.xtarget]._y; if (this._x > aimX) { this.tambahan = 0; } else { this.tambahan = 10; } } } } } else { if (this.nyawa > 0) { this.gotoAndStop(12); this._x += this.speed * 1.5; if (this._x >= 700) { this.nyawa = 0; } } } if (this.nyawa <= 0) { if (this.petamaMati == undefined) { this.petamaMati = false; this._rotation += random(50) - 25; this.swapDepths(this.getDepth() - 2000); --jmlMusuh; if (jmlMusuh <= 0) { cekSelesai('menang'); } } this.gotoAndStop(4 + this.tambahan); if (this.speed2 > 0) { this._x += this.speed2; --this.speed2; } } } } function buatBawah() { bawah = attachMovie('bawah_mc', 'bawah_mc', dalamBawah); bawah._x = -250; bawah._y = 380; bawah.atas = 'Place a battalion (press, hold and drag buttons below to green box) after finished, click start.'; cekPosX = new Array(); cekPosY = new Array(); sudahIsi = new Array(); jenisPasukan = new Array(); jenisSoldier = new Array(); i = 1; while (i <= 20) { sudahIsi[i] = false; _root['xbatalion' + i]._visible = false; ++i; } i = 1; while (i <= xjml) { if (wsoldier[i] == 1) { bawah['batalion' + i].gotoAndStop(wjenis[i]); } else { if (wsoldier[i] == 2) { bawah['batalion' + i].gotoAndStop(wjenis[i] + 10); } else { if (wsoldier[i] == 3) { bawah['batalion' + i].gotoAndStop(wjenis[i] + 20); } else { if (wsoldier[i] == 4) { bawah['batalion' + i].gotoAndStop(wjenis[i] + 30); } else { if (wsoldier[i] == 5) { bawah['batalion' + i].gotoAndStop(wjenis[i] + 40); } else { if (wsoldier[i] == 6) { bawah['batalion' + i].gotoAndStop(wjenis[i] + 50); } } } } } } bawah['batalion' + i].jml = wbatalion[i]; bawah['batalion' + i].posX = bawah['batalion' + i]._x; bawah['batalion' + i].posY = bawah['batalion' + i]._y; if (bawah['batalion' + i].jml == 0) { bawah['batalion' + i]._visible = false; jenisPasukan[i] = 0; jenisSoldier[i] = 0; } else { bawah['batalion' + i].onPress = pressBatalion; bawah['batalion' + i].onRelease = releaseBatalion; jenisPasukan[i] = wjenis[i]; jenisSoldier[i] = wsoldier[i]; } ++i; } bawah.surender_btn._visible = false; bawah.random_btn.onRelease = klikRandom; bawah.start_btn.onRelease = klikMulai; bawah.undo_btn.onRelease = klikUndo; } function klikSurender() { cekSelesai('kalah'); } function klikUndo() { indi1 = 1; i = 1; while (i <= 20) { removeMovieClip(_root['soldier_mc' + i]); ++i; } buatBawah(); } function klikMulai() { bisaMulai = false; i = 1; while (i <= 10) { if (_root['soldier_mc' + i] != undefined) { bisaMulai = true; } ++i; } if (bisaMulai == true) { bawah.atas = 'Click surender if you want to surender.'; bawah.surender_btn._visible = true; bawah.random_btn._visible = false; bawah.start_btn._visible = false; bawah.undo_btn._visible = false; bawah.surender_btn.onRelease = klikSurender; jmlPasukan1 = 10; jmlPasukan2 = 10; i = 1; while (i <= 20) { _root['kotak' + i]._visible = false; bawah['batalion' + i].enabled = false; bawah['batalion' + i]._visible = true; if (_root.soldier_mc.nyawa == undefined) { _root.soldier_mc.nyawa = 0; } bawah['batalion' + i].jml = _root['soldier_mc' + i].nyawa; _root['xbatalion' + i]._visible = true; _root['xbatalion' + i].gotoAndStop(jenisPasukan2[i]); if (_root.soldier_mc.nyawa == undefined) { _root.soldier_mc.nyawa = 0; } _root['xbatalion' + i].jml = _root['soldier2_mc' + i].nyawa; _root['soldier_mc' + i].speed2 = random(6) + 6; _root['soldier_mc' + i].xtarget = random(10) + 1; _root['soldier_mc' + i].tambahan = 0; _root['soldier_mc' + i].gotoAndStop(2); _root['soldier_mc' + i].onEnterFrame = enterSoldier; ++i; } i = 1; while (i <= 20) { _root['xkotak' + i]._visible = false; _root['soldier2_mc' + i].speed2 = random(6) + 6; _root['soldier2_mc' + i].xtarget = random(10) + 1; _root['soldier2_mc' + i].tambahan = 0; _root['soldier2_mc' + i].gotoAndStop(2); _root['soldier2_mc' + i].onEnterFrame = enterSoldier2; ++i; } } } function cekKedalaman() { i = 1; while (i <= 10) { j = i + 1; while (j <= 10) { if (_root['soldier_mc' + i]._y > _root['soldier2_mc' + j]._y) { if (_root['soldier_mc' + i].getDepth() < _root['soldier2_mc' + j].getDepth()) { if (_root['soldier_mc' + i].nyawa > 0 && _root['soldier2_mc' + j].nyawa > 0) { _root['soldier_mc' + i].swapDepths(_root['soldier2_mc' + j]); } } } else { if (_root['soldier_mc' + i]._y < _root['soldier2_mc' + j]._y) { if (_root['soldier_mc' + i].getDepth() > _root['soldier2_mc' + j].getDepth()) { if (_root['soldier_mc' + i].nyawa > 0 && _root['soldier2_mc' + j].nyawa > 0) { _root['soldier2_mc' + j].swapDepths(_root['soldier_mc' + i]); } } } } if (_root['soldier_mc' + i]._y > _root['soldier_mc' + j]._y) { if (_root['soldier_mc' + i].getDepth() < _root['soldier_mc' + j].getDepth()) { if (_root['soldier_mc' + i].nyawa > 0 && _root['soldier_mc' + j].nyawa > 0) { _root['soldier_mc' + i].swapDepths(_root['soldier_mc' + j]); } } } else { if (_root['soldier_mc' + i]._y < _root['soldier_mc' + j]._y) { if (_root['soldier_mc' + i].getDepth() > _root['soldier_mc' + j].getDepth()) { if (_root['soldier_mc' + i].nyawa > 0 && _root['soldier_mc' + j].nyawa > 0) { _root['soldier_mc' + j].swapDepths(_root['soldier_mc' + i]); } } } } if (_root['soldier2_mc' + i]._y > _root['soldier2_mc' + j]._y) { if (_root['soldier2_mc' + i].getDepth() < _root['soldier2_mc' + j].getDepth()) { if (_root['soldier2_mc' + i].nyawa > 0 && _root['soldier2_mc' + j].nyawa > 0) { _root['soldier2_mc' + i].swapDepths(_root['soldier2_mc' + j]); } } } else { if (_root['soldier2_mc' + i]._y < _root['soldier2_mc' + j]._y) { if (_root['soldier2_mc' + i].getDepth() > _root['soldier2_mc' + j].getDepth()) { if (_root['soldier2_mc' + i].nyawa > 0 && _root['soldier2_mc' + j].nyawa > 0) { _root['soldier2_mc' + j].swapDepths(_root['soldier2_mc' + i]); } } } } ++j; } ++i; } } function klikRandom() { indi1 = 1; i = 1; while (i <= 20) { removeMovieClip(_root['soldier_mc' + i]); ++i; } angka = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20); zi = 1; while (zi <= xjml) { if (bawah['batalion' + zi].jml > 0) { acak = random(angka.length); acak2 = angka[acak]; angka[acak] = null; angka.sort(); angka.pop(); masukSoldier(acak2, zi); bawah['batalion' + zi]._visible = false; } ++zi; } } function pressBatalion() { sedangDrag = true; startDrag(this, true); this.swapDepths(this.getNextHighestDepth()); } function releaseBatalion() { myStr = new String(this); if (myStr.length == 26) { indi1 = myStr.substr(myStr.length - 1, 1); } else { indi1 = myStr.substr(myStr.length - 2, 2); } bisaPrajurit = false; ai = 1; while (ai <= 20) { if (sudahIsi[ai] == false) { if (this.hitTest(_root['kotak' + ai])) { if (this.jml > 0) { masukSoldier(ai, indi1); ai = 20; } } } ++ai; } sedangDrag = false; stopDrag(); this._x = this.posX; this._y = this.posY; if (bisaPrajurit == false) { this._visible = true; } else { this._visible = false; } } function clearSemua2() { delete _root.onEnterFrame; removeMovieClip(end_mc); removeMovieClip(bawah_mc); i = 1; while (i <= 20) { removeMovieClip(_root['soldier_mc' + i]); removeMovieClip(_root['soldier2_mc' + i]); ++i; } i = 5000; while (i <= 5500) { removeMovieClip(_root['darah_mc' + i]); ++i; } i = 0; while (i <= 500) { removeMovieClip(_root['darah2_mc' + i]); ++i; } i = 8000; while (i <= 8500) { removeMovieClip(_root['anak_panah' + i]); ++i; } } stop(); trace(zjmlMusuh); if (zjmlMusuh == undefined || isNaN(zjmlMusuh) || zjmlMusuh <= 0) { zjmlMusuh = random(100) + 100; } trace(zjmlMusuh); xxday = 'DAY ' + day; if (tingkatSulit == 1) { xxlevel = 'EASY'; } else { if (tingkatSulit == 2) { xxlevel = 'NORMAL'; } else { if (tingkatSulit == 3) { xxlevel = 'HARD'; } else { if (tingkatSulit == 4) { xxlevel = 'IMPOSSIBLE'; } } } } bisaMulai = false; randLari = random(10); if (randLari >= 4) { musuhLari = true; } else { musuhLari = false; } backPerang(); if (tipeWar == 'bertahan') { medan_mc.gotoAndStop(_root.pilihKota); } else { if (tipeWar == 'serang') { medan_mc.gotoAndStop(_root.kotaDiserang + 20); } } init2(); buatKecil(); buatBawah(); buatMusuh(); xjmlPasukan1 = 0; xjmlPasukan2 = 0; xjmlPasukan3 = 0; xjmlPasukan4 = 0; xjmlPasukan5 = 0; xjmlPasukan6 = 0; pedangBawa = 0; panahBawa = 0; tombakBawa = 0; i = 1; while (i <= 10) { jmlSisa1 = 0; jmlSisa2 = 0; jmlSisa3 = 0; jmlSisa4 = 0; jmlSisa5 = 0; jmlSisa6 = 0; if (wbatalion[i] <= 0 || isNaN(wbatalion[i]) || wbatalion[i] == undefined) { jmlSisa1 = 0; jmlSisa2 = 0; jmlSisa3 = 0; jmlSisa4 = 0; jmlSisa5 = 0; jmlSisa6 = 0; } else { if (jenisSoldier[i] == 1) { jmlSisa1 = wbatalion[i]; } else { if (jenisSoldier[i] == 2) { jmlSisa2 = wbatalion[i]; } else { if (jenisSoldier[i] == 3) { jmlSisa3 = wbatalion[i]; } else { if (jenisSoldier[i] == 4) { jmlSisa4 = wbatalion[i]; } else { if (jenisSoldier[i] == 5) { jmlSisa5 = wbatalion[i]; } else { if (jenisSoldier[i] == 6) { jmlSisa6 = wbatalion[i]; } } } } } } } if (jenisPasukan[i] == 1) { pedangBawa += _root['soldier_mc' + i].nyawa; } else { if (jenisPasukan[i] == 2) { panahBawa += _root['soldier_mc' + i].nyawa; } else { if (jenisPasukan[i] == 3) { tombakBawa += _root['soldier_mc' + i].nyawa; } else { if (jenisPasukan[i] == 3) { apiBawa += _root['soldier_mc' + i].nyawa; } } } } xjmlPasukan1 += Math.ceil(jmlSisa1); xjmlPasukan2 += Math.ceil(jmlSisa2); xjmlPasukan3 += Math.ceil(jmlSisa3); xjmlPasukan4 += Math.ceil(jmlSisa4); xjmlPasukan5 += Math.ceil(jmlSisa5); xjmlPasukan6 += Math.ceil(jmlSisa6); ++i; } xxjmlPasukan2 = 0; i = 1; while (i <= 10) { if (_root['soldier2_mc' + i].nyawa <= 0 || isNaN(_root['soldier2_mc' + i].nyawa) || _root['soldier2_mc' + i].nyawa == undefined) { xxjmlSisa2 = 0; } else { xxjmlSisa2 = _root['soldier2_mc' + i].nyawa; } xxjmlPasukan2 += Math.floor(xxjmlSisa2); ++i; } _root.onEnterFrame = function () { if (bisaMulai == true) { i = 1; while (i <= 10) { if (_root['soldier_mc' + i].nyawa == undefined) { _root['soldier_mc' + i].nyawa = 0; } bawah['batalion' + i].jml = Math.floor(_root['soldier_mc' + i].nyawa); if (bawah['batalion' + i].jml <= 0) { bawah['batalion' + i].jml = 0; if (bawah['batalion' + i]._alpha <= 0) { bawah['batalion' + i]._visible = false; } else { bawah['batalion' + i]._alpha -= 10; } } if (_root['soldier_mc' + i].nyawa == undefined) { _root['soldier_mc' + i].nyawa = 0; } _root['xbatalion' + i].jml = Math.floor(_root['soldier2_mc' + i].nyawa); if (_root['xbatalion' + i].jml <= 0) { _root['xbatalion' + i].jml = 0; if (_root['xbatalion' + i]._alpha <= 0) { _root['xbatalion' + i]._visible = false; } else { _root['xbatalion' + i]._alpha -= 10; } } ++i; } cekKedalaman(); } }; } movieClip 2805 { frame 1 { stop(); } } movieClip 2880 { frame 1 { stop(); } } movieClip 2882 { } frame 131 { function init2() { dalamBawah = 1000; dalamSoldier = 3000; dalamSoldier2 = 4000; dalamDarah = 5000; dalamDarah2 = 10; dalamKecil = 9000; dalamAnakPanah = 8000; dalamEnd = 50000; sedangDrag = false; zpause = false; indi1 = 1; indi2 = 1; xjml = 10; jmlJagoan = 0; jmlMusuh = 0; } function buatMusuh() { jenisPasukan2 = new Array(); angka = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20); zi = 1; while (zi <= xjml) { acak = random(angka.length); acak2 = angka[acak]; angka[acak] = null; angka.sort(); angka.pop(); zcity = 0; i = 1; while (i <= bykKota) { if (punyaWilayah[i] == jenisKerajaan) { ++zcity; } ++i; } wcity = 0; if (tingkatSulit == 1) { if (day <= 200) { wcity = 1; } else { if (day <= 450) { wcity = 2; } else { if (day <= 700) { wcity = 3; } else { if (day <= 950) { wcity = 4; } else { if (day <= 1200) { wcity = 5; } else { if (day <= 1450) { wcity = 6; } else { wcity = 7; } } } } } } if (zcity > wcity) { vcity = zcity; } else { vcity = wcity; } if (vcity == 1) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 2) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 3) { jenisPasukan2[zi] = random(3) + 1; } if (vcity == 4) { jenisPasukan2[zi] = random(3) + 1; } if (vcity == 5) { jenisPasukan2[zi] = random(4) + 1; } if (vcity == 6) { jenisPasukan2[zi] = random(4) + 1; } if (vcity >= 7) { jenisPasukan2[zi] = random(5) + 1; } } else { if (tingkatSulit == 2) { if (day <= 200) { wcity = 1; } else { if (day <= 400) { wcity = 2; } else { if (day <= 600) { wcity = 3; } else { if (day <= 800) { wcity = 4; } else { if (day <= 1000) { wcity = 5; } else { if (day <= 1200) { wcity = 6; } else { wcity = 7; } } } } } } if (zcity > wcity) { vcity = zcity; } else { vcity = wcity; } if (vcity == 1) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 2) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 3) { jenisPasukan2[zi] = random(3) + 1; } if (vcity == 4) { jenisPasukan2[zi] = random(4) + 1; } if (vcity == 5) { jenisPasukan2[zi] = random(5) + 1; } if (vcity == 6) { jenisPasukan2[zi] = random(6) + 1; } if (vcity >= 7) { jenisPasukan2[zi] = random(6) + 1; } } else { if (tingkatSulit == 3) { if (day <= 100) { wcity = 1; } else { if (day <= 300) { wcity = 2; } else { if (day <= 500) { wcity = 3; } else { if (day <= 700) { wcity = 4; } else { if (day <= 900) { wcity = 5; } else { if (day <= 1100) { wcity = 6; } else { wcity = 7; } } } } } } if (zcity > wcity) { vcity = zcity; } else { vcity = wcity; } if (vcity == 1) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 2) { jenisPasukan2[zi] = random(2) + 2; } if (vcity == 3) { jenisPasukan2[zi] = random(3) + 2; } if (vcity == 4) { jenisPasukan2[zi] = random(3) + 3; } if (vcity == 5) { jenisPasukan2[zi] = random(4) + 3; } if (vcity == 6) { jenisPasukan2[zi] = random(4) + 4; } if (vcity >= 7) { jenisPasukan2[zi] = random(5) + 4; } } else { if (tingkatSulit == 4) { if (day <= 100) { wcity = 1; } else { if (day <= 250) { wcity = 2; } else { if (day <= 400) { wcity = 3; } else { if (day <= 550) { wcity = 4; } else { if (day <= 700) { wcity = 5; } else { if (day <= 850) { wcity = 6; } else { wcity = 7; } } } } } } if (zcity > wcity) { vcity = zcity; } else { vcity = wcity; } if (vcity == 1) { jenisPasukan2[zi] = random(2) + 1; } if (vcity == 2) { jenisPasukan2[zi] = random(3) + 2; } if (vcity == 3) { jenisPasukan2[zi] = random(4) + 3; } if (vcity == 4) { jenisPasukan2[zi] = random(5) + 4; } if (vcity == 5) { jenisPasukan2[zi] = random(4) + 5; } if (vcity == 6) { jenisPasukan2[zi] = random(3) + 6; } if (vcity == 7) { jenisPasukan2[zi] = random(2) + 7; } } } } } masukSoldier2(acak2); ++zi; } } function masukSoldier(acak, indi1) { i = indi1; soldier = undefined; if (jenisSoldier[i] == 6) { soldier = attachMovie('xsuper_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 6; soldier.tipe = 1; soldier.range = 20; soldier.speed = random(4) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 0.75; soldier.armor = 200; } else { if (jenisPasukan[i] == 1) { if (jenisSoldier[i] == 1) { soldier = attachMovie('sword_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 1; soldier.tipe = 1; soldier.range = 10; soldier.speed = random(5) + 3; soldier.speed3 = random(3) + 3; soldier.damage = 0.05; soldier.armor = 50; } else { if (jenisSoldier[i] == 2) { soldier = attachMovie('kuda_mc2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 2; soldier.tipe = 1; soldier.range = 10; soldier.speed = random(6) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 0.1; soldier._yscale = 110; soldier._xscale = 110; soldier.armor = 100; } else { if (jenisSoldier[i] == 5) { soldier = attachMovie('gajah_mc2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 5; soldier.tipe = 1; soldier.range = 10; soldier.speed = 2; soldier.speed3 = 2; soldier.damage = 0.25; soldier.armor = 450; } } } } else { if (jenisPasukan[i] == 2) { if (jenisSoldier[i] == 1) { soldier = attachMovie('arrow_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 1; soldier.tipe = 2; soldier.range = 300; soldier.speed = random(4) + 2; soldier.speed3 = random(2) + 1; soldier.damage = 0.06; soldier._yscale = 85; soldier._xscale = 85; soldier.armor = 50; } else { if (jenisSoldier[i] == 2) { soldier = attachMovie('kuda_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 2; soldier.tipe = 2; soldier.range = 300; soldier.speed = random(6) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 0.12; soldier._yscale = 110; soldier._xscale = 110; soldier.armor = 100; } else { if (jenisSoldier[i] == 3) { soldier = attachMovie('ketapel_mc2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 3; soldier.tipe = 2; soldier.range = 500; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.2; soldier.armor = 25; } else { if (jenisSoldier[i] == 5) { soldier = attachMovie('gajah_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 5; soldier.tipe = 2; soldier.range = 300; soldier.speed = 2; soldier.speed3 = 2; soldier.damage = 0.24; soldier.armor = 450; } } } } } else { if (jenisPasukan[i] == 3) { if (jenisSoldier[i] == 1) { soldier = attachMovie('spear_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 1; soldier.tipe = 1; soldier.range = 15; soldier.speed = random(3) + 2; soldier.speed3 = random(2) + 1; soldier.damage = 0.07000000000000001; soldier.armor = 50; } else { if (jenisSoldier[i] == 2) { soldier = attachMovie('kuda_mc2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 2; soldier.tipe = 1; soldier.range = 15; soldier.speed = random(6) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 0.14; soldier._yscale = 110; soldier._xscale = 110; soldier.armor = 100; } else { if (jenisSoldier[i] == 3) { soldier = attachMovie('ketapel_mc3', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 3; soldier.tipe = 2; soldier.range = 500; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.25; soldier.armor = 25; } else { if (jenisSoldier[i] == 5) { soldier = attachMovie('gajah_mc2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 5; soldier.tipe = 1; soldier.range = 15; soldier.speed = 2; soldier.speed3 = 2; soldier.damage = 0.28; soldier.armor = 450; } } } } } else { if (jenisPasukan[i] == 4) { if (jenisSoldier[i] == 1) { soldier = attachMovie('xfire_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 1; soldier.tipe = 2; soldier.range = 350; soldier.speed = random(4) + 2; soldier.speed3 = random(2) + 1; soldier.damage = 0.06; soldier.armor = 50; } else { if (jenisSoldier[i] == 2) { soldier = attachMovie('kuda_mc3', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 2; soldier.tipe = 2; soldier.range = 300; soldier.speed = random(6) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 0.12; soldier._yscale = 110; soldier._xscale = 110; soldier.armor = 100; } else { if (jenisSoldier[i] == 3) { soldier = attachMovie('ketapel_mc4', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 3; soldier.tipe = 2; soldier.range = 500; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.27; soldier.armor = 25; } else { if (jenisSoldier[i] == 5) { soldier = attachMovie('gajah_mc3', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 5; soldier.tipe = 2; soldier.range = 300; soldier.speed = 2; soldier.speed3 = 2; soldier.damage = 0.24; soldier.armor = 450; } } } } } else { if (jenisPasukan[i] == 5) { if (jenisSoldier[i] == 3) { soldier = attachMovie('ketapel_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 3; soldier.tipe = 2; soldier.range = 500; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.3; soldier.armor = 25; } } } } } } if (jenisSoldier[i] == 4) { if (jenisPasukan[i] == 6) { soldier = attachMovie('witch1', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 4; soldier.tipe = 2; soldier.range = 500; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.15; soldier.armor = 25; } else { if (jenisPasukan[i] == 7) { soldier = attachMovie('witch2', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 4; soldier.tipe = 2; soldier.range = 450; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.2; soldier.armor = 25; } else { if (jenisPasukan[i] == 8) { soldier = attachMovie('witch3', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 4; soldier.tipe = 2; soldier.range = 400; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.25; soldier.armor = 25; } else { if (jenisPasukan[i] == 9) { soldier = attachMovie('witch4', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 4; soldier.tipe = 2; soldier.range = 350; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.3; soldier.armor = 25; } else { if (jenisPasukan[i] == 10) { soldier = attachMovie('witch5', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 4; soldier.tipe = 2; soldier.range = 300; soldier.speed = random(1) + 0.5; soldier.speed3 = random(1) + 0.5; soldier.damage = 0.35; soldier.armor = 25; } } } } } } } if (soldier == undefined) { jenisSoldier[i] = 6; soldier = attachMovie('xsuper_mc', 'soldier_mc' + i, dalamSoldier + i); soldier.jenisan = 6; soldier.tipe = 1; soldier.range = 20; soldier.speed = random(4) + 4; soldier.speed3 = random(4) + 4; soldier.damage = 0.75; soldier.armor = 200; bawah['batalion' + i].gotoAndStop(51); xjmlPasukan6 += bawah['batalion' + i].jml; } soldier.damage *= 0.5; soldier.armor = 0; soldier.lari = false; soldier.gotoAndStop(1); soldier._x = _root['kotak' + acak]._x; soldier._y = _root['kotak' + acak]._y; if (bawah['batalion' + i].jml == 0) { bawah['batalion' + i].jml = random(100) + 100; } soldier.nyawa = bawah['batalion' + i].jml; bisaPrajurit = true; sudahIsi[acak] = true; ++jmlJagoan; } function masukSoldier2(acak) { i = indi2; if (jenisPasukan2[i] == 1) { soldier2 = attachMovie('sword2_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 1; soldier2.range = 10; soldier2.speed = random(4) + 2; soldier2.speed3 = random(3) + 3; soldier2.damage = 0.05; soldier2.armor = 50; } else { if (jenisPasukan2[i] == 2) { soldier2 = attachMovie('arrow2_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 2; soldier2.range = 250; soldier2.speed = random(3) + 2; soldier2.speed3 = random(2) + 1; soldier2.damage = 0.06; soldier._yscale = 85; soldier2._xscale = 85; soldier2.armor = 50; } else { if (jenisPasukan2[i] == 3) { soldier2 = attachMovie('spear2_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 1; soldier2.range = 15; soldier2.speed = random(3) + 2; soldier2.speed3 = random(2) + 1; soldier2.damage = 0.07000000000000001; soldier2.armor = 50; } else { if (jenisPasukan2[i] == 4) { soldier2 = attachMovie('xkuda_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 1; soldier2.range = 15; soldier2.speed = random(5) + 3; soldier2.speed3 = random(3) + 3; soldier2.damage = 0.2; soldier._yscale = 110; soldier2._xscale = 110; soldier2.armor = 100; } else { if (jenisPasukan2[i] == 5) { soldier2 = attachMovie('xketapel_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 2; soldier2.range = 500; soldier2.speed = 1.5; soldier2.speed3 = 1.5; soldier2.damage = 0.35; soldier2.armor = 25; } else { if (jenisPasukan2[i] == 6) { soldier2 = attachMovie('xwitch_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 2; soldier2.range = random(200) + 200; soldier2.speed = random(2) + 2; soldier2.speed3 = random(2) + 2; rand = random(4); if (rand == 0) { soldier2.damage = 0.2; } else { if (rand == 1) { soldier2.damage = 0.25; } else { if (rand == 2) { soldier2.damage = 0.3; } else { soldier2.damage = 0.35; } } } soldier2.armor = 25; } else { if (jenisPasukan2[i] == 7) { soldier2 = attachMovie('xgajah_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 1; soldier2.range = 15; soldier2.speed = 2; soldier2.speed3 = 2; soldier2.damage = 0.3; soldier2.armor = 600; } else { if (jenisPasukan2[i] == 8) { soldier2 = attachMovie('xxsuper_mc', 'soldier2_mc' + i, dalamSoldier2 + i); soldier2.tipe = 1; soldier2.range = 20; soldier2.speed = random(4) + 4; soldier2.speed3 = random(4) + 4; soldier2.damage = 0.75; soldier2.armor = 150; } } } } } } } } soldier2.damage *= 0.5; soldier2.armor = 0; soldier2.lari = false; soldier2.gotoAndStop(1); soldier2._x = _root['xkotak' + acak]._x; soldier2._y = _root['xkotak' + acak]._y; soldier2.nyawa = zjmlMusuh + Math.floor(random(zjmlMusuh / 2)); ++indi2; ++jmlMusuh; } function enterSoldier() { if (zpause == false) { if (this.nyawa <= 0) { this.serang = true; } else { if (_root['soldier2_mc' + this.xtarget].nyawa <= 0) { masihHidup = new Array(); keHidup = 0; i = 1; while (i <= 20) { if (_root['soldier2_mc' + i].nyawa > 0) { masihHidup[keHidup] = i; ++keHidup; } ++i; } if (keHidup > 0) { this.serang = false; randKe = random(keHidup); this.xtarget = masihHidup[randKe]; aimX = _root['soldier2_mc' + this.xtarget]._x; aimY = _root['soldier2_mc' + this.xtarget]._y; if (this._x < aimX) { this.tambahan = 0; } else { this.tambahan = 10; } } else { cekSelesai('menang'); } } if (this._x < _root['soldier2_mc' + this.xtarget]._x) { this.tambahan = 0; } else { this.tambahan = 10; } this.serang = false; this.jarak = Math.sqrt(Math.pow(this._x - _root['soldier2_mc' + this.xtarget]._x, 2) + Math.pow(this._y - _root['soldier2_mc' + this.xtarget]._y, 2)); if (this.jarak <= this.range && _root['soldier2_mc' + this.xtarget].nyawa > 0) { this.gotoAndStop(3 + this.tambahan); this.serang = true; if (this.tipe == 1) { _root['soldier2_mc' + this.xtarget].nyawa -= this.damage; } this.rand = random(100); if (this.rand <= xjml) { this.kenaRand = true; } else { this.kenaRand = false; } } } if (this.kenaRand == true) { this.serang = true; if (this.speed3 > 0) { if (this._x >= 100 && this._x < 580) { if (this.tipe == 1) { this._x += this.speed3; } else { this._x -= this.speed3; } this.speed3 -= 0.5; } } else { this.speed3 = random(3) + 3; this.kenaRand = false; } } if (this.serang == false) { this.gotoAndStop(2 + this.tambahan); aimX = _root['soldier2_mc' + this.xtarget]._x; aimY = _root['soldier2_mc' + this.xtarget]._y; if (this._x < aimX) { this.tambahan = 0; } else { this.tambahan = 10; } deltaX = this._x - aimX; deltaY = this._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) > this.speed && _root['soldier2_mc' + this.xtarget].nyawa > 0) { this._y -= this.speed * Math.cos(angle * 0.0174532925199433); this._x += this.speed * Math.sin(angle * 0.0174532925199433); } else { this.gotoAndStop(1 + this.tambahan); this.serang = true; masihHidup = new Array(); keHidup = 0; i = 1; while (i <= 20) { if (_root['soldier2_mc' + i].nyawa > 0) { masihHidup[keHidup] = i; ++keHidup; } ++i; } if (keHidup > 0) { this.serang = false; randKe = random(keHidup); this.xtarget = masihHidup[randKe]; aimX = _root['soldier2_mc' + this.xtarget]._x; aimY = _root['soldier2_mc' + this.xtarget]._y; if (this._x < aimX) { this.tambahan = 0; } else { this.tambahan = 10; } } } } if (this.nyawa <= 0) { if (this.petamaMati == undefined) { this.petamaMati = false; this._rotation += random(50) - 25; this.swapDepths(this.getDepth() - 2000); --jmlJagoan; if (jmlJagoan <= 0) { cekSelesai('kalah'); } } this.gotoAndStop(4 + this.tambahan); if (this.speed2 > 0) { this._x -= this.speed2; --this.speed2; } } } } function cekSelesai(indi) { zpause = true; bawah.surender_btn._visible = false; bawah.atas = ''; i = 1; while (i <= 20) { if (_root['soldier_mc' + i].nyawa > 0) { _root['soldier_mc' + i].gotoAndStop(1); } if (_root['soldier2_mc' + i].nyawa > 0) { _root['soldier2_mc' + i].gotoAndStop(1); } if (indi == 'menang') { if (_root['soldier2_mc' + i]._currentframe != 4 && _root['soldier2_mc' + i]._currentframe != 14) { _root['soldier2_mc' + i].nyawa = 0; _root['soldier2_mc' + i].gotoAndStop(4); } } else { if (_root['soldier_mc' + i]._currentframe != 4 && _root['soldier_mc' + i]._currentframe != 14) { _root['soldier_mc' + i].nyawa = 0; _root['soldier_mc' + i].gotoAndStop(4); } } ++i; } end = attachMovie('end_mc', 'end_mc', dalamEnd); end._x = -60; end._y = -20; if (indi == 'menang') { backMenang(); perangMenang = true; end.gotoAndStop(1); } else { backKalah(); perangMenang = false; end.gotoAndStop(2); } pedangSisa = 0; panahSisa = 0; tombakSisa = 0; apiSisa = 0; coalSisa = 0; iceballSisa = 0; fireballSisa = 0; poisonSisa = 0; hurricaneSisa = 0; earthquakeSisa = 0; xjmlSisa1 = 0; xjmlSisa2 = 0; xjmlSisa3 = 0; xjmlSisa4 = 0; xjmlSisa5 = 0; xjmlSisa6 = 0; i = 1; while (i <= 10) { jmlSisa1 = 0; jmlSisa2 = 0; jmlSisa3 = 0; jmlSisa4 = 0; jmlSisa5 = 0; jmlSisa6 = 0; if (_root['soldier_mc' + i].nyawa <= 0 || isNaN(_root['soldier_mc' + i].nyawa) || _root['soldier_mc' + i].nyawa == undefined) { jmlSisa1 = 0; jmlSisa2 = 0; jmlSisa3 = 0; jmlSisa4 = 0; jmlSisa5 = 0; jmlSisa6 = 0; } else { if (jenisSoldier[i] == 1) { jmlSisa1 = _root['soldier_mc' + i].nyawa; } else { if (jenisSoldier[i] == 2) { jmlSisa2 = _root['soldier_mc' + i].nyawa; } else { if (jenisSoldier[i] == 3) { jmlSisa3 = _root['soldier_mc' + i].nyawa; } else { if (jenisSoldier[i] == 4) { jmlSisa4 = _root['soldier_mc' + i].nyawa; } else { if (jenisSoldier[i] == 5) { jmlSisa5 = _root['soldier_mc' + i].nyawa; } else { if (jenisSoldier[i] == 6) { jmlSisa6 = _root['soldier_mc' + i].nyawa; } } } } } } if (jenisPasukan[i] == 1) { pedangSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 2) { panahSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 3) { tombakSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 4) { apiSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 5) { coalSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 6) { iceballSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 7) { fireballSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 8) { poisonSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 9) { hurricaneSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } else { if (jenisPasukan[i] == 10) { earthquakeSisa += Math.ceil(_root['soldier_mc' + i].nyawa); } } } } } } } } } } } xjmlSisa1 += Math.ceil(jmlSisa1); xjmlSisa2 += Math.ceil(jmlSisa2); xjmlSisa3 += Math.ceil(jmlSisa3); xjmlSisa4 += Math.ceil(jmlSisa4); xjmlSisa5 += Math.ceil(jmlSisa5); xjmlSisa6 += Math.ceil(jmlSisa6); ++i; } end.jagoan1 = xjmlPasukan1 - xjmlSisa1; end.jagoan2 = xjmlPasukan2 - xjmlSisa2; end.jagoan3 = xjmlPasukan3 - xjmlSisa3; end.jagoan4 = xjmlPasukan4 - xjmlSisa4; end.jagoan5 = xjmlPasukan5 - xjmlSisa5; end.jagoan6 = xjmlPasukan6 - xjmlSisa6; xxjmlSisa2 = 0; i = 1; while (i <= 10) { if (_root['soldier2_mc' + i].nyawa <= 0 || isNaN(_root['soldier2_mc' + i].nyawa) || _root['soldier2_mc' + i].nyawa == undefined) { xxjmlSisa2 = 0; } else { xxjmlSisa2 = _root['soldier2_mc' + i].nyawa; } xxjmlSisa2 += Math.floor(_root['soldier2_mc' + i].nyawa); ++i; } end.musuh = Math.floor(xxjmlPasukan2 - xxjmlSisa2); if (indi == 'menang') { end.money = (random(5) + 1) * 1500; end.food = (random(5) + 1) * 500; end.logs = (random(5) + 1) * 250; end.iron = (random(5) + 1) * 100; end.sword = (random(5) + 1) * 50; end.xarrow = (random(5) + 1) * 75; } else { if (tipeWar == 'serang') { end.money = Number(random(100) + 100); end.food = Number(random(100) + 100); end.logs = Number(random(100) + 100); end.iron = Number(random(100) + 100); } else { end.money = random(100) + 100; end.food = random(100) + 100; end.logs = random(100) + 100; end.iron = random(100) + 100; } } if (tipeWar == 'bertahan' && indi == 'menang') { _root.moneyKota[_root.pilihKota] += end.money; _root.foodKota[_root.pilihKota] += end.food; _root.ironKota[_root.pilihKota] += end.iron; _root.woodKota[_root.pilihKota] += end.logs; _root.soldierKota[_root.pilihKota] += xjmlSisa1; _root.horseKota[_root.pilihKota] += xjmlSisa2; _root.catapultKota[_root.pilihKota] += xjmlSisa3; _root.witchKota[_root.pilihKota] += xjmlSisa4; _root.elephantKota[_root.pilihKota] += xjmlSisa5; _root.xsuperKota[_root.pilihKota] += xjmlSisa6; } else { if (tipeWar == 'serang' && indi == 'menang') { _root.moneyKota[_root.kotaDiserang] += end.money; _root.foodKota[_root.kotaDiserang] += end.food; _root.ironKota[_root.kotaDiserang] += end.iron; _root.woodKota[_root.kotaDiserang] += end.logs; _root.soldierKota[_root.pilihKota] += xjmlSisa1; _root.horseKota[_root.pilihKota] += xjmlSisa2; _root.catapultKota[_root.pilihKota] += xjmlSisa3; _root.witchKota[_root.pilihKota] += xjmlSisa4; _root.elephantKota[_root.pilihKota] += xjmlSisa5; _root.xsuperKota[_root.pilihKota] += xjmlSisa6; if (pedangSisa >= 2000) { pedangSisa = 2000; } if (panahSisa >= 2000) { panahSisa = 2000; } if (tombakSisa >= 2000) { tombakSisa = 2000; } if (tombakSisa >= 2000) { tombakSisa = 2000; } if (apiSisa >= 2000) { apiSisa = 2000; } if (coalSisa >= 2000) { coalSisa = 2000; } if (iceballSisa >= 2000) { iceballSisa = 2000; } if (fireballSisa >= 2000) { fireballSisa = 2000; } if (poisonSisa >= 2000) { poisonSisa = 2000; } if (hurricaneSisa >= 2000) { hurricaneSisa = 2000; } if (earthquakeSisa >= 2000) { earthquakeSisa = 2000; } _root.swordKota[_root.pilihKota] += pedangSisa; _root.xarrowKota[_root.pilihKota] += panahSisa; _root.spearKota[_root.pilihKota] += tombakSisa; _root.fireKota[_root.pilihKota] += apiSisa; _root.coalKota[_root.pilihKota] += coalSisa; _root.iceballKota[_root.pilihKota] += iceballSisa; _root.fireballKota[_root.pilihKota] += fireballSisa; _root.posionKota[_root.pilihKota] += poisonSisa; _root.hurricaneKota[_root.pilihKota] += hurricaneSisa; _root.eartquakeKota[_root.pilihKota] += earthquakeSisa; } } _root.workerKota[_root.pilihKota] += end.jagoan1; _root.workerKota[_root.pilihKota] += end.jagoan2; _root.workerKota[_root.pilihKota] += end.jagoan3; _root.workerKota[_root.pilihKota] += end.jagoan4; _root.workerKota[_root.pilihKota] += end.jagoan5; _root.workerKota[_root.pilihKota] += end.jagoan6; end.ok_btn.onRelease = function () { clearSemua2(); myMusic.stop(); gotoAndStop(38); }; } function enterAsap() { this._y -= this.speed / 1.5; rand = random(2); if (rand == 0) { this._x -= 0.5; } else { this._x += 0.5; } this._alpha -= random(4) + 1; if (this._alpha <= 0) { removeMovieClip(this); } } function enterSerpih() { this._y -= this.speed; if (this.rand == 0) { this._x -= this.speedY; } else { this._x += this.speedY; } this._rotation += 5; --this.speed; if (this.speed <= -10) { removeMovieClip(this); } } function cekDarah1(indi) { drand = random(100); if (drand <= 25) { backDarah(); } darah = attachMovie('darah_mc', 'darah_mc' + dalamDarah, dalamDarah); darah._rotation = random(360); darah._yscale = random(25) + 50; darah._xscale = darah._yscale; darah._x = indi._x - random(50) + 25; darah._y = indi._y - random(50) + 25; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } } function cekAir(indi) { drand = random(100); if (drand <= 25) { backDarah(); } darah = attachMovie('air2_mc', 'darah_mc' + dalamDarah, dalamDarah); darah._rotation = random(360); darah._yscale = random(25) + 50; darah._xscale = darah._yscale; darah._x = indi._x - random(50) + 25; darah._y = indi._y - random(50) + 25; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } } function cekAir2(indi) { drand = random(100); if (drand <= 25) { backDarah(); } darah = attachMovie('water2_mc', 'darah_mc' + dalamDarah, dalamDarah2); darah._rotation = random(360); darah._yscale = random(50) + 50; darah._xscale = darah._yscale; darah._x = indi._x - random(50) + 25; darah._y = indi._y - random(50) + 25; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } } function cekApi(indi) { backApi(); drand = random(100); if (drand <= 25) { backDarah(); } darah = attachMovie('api_mc', 'darah_mc' + dalamDarah, dalamDarah); darah._yscale = random(10) + 10; darah._xscale = darah._yscale; darah._x = indi._x - random(50) + 25; darah._y = indi._y - random(50) + 25; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } xrand = random(100); if (xrand > 30) { i = 0; while (i <= 3) { rand = random(2); if (rand == 1) { asap = attachMovie('asap2_mc', 'asap_mc' + dalamDarah, dalamDarah); } else { asap = attachMovie('asap_mc', 'asap_mc' + dalamDarah, dalamDarah); } asap._x = indi._x + random(20) - 10; asap._y = indi._y + random(20) - 10; asap._xscale = random(25) + 25; asap._yscale = asap._xscale; asap._rotation = random(360); asap.speed = random(15) + 1; asap.onEnterFrame = enterAsap; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } ++i; } } xrand = random(100); if (xrand > 30) { i = 0; while (i <= 5) { rand = 12; serpih = attachMovie('serpih' + rand, 'serpih_mc' + dalamDarah, dalamDarah); serpih._x = indi._x; serpih._y = indi._y; serpih._xscale = random(5) + 3; serpih._yscale = serpih._xscale; serpih._rotation = random(360); serpih.speed = random(10) + 5; serpih.rand = random(2); serpih.speedY = random(5) + 2; serpih.onEnterFrame = enterSerpih; ++dalamDarah; if (dalamDarah > 5500) { dalamDarah = 5000; } ++i; } } } function cekDarah2(indi) { backMati(); rand = random(2); if (rand == 0) { darah2 = attachMovie('darah2_mc', 'darah2_mc' + dalamDarah2, dalamDarah2); } else { darah2 = attachMovie('darah3_mc', 'darah2_mc' + dalamDarah2, dalamDarah2); } darah2._rotation = random(360); darah2._yscale = random(50) + 50; darah2._xscale = darah2._yscale; darah2._x = indi._x - random(50) + 25; darah2._y = indi._y - random(50) + 25; ++dalamDarah2; if (dalamDarah2 > 500) { dalamDarah2 = 10; } } function cekPanah(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('anak_panah', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekPanahApi(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('anak_panah_api', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak2; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekBatu(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('batu_panah', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier_mc' + indi.xtarget]._x; aimY = _root['soldier_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterBatu; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function xxcekBatu(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('batu_panah2', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier_mc' + indi.xtarget]._x; aimY = _root['soldier_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterBatu2; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function yycekBatu(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { wrand = random(4); if (wrand == 0) { anak = attachMovie('sihir1', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); } else { if (wrand == 1) { anak = attachMovie('sihir2', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); } else { if (wrand == 2) { anak = attachMovie('sihir3', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); } else { if (wrand == 3) { anak = attachMovie('sihir4', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); } } } } anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier_mc' + indi.xtarget]._x; aimY = _root['soldier_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; if (wrand == 0) { anak.onEnterFrame = enterBatu2x; } else { anak.onEnterFrame = enterBatu2; } ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekSihir1(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('sihir1', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterSihir1; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekSihir2(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('sihir2', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterSihir2; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekSihir3(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('sihir3', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterSihir3; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekSihir4(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('sihir4', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterSihir4; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekSihir5(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('sihir5', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; anak.angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak.onEnterFrame = enterSihir5; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekBatu2(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('batu_panah2', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 18; anak._xscale = 18; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak2; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekBatu3(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('anak_panah', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekBatu4(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('tombak_panah', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function cekBatu5(indi, indi2) { if (_root['soldier2_mc' + indi.xtarget].nyawa > 0) { anak = attachMovie('anak_panah_api', 'anak_panah' + dalamAnakPanah, dalamAnakPanah); anak._x = indi._x; anak._y = indi._y - 25; anak._yscale = 9; anak._xscale = 9; anak.jenis = indi2; anak.speed = 20; anak.damage = indi.damage; aimX = _root['soldier2_mc' + indi.xtarget]._x; aimY = _root['soldier2_mc' + indi.xtarget]._y; anak.xtarget = indi.xtarget; deltaX = indi._x - aimX; deltaY = indi._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; anak._rotation = angle; anak.onEnterFrame = enterAnak; ++dalamAnakPanah; if (dalamAnakPanah > 8500) { dalamAnakPanah = 8000; } } } function enterAnak() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekDarah1(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 15; removeMovieClip(this); } } function enterAnak2() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekApi(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 30; removeMovieClip(this); } } function enterBatu() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier_mc' + this.xtarget])) { cekDarah1(_root['soldier_mc' + this.xtarget]); _root['soldier_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterBatu2() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier_mc' + this.xtarget])) { cekDarah1(_root['soldier_mc' + this.xtarget]); cekApi(_root['soldier2_mc' + this.xtarget]); _root['soldier_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterBatu2x() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier_mc' + this.xtarget])) { cekAir(_root['soldier_mc' + this.xtarget]); xrand = random(100); if (xrand < 15) { cekAir2(_root['soldier_mc' + this.xtarget]); } _root['soldier_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterSihir1() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekAir(_root['soldier2_mc' + this.xtarget]); xrand = random(100); if (xrand < 15) { cekAir2(_root['soldier2_mc' + this.xtarget]); } _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 15; removeMovieClip(this); } } function enterSihir2() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekDarah(_root['soldier2_mc' + this.xtarget]); cekApi(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 15; removeMovieClip(this); } } function enterSihir3() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekDarah(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterSihir4() { this._y -= this.speed * Math.cos(this._rotation * 0.0174532925199433); this._x += this.speed * Math.sin(this._rotation * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekDarah(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterSihir5() { this._y -= this.speed * Math.cos(this.angle * 0.0174532925199433); this._x += this.speed * Math.sin(this.angle * 0.0174532925199433); if (this.speed < 5) { this.speed -= 0.25; } if (this._x > 700 || this._x < 0) { removeMovieClip(this); } if (this.hitTest(_root['soldier2_mc' + this.xtarget])) { cekDarah(_root['soldier2_mc' + this.xtarget]); _root['soldier2_mc' + this.xtarget].nyawa -= this.damage * 20; removeMovieClip(this); } } function enterSoldier2() { if (zpause == false) { zxjmlSisa2 = 0; i = 1; while (i <= 10) { if (_root['soldier2_mc' + i].nyawa <= 0 || isNaN(_root['soldier2_mc' + i].nyawa) || _root['soldier2_mc' + i].nyawa == undefined) { zjmlSisa2 = 0; } else { zjmlSisa2 = _root['soldier2_mc' + i].nyawa; } zxjmlSisa2 += Math.floor(_root['soldier2_mc' + i].nyawa); ++i; } if (this.nyawa > 0) { if (zxjmlSisa2 <= xxjmlPasukan2 / 10) { if (musuhLari == true) { this.lari = true; } } } if (this.lari == false) { if (this.nyawa <= 0) { this.serang = true; this.kenaRand = false; } else { if (_root['soldier_mc' + this.xtarget].nyawa <= 0) { masihHidup = new Array(); keHidup = 0; i = 1; while (i <= 20) { if (_root['soldier_mc' + i].nyawa > 0) { masihHidup[keHidup] = i; ++keHidup; } ++i; } if (keHidup > 0) { this.serang = false; randKe = random(keHidup); this.xtarget = masihHidup[randKe]; aimX = _root['soldier_mc' + this.xtarget]._x; aimY = _root['soldier_mc' + this.xtarget]._y; if (this._x > aimX) { this.tambahan = 0; } else { this.tambahan = 10; } } else { cekSelesai('kalah'); } } if (this._x > _root['soldier_mc' + this.xtarget]._x) { this.tambahan = 0; } else { this.tambahan = 10; } this.serang = false; this.jarak = Math.sqrt(Math.pow(this._x - _root['soldier_mc' + this.xtarget]._x, 2) + Math.pow(this._y - _root['soldier_mc' + this.xtarget]._y, 2)); if (this.jarak <= this.range && _root['soldier_mc' + this.xtarget].nyawa > 0) { this.gotoAndStop(3 + this.tambahan); this.serang = true; if (this.tipe == 1) { _root['soldier_mc' + this.xtarget].nyawa -= this.damage; } this.rand = random(100); if (this.rand <= xjml) { this.kenaRand = true; } else { this.kenaRand = false; } } } if (this.kenaRand == true) { this.serang = true; if (this.speed3 > 0) { if (this._x >= 100 && this._x < 580) { if (this.tipe == 1) { this._x -= this.speed3; } else { this._x += this.speed3; } this.speed3 -= 0.5; } } else { this.speed3 = random(3) + 3; this.kenaRand = false; } } if (this.serang == false) { this.gotoAndStop(2 + this.tambahan); aimX = _root['soldier_mc' + this.xtarget]._x; aimY = _root['soldier_mc' + this.xtarget]._y; if (this._x > aimX) { this.tambahan = 0; } else { this.tambahan = 10; } deltaX = this._x - aimX; deltaY = this._y - aimY; angle = -Math.atan2(deltaX, deltaY) / 0.0174532925199433; if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) > this.speed && _root['soldier_mc' + this.xtarget].nyawa > 0) { this._y -= this.speed * Math.cos(angle * 0.0174532925199433); this._x += this.speed * Math.sin(angle * 0.0174532925199433); } else { this.gotoAndStop(1 + this.tambahan); this.serang = true; masihHidup = new Array(); keHidup = 0; i = 1; while (i <= 20) { if (_root['soldier_mc' + i].nyawa > 0) { masihHidup[keHidup] = i; ++keHidup; } ++i; } if (keHidup > 0) { this.serang = false; randKe = random(keHidup); this.xtarget = masihHidup[randKe]; aimX = _root['soldier_mc' + this.xtarget]._x; aimY = _root['soldier_mc' + this.xtarget]._y; if (this._x > aimX) { this.tambahan = 0; } else { this.tambahan = 10; } } } } } else { if (this.nyawa > 0) { this.gotoAndStop(12); this._x += this.speed * 1.5; if (this._x >= 700) { this.nyawa = 0; } } } if (this.nyawa <= 0) { if (this.petamaMati == undefined) { this.petamaMati = false; this._rotation += random(50) - 25; this.swapDepths(this.getDepth() - 2000); --jmlMusuh; if (jmlMusuh <= 0) { cekSelesai('menang'); } } this.gotoAndStop(4 + this.tambahan); if (this.speed2 > 0) { this._x += this.speed2; --this.speed2; } } } } function buatBawah() { bawah = attachMovie('bawah_mc', 'bawah_mc', dalamBawah); bawah._x = -250; bawah._y = 380; bawah.atas = 'Place a battalion (press, hold and drag buttons below to green box) after finished, click start.'; cekPosX = new Array(); cekPosY = new Array(); sudahIsi = new Array(); jenisPasukan = new Array(); jenisSoldier = new Array(); i = 1; while (i <= 20) { sudahIsi[i] = false; _root['xbatalion' + i]._visible = false; ++i; } i = 1; while (i <= xjml) { if (wsoldier[i] == 1) { bawah['batalion' + i].gotoAndStop(wjenis[i]); } else { if (wsoldier[i] == 2) { bawah['batalion' + i].gotoAndStop(wjenis[i] + 10); } else { if (wsoldier[i] == 3) { bawah['batalion' + i].gotoAndStop(wjenis[i] + 20); } else { if (wsoldier[i] == 4) { bawah['batalion' + i].gotoAndStop(wjenis[i] + 30); } else { if (wsoldier[i] == 5) { bawah['batalion' + i].gotoAndStop(wjenis[i] + 40); } else { if (wsoldier[i] == 6) { bawah['batalion' + i].gotoAndStop(wjenis[i] + 50); } } } } } } bawah['batalion' + i].jml = wbatalion[i]; bawah['batalion' + i].posX = bawah['batalion' + i]._x; bawah['batalion' + i].posY = bawah['batalion' + i]._y; if (bawah['batalion' + i].jml == 0) { bawah['batalion' + i]._visible = false; jenisPasukan[i] = 0; jenisSoldier[i] = 0; } else { bawah['batalion' + i].onPress = pressBatalion; bawah['batalion' + i].onRelease = releaseBatalion; jenisPasukan[i] = wjenis[i]; jenisSoldier[i] = wsoldier[i]; } ++i; } bawah.surender_btn._visible = false; bawah.random_btn.onRelease = klikRandom; bawah.start_btn.onRelease = klikMulai; bawah.undo_btn.onRelease = klikUndo; } function klikSurender() { cekSelesai('kalah'); } function klikUndo() { indi1 = 1; i = 1; while (i <= 20) { removeMovieClip(_root['soldier_mc' + i]); ++i; } buatBawah(); } function klikMulai() { bisaMulai = false; i = 1; while (i <= 10) { if (_root['soldier_mc' + i] != undefined) { bisaMulai = true; } ++i; } if (bisaMulai == true) { bawah.atas = 'Click surender if you want to quit this demo.'; bawah.surender_btn._visible = true; bawah.random_btn._visible = false; bawah.start_btn._visible = false; bawah.undo_btn._visible = false; bawah.surender_btn.onRelease = klikSurender; jmlPasukan1 = 10; jmlPasukan2 = 10; i = 1; while (i <= 20) { _root['kotak' + i]._visible = false; bawah['batalion' + i].enabled = false; bawah['batalion' + i]._visible = true; if (_root['soldier_mc' + i].nyawa == 0 || _root['soldier_mc' + i].nyawa == undefined || isNaN(_root['soldier_mc' + i].nyawa)) { _root['soldier_mc' + i].nyawa = random(100) + 100; } bawah['batalion' + i].jml = _root['soldier_mc' + i].nyawa; _root['xbatalion' + i]._visible = true; _root['xbatalion' + i].gotoAndStop(jenisPasukan2[i]); _root['xbatalion' + i].jml = _root['soldier2_mc' + i].nyawa; _root['soldier_mc' + i].speed2 = random(6) + 6; _root['soldier_mc' + i].xtarget = random(10) + 1; _root['soldier_mc' + i].tambahan = 0; _root['soldier_mc' + i].gotoAndStop(2); _root['soldier_mc' + i].onEnterFrame = enterSoldier; ++i; } i = 1; while (i <= 20) { _root['xkotak' + i]._visible = false; _root['soldier2_mc' + i].speed2 = random(6) + 6; _root['soldier2_mc' + i].xtarget = random(10) + 1; _root['soldier2_mc' + i].tambahan = 0; _root['soldier2_mc' + i].gotoAndStop(2); _root['soldier2_mc' + i].onEnterFrame = enterSoldier2; ++i; } } } function cekKedalaman() { i = 1; while (i <= 10) { j = i + 1; while (j <= 10) { if (_root['soldier_mc' + i]._y > _root['soldier2_mc' + j]._y) { if (_root['soldier_mc' + i].getDepth() < _root['soldier2_mc' + j].getDepth()) { if (_root['soldier_mc' + i].nyawa > 0 && _root['soldier2_mc' + j].nyawa > 0) { _root['soldier_mc' + i].swapDepths(_root['soldier2_mc' + j]); } } } else { if (_root['soldier_mc' + i]._y < _root['soldier2_mc' + j]._y) { if (_root['soldier_mc' + i].getDepth() > _root['soldier2_mc' + j].getDepth()) { if (_root['soldier_mc' + i].nyawa > 0 && _root['soldier2_mc' + j].nyawa > 0) { _root['soldier2_mc' + j].swapDepths(_root['soldier_mc' + i]); } } } } if (_root['soldier_mc' + i]._y > _root['soldier_mc' + j]._y) { if (_root['soldier_mc' + i].getDepth() < _root['soldier_mc' + j].getDepth()) { if (_root['soldier_mc' + i].nyawa > 0 && _root['soldier_mc' + j].nyawa > 0) { _root['soldier_mc' + i].swapDepths(_root['soldier_mc' + j]); } } } else { if (_root['soldier_mc' + i]._y < _root['soldier_mc' + j]._y) { if (_root['soldier_mc' + i].getDepth() > _root['soldier_mc' + j].getDepth()) { if (_root['soldier_mc' + i].nyawa > 0 && _root['soldier_mc' + j].nyawa > 0) { _root['soldier_mc' + j].swapDepths(_root['soldier_mc' + i]); } } } } if (_root['soldier2_mc' + i]._y > _root['soldier2_mc' + j]._y) { if (_root['soldier2_mc' + i].getDepth() < _root['soldier2_mc' + j].getDepth()) { if (_root['soldier2_mc' + i].nyawa > 0 && _root['soldier2_mc' + j].nyawa > 0) { _root['soldier2_mc' + i].swapDepths(_root['soldier2_mc' + j]); } } } else { if (_root['soldier2_mc' + i]._y < _root['soldier2_mc' + j]._y) { if (_root['soldier2_mc' + i].getDepth() > _root['soldier2_mc' + j].getDepth()) { if (_root['soldier2_mc' + i].nyawa > 0 && _root['soldier2_mc' + j].nyawa > 0) { _root['soldier2_mc' + j].swapDepths(_root['soldier2_mc' + i]); } } } } ++j; } ++i; } } function klikRandom() { i = 1; while (i <= 20) { removeMovieClip(_root['soldier_mc' + i]); ++i; } angka = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20); zi = 1; while (zi <= xjml) { if (bawah['batalion' + zi].jml > 0) { acak = random(angka.length); acak2 = angka[acak]; angka[acak] = null; angka.sort(); angka.pop(); masukSoldier(acak2, zi); bawah['batalion' + zi]._visible = false; } ++zi; } cekKedalaman(); } function pressBatalion() { sedangDrag = true; startDrag(this, true); this.swapDepths(this.getNextHighestDepth()); } function releaseBatalion() { myStr = new String(this); if (myStr.length == 26) { indi1 = myStr.substr(myStr.length - 1, 1); } else { indi1 = myStr.substr(myStr.length - 2, 2); } bisaPrajurit = false; ai = 1; while (ai <= 20) { if (sudahIsi[ai] == false) { if (this.hitTest(_root['kotak' + ai])) { if (this.jml > 0) { masukSoldier(ai, indi1); ai = 20; cekKedalaman(); } } } ++ai; } sedangDrag = false; stopDrag(); this._x = this.posX; this._y = this.posY; if (bisaPrajurit == false) { this._visible = true; } else { this._visible = false; } } function clearSemua2() { delete _root.onEnterFrame; removeMovieClip(end_mc); removeMovieClip(bawah_mc); i = 1; while (i <= 20) { removeMovieClip(_root['soldier_mc' + i]); removeMovieClip(_root['soldier2_mc' + i]); ++i; } i = 5000; while (i <= 5500) { removeMovieClip(_root['darah_mc' + i]); ++i; } i = 0; while (i <= 500) { removeMovieClip(_root['darah2_mc' + i]); ++i; } i = 8000; while (i <= 8500) { removeMovieClip(_root['anak_panah' + i]); ++i; } } stop(); rand = random(2); if (rand == 1) { tipeWar = 'bertahan'; } else { tipeWar = 'serang'; } _root.pilihKota = random(6) + 1; _root.kotaDiserang = random(5) + 7; tingkatSulit = random(4) + 1; bykKota = random(12) + 1; wjenis = new Array(); wsoldier = new Array(); wbatalion = new Array(); i = 1; while (i <= 20) { wjenis[i] = random(5) + 1; wsoldier[i] = random(6) + 1; wbatalion[i] = random(100) + 100; ++i; } zjmlMusuh = random(100) + 100; bisaMulai = false; randLari = random(10); day = 1400; if (randLari >= 4) { musuhLari = true; } else { musuhLari = false; } backPerang(); if (tipeWar == 'bertahan') { medan_mc.gotoAndStop(_root.pilihKota); } else { if (tipeWar == 'serang') { medan_mc.gotoAndStop(_root.kotaDiserang + 20); } } init2(); buatKecil(); buatBawah(); buatMusuh(); xjmlPasukan1 = 0; xjmlPasukan2 = 0; xjmlPasukan3 = 0; xjmlPasukan4 = 0; xjmlPasukan5 = 0; xjmlPasukan6 = 0; pedangBawa = 0; panahBawa = 0; tombakBawa = 0; i = 1; while (i <= 10) { jmlSisa1 = 0; jmlSisa2 = 0; jmlSisa3 = 0; jmlSisa4 = 0; jmlSisa5 = 0; jmlSisa6 = 0; if (wbatalion[i] <= 0 || isNaN(wbatalion[i]) || wbatalion[i] == undefined) { jmlSisa1 = 0; jmlSisa2 = 0; jmlSisa3 = 0; jmlSisa4 = 0; jmlSisa5 = 0; jmlSisa6 = 0; } else { if (jenisSoldier[i] == 1) { jmlSisa1 = wbatalion[i]; } else { if (jenisSoldier[i] == 2) { jmlSisa2 = wbatalion[i]; } else { if (jenisSoldier[i] == 3) { jmlSisa3 = wbatalion[i]; } else { if (jenisSoldier[i] == 4) { jmlSisa4 = wbatalion[i]; } else { if (jenisSoldier[i] == 5) { jmlSisa5 = wbatalion[i]; } else { if (jenisSoldier[i] == 6) { jmlSisa6 = wbatalion[i]; } } } } } } } if (jenisPasukan[i] == 1) { pedangBawa += _root['soldier_mc' + i].nyawa; } else { if (jenisPasukan[i] == 2) { panahBawa += _root['soldier_mc' + i].nyawa; } else { if (jenisPasukan[i] == 3) { tombakBawa += _root['soldier_mc' + i].nyawa; } else { if (jenisPasukan[i] == 3) { apiBawa += _root['soldier_mc' + i].nyawa; } } } } xjmlPasukan1 += Math.ceil(jmlSisa1); xjmlPasukan2 += Math.ceil(jmlSisa2); xjmlPasukan3 += Math.ceil(jmlSisa3); xjmlPasukan4 += Math.ceil(jmlSisa4); xjmlPasukan5 += Math.ceil(jmlSisa5); xjmlPasukan6 += Math.ceil(jmlSisa6); ++i; } xxjmlPasukan2 = 0; i = 1; while (i <= 10) { if (_root['soldier2_mc' + i].nyawa <= 0 || isNaN(_root['soldier2_mc' + i].nyawa) || _root['soldier2_mc' + i].nyawa == undefined) { xxjmlSisa2 = 0; } else { xxjmlSisa2 = _root['soldier2_mc' + i].nyawa; } xxjmlPasukan2 += Math.floor(xxjmlSisa2); ++i; } klikRandom(); klikMulai(); _root.onEnterFrame = function () { if (bisaMulai == true) { i = 1; while (i <= 10) { if (_root['soldier_mc' + i].nyawa == undefined) { _root['soldier_mc' + i].nyawa = random(100) + 100; } bawah['batalion' + i].jml = Math.floor(_root['soldier_mc' + i].nyawa); if (bawah['batalion' + i].jml <= 0) { bawah['batalion' + i].jml = 0; if (bawah['batalion' + i]._alpha <= 0) { bawah['batalion' + i]._visible = false; } else { bawah['batalion' + i]._alpha -= 10; } } if (_root['soldier_mc' + i].nyawa == undefined) { _root['soldier_mc' + i].nyawa = random(100) + 100; } _root['xbatalion' + i].jml = Math.floor(_root['soldier2_mc' + i].nyawa); if (_root['xbatalion' + i].jml <= 0) { _root['xbatalion' + i].jml = 0; if (_root['xbatalion' + i]._alpha <= 0) { _root['xbatalion' + i]._visible = false; } else { _root['xbatalion' + i]._alpha -= 10; } } ++i; } cekKedalaman(); } }; } frame 132 { stop(); _root.onMouseDown = function () { delete _root.onMouseDown; initAwalan(); gotoAndStop(38); }; } movieClip 2886 { } movieClip 2887 { } frame 133 { stop(); _root.onMouseDown = function () { delete _root.onMouseDown; initAwalan(); gotoAndStop(38); }; } movieClip 2893 { } movieClip 2894 { }




http://swfchan.com/24/117857/info.shtml
Created: 7/3 -2019 14:07:32 Last modified: 7/3 -2019 14:07:32 Server time: 26/04 -2024 04:35:39