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

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

Diablo 1.swf

This is the info page for
Flash #107196

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


ActionScript [AS1/AS2]
Combined Code
movieClip 2 chomp { frame 1 { _x = _root.shub._x; _y = _root.shub._y; timer = 0; onEnterFrame = function () { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v4 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 6; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 6; _rotation = 180 - v3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 6; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 6; _rotation = v3 * -1; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 6; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 6; _rotation = v3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 6; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 6; _rotation = 180 + v3; } } } } timer += 1; if (timer > 80) { timer = 0; loadMovie('', this); } if (this.hitTest(_root.char)) { _root.charHealth -= 0.3333333333333333 * (1 / _root.defense); } }; } } movieClip 6 tentacul { frame 1 { _x = _root.shub._x; _y = _root.shub._y; onEnterFrame = function () { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v4 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 6; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 6; _rotation = 180 - v3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = v3 * -1; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = v3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = 180 + v3; } } } } if (this.hitTest(_root.char)) { _root.charHealth -= 0.25 * (1 / _root.defense); } }; } frame 8 { _x = _root.shub._x; _y = _root.shub._y; onEnterFrame = function () { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v4 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 6; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 6; _rotation = 180 - v3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = v3 * -1; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = v3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = 180 + v3; } } } } if (this.hitTest(_root.char)) { _root.charHealth -= 0.25; } }; } frame 18 { _x = _root.shub._x; _y = _root.shub._y; onEnterFrame = function () { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v4 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 6; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 6; _rotation = 180 - v3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = v3 * -1; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = v3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = 180 + v3; } } } } if (this.hitTest(_root.char)) { _root.charHealth -= 0.25; } }; } frame 24 { _x = _root.shub._x; _y = _root.shub._y; onEnterFrame = function () { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v4 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 6; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 6; _rotation = 180 - v3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = v3 * -1; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = v3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = 180 + v3; } } } } loadMovie('', this); }; } } movieClip 8 warning { frame 1 { _y = _root.char._y + (random(100) - 50); _x = _root.char._x + (random(100) - 50); onEnterFrame = function () { this._alpha -= 1; if (this._alpha <= 15 and this.hitTest(_root.char)) { _root.charHealth -= 15; } if (this._alpha <= 10) { _root.attachMovie('block', 'block' + _root.block, _root.block++); _root['block' + _root.block]._x = this._x; _root['block' + _root.block]._y = this._y; loadMovie('', this); } }; } } movieClip 10 block { frame 1 { onEnterFrame = function () { if (this.hitTest(_root.char)) { _root.charHealth -= 1; _root.char._x += random(200) - 100; _root.char._y += random(200) - 100; } }; } } movieClip 12 fireVamp { frame 1 { count = 0; count5 = 0; time = random(30) + 60; xMov = random(4) - 2; yMov = random(4) - 2; randMove = true; spun = random(360) - 180; oldx = _x; oldy = _y; health = 25; attacking = false; attackCount = 0; timeHits = 0; timeHits2 = 0; timeHits3 = 0; timeHits4 = 0; burn = false; burnc = 0; _x = _root.char._x + Math.sin((_root.spawns._rotation / 180) * Math.PI) * 600; _y = _root.char._y - Math.cos((_root.spawns._rotation / 180) * Math.PI) * 600; onEnterFrame = function () { if (burn) { burnc += 1; _root.charHealth -= 0.8 * (1 / _root.defense); health += 0.05; if (burnc > 200) { burn = false; burnc = 0; } } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) > 900) { loadMovie('', this); _root.encount -= 1; } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) < 600) { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v5 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); count5 += 1; if (randMove == true) { _x = _x + Math.sin((spun / 180) * Math.PI) * 1.5; _y = _y - Math.cos((spun / 180) * Math.PI) * 1.5; if (count5 > time) { spun = random(360) - 180; count5 = 0; } } if (_root.backg.hitTest(this._x, this._y, true)) { oldx = _x; oldy = _y; count = 0; spawn = true; } else { count += 1; if (count > 2) { _x = oldx; _y = oldy; } } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) < 250) { if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) > 10) { randMove = false; xMov = 0; yMov = 0; if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3; } } } } } } else { randMove = true; } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) <= 10) { attacking = true; } else { attacking = false; } if (attacking == true) { attackCount += 1; if (attackCount > 3) { burn = true; attackCount = 0; _root.spin = true; } } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4) * (1000 + random(100)); } } else { timeHits = 0; } } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5) * (1000 + random(100)); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { timeHits3 += 1; if (timeHits3 == 3) { health -= int((_root.strength / 2 + 6) * _root['shout' + _root.AOE]._alpha / 100); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int((_root.strength / 2 + 6) * _root['shout' + _root.AOE]._alpha / 100) * (1000 + random(100)); } } else { timeHits3 = 0; } if (this.hitTest(_root.char.bash)) { trace('hit'); timeHits4 += 1; if (timeHits4 == 1) { health -= int(_root.strength / 2 + 3); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 3) * (1000 + random(100)); x += Math.sin((_rotation / 360) * 2 * Math.PI) * -100; _y = _y - Math.cos((_rotation / 360) * 2 * Math.PI) * -100; } } else { timeHits4 = 0; } if (health <= 0) { loadMovie('', this); _root.exper += 10; _root.encount -= 1; var v4 = random(5); if (v4 == 1) { _root.attachMovie('healthP', 'healthP' + _root.po, _root.po++); _root['healthP' + _root.po]._x = _x; _root['healthP' + _root.po]._y = _y; } if (v4 == 2) { _root.attachMovie('manaP', 'manaP' + _root.po, _root.po++); _root['manaP' + _root.po]._x = _x; _root['manaP' + _root.po]._y = _y; } } }; } } movieClip 15 fireworkTrail { frame 1 { xPos = 0; yPos = 0; gravity = 0; onEnterFrame = function () { _x = _x - xVel; _y = _y - yVel; count += 1; gravity += 0.005; _alpha = _alpha - 3; _xscale = _xscale - 3; _yscale = _yscale - 3; if (this._x < _root.char._x) { this._x += 0.5; } if (this._x > _root.char._x) { this._x -= 0.5; } if (this._y < _root.char._y) { this._y += 0.5; } if (this._y > _root.char._y) { this._y -= 0.5; } if (_alpha < 0 or _xscale <= 0) { loadMovie('', this); } }; } } movieClip 18 fireworkBullet { frame 1 { _x = _root.Cthulu._x; _y = _root.Cthulu._y; gravity = 0; count = 0; onEnterFrame = function () { xVel *= 0.975; yVel *= 0.975; _x = _x + xVel; _y = _y + yVel; count += 1; if (this.hitTest(_root.char)) { _root.charHealth -= 5; loadMovie('', this); } if (this._x < _root.char._x) { this._x += 2; } if (this._x > _root.char._x) { this._x -= 2; } if (this._y < _root.char._y) { this._y += 2; } if (this._y > _root.char._y) { this._y -= 2; } if (count > 2) { _root.attachMovie('fireworkTrail', 'fireworkTrail' + _root.trail, _root.trail++); _root['fireworkTrail' + _root.trail]._x = this._x; _root['fireworkTrail' + _root.trail]._y = this._y; count = 0; } }; } } movieClip 20 Dagon { frame 1 { this._x = _root.char._x - 600; this._y = _root.char._y + 100; onEnterFrame = function () { this._x += 10; if (this._x > _root.char._x + 200) { _root.dagDied = true; loadMovie('', this); } }; } } movieClip 22 Hydra { frame 1 { this._x = _root.char._x + 600; this._y = _root.char._y - 100; onEnterFrame = function () { this._x -= 10; if (this._x < _root.char._x - 200) { _root.hydDied = true; loadMovie('', this); } }; } } movieClip 24 xplode { frame 1 { _x = _root.Cthulu._x; _y = _root.Cthulu._y; onEnterFrame = function () { _xscale = _xscale + 20; _yscale = _yscale + 20; _alpha = _alpha - 5; if (_alpha < 0) { loadMovie('', this); } if (this.hitTest(_root.char)) { _root.charHealth -= 0.25; } }; } } movieClip 29 fier3 { frame 1 { timer = 0; onEnterFrame = function () { timer += 1; if (this.hitTest(_root.char)) { _root.health -= 4; loadMovie('', this); } _x = _x + Math.sin((_rotation / 180) * Math.PI) * 8; _y = _y - Math.cos((_rotation / 180) * Math.PI) * 8; if (timer >= 100) { loadMovie('', this); } }; } } movieClip 30 fier1 { frame 1 { _x = _root.Cthuga._x; _y = _root.Cthuga._y; timer1 = 0; onEnterFrame = function () { timer1 += 1; if (this.hitTest(_root.char)) { _root.charHealth -= 4; loadMovie('', this); } _x = _x + Math.sin((_rotation / 180) * Math.PI) * 8; _y = _y - Math.cos((_rotation / 180) * Math.PI) * 8; if (timer1 >= 100) { loadMovie('', this); } }; } } movieClip 33 fier2 { frame 1 { _x = _root.Cthuga._x + random(200) - random(200); _y = _root.Cthuga._y + random(200) - random(200); spin = random(30); tspawn = 0; b = 880000; health1 = 16; timeHits = 0; timeHits2 = 0; timeHits3 = 0; onEnterFrame = function () { if (this.hitTest(_root.char)) { _root.charHealth -= 0.5; } if (this._x < _root.char._x) { this._x += 3 + random(5); } if (this._x > _root.char._x) { this._x -= 3 + random(5); } if (this._y < _root.char._y) { this._y += 3 + random(5); } if (this._y > _root.char._y) { this._y -= 3 + random(5); } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health1 -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4); } } else { timeHits = 0; } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health1 -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { timeHits3 += 1; if (timeHits3 == 3) { health1 -= int(_root.strength / 2 + 6); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 6); } } else { timeHits3 = 0; } if (health1 <= 0) { loadMovie('', this); _root.howMany += 1; _root.encount -= 1; var v3 = random(5); if (v3 == 1) { _root.attachMovie('healthP', 'healthP' + _root.po, _root.po++); _root['healthP' + _root.po]._x = _x; _root['healthP' + _root.po]._y = _y; } if (v3 == 2) { _root.attachMovie('manaP', 'manaP' + _root.po, _root.po++); _root['manaP' + _root.po]._x = _x; _root['manaP' + _root.po]._y = _y; } } }; } } movieClip 35 minimap1 { frame 1 { onEnterFrame = function () { _x = xPos + _root.char._x + 300; _y = yPos + _root.char._y - 300; }; } } movieClip 38 minimap { frame 1 { _visible = false; onEnterFrame = function () { _x = xPos + _root.char._x - _root.char._x / 10; _y = yPos + _root.char._y - _root.char._y / 10; if (_x > _root.char._x - 48 and _x < _root.char._x + 24) { if (_y > _root.char._y - 48 and _y < _root.char._y + 24) { _visible = true; } } }; } } movieClip 40 black { } movieClip 48 char { frame 1 { stop(); onEnterFrame = function () { if (_root.walking == true) { this.play(); } }; } } movieClip 51 light { } movieClip 54 statue1 { frame 1 { onEnterFrame = function () { if (this.hitTest(_root.char1)) { _root.gotoAndStop(2); } }; } } movieClip 57 cloudw { } movieClip 60 statue { } movieClip 63 sea { } movieClip 66 jelly { frame 1 { count = 0; count5 = 0; time = random(30) + 60; xMov = random(4) - 2; yMov = random(4) - 2; randMove = true; spun = random(360) - 180; oldx = _x; oldy = _y; health = 25; attacking = false; attackCount = 0; timeHits = 0; timeHits2 = 0; timeHits3 = 0; timeHits4 = 0; pulse = 0; pois = false; poisc = 0; _x = _root.char._x + Math.sin((_root.spawns._rotation / 180) * Math.PI) * 600; _y = _root.char._y - Math.cos((_root.spawns._rotation / 180) * Math.PI) * 600; onEnterFrame = function () { pulse += 0.1; _y = _y + Math.cos(pulse); if (pois == true) { poisc += 1; _root.charHealth -= 1 * (1 / _root.defense); if (poisc > 300) { pois = false; poisc = 0; } } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) > 900) { loadMovie('', this); _root.encount -= 1; } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) < 600) { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v5 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); count5 += 1; if (randMove == true) { _x = _x + Math.sin((spun / 180) * Math.PI) * 1.5; _y = _y - Math.cos((spun / 180) * Math.PI) * 1.5; if (count5 > time) { spun = random(360) - 180; count5 = 0; } } if (_root.backg.hitTest(this._x, this._y, true)) { oldx = _x; oldy = _y; count = 0; spawn = true; } else { count += 1; if (count > 2) { _x = oldx; _y = oldy; } } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) < 250) { if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) > 10) { randMove = false; xMov = 0; yMov = 0; if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3; } } } } } } else { randMove = true; } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) <= 10) { attacking = true; } else { attacking = false; } if (attacking == true) { attackCount += 1; if (attackCount > 30) { _root.charHealth -= 50 * (1 / _root.defense); _root.poison = true; pois = true; attackCount = 0; _root.spin = true; } } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4) * (1000 + random(100)); } } else { timeHits = 0; } } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5) * (1000 + random(100)); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { timeHits3 += 1; if (timeHits3 == 3) { health -= int((_root.strength / 2 + 6) * _root['shout' + _root.AOE]._alpha / 100); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int((_root.strength / 2 + 6) * _root['shout' + _root.AOE]._alpha / 100) * (1000 + random(100)); } } else { timeHits3 = 0; } if (this.hitTest(_root.char.bash)) { trace('hit'); timeHits4 += 1; if (timeHits4 == 1) { health -= int(_root.strength / 2 + 3); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 3) * (1000 + random(100)); x += Math.sin((_rotation / 360) * 2 * Math.PI) * -100; _y = _y - Math.cos((_rotation / 360) * 2 * Math.PI) * -100; } } else { timeHits4 = 0; } if (health <= 0) { loadMovie('', this); _root.exper += 10; _root.encount -= 1; var v4 = random(5); if (v4 == 1) { _root.attachMovie('healthP', 'healthP' + _root.po, _root.po++); _root['healthP' + _root.po]._x = _x; _root['healthP' + _root.po]._y = _y; } if (v4 == 2) { _root.attachMovie('manaP', 'manaP' + _root.po, _root.po++); _root['manaP' + _root.po]._x = _x; _root['manaP' + _root.po]._y = _y; } } }; } } movieClip 69 Bsmith { frame 1 { _x = 600; _y = 600; count5 = 0; count = 0; time = random(30) + 60; xMov = random(4) - 2; yMov = random(4) - 2; randMove = true; spun = random(360) - 180; oldx = _x; oldy = _y; xbound = 600; ybound = 600; onEnterFrame = function () { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v2 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); count5 += 1; if (randMove) { _x = _x + Math.sin((spun / 180) * Math.PI) * 1.5; _y = _y - Math.cos((spun / 180) * Math.PI) * 1.5; if (count5 > time) { spun = random(360) - 180; count5 = 0; } if (_rotation < spun) { _rotation = _rotation + 4; } if (_rotation > spun) { _rotation = _rotation - 4; } } if (Math.sqrt(Math.pow(ybound - _y, 2) + Math.pow(xbound - _x, 2)) < 100) { oldx = _x; oldy = _y; count = 0; spawn = true; } else { count += 1; if (count > 2) { _x = oldx; _y = oldy; } } }; } } movieClip 72 Hilda { frame 1 { heart = 80000000; _x = 800; _y = 800; count = 0; count5 = 0; heartc = 0; time = random(30) + 60; xMov = random(4) - 2; yMov = random(4) - 2; randMove = true; spun = random(360) - 180; oldx = _x; oldy = _y; onEnterFrame = function () { if (heart > 80000050) { heart = 80000000; } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) <= 20) { _root.charHealth += 1; } var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v4 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); count5 += 1; if (randMove == true) { _x = _x + Math.sin((spun / 180) * Math.PI) * 1.5; _y = _y - Math.cos((spun / 180) * Math.PI) * 1.5; if (count5 > time) { spun = random(360) - 180; count5 = 0; } if (_rotation < spun) { _rotation = _rotation + 4; } if (_rotation > spun) { _rotation = _rotation - 4; } } if (_root.backg.hitTest(this._x, this._y, true)) { oldx = _x; oldy = _y; count = 0; spawn = true; } else { count += 1; if (count > 2) { _x = oldx; _y = oldy; } } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) < 120) { heartc += 1; if (heartc > 2) { _root.attachMovie('heart', 'heart' + heart, heart++); _root['heart' + heart]._x = _x; _root['heart' + heart]._y = _y; heartc = 0; } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) > 20) { randMove = false; xMov = 0; yMov = 0; if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3; _rotation = 180 - v3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3; _rotation = v3 * -1; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3; _rotation = v3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3; _rotation = 180 + v3; } } } } } } else { randMove = true; } }; } } button 74 { on (press) { trace('hit'); } } movieClip 76 enemy { frame 1 { count = 0; count5 = 0; time = random(30) + 60; xMov = random(4) - 2; yMov = random(4) - 2; randMove = true; spun = random(360) - 180; oldx = _x; oldy = _y; health = 25; attacking = false; attackCount = 0; timeHits = 0; timeHits2 = 0; timeHits3 = 0; timeHits4 = 0; _x = _root.char._x + Math.sin((_root.spawns._rotation / 180) * Math.PI) * 600; _y = _root.char._y - Math.cos((_root.spawns._rotation / 180) * Math.PI) * 600; onEnterFrame = function () { if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) > 900) { loadMovie('', this); _root.encount -= 1; } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) < 600) { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v5 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); count5 += 1; if (randMove == true) { _x = _x + Math.sin((spun / 180) * Math.PI) * 1.5; _y = _y - Math.cos((spun / 180) * Math.PI) * 1.5; if (count5 > time) { spun = random(360) - 180; count5 = 0; } if (_rotation < spun) { _rotation = _rotation + 4; } if (_rotation > spun) { _rotation = _rotation - 4; } } if (_root.backg.hitTest(this._x, this._y, true)) { oldx = _x; oldy = _y; count = 0; spawn = true; } else { count += 1; if (count > 2) { _x = oldx; _y = oldy; } } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) < 250) { if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) > 80) { randMove = false; xMov = 0; yMov = 0; if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3; _rotation = 180 - v3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3; _rotation = v3 * -1; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3; _rotation = v3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3; _rotation = 180 + v3; } } } } } } else { randMove = true; } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) <= 80) { attacking = true; } else { attacking = false; } if (attacking == true) { attackCount += 1; if (attackCount > 30) { _root.charHealth -= 50 * (1 / _root.defense); attackCount = 0; } } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4) * (1000 + random(100)); } } else { timeHits = 0; } } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5) * (1000 + random(100)); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { timeHits3 += 1; if (timeHits3 == 3) { health -= int((_root.strength / 2 + 6) * _root['shout' + _root.AOE]._alpha / 100); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int((_root.strength / 2 + 6) * _root['shout' + _root.AOE]._alpha / 100) * (1000 + random(100)); } } else { timeHits3 = 0; } if (this.hitTest(_root.char.bash)) { trace('hit'); timeHits4 += 1; if (timeHits4 == 1) { health -= int(_root.strength / 2 + 3); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 3) * (1000 + random(100)); _x = _x + Math.sin((_rotation / 360) * 2 * Math.PI) * -100; _y = _y - Math.cos((_rotation / 360) * 2 * Math.PI) * -100; } } else { timeHits4 = 0; } if (health <= 0) { loadMovie('', this); _root.exper += 10; _root.encount -= 1; var v4 = random(5); if (v4 == 1) { _root.attachMovie('healthP', 'healthP' + _root.po, _root.po++); _root['healthP' + _root.po]._x = _x; _root['healthP' + _root.po]._y = _y; } if (v4 == 2) { _root.attachMovie('manaP', 'manaP' + _root.po, _root.po++); _root['manaP' + _root.po]._x = _x; _root['manaP' + _root.po]._y = _y; } } }; } } movieClip 80 fire1 { frame 1 { _x = _root['meteor1' + _root.AOE]._x; _y = _root['meteor1' + _root.AOE]._y; var xVel = random(5) - 2; var yVel = random(5) - 2; var timer = 0; var count = 30; onEnterFrame = function () { count += 1; if (count > 5) { xVel = random(5) - 2; yVel = random(5) - 2; count = 0; } _x = _x + xVel; _y = _y + yVel; timer += 1; _alpha = _alpha - 0.5; if (timer > 120) { loadMovie('', this); } }; } } movieClip 83 sword { } movieClip 84 slash { frame 16 { loadMovie('', this); } } movieClip 86 shout { frame 1 { _x = _root._xmouse; _y = _root._ymouse; onEnterFrame = function () { _xscale = _xscale + 20; _yscale = _yscale + 20; _alpha = _alpha - 2; if (_alpha < 0) { loadMovie('', this); } }; } } movieClip 88 meteor1 { frame 1 { _x = _root.char._x; _y = _root.char._y; count = 0; count2 = 0; count3 = 0; fire1 = 50300; spin = _root.char._rotation; onEnterFrame = function () { count2 += 1; count3 += 1; if (count2 < 40) { _x = _x + Math.sin((spin / 360) * 2 * Math.PI) * 10; _y = _y - Math.cos((spin / 360) * 2 * Math.PI) * 10; } else { count += 1; } if (count > 15) { loadMovie('', this); } if (count3 > 3) { _root.attachMovie('fire1', 'fire1' + fire1, fire1++); count3 = 0; } if (fire1 > 50310) { fire1 = 50300; } }; } } movieClip 90 exit { frame 1 { onEnterFrame = function () { if (this.hitTest(_root.char)) { c = 1000; while (c < 2000) { loadMovie('', _root['statue' + c]); loadMovie('', _root['cloudw' + c]); ++c; } loadMovie('', _root.maps); loadMovie('', this); if (_root.cthugaPartyTime == true) { _root.gotoAndStop(8); } else { if (_root.cthuluPartyTime == false) { _root.gotoAndStop(7); } else { if (_root.cthuluPartyTime == true) { _root.gotoAndStop(5); } } } } }; } } movieClip 93 wall { } movieClip 98 creamyGrass { } movieClip 101 grass3 { } movieClip 104 grass2 { } movieClip 107 portani { frame 1 { onEnterFrame = function () { if (this.hitTest(_root.char._x, _root.char._y, true)) { c = 1000; while (c < 3000) { loadMovie('', _root['wall' + c]); loadMovie('', _root['portal' + c]); loadMovie('', _root['creamyTown' + c]); ++c; } b = 1000000; while (b < 1001000) { loadMovie('', _root['minimap1' + b]); ++b; } _root.gotoAndStop(3); } a = 0; c = 1000; b = 1000000; }; } } movieClip 108 portal { } movieClip 110 health { frame 1 { onEnterFrame = function () { _x = _root.char._x - 65; _y = _root.char._y + 384 - 12.5 + 75; }; } } movieClip 112 mana { frame 1 { onEnterFrame = function () { _x = _root.char._x + 65; _y = _root.char._y + 384 - 12.5 + 75; }; } } movieClip 114 creamyTown { frame 1 { onEnterFrame = function () { if (this.hitTest(_root.char._x, _root.char._y, true)) { c = 1000; while (c < 3000) { loadMovie('', _root['portal' + c]); ++c; } b = 1000000; while (b < 1001000) { loadMovie('', _root['minimap1' + b]); ++b; } d = 55000; while (d < 55045) { loadMovie('', _root['enemy' + d]); ++d; } _root.gotoAndStop(4); } }; } } movieClip 117 enDam { frame 1 { xVel = random(20) / 10; onEnterFrame = function () { _y = _y - 2; _x = _x + xVel; _alpha = _alpha - 2.5; if (_alpha < 0) { loadMovie('', this); } }; } } movieClip 120 gui { frame 1 { onEnterFrame = function () { _x = _root.char._x; _y = _root.char._y + 384 + 75; }; } } movieClip 121 backui { frame 1 { onEnterFrame = function () { _x = _root.char._x; _y = _root.char._y + 384 + 75; }; } } movieClip 124 firefloor { } movieClip 127 cloud { } movieClip 128 spawns { } movieClip 131 manaP { frame 1 { onEnterFrame = function () { if (this.hitTest(_root.char) and Key.isDown(68)) { _root.manaP += 1; loadMovie('', this); } }; } } movieClip 134 healthP { frame 1 { onEnterFrame = function () { if (this.hitTest(_root.char) and Key.isDown(68)) { _root.healthP += 1; loadMovie('', this); } }; } } movieClip 136 manaG { frame 1 { onEnterFrame = function () { _x = _root.char._x + 138; _y = _root.char._y + 402; }; } } movieClip 138 healthG { frame 1 { onEnterFrame = function () { _x = _root.char._x - 152; _y = _root.char._y + 402; }; } } movieClip 140 bash { frame 10 { loadMovie('', this); } } movieClip 143 heart { frame 1 { xVel = random(20) - 10; xVel /= 10; _x = _x + (random(40) - 20); _y = _y + (random(40) - 20); onEnterFrame = function () { _y = _y - 0.2; _alpha = _alpha - 2; _x = _x + xVel; _xscale = _xscale + 3; _yscale = _yscale + 3; if (_alpha < 0) { loadMovie('', this); } }; } } movieClip 146 dad { frame 1 { _x = 960; _y = 500; count5 = 0; count = 0; time = random(30) + 60; xMov = random(4) - 2; yMov = random(4) - 2; randMove = true; spun = random(360) - 180; oldx = _x; oldy = _y; _rotation = 180; onEnterFrame = function () { if (_root.backg.hitTest(this._x, this._y, true)) { oldx = _x; oldy = _y; count = 0; spawn = true; } else { count += 1; if (count > 2) { _x = oldx; _y = oldy; } } }; } } movieClip 149 mom { frame 1 { _x = 1200; _y = 1000; xbound = 1200; ybound = 1000; count5 = 0; count = 0; time = random(30) + 60; xMov = random(4) - 2; yMov = random(4) - 2; randMove = true; spun = random(360) - 180; oldx = _x; oldy = _y; onEnterFrame = function () { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v2 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); count5 += 1; if (randMove) { _x = _x + Math.sin((spun / 180) * Math.PI) * 1.5; _y = _y - Math.cos((spun / 180) * Math.PI) * 1.5; if (count5 > time) { spun = random(360) - 180; count5 = 0; } if (_rotation < spun) { _rotation = _rotation + 4; } if (_rotation > spun) { _rotation = _rotation - 4; } } if (Math.sqrt(Math.pow(ybound - _y, 2) + Math.pow(xbound - _x, 2)) < 100) { oldx = _x; oldy = _y; count = 0; spawn = true; } else { count += 1; if (count > 2) { _x = oldx; _y = oldy; } } }; } } movieClip 152 randall { frame 1 { _x = 800; _y = 800; count5 = 0; count = 0; time = random(30) + 60; xMov = random(4) - 2; yMov = random(4) - 2; randMove = true; spun = random(360) - 180; oldx = _x; oldy = _y; onEnterFrame = function () { var v4 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v3 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); count5 += 1; if (randMove) { _x = _x + Math.sin((spun / 180) * Math.PI) * 1.5; _y = _y - Math.cos((spun / 180) * Math.PI) * 1.5; if (count5 > time) { spun = random(360) - 180; count5 = 0; } if (_rotation < spun) { _rotation = _rotation + 4; } if (_rotation > spun) { _rotation = _rotation - 4; } } if (_root.backg.hitTest(this._x, this._y, true)) { oldx = _x; oldy = _y; count = 0; spawn = true; } else { count += 1; if (count > 2) { _x = oldx; _y = oldy; } } }; } } movieClip 156 manaStat { frame 1 { onEnterFrame = function () { _x = _root.char._x + 75; _y = _root.char._y + 442; mana = int(_root.manas); }; } } movieClip 158 shub { frame 1 { count = 0; time = random(30) + 60; xMov = random(4) - 2; yMov = random(4) - 2; randMove = true; spun = random(360) - 180; oldx = _x; oldy = _y; health = 2000; attacking = false; attackCount = 0; timeHits = 0; timeHits2 = 0; timeHits3 = 0; timeHits4 = 0; timer = 0; timer2 = 0; timer3 = 0; chomp = 1000000; warning = 6000000; _x = _root.char._x + Math.sin((_root.spawns._rotation / 180) * Math.PI) * 600; _y = _root.char._y - Math.cos((_root.spawns._rotation / 180) * Math.PI) * 600; onEnterFrame = function () { timer += 1; timer2 += 1; timer3 += 1; if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) < 600) { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v5 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); count += 1; if (randMove == true) { _x = _x + Math.sin((spun / 180) * Math.PI) * 1.5; _y = _y - Math.cos((spun / 180) * Math.PI) * 1.5; if (count > time) { spun = random(360) - 180; count = 0; } if (_rotation < spun) { _rotation = _rotation + 4; } if (_rotation > spun) { _rotation = _rotation - 4; } } if (_root.backg.hitTest(this._x, this._y, true)) { oldx = _x; oldy = _y; count = 0; spawn = true; } else { count += 1; if (count > 2) { _x = oldx; _y = oldy; } } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) < 500) { if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) > 130) { randMove = false; xMov = 0; yMov = 0; if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = 180 - v3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = v3 * -1; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = v3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 3.5; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 3.5; _rotation = 180 + v3; } } } } } } else { randMove = true; } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) <= 80) { attacking = true; } else { attacking = false; } if (attacking == true) { attackCount += 1; if (attackCount > 30) { _root.charHealth -= 4 * (1 / _root.defense); attackCount = 0; } } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4); } } else { timeHits = 0; } } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { timeHits3 += 1; if (timeHits3 == 3) { health -= int((_root.strength / 2 + 6) * _root['shout' + _root.AOE]._alpha / 100); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int((_root.strength / 2 + 6) * _root['shout' + _root.AOE]._alpha / 100); } } else { timeHits3 = 0; } if (this.hitTest(_root.char.bash)) { trace('hit'); timeHits4 += 1; if (timeHits4 == 1) { health -= int(_root.strength / 2 + 3); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 3); _x = _x + Math.sin((_rotation / 360) * 2 * Math.PI) * -100; _y = _y - Math.cos((_rotation / 360) * 2 * Math.PI) * -100; } } else { timeHits4 = 0; } if (timer >= 380) { _root.attachMovie('chomp', 'chomp' + chomp, chomp++); timer = 0; } if (timer2 >= 900) { _root.attachMovie('tentacul', 'tentacul' + chomp, chomp++); timer2 = 0; } if (chomp >= 1000001) { chomp = 1000000; } if (timer3 >= 760) { _root.attachMovie('warning', 'warning' + warning, warning++); timer3 = 0; } if (health <= 0) { loadMovie('', this); _root.exper += 10; _root.encount -= 1; var v4 = random(5); if (v4 == 1) { _root.attachMovie('healthP', 'healthP' + _root.po, _root.po++); _root['healthP' + _root.po]._x = _x; _root['healthP' + _root.po]._y = _y; } if (v4 == 2) { _root.attachMovie('manaP', 'manaP' + _root.po, _root.po++); _root['manaP' + _root.po]._x = _x; _root['manaP' + _root.po]._y = _y; } _root.gotoAndStop(4); } }; } } movieClip 162 Cthulu { frame 1 { stop(); firstTime = true; timerCth = 0; count = 0; time = random(30) + 60; xMov = random(4) - 2; yMov = random(4) - 2; randMove = false; spun = random(360) - 180; oldx = _x; oldy = _y; spawn = false; if (_root.neverLeave == true) { health = 300; } attacking = false; attackCount = 0; timeHits = 0; timeHits2 = 0; timeHits3 = 0; onEnterFrame = function () { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v5 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); count += 1; if (_root.char._x >= _x and _root.char._y >= _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 10; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 10; _rotation = 180 - v3; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 10; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 10; _rotation = v3 * -1; } else { if (_root.char._x > _x and _root.char._y < _y) { _x = _x + Math.sin((v3 / 360) * 2 * Math.PI) * 10; _y = _y - Math.cos((v3 / 360) * 2 * Math.PI) * 10; _rotation = v3; } else { if (_root.char._x < _x and _root.char._y > _y) { _x = _x - Math.sin((v3 / 360) * 2 * Math.PI) * 10; _y = _y + Math.cos((v3 / 360) * 2 * Math.PI) * 10; _rotation = 180 + v3; } } } } if (Math.sqrt(Math.pow(_root.char._y - _y, 2) + Math.pow(_root.char._x - _x, 2)) <= 80) { attacking = true; } else { attacking = false; } if (attacking == true) { attackCount += 1; if (attackCount > 30) { _root.charHealth -= 25 * (1 / _root.defense); attackCount = 0; _root.neverLeave = false; gotoAndStop(2); } if (health < 100) { times = 0; gotoAndStop(4); } } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4); } } else { timeHits = 0; } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { trace(health); timeHits3 += 1; if (timeHits3 == 3) { health -= int(_root.strength / 2 + 6); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 6); } } else { timeHits3 = 0; } if (health <= 0) { loadMovie('', this); _root.cthuluPartyTime = true; _root.exper += 3000; _root.encount -= 1; var v4 = random(5); if (v4 == 1) { _root.attachMovie('healthP', 'healthP' + _root.po, _root.po++); _root['healthP' + _root.po]._x = _x; _root['healthP' + _root.po]._y = _y; } if (v4 == 2) { _root.attachMovie('manaP', 'manaP' + _root.po, _root.po++); _root['manaP' + _root.po]._x = _x; _root['manaP' + _root.po]._y = _y; } _root.gotoAndStop(4); } }; } frame 2 { stop(); count5 = 80; xSpin = 10; ySpin = 10; times = 0; count3 = 0; _rotation = 0; onEnterFrame = function () { trace(health); times += 1; var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v5 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); if (_root.char._x >= _x and _root.char._y >= _y) { _rotation = 180 - v3 + 180; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _rotation = v3 * -1 + 180; } else { if (_root.char._x > _x and _root.char._y < _y) { _rotation = v3 + 180; } else { if (_root.char._x < _x and _root.char._y > _y) { _rotation = 180 + v3 + 180; } } } } count5 += 1; count3 += 1; xSpin = this._rotation + 10; ySpin = this._rotation + 10; if (count5 > 100) { a = 0; while (a < 8) { _root.attachMovie('fireworkBullet', 'fireworkBullet' + _root.cd, _root.cd++); _root['fireworkBullet' + _root.cd]._x = this._x; _root['fireworkBullet' + _root.cd]._y = this._y; _root['fireworkBullet' + _root.cd].yVel = Math.sin((ySpin / 180) * Math.PI) * 4; _root['fireworkBullet' + _root.cd].xVel = Math.cos((xSpin / 180) * Math.PI) * 4; count5 = 0; ySpin += 22.5; xSpin += 22.5; ++a; } } if (times >= 100) { if (health < 1300 and health > 1200) { times = 0; gotoAndStop(3); } if (health < 1100 and health > 1000) { times = 0; gotoAndStop(1); } if (health < 800 and health > 700) { times = 0; gotoAndStop(3); } if (health < 600 and health > 500) { times = 0; gotoAndStop(1); } } if (health < 100) { times = 0; gotoAndStop(4); } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4); } } else { timeHits = 0; } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { trace(health); timeHits3 += 1; if (timeHits3 == 3) { health -= int(_root.strength / 2 + 6); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 6); } } else { timeHits3 = 0; } if (health <= 0) { loadMovie('', this); _root.cthuluPartyTime = true; _root.exper += 3000; _root.encount -= 1; var v4 = random(5); if (v4 == 1) { _root.attachMovie('healthP', 'healthP' + _root.po, _root.po++); _root['healthP' + _root.po]._x = _x; _root['healthP' + _root.po]._y = _y; } if (v4 == 2) { _root.attachMovie('manaP', 'manaP' + _root.po, _root.po++); _root['manaP' + _root.po]._x = _x; _root['manaP' + _root.po]._y = _y; } _root.gotoAndStop(4); } }; } frame 3 { stop(); _rotation = 0; _root.attachMovie('Dagon', 'Dagon' + _root.Dagon, _root.Dagon++); _root.attachMovie('Hydra', 'Hydra' + _root.Hydra, _root.Hydra++); onEnterFrame = function () { if (_root.dagDied == true and _root.hydDied == true) { health -= 30; gotoAndStop(2); _root.hydDied = false; _root.dagDied = false; } if (health < 100) { times = 0; gotoAndStop(4); } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4); } } else { timeHits = 0; } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { trace(health); timeHits3 += 1; if (timeHits3 == 3) { health -= int(_root.strength / 2 + 6); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 6); } } else { timeHits3 = 0; } if (health <= 0) { loadMovie('', this); _root.cthuluPartyTime = true; _root.exper += 3000; _root.encount -= 1; var v3 = random(5); if (v3 == 1) { _root.attachMovie('healthP', 'healthP' + _root.po, _root.po++); _root['healthP' + _root.po]._x = _x; _root['healthP' + _root.po]._y = _y; } if (v3 == 2) { _root.attachMovie('manaP', 'manaP' + _root.po, _root.po++); _root['manaP' + _root.po]._x = _x; _root['manaP' + _root.po]._y = _y; } _root.gotoAndStop(4); } }; } frame 4 { stop(); count5 = 80; xSpin = 10; ySpin = 10; times = 0; count3 = 0; _rotation = 0; onEnterFrame = function () { var v3 = (Math.atan(Math.abs(_root.char._x - _x) / Math.abs(_root.char._y - _y)) / Math.PI) * 180; var v5 = Math.abs((Math.atan(xMov / yMov) / Math.PI) * 180); if (_root.char._x >= _x and _root.char._y >= _y) { _rotation = 180 - v3 + 180; } else { if (_root.char._x <= _x and _root.char._y <= _y) { _rotation = v3 * -1 + 180; } else { if (_root.char._x > _x and _root.char._y < _y) { _rotation = v3 + 180; } else { if (_root.char._x < _x and _root.char._y > _y) { _rotation = 180 + v3 + 180; } } } } count5 += 1; count3 += 1; xSpin = this._rotation + 10; ySpin = this._rotation + 10; if (count5 > 100) { a = 0; while (a < 8) { _root.attachMovie('fireworkBullet', 'fireworkBullet' + _root.cd, _root.cd++); _root['fireworkBullet' + _root.cd]._x = this._x; _root['fireworkBullet' + _root.cd]._y = this._y; _root['fireworkBullet' + _root.cd].yVel = Math.sin((ySpin / 180) * Math.PI) * 4; _root['fireworkBullet' + _root.cd].xVel = Math.cos((xSpin / 180) * Math.PI) * 4; ySpin += 22.5; xSpin += 22.5; ++a; } f = 0; while (f < 30) { _root.attachMovie('xplode', 'xplode' + _root.g, _root.g++); _root['xplode' + _root.g]._x = this._x; _root['xplode' + _root.g]._y = this._y; count5 = 0; ++f; } } if (health <= 0) { loadMovie('', this); } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4); } } else { timeHits = 0; } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { trace(health); timeHits3 += 1; if (timeHits3 == 3) { health -= int(_root.strength / 2 + 6); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 6); } } else { timeHits3 = 0; } if (health <= 0) { loadMovie('', this); _root.cthuluPartyTime = true; _root.exper += 3000; _root.encount -= 1; var v4 = random(5); if (v4 == 1) { _root.attachMovie('healthP', 'healthP' + _root.po, _root.po++); _root['healthP' + _root.po]._x = _x; _root['healthP' + _root.po]._y = _y; } if (v4 == 2) { _root.attachMovie('manaP', 'manaP' + _root.po, _root.po++); _root['manaP' + _root.po]._x = _x; _root['manaP' + _root.po]._y = _y; } _root.gotoAndStop(4); } }; } } movieClip 165 { } movieClip 166 poigui { frame 1 { stop(); onEnterFrame = function () { _x = _root.char._x - 65; _y = _root.char._y + 384 - 12.5 + 75; if (_root.poison) { play(); } }; } } button 171 { on (press) { if (_root.stats > 0) { _root.defense += 1; _root.stats -= 1; } } } movieClip 172 defbut { } movieClip 175 vittext { } movieClip 177 deftext { } button 178 { on (press) { if (_root.stats > 0) { _root.vitals += 1; _root.maxHealth += 15; _root.maxMana += 5; _root.charHealth = _root.maxHealth; _root.manas = _root.maxMana; _root.stats -= 1; } } } movieClip 179 vitbut { } movieClip 182 statno { frame 1 { _alpha = 0; onEnterFrame = function () { if (_root.stats <= 0) { _alpha = 100; } else { _alpha = 0; } }; } } // unknown tag 88 length 199 movieClip 190 menus { } movieClip 192 moving { } movieClip 195 Cthuga { frame 1 { stop(); health = 100; timeHits = 0; timeHits2 = 0; timeHits3 = 0; onEnterFrame = function () { _root.timer += 1; if (_root.timer == 10) { gotoAndStop(2); } if (this.hitTest(_root.char)) { _root.charHealth -= 0.5 * (1 / _root.defense); } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4); } } else { timeHits = 0; } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { trace(health); timeHits3 += 1; if (timeHits3 == 3) { health -= int(_root.strength / 2 + 6); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 6); } } else { timeHits3 = 0; } if (health <= 0) { _root.exper += 3000; _root.encount -= 1; var v3 = random(5); _root.cthuluPartyTime = true; c = 1000; while (c < 2000) { loadMovie('', _root['statue' + c]); loadMovie('', _root['cloudw' + c]); ++c; } _root.cthugaPartyTime = true; loadMovie('', this); } }; } frame 2 { stop(); onEnterFrame = function () { _root.timer += 1; this._x -= 5; this._y += 5; if (_root.timer == 30) { gotoAndStop(3); } if (this.hitTest(_root.char)) { _root.charHealth -= 0.5 * (1 / _root.defense); } }; } frame 3 { stop(); onEnterFrame = function () { _root.timer += 1; this._x += 5; this._y += 5; if (_root.timer == 50) { gotoAndStop(4); } if (this.hitTest(_root.char)) { _root.charHealth -= 0.5 * (1 / _root.defense); } }; } frame 4 { stop(); spin = random(30); spawn = true; tspawn = 3; this._alpha = 100; _root.howMany = 0; this._rotation = 0; onEnterFrame = function () { _root.timer += 1; if (_root.timer == 140) { gotoAndStop(5); } if (_root.timer == 280) { gotoAndStop(7); } if (_root.timer == 450) { gotoAndStop(8); } tspawn += 1; if (tspawn > 2) { spin += 35; _root.attachMovie('fier1', 'fier1' + _root.fier, _root.fier++); _root['fier1' + _root.fier]._rotation = spin; tspawn = 0; } if (this.hitTest(_root.char)) { _root.charHealth -= 0.25 * (1 / _root.defense); } if (this.hitTest(_root.char.slash)) { trace('hit'); timeHits += 1; if (timeHits == 1) { health -= int(_root.strength / 2 + 4); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 4); } } else { timeHits = 0; } if (this.hitTest(_root['meteor1' + _root.AOE])) { trace(health); timeHits2 += 1; if (timeHits2 == 3) { health -= int(_root.strength / 1.5 + 5); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 1.5 + 5); } } else { timeHits2 = 0; } if (this.hitTest(_root['shout' + _root.AOE])) { trace(health); timeHits3 += 1; if (timeHits3 == 3) { health -= int(_root.strength / 2 + 6); _root.attachMovie('enDam', 'enDam' + _root.damn, _root.damn++); _root['enDam' + _root.damn]._x = _x; _root['enDam' + _root.damn]._y = _y; _root['enDam' + _root.damn].damage = int(_root.strength / 2 + 6); } } else { timeHits3 = 0; } }; } frame 5 { stop(); onEnterFrame = function () { _root.timer += 1; this._x += 5; this._y -= 5; if (_root.timer == 160) { gotoAndStop(6); } if (this.hitTest(_root.char)) { _root.charHealth -= 0.5 * (1 / _root.defense); } }; } frame 6 { stop(); onEnterFrame = function () { _root.timer += 1; this._x -= 5; this._y -= 5; if (_root.timer == 180) { gotoAndStop(4); } if (this.hitTest(_root.char)) { _root.charHealth -= 0.5 * (1 / _root.defense); } }; } frame 7 { stop(); onEnterFrame = function () { this._rotation = (Math.atan2(this._x - _root.char._x, this._y - _root.char._y) * 180 / Math.PI) * -1; _root.timer += 1; if (this._x < _root.char._x) { this._x += 5.5; } if (this._x > _root.char._x) { this._x -= 5.5; } if (this._y < _root.char._y) { this._y += 5.5; } if (this._y > _root.char._y) { this._y -= 5.5; } if (_root.timer == 360) { gotoAndStop(4); } if (this.hitTest(_root.char)) { _root.charHealth -= 0.5 * (1 / _root.defense); } }; } frame 8 { stop(); spawn = 0; spawnTot = 0; spawnBol = true; waitTime = 0; _rotation = 0; _root.timer = 140; onEnterFrame = function () { this._alpha -= 3; if (spawnBol == true) { spawn += 1; } if (spawn == 5) { _root.attachMovie('fier2', 'fier2' + _root.fier, _root.fier++); spawnTot += 1; spawn = 0; } if (spawnTot >= 12) { spawnBol = false; } if (_root.howMany == 12) { waitTime += 1; if (waitTime >= 25) { gotoAndStop(4); } } }; } } movieClip 199 healthStat { frame 1 { onEnterFrame = function () { _x = _root.char._x - 75; _y = _root.char._y + 442; health = int(_root.charHealth); }; } } movieClip 201 stats { frame 1 { onEnterFrame = function () { _x = _root.char._x - 252; _y = _root.char._y + 402; }; } } frame 1 { attachMovie('char', 'char', 50000); attachMovie('backui', 'backui', 64997); attachMovie('gui', 'gui', 65000); attachMovie('healthG', 'healthG', 65001); attachMovie('manaG', 'manaG', 65002); attachMovie('mana', 'mana', 64999); attachMovie('light', 'light', 70000); attachMovie('health', 'health', 69998); attachMovie('spawns', 'spawns', 999999); attachMovie('stats', 'stats', 70010); attachMovie('healthStat', 'healthStat', 70011); attachMovie('manaStat', 'manaStat', 70012); attachMovie('poigui', 'poigui', 70013); var charHealth = 100; var maxHealth = 100; var manas = 100; var maxMana = 100; cthuluPartyTime = false; cthugaPartyTime = false; var exper = 0; var level = 1; damn = 55500; healthP = 2; manaP = 2; po = 40000; var stats = 5; var strength = 8; var defense = 7; var swift = 5; var dext = 7; var vitals = 12; _root.gotoAndStop(4); } frame 2 { stop(); frames = 1; slash = 50005; light._visible = false; AOE = 51100; char._x = 4440; char._y = 6000; char.swapDepths(50001); light.swapDepths(60000); skills.swapDepths(70000); backui.swapDepths(70001); mana.swapDepths(70002); health.swapDepths(70003); gui.swapDepths(70005); healthG.swapDepths(70006); manaG.swapDepths(70007); poigui.swapDepths(70004); var xMouse; var yMouse; volumes = 0; xVel = 0; yVel = 0; a = 0; c = 1000; b = 1000000; fier = 200000; xVel = 0; yVel = 0; moving = true; var count = 0; var countSlash = 60; var countAOE = 60; var countMet = 60; var countBash = 30; var countPo = 0; en = 55000; encount = 0; var spawnT = 0; spawns.swapDepths(100000); this.createEmptyMovieClip('backg', 1); var map = new Array(new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 1, 1, 1)); map[16][18] = 6; hor = 2; while (hor < 28) { vert = 2; while (vert < 32) { var rand = random(150); if (rand == 1) { map[vert][hor] = 3; } ++vert; } ++hor; } hor = 0; while (hor < 31) { vert = 0; while (vert < 35) { if (map[vert][hor] == 1) { attachMovie('wall', 'wall' + c, c++); _root['wall' + c]._x = hor * 240; _root['wall' + c]._y = vert * 240; } if (map[vert][hor] == 6) { attachMovie('creamyTown', 'creamyTown' + c, c++); _root['creamyTown' + c]._x = hor * 240; _root['creamyTown' + c]._y = vert * 240; } if (map[vert][hor] == 3) { attachMovie('portal', 'portal' + c, c++); _root['portal' + c]._x = hor * 240; _root['portal' + c]._y = vert * 240; attachMovie('minimap1', 'minimap1' + b, b++); _root['minimap1' + b].xPos = hor * 4; _root['minimap1' + b].yPos = vert * 4; } else { if (map[vert][hor] == 0) { var randG = random(3); if (randG == 1) { backg.attachMovie('creamyGrass', 'creamyGrass' + a, a++); _root.backg['creamyGrass' + a]._x = hor * 240; _root.backg['creamyGrass' + a]._y = vert * 240; } if (randG == 0) { backg.attachMovie('grass2', 'grass2' + a, a++); _root.backg['grass2' + a]._x = hor * 240; _root.backg['grass2' + a]._y = vert * 240; } if (randG == 2) { backg.attachMovie('grass3', 'grass3' + a, a++); _root.backg['grass3' + a]._x = hor * 240; _root.backg['grass3' + a]._y = vert * 240; } } } ++vert; } ++hor; } var pcount = 0; poison = false; scales = 1; scount = 90; walking = false; onEnterFrame = function () { if (Key.isDown(38)) { _xscale = _xscale - 5; _yscale = _yscale - 5; } if (Key.isDown(40)) { _xscale = _xscale + 5; _yscale = _yscale + 5; } if (poison) { scount += 0.1; pcount += 1; if (pcount > 300) { poison = false; pcount = 0; scount = 90; } } countSlash += 1; countAOE += 1; countMet += 1; countBash += 1; spawns._x = char._x; spawns._y = char._y; spawns._rotation += 3; spawnT += 1; if (backg.hitTest(spawns._x + Math.sin((spawns._rotation / 180) * Math.PI) * 600, spawns._y - Math.cos((spawns._rotation / 180) * Math.PI) * 600, true) and spawnT > 50 and encount < 10) { attachMovie('enemy', 'enemy' + en, en++); spawnT = 0; encount += 1; } t = getTimer(); framerate = Math.round(1000 / (t - o)); o = t; light._x = char._x; light._y = char._y; if (Key.isDown(1)) { xMouse = _xmouse; yMouse = _ymouse; walking = true; } if (backg.hitTest(char._x, char._y, true)) { moving = true; oldx = char._x; oldy = char._y; count = 0; } else { count += 1; if (count > 2) { char._x = oldx; char._y = oldy; } } var v2 = (Math.atan(Math.abs(char._x - xMouse) / Math.abs(char._y - yMouse)) / Math.PI) * 180; if (moving == true) { if (Math.sqrt(Math.pow(char._y - yMouse, 2) + Math.pow(char._x - xMouse, 2)) > 10) { if (char._x >= xMouse and char._y >= yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2 * -1; } else { if (char._x <= xMouse and char._y <= yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2; } else { if (char._x > xMouse and char._y < yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2 * -1; } else { if (char._x < xMouse and char._y > yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2; } } } } } else { walking = false; } } if (Key.isDown(81) and countSlash > 30) { _root.char.attachMovie('slash', 'slash', 50005); countSlash = 0; } if (Key.isDown(82) and countBash > 30) { _root.char.attachMovie('bash', 'bash', 50005); countBash = 0; } if (manas > 10) { if (Key.isDown(87) and countAOE > 60) { attachMovie('shout', 'shout' + AOE, AOE++); trace('shout'); countAOE = 0; manas -= 10; } } if (AOE > 51200) { AOE = 51100; } if (manas > 20) { if (Key.isDown(69) and countMet > 60) { _root.attachMovie('meteor1', 'meteor1' + AOE, AOE++); countMet = 0; xMet = _xmouse; yMet = _ymouse; manas -= 20; } } trace(charHealth); trace('/'); trace(maxHealth); if (exper >= level * 50 + 100) { level += 1; exper = 0; stats += 5; strength += 1; maxHealth += 15; maxMana += 5; manas = maxMana; charHealth = maxHealth; } mana._yscale = (manas / maxMana) * 100; health._yscale = (charHealth / maxHealth) * 100; manas += 0.05; if (manas > maxMana) { manas = maxMana; } if (manas < 0) { manas = 0; } if (charHealth > maxHealth) { charHealth = maxHealth; } if (charHealth < 0) { charHealth = 0; } countPo += 1; if (Key.isDown(49) and healthP > 0 and countPo > 60) { charHealth += 20; healthP -= 1; countPo = 0; } if (Key.isDown(50) and manaP > 0 and countPo > 60) { manas += 20; manaP -= 1; countPo = 0; } if (Key.isDown(80) and stats > 0) { c = 1000; while (c < 3000) { loadMovie('', _root['portal' + c]); ++c; } b = 1000000; while (b < 1001000) { loadMovie('', _root['minimap1' + b]); ++b; } d = 55000; while (d < 55045) { loadMovie('', _root['enemy' + d]); ++d; } stats -= 1; _root.gotoAndStop(4); } }; } movieClip 203 { frame 1 { function camControl() { parentColor.setTransform(camColor.getTransform()); var v3 = sX / this._width; var v4 = sY / this._height; _parent._x = cX - this._x * v3; _parent._y = cY - this._y * v4; _parent._xscale = 100 * v3; _parent._yscale = 100 * v4; } function resetStage() { var v2 = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0}; parentColor.setTransform(v2); _parent._xscale = 100; _parent._yscale = 100; _parent._x = 0; _parent._y = 0; } this._visible = false; var oldMode = Stage.scaleMode; Stage.scaleMode = 'exactFit'; var cX = Stage.width / 2; var cY = Stage.height / 2; var sX = Stage.width; var sY = Stage.height; Stage.scaleMode = oldMode; var camColor = new Color(this); var parentColor = new Color(_parent); this.onEnterFrame = camControl; this.onUnload = resetStage; } } instance man of movieClip 203 { onClipEvent (enterFrame) { _y = _y + (_root.char._y - _y + 75); _x = _x + (_root.char._x - _x); if (_root.poison) { _xscale = _xscale + Math.cos(_root.scount); _yscale = _yscale + Math.cos(_root.scount); } else { _xscale = 100; _yscale = 100; } } } movieClip 205 { frame 1 { onEnterFrame = function () { _x = _root.char1._x - 300; _y = _root.char1._y; _x = _root.char._x - 300; _y = _root.char._y; }; } } movieClip 207 { frame 1 { onEnterFrame = function () { _x = _root.char1._x - 200; _y = _root.char1._y; _x = _root.char._x - 200; _y = _root.char._y; }; } } frame 3 { function dungeon(y, x, count) { if (y > 37) { y = 37; } if (x < 2) { x = 2; } if (x > 31) { x = 31; } map[y][x] = 1; xPos = x; yPos = y; if (count < 35) { rand = random(12) + 1; if (rand == 1) { dungeon(yPos - 1, xPos, count + 1); } if (rand == 2) { dungeon(yPos, xPos - 1, count + 1); dungeon(yPos, xPos + 1, count + 1); } if (rand == 3) { map[yPos - 1][xPos] = 1; map[yPos][xPos - 1] = 1; dungeon(yPos, xPos + 1, count + 1); } if (rand == 4) { dungeon(yPos, xPos + 1, count + 1); } if (rand == 5) { dungeon(yPos, xPos - 1, count + 1); } if (rand == 6) { map[yPos - 1][xPos] = 1; dungeon(yPos + 1, xPos, count + 1); } if (rand == 7) { map[yPos - 1][xPos] = 1; map[yPos + 1][xPos] = 1; dungeon(yPos, xPos + 1, count + 1); } if (rand == 8) { map[yPos - 1][xPos] = 1; map[yPos + 1][xPos] = 1; dungeon(yPos, xPos - 1, count + 1); } if (rand == 9) { map[yPos - 1][xPos] = 1; dungeon(yPos - 1, xPos, count + 1); } if (rand == 10) { map[yPos][xPos - 1] = 1; dungeon(yPos - 1, xPos, count + 1); } if (rand == 11) { map[yPos][xPos + 1] = 1; dungeon(yPos, xPos + 2, count + 1); } if (rand == 12) { map[yPos][xPos - 1] = 1; dungeon(yPos, xPos - 2, count + 1); } } } stop(); frames = 2; slash = 50005; AOE = 51100; light._visible = true; char.swapDepths(50001); light.swapDepths(70000); var xMouse = 4440; var yMouse = 9240; volumes = 0; xVel = 0; yVel = 0; a = 0; c = 1000; b = 30000; xVel = 0; yVel = 0; pushRight = false; pushLeft = false; pushUp = false; pushDown = false; var charHealth = charHealth; moving = true; var count = 0; var countSlash = 30; var countBash = 30; var countAOE = 60; var countMet = 60; char._x = 4440; char._y = 9240; end = false; menu = false; var countPo = 0; en = 55000; encount = 0; var spawnT = 0; spawns.swapDepths(100000); this.createEmptyMovieClip('backg', 1); this.createEmptyMovieClip('maps', 30000); var map = new Array(new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)); map[38][18] = 1; dungeon(38, 18, 1); hor = 0; while (hor < 36) { vert = 0; while (vert < 3) { map[vert][hor] = 3; ++vert; } ++hor; } hor = 0; while (hor < 36) { vert = 0; while (vert < 40) { if (map[vert][hor] == 1) { left = -3; while (left <= 3) { down = -3; while (down <= 3) { if (map[vert + down][hor + left] == 0) { map[vert + down][hor + left] = 3; } ++down; } ++left; } } ++vert; } ++hor; } vert = 0; while (vert < 40) { hor = 0; while (hor < 36) { if (map[vert][hor] == 1) { map[vert][hor] = 5; end = true; break; } ++hor; } if (end == true) { break; } ++vert; } var world = random(3); hor = 0; while (hor < 36) { vert = 0; while (vert < 40) { if (map[vert][hor] == 3) { if (world == 0) { attachMovie('statue', 'statue' + c, c++); _root['statue' + c]._x = hor * 240; _root['statue' + c]._y = vert * 240; } if (world == 1) { attachMovie('cloudw', 'cloudw' + c, c++); _root['cloudw' + c]._x = hor * 240; _root['cloudw' + c]._y = vert * 240; } } if (map[vert][hor] == 5) { attachMovie('exit', 'exit' + c, c++); _root['exit' + c]._x = hor * 240; _root['exit' + c]._y = vert * 240; } else { if (map[vert][hor] == 1) { if (world == 0) { backg.attachMovie('sea', 'sea' + a, a++); _root.backg['sea' + a]._x = hor * 240; _root.backg['sea' + a]._y = vert * 240; } if (world == 1) { backg.attachMovie('cloud', 'cloud' + a, a++); _root.backg['cloud' + a]._x = hor * 240; _root.backg['cloud' + a]._y = vert * 240; light._visible = false; } if (world == 2) { backg.attachMovie('firefloor', 'firefloor' + a, a++); _root.backg['firefloor' + a]._x = hor * 240; _root.backg['firefloor' + a]._y = vert * 240; } maps.attachMovie('minimap', 'minimap' + b, b++); _root.maps['minimap' + b].xPos = hor * 24; _root.maps['minimap' + b].yPos = vert * 24; } } ++vert; } ++hor; } var pcount = 0; poison = false; scales = 1; scount = 90; walking = false; onEnterFrame = function () { countSlash += 1; countBash += 1; countAOE += 1; countMet += 1; if (poison) { scount += 0.1; pcount += 1; if (pcount > 300) { poison = false; pcount = 0; scount = 90; } } t = getTimer(); framerate = Math.round(1000 / (t - o)); o = t; trace(framerate); light._x = char._x; light._y = char._y; spawns._x = char._x; spawns._y = char._y; spawns._rotation += 3; spawnT += 1; if (world == 0) { if (backg.hitTest(spawns._x + Math.sin((spawns._rotation / 180) * Math.PI) * 600, spawns._y - Math.cos((spawns._rotation / 180) * Math.PI) * 600, true) and spawnT > 50 and encount < 10) { attachMovie('jelly', 'jelly' + en, en++); spawnT = 0; encount += 1; } } if (world == 1) { if (backg.hitTest(spawns._x + Math.sin((spawns._rotation / 180) * Math.PI) * 600, spawns._y - Math.cos((spawns._rotation / 180) * Math.PI) * 600, true) and spawnT > 50 and encount < 10) { attachMovie('enemy', 'enemy' + en, en++); spawnT = 0; encount += 1; } } if (world == 2) { if (backg.hitTest(spawns._x + Math.sin((spawns._rotation / 180) * Math.PI) * 600, spawns._y - Math.cos((spawns._rotation / 180) * Math.PI) * 600, true) and spawnT > 50 and encount < 10) { attachMovie('fireVamp', 'fireVamp' + en, en++); spawnT = 0; encount += 1; } } if (Key.isDown(1)) { xMouse = _xmouse; yMouse = _ymouse; walking = true; } if (backg.hitTest(char._x, char._y, true)) { moving = true; oldx = char._x; oldy = char._y; count = 0; } else { count += 1; if (count > 2) { char._x = oldx; char._y = oldy; } } textBox._x = char._x + 200; textBox._y = char._y + 100; textBox.swapDepths(9999999999.0); var v2 = (Math.atan(Math.abs(char._x - xMouse) / Math.abs(char._y - yMouse)) / Math.PI) * 180; if (moving == true) { if (Math.sqrt(Math.pow(char._y - yMouse, 2) + Math.pow(char._x - xMouse, 2)) > 10) { if (char._x >= xMouse and char._y >= yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2 * -1; } else { if (char._x <= xMouse and char._y <= yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2; } else { if (char._x > xMouse and char._y < yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2 * -1; } else { if (char._x < xMouse and char._y > yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2; } } } } } else { walking = false; } } if (Key.isDown(81) and countSlash > 30) { _root.char.attachMovie('slash', 'slash', 50005); countSlash = 0; } if (Key.isDown(82) and countBash > 30) { _root.char.attachMovie('bash', 'bash', 50005); countBash = 0; } if (manas > 10) { if (Key.isDown(87) and countAOE > 60) { attachMovie('shout', 'shout' + AOE, AOE++); trace('shout'); countAOE = 0; manas -= 10; } } if (AOE > 51200) { AOE = 51100; } if (manas > 20) { if (Key.isDown(69) and countMet > 60) { _root.attachMovie('meteor1', 'meteor1' + AOE, AOE++); countMet = 0; xMet = _xmouse; yMet = _ymouse; manas -= 20; } } if (exper >= level * 50 + 100) { level += 1; exper = 0; stats += 5; strength += 1; maxHealth += 15; charHealth = maxHealth; maxMana += 5; manas = maxMana; } mana._yscale = (manas / maxMana) * 100; health._yscale = (charHealth / maxHealth) * 100; manas += 0.05; if (manas > maxMana) { manas = maxMana; } if (manas < 0) { manas = 0; } if (charHealth > maxHealth) { charHealth = maxHealth; } if (charHealth < 0) { charHealth = 0; } countPo += 1; if (Key.isDown(49) and healthP > 0 and countPo > 60) { charHealth += 20; healthP -= 1; countPo = 0; } if (Key.isDown(50) and manaP > 0 and countPo > 60) { manas += 20; manaP -= 1; countPo = 0; } if (Key.isToggled(77)) { maps._visible = false; } else { maps._visible = true; } if (Key.isDown(80) and stats > 0) { c = 1000; while (c < 3000) { loadMovie('', _root['portal' + c]); ++c; } b = 1000000; while (b < 1001000) { loadMovie('', _root['minimap1' + b]); ++b; } d = 55000; while (d < 55045) { loadMovie('', _root['enemy' + d]); ++d; } stats -= 2; _root.gotoAndStop(4); } }; } instance man of movieClip 203 { onClipEvent (enterFrame) { _y = _y + (_root.char._y - _y + 75); _x = _x + (_root.char._x - _x); if (_root.poison) { _xscale = _xscale + Math.cos(_root.scount); _yscale = _yscale + Math.cos(_root.scount); } else { _xscale = 100; _yscale = 100; } } } frame 4 { stop(); slash = 50005; light._visible = false; AOE = 51100; char._x = 700; char._y = 700; menu = false; char.swapDepths(50001); light.swapDepths(60000); skills.swapDepths(70000); charScreen.swapDepths(70001); mana.swapDepths(70002); var xMouse; var yMouse; volumes = 0; xVel = 0; yVel = 0; a = 0; c = 1000; b = 1000000; xVel = 0; yVel = 0; pushRight = false; pushLeft = false; pushUp = false; pushDown = false; moving = true; var count = 0; countSlash = 60; var countAOE = 60; var countMet = 60; char.swapDepths(50001); light.swapDepths(60000); skills.swapDepths(70000); backui.swapDepths(70001); mana.swapDepths(70002); health.swapDepths(70003); gui.swapDepths(70005); healthG.swapDepths(70006); manaG.swapDepths(70007); poigui.swapDepths(70004); attachMovie('Hilda', 'Hilda', 64000); attachMovie('Bsmith', 'Bsmith', 64001); attachMovie('dad', 'dad', 64002); attachMovie('mom', 'mom', 64003); attachMovie('randall', 'randall', 64004); this.createEmptyMovieClip('backg', 1); var map = new Array(new Array(1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1)); hor = 0; while (hor < 10) { vert = 0; while (vert < 10) { if (map[vert][hor] == 1) { attachMovie('wall', 'wall' + c, c++); _root['wall' + c]._x = hor * 240; _root['wall' + c]._y = vert * 240; } if (map[vert][hor] == 6) { attachMovie('creamyTown', 'creamyTown' + c, c++); _root['creamyTown' + c]._x = hor * 240; _root['creamyTown' + c]._y = vert * 240; } else { if (map[vert][hor] == 0) { var randG = random(3); if (randG == 1) { backg.attachMovie('creamyGrass', 'creamyGrass' + a, a++); _root.backg['creamyGrass' + a]._x = hor * 240; _root.backg['creamyGrass' + a]._y = vert * 240; } if (randG == 0) { backg.attachMovie('grass2', 'grass2' + a, a++); _root.backg['grass2' + a]._x = hor * 240; _root.backg['grass2' + a]._y = vert * 240; } if (randG == 2) { backg.attachMovie('grass3', 'grass3' + a, a++); _root.backg['grass3' + a]._x = hor * 240; _root.backg['grass3' + a]._y = vert * 240; } } } ++vert; } ++hor; } onEnterFrame = function () { countSlash += 1; countAOE += 1; countMet += 1; t = getTimer(); framerate = Math.round(1000 / (t - o)); o = t; light._x = char._x; light._y = char._y; if (Key.isDown(1)) { xMouse = _xmouse; yMouse = _ymouse; walking = true; } if (backg.hitTest(char._x, char._y, true)) { moving = true; oldx = char._x; oldy = char._y; count = 0; } else { count += 1; if (count > 2) { char._x = oldx; char._y = oldy; } } textBox._x = char._x + 200; textBox._y = char._y + 100; textBox.swapDepths(9999999999.0); text2.swapDepths(9999999998.0); text3.swapDepths(9999999997.0); var v2 = (Math.atan(Math.abs(char._x - xMouse) / Math.abs(char._y - yMouse)) / Math.PI) * 180; if (moving == true) { if (Math.sqrt(Math.pow(char._y - yMouse, 2) + Math.pow(char._x - xMouse, 2)) > 10) { if (char._x >= xMouse and char._y >= yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2 * -1; } else { if (char._x <= xMouse and char._y <= yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2; } else { if (char._x > xMouse and char._y < yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2 * -1; } else { if (char._x < xMouse and char._y > yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2; } } } } } else { walking = false; } } if (exper >= level * 50 + 100) { level += 1; exper = 0; stats += 5; strength += 1; maxHealth += 15; charHealth = maxHealth; maxMana += 5; manas = maxMana; } mana._yscale = (manas / maxMana) * 100; health._yscale = (charHealth / maxHealth) * 100; trace(health); manas += 0.05; if (charHealth > maxHealth) { charHealth = maxHealth; } if (manas > maxMana) { manas = maxMana; } if (manas < 0) { manas = 0; } if (Key.isDown(65)) { c = 1000; while (c < 3000) { loadMovie('', _root['wall' + c]); loadMovie('', _root['portal' + c]); ++c; } b = 1000000; while (b < 1001000) { loadMovie('', _root['minimap1' + b]); ++b; } loadMovie('', Hilda); loadMovie('', randall); loadMovie('', dad); loadMovie('', mom); loadMovie('', Bsmith); gotoAndStop(6); } }; } instance man of movieClip 203 { onClipEvent (enterFrame) { _y = _y + (_root.char._y - _y + 75); _x = _x + (_root.char._x - _x); } } frame 5 { stop(); frames = 5; slash = 50005; AOE = 51100; timer = 0; Cthuga._x = 800; Cthuga._y = 800; Cthuga.swapDepths(90000); light._visible = false; char.swapDepths(50001); light.swapDepths(70000); mana.swapDepths(70002); health.swapDepths(70003); gui.swapDepths(70004); healthG.swapDepths(70005); manaG.swapDepths(70006); var xMouse = 700; var yMouse = 700; volumes = 0; xVel = 0; yVel = 0; a = 0; c = 1000; char._x = 700; char._y = 700; howMany = 0; b = 30000; fier = 20000; xVel = 0; yVel = 0; pushRight = false; pushLeft = false; pushUp = false; pushDown = false; moving = true; var count = 0; var countSlash = 30; var countAOE = 60; var countMet = 60; countBash = 30; end = false; menu = false; var countPo = 0; this.createEmptyMovieClip('backg', 1); var map = new Array(new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)); map[16][18] = 6; hor = 0; while (hor < 31) { vert = 0; while (vert < 35) { if (map[vert][hor] == 1) { attachMovie('wall', 'wall' + c, c++); _root['wall' + c]._x = hor * 240; _root['wall' + c]._y = vert * 240; } if (map[vert][hor] == 6) { attachMovie('creamyTown', 'creamyTown' + c, c++); _root['creamyTown' + c]._x = hor * 240; _root['creamyTown' + c]._y = vert * 240; } else { if (map[vert][hor] == 0) { var randG = random(3); if (randG == 1) { backg.attachMovie('creamyGrass', 'creamyGrass' + a, a++); _root.backg['creamyGrass' + a]._x = hor * 240; _root.backg['creamyGrass' + a]._y = vert * 240; } if (randG == 0) { backg.attachMovie('grass2', 'grass2' + a, a++); _root.backg['grass2' + a]._x = hor * 240; _root.backg['grass2' + a]._y = vert * 240; } if (randG == 2) { backg.attachMovie('grass3', 'grass3' + a, a++); _root.backg['grass3' + a]._x = hor * 240; _root.backg['grass3' + a]._y = vert * 240; } } } ++vert; } ++hor; } onEnterFrame = function () { countSlash += 1; countBash += 1; countAOE += 1; countMet += 1; trace(health); trace(charHealth); t = getTimer(); framerate = Math.round(1000 / (t - o)); o = t; trace(framerate); light._x = char._x; light._y = char._y; if (Key.isDown(1)) { xMouse = _xmouse; yMouse = _ymouse; walking = true; } if (backg.hitTest(char._x, char._y, true)) { moving = true; oldx = char._x; oldy = char._y; count = 0; } else { count += 1; if (count > 2) { char._x = oldx; char._y = oldy; } } textBox._x = char._x + 200; textBox._y = char._y + 100; textBox.swapDepths(9999999999.0); var v2 = (Math.atan(Math.abs(char._x - xMouse) / Math.abs(char._y - yMouse)) / Math.PI) * 180; if (moving == true) { if (Math.sqrt(Math.pow(char._y - yMouse, 2) + Math.pow(char._x - xMouse, 2)) > 10) { if (char._x >= xMouse and char._y >= yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2 * -1; } else { if (char._x <= xMouse and char._y <= yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2; } else { if (char._x > xMouse and char._y < yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2 * -1; } else { if (char._x < xMouse and char._y > yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2; } } } } } else { walking = false; } } if (Key.isDown(81) and countSlash > 30) { _root.char.attachMovie('slash', 'slash', 50005); countSlash = 0; } if (Key.isDown(82) and countBash > 30) { _root.char.attachMovie('bash', 'bash', 50005); countBash = 0; } if (manas > 10) { if (Key.isDown(87) and countAOE > 60) { attachMovie('shout', 'shout' + AOE, AOE++); trace('shout'); countAOE = 0; manas -= 10; } } if (AOE > 51200) { AOE = 51100; } if (manas > 20) { if (Key.isDown(69) and countMet > 60) { _root.attachMovie('meteor1', 'meteor1' + AOE, AOE++); countMet = 0; xMet = _xmouse; yMet = _ymouse; manas -= 20; } } if (exper >= level * 50 + 100) { level += 1; exper = 0; stats += 5; strength += 1; maxHealth += 15; charHealth = maxHealth; maxMana += 5; manas = maxMana; } mana._yscale = (manas / maxMana) * 100; health._yscale = (charHealth / maxHealth) * 100; manas += 0.05; if (manas > maxMana) { manas = maxMana; } if (manas < 0) { manas = 0; } if (charHealth > maxHealth) { charHealth = maxHealth; } if (charHealth < 0) { charHealth = 10; } countPo += 1; if (Key.isDown(49) and healthP > 0 and countPo > 60) { charHealth += 20; healthP -= 1; countPo = 0; } if (Key.isDown(50) and manaP > 0 and countPo > 60) { manas += 20; manaP -= 1; countPo = 0; } if (Key.isToggled(77)) { maps._visible = false; } else { maps._visible = true; } if (Cthuga.health < 0) { loadMovie('', Cthuga); gotoAndStop(4); } }; } instance man of movieClip 203 { onClipEvent (enterFrame) { _y = _y + (_root.char._y - _y + 75); _x = _x + (_root.char._x - _x); } } frame 6 { stop(); menus.swapDepths(300000); strbut.swapDepths(300001); strtext.swapDepths(300002); backbuttonbut.swapDepths(300003); buttonback.swapDepths(300004); strgrey.swapDepths(300005); vitbut.swapDepths(300006); vitgrey.swapDepths(300007); vittext.swapDepths(300008); defbut.swapDepths(300009); defgrey.swapDepths(300010); deftext.swapDepths(300011); } button 209 { on (press) { gotoAndStop(2); } } movieClip 211 { } button 212 { on (press) { if (_root.stats > 0) { _root.strength += 1; _root.stats -= 1; } } } movieClip 213 { } instance man of movieClip 203 { onClipEvent (enterFrame) { _y = _y + (_root.menus._y - _y); _x = _x + (_root.menus._x - _x); } } button 218 { on (press) { loadMovie('', _root.menus); loadMovie('', _root.strbut); loadMovie('', _root.strtext); loadMovie('', _root.backbuttonbut); loadMovie('', _root.buttonback); loadMovie('', _root.strgrey); loadMovie('', _root.vitbut); loadMovie('', _root.vitgrey); loadMovie('', _root.vittext); loadMovie('', _root.defbut); loadMovie('', _root.defgrey); loadMovie('', _root.deftext); _root.gotoAndStop(2); trace('It works'); } } movieClip 219 { } frame 7 { stop(); frames = 7; slash = 50005; timer = 0; cd = 400008; trail = 200000; Dagon = 800000; g = 3000000; hydDied = false; dagDied = false; Hydra = 1000000; AOE = 51100; timer = 0; Cthulu._x = 800; Cthulu._y = 800; neverLeave = true; Cthulu.swapDepths(90000); light._visible = false; char.swapDepths(50001); light.swapDepths(70000); mana.swapDepths(70002); health.swapDepths(70003); gui.swapDepths(70004); healthG.swapDepths(70005); manaG.swapDepths(70006); var xMouse = 700; var yMouse = 700; volumes = 0; xVel = 0; yVel = 0; a = 0; c = 1000; char._x = 700; char._y = 700; b = 1000000; xVel = 0; yVel = 0; pushRight = false; pushLeft = false; pushUp = false; pushDown = false; moving = true; var count = 0; var countSlash = 30; var countAOE = 60; var countMet = 60; var countBash = 30; end = false; menu = false; var countPo = 0; this.createEmptyMovieClip('backg', 1); var map = new Array(new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)); map[16][18] = 6; hor = 0; while (hor < 31) { vert = 0; while (vert < 35) { if (map[vert][hor] == 1) { attachMovie('wall', 'wall' + c, c++); _root['wall' + c]._x = hor * 240; _root['wall' + c]._y = vert * 240; } if (map[vert][hor] == 6) { attachMovie('creamyTown', 'creamyTown' + c, c++); _root['creamyTown' + c]._x = hor * 240; _root['creamyTown' + c]._y = vert * 240; } else { if (map[vert][hor] == 0) { var randG = random(3); if (randG == 1) { backg.attachMovie('creamyGrass', 'creamyGrass' + a, a++); _root.backg['creamyGrass' + a]._x = hor * 240; _root.backg['creamyGrass' + a]._y = vert * 240; } if (randG == 0) { backg.attachMovie('grass2', 'grass2' + a, a++); _root.backg['grass2' + a]._x = hor * 240; _root.backg['grass2' + a]._y = vert * 240; } if (randG == 2) { backg.attachMovie('grass3', 'grass3' + a, a++); _root.backg['grass3' + a]._x = hor * 240; _root.backg['grass3' + a]._y = vert * 240; } } } ++vert; } ++hor; } onEnterFrame = function () { if (c > 4000) { c = 4000; } if (trail > 2050) { trail = 2000; } countBash += 1; countSlash += 1; countAOE += 1; countMet += 1; t = getTimer(); framerate = Math.round(1000 / (t - o)); o = t; trace(framerate); light._x = char._x; light._y = char._y; if (Key.isDown(1)) { xMouse = _xmouse; yMouse = _ymouse; walking = true; } if (backg.hitTest(char._x, char._y, true)) { moving = true; oldx = char._x; oldy = char._y; count = 0; } else { count += 1; if (count > 2) { char._x = oldx; char._y = oldy; } } textBox._x = char._x + 200; textBox._y = char._y + 100; textBox.swapDepths(9999999999.0); var v2 = (Math.atan(Math.abs(char._x - xMouse) / Math.abs(char._y - yMouse)) / Math.PI) * 180; if (moving == true) { if (Math.sqrt(Math.pow(char._y - yMouse, 2) + Math.pow(char._x - xMouse, 2)) > 10) { if (char._x >= xMouse and char._y >= yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2 * -1; } else { if (char._x <= xMouse and char._y <= yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2; } else { if (char._x > xMouse and char._y < yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2 * -1; } else { if (char._x < xMouse and char._y > yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2; } } } } } else { walking = false; } } if (Key.isDown(81) and countSlash > 30) { _root.char.attachMovie('slash', 'slash', 50005); countSlash = 0; } if (Key.isDown(82) and countBash > 30) { _root.char.attachMovie('bash', 'bash', 50005); countBash = 0; } if (manas > 10) { if (Key.isDown(87) and countAOE > 60) { attachMovie('shout', 'shout' + AOE, AOE++); trace('shout'); countAOE = 0; manas -= 10; } } if (AOE > 51200) { AOE = 51100; } if (manas > 20) { if (Key.isDown(69) and countMet > 60) { _root.attachMovie('meteor1', 'meteor1' + AOE, AOE++); countMet = 0; xMet = _xmouse; yMet = _ymouse; manas -= 20; } } if (exper >= level * 50 + 100) { level += 1; exper = 0; stats += 5; strength += 1; maxHealth += 15; charHealth = maxHealth; maxMana += 5; manas = maxMana; } mana._yscale = (manas / maxMana) * 100; health._yscale = (charHealth / maxHealth) * 100; manas += 0.05; if (manas > maxMana) { manas = maxMana; } if (manas < 0) { manas = 0; } if (charHealth > maxHealth) { charHealth = maxHealth; } if (charHealth < 0) { charHealth = 10; } countPo += 1; if (Key.isDown(49) and healthP > 0 and countPo > 60) { charHealth += 20; healthP -= 1; countPo = 0; } if (Key.isDown(50) and manaP > 0 and countPo > 60) { manas += 20; manaP -= 1; countPo = 0; } if (Key.isToggled(77)) { maps._visible = false; } else { maps._visible = true; } if (cd > 400008) { cd = 400008; } }; } instance man of movieClip 203 { onClipEvent (enterFrame) { _y = _y + (_root.char._y - _y + 75); _x = _x + (_root.char._x - _x); } } frame 8 { stop(); frames = 8; slash = 50005; timer = 0; block = 800000; g = 3000000; AOE = 51100; timer = 0; shub._x = 800; shub._y = 800; neverLeave = true; shub.swapDepths(780000); light._visible = false; char.swapDepths(50001); light.swapDepths(70000); mana.swapDepths(70002); health.swapDepths(70003); gui.swapDepths(70004); healthG.swapDepths(70005); manaG.swapDepths(70006); var xMouse = 700; var yMouse = 700; volumes = 0; xVel = 0; yVel = 0; a = 0; c = 1000; char._x = 700; char._y = 700; b = 1000000; xVel = 0; yVel = 0; pushRight = false; pushLeft = false; pushUp = false; pushDown = false; moving = true; var count = 0; var countSlash = 30; var countAOE = 60; var countMet = 60; var countBash = 30; end = false; menu = false; var countPo = 0; this.createEmptyMovieClip('backg', 1); var map = new Array(new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 0, 0, 0, 0, 0, 0, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)); map[16][18] = 6; hor = 0; while (hor < 31) { vert = 0; while (vert < 35) { if (map[vert][hor] == 1) { attachMovie('wall', 'wall' + c, c++); _root['wall' + c]._x = hor * 240; _root['wall' + c]._y = vert * 240; } if (map[vert][hor] == 6) { attachMovie('creamyTown', 'creamyTown' + c, c++); _root['creamyTown' + c]._x = hor * 240; _root['creamyTown' + c]._y = vert * 240; } else { if (map[vert][hor] == 0) { var randG = random(3); if (randG == 1) { backg.attachMovie('creamyGrass', 'creamyGrass' + a, a++); _root.backg['creamyGrass' + a]._x = hor * 240; _root.backg['creamyGrass' + a]._y = vert * 240; } if (randG == 0) { backg.attachMovie('grass2', 'grass2' + a, a++); _root.backg['grass2' + a]._x = hor * 240; _root.backg['grass2' + a]._y = vert * 240; } if (randG == 2) { backg.attachMovie('grass3', 'grass3' + a, a++); _root.backg['grass3' + a]._x = hor * 240; _root.backg['grass3' + a]._y = vert * 240; } } } ++vert; } ++hor; } onEnterFrame = function () { if (c > 4000) { c = 4000; } if (trail > 2050) { trail = 2000; } countBash += 1; countSlash += 1; countAOE += 1; countMet += 1; t = getTimer(); framerate = Math.round(1000 / (t - o)); o = t; trace(framerate); light._x = char._x; light._y = char._y; if (Key.isDown(1)) { xMouse = _xmouse; yMouse = _ymouse; walking = true; } if (backg.hitTest(char._x, char._y, true)) { moving = true; oldx = char._x; oldy = char._y; count = 0; } else { count += 1; if (count > 2) { char._x = oldx; char._y = oldy; } } textBox._x = char._x + 200; textBox._y = char._y + 100; textBox.swapDepths(9999999999.0); var v2 = (Math.atan(Math.abs(char._x - xMouse) / Math.abs(char._y - yMouse)) / Math.PI) * 180; if (moving == true) { if (Math.sqrt(Math.pow(char._y - yMouse, 2) + Math.pow(char._x - xMouse, 2)) > 10) { if (char._x >= xMouse and char._y >= yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2 * -1; } else { if (char._x <= xMouse and char._y <= yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2; } else { if (char._x > xMouse and char._y < yMouse) { char._x -= Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y += Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = 180 - v2 * -1; } else { if (char._x < xMouse and char._y > yMouse) { char._x += Math.sin((v2 / 360) * 2 * Math.PI) * 5; char._y -= Math.cos((v2 / 360) * 2 * Math.PI) * 5; char._rotation = v2; } } } } } else { walking = false; } } if (Key.isDown(81) and countSlash > 30) { _root.char.attachMovie('slash', 'slash', 50005); countSlash = 0; } if (Key.isDown(82) and countBash > 30) { _root.char.attachMovie('bash', 'bash', 50005); countBash = 0; } if (manas > 10) { if (Key.isDown(87) and countAOE > 60) { attachMovie('shout', 'shout' + AOE, AOE++); trace('shout'); countAOE = 0; manas -= 10; } } if (AOE > 51200) { AOE = 51100; } if (manas > 20) { if (Key.isDown(69) and countMet > 60) { _root.attachMovie('meteor1', 'meteor1' + AOE, AOE++); countMet = 0; xMet = _xmouse; yMet = _ymouse; manas -= 20; } } if (exper >= level * 50 + 100) { level += 1; exper = 0; stats += 5; strength += 1; maxHealth += 15; charHealth = maxHealth; maxMana += 5; manas = maxMana; } mana._yscale = (manas / maxMana) * 100; health._yscale = (charHealth / maxHealth) * 100; manas += 0.05; if (manas > maxMana) { manas = maxMana; } if (manas < 0) { manas = 0; } if (charHealth > maxHealth) { charHealth = maxHealth; } if (charHealth < 0) { charHealth = 10; } countPo += 1; if (Key.isDown(49) and healthP > 0 and countPo > 60) { charHealth += 20; healthP -= 1; countPo = 0; } if (Key.isDown(50) and manaP > 0 and countPo > 60) { manas += 20; manaP -= 1; countPo = 0; } if (Key.isToggled(77)) { maps._visible = false; } else { maps._visible = true; } if (cd > 400008) { cd = 400008; } }; }




http://swfchan.com/22/107196/info.shtml
Created: 16/3 -2019 15:59:42 Last modified: 16/3 -2019 15:59:42 Server time: 22/12 -2024 21:23:52