Frame 1
loadVariables ("../../Test/hits.php", "_root");
stop();
Instance of Symbol 9 MovieClip in Frame 1
onClipEvent (enterFrame) {
curentB = Math.floor(_root.getBytesLoaded() / 1024) + " KB";
bar._xscale = Math.floor((100 * _root.getBytesLoaded()) / _root.getBytesTotal());
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.gotoAndPlay(2);
}
}
Frame 2
stop();
Frame 4
gotoAndPlay (3);
Frame 6
ready = 0;
fund.swapDepths(1000);
unitsel.swapDepths(1100);
i = 1;
while (i < 8) {
_root.base.duplicateMovieClip("bas" + i, 800 + i);
_root.cadran.duplicateMovieClip("cadr" + i, 1100 + i);
i++;
}
i = 1;
while (i < 5) {
_root["peas" + i].energy = 8;
_root["peon" + i].energy = 8;
_root["peas" + i].gotoAndStop(97);
_root["peon" + i].gotoAndStop(97);
i++;
}
i = 5;
while (i < 7) {
_root["peas" + i].energy = 0;
_root["peon" + i].energy = 30;
_root["peas" + i].gotoAndStop(527);
_root["peon" + i].gotoAndStop(97);
i++;
}
i = 7;
while (i < 8) {
_root["peas" + i].energy = 0;
_root["peas" + i].gotoAndStop(527);
i++;
}
i = 1;
while (i < 7) {
_root.base.duplicateMovieClip("basx" + i, 850 + i);
i++;
}
i = 1;
while (i < 21) {
_root["tre" + i].chops = 64;
i++;
}
main.swapDepths(3000);
info.swapDepths(3001);
final.swapDepths(5000);
main.tasks.gotoAndStop(4);
main.builds.gotoAndStop(2);
obj1.energy = 200;
obj2.energy = 999;
obj3.energy = 100;
obj4.energy = 100;
obj5.energy = 60;
obj6.energy = 60;
orcobj1.energy = 200;
orcobj2.energy = 999;
orcobj3.energy = 100;
obj2.gold = 3000;
orcobj2.gold = 3000;
main.info.gold = 0;
main.info.lumber = 0;
orcgold = 0;
orclumb = 0;
peas = 4;
fotm = 2;
arch = 1;
peon = 4;
ready = 1;
stop();
Instance of Symbol 305 MovieClip "cadran" in Frame 6
onClipEvent (load) {
gotoAndStop (20);
}
Instance of Symbol 317 MovieClip "obj1" in Frame 6
onClipEvent (enterFrame) {
if (this.energy <= 0) {
this.gotoAndPlay(6);
}
}
Instance of Symbol 325 MovieClip "obj2" in Frame 6
onClipEvent (enterFrame) {
if (gold <= 0) {
energy = 0;
gotoAndPlay (13);
if (this.hitTest(_root.unitsel)) {
_root.unitsel.gotoAndPlay(20);
}
}
}
Instance of Symbol 342 MovieClip "obj5" in Frame 6
onClipEvent (load) {
this._x = 0;
this._y = -3000;
}
onClipEvent (enterFrame) {
if (((energy > 0) && (energy < 40)) && (this._currentframe < 6)) {
gotoAndPlay (6);
}
if ((energy <= 0) && (this._currentframe < 13)) {
gotoAndPlay (13);
this._y = -3000;
_root.swap.farm = _root.swap.farm - 1;
_root.swap.farmsel3 = 0;
}
}
Instance of Symbol 347 MovieClip "obj3" in Frame 6
onClipEvent (load) {
this._x = 0;
this._y = -3000;
}
onClipEvent (enterFrame) {
if (((energy > 0) && (energy < 50)) && (this._currentframe < 6)) {
gotoAndPlay (6);
}
if ((energy <= 0) && (this._currentframe < 13)) {
gotoAndPlay (13);
this._y = -3000;
_root.swap.barak = _root.swap.barak - 1;
_root.swap.farmsel1 = 0;
}
}
Instance of Symbol 350 MovieClip "final" in Frame 6
onClipEvent (load) {
function chkend() {
_root.enm = 6;
l = 1;
while (l < 7) {
if (_root["peon" + l].energy <= 0) {
_root.enm = _root.enm - 1;
}
l++;
}
if ((((((((((_root.fotm == 2) && (_root.arch == 1)) && (_root.enm == 0)) && (_root.obj1._currentframe > 3)) && (_root.obj3._currentframe > 3)) && (_root.obj4._currentframe > 3)) && (_root.obj5._currentframe > 3)) && (_root.obj6._currentframe > 3)) && (_root.orcobj1._currentframe >= 13)) && (_root.orcobj3._currentframe >= 13)) {
_root.final._x = 400;
_root.final._y = 240;
}
}
setInterval(chkend, 400);
}
Instance of Symbol 355 MovieClip "obj4" in Frame 6
onClipEvent (load) {
this._x = 0;
this._y = -3000;
}
onClipEvent (enterFrame) {
if (((energy > 0) && (energy < 50)) && (this._currentframe < 6)) {
gotoAndPlay (6);
}
if ((energy <= 0) && (this._currentframe < 13)) {
gotoAndPlay (13);
this._y = -3000;
_root.swap.mill = _root.swap.mill - 1;
_root.swap.farmsel2 = 0;
}
}
Instance of Symbol 358 MovieClip "orcobj1" in Frame 6
onClipEvent (enterFrame) {
if (((this.energy > 0) && (this.energy < 133)) && (this._currentframe < 6)) {
this.gotoAndPlay(6);
}
if (this.energy <= 0) {
this.gotoAndPlay(13);
}
}
Instance of Symbol 325 MovieClip "orcobj2" in Frame 6
onClipEvent (enterFrame) {
if (gold <= 0) {
energy = 0;
gotoAndPlay (13);
if (this.hitTest(_root.unitsel)) {
_root.unitsel.gotoAndPlay(20);
}
}
}
Instance of Symbol 766 MovieClip "control1" in Frame 6
onClipEvent (load) {
function testhit(sour, dest, who) {
if (sour.hitTest(dest)) {
if (sour.getBounds(_root).xMin == dest.getBounds(_root).xMax) {
who.norgh = 1;
}
if (sour.getBounds(_root).xMax == dest.getBounds(_root).xMin) {
who.nolft = 1;
}
if (sour.getBounds(_root).yMin == dest.getBounds(_root).yMax) {
who.nodwn = 1;
}
if (sour.getBounds(_root).yMax == dest.getBounds(_root).yMin) {
who.noup = 1;
}
}
}
function setang(sour, dest, depl) {
a = sour._x - dest._x;
b = dest._y - sour._y;
d = Math.sqrt((a * a) + (b * b));
x = Math.sqrt(a * a);
y = Math.sqrt(b * b);
sin2 = b / d;
if (((a < 0) && (sin2 >= -0.38)) && (sin2 < 0.38)) {
sour.gotoAndPlay(65 + depl);
}
if (((a < 0) && (sin2 >= 0.38)) && (sin2 < 0.92)) {
sour.gotoAndPlay(81 + depl);
}
if ((sin2 >= 0.92) && (sin2 <= 1)) {
sour.gotoAndPlay(97 + depl);
}
if (((a >= 0) && (sin2 >= 0.38)) && (sin2 < 0.92)) {
sour.gotoAndPlay(113 + depl);
}
if (((a >= 0) && (sin2 >= -0.38)) && (sin2 < 0.38)) {
sour.gotoAndPlay(1 + depl);
}
if (((a >= 0) && (sin2 >= -0.92)) && (sin2 < -0.38)) {
sour.gotoAndPlay(17 + depl);
}
if ((sin2 >= -1) && (sin2 < -0.92)) {
sour.gotoAndPlay(33 + depl);
}
if (((a < 0) && (sin2 >= -0.92)) && (sin2 < -0.38)) {
sour.gotoAndPlay(49 + depl);
}
}
function jobs() {
if (_root.ready == 1) {
i = 1;
while (i < 8) {
if (_root["peas" + i].energy <= 0) {
if (_root["peas" + i]._currentframe < 515) {
_root["peas" + i].gotoAndPlay(516);
_root["bas" + i]._y = -3000;
}
} else {
if (_root["job" + i] != 3) {
u = 1;
while (u < 8) {
if (_root["bas" + i].hitTest(_root["basx" + u])) {
_root["chop" + i] = 0;
_root["peas" + i].chops = 17;
_root["shf" + i] = 0;
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
_root["tmpjob" + i] = _root["job" + i];
_root["peas" + i].hits = 2;
_root["job" + i] = 3;
_root["enemy" + i] = u;
}
u++;
}
}
if (_root["job" + i] == 3) {
if ((_root["enemy" + i] != 0) && (_root["peon" + _root["enemy" + i]]._currentframe < 513)) {
de = 150;
if (i > 6) {
xe = _root["bas" + i]._x - _root["basx" + _root["enemy" + i]]._x;
ye = _root["bas" + i]._y - _root["basx" + _root["enemy" + i]]._y;
de = Math.sqrt((xe * xe) + (ye * ye));
}
if (((_root["bas" + i].hitTest(_root["basx" + _root["enemy" + i]]) == false) && (i < 7)) || ((de >= 150) && (i > 6))) {
_root["whr" + i]._x = _root["basx" + _root["enemy" + i]]._x;
_root["whr" + i]._y = _root["basx" + _root["enemy" + i]]._y;
_root["peas" + i].hits = 2;
} else {
if (_root["peas" + i].hits == 2) {
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
setang(_root["peas" + i], _root["peon" + _root["enemy" + i]], 256);
_root["peas" + i].hits = _root["peas" + i].hits - 1;
}
if (_root["peas" + i].hits == 0) {
if (i > 6) {
_root["peon" + _root["enemy" + i]].energy = _root["peon" + _root["enemy" + i]].energy - 2;
} else if (i > 4) {
_root["peon" + _root["enemy" + i]].energy = _root["peon" + _root["enemy" + i]].energy - 3;
} else {
_root["peon" + _root["enemy" + i]].energy = _root["peon" + _root["enemy" + i]].energy - 1;
}
setang(_root["peas" + i], _root["peon" + _root["enemy" + i]], 0);
_root["peas" + i].stop();
_root["peas" + i].hits = 2;
}
}
}
de = 200;
if (i > 6) {
xe = _root["bas" + i]._x - _root["orcbld" + i]._x;
ye = _root["bas" + i]._y - _root["orcbld" + i]._y;
de = Math.sqrt((xe * xe) + (ye * ye));
}
if ((_root["enemy" + i] == 0) && (_root["orcbld" + i].energy > 0)) {
if (((_root["orcbld" + i].zon.hitTest(_root["bas" + i]) == false) && (i < 7)) || ((de >= 200) && (i > 6))) {
_root["whr" + i]._x = _root["orcbld" + i]._x;
_root["whr" + i]._y = _root["orcbld" + i]._y;
_root["peas" + i].hits = 2;
} else {
if (_root["peas" + i].hits == 2) {
setang(_root["peas" + i], _root["orcbld" + i], 256);
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
_root["peas" + i].hits = _root["peas" + i].hits - 1;
}
if (_root["peas" + i].hits == 0) {
setang(_root["peas" + i], _root["orcbld" + i], 0);
if (i > 6) {
_root["orcbld" + i].energy = _root["orcbld" + i].energy - 2;
} else if (i > 4) {
_root["orcbld" + i].energy = _root["orcbld" + i].energy - 3;
} else {
_root["orcbld" + i].energy = _root["orcbld" + i].energy - 1;
}
_root["peas" + i].stop();
_root["peas" + i].hits = 2;
}
}
}
if (_root["peon" + _root["enemy" + i]].energy <= 0) {
_root["enemy" + i] = 0;
}
if (_root["orcbld" + i].energy <= 0) {
_root["orcbld" + i] = 0;
}
if ((_root["enemy" + i] == 0) && (_root["orcbld" + i] == 0)) {
_root["job" + i] = 0;
_root["shfx" + i] = 0;
_root["chopx" + i] = 0;
_root["peon" + i].chops = 17;
}
}
if (_root["job" + i] == 2) {
if ((_root["shf" + i] == 0) && (_root["peas" + i]._currentframe < 513)) {
if (_root.obj2._currentframe < 5) {
_root["whr" + i]._x = _root.obj2._x;
_root["whr" + i]._y = _root.obj2._y;
} else if (_root.orcobj2._currentframe < 5) {
_root["whr" + i]._x = _root.orcobj2._x;
_root["whr" + i]._y = _root.orcobj2._y;
} else {
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
_root["job" + i] = 0;
}
}
if (_root["bas" + i].hitTest(_root.obj2.zon) || (_root["bas" + i].hitTest(_root.orcobj2.zon))) {
if (_root["peas" + i].timer == 31) {
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
_root["peas" + i].cfrm = _root["peas" + i]._currentframe;
_root["peas" + i].gotoAndPlay(513);
if (_root["sel" + i] == 1) {
_root["cadr" + i].gotoAndPlay(20);
}
if ((_root.orcobj2.gold > 0) && (_root["bas" + i].hitTest(_root.orcobj2.zon))) {
_root.orcobj2.gotoAndPlay(3);
}
if ((_root.obj2.gold > 0) && (_root["bas" + i].hitTest(_root.obj2.zon))) {
_root.obj2.gotoAndPlay(3);
}
_root["peas" + i].timer = _root["peas" + i].timer - 1;
}
_root["peas" + i].timer = _root["peas" + i].timer - 1;
if ((_root["shf" + i] == 0) && (_root["peas" + i].timer == 0)) {
if ((_root.orcobj2.gold > 0) && (_root["bas" + i].hitTest(_root.orcobj2.zon))) {
_root.orcobj2.gotoAndPlay(1);
}
if ((_root.obj2.gold > 0) && (_root["bas" + i].hitTest(_root.obj2.zon))) {
_root.obj2.gotoAndPlay(1);
}
_root["peas" + i]._currentframe = _root["peas" + i].cfrm;
_root["shf" + i] = 384;
if (_root["sel" + i] == 1) {
_root["cadr" + i].gotoAndPlay(1);
}
if (_root["bas" + i].hitTest(_root.orcobj2.zon)) {
_root.orcobj2.gold = _root.orcobj2.gold - 10;
}
if (_root["bas" + i].hitTest(_root.obj2.zon)) {
_root.obj2.gold = _root.obj2.gold - 10;
}
_root["whr" + i]._x = _root.obj1._x;
_root["whr" + i]._y = _root.obj1._y;
}
}
}
if (_root["job" + i] == 1) {
if (_root["tre" + _root["und" + i]].chops <= 0) {
_root["tre" + _root["und" + i]].gotoAndStop(2);
if (_root["shf" + i] == 256) {
_root["chop" + i] = 0;
_root["shf" + i] = 0;
}
}
if ((_root["tre" + _root["und" + i]]._currentframe != 1) && (_root["shf" + i] != 128)) {
_root["und" + i] = 1;
dcop = 3000;
t = 1;
while (t < 21) {
if (_root["tre" + t]._currentframe == 1) {
a = _root["peas" + i]._x - _root["tre" + t]._x;
b = _root["tre" + t]._y - _root["peas" + i]._y;
d = Math.sqrt((a * a) + (b * b));
if (d <= dcop) {
dcop = d;
_root["und" + i] = t;
}
}
t++;
}
_root["whr" + i]._x = _root["tre" + _root["und" + i]]._x;
_root["whr" + i]._y = _root["tre" + _root["und" + i]]._y;
_root["peas" + i].chops = 17;
_root["peas" + i].timer = 31;
if (dcop == 3000) {
_root["job" + i] = 0;
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
}
}
if (_root["bas" + i].hitTest(_root["tre" + _root["und" + i]].zon)) {
if (_root["peas" + i].chops == 17) {
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
setang(_root["peas" + i], _root["tre" + _root["und" + i]], 256);
_root["peas" + i].chops = _root["peas" + i].chops - 1;
}
if ((_root["peas" + i].chops > 0) && (_root["tre" + _root["und" + i]].chops > 0)) {
_root["chop" + i] = 1;
_root["shf" + i] = 256;
}
if (_root["peas" + i].chops == 0) {
_root["chop" + i] = 0;
}
if (_root["chop" + i] == 0) {
if (_root["shf" + i] == 256) {
_root["tre" + _root["und" + i]].chops = _root["tre" + _root["und" + i]].chops - 16;
}
_root["shf" + i] = 128;
if ((_root.swap.mill > 2) && (_root.obj4._currentframe > 3)) {
hx = _root["peas" + i]._x - _root.obj1._x;
hy = _root.obj1._y - _root["peas" + i]._y;
dh = Math.sqrt((hx * hx) + (hy * hy));
mx = _root["peas" + i]._x - _root.obj4._x;
my = _root.obj4._y - _root["peas" + i]._y;
dm = Math.sqrt((mx * mx) + (my * my));
if (dh < dm) {
_root["whr" + i]._x = _root.obj1._x;
_root["whr" + i]._y = _root.obj1._y;
} else {
_root["whr" + i]._x = _root.obj4._x;
_root["whr" + i]._y = _root.obj4._y;
}
} else {
_root["whr" + i]._x = _root.obj1._x;
_root["whr" + i]._y = _root.obj1._y;
}
}
}
}
if (_root["job" + i] == 1) {
if (_root["bas" + i].hitTest(_root.obj1.zon) || (_root["bas" + i].hitTest(_root.obj4.zon))) {
if ((_root["peas" + i].chops == 0) || (_root["shf" + i] == 128)) {
if ((_root.swap.mill > 2) && (_root.obj4._currentframe > 3)) {
_root.main.info.lumber = _root.main.info.lumber + 25;
} else {
_root.main.info.lumber = _root.main.info.lumber + 15;
}
_root["shf" + i] = 0;
_root["peas" + i].chops = 17;
if (_root["tre" + _root["und" + i]]._currentframe == 1) {
_root["whr" + i]._x = _root["tre" + _root["und" + i]]._x;
_root["whr" + i]._y = _root["tre" + _root["und" + i]]._y;
}
}
}
}
if (_root["job" + i] == 2) {
if (_root["bas" + i].hitTest(_root.obj1.zon)) {
if (_root["shf" + i] == 384) {
if (_root.obj1._currentframe > 3) {
_root.main.info.gold = _root.main.info.gold + 15;
} else {
_root.main.info.gold = _root.main.info.gold + 10;
}
_root["shf" + i] = 0;
_root["peas" + i].timer = 31;
}
}
}
}
i++;
}
}
}
i = 1;
while (i < 8) {
_root["sel" + i] = 0;
_root["job" + i] = 0;
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
_root["bas" + i]._x = _root["peas" + i]._x;
_root["bas" + i]._y = _root["peas" + i]._y + 10;
_root["shf" + i] = 0;
_root["chop" + i] = 0;
_root["peas" + i].chops = 17;
_root["peas" + i].timer = 31;
_root["peas" + i].movdwn = 0;
_root["peas" + i].movup = 0;
_root["peas" + i].movlft = 0;
_root["peas" + i].movrgh = 0;
_root["peas" + i].hits = 2;
_root["enemy" + i] = 0;
_root["orcbld" + i] = 0;
i++;
}
setInterval(jobs, 100);
}
onClipEvent (enterFrame) {
if (_root.ready == 1) {
i = 1;
while (i < 8) {
if (_root["chop" + i] == 0) {
if (_root["job" + i] == 0) {
_root["shf" + i] = 0;
}
_root["peas" + i].movdwn = 0;
_root["peas" + i].movup = 0;
_root["peas" + i].movlft = 0;
_root["peas" + i].movrgh = 0;
if (_root["whr" + i]._y > (_root["peas" + i]._y + 1)) {
_root["peas" + i].movdwn = 1;
}
if (_root["whr" + i]._y < (_root["peas" + i]._y - 1)) {
_root["peas" + i].movup = 1;
}
if (_root["whr" + i]._x < (_root["peas" + i]._x - 1)) {
_root["peas" + i].movlft = 1;
}
if (_root["whr" + i]._x > (_root["peas" + i]._x + 1)) {
_root["peas" + i].movrgh = 1;
}
if ((((_root["peas" + i].movlft == 1) || (_root["peas" + i].movup == 1)) || (_root["peas" + i].movrgh == 1)) || (_root["peas" + i].movdwn == 1)) {
_root["peas" + i].nodwn = 0;
_root["peas" + i].noup = 0;
_root["peas" + i].nolft = 0;
_root["peas" + i].norgh = 0;
if (i != 1) {
testhit(_root.bas1, _root["bas" + i], _root["peas" + i]);
}
if (i != 2) {
testhit(_root.bas2, _root["bas" + i], _root["peas" + i]);
}
if (i != 3) {
testhit(_root.bas3, _root["bas" + i], _root["peas" + i]);
}
if (i != 4) {
testhit(_root.bas4, _root["bas" + i], _root["peas" + i]);
}
if (i != 5) {
testhit(_root.bas5, _root["bas" + i], _root["peas" + i]);
}
if (i != 6) {
testhit(_root.bas6, _root["bas" + i], _root["peas" + i]);
}
if (i != 7) {
testhit(_root.bas7, _root["bas" + i], _root["peas" + i]);
}
testhit(_root.obj1.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.obj2.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.obj3.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.obj4.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.obj5.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.obj6.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre1.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre2.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre3.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre4.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre5.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre6.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre7.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre8.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre9.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre10.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre11.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre12.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre13.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre14.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre15.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre16.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre17.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre18.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre19.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.tre20.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.orcobj1.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.orcobj2.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.orcobj3.zon, _root["bas" + i], _root["peas" + i]);
testhit(_root.basx1, _root["bas" + i], _root["peas" + i]);
testhit(_root.basx2, _root["bas" + i], _root["peas" + i]);
testhit(_root.basx3, _root["bas" + i], _root["peas" + i]);
testhit(_root.basx4, _root["bas" + i], _root["peas" + i]);
testhit(_root.basx5, _root["bas" + i], _root["peas" + i]);
testhit(_root.basx6, _root["bas" + i], _root["peas" + i]);
if (_root["peas" + i].nolft == 1) {
_root["peas" + i].movlft = 0;
if (_root["peas" + i].noup == 0) {
_root["peas" + i].movup = 1;
_root["peas" + i].movdwn = 0;
_root["peas" + i].nodwn = 0;
}
}
if (_root["peas" + i].noup == 1) {
_root["peas" + i].movup = 0;
if (_root["peas" + i].norgh == 0) {
_root["peas" + i].movlft = 0;
_root["peas" + i].movrgh = 1;
_root["peas" + i].nolft = 0;
}
}
if (_root["peas" + i].norgh == 1) {
_root["peas" + i].movrgh = 0;
if (_root["peas" + i].nodwn == 0) {
_root["peas" + i].movup = 0;
_root["peas" + i].movdwn = 1;
_root["peas" + i].noup = 0;
}
}
if (_root["peas" + i].nodwn == 1) {
_root["peas" + i].movdwn = 0;
if (_root["peas" + i].nolft == 0) {
_root["peas" + i].movlft = 1;
_root["peas" + i].movrgh = 0;
_root["peas" + i].norgh = 0;
}
}
if ((_root["peas" + i].nolft == 1) && (_root["peas" + i].norgh == 1)) {
_root["peas" + i].movlft = 0;
_root["peas" + i].movrgh = 0;
}
if ((_root["peas" + i].noup == 1) && (_root["peas" + i].nodwn == 1)) {
_root["peas" + i].movup = 0;
_root["peas" + i].movdwn = 0;
}
if (((_root["peas" + i].movlft == 1) && (_root["peas" + i].movup == 0)) && (_root["peas" + i].movdwn == 0)) {
_root["peas" + i].lastmov = 1;
_root["peas" + i]._x = _root["peas" + i]._x - 2;
if ((_root["peas" + i]._currentframe > (1 + _root["shf" + i])) && (_root["peas" + i]._currentframe < (17 + _root["shf" + i]))) {
_root["peas" + i].nextFrame();
} else {
_root["peas" + i].gotoAndPlay(1 + _root["shf" + i]);
}
}
if ((_root["peas" + i].movlft == 1) && (_root["peas" + i].movup == 1)) {
_root["peas" + i].lastmov = 2;
_root["peas" + i]._x = _root["peas" + i]._x - 2;
_root["peas" + i]._y = _root["peas" + i]._y - 2;
if ((_root["peas" + i]._currentframe > (17 + _root["shf" + i])) && (_root["peas" + i]._currentframe < (33 + _root["shf" + i]))) {
_root["peas" + i].nextFrame();
} else {
_root["peas" + i].gotoAndPlay(17 + _root["shf" + i]);
}
}
if (((_root["peas" + i].movup == 1) && (_root["peas" + i].movlft == 0)) && (_root["peas" + i].movrgh == 0)) {
_root["peas" + i].lastmov = 3;
_root["peas" + i]._y = _root["peas" + i]._y - 2;
if ((_root["peas" + i]._currentframe > (33 + _root["shf" + i])) && (_root["peas" + i]._currentframe < (49 + _root["shf" + i]))) {
_root["peas" + i].nextFrame();
} else {
_root["peas" + i].gotoAndPlay(33 + _root["shf" + i]);
}
}
if ((_root["peas" + i].movup == 1) && (_root["peas" + i].movrgh == 1)) {
_root["peas" + i].lastmov = 4;
_root["peas" + i]._x = _root["peas" + i]._x + 2;
_root["peas" + i]._y = _root["peas" + i]._y - 2;
if ((_root["peas" + i]._currentframe > (49 + _root["shf" + i])) && (_root["peas" + i]._currentframe < (65 + _root["shf" + i]))) {
_root["peas" + i].nextFrame();
} else {
_root["peas" + i].gotoAndPlay(49 + _root["shf" + i]);
}
}
if (((_root["peas" + i].movrgh == 1) && (_root["peas" + i].movup == 0)) && (_root["peas" + i].movdwn == 0)) {
_root["peas" + i].lastmov = 5;
_root["peas" + i]._x = _root["peas" + i]._x + 2;
if ((_root["peas" + i]._currentframe > (65 + _root["shf" + i])) && (_root["peas" + i]._currentframe < (81 + _root["shf" + i]))) {
_root["peas" + i].nextFrame();
} else {
_root["peas" + i].gotoAndPlay(65 + _root["shf" + i]);
}
}
if ((_root["peas" + i].movrgh == 1) && (_root["peas" + i].movdwn == 1)) {
_root["peas" + i].lastmov = 6;
_root["peas" + i]._x = _root["peas" + i]._x + 2;
_root["peas" + i]._y = _root["peas" + i]._y + 2;
if ((_root["peas" + i]._currentframe > (81 + _root["shf" + i])) && (_root["peas" + i]._currentframe < (97 + _root["shf" + i]))) {
_root["peas" + i].nextFrame();
} else {
_root["peas" + i].gotoAndPlay(81 + _root["shf" + i]);
}
}
if (((_root["peas" + i].movdwn == 1) && (_root["peas" + i].movlft == 0)) && (_root["peas" + i].movrgh == 0)) {
_root["peas" + i].lastmov = 7;
_root["peas" + i]._y = _root["peas" + i]._y + 2;
if ((_root["peas" + i]._currentframe > (97 + _root["shf" + i])) && (_root["peas" + i]._currentframe < (113 + _root["shf" + i]))) {
_root["peas" + i].nextFrame();
} else {
_root["peas" + i].gotoAndPlay(97 + _root["shf" + i]);
}
}
if ((_root["peas" + i].movlft == 1) && (_root["peas" + i].movdwn == 1)) {
_root["peas" + i].lastmov = 8;
_root["peas" + i]._x = _root["peas" + i]._x - 2;
_root["peas" + i]._y = _root["peas" + i]._y + 2;
if ((_root["peas" + i]._currentframe > (113 + _root["shf" + i])) && (_root["peas" + i]._currentframe < (129 + _root["shf" + i]))) {
_root["peas" + i].nextFrame();
} else {
_root["peas" + i].gotoAndPlay(113 + _root["shf" + i]);
}
}
}
if (_root["peas" + i].energy > 0) {
_root["cadr" + i]._x = _root["peas" + i]._x;
_root["cadr" + i]._y = _root["peas" + i]._y;
_root["bas" + i]._x = _root["peas" + i]._x;
_root["bas" + i]._y = _root["peas" + i]._y + 10;
} else {
_root["bas" + i]._y = -3000;
_root["cadr" + i].gotoAndPlay(20);
}
if (((((_root["job" + i] != 3) && (_root["peas" + i].movlft == 0)) && (_root["peas" + i].movup == 0)) && (_root["peas" + i].movrgh == 0)) && (_root["peas" + i].movdwn == 0)) {
_root["peas" + i].stop();
}
}
i++;
}
}
}
Instance of Symbol 768 MovieClip "swap" in Frame 6
onClipEvent (load) {
function order(a, b) {
var _local2 = a[0];
var _local1 = b[0];
if (_local2 < _local1) {
return(-1);
}
if (_local2 > _local1) {
return(1);
}
return(0);
}
function whosout() {
inpeas = 4;
p = 1;
while (p < 5) {
if (_root["peas" + p].energy <= 0) {
inpeas = inpeas - 1;
_root.main["icon" + p]._alpha = 30;
} else {
_root.main["icon" + p]._alpha = 100;
}
_root.peas = inpeas;
p++;
}
infotm = 2;
p = 5;
while (p < 7) {
if (_root["peas" + p].energy <= 0) {
infotm = infotm - 1;
_root.main["icon" + p]._alpha = 30;
} else {
_root.main["icon" + p]._alpha = 100;
}
_root.fotm = infotm;
p++;
}
inarch = 1;
p = 7;
while (p < 8) {
if (_root["peas" + p].energy <= 0) {
inarch = inarch - 1;
_root.main["icon" + p]._alpha = 30;
} else {
_root.main["icon" + p]._alpha = 100;
}
_root.arch = inarch;
p++;
}
if (_root.swap.keep == 1) {
_root.main.tasks.task5._alpha = 30;
}
if (_root.peas == 4) {
_root.main.tasks.task6._alpha = 30;
} else {
_root.main.tasks.task6._alpha = 100;
}
if ((_root.fotm == 2) || (_root.obj5._currentframe < 4)) {
_root.main.tasks.task7._alpha = 30;
} else {
_root.main.tasks.task7._alpha = 100;
}
if ((((_root.arch == 1) || (_root.obj4._currentframe < 4)) || (_root.obj5._currentframe < 4)) || (_root.obj6._currentframe < 4)) {
_root.main.tasks.task8._alpha = 30;
} else {
_root.main.tasks.task8._alpha = 100;
}
_root.main.builds.bld1._alpha = 30;
if (_root.swap.barak == 2) {
_root.main.builds.bld2._alpha = 30;
}
if (_root.swap.mill == 3) {
_root.main.builds.bld3._alpha = 30;
}
if (_root.swap.farm == 5) {
_root.main.builds.bld4._alpha = 30;
}
}
function depspace() {
_root.swap.dept = new Array();
i = 1;
while (i < 8) {
if (_root["peas" + i].hitTest(_root.util)) {
_root.swap["w" + i] = _root["bas" + i]._y;
_root.swap.dept.push([_root.swap["w" + i], ["peas" + i]]);
}
i++;
}
i = 1;
while (i < 7) {
if (_root["obj" + i].hitTest(_root.util)) {
_root.swap["w100" + i] = _root["obj" + i]._y;
_root.swap.dept.push([_root.swap["w100" + i], ["obj" + i]]);
}
i++;
}
i = 1;
while (i < 21) {
if (_root["tre" + i].hitTest(_root.util)) {
_root.swap["w200" + i] = _root["tre" + i]._y;
_root.swap.dept.push([_root.swap["w200" + i], ["tre" + i]]);
}
i++;
}
i = 1;
while (i < 4) {
if (_root["orcobj" + i].hitTest(_root.util)) {
_root.swap["w300" + i] = _root["orcobj" + i]._y;
_root.swap.dept.push([_root.swap["w300" + i], ["orcobj" + i]]);
}
i++;
}
i = 1;
while (i < 7) {
if (_root["peon" + i].hitTest(_root.util)) {
_root.swap["w400" + i] = _root["basx" + i]._y;
_root.swap.dept.push([_root.swap["w400" + i], ["peon" + i]]);
}
i++;
}
_root.swap.dept.sort(order);
q = 1 + _root.swap.dept.length;
i = 1;
while (i < q) {
_root[dept[i - 1][1]].swapDepths(2000 + i);
i++;
}
}
i = 1;
while (i < 8) {
_root["sel" + i] = 0;
i++;
}
tip = 0;
keep = 0;
barak = 1;
mill = 2;
farm = 3;
orcbarak = 1;
orcmill = 2;
orcfarm = 3;
m = 1;
while (m < 5) {
this["farmsel" + m] = 0;
this["noplace" + m] = 0;
m++;
}
setInterval(whosout, 300);
setInterval(depspace, 200);
}
onClipEvent (mouseDown) {
newpeas = 0;
newarch = 0;
newfotm = 0;
n = 1;
while (n < 5) {
if ((this["farmsel" + n] == 1) && (_root._xmouse > 160)) {
this["noplace" + n] = 0;
i = 1;
while (i < 21) {
if (_root["obj" + (2 + n)].hitTest(_root["tre" + i])) {
this["noplace" + n] = this["noplace" + n] + 1;
}
i++;
}
i = 1;
while (i < 8) {
if (_root["obj" + (2 + n)].hitTest(_root["peas" + i])) {
this["noplace" + n] = this["noplace" + n] + 1;
}
i++;
}
i = 1;
while (i < 4) {
if (_root["obj" + (2 + n)].hitTest(_root["orcobj" + i])) {
this["noplace" + n] = this["noplace" + n] + 1;
}
i++;
}
i = 1;
while (i < 7) {
if (_root["obj" + (2 + n)].hitTest(_root["peon" + i])) {
this["noplace" + n] = this["noplace" + n] + 1;
}
i++;
}
i = 1;
while (i < 7) {
if (_root["obj" + (2 + n)].hitTest(_root["obj" + i]) && (i != (n + 2))) {
this["noplace" + n] = this["noplace" + n] + 1;
}
i++;
}
if (this["noplace" + n] == 0) {
this["farmsel" + n] = 2;
_root["obj" + (2 + n)].gotoAndPlay(2);
_root["obj" + (2 + n)]._x = 2 * Math.floor(_root._xmouse / 2);
_root["obj" + (2 + n)]._y = 2 * Math.floor(_root._ymouse / 2);
_root.main.builds.gotoAndStop(2);
if (tip == 1) {
barak = barak + 1;
_root.main.info.gold = _root.main.info.gold - 500;
_root.main.info.lumber = _root.main.info.lumber - 150;
tip = 0;
}
if (tip == 2) {
mill = mill + 1;
_root.main.info.gold = _root.main.info.gold - 300;
_root.main.info.lumber = _root.main.info.lumber - 100;
tip = 0;
}
if (tip == 3) {
farm = farm + 1;
_root.main.info.gold = _root.main.info.gold - 200;
_root.main.info.lumber = _root.main.info.lumber - 75;
tip = 0;
}
}
}
if (this["farmsel" + n] != 1) {
_root.unitsel.gotoAndPlay(20);
if (_root.orcobj2.zon.hitTest(_root._xmouse, _root._ymouse, true) && (_root._xmouse > 160)) {
_root.unitsel._xscale = 100;
_root.unitsel._yscale = 100;
_root.unitsel._x = _root.orcobj2._x;
_root.unitsel._y = _root.orcobj2._y;
_root.unitsel.gotoAndPlay(1);
_root.sunet.gotoAndPlay(17);
}
if (_root.main.hitTest(_root._xmouse, _root._ymouse, true)) {
i = 1;
while (i < 8) {
if (_root.main["icon" + i].hitTest(_root._xmouse, _root._ymouse, true) && (_root["peas" + i].energy > 0)) {
_root["cadr" + i].gotoAndPlay(1);
_root.main["icon" + i].gotoAndStop(2);
_root["sel" + i] = 1;
if (i > 6) {
_root.sunet.gotoAndPlay(9);
} else if (i > 4) {
_root.sunet.gotoAndPlay(7);
} else {
_root.sunet.gotoAndPlay(3);
}
_root.main.builds.gotoAndStop(2);
} else if (((_root.main.tasks.hitTest(_root._xmouse, _root._ymouse, true) == false) && (_root.main.builds.hitTest(_root._xmouse, _root._ymouse, true) == false)) && (_root.main.map.hitTest(_root._xmouse, _root._ymouse, true) == false)) {
_root["cadr" + i].gotoAndPlay(20);
_root.main["icon" + i].gotoAndStop(1);
_root["sel" + i] = 0;
}
i++;
}
}
i = 1;
while (i < 8) {
if ((((_root._xmouse > 160) && (_root["sel" + i] == 0)) && (_root["peas" + i].hitTest(_root._xmouse, _root._ymouse, true))) && (_root["peas" + i].energy > 0)) {
_root["cadr" + i].gotoAndPlay(1);
_root.main["icon" + i].gotoAndStop(2);
_root["sel" + i] = 1;
if (i > 6) {
_root.sunet.gotoAndPlay(9);
} else if (i > 4) {
_root.sunet.gotoAndPlay(7);
} else {
_root.sunet.gotoAndPlay(3);
}
j = 1;
while (j < 8) {
if (j != i) {
_root["cadr" + j].gotoAndPlay(20);
_root.main["icon" + j].gotoAndStop(1);
_root["sel" + j] = 0;
}
j++;
}
}
i++;
}
i = 1;
while (i < 8) {
if (((_root._xmouse > 160) && (_root["sel" + i] == 1)) && (tip == 0)) {
if (_root["peas" + i].hitTest(_root._xmouse, _root._ymouse, true) == false) {
_root["whr" + i]._x = _root._xmouse;
_root["whr" + i]._y = _root._ymouse;
if ((_root["job" + i] == 1) && (_root["shf" + i] == 256)) {
_root["job" + i] = 0;
_root["chop" + i] = 0;
_root["shf" + i] = 0;
}
if ((_root["job" + i] == 2) && (_root["shf" + i] == 0)) {
_root["job" + i] = 0;
}
if (_root["job" + i] == 3) {
_root["job" + i] = 0;
_root["shf" + i] = 0;
_root["enemy" + i] = 0;
_root["orcbld" + i] = 0;
}
}
j = 1;
while (j < 21) {
if (_root["tre" + j].zon.hitTest(_root._xmouse, _root._ymouse, true) && (i < 5)) {
_root["job" + i] = 1;
_root["chop" + i] = 0;
_root["peas" + i].chops = 17;
_root["und" + i] = j;
_root.sunet.gotoAndPlay(5);
}
j++;
}
if ((_root["whr" + i].hitTest(_root.obj2.zon) || (_root["whr" + i].hitTest(_root.orcobj2.zon))) && (i < 5)) {
_root["job" + i] = 2;
_root["peas" + i].timer = 31;
_root["shf" + i] = 0;
}
e = 1;
while (e < 7) {
if (_root["whr" + i].hitTest(_root["peon" + e]) && (_root["peon" + e]._currentframe < 515)) {
_root["job" + i] = 3;
_root["enemy" + i] = e;
_root["orcbld" + i] = 0;
if (i > 6) {
_root.sunet.gotoAndPlay(11);
} else {
_root.sunet.gotoAndPlay(5);
}
}
e++;
}
f = 1;
while (f < 4) {
if ((f != 2) && (_root["orcobj" + f].zon.hitTest(_root["whr" + i]))) {
_root["job" + i] = 3;
_root["enemy" + i] = 0;
_root["orcbld" + i] = _root["orcobj" + f];
if (i > 6) {
_root.sunet.gotoAndPlay(11);
} else {
_root.sunet.gotoAndPlay(5);
}
}
f++;
}
}
i++;
}
selected = 0;
i = 1;
while (i < 8) {
if (_root["sel" + i] == 1) {
selected = selected + 1;
}
i++;
}
if (selected == 1) {
_root.main.tasks.gotoAndStop(1);
} else {
if ((_root.main.tasks._currentframe != 2) && (_root.main.tasks._currentframe != 3)) {
_root.main.tasks.gotoAndStop(4);
}
_root.main.builds.gotoAndStop(2);
}
i = 1;
while (i < 8) {
if (_root.main.tasks["task" + i].hitTest(_root._xmouse, _root._ymouse, true)) {
_root.main.tasks["task" + i].gotoAndStop(2);
if (i == 2) {
_root.main.builds.gotoAndStop(1);
} else {
_root.main.builds.gotoAndStop(2);
}
j = 1;
while (j < 8) {
if ((_root["sel" + j] == 1) && (_root["peas" + j]._currentframe != 513)) {
if (i == 1) {
_root["job" + j] = 2;
_root["chop" + j] = 0;
_root["shf" + j] = 0;
_root["whr" + j]._x = _root.obj2._x;
_root["whr" + j]._y = _root.obj2._y;
_root["peas" + j].chops = 17;
_root["peas" + j].timer = 31;
_root["peas" + j].gotoAndStop(97);
}
if (i == 4) {
_root["job" + j] = 0;
_root["chop" + j] = 0;
_root["shf" + j] = 0;
_root["whr" + j]._x = _root["peas" + j]._x;
_root["whr" + j]._y = _root["peas" + j]._y;
_root["peas" + j].chops = 17;
_root["peas" + j].timer = 31;
_root["peas" + j].gotoAndStop(97);
}
}
j++;
}
} else if (_root.main.builds.hitTest(_root._xmouse, _root._ymouse, true) == false) {
_root.main.tasks["task" + i].gotoAndStop(1);
}
if ((selected == 1) && (_root.main.builds["bld" + i].hitTest(_root._xmouse, _root._ymouse, true))) {
_root.main.builds["bld" + i].gotoAndStop(2);
if ((i == 2) && (barak < 2)) {
if ((((_root.main.info.gold >= 500) && (_root.main.info.lumber >= 150)) && (n == barak)) && (this["farmsel" + n] == 0)) {
this["farmsel" + n] = 1;
tip = 1;
}
}
if ((i == 3) && (mill < 3)) {
if ((((_root.main.info.gold >= 300) && (_root.main.info.lumber >= 100)) && (n == mill)) && (this["farmsel" + n] == 0)) {
this["farmsel" + n] = 1;
tip = 2;
}
}
if ((i == 4) && (farm < 5)) {
if ((((_root.main.info.gold >= 200) && (_root.main.info.lumber >= 75)) && (n == farm)) && (this["farmsel" + n] == 0)) {
this["farmsel" + n] = 1;
tip = 3;
}
}
} else {
_root.main.builds["bld" + i].gotoAndStop(1);
}
i++;
}
if (_root.main.tasks.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.main.tasks.task5.hitTest(_root._xmouse, _root._ymouse, true)) {
if (((_root.main.info.gold >= 1000) && (_root.main.info.lumber >= 300)) && (_root.obj1._currentframe == 1)) {
_root.main.info.gold = _root.main.info.gold - 1000;
_root.main.info.lumber = _root.main.info.lumber - 300;
_root.obj1.gotoAndPlay(2);
keep = 1;
}
}
if (_root.main.tasks.task6.hitTest(_root._xmouse, _root._ymouse, true)) {
if ((_root.main.info.gold >= 60) && (_root.peas < 4)) {
i = 1;
while (i < 5) {
if ((this.newpeas == 0) && (_root["peas" + i]._currentframe >= 527)) {
_root["peas" + i]._x = 120 + _root.obj1._x;
_root["peas" + i]._y = ((40 * i) - 80) + _root.obj1._y;
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
_root["job" + i] = 0;
_root["peas" + i].gotoAndStop(97);
_root["peas" + i]._alpha = 100;
_root["peas" + i].energy = 8;
_root.main.info.gold = _root.main.info.gold - 60;
this.newpeas = 1;
}
i++;
}
}
}
if (_root.main.tasks.task7.hitTest(_root._xmouse, _root._ymouse, true)) {
if ((((_root.main.info.gold >= 100) && (_root.main.info.lumber >= 30)) && (_root.fotm < 2)) && (_root.obj5._currentframe > 3)) {
i = 5;
while (i < 7) {
if ((this.newfotm == 0) && (_root["peas" + i]._currentframe >= 527)) {
_root["peas" + i]._x = 80 + _root.obj3._x;
_root["peas" + i]._y = ((40 * i) - 240) + _root.obj3._y;
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
_root["job" + i] = 0;
_root["peas" + i].gotoAndStop(97);
_root["peas" + i]._alpha = 100;
_root["peas" + i].energy = 30;
_root.main.info.gold = _root.main.info.gold - 100;
_root.main.info.lumber = _root.main.info.lumber - 30;
this.newfotm = 1;
}
i++;
}
}
}
if (_root.main.tasks.task8.hitTest(_root._xmouse, _root._ymouse, true)) {
if ((((((_root.main.info.gold >= 80) && (_root.main.info.lumber >= 50)) && (_root.arch < 1)) && (_root.obj4._currentframe > 3)) && (_root.obj5._currentframe > 3)) && (_root.obj6._currentframe > 3)) {
i = 7;
while (i < 8) {
if ((this.newarch == 0) && (_root["peas" + i]._currentframe >= 527)) {
_root["peas" + i]._x = 80 + _root.obj3._x;
_root["peas" + i]._y = ((40 * i) - 240) + _root.obj3._y;
_root["whr" + i]._x = _root["peas" + i]._x;
_root["whr" + i]._y = _root["peas" + i]._y;
_root["job" + i] = 0;
_root["peas" + i].gotoAndStop(97);
_root["peas" + i]._alpha = 100;
_root["peas" + i].energy = 30;
_root.main.info.gold = _root.main.info.gold - 80;
_root.main.info.lumber = _root.main.info.lumber - 50;
this.newarch = 1;
}
i++;
}
}
}
} else if (selected == 0) {
_root.main.tasks.gotoAndStop(4);
}
i = 1;
while (i < 7) {
if (_root["obj" + i].zon.hitTest(_root._xmouse, _root._ymouse, true) && (_root._xmouse > 160)) {
if (i < 5) {
_root.unitsel._xscale = 100;
_root.unitsel._yscale = 100;
}
if (i >= 5) {
_root.unitsel._xscale = 60;
_root.unitsel._yscale = 60;
}
_root.unitsel._x = _root["obj" + i]._x;
_root.unitsel._y = _root["obj" + i]._y;
_root.unitsel.gotoAndPlay(1);
_root.sunet.gotoAndPlay(13 + (2 * i));
if ((i == 1) && (_root.main.tasks._currentframe != 1)) {
_root.main.tasks.gotoAndStop(2);
}
if (((i == 3) && (_root.main.tasks._currentframe != 1)) && (_root.obj3._currentframe > 3)) {
_root.main.tasks.gotoAndStop(3);
}
}
i++;
}
}
n++;
}
}
onClipEvent (enterFrame) {
if (_root.ready == 1) {
o = 1;
while (o < 5) {
if (tip == 1) {
if ((this["farmsel" + o] == 1) && (o == barak)) {
_root["obj" + (2 + o)].energy = 100;
_root["obj" + (2 + o)].gotoAndStop(1);
if (_root._xmouse > 160) {
_root["obj" + (2 + o)]._x = _root._xmouse;
_root["obj" + (2 + o)]._alpha = 100;
} else {
_root["obj" + (2 + o)]._x = 160;
_root["obj" + (2 + o)]._alpha = 50;
}
_root["obj" + (2 + o)]._y = _root._ymouse;
}
}
if (tip == 2) {
if ((this["farmsel" + o] == 1) && (o == mill)) {
_root["obj" + (2 + o)].energy = 100;
_root["obj" + (2 + o)].gotoAndStop(1);
if (_root._xmouse > 160) {
_root["obj" + (2 + o)]._x = _root._xmouse;
_root["obj" + (2 + o)]._alpha = 100;
} else {
_root["obj" + (2 + o)]._x = 160;
_root["obj" + (2 + o)]._alpha = 50;
}
_root["obj" + (2 + o)]._y = _root._ymouse;
}
}
if (tip == 3) {
if ((this["farmsel" + o] == 1) && (o == farm)) {
_root["obj" + (2 + o)].energy = 60;
_root["obj" + (2 + o)].gotoAndStop(1);
if (_root._xmouse > 160) {
_root["obj" + (2 + o)]._x = _root._xmouse;
_root["obj" + (2 + o)]._alpha = 100;
} else {
_root["obj" + (2 + o)]._x = 160;
_root["obj" + (2 + o)]._alpha = 50;
}
_root["obj" + (2 + o)]._y = _root._ymouse;
}
}
o++;
}
}
}
Instance of Symbol 766 MovieClip "control2" in Frame 6
onClipEvent (load) {
function testhit(sour, dest, who) {
if (sour.hitTest(dest)) {
if (sour.getBounds(_root).xMin == dest.getBounds(_root).xMax) {
who.norgh = 1;
}
if (sour.getBounds(_root).xMax == dest.getBounds(_root).xMin) {
who.nolft = 1;
}
if (sour.getBounds(_root).yMin == dest.getBounds(_root).yMax) {
who.nodwn = 1;
}
if (sour.getBounds(_root).yMax == dest.getBounds(_root).yMin) {
who.noup = 1;
}
}
}
function setang(sour, dest, depl) {
a = sour._x - dest._x;
b = dest._y - sour._y;
d = Math.sqrt((a * a) + (b * b));
x = Math.sqrt(a * a);
y = Math.sqrt(b * b);
sin2 = b / d;
if (((a < 0) && (sin2 >= -0.38)) && (sin2 < 0.38)) {
sour.gotoAndPlay(65 + depl);
}
if (((a < 0) && (sin2 >= 0.38)) && (sin2 < 0.92)) {
sour.gotoAndPlay(81 + depl);
}
if ((sin2 >= 0.92) && (sin2 <= 1)) {
sour.gotoAndPlay(97 + depl);
}
if (((a >= 0) && (sin2 >= 0.38)) && (sin2 < 0.92)) {
sour.gotoAndPlay(113 + depl);
}
if (((a >= 0) && (sin2 >= -0.38)) && (sin2 < 0.38)) {
sour.gotoAndPlay(1 + depl);
}
if (((a >= 0) && (sin2 >= -0.92)) && (sin2 < -0.38)) {
sour.gotoAndPlay(17 + depl);
}
if ((sin2 >= -1) && (sin2 < -0.92)) {
sour.gotoAndPlay(33 + depl);
}
if (((a < 0) && (sin2 >= -0.92)) && (sin2 < -0.38)) {
sour.gotoAndPlay(49 + depl);
}
}
function nenem() {
if ((_root.orcobj1._currentframe < 13) && (_root.orcgold >= 60)) {
p = 1;
while (p < 5) {
if ((_root.npeon == 0) && (_root["peon" + p]._currentframe >= 527)) {
_root["peon" + p]._x = _root.orcobj1._x - 96;
_root["peon" + p]._y = ((40 * p) - 80) + _root.orcobj1._y;
if (p >= 3) {
_root["whrx" + p]._x = _root.orcobj1._x;
_root["whrx" + p]._y = _root.orcobj1._y;
_root["peon" + p].chops = 0;
_root["jobx" + p] = 1;
} else {
_root["whrx" + p]._x = _root.orcobj2._x;
_root["whrx" + p]._y = _root.orcobj2._y;
_root["jobx" + p] = 2;
}
_root["peon" + p].gotoAndStop(97);
_root["peon" + p]._alpha = 100;
_root["peon" + p].energy = 8;
_root.orcgold = _root.orcgold - 60;
_root.npeon = 1;
}
p++;
}
}
}
function jobs() {
if (_root.ready == 1) {
_root.npeon = 0;
inpeon = 4;
p = 1;
while (p < 5) {
if (_root["peon" + p].energy <= 0) {
inpeon = inpeon - 1;
}
p++;
}
_root.peon = inpeon;
if (_root.peon < 4) {
nenem();
}
i = 1;
while (i < 7) {
if (_root["peon" + i].energy <= 0) {
if (_root["peon" + i]._currentframe < 515) {
_root["peon" + i].gotoAndPlay(516);
_root["basx" + i]._y = -3000;
}
} else {
if (_root["jobx" + i] != 3) {
u = 1;
while (u < 7) {
if (_root["basx" + i].hitTest(_root["obj" + u]) && (_root["obj" + u]._currentframe >= 5)) {
_root["chopx" + i] = 0;
_root["peon" + i].chops = 17;
_root["shfx" + i] = 0;
_root["whrx" + i]._x = _root["peon" + i]._x;
_root["whrx" + i]._y = _root["peon" + i]._y;
_root["tmpjobx" + i] = _root["jobx" + i];
_root["peon" + i].hits = 2;
_root["jobx" + i] = 3;
_root["enemx" + i] = 0;
_root["bld" + i] = _root["obj" + u];
}
u++;
}
v = 1;
while (v < 8) {
if (_root["basx" + i].hitTest(_root["bas" + v])) {
_root["chopx" + i] = 0;
_root["peon" + i].chops = 17;
_root["shfx" + i] = 0;
_root["whrx" + i]._x = _root["peon" + i]._x;
_root["whrx" + i]._y = _root["peon" + i]._y;
_root["tmpjobx" + i] = _root["jobx" + i];
_root["peon" + i].hits = 2;
_root["jobx" + i] = 3;
_root["enemx" + i] = v;
}
v++;
}
}
if ((_root["jobx" + i] == 0) && (i > 4)) {
if (_root["basx" + i].hitTest(_root[("pp" + (i - 4)) + 1])) {
_root["whrx" + i]._x = _root[("pp" + (i - 4)) + 2]._x;
_root["whrx" + i]._y = _root[("pp" + (i - 4)) + 2]._y;
}
if (_root["basx" + i].hitTest(_root[("pp" + (i - 4)) + 2])) {
_root["whrx" + i]._x = _root[("pp" + (i - 4)) + 1]._x;
_root["whrx" + i]._y = _root[("pp" + (i - 4)) + 1]._y;
}
}
if (_root["jobx" + i] == 3) {
if ((_root["enemx" + i] != 0) && (_root["peas" + _root["enemx" + i]]._currentframe < 513)) {
if (_root["basx" + i].hitTest(_root["bas" + _root["enemx" + i]]) == false) {
_root["whrx" + i]._x = _root["bas" + _root["enemx" + i]]._x;
_root["whrx" + i]._y = _root["bas" + _root["enemx" + i]]._y;
_root["peon" + i].hits = 2;
} else {
if (_root["peon" + i].hits == 2) {
_root["whrx" + i]._x = _root["peon" + i]._x;
_root["whrx" + i]._y = _root["peon" + i]._y;
setang(_root["peon" + i], _root["peas" + _root["enemx" + i]], 256);
_root["peon" + i].hits = _root["peon" + i].hits - 1;
}
if (_root["peon" + i].hits == 0) {
if (i > 4) {
_root["peas" + _root["enemx" + i]].energy = _root["peas" + _root["enemx" + i]].energy - 3;
} else {
_root["peas" + _root["enemx" + i]].energy = _root["peas" + _root["enemx" + i]].energy - 1;
}
setang(_root["peon" + i], _root["peas" + _root["enemx" + i]], 0);
_root["peon" + i].stop();
_root["peon" + i].hits = 2;
}
}
}
if ((_root["enemx" + i] == 0) && (_root["bld" + i].energy > 0)) {
if (_root["bld" + i].zon.hitTest(_root["basx" + i]) == false) {
_root["whrx" + i]._x = _root["bld" + i]._x;
_root["whrx" + i]._y = _root["bld" + i]._y;
_root["peon" + i].hits = 2;
} else {
if (_root["peon" + i].hits == 2) {
setang(_root["peon" + i], _root["bld" + i], 256);
_root["whrx" + i]._x = _root["peon" + i]._x;
_root["whrx" + i]._y = _root["peon" + i]._y;
_root["peon" + i].hits = _root["peon" + i].hits - 1;
}
if (_root["peon" + i].hits == 0) {
setang(_root["peon" + i], _root["bld" + i], 0);
if (i > 4) {
_root["bld" + i].energy = _root["bld" + i].energy - 3;
} else {
_root["bld" + i].energy = _root["bld" + i].energy - 1;
}
_root["peon" + i].stop();
_root["peon" + i].hits = 2;
}
}
}
if (_root["peas" + _root["enemx" + i]].energy <= 0) {
_root["enemx" + i] = 0;
}
if (_root["bld" + i].energy <= 0) {
_root["bld" + i] = 0;
}
if ((_root["enemx" + i] == 0) && (_root["bld" + i] == 0)) {
_root["jobx" + i] = _root["tmpjobx" + i];
if (i < 5) {
if (_root["jobx" + i] == 1) {
_root["shfx" + i] = 128;
}
if (_root["jobx" + i] == 2) {
_root["shfx" + i] = 384;
}
_root["whrx" + i]._x = _root.orcobj1._x;
_root["whrx" + i]._y = _root.orcobj1._y;
_root["chopx" + i] = 0;
_root["peon" + i].chops = 17;
} else {
_root["whrx" + i]._x = _root[("pp" + (i - 4)) + 1]._x;
_root["whrx" + i]._y = _root[("pp" + (i - 4)) + 1]._y;
}
}
}
if (_root["jobx" + i] == 2) {
if ((_root["shfx" + i] == 0) && (_root["peon" + i]._currentframe < 513)) {
if (_root.orcobj2._currentframe < 5) {
_root["whrx" + i]._x = _root.orcobj2._x;
_root["whrx" + i]._y = _root.orcobj2._y;
} else if (_root.obj2._currentframe < 5) {
_root["whrx" + i]._x = _root.obj2._x;
_root["whrx" + i]._y = _root.obj2._y;
} else {
_root["whrx" + i]._x = _root["peon" + i]._x;
_root["whrx" + i]._y = _root["peon" + i]._y;
_root["jobx" + i] = 0;
}
}
if (_root["basx" + i].hitTest(_root.obj2.zon) || (_root["basx" + i].hitTest(_root.orcobj2.zon))) {
if (_root["peon" + i].timer == 31) {
_root["whrx" + i]._x = _root["peon" + i]._x;
_root["whrx" + i]._y = _root["peon" + i]._y;
_root["peon" + i].cfrm = _root["peon" + i]._currentframe;
_root["peon" + i].gotoAndPlay(513);
if ((_root.orcobj2.gold > 0) && (_root["basx" + i].hitTest(_root.orcobj2.zon))) {
_root.orcobj2.gotoAndPlay(3);
}
if ((_root.obj2.gold > 0) && (_root["basx" + i].hitTest(_root.obj2.zon))) {
_root.obj2.gotoAndPlay(3);
}
_root["peon" + i].timer = _root["peon" + i].timer - 1;
}
_root["peon" + i].timer = _root["peon" + i].timer - 1;
if ((_root["shfx" + i] == 0) && (_root["peon" + i].timer == 0)) {
if ((_root.orcobj2.gold > 0) && (_root["basx" + i].hitTest(_root.orcobj2.zon))) {
_root.orcobj2.gotoAndPlay(1);
}
if ((_root.obj2.gold > 0) && (_root["basx" + i].hitTest(_root.obj2.zon))) {
_root.obj2.gotoAndPlay(1);
}
_root["peon" + i]._currentframe = _root["peon" + i].cfrm;
_root["shfx" + i] = 384;
if (_root["basx" + i].hitTest(_root.orcobj2.zon)) {
_root.orcobj2.gold = _root.orcobj2.gold - 10;
}
if (_root["basx" + i].hitTest(_root.obj2.zon)) {
_root.obj2.gold = _root.obj2.gold - 10;
}
_root["whrx" + i]._x = _root.orcobj1._x;
_root["whrx" + i]._y = _root.orcobj1._y;
}
}
}
if (_root["jobx" + i] == 1) {
if (_root["tre" + _root["undx" + i]].chops <= 0) {
_root["tre" + _root["undx" + i]].gotoAndStop(2);
if (_root["shfx" + i] == 256) {
_root["chopx" + i] = 0;
_root["shfx" + i] = 0;
}
}
if ((_root["tre" + _root["undx" + i]]._currentframe != 1) && (_root["shfx" + i] != 128)) {
_root["undx" + i] = 1;
dcop = 3000;
t = 1;
while (t < 21) {
if (_root["tre" + t]._currentframe == 1) {
a = _root["peon" + i]._x - _root["tre" + t]._x;
b = _root["tre" + t]._y - _root["peon" + i]._y;
d = Math.sqrt((a * a) + (b * b));
if (d <= dcop) {
dcop = d;
_root["undx" + i] = t;
}
}
t++;
}
_root["whrx" + i]._x = _root["tre" + _root["undx" + i]]._x;
_root["whrx" + i]._y = _root["tre" + _root["undx" + i]]._y;
_root["peon" + i].chops = 17;
_root["peon" + i].timer = 31;
if (dcop == 3000) {
_root["jobx" + i] = 2;
if (_root.orcobj2._currentframe < 5) {
_root["whrx" + i]._x = _root.orcobj2._x;
_root["whrx" + i]._y = _root.orcobj2._y;
} else if (_root.obj2._currentframe < 5) {
_root["whrx" + i]._x = _root.obj2._x;
_root["whrx" + i]._y = _root.obj2._y;
}
}
}
if (_root["basx" + i].hitTest(_root["tre" + _root["undx" + i]].zon)) {
if (_root["peon" + i].chops == 17) {
_root["whrx" + i]._x = _root["peon" + i]._x;
_root["whrx" + i]._y = _root["peon" + i]._y;
setang(_root["peon" + i], _root["tre" + _root["undx" + i]], 256);
_root["peon" + i].chops = _root["peon" + i].chops - 1;
}
if ((_root["peon" + i].chops > 0) && (_root["tre" + _root["undx" + i]].chops > 0)) {
_root["chopx" + i] = 1;
_root["shfx" + i] = 256;
}
if (_root["peon" + i].chops == 0) {
_root["chopx" + i] = 0;
}
if (_root["chopx" + i] == 0) {
if (_root["shfx" + i] == 256) {
_root["tre" + _root["undx" + i]].chops = _root["tre" + _root["undx" + i]].chops - 16;
}
_root["shfx" + i] = 128;
if ((_root.swap.orcmill > 2) && (_root.orcobj4._currentframe > 3)) {
hx = _root["peon" + i]._x - _root.orcobj1._x;
hy = _root.orcobj1._y - _root["peon" + i]._y;
dh = Math.sqrt((hx * hx) + (hy * hy));
mx = _root["peon" + i]._x - _root.orcobj4._x;
my = _root.orcobj4._y - _root["peon" + i]._y;
dm = Math.sqrt((mx * mx) + (my * my));
if (dh < dm) {
_root["whrx" + i]._x = _root.orcobj1._x;
_root["whrx" + i]._y = _root.orcobj1._y;
} else {
_root["whrx" + i]._x = _root.orcobj4._x;
_root["whrx" + i]._y = _root.orcobj4._y;
}
} else {
_root["whrx" + i]._x = _root.orcobj1._x;
_root["whrx" + i]._y = _root.orcobj1._y;
}
}
}
}
if (_root["jobx" + i] == 1) {
if (_root["basx" + i].hitTest(_root.orcobj1.zon) || (_root["basx" + i].hitTest(_root.orcobj4.zon))) {
if ((_root["peon" + i].chops == 0) || (_root["shfx" + i] == 128)) {
if ((_root.swap.orcmill > 2) && (_root.orcobj4._currentframe > 3)) {
_root.orclumb = _root.orclumb + 25;
} else {
_root.orclumb = _root.orclumb + 15;
}
_root["shfx" + i] = 0;
_root["peon" + i].chops = 17;
if (_root["tre" + _root["undx" + i]]._currentframe == 1) {
_root["whrx" + i]._x = _root["tre" + _root["undx" + i]]._x;
_root["whrx" + i]._y = _root["tre" + _root["undx" + i]]._y;
}
}
}
}
if (_root["jobx" + i] == 2) {
if (_root["basx" + i].hitTest(_root.orcobj1.zon)) {
if (_root["shfx" + i] == 384) {
_root.orcgold = _root.orcgold + 10;
_root["shfx" + i] = 0;
_root["peon" + i].timer = 31;
}
}
}
}
i++;
}
}
}
sens5 = 0;
wy5 = 40;
way5 = wy5;
sens6 = 0;
wy6 = 60;
way6 = wy6;
_root.jobx1 = 2;
_root.whrx1._x = _root.orcobj2._x;
_root.whrx1._y = _root.orcobj2._y;
_root.jobx2 = 2;
_root.whrx2._x = _root.orcobj2._x;
_root.whrx2._y = _root.orcobj2._y;
_root.jobx3 = 1;
_root.whrx3._x = _root.tre13._x;
_root.whrx3._y = _root.tre13._y;
_root.undx3 = 13;
_root.jobx4 = 1;
_root.whrx4._x = _root.tre16._x;
_root.whrx4._y = _root.tre16._y;
_root.undx4 = 16;
_root.jobx5 = 0;
_root.whrx5._x = _root.pp11._x;
_root.whrx5._y = _root.pp11._y;
_root.jobx6 = 0;
_root.whrx6._x = _root.pp21._x;
_root.whrx6._y = _root.pp21._y;
i = 1;
while (i < 7) {
_root["basx" + i]._x = _root["peon" + i]._x;
_root["basx" + i]._y = _root["peon" + i]._y + 10;
_root["shfx" + i] = 0;
_root["chopx" + i] = 0;
_root["peon" + i].chops = 17;
_root["peon" + i].timer = 31;
_root["peon" + i].hits = 2;
_root["enemx" + i] = 0;
_root["bld" + i] = 0;
i++;
}
setInterval(jobs, 100);
}
onClipEvent (enterFrame) {
if (_root.ready == 1) {
i = 1;
while (i < 7) {
if (_root["peon" + i].energy > 0) {
_root["basx" + i]._x = _root["peon" + i]._x;
_root["basx" + i]._y = _root["peon" + i]._y + 10;
if (_root["chopx" + i] == 0) {
if (_root["jobx" + i] == 0) {
_root["shfx" + i] = 0;
}
_root["peon" + i].movdwn = 0;
_root["peon" + i].movup = 0;
_root["peon" + i].movlft = 0;
_root["peon" + i].movrgh = 0;
if (_root["whrx" + i]._y > (_root["peon" + i]._y + 1)) {
_root["peon" + i].movdwn = 1;
}
if (_root["whrx" + i]._y < (_root["peon" + i]._y - 1)) {
_root["peon" + i].movup = 1;
}
if (_root["whrx" + i]._x < (_root["peon" + i]._x - 1)) {
_root["peon" + i].movlft = 1;
}
if (_root["whrx" + i]._x > (_root["peon" + i]._x + 1)) {
_root["peon" + i].movrgh = 1;
}
if ((((_root["peon" + i].movlft == 1) || (_root["peon" + i].movup == 1)) || (_root["peon" + i].movrgh == 1)) || (_root["peon" + i].movdwn == 1)) {
_root["peon" + i].nodwn = 0;
_root["peon" + i].noup = 0;
_root["peon" + i].nolft = 0;
_root["peon" + i].norgh = 0;
if (i != 1) {
testhit(_root.basx1, _root["basx" + i], _root["peon" + i]);
}
if (i != 2) {
testhit(_root.basx2, _root["basx" + i], _root["peon" + i]);
}
if (i != 3) {
testhit(_root.basx3, _root["basx" + i], _root["peon" + i]);
}
if (i != 4) {
testhit(_root.basx4, _root["basx" + i], _root["peon" + i]);
}
if (i != 5) {
testhit(_root.basx5, _root["basx" + i], _root["peon" + i]);
}
if (i != 6) {
testhit(_root.basx6, _root["basx" + i], _root["peon" + i]);
}
testhit(_root.obj1.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.obj2.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.obj3.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.obj4.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.obj5.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.obj6.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre1.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre2.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre3.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre4.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre5.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre6.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre7.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre8.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre9.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre10.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre11.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre12.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre13.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre14.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre15.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre16.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre17.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre18.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre19.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.tre20.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.orcobj1.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.orcobj2.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.orcobj3.zon, _root["basx" + i], _root["peon" + i]);
testhit(_root.bas1, _root["basx" + i], _root["peon" + i]);
testhit(_root.bas2, _root["basx" + i], _root["peon" + i]);
testhit(_root.bas3, _root["basx" + i], _root["peon" + i]);
testhit(_root.bas4, _root["basx" + i], _root["peon" + i]);
testhit(_root.bas5, _root["basx" + i], _root["peon" + i]);
testhit(_root.bas6, _root["basx" + i], _root["peon" + i]);
if (_root["peon" + i].nolft == 1) {
_root["peon" + i].movlft = 0;
if (_root["peon" + i].noup == 0) {
_root["peon" + i].movup = 1;
_root["peon" + i].movdwn = 0;
_root["peon" + i].nodwn = 0;
}
}
if (_root["peon" + i].noup == 1) {
_root["peon" + i].movup = 0;
if (_root["peon" + i].norgh == 0) {
_root["peon" + i].movlft = 0;
_root["peon" + i].movrgh = 1;
_root["peon" + i].nolft = 0;
}
}
if (_root["peon" + i].norgh == 1) {
_root["peon" + i].movrgh = 0;
if (_root["peon" + i].nodwn == 0) {
_root["peon" + i].movup = 0;
_root["peon" + i].movdwn = 1;
_root["peon" + i].noup = 0;
}
}
if (_root["peon" + i].nodwn == 1) {
_root["peon" + i].movdwn = 0;
if (_root["peon" + i].nolft == 0) {
_root["peon" + i].movlft = 1;
_root["peon" + i].movrgh = 0;
_root["peon" + i].norgh = 0;
}
}
if ((_root["peon" + i].nolft == 1) && (_root["peon" + i].norgh == 1)) {
_root["peon" + i].movlft = 0;
_root["peon" + i].movrgh = 0;
}
if ((_root["peon" + i].noup == 1) && (_root["peon" + i].nodwn == 1)) {
_root["peon" + i].movup = 0;
_root["peon" + i].movdwn = 0;
}
if (((_root["peon" + i].movlft == 1) && (_root["peon" + i].movup == 0)) && (_root["peon" + i].movdwn == 0)) {
_root["peon" + i].lastmov = 1;
_root["peon" + i]._x = _root["peon" + i]._x - 2;
if ((_root["peon" + i]._currentframe > (1 + _root["shfx" + i])) && (_root["peon" + i]._currentframe < (17 + _root["shfx" + i]))) {
_root["peon" + i].nextFrame();
} else {
_root["peon" + i].gotoAndPlay(1 + _root["shfx" + i]);
}
}
if ((_root["peon" + i].movlft == 1) && (_root["peon" + i].movup == 1)) {
_root["peon" + i].lastmov = 2;
_root["peon" + i]._x = _root["peon" + i]._x - 2;
_root["peon" + i]._y = _root["peon" + i]._y - 2;
if ((_root["peon" + i]._currentframe > (17 + _root["shfx" + i])) && (_root["peon" + i]._currentframe < (33 + _root["shfx" + i]))) {
_root["peon" + i].nextFrame();
} else {
_root["peon" + i].gotoAndPlay(17 + _root["shfx" + i]);
}
}
if (((_root["peon" + i].movup == 1) && (_root["peon" + i].movlft == 0)) && (_root["peon" + i].movrgh == 0)) {
_root["peon" + i].lastmov = 3;
_root["peon" + i]._y = _root["peon" + i]._y - 2;
if ((_root["peon" + i]._currentframe > (33 + _root["shfx" + i])) && (_root["peon" + i]._currentframe < (49 + _root["shfx" + i]))) {
_root["peon" + i].nextFrame();
} else {
_root["peon" + i].gotoAndPlay(33 + _root["shfx" + i]);
}
}
if ((_root["peon" + i].movup == 1) && (_root["peon" + i].movrgh == 1)) {
_root["peon" + i].lastmov = 4;
_root["peon" + i]._x = _root["peon" + i]._x + 2;
_root["peon" + i]._y = _root["peon" + i]._y - 2;
if ((_root["peon" + i]._currentframe > (49 + _root["shfx" + i])) && (_root["peon" + i]._currentframe < (65 + _root["shfx" + i]))) {
_root["peon" + i].nextFrame();
} else {
_root["peon" + i].gotoAndPlay(49 + _root["shfx" + i]);
}
}
if (((_root["peon" + i].movrgh == 1) && (_root["peon" + i].movup == 0)) && (_root["peon" + i].movdwn == 0)) {
_root["peon" + i].lastmov = 5;
_root["peon" + i]._x = _root["peon" + i]._x + 2;
if ((_root["peon" + i]._currentframe > (65 + _root["shfx" + i])) && (_root["peon" + i]._currentframe < (81 + _root["shfx" + i]))) {
_root["peon" + i].nextFrame();
} else {
_root["peon" + i].gotoAndPlay(65 + _root["shfx" + i]);
}
}
if ((_root["peon" + i].movrgh == 1) && (_root["peon" + i].movdwn == 1)) {
_root["peon" + i].lastmov = 6;
_root["peon" + i]._x = _root["peon" + i]._x + 2;
_root["peon" + i]._y = _root["peon" + i]._y + 2;
if ((_root["peon" + i]._currentframe > (81 + _root["shfx" + i])) && (_root["peon" + i]._currentframe < (97 + _root["shfx" + i]))) {
_root["peon" + i].nextFrame();
} else {
_root["peon" + i].gotoAndPlay(81 + _root["shfx" + i]);
}
}
if (((_root["peon" + i].movdwn == 1) && (_root["peon" + i].movlft == 0)) && (_root["peon" + i].movrgh == 0)) {
_root["peon" + i].lastmov = 7;
_root["peon" + i]._y = _root["peon" + i]._y + 2;
if ((_root["peon" + i]._currentframe > (97 + _root["shfx" + i])) && (_root["peon" + i]._currentframe < (113 + _root["shfx" + i]))) {
_root["peon" + i].nextFrame();
} else {
_root["peon" + i].gotoAndPlay(97 + _root["shfx" + i]);
}
}
if ((_root["peon" + i].movlft == 1) && (_root["peon" + i].movdwn == 1)) {
_root["peon" + i].lastmov = 8;
_root["peon" + i]._x = _root["peon" + i]._x - 2;
_root["peon" + i]._y = _root["peon" + i]._y + 2;
if ((_root["peon" + i]._currentframe > (113 + _root["shfx" + i])) && (_root["peon" + i]._currentframe < (129 + _root["shfx" + i]))) {
_root["peon" + i].nextFrame();
} else {
_root["peon" + i].gotoAndPlay(113 + _root["shfx" + i]);
}
}
}
if (((((_root["jobx" + i] != 3) && (_root["peon" + i].movlft == 0)) && (_root["peon" + i].movup == 0)) && (_root["peon" + i].movrgh == 0)) && (_root["peon" + i].movdwn == 0)) {
_root["peon" + i].stop();
}
}
}
i++;
}
}
}
Instance of Symbol 342 MovieClip "obj6" in Frame 6
onClipEvent (load) {
this._x = 0;
this._y = -3000;
}
onClipEvent (enterFrame) {
if (((energy > 0) && (energy < 40)) && (this._currentframe < 6)) {
gotoAndPlay (6);
}
if ((energy <= 0) && (this._currentframe < 13)) {
gotoAndPlay (13);
this._y = -3000;
_root.swap.farm = _root.swap.farm - 1;
_root.swap.farmsel4 = 0;
}
}
Instance of Symbol 934 MovieClip "info" in Frame 6
onClipEvent (load) {
function inform() {
gold = _root.obj2.gold;
gold2 = _root.orcobj2.gold;
orcenerg3 = _root.orcobj3.energy;
energ1 = _root.obj1.energy;
energ3 = _root.obj3.energy;
energ4 = _root.obj4.energy;
energ5 = _root.obj5.energy;
energ6 = _root.obj6.energy;
orcgold = "Gold: " + _root.orcgold;
orclumb = "Wood: " + _root.orclumb;
gotoAndStop (1);
i = 1;
while (i < 5) {
if (_root.main.tasks["task" + i].hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndPlay(2 * i);
}
if (_root.main.builds["bld" + i].hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndPlay(8 + (2 * i));
}
i++;
}
if (_root.main.tasks.task5.hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndPlay (54);
}
if (_root.main.tasks.task6.hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndPlay (58);
}
if (_root.main.tasks.task7.hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndPlay (60);
}
if (_root.main.tasks.task8.hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndPlay (62);
}
if (_root._xmouse > 160) {
i = 1;
while (i < 7) {
if (_root["obj" + i].zon.hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndPlay(16 + (2 * i));
}
i++;
}
if (_root.obj1.zon.hitTest(_root._xmouse, _root._ymouse, true) && (_root.obj1._currentframe > 3)) {
gotoAndPlay (56);
}
i = 1;
while (i < 4) {
if (_root["orcobj" + i].zon.hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndPlay(38 + (2 * i));
}
i++;
}
i = 1;
while (i < 8) {
if (_root["peas" + i].hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root["peas" + i].energy > 0) {
health = _root["peas" + i].energy;
if (i > 6) {
gotoAndPlay (78);
} else if (i > 4) {
gotoAndPlay (74);
} else {
gotoAndPlay (70);
}
} else {
health = 0;
}
}
i++;
}
i = 1;
while (i < 7) {
if (_root["peon" + i].hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root["peon" + i].energy > 0) {
orchealth = _root["peon" + i].energy;
if (i <= 4) {
gotoAndPlay (72);
}
if (i > 4) {
gotoAndPlay (76);
}
} else {
orchealth = 0;
}
}
i++;
}
}
}
setInterval(inform, 100);
}
Instance of Symbol 1061 MovieClip "orcobj3" in Frame 6
onClipEvent (enterFrame) {
if (((this.energy > 0) && (this.energy < 66)) && (this._currentframe < 6)) {
this.gotoAndPlay(6);
}
if (this.energy <= 0) {
this.gotoAndPlay(13);
}
}
Symbol 18 Button
on (release) {
_root.gotoAndPlay(3);
}
Symbol 21 Button
on (release) {
_root.gotoAndPlay(5);
}
Symbol 22 MovieClip Frame 1
if (_root.author == "Remus Marinescu") {
gotoAndPlay (3);
}
Symbol 22 MovieClip Frame 2
gotoAndPlay (1);
Symbol 22 MovieClip Frame 4
gotoAndPlay (3);
Symbol 298 MovieClip Frame 16
gotoAndPlay (1);
Symbol 298 MovieClip Frame 32
gotoAndPlay (17);
Symbol 298 MovieClip Frame 48
gotoAndPlay (33);
Symbol 298 MovieClip Frame 64
gotoAndPlay (49);
Symbol 298 MovieClip Frame 80
gotoAndPlay (65);
Symbol 298 MovieClip Frame 96
gotoAndPlay (81);
Symbol 298 MovieClip Frame 112
gotoAndPlay (97);
Symbol 298 MovieClip Frame 128
gotoAndPlay (113);
Symbol 298 MovieClip Frame 144
gotoAndPlay (129);
Symbol 298 MovieClip Frame 160
gotoAndPlay (145);
Symbol 298 MovieClip Frame 176
gotoAndPlay (161);
Symbol 298 MovieClip Frame 192
gotoAndPlay (177);
Symbol 298 MovieClip Frame 208
gotoAndPlay (193);
Symbol 298 MovieClip Frame 224
gotoAndPlay (209);
Symbol 298 MovieClip Frame 240
gotoAndPlay (225);
Symbol 298 MovieClip Frame 256
gotoAndPlay (241);
Symbol 298 MovieClip Frame 268
hits = hits - 1;
Symbol 298 MovieClip Frame 272
chops = chops - 1;
gotoAndPlay (257);
Symbol 298 MovieClip Frame 284
hits = hits - 1;
Symbol 298 MovieClip Frame 288
chops = chops - 1;
gotoAndPlay (273);
Symbol 298 MovieClip Frame 300
hits = hits - 1;
Symbol 298 MovieClip Frame 304
chops = chops - 1;
gotoAndPlay (289);
Symbol 298 MovieClip Frame 316
hits = hits - 1;
Symbol 298 MovieClip Frame 320
chops = chops - 1;
gotoAndPlay (305);
Symbol 298 MovieClip Frame 332
hits = hits - 1;
Symbol 298 MovieClip Frame 336
chops = chops - 1;
gotoAndPlay (321);
Symbol 298 MovieClip Frame 348
hits = hits - 1;
Symbol 298 MovieClip Frame 352
chops = chops - 1;
gotoAndPlay (337);
Symbol 298 MovieClip Frame 364
hits = hits - 1;
Symbol 298 MovieClip Frame 368
chops = chops - 1;
gotoAndPlay (353);
Symbol 298 MovieClip Frame 380
hits = hits - 1;
Symbol 298 MovieClip Frame 384
chops = chops - 1;
gotoAndPlay (369);
Symbol 298 MovieClip Frame 400
gotoAndPlay (385);
Symbol 298 MovieClip Frame 416
gotoAndPlay (401);
Symbol 298 MovieClip Frame 432
gotoAndPlay (417);
Symbol 298 MovieClip Frame 448
gotoAndPlay (433);
Symbol 298 MovieClip Frame 464
gotoAndPlay (449);
Symbol 298 MovieClip Frame 480
gotoAndPlay (465);
Symbol 298 MovieClip Frame 496
gotoAndPlay (481);
Symbol 298 MovieClip Frame 512
gotoAndPlay (497);
Symbol 298 MovieClip Frame 514
stop();
Symbol 298 MovieClip Frame 524
alph = 100;
Symbol 298 MovieClip Frame 525
alph = alph - 1;
Symbol 298 MovieClip Frame 526
this._alpha = alph;
if (alph > 0) {
gotoAndPlay (525);
}
Symbol 298 MovieClip Frame 528
stop();
Symbol 305 MovieClip Frame 19
gotoAndPlay (1);
Symbol 305 MovieClip Frame 21
stop();
Symbol 317 MovieClip Frame 1
stop();
Symbol 317 MovieClip Frame 3
stop();
Instance of Symbol 314 MovieClip "upgr" in Symbol 317 MovieClip Frame 3
onClipEvent (load) {
u = 14;
}
onClipEvent (enterFrame) {
if (u > 0) {
u = u - 1;
}
if ((this.bar._width < 50) && (u == 0)) {
u = 14;
this.bar._x = this.bar._x + 1;
this.bar._width = this.bar._width + 2;
}
if (this.bar._width >= 50) {
_parent.gotoAndPlay(4);
}
}
Symbol 317 MovieClip Frame 5
energy = 250;
stop();
Symbol 317 MovieClip Frame 7
stop();
Symbol 320 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 2
stop();
Symbol 325 MovieClip Frame 2
stop();
Symbol 325 MovieClip Frame 4
stop();
Symbol 325 MovieClip Frame 14
stop();
Symbol 342 MovieClip Frame 1
energy = 60;
stop();
Symbol 342 MovieClip Frame 3
stop();
Instance of Symbol 314 MovieClip "upgr" in Symbol 342 MovieClip Frame 3
onClipEvent (load) {
u = 10;
}
onClipEvent (enterFrame) {
if (u > 0) {
u = u - 1;
}
if ((this.bar._width < 50) && (u == 0)) {
u = 10;
this.bar._x = this.bar._x + 1;
this.bar._width = this.bar._width + 2;
}
if (this.bar._width >= 50) {
_parent.gotoAndPlay(4);
}
}
Symbol 342 MovieClip Frame 5
stop();
Symbol 342 MovieClip Frame 12
gotoAndPlay (6);
Symbol 342 MovieClip Frame 14
stop();
Symbol 347 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 3
stop();
Instance of Symbol 314 MovieClip "upgr" in Symbol 347 MovieClip Frame 3
onClipEvent (load) {
u = 12;
}
onClipEvent (enterFrame) {
if (u > 0) {
u = u - 1;
}
if ((this.bar._width < 50) && (u == 0)) {
u = 12;
this.bar._x = this.bar._x + 1;
this.bar._width = this.bar._width + 2;
}
if (this.bar._width >= 50) {
_parent.gotoAndPlay(4);
}
}
Symbol 347 MovieClip Frame 5
stop();
Symbol 347 MovieClip Frame 12
gotoAndPlay (6);
Symbol 347 MovieClip Frame 14
stop();
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 3
stop();
Instance of Symbol 314 MovieClip "upgr" in Symbol 355 MovieClip Frame 3
onClipEvent (load) {
u = 12;
}
onClipEvent (enterFrame) {
if (u > 0) {
u = u - 1;
}
if ((this.bar._width < 50) && (u == 0)) {
u = 12;
this.bar._x = this.bar._x + 1;
this.bar._width = this.bar._width + 2;
}
if (this.bar._width >= 50) {
_parent.gotoAndPlay(4);
}
}
Symbol 355 MovieClip Frame 5
stop();
Symbol 355 MovieClip Frame 12
gotoAndPlay (6);
Symbol 355 MovieClip Frame 14
stop();
Symbol 358 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 12
gotoAndPlay (6);
Symbol 358 MovieClip Frame 14
stop();
Symbol 368 MovieClip Frame 19
gotoAndPlay (1);
Symbol 368 MovieClip Frame 21
stop();
Symbol 637 MovieClip Frame 16
gotoAndPlay (1);
Symbol 637 MovieClip Frame 32
gotoAndPlay (17);
Symbol 637 MovieClip Frame 48
gotoAndPlay (33);
Symbol 637 MovieClip Frame 64
gotoAndPlay (49);
Symbol 637 MovieClip Frame 80
gotoAndPlay (65);
Symbol 637 MovieClip Frame 96
gotoAndPlay (81);
Symbol 637 MovieClip Frame 112
gotoAndPlay (97);
Symbol 637 MovieClip Frame 128
gotoAndPlay (113);
Symbol 637 MovieClip Frame 144
gotoAndPlay (129);
Symbol 637 MovieClip Frame 160
gotoAndPlay (145);
Symbol 637 MovieClip Frame 176
gotoAndPlay (161);
Symbol 637 MovieClip Frame 192
gotoAndPlay (177);
Symbol 637 MovieClip Frame 208
gotoAndPlay (193);
Symbol 637 MovieClip Frame 224
gotoAndPlay (209);
Symbol 637 MovieClip Frame 240
gotoAndPlay (225);
Symbol 637 MovieClip Frame 256
gotoAndPlay (241);
Symbol 637 MovieClip Frame 268
hits = hits - 1;
Symbol 637 MovieClip Frame 272
chops = chops - 1;
gotoAndPlay (257);
Symbol 637 MovieClip Frame 284
hits = hits - 1;
Symbol 637 MovieClip Frame 288
chops = chops - 1;
gotoAndPlay (273);
Symbol 637 MovieClip Frame 300
hits = hits - 1;
Symbol 637 MovieClip Frame 304
chops = chops - 1;
gotoAndPlay (289);
Symbol 637 MovieClip Frame 316
hits = hits - 1;
Symbol 637 MovieClip Frame 320
chops = chops - 1;
gotoAndPlay (305);
Symbol 637 MovieClip Frame 332
hits = hits - 1;
Symbol 637 MovieClip Frame 336
chops = chops - 1;
gotoAndPlay (321);
Symbol 637 MovieClip Frame 348
hits = hits - 1;
Symbol 637 MovieClip Frame 352
chops = chops - 1;
gotoAndPlay (337);
Symbol 637 MovieClip Frame 364
hits = hits - 1;
Symbol 637 MovieClip Frame 368
chops = chops - 1;
gotoAndPlay (353);
Symbol 637 MovieClip Frame 380
hits = hits - 1;
Symbol 637 MovieClip Frame 384
chops = chops - 1;
gotoAndPlay (369);
Symbol 637 MovieClip Frame 400
gotoAndPlay (385);
Symbol 637 MovieClip Frame 416
gotoAndPlay (401);
Symbol 637 MovieClip Frame 432
gotoAndPlay (417);
Symbol 637 MovieClip Frame 448
gotoAndPlay (433);
Symbol 637 MovieClip Frame 464
gotoAndPlay (449);
Symbol 637 MovieClip Frame 480
gotoAndPlay (465);
Symbol 637 MovieClip Frame 496
gotoAndPlay (481);
Symbol 637 MovieClip Frame 512
gotoAndPlay (497);
Symbol 637 MovieClip Frame 514
stop();
Symbol 637 MovieClip Frame 524
alph = 100;
Symbol 637 MovieClip Frame 525
alph = alph - 1;
Symbol 637 MovieClip Frame 526
this._alpha = alph;
if (alph > 0) {
gotoAndPlay (525);
}
Symbol 637 MovieClip Frame 528
stop();
Symbol 762 MovieClip Frame 16
gotoAndPlay (1);
Symbol 762 MovieClip Frame 32
gotoAndPlay (17);
Symbol 762 MovieClip Frame 48
gotoAndPlay (33);
Symbol 762 MovieClip Frame 64
gotoAndPlay (49);
Symbol 762 MovieClip Frame 80
gotoAndPlay (65);
Symbol 762 MovieClip Frame 96
gotoAndPlay (81);
Symbol 762 MovieClip Frame 112
gotoAndPlay (97);
Symbol 762 MovieClip Frame 128
gotoAndPlay (113);
Symbol 762 MovieClip Frame 268
hits = hits - 1;
Symbol 762 MovieClip Frame 272
gotoAndPlay (257);
Symbol 762 MovieClip Frame 284
hits = hits - 1;
Symbol 762 MovieClip Frame 288
gotoAndPlay (273);
Symbol 762 MovieClip Frame 300
hits = hits - 1;
Symbol 762 MovieClip Frame 304
gotoAndPlay (289);
Symbol 762 MovieClip Frame 316
hits = hits - 1;
Symbol 762 MovieClip Frame 320
gotoAndPlay (305);
Symbol 762 MovieClip Frame 332
hits = hits - 1;
Symbol 762 MovieClip Frame 336
gotoAndPlay (321);
Symbol 762 MovieClip Frame 348
hits = hits - 1;
Symbol 762 MovieClip Frame 352
gotoAndPlay (337);
Symbol 762 MovieClip Frame 364
hits = hits - 1;
Symbol 762 MovieClip Frame 368
gotoAndPlay (353);
Symbol 762 MovieClip Frame 380
hits = hits - 1;
Symbol 762 MovieClip Frame 384
gotoAndPlay (369);
Symbol 762 MovieClip Frame 524
alph = 100;
Symbol 762 MovieClip Frame 525
alph = alph - 1;
Symbol 762 MovieClip Frame 526
this._alpha = alph;
if (alph > 0) {
gotoAndPlay (525);
}
Symbol 762 MovieClip Frame 528
stop();
Symbol 778 MovieClip Frame 2
stop();
Symbol 778 MovieClip Frame 4
stop();
Symbol 778 MovieClip Frame 6
stop();
Symbol 778 MovieClip Frame 8
stop();
Symbol 778 MovieClip Frame 10
stop();
Symbol 778 MovieClip Frame 12
stop();
Symbol 778 MovieClip Frame 16
stop();
Symbol 778 MovieClip Frame 18
stop();
Symbol 778 MovieClip Frame 20
stop();
Symbol 778 MovieClip Frame 22
stop();
Symbol 778 MovieClip Frame 24
stop();
Symbol 778 MovieClip Frame 26
stop();
Symbol 785 MovieClip Frame 1
stop();
Symbol 785 MovieClip Frame 2
stop();
Symbol 796 MovieClip Frame 1
stop();
Symbol 796 MovieClip Frame 2
stop();
Symbol 800 MovieClip Frame 1
stop();
Symbol 800 MovieClip Frame 2
stop();
Symbol 804 MovieClip Frame 1
stop();
Symbol 804 MovieClip Frame 2
stop();
Symbol 808 MovieClip Frame 1
stop();
Symbol 808 MovieClip Frame 2
stop();
Symbol 811 MovieClip Frame 1
stop();
Symbol 811 MovieClip Frame 2
stop();
Symbol 815 MovieClip Frame 1
stop();
Symbol 815 MovieClip Frame 2
stop();
Symbol 822 Button
on (press) {
if (army._currentframe == 1) {
army.swapDepths(icon7);
army.gotoAndStop(2);
}
}
on (rollOut) {
if (army._currentframe == 2) {
army.gotoAndStop(1);
army.swapDepths(icon7);
}
}
Symbol 824 MovieClip Frame 1
stop();
Symbol 824 MovieClip Frame 3
stop();
Symbol 832 MovieClip Frame 1
stop();
Symbol 832 MovieClip Frame 3
stop();
Symbol 833 MovieClip Frame 1
stop();
Symbol 833 MovieClip Frame 3
stop();
Symbol 834 MovieClip Frame 1
stop();
Symbol 834 MovieClip Frame 3
stop();
Symbol 835 MovieClip Frame 1
stop();
Symbol 835 MovieClip Frame 3
stop();
Symbol 837 MovieClip Frame 1
stop();
Symbol 837 MovieClip Frame 3
stop();
Symbol 838 MovieClip Frame 1
stop();
Symbol 838 MovieClip Frame 3
stop();
Symbol 840 MovieClip Frame 1
stop();
Symbol 840 MovieClip Frame 3
stop();
Symbol 843 MovieClip Frame 1
stop();
Symbol 843 MovieClip Frame 3
stop();
Symbol 848 MovieClip Frame 1
stop();
Symbol 848 MovieClip Frame 2
stop();
Symbol 851 MovieClip Frame 1
stop();
Symbol 851 MovieClip Frame 2
stop();
Symbol 855 MovieClip Frame 1
stop();
Symbol 855 MovieClip Frame 2
stop();
Symbol 859 MovieClip Frame 1
stop();
Symbol 859 MovieClip Frame 2
stop();
Symbol 863 MovieClip Frame 1
stop();
Symbol 863 MovieClip Frame 2
stop();
Symbol 868 MovieClip Frame 1
stop();
Symbol 868 MovieClip Frame 2
stop();
Symbol 872 MovieClip Frame 1
stop();
Symbol 872 MovieClip Frame 2
stop();
Symbol 874 MovieClip Frame 1
stop();
Symbol 874 MovieClip Frame 2
stop();
Symbol 874 MovieClip Frame 3
stop();
Symbol 874 MovieClip Frame 4
stop();
Instance of Symbol 844 MovieClip "map" in Symbol 875 MovieClip Frame 1
onClipEvent (load) {
function minmap() {
i = 1;
while (i < 7) {
if (_root["obj" + i].energy > 0) {
_root.main.map["o" + i]._x = ((960 + _root["obj" + i]._x) - _root.fund._x) / 12;
_root.main.map["o" + i]._y = ((960 + _root["obj" + i]._y) - _root.fund._y) / 12;
} else {
_root.main.map["o" + i].gotoAndPlay(2);
}
i++;
}
i = 1;
while (i < 4) {
if (_root["orcobj" + i].energy > 0) {
_root.main.map["orcb" + i]._x = ((960 + _root["orcobj" + i]._x) - _root.fund._x) / 12;
_root.main.map["orcb" + i]._y = ((960 + _root["orcobj" + i]._y) - _root.fund._y) / 12;
} else {
_root.main.map["orcb" + i].gotoAndPlay(2);
}
i++;
}
i = 1;
while (i < 7) {
if (_root["peon" + i]._currentframe < 515) {
if (_root["peon" + i]._currentframe >= 513) {
_root.main.map["orc" + i].gotoAndStop(2);
} else {
_root.main.map["orc" + i].gotoAndStop(1);
_root.main.map["orc" + i]._x = ((960 + _root["peon" + i]._x) - _root.fund._x) / 12;
_root.main.map["orc" + i]._y = ((960 + _root["peon" + i]._y) - _root.fund._y) / 12;
}
} else {
_root.main.map["orc" + i].gotoAndStop(2);
}
i++;
}
i = 1;
while (i < 8) {
if (_root["peas" + i]._currentframe < 515) {
if (_root["peas" + i]._currentframe >= 513) {
_root.main.map["p" + i].gotoAndStop(2);
} else {
_root.main.map["p" + i].gotoAndStop(1);
_root.main.map["p" + i]._x = ((960 + _root["peas" + i]._x) - _root.fund._x) / 12;
_root.main.map["p" + i]._y = ((960 + _root["peas" + i]._y) - _root.fund._y) / 12;
}
} else {
_root.main.map["p" + i].gotoAndStop(2);
}
i++;
}
}
function setpoz() {
_root.ready = 0;
autofind = 0;
i = 1;
while (i < 8) {
if ((_root["peas" + i]._currentframe < 513) && (_root.main["icon" + i].hitTest(_root._xmouse, _root._ymouse, true))) {
autofind = 1;
autox = 2 * Math.floor(this["p" + i]._x / 2);
autoy = 2 * Math.floor(this["p" + i]._y / 2);
}
i++;
}
if ((((_root._xmouse < 160) && (_root._ymouse < 160)) || (autofind == 1)) || (gams == 0)) {
mxt = this.cadr._x;
myt = this.cadr._y;
if (autofind == 0) {
autox = _root._xmouse;
autoy = _root._ymouse;
}
if (gams == 0) {
autox = 140;
autoy = 140;
gams = 1;
}
this.cadr._x = autox;
this.cadr._y = autoy;
if (autox < 20) {
this.cadr._x = 20;
}
if (autox > 140) {
this.cadr._x = 140;
}
if (autoy < 20) {
this.cadr._y = 20;
}
if (autoy > 140) {
this.cadr._y = 140;
}
mx = 12 * (mxt - this.cadr._x);
my = 12 * (myt - this.cadr._y);
_root.fund._x = _root.fund._x + mx;
_root.fund._y = _root.fund._y + my;
_root.unitsel._x = _root.unitsel._x + mx;
_root.unitsel._y = _root.unitsel._y + my;
i = 1;
while (i < 3) {
j = 1;
while (j < 3) {
_root[("pp" + j) + i]._x = _root[("pp" + j) + i]._x + mx;
_root[("pp" + j) + i]._y = _root[("pp" + j) + i]._y + my;
j++;
}
i++;
}
i = 1;
while (i < 8) {
_root["bas" + i]._x = _root["bas" + i]._x + mx;
_root["bas" + i]._y = _root["bas" + i]._y + my;
_root["cadr" + i]._x = _root["cadr" + i]._x + mx;
_root["cadr" + i]._y = _root["cadr" + i]._y + my;
_root["whr" + i]._x = _root["whr" + i]._x + mx;
_root["whr" + i]._y = _root["whr" + i]._y + my;
_root["peas" + i]._x = _root["peas" + i]._x + mx;
_root["peas" + i]._y = _root["peas" + i]._y + my;
i++;
}
i = 1;
while (i < 7) {
_root["obj" + i]._x = _root["obj" + i]._x + mx;
_root["obj" + i]._y = _root["obj" + i]._y + my;
i++;
}
i = 1;
while (i < 21) {
_root["tre" + i]._x = _root["tre" + i]._x + mx;
_root["tre" + i]._y = _root["tre" + i]._y + my;
i++;
}
i = 1;
while (i < 4) {
_root["orcobj" + i]._x = _root["orcobj" + i]._x + mx;
_root["orcobj" + i]._y = _root["orcobj" + i]._y + my;
i++;
}
i = 1;
while (i < 7) {
_root["basx" + i]._x = _root["basx" + i]._x + mx;
_root["basx" + i]._y = _root["basx" + i]._y + my;
_root["whrx" + i]._x = _root["whrx" + i]._x + mx;
_root["whrx" + i]._y = _root["whrx" + i]._y + my;
_root["peon" + i]._x = _root["peon" + i]._x + mx;
_root["peon" + i]._y = _root["peon" + i]._y + my;
i++;
}
}
_root.ready = 1;
}
gams = 0;
setInterval(minmap, 100);
setpoz();
}
onClipEvent (mouseDown) {
setpoz();
}
Symbol 934 MovieClip Frame 1
stop();
Symbol 934 MovieClip Frame 3
stop();
Symbol 934 MovieClip Frame 5
stop();
Symbol 934 MovieClip Frame 7
stop();
Symbol 934 MovieClip Frame 9
stop();
Symbol 934 MovieClip Frame 11
stop();
Symbol 934 MovieClip Frame 13
stop();
Symbol 934 MovieClip Frame 15
stop();
Symbol 934 MovieClip Frame 17
stop();
Symbol 934 MovieClip Frame 19
stop();
Symbol 934 MovieClip Frame 21
stop();
Symbol 934 MovieClip Frame 23
stop();
Symbol 934 MovieClip Frame 25
stop();
Symbol 934 MovieClip Frame 27
stop();
Symbol 934 MovieClip Frame 29
stop();
Symbol 934 MovieClip Frame 41
stop();
Symbol 934 MovieClip Frame 43
stop();
Symbol 934 MovieClip Frame 45
stop();
Symbol 934 MovieClip Frame 55
stop();
Symbol 934 MovieClip Frame 57
stop();
Symbol 934 MovieClip Frame 59
stop();
Symbol 934 MovieClip Frame 61
stop();
Symbol 934 MovieClip Frame 63
stop();
Symbol 934 MovieClip Frame 71
stop();
Symbol 934 MovieClip Frame 73
stop();
Symbol 934 MovieClip Frame 75
stop();
Symbol 934 MovieClip Frame 77
stop();
Symbol 934 MovieClip Frame 79
stop();
Symbol 1059 MovieClip Frame 16
gotoAndPlay (1);
Symbol 1059 MovieClip Frame 32
gotoAndPlay (17);
Symbol 1059 MovieClip Frame 48
gotoAndPlay (33);
Symbol 1059 MovieClip Frame 64
gotoAndPlay (49);
Symbol 1059 MovieClip Frame 80
gotoAndPlay (65);
Symbol 1059 MovieClip Frame 96
gotoAndPlay (81);
Symbol 1059 MovieClip Frame 112
gotoAndPlay (97);
Symbol 1059 MovieClip Frame 128
gotoAndPlay (113);
Symbol 1059 MovieClip Frame 268
hits = hits - 1;
Symbol 1059 MovieClip Frame 272
gotoAndPlay (257);
Symbol 1059 MovieClip Frame 284
hits = hits - 1;
Symbol 1059 MovieClip Frame 288
gotoAndPlay (273);
Symbol 1059 MovieClip Frame 300
hits = hits - 1;
Symbol 1059 MovieClip Frame 304
gotoAndPlay (289);
Symbol 1059 MovieClip Frame 316
hits = hits - 1;
Symbol 1059 MovieClip Frame 320
gotoAndPlay (305);
Symbol 1059 MovieClip Frame 332
hits = hits - 1;
Symbol 1059 MovieClip Frame 336
gotoAndPlay (321);
Symbol 1059 MovieClip Frame 348
hits = hits - 1;
Symbol 1059 MovieClip Frame 352
gotoAndPlay (337);
Symbol 1059 MovieClip Frame 364
hits = hits - 1;
Symbol 1059 MovieClip Frame 368
gotoAndPlay (353);
Symbol 1059 MovieClip Frame 380
hits = hits - 1;
Symbol 1059 MovieClip Frame 384
gotoAndPlay (369);
Symbol 1059 MovieClip Frame 524
alph = 100;
Symbol 1059 MovieClip Frame 525
alph = alph - 1;
Symbol 1059 MovieClip Frame 526
this._alpha = alph;
if (alph > 0) {
gotoAndPlay (525);
}
Symbol 1059 MovieClip Frame 528
stop();
Symbol 1061 MovieClip Frame 1
stop();
Symbol 1061 MovieClip Frame 11
gotoAndPlay (6);
Symbol 1061 MovieClip Frame 13
stop();
Symbol 1162 MovieClip Frame 16
gotoAndPlay (1);
Symbol 1162 MovieClip Frame 32
gotoAndPlay (17);
Symbol 1162 MovieClip Frame 48
gotoAndPlay (33);
Symbol 1162 MovieClip Frame 64
gotoAndPlay (48);
Symbol 1162 MovieClip Frame 80
gotoAndPlay (65);
Symbol 1162 MovieClip Frame 96
gotoAndPlay (81);
Symbol 1162 MovieClip Frame 112
gotoAndPlay (97);
Symbol 1162 MovieClip Frame 128
gotoAndPlay (113);
Symbol 1162 MovieClip Frame 268
hits = hits - 1;
Symbol 1162 MovieClip Frame 272
gotoAndPlay (257);
Symbol 1162 MovieClip Frame 284
hits = hits - 1;
Symbol 1162 MovieClip Frame 288
gotoAndPlay (273);
Symbol 1162 MovieClip Frame 300
hits = hits - 1;
Symbol 1162 MovieClip Frame 304
gotoAndPlay (289);
Symbol 1162 MovieClip Frame 316
hits = hits - 1;
Symbol 1162 MovieClip Frame 320
gotoAndPlay (305);
Symbol 1162 MovieClip Frame 332
hits = hits - 1;
Symbol 1162 MovieClip Frame 336
gotoAndPlay (321);
Symbol 1162 MovieClip Frame 348
hits = hits - 1;
Symbol 1162 MovieClip Frame 352
gotoAndPlay (337);
Symbol 1162 MovieClip Frame 364
hits = hits - 1;
Symbol 1162 MovieClip Frame 368
gotoAndPlay (353);
Symbol 1162 MovieClip Frame 380
hits = hits - 1;
Symbol 1162 MovieClip Frame 384
gotoAndPlay (369);
Symbol 1162 MovieClip Frame 524
alph = 100;
Symbol 1162 MovieClip Frame 525
alph = alph - 1;
Symbol 1162 MovieClip Frame 526
this._alpha = alph;
if (alph > 0) {
gotoAndPlay (525);
}
Symbol 1162 MovieClip Frame 528
stop();