Frame 1
lives = 10;
timecount = 1;
level = 1;
score = 0;
passes = 0;
comboshot = 0;
b = 1;
_root.combocount = 0;
_root.coolarrow = 0;
_root.arrowcount = 0;
_root.arrowhitcount = 0;
Instance of Symbol 32 MovieClip "infotext" in Frame 1
onClipEvent (load) {
this._visible = false;
}
Frame 9
stop();
Frame 10
if ((49 < _root.passes) || (_root.lives < 1)) {
gotoAndPlay (14);
}
if (b == 1) {
a = 1;
while (a < 3) {
_root.orc.duplicateMovieClip("orc" + a, a);
a++;
}
b = 0;
}
if (2 < _root.comboshot) {
_root.combocount = 0;
_root.comboshot = 0;
_root.score = _root.score + 10;
_root.combotext._x = _root.combox;
_root.combotext._y = _root.comboy;
_root.combotext.gotoAndPlay(2);
}
if (0 < _root.comboshot) {
_root.combocount = _root.combocount + 1;
}
if (12 < _root.combocount) {
_root.combocount = 0;
_root.comboshot = _root.comboshot - 1;
}
timecount++;
if (425 < timecount) {
level++;
if (level == 2) {
_root.level2.play();
}
if (level == 3) {
_root.level3.play();
}
timecount = 0;
}
Instance of Symbol 86 MovieClip "gimlibutton" in Frame 10
onClipEvent (enterFrame) {
if ((this._rotation == 0) && (random(100) == 2)) {
this._x = random(700) + 25;
this._y = random(400) + 50;
this.gotoAndPlay(1);
}
if (this._currentframe == 50) {
this._x = -200;
this._y = -200;
}
if (this.hitTest(_root.legolas)) {
this._x = -200;
this._y = -200;
this._rotation = 90;
_root.gimli.gotoAndPlay(5);
}
if (this._rotation == 90) {
_root.gimli._x = _root.gimli._x - 20;
}
if (_root.gimli._x < -20) {
_root.gimli._x = 950;
this._rotation = 0;
}
}
Instance of Symbol 88 MovieClip "bowbutton" in Frame 10
onClipEvent (enterFrame) {
if (random(100) == 2) {
this._x = random(700) + 25;
this._y = random(400) + 50;
this.gotoAndPlay(1);
}
if (this._currentframe == 50) {
this._x = -200;
this._y = -200;
}
if (this.hitTest(_root.legolas)) {
this._x = -50;
this._y = -100;
_root.coolarrow = 4;
s = new Sound();
s.attachSound("galabow");
s.setVolume(100);
s.start();
}
}
Instance of Symbol 90 MovieClip "arrow" in Frame 10
onClipEvent (enterFrame) {
if (this._rotation == 0) {
this._y = this._y - 38;
} else if (this._rotation == 90) {
this._x = this._x + 38;
} else if (this._rotation == -90) {
this._x = this._x - 38;
} else if (this._rotation == 180) {
this._y = this._y + 38;
}
if ((((this._x < -25) || (775 < this._x)) || (this._y < -25)) || (525 < this._y)) {
this._rotation = 10;
this._y = -500;
this._x = -500;
}
}
Instance of Symbol 93 MovieClip "legolas" in Frame 10
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT) && (this._x < 750)) {
this._rotation = 90;
this._x = this._x + 20;
}
if (Key.isDown(Key.DOWN) && (this._y < 470)) {
this._rotation = 180;
this._y = this._y + 20;
}
if (Key.isDown(Key.LEFT) && (0 < this._x)) {
this._rotation = 270;
this._x = this._x - 20;
}
if (Key.isDown(Key.UP) && (0 < this._y)) {
this._rotation = 0;
this._y = this._y - 20;
}
if ((Key.isDown(Key.SPACE) && (_root.coolarrow < 1)) && ((((_root.arrow._x < 0) || (_root.arrow._y < 0)) || (750 < _root.arrow._x)) || (500 < _root.arrow._y))) {
_root.arrow.gotoAndPlay(2);
_root.arrowcount++;
_root.arrow._y = this._y;
_root.arrow._x = this._x;
_root.arrow._rotation = this._rotation;
}
if ((Key.isDown(Key.SPACE) && (0 < _root.coolarrow)) && ((((_root.bigarrow._x < 0) || (_root.bigarrow._y < 0)) || (750 < _root.bigarrow._x)) || (500 < _root.bigarrow._y))) {
_root.bigarrow.gotoAndPlay(2);
_root.bigarrow._y = this._y;
_root.bigarrow._x = this._x;
_root.bigarrow._rotation = this._rotation;
_root.coolarrow--;
}
}
Instance of Symbol 98 MovieClip "bigarrow" in Frame 10
onClipEvent (enterFrame) {
if (this._rotation == 0) {
this._y = this._y - 38;
} else if (this._rotation == 90) {
this._x = this._x + 38;
} else if (this._rotation == -90) {
this._x = this._x - 38;
} else if (this._rotation == 180) {
this._y = this._y + 38;
}
if ((((this._x < -25) || (775 < this._x)) || (this._y < -25)) || (525 < this._y)) {
this._rotation = 10;
this._y = -500;
this._x = -500;
}
}
Instance of Symbol 100 MovieClip "orc" in Frame 10
onClipEvent (enterFrame) {
if ((this.hitTest(_root.legolas) && (_root.legolas._currentframe < 2)) && (this._currentframe < 20)) {
_root.lives--;
_root.legolas.gotoAndPlay(5);
}
if (this.hitTest(_root.gimli) && (this._currentframe < 20)) {
_root.score = _root.score + 5;
this.gotoAndPlay(20);
}
if (this.hitTest(_root.arrow) && (this._currentframe < 20)) {
_root.arrow._x = -200;
_root.arrow._y = -200;
_root.score++;
_root.comboshot++;
_root.combox = this._x;
_root.comboy = this._y;
_root.arrowhitcount++;
this.gotoAndPlay(20);
}
if (this.hitTest(_root.bigarrow) && (this._currentframe < 20)) {
_root.score++;
_root.comboshot++;
_root.combox = this._x;
_root.comboy = this._y;
this.gotoAndPlay(20);
}
if ((this._currentframe < 11) && (walkmode == "normal")) {
this._y = this._y + random(20);
this._x = this._x + random(20);
this._x = this._x - random(20);
this._rotation = 0;
}
if ((this._currentframe < 11) && (walkmode == "chase")) {
distx = this._x - _root.legolas._x;
disty = this._y - _root.legolas._y;
distz = Math.sqrt((distx * distx) + (disty * disty));
this._x = this._x - ((distx / distz) * 10);
this._y = this._y - ((disty / distz) * 10);
if ((0 < distx) && (0 < disty)) {
corner = (Math.atan(distx / disty) / (Math.PI/180)) - 90;
}
if ((0 < distx) && (disty < 0)) {
corner = Math.acos(distx / distz) / (Math.PI/180);
}
if ((distx < 0) && (disty < 0)) {
corner = (Math.atan(distx / disty) / (Math.PI/180)) + 90;
}
if ((distx < 0) && (0 < disty)) {
corner = (Math.acos((-distx) / distz) / (Math.PI/180)) + 180;
}
this._rotation = 90 - corner;
}
if (500 < this._y) {
_root.passes++;
this._y = -10;
this._x = random(700) + 25;
}
if (this._currentframe == 25) {
this._y = -20;
this._x = random(700) + 25;
this.gotoAndPlay(1);
}
if (this._y < 0) {
this.gotoAndPlay(1);
}
if ((this._y < 0) && (2 < _root.level)) {
if (random(7) < 2) {
walkmode = "chase";
} else {
walkmode = "normal";
}
}
}
onClipEvent (load) {
this._x = random(700) + 25;
this._y = random(100) - 150;
walkmode = "normal";
}
Instance of Symbol 109 MovieClip "easterling" in Frame 10
onClipEvent (enterFrame) {
if ((this.hitTest(_root.legolas) && (_root.legolas._currentframe < 2)) && (this._currentframe < 20)) {
_root.lives = _root.lives - 2;
_root.legolas.gotoAndPlay(5);
}
if (this.hitTest(_root.gimli) && (this._currentframe < 20)) {
_root.score = _root.score + 5;
this.gotoAndPlay(20);
}
if (this.hitTest(_root.arrow) && (this._currentframe < 20)) {
_root.arrow._x = -200;
_root.arrow._y = -200;
_root.score++;
_root.comboshot++;
_root.combox = this._x;
_root.comboy = this._y;
_root.arrowhitcount++;
this.gotoAndPlay(20);
}
if (this.hitTest(_root.bigarrow) && (this._currentframe < 20)) {
_root.score++;
_root.comboshot++;
_root.combox = this._x;
_root.comboy = this._y;
this.gotoAndPlay(20);
}
if (this._currentframe < 11) {
this._y = this._y + random(38);
this._x = this._x + random(30);
this._x = this._x - random(30);
}
if (500 < this._y) {
_root.passes++;
this._y = -10;
this._x = random(700) + 25;
}
if (this._currentframe == 25) {
this._y = -20;
this._x = random(700) + 25;
this.gotoAndPlay(1);
}
if (this._y < 0) {
this.gotoAndPlay(1);
}
}
Instance of Symbol 118 MovieClip in Frame 10
onClipEvent (enterFrame) {
if ((this.hitTest(_root.legolas) && (_root.legolas._currentframe < 2)) && (this._currentframe < 20)) {
_root.lives--;
_root.legolas.gotoAndPlay(5);
}
if ((this.hitTest(_root.gimli) && (this._currentframe < 20)) && (_root.gimli._x < 800)) {
_root.score = _root.score + 5;
this.gotoAndPlay(20);
}
if (this.hitTest(_root.arrow) && (this._currentframe < 20)) {
_root.arrow._x = -200;
_root.arrow._y = -200;
_root.score++;
_root.comboshot++;
_root.combox = this._x;
_root.comboy = this._y;
_root.arrowhitcount++;
this.gotoAndPlay(20);
}
if (this.hitTest(_root.bigarrow) && (this._currentframe < 20)) {
_root.score++;
_root.comboshot++;
_root.combox = this._x;
_root.comboy = this._y;
this.gotoAndPlay(20);
}
if (((this._currentframe < 20) && (900 >= this._x)) && (1 < _root.level)) {
this._x = (this._x + random(5)) + 40;
this._y = this._y + random(20);
this._y = this._y - random(20);
}
if (((900 < this._x) && (random(100) < 2)) && (1 < _root.level)) {
this._x = -200;
this._y = random(400) + 25;
}
if ((900 < this._x) && (this._y != 900)) {
this._y = 900;
}
if (this._currentframe == 25) {
this._x = 1000;
this.gotoAndPlay(1);
}
if (this._x < 0) {
this.gotoAndPlay(1);
}
}
onClipEvent (load) {
this._x = 1000;
this._y = 1000;
}
Instance of Symbol 141 MovieClip in Frame 10
onClipEvent (load) {
this.swapDepths(1000);
}
Frame 11
gotoAndPlay (10);
Frame 14
game = "legolas";
if (0 < _root.arrowcount) {
_root.arrowperc = Math.round((_root.arrowhitcount / _root.arrowcount) * 100);
} else {
_root.arrowperc = 0;
}
score = score + _root.arrowperc;
_root.orc1.removeMovieClip();
_root.orc2.removeMovieClip();
Frame 19
stop();
Symbol 2 Button
on (press) {
gotoAndPlay (10);
}
Symbol 7 Button
on (release) {
_root.infotext._visible = true;
}
Symbol 72 Button
on (release) {
this._visible = false;
}
Symbol 74 MovieClip Frame 1
if (this.sessionstarted != 1) {
this.arcade = new LoadVars();
this.sessionvars = new LoadVars();
this.arcade.gamename = "helmsdeep";
this.arcade.sessdo = "sessionstart";
this.arcade.sendAndLoad("arcade.php", sessionvars, "POST");
if (this.sessionvars.sessiontype != 2) {
_root.is_a_challenge = 0;
} else {
_root.is_a_challenge = 1;
}
this.sessionstarted = 1;
}
if (_root.gameover == 1) {
if ((this.askpermission != 1) && (this.sessionvars.connStatus == 1)) {
this.prequestvars = new LoadVars();
this.pranswer = new LoadVars();
this.prequestvars.gametime = this.sessionvars.gametime;
this.prequestvars.fakekey = this.sessionvars.initbar;
_root.score = int(Number(_root.score));
if (_root.score != 0) {
this.prequestvars.score = _root.score;
} else {
this.prequestvars.score = -1;
}
this.prequestvars.id = this.sessionvars.lastid;
this.prequestvars.sessdo = "permrequest";
this.prequestvars.note = (this.prequestvars.id * this.prequestvars.score) * this.prequestvars.fakekey;
this.prequestvars.sendAndLoad("./arcade.php", this.pranswer, "POST");
this.askpermission = 1;
}
if ((this.pranswer.validate == 1) && (this.finalsent != 1)) {
this.burnscore = new LoadVars();
this.burnscore.microone = this.pranswer.microone;
this.burnscore.gametime = this.prequestvars.gametime;
this.burnscore.id = this.prequestvars.id;
if (_root.score == 0) {
this.burnscore.noscore = 1;
}
this.burnscore.sessdo = "burn";
this.burnscore.send("./arcade.php", "_self", "POST");
this.finalsent = 1;
}
}
Symbol 78 Button
on (press) {
gotoAndPlay (10);
}
Symbol 84 Button
on (release) {
_root.infotext._visible = true;
}
Symbol 86 MovieClip Frame 50
stop();
Symbol 88 MovieClip Frame 50
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 20
gotoAndStop (1);
Symbol 98 MovieClip Frame 1
stop();
Symbol 100 MovieClip Frame 10
gotoAndPlay (1);
Symbol 100 MovieClip Frame 25
stop();
Symbol 109 MovieClip Frame 10
gotoAndPlay (1);
Symbol 109 MovieClip Frame 25
stop();
Symbol 118 MovieClip Frame 14
gotoAndPlay (1);
Symbol 118 MovieClip Frame 25
stop();
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 12
gotoAndPlay (6);
Symbol 138 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 41
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 41
stop();
Symbol 177 Button
on (release) {
score = _root.score;
_root.gameover = 1;
}
Symbol 179 Button
on (press) {
lives = 10;
score = 0;
passes = 0;
b = 1;
gotoAndPlay (1);
}
Symbol 182 Button
on (release) {
score = _root.score;
_root.gameover = 1;
}
Symbol 183 Button
on (press) {
lives = 10;
score = 0;
passes = 0;
b = 1;
gotoAndPlay (1);
}