Frame 1
this.stop();
mcStart._visible = false;
Instance of Symbol 239 MovieClip in Frame 1
on (release) {
getURL ("http://www.i6.com/?utm_source=games&utm_medium=boxchief2pr", "_blank");
}
Instance of Symbol 243 MovieClip "mcStart" in Frame 1
on (release) {
_root.play();
}
Frame 2
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("a8acba61", this, 10301, true);
this.stop();
singleplay = false;
intrfc._visible = false;
youwin._visible = false;
puzzlewin._visible = false;
youlose._visible = false;
p1win._visible = false;
p2win._visible = false;
pbultas._visible = false;
arrows = 50;
cawin._visible = false;
pulevel = 1;
silevel = 1;
calevel = 0;
Instance of Symbol 264 MovieClip "pbultas" in Frame 2
on (release) {
_root.play2.removeMovieClip();
_root.intrfc._visible = false;
singleplay = false;
_root.two._visible = true;
_root.single._visible = true;
_root.pzle._visible = true;
_root.plmr._visible = true;
this._visible = false;
_root.arrows = 50;
}
Instance of Symbol 272 MovieClip "p1win" in Frame 2
on (release) {
_root.play2.removeMovieClip();
_root.intrfc._visible = false;
singleplay = false;
_root.two._visible = true;
_root.single._visible = true;
_root.pzle._visible = true;
_root.plmr._visible = true;
this._visible = false;
}
Instance of Symbol 270 MovieClip "cawin" in Frame 2
on (release) {
_root.play2.removeMovieClip();
if (_root.calevel == 1) {
this._visible = false;
var game = _root.attachMovie("funk", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.calevel == 2) {
this._visible = false;
var game = _root.attachMovie("funk2", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.calevel == 3) {
this._visible = false;
var game = _root.attachMovie("funk3", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.calevel == 4) {
this._visible = false;
var game = _root.attachMovie("funk4", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 5) {
this._visible = false;
var game = _root.attachMovie("funk5", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 6) {
this._visible = false;
var game = _root.attachMovie("funk6", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 7) {
this._visible = false;
var game = _root.attachMovie("bosslev", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else {
_root.pulevel = 1;
_root.intrfc._visible = false;
singleplay = false;
_root.two._visible = true;
_root.single._visible = true;
_root.pzle._visible = true;
this._visible = false;
}
}
Instance of Symbol 274 MovieClip "p2win" in Frame 2
on (release) {
_root.play2.removeMovieClip();
_root.intrfc._visible = false;
singleplay = false;
_root.two._visible = true;
_root.single._visible = true;
_root.pzle._visible = true;
this._visible = false;
_root.plmr._visible = true;
}
Instance of Symbol 276 MovieClip "youlose" in Frame 2
on (release) {
_root.play2.removeMovieClip();
_root.intrfc._visible = false;
singleplay = false;
_root.two._visible = true;
_root.single._visible = true;
_root.pzle._visible = true;
_root.plmr._visible = true;
this._visible = false;
}
Instance of Symbol 270 MovieClip in Frame 2
on (release) {
_root.play2.removeMovieClip();
if (_root.pulevel == 2) {
this._visible = false;
var game = _root.attachMovie("puzzle2", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 3) {
this._visible = false;
var game = _root.attachMovie("puzzle3", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 4) {
this._visible = false;
var game = _root.attachMovie("puzzle4", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 5) {
this._visible = false;
var game = _root.attachMovie("puzzle5", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 6) {
this._visible = false;
var game = _root.attachMovie("puzzle6", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else {
_root.pulevel = 1;
_root.intrfc._visible = false;
singleplay = false;
_root.two._visible = true;
_root.single._visible = true;
_root.pzle._visible = true;
this._visible = false;
}
}
Symbol 11 MovieClip [lode] Frame 1
this.stop();
var lido = true;
Symbol 11 MovieClip [lode] Frame 11
this.swapDepths(_root.play2.getNextHighestDepth());
this.removeMovieClip();
Symbol 16 MovieClip [arrow] Frame 1
this.stop();
var lido = true;
Symbol 16 MovieClip [arrow] Frame 20
this.swapDepths(_root.play2.getNextHighestDepth());
this.removeMovieClip();
Symbol 26 MovieClip Frame 1
this.stop();
Symbol 40 MovieClip Frame 1
this.stop();
var hit = false;
Symbol 40 MovieClip Frame 15
this.stop();
Symbol 49 MovieClip Frame 1
this.stop();
atlauts = false;
Symbol 49 MovieClip Frame 6
atlauts = true;
trace(atlauts);
Symbol 49 MovieClip Frame 9
if ((_root.singleplay == false) || (_root.play2.player == 1)) {
this.stop();
}
Symbol 49 MovieClip Frame 21
this.gotoAndStop(1);
Symbol 61 MovieClip [puzzle3] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
_root.arrows--;
p1bulta = _root.arrows;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if (((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(siena1.gut))) || (this.hitTest(siena2.gut))) || (this.hitTest(siena3.gut))) || (this.hitTest(siena4.gut))) || (this.hitTest(siena5.gut))) || (this.hitTest(siena6.gut))) || (this.hitTest(siena.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
siena.swapDepths(this);
siena1.swapDepths(this);
siena2.swapDepths(this);
siena3.swapDepths(this);
siena4.swapDepths(this);
siena5.swapDepths(this);
siena6.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.hitTest(_root.play2.merkis.gut) && (this.lido)) {
_root.play2.merkis.swapDepths(_root.play2.getNextHighestDepth());
clife2 = clife2 - (70 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.pulevel = 4;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = _root.arrows;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 10;
clife2 = 10;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.puzzlewin._visible = true;
_root.puzzlewin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p1bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 200 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(merkis) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 77 MovieClip [puzzle6] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
_root.arrows--;
p1bulta = _root.arrows;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(this);
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if (((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(siena1.gut))) || (this.hitTest(siena2.gut))) || (this.hitTest(siena3.gut))) || (this.hitTest(siena4.gut))) || (this.hitTest(siena5.gut))) || (this.hitTest(siena6.gut))) || (this.hitTest(siena.gut))) && (this.lido)) {
if (this.hitTest(siena.gut) || (this.hitTest(siena2.gut) && (this.lido))) {
this.play();
}
if ((this.hitTest(siena5.gut) || (this.hitTest(siena3.gut))) || (this.hitTest(Merkis.gut) && (this.lido))) {
kustigie.push(this);
trace(kustigie);
}
bulta.start(0, 1);
zale.swapDepths(this);
siena5.swapDepths(this);
sienat.swapDepths(this);
siena3.swapDepths(this);
sienat1.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(_root.play2.Merkis.gut) && (this.lido)) {
_root.play2.Merkis.swapDepths(_root.play2.getNextHighestDepth());
clife2 = clife2 - (70 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.pulevel = 7;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = _root.arrows;
p2bulta = 50;
kustigie = [];
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 10;
clife2 = 10;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.puzzlewin._visible = true;
_root.puzzlewin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p1bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 200 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(Merkis) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
sintervals = 170;
virz = 2;
ritenis.stop();
ritenis1.stop();
siena.onEnterFrame = function () {
sintervals--;
if (sintervals <= 0) {
virz = virz * -1;
sintervals = 150;
trace(virz);
}
ritenis._x = ritenis._x - virz;
ritenis._rotation = ritenis._rotation - virz;
ritenis1._x = ritenis1._x - virz;
ritenis1._rotation = ritenis1._rotation - virz;
siena5._x = siena5._x - virz;
siena2._x = siena2._x - virz;
siena3._x = siena3._x - virz;
sienat._x = sienat._x - virz;
sienat1._x = sienat1._x - virz;
Merkis._x = Merkis._x - virz;
diegs._x = diegs._x - virz;
this._y = this._y + virz;
this._x = this._x - virz;
for (var _local2 in kustigie) {
kustigie[_local2]._x = kustigie[_local2]._x - virz;
}
};
siena2.onEnterFrame = function () {
sintervals--;
if (sintervals <= 0) {
virz = virz * -1;
sintervals = 150;
trace(virz);
}
this._y = this._y + virz;
};
Symbol 80 MovieClip [puzzle5] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
_root.arrows--;
p1bulta = _root.arrows;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if (((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(siena1.gut))) || (this.hitTest(siena2.gut))) || (this.hitTest(siena3.gut))) || (this.hitTest(siena4.gut))) || (this.hitTest(siena5.gut))) || (this.hitTest(siena6.gut))) || (this.hitTest(siena.gut))) && (this.lido)) {
if (this.hitTest(siena.gut) || (this.hitTest(siena2.gut) && (this.lido))) {
this.play();
}
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
siena.swapDepths(this);
siena1.swapDepths(this);
siena2.swapDepths(this);
siena3.swapDepths(this);
siena4.swapDepths(this);
siena5.swapDepths(this);
siena6.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(_root.play2.merkis.gut) && (this.lido)) {
_root.play2.merkis.swapDepths(_root.play2.getNextHighestDepth());
clife2 = clife2 - (70 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.pulevel = 6;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = _root.arrows;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 10;
clife2 = 10;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.puzzlewin._visible = true;
_root.puzzlewin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p1bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 200 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(merkis) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
sintervals = 170;
virz = 2;
siena.onEnterFrame = function () {
sintervals--;
if (sintervals <= 0) {
virz = virz * -1;
sintervals = 150;
trace(virz);
}
this._y = this._y - virz;
};
siena2.onEnterFrame = function () {
sintervals--;
if (sintervals <= 0) {
virz = virz * -1;
sintervals = 150;
trace(virz);
}
this._y = this._y - virz;
};
Symbol 81 MovieClip [puzzle4] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
_root.arrows--;
p1bulta = _root.arrows;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if (((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(siena1.gut))) || (this.hitTest(siena2.gut))) || (this.hitTest(siena3.gut))) || (this.hitTest(siena4.gut))) || (this.hitTest(siena5.gut))) || (this.hitTest(siena6.gut))) || (this.hitTest(siena.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
siena.swapDepths(this);
siena1.swapDepths(this);
siena2.swapDepths(this);
siena3.swapDepths(this);
siena4.swapDepths(this);
siena5.swapDepths(this);
siena6.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(_root.play2.merkis.gut) && (this.lido)) {
_root.play2.merkis.swapDepths(_root.play2.getNextHighestDepth());
clife2 = clife2 - (70 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.pulevel = 5;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = _root.arrows;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 10;
clife2 = 10;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.puzzlewin._visible = true;
_root.puzzlewin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p1bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 200 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(merkis) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 87 MovieClip [puzzle2] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
_root.arrows--;
p1bulta = _root.arrows;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if (((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(siena1.gut))) || (this.hitTest(siena2.gut))) || (this.hitTest(siena3.gut))) || (this.hitTest(siena4.gut))) || (this.hitTest(siena5.gut))) || (this.hitTest(siena6.gut))) || (this.hitTest(siena.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
siena.swapDepths(this);
siena1.swapDepths(this);
siena2.swapDepths(this);
siena3.swapDepths(this);
siena4.swapDepths(this);
siena5.swapDepths(this);
siena6.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(_root.play2.merkis.gut) && (this.lido)) {
_root.play2.merkis.swapDepths(_root.play2.getNextHighestDepth());
clife2 = clife2 - (70 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.pulevel = 3;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = _root.arrows;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 10;
clife2 = 10;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.puzzlewin._visible = true;
_root.puzzlewin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p1bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 200 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(merkis) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 103 Button
on (release) {
if (_root.play2.clife1 > 0) {
_root.play2.removeMovieClip();
_root.intrfc._visible = false;
singleplay = false;
_root.two._visible = true;
_root.single._visible = true;
_root.pzle._visible = true;
_root.plmr._visible = true;
}
}
Symbol 107 MovieClip [fps] Frame 1
fps = 30;
var timeinit = new Date();
var lasttime = timeinit.getMilliseconds();
onEnterFrame = function () {
var _local3 = new Date();
timepassed = (((_local3.getMilliseconds() - lasttime) >= 0) ? (_local3.getMilliseconds() - lasttime) : (1000 + (_local3.getMilliseconds() - lasttime)));
fps = Math.round(10000 / timepassed) / 10;
lasttime = _local3.getMilliseconds();
if (_root.gameover) {
this.unloadMovie();
}
};
Symbol 111 MovieClip Frame 1
var ugls = 0;
this.onEnterFrame = function () {
if (_root.play2.player == 1) {
ugls = _root._root.play2.angle * -1;
}
if (_root.play2.player == 2) {
ugls = _root.play2.angle * -1;
}
};
Instance of Symbol 109 MovieClip in Symbol 111 MovieClip Frame 1
on (rollOver) {
trace("over");
_root.play2.skrol = true;
}
on (rollOut) {
trace("out");
_root.play2.skrol = false;
_root.play2.kalibrejam = true;
}
Symbol 116 MovieClip [putns2] Frame 1
var skatitajs = random(100);
var igreks = (random(2) - 1);
_y = (random(100) - 100);
_x = 4000;
var lido = true;
this.onEnterFrame = function () {
if (lido) {
this._y = this._y + igreks;
this._x = this._x - (random(3) + 2);
if (this._x < -1000) {
this._x = 4000;
_y = (random(100) - 100);
skatitajs = random(100) + 10;
igreks = random(2) - 1;
}
if (_y < -130) {
igreks = 1;
}
if (_y > 0) {
igreks = -1;
}
} else if (this.hitTest(_root.play2.ground) == false) {
this._y = this._y + 7;
}
};
Symbol 117 MovieClip [puzzle] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
_root.arrows--;
p1bulta = _root.arrows;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(_root.play2.merkis.gut) && (this.lido)) {
_root.play2.merkis.swapDepths(_root.play2.getNextHighestDepth());
clife2 = clife2 - (70 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.pulevel = 2;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = _root.arrows;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 10;
clife2 = 10;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.puzzlewin._visible = true;
_root.puzzlewin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p1bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 200 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(merkis) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 1;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 129 MovieClip [king] Frame 1
this.stop();
atlauts = false;
Symbol 129 MovieClip [king] Frame 6
atlauts = true;
trace(atlauts);
Symbol 129 MovieClip [king] Frame 9
if ((_root.singleplay == false) || (_root.play2.player == 1)) {
this.stop();
}
Symbol 129 MovieClip [king] Frame 21
this.gotoAndStop(1);
Symbol 131 MovieClip Frame 1
this.onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha - 0.4);
}
};
Symbol 132 MovieClip [1play8] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(skersis1))) || (this.hitTest(skersis2))) || (this.hitTest(skersis3))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
kollona.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 9;
trace("level2");
this._x = 0;
this._y = 195;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 15;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 200;
clife2 = 200;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -1628;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 250 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 3;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("lode", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(skersis1))) || (this.hitTest(skersis2))) || (this.hitTest(skersis3))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 134 MovieClip [1play4] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(skersis1))) || (this.hitTest(skersis2))) || (this.hitTest(skersis3))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
kollona.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 1;
trace("level2");
this._x = 0;
this._y = 195;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 15;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 100;
clife2 = 100;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -1628;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 250 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 3;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(skersis1))) || (this.hitTest(skersis2))) || (this.hitTest(skersis3))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 141 MovieClip [bosslev] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(skersis1))) || (this.hitTest(skersis2))) || (this.hitTest(skersis3))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 3;
trace("level2");
this._x = 0;
this._y = 195;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 20;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 300;
clife2 = 300;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -1628;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 260 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 3;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("lode", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(skersis1))) || (this.hitTest(skersis2))) || (this.hitTest(skersis3))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 146 MovieClip Frame 1
this.stop();
atlauts = false;
Symbol 146 MovieClip Frame 6
atlauts = true;
trace(atlauts);
Symbol 146 MovieClip Frame 9
if ((_root.singleplay == false) || (_root.play2.player == 1)) {
this.stop();
}
Symbol 146 MovieClip Frame 21
this.gotoAndStop(1);
Symbol 148 MovieClip Frame 1
this.onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha - 0.4);
}
};
Symbol 149 MovieClip [1play5] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(skersis1))) || (this.hitTest(skersis2))) || (this.hitTest(skersis3))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 6;
trace("level2");
this._x = 0;
this._y = 195;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 20;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 80;
clife2 = 80;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -1628;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 260 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 3;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(skersis1))) || (this.hitTest(skersis2))) || (this.hitTest(skersis3))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (35 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (15 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (5 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 155 MovieClip Frame 1
this.stop();
atlauts = false;
Symbol 155 MovieClip Frame 6
atlauts = true;
trace(atlauts);
Symbol 155 MovieClip Frame 9
if ((_root.singleplay == false) || (_root.play2.player == 1)) {
this.stop();
}
Symbol 155 MovieClip Frame 21
this.gotoAndStop(1);
Symbol 157 MovieClip Frame 1
this.onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha - 0.4);
}
};
Symbol 158 MovieClip [1play2] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(skersis1))) || (this.hitTest(skersis2))) || (this.hitTest(skersis3))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 3;
trace("level2");
this._x = 0;
this._y = 195;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 20;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 50;
clife2 = 50;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -1628;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 260 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 3;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(skersis1))) || (this.hitTest(skersis2))) || (this.hitTest(skersis3))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (35 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (15 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (5 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 167 MovieClip [goblins2] Frame 1
this.stop();
atlauts = false;
Symbol 167 MovieClip [goblins2] Frame 6
atlauts = true;
trace(atlauts);
Symbol 167 MovieClip [goblins2] Frame 9
if ((_root.singleplay == false) || (_root.play2.player == 1)) {
this.stop();
}
Symbol 167 MovieClip [goblins2] Frame 21
this.gotoAndStop(1);
Symbol 169 MovieClip Frame 1
this.onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha - 0.4);
}
};
Symbol 170 MovieClip [1play7] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((((((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(kollona4.gut))) || (this.hitTest(kollona5.gut))) || (this.hitTest(kollona6.gut))) || (this.hitTest(skersis1.gut))) || (this.hitTest(skersis2.gut))) || (this.hitTest(skersis3.gut))) || (this.hitTest(skersis4.gut))) || (this.hitTest(skersis5.gut))) || (this.hitTest(skersis6.gut))) || (this.hitTest(skersis7.gut))) || (this.hitTest(skersis8.gut))) || (this.hitTest(skersis9.gut))) || (this.hitTest(skersis10.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
kollona4.swapDepths(this);
kollona5.swapDepths(this);
kollona6.swapDepths(this);
kollona.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
skersis4.swapDepths(this);
skersis5.swapDepths(this);
skersis6.swapDepths(this);
skersis7.swapDepths(this);
skersis8.swapDepths(this);
skersis9.swapDepths(this);
skersis10.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 8;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 100;
clife2 = 100;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 130 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -138 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("lode", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
this.play();
}
if ((((((((((((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(kollona4.gut))) || (this.hitTest(kollona5.gut))) || (this.hitTest(kollona6.gut))) || (this.hitTest(skersis1.gut))) || (this.hitTest(skersis2.gut))) || (this.hitTest(skersis3.gut))) || (this.hitTest(skersis4.gut))) || (this.hitTest(skersis5.gut))) || (this.hitTest(skersis6.gut))) || (this.hitTest(skersis7.gut))) || (this.hitTest(skersis8.gut))) || (this.hitTest(skersis9.gut))) || (this.hitTest(skersis10.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
kollona4.swapDepths(this);
kollona5.swapDepths(this);
kollona6.swapDepths(this);
kollona.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
skersis4.swapDepths(this);
skersis5.swapDepths(this);
skersis6.swapDepths(this);
skersis7.swapDepths(this);
skersis8.swapDepths(this);
skersis9.swapDepths(this);
skersis10.swapDepths(this);
this.lido = false;
this.play();
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 172 MovieClip Frame 1
this.onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha - 0.4);
}
};
Symbol 173 MovieClip [1play3] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((((((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(kollona4.gut))) || (this.hitTest(kollona5.gut))) || (this.hitTest(kollona6.gut))) || (this.hitTest(skersis1.gut))) || (this.hitTest(skersis2.gut))) || (this.hitTest(skersis3.gut))) || (this.hitTest(skersis4.gut))) || (this.hitTest(skersis5.gut))) || (this.hitTest(skersis6.gut))) || (this.hitTest(skersis7.gut))) || (this.hitTest(skersis8.gut))) || (this.hitTest(skersis9.gut))) || (this.hitTest(skersis10.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
kollona4.swapDepths(this);
kollona5.swapDepths(this);
kollona6.swapDepths(this);
kollona.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
skersis4.swapDepths(this);
skersis5.swapDepths(this);
skersis6.swapDepths(this);
skersis7.swapDepths(this);
skersis8.swapDepths(this);
skersis9.swapDepths(this);
skersis10.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 4;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 50;
clife2 = 50;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 130 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -138 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((((((((((((((((((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) || (this.hitTest(kollona1.gut))) || (this.hitTest(kollona2.gut))) || (this.hitTest(kollona3.gut))) || (this.hitTest(kollona4.gut))) || (this.hitTest(kollona5.gut))) || (this.hitTest(kollona6.gut))) || (this.hitTest(skersis1.gut))) || (this.hitTest(skersis2.gut))) || (this.hitTest(skersis3.gut))) || (this.hitTest(skersis4.gut))) || (this.hitTest(skersis5.gut))) || (this.hitTest(skersis6.gut))) || (this.hitTest(skersis7.gut))) || (this.hitTest(skersis8.gut))) || (this.hitTest(skersis9.gut))) || (this.hitTest(skersis10.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona1.swapDepths(this);
kollona2.swapDepths(this);
kollona3.swapDepths(this);
kollona4.swapDepths(this);
kollona5.swapDepths(this);
kollona6.swapDepths(this);
kollona.swapDepths(this);
skersis1.swapDepths(this);
skersis2.swapDepths(this);
skersis3.swapDepths(this);
skersis4.swapDepths(this);
skersis5.swapDepths(this);
skersis6.swapDepths(this);
skersis7.swapDepths(this);
skersis8.swapDepths(this);
skersis9.swapDepths(this);
skersis10.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (35 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (15 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (5 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 175 MovieClip [camp] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 2;
_root.youlose._visible = false;
_root.youwin._visible = false;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 50;
clife2 = 50;
tlife3 = 50;
clife3 = 50;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
trace("varsaut" + varsaut);
trace("player" + player);
trace("kalibrejam" + kalibrejam);
trace("drawing" + drawing);
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if ((clife2 <= 0) || (clife3 <= 0)) {
}
trace(clife2);
trace(clife3);
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 30;
if (clife1 <= 0) {
}
trace(clife1);
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 30;
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 30;
}
putn--;
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if ((player == 2) || (player == 3)) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 198 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -166 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
figna2.gotoAndPlay("b");
if (player == 2) {
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
}
if (player == 3) {
start_ball_x = figna3._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna3._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else if (player == 2) {
player = 3;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
}
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
}
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else if (player == 2) {
player = 3;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
}
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else if (player == 2) {
player = 3;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
if (this.gut.hitTest(figna.legs) && (this.lido)) {
}
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else if (player == 2) {
player = 3;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
}
clife2 = clife2 - (70 + random(6));
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else if (player == 2) {
player = 3;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
}
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else if (player == 2) {
player = 3;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
}
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else if (player == 2) {
player = 3;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 177 MovieClip Frame 1
this.onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha - 0.4);
}
};
Symbol 178 MovieClip [1playa] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 2;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 50;
clife2 = 50;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 200 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (35 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (15 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (5 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 180 MovieClip Frame 1
this.onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha - 0.4);
}
};
Symbol 181 MovieClip [1play4b] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 5;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 80;
clife2 = 80;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 200 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -175 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (35 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (15 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (5 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 183 MovieClip Frame 1
this.onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha - 0.4);
}
};
Symbol 184 MovieClip [1play6] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 7;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 100;
clife2 = 100;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 200 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("lode", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
this.play();
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
this.play();
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 185 MovieClip [1play] Frame 1
function onMouseDown() {
if ((((drawing == false) && (varsaut)) && (kalibrejam == false)) && (player == 1)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if (((varsaut && (kalibrejam == false)) && (drawing == true)) && (player == 1)) {
varsaut = false;
if (player == 1) {
figna.gotoAndPlay("b");
p1bulta--;
} else {
figna2.gotoAndPlay("b");
p2bulta--;
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
_root.silevel = 2;
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
leimums = 25;
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 100;
clife2 = 100;
varsaut = true;
kalibrejam = false;
skrol = false;
pozicija2 = -740;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (skrol) {
_root.play2._x = _root.play2._x - 3;
ground._x = ground._x + 3;
intrfc._x = intrfc._x + 3;
fons1._x = fons1._x + 2.72727272727273;
fons2._x = fons2._x + 2;
trace("scrl");
}
if (clife2 <= 0) {
_root.youwin._visible = true;
_root.youwin.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.youlose._visible = true;
_root.youlose.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
putn = random(1200) + 60;
var _local6 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local5 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local6);
putni.push(_local5);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local3 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local3 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local3;
ground._x = ground._x - _local3;
intrfc._x = intrfc._x - _local3;
fons1._x = fons1._x - (_local3 / 1.1);
fons2._x = fons2._x - (_local3 / 1.5);
if ((_local3 < 0.5) && (_local3 > -0.5)) {
kalibrejam = false;
gadijums1 = random(leimums) - (leimums / 2);
arrowpower = 200 + gadijums1;
gadijums1 = random(leimums) - (leimums / 2);
angle = -167 + gadijums1;
if (leimums > 5) {
leimums = leimums - 2;
}
figna2._rotation = angle;
arrowangle = angle;
figna2.gotoAndPlay("a");
trace(String(figna2.atlauts));
figna2.gotoAndPlay("b");
start_ball_x = figna2._x - (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = (figna2._y + (48 * Math.sin((angle * Math.PI) / 180))) - 8;
p2bulta--;
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna2._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 186 MovieClip [2play] Frame 1
function onMouseDown() {
if (((drawing == false) && (varsaut)) && (kalibrejam == false)) {
if (player == 1) {
figna.gotoAndPlay("a");
} else {
figna2.gotoAndPlay("a");
}
startx = _xmouse;
starty = _ymouse;
drawing = true;
}
terrain.moveTo(startx, starty);
}
function onMouseUp() {
if ((varsaut && (kalibrejam == false)) && (drawing == true)) {
varsaut = false;
if (player == 1) {
p1bulta--;
figna.gotoAndPlay("b");
} else {
p2bulta--;
figna2.gotoAndPlay("b");
}
arrowpower = power;
arrowangle = angle;
power = 0;
angle = 0;
figna._rotation = 0;
figna2._rotation = 180;
arrovangle = 0;
drawing = false;
terrain.clear();
if (player == 1) {
start_ball_x = figna._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna._y + (48 * Math.sin((angle * Math.PI) / 180));
}
if (player == 2) {
start_ball_x = figna2._x + (48 * Math.cos((angle * Math.PI) / 180));
start_ball_y = figna2._y + (48 * Math.sin((angle * Math.PI) / 180));
}
cannonball_fired = attachMovie("arrow", "arrow" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired._rotation = figna._rotation;
cannonball_fired.dirx = Math.cos((arrowangle * Math.PI) / 180) * arrowpower;
cannonball_fired.diry = Math.sin((arrowangle * Math.PI) / 180) * arrowpower;
}
cannonball_fired.onEnterFrame = function () {
for (var _local3 in putni) {
if (this.hitTest(putni[_local3])) {
_root.play2.zale.swapDepths(_root.play2.getNextHighestDepth());
if (this.lido) {
bulta.start(0, 1);
putni[_local3].lido = false;
putni[_local3]._rotation = putni[_local3]._rotation + (random(90) + 45);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
}
this._x = putni[_local3]._x;
this._y = putni[_local3]._y;
}
}
if ((this.gut.hitTest(ground) || (this.hitTest(kollona.gut))) && (this.lido)) {
bulta.start(0, 1);
zale.swapDepths(this);
kollona.swapDepths(this);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
}
if (player == 2) {
if ((this.hitTest(figna.cepure) && (this.lido)) && (figna.cepure.hit == false)) {
figna.cepure.play();
figna.cepure.hit = true;
}
if (this.gut.hitTest(figna.head) && (this.lido)) {
clife1 = clife1 - (70 + random(6));
trace("head");
trace(clife1);
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.trunk) && (this.lido)) {
clife1 = clife1 - (30 + random(6));
this.play();
trace("trunk");
trace(clife1);
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
if (this.gut.hitTest(figna.legs) && (this.lido)) {
trace("leg");
trace(clife1);
this.play();
clife1 = clife1 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna.gotoAndPlay("damage");
kajas.play();
}
}
if (player == 1) {
if ((this.hitTest(figna2.cepure) && (this.lido)) && (figna2.cepure.hit == false)) {
figna2.cepure.play();
figna2.cepure.hit = true;
}
if (this.gut.hitTest(figna2.head) && (this.lido)) {
clife2 = clife2 - (70 + random(6));
trace("head");
this.lido = false;
varsaut = true;
this.play();
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.trunk) && (this.lido)) {
clife2 = clife2 - (30 + random(6));
this.play();
trace("trunk");
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
if (this.gut.hitTest(figna2.legs) && (this.lido)) {
trace("leg");
this.play();
clife2 = clife2 - (10 + random(6));
this.lido = false;
varsaut = true;
if (player == 1) {
player = 2;
} else {
player = 1;
}
kalibrejam = true;
figna2.gotoAndPlay("damage");
kajas2.play();
}
}
if (this.lido) {
this.diry = this.diry + gravity;
this.dirx = (this.dirx * friction) + (wind / 4);
this.diry = this.diry * friction;
this._rotation = Math.atan2(this.diry, this.dirx) / (Math.PI/180);
this._x = this._x + (this.dirx / lenums);
this._y = this._y + (this.diry / lenums);
_root.play2._x = _root.play2._x - (this.dirx / lenums);
intrfc._x = intrfc._x + (this.dirx / lenums);
ground._x = ground._x + (this.dirx / lenums);
fons1._x = fons1._x + (this.dirx / (lenums * 1.1));
fons2._x = fons2._x + (this.dirx / (lenums * 1.5));
}
};
}
lokam.mp3;
bulta = new Sound();
bulta.attachSound("lokam.mp3");
bulta.setVolume(100);
putni = [];
putn = random(60) + 30;
p1bulta = 50;
p2bulta = 50;
this.stop();
_root.play2.createEmptyMovieClip("terrain", 1);
_root.play2.terrain.lineStyle(5, 13382451, 100);
drawing = false;
angle = 0;
power = 0;
gravity = 2.5;
friction = 0.999;
player = 1;
lenums = 7;
tlife1 = 100;
clife1 = 100;
tlife2 = 100;
clife2 = 100;
varsaut = true;
kalibrejam = false;
pozicija2 = -1628;
wind = random(3) - 2;
if (wind == -2) {
karodzins1.gotoAndStop(1);
karodzins2.gotoAndStop(1);
}
if (wind == 2) {
karodzins1.gotoAndStop(2);
karodzins2.gotoAndStop(2);
}
if (wind == 1) {
karodzins1.gotoAndStop(3);
karodzins2.gotoAndStop(3);
}
if (wind == -1) {
karodzins1.gotoAndStop(4);
karodzins2.gotoAndStop(4);
}
if (wind == 0) {
karodzins1.gotoAndStop(5);
karodzins2.gotoAndStop(5);
}
onEnterFrame = function () {
if (clife2 <= 0) {
_root.p1win._visible = true;
_root.p1win.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (clife1 <= 0) {
_root.p2win._visible = true;
_root.p2win.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
if (p2bulta <= 0) {
_root.pbultas._visible = true;
_root.pbultas.swapDepths(_root.getNextHighestDepth());
varsaut = false;
player = 3;
}
putn--;
if (putn < 0) {
putn = random(1200) + 60;
var _local4 = attachMovie("putns2", "putns2" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
var _local3 = attachMovie("putns3", "putns3" + _root.play2.getNextHighestDepth(), _root.play2.getNextHighestDepth());
putni.push(_local4);
putni.push(_local3);
}
if (kalibrejam) {
if (player == 1) {
if ((_root.play2._x > -0.1) || (_root.play2._x < 0.1)) {
var _local2 = (-_root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local2;
ground._x = ground._x - _local2;
intrfc._x = intrfc._x - _local2;
fons1._x = fons1._x - (_local2 / 1.1);
fons2._x = fons2._x - (_local2 / 1.5);
if ((_local2 < 0.5) && (_local2 > -0.5)) {
kalibrejam = false;
}
}
} else if (player == 2) {
if ((_root.play2._x > (pozicija2 - 0.1)) || (_root.play2._x < (pozicija2 + 0.1))) {
var _local2 = (pozicija2 - _root.play2._x) / 20;
_root.play2._x = _root.play2._x + _local2;
ground._x = ground._x - _local2;
intrfc._x = intrfc._x - _local2;
fons1._x = fons1._x - (_local2 / 1.1);
fons2._x = fons2._x - (_local2 / 1.5);
if ((_local2 < 0.5) && (_local2 > -0.5)) {
kalibrejam = false;
}
}
}
}
if (((drawing == true) && (varsaut == true)) && (kalibrejam == false)) {
power = Math.round(Math.sqrt(((startx - _xmouse) * (startx - _xmouse)) + ((starty - _ymouse) * (starty - _ymouse)))) * 2;
if (power > 300) {
power = 300;
}
angle = Math.round(Math.atan2(starty - _ymouse, startx - _xmouse) / (Math.PI/180));
if (player == 1) {
if ((angle > 70) && (angle >= 0)) {
angle = 70;
}
if (angle < -70) {
angle = -70;
}
}
if (player == 2) {
if ((angle < 120) && (angle >= 0)) {
angle = 120;
}
if ((angle > -120) && (angle < 0)) {
angle = -120;
}
}
if (player == 1) {
figna._rotation = angle;
} else {
figna2._rotation = angle;
}
terrain.clear();
_root.play2.terrain.lineStyle(4, 13382451, 100);
terrain.moveTo(startx, starty);
terrain.lineTo(_xmouse, _ymouse);
}
};
figna.onEnterFrame = function () {
};
_root.intrfc.p1bar.onEnterFrame = function () {
if (clife1 <= 0) {
clife1 = 0;
}
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p1bar.bar._width = (450 / tlife1) * clife1;
};
_root.intrfc.p2bar.onEnterFrame = function () {
if (clife2 <= 0) {
clife2 = 0;
}
_root.intrfc.p2bar.bar._width = (450 / tlife2) * clife2;
};
Symbol 187 MovieClip [putns3] Frame 1
var skatitajs = random(100);
var igreks = (random(2) - 1);
_y = (random(130) - 100);
_x = -1000;
var lido = true;
this.onEnterFrame = function () {
if (lido) {
this._y = this._y + igreks;
this._x = this._x + (random(3) + 2);
if (this._x > 14000) {
this._x = -1000;
_y = (random(120) - 100);
skatitajs = random(100) + 10;
igreks = random(2) - 1;
}
if (_y < -130) {
igreks = 1;
}
if (_y > 0) {
igreks = -1;
}
} else if (this.hitTest(_root.play2.ground) == false) {
this._y = this._y + 7;
}
};
Symbol 200 MovieClip [goblinsmirst] Frame 1
this.onEnterFrame = function () {
this._y = this._y + 2;
};
Symbol 200 MovieClip [goblinsmirst] Frame 20
this.stop();
Symbol 204 MovieClip [goblinsmirst2] Frame 10
this.stop();
Symbol 208 Button
on (release) {
this.gotoAndPlay(625);
}
Symbol 219 MovieClip [intro] Frame 627
_root.attachMovie("1playa", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc._visible = true;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
this.removeMovieClip();
Symbol 222 MovieClip [outro] Frame 381
_root.intrfc._visible = false;
_root.singleplay = false;
_root.two._visible = true;
_root.single._visible = true;
_root.pzle._visible = true;
this.removeMovieClip();
Symbol 229 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 1
function stop_waiting() {
waiting = false;
clearInterval(waitID);
}
var waiting = true;
var waitID = setInterval(stop_waiting, 6000);
Symbol 239 MovieClip Frame 2
percent = Math.round((_root.getBytesLoaded() * 100) / _root.getBytesTotal());
intro.gauge.gotoAndStop(percent);
Symbol 239 MovieClip Frame 3
if ((percent < 100) || (waiting)) {
gotoAndPlay (2);
}
Symbol 239 MovieClip Frame 4
trace("upps!");
stop();
_root.mcStart._visible = true;
Symbol 281 MovieClip [__Packages.merkis] Frame 0
class merkis extends MovieClip
{
var stop, _width, _height, play, _visible, _x, _y;
function merkis () {
super();
}
function onLoad() {
stop();
_root.Naidnieks.nanimacija.Merkis.merkisHI._visible = false;
_root.Naidnieks.nanimacija.Merkis.asinis._visible = false;
}
function onEnterFrame() {
if (_root.Naidnieks.izturibask <= 0) {
_width = _width + 40;
_height = _height + 40;
_root.Naidnieks._height = _root.Naidnieks._height + _root.Naidnieks.palielinajums;
_root.Naidnieks._width = _root.Naidnieks._width + _root.Naidnieks.palielinajums;
_root.Naidnieks.palsk++;
_root.Naidnieks.reakcijassk = (_root.Naidnieks.reakcija * 1.5) + 20;
_root.Naidnieks.izturibask = _root.Naidnieks.izturiba;
play();
_root.Instrukcija.gotoAndPlay(2);
_visible = true;
_root.Naidnieks.nanimacija.Help._visible = false;
}
}
function onPress() {
_root.Instrukcija._visible = false;
if (_root.Naidnieks.izturibask <= 0) {
_root.Naidnieks.punktix = _root.Naidnieks.punktix + ((_root.Naidnieks.punkti + 1) * 5);
} else {
_root.Naidnieks.punktix = _root.Naidnieks.punktix + ((_root.Naidnieks.punkti + 1) * 20);
}
_root.Naidnieks._height = _root.Naidnieks._height - (_root.Naidnieks.palielinajums * _root.Naidnieks.palsk);
_root.Naidnieks._width = _root.Naidnieks._width - (_root.Naidnieks.palielinajums * _root.Naidnieks.palsk);
_root.Naidnieks.palsk = 0;
_root.Naidnieks.reakcijassk = _root.Naidnieks.reakcijassk + 10;
_root.Naidnieks.ndzivibas--;
if (_root.Naidnieks.ndzivibas <= 0) {
_root.Lapas.play();
_root.Naidnieks.riciba = 30;
_root.Naidnieks.nanimacija.gotoAndStop("zaude");
}
_root.Naidnieks.Asinis2._x = _x;
_root.Naidnieks.Asinis2._y = _y;
_root.Naidnieks.Asinis2.play();
_root.cert = true;
_visible = false;
}
function onRollOver() {
_root.Naidnieks.nanimacija.Merkis.merkisHI._visible = true;
stop();
}
function onRollOut() {
_root.Naidnieks.nanimacija.Merkis.merkisHI._visible = false;
play();
}
}
Symbol 249 Button
on (release) {
var game = attachMovie("2play", "play2", _root.getNextHighestDepth());
game._x = 0;
game._y = 195;
intrfc._visible = true;
intrfc.swapDepths(_root.getNextHighestDepth());
singleplay = false;
two._visible = false;
single._visible = false;
pzle._visible = false;
plmr._visible = false;
}
Symbol 252 Button
on (release) {
var game = attachMovie("puzzle", "play2", _root.getNextHighestDepth());
game._x = 0;
game._y = 195;
intrfc._visible = true;
intrfc.swapDepths(_root.getNextHighestDepth());
singleplay = true;
single._visible = false;
two._visible = false;
pzle._visible = false;
plmr._visible = false;
}
Symbol 257 Button
on (release) {
var game = attachMovie("intro", "intro", _root.getNextHighestDepth());
game._x = 550;
game._y = 1036;
intrfc._visible = true;
singleplay = true;
single._visible = false;
two._visible = false;
pzle._visible = false;
plmr._visible = false;
}
Symbol 260 Button
on (release) {
getURL ("http://www.i6.com/?utm_source=games&utm_medium=boxchief2pmg", "_blank");
}
Symbol 267 Button
on (release) {
getURL ("http://www.i6.com/?utm_source=games&utm_medium=boxchief2pmg", "_blank");
}
Symbol 269 Button
on (release) {
_root.play2.removeMovieClip();
if (_root.silevel == 2) {
_root.youwin._visible = false;
var game = _root.attachMovie("1play2", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.silevel == 3) {
_root.youwin._visible = false;
var game = _root.attachMovie("1play3", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.silevel == 4) {
_root.youwin._visible = false;
var game = _root.attachMovie("1play4b", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.silevel == 5) {
_root.youwin._visible = false;
var game = _root.attachMovie("1play5", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.silevel == 6) {
_root.youwin._visible = false;
var game = _root.attachMovie("1play6", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.silevel == 7) {
_root.youwin._visible = false;
var game = _root.attachMovie("1play7", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.silevel == 8) {
_root.youwin._visible = false;
var game = _root.attachMovie("1play8", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.silevel == 9) {
_root.intrfc._visible = false;
_root.youwin._visible = false;
var game = _root.attachMovie("outro", "play2", _root.getNextHighestDepth());
_root.play2._x = 550;
_root.play2._y = 1036;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else {
_root.intrfc._visible = false;
singleplay = false;
_root.two._visible = true;
_root.single._visible = true;
_root.pzle._visible = true;
_root.youwin._visible = false;
_root.plmr._visible = true;
}
}
Symbol 278 Button
on (release) {
_root.play2.removeMovieClip();
if (_root.pulevel == 2) {
_root.puzzlewin._visible = false;
var game = _root.attachMovie("puzzle2", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 3) {
_root.puzzlewin._visible = false;
var game = _root.attachMovie("puzzle3", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 4) {
_root.puzzlewin._visible = false;
var game = _root.attachMovie("puzzle4", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 5) {
_root.puzzlewin._visible = false;
var game = _root.attachMovie("puzzle5", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else if (_root.pulevel == 6) {
_root.puzzlewin._visible = false;
var game = _root.attachMovie("puzzle6", "play2", _root.getNextHighestDepth());
_root.play2._x = 0;
_root.play2._y = 195;
_root.intrfc.swapDepths(_root.getNextHighestDepth());
} else {
_root.pulevel = 1;
_root.intrfc._visible = false;
singleplay = false;
_root.two._visible = true;
_root.single._visible = true;
_root.pzle._visible = true;
_root.plmr._visible = true;
_root.puzzlewin._visible = false;
}
}