Frame 1
stop();
Frame 2
function addToslot(item) {
if (!item.found) {
item._x = eval ("itemSlot" + currentslotnum)._x;
item._y = eval ("itemSlot" + currentslotnum)._y;
item.found = true;
currentslotnum++;
}
}
_root.hpenemy = 100;
_root.hpenemy1 = 100;
_root.cash = 0;
_root.hp = 100;
_root.attack = 10;
_root.defence = 5;
currentslotnum = 1;
stop();
Instance of Symbol 40 MovieClip "npc" in Frame 2
onClipEvent (enterFrame) {
if (_root.char.hitTest(this._x + (this._width / 2), this._y, false)) {
_root.char._x = _root.char._x + 3;
}
if (_root.char.hitTest(_x - (_width / 2), _y, true)) {
_root.char._x = _root.char._x - 3;
}
if (_root.char.hitTest(_x, _y + (_height / 2), true)) {
_root.char._y = _root.char._y + 3;
}
if (_root.char.hitTest(_x, _y - (_height / 2), true)) {
_root.char._y = _root.char._y - 3;
}
}
Instance of Symbol 42 MovieClip "hp" in Frame 2
onClipEvent (enterFrame) {
this._xscale = _root.hp;
if (_root.hp <= 0) {
_root.hp = 0;
_root.gotoAndStop(4);
}
if (_root.hp >= 100) {
_root.hp = 100;
}
}
Instance of Symbol 47 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.char._y = _root.char._y + 5;
}
}
Instance of Symbol 49 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.char._x = _root.char._x - 5;
}
}
Instance of Symbol 54 MovieClip "tele1" in Frame 2
/* no clip actions */
Instance of Symbol 59 MovieClip "msg4" in Frame 2
onClipEvent (enterFrame) {
if (_root.char.hitTest(_root.sign)) {
_root.msg4.gotoAndStop(2);
} else {
_root.msg4.gotoAndStop(1);
}
}
Instance of Symbol 61 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.cash <= 0) {
_root.cash = 0;
}
if (_root.cash > 0) {
_root.eatcookie._x = 26;
_root.eatcookie._y = 26;
}
if (_root.cash <= 0) {
_root.eatcookie._x = -89.6;
_root.eatcookie._y = -121.8;
}
}
Instance of Symbol 63 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.char._x = _root.char._x + 5;
}
}
Instance of Symbol 65 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.char._y = _root.char._y - 5;
}
}
Instance of Symbol 67 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.char._y = _root.char._y + 5;
}
}
Instance of Symbol 69 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.char._y = _root.char._y + 5;
}
}
Instance of Symbol 63 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.char._x = _root.char._x - 5;
}
}
Instance of Symbol 19 MovieClip [char] "char" in Frame 2
onClipEvent (enterFrame) {
if (fight == false) {
if (Key.isDown(68)) {
_x = (_x + 5);
_rotation = 90;
}
if (Key.isDown(65)) {
_x = (_x - 5);
_rotation = 270;
}
if (Key.isDown(83)) {
_y = (_y + 5);
_rotation = 180;
}
if (Key.isDown(87)) {
_y = (_y - 5);
_rotation = 0;
}
}
if (Key.isDown(32)) {
this.gotoAndStop(2);
fight = true;
}
if (Key.isDown(16)) {
this.gotoAndStop(3);
fight = true;
}
if (this._currentframe == 1) {
fight = false;
}
}
Instance of Symbol 75 MovieClip "sword" in Frame 2
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
_root.addToslot(this);
_root.attack = _root.attack + 10;
}
}
Instance of Symbol 79 MovieClip "shield" in Frame 2
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
_root.addToslot(this);
_root.defence = _root.defence + 5;
}
}
Instance of Symbol 21 MovieClip [coin] "coin8" in Frame 2
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 21 MovieClip [coin] "coin10" in Frame 2
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 21 MovieClip [coin] "coin7" in Frame 2
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 21 MovieClip [coin] "coin9" in Frame 2
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 21 MovieClip [coin] "coin6" in Frame 2
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 92 MovieClip "enemy1" in Frame 3
onClipEvent (load) {
var follow = true;
distance = 60;
}
onClipEvent (enterFrame) {
ux = _root.char._x;
uy = _root.char._y;
ex = _root.enemy1._x;
ey = _root.enemy1._y;
if (follow == true) {
if (Math.sqrt(((ux - ex) * (ux - ex)) + ((uy - ey) * (uy - ey))) < distance) {
if (ux < (ex - 10)) {
this._x = this._x - 4;
_rotation = 270;
}
if (ux > (ex + 40)) {
this._x = this._x + 4;
_rotation = 90;
}
if (uy < (ey - 40)) {
this._y = this._y - 4;
_rotation = 180;
}
if (uy > (ey + 40)) {
this._y = this._y + 4;
}
if (_root.char.hitTest(_root.enemy1.enemy_stand)) {
gotoAndStop (3);
follow = true;
}
if (_root.char.magic.fire.hitTest(_root.enemy1.enemy_stand)) {
distance = 80;
follow = true;
}
if (this._currentframe == 2) {
follow = false;
}
}
}
}
Instance of Symbol 42 MovieClip "hp" in Frame 3
onClipEvent (enterFrame) {
this._xscale = _root.hp;
if (_root.hp <= 0) {
_root.hp = 0;
_root.gotoAndStop(3);
}
if (_root.hp >= 100) {
_root.hp = 100;
}
}
Instance of Symbol 97 MovieClip "hpenemysc" in Frame 3
onClipEvent (enterFrame) {
_root.hpenemysc._xscale = _root.hpenemy;
if (_root.hpenemy <= 0) {
_root.msg2._x = -300;
_root.hpenemy._x = -300;
_root.hpenemy21._x = -300;
_root.enemy.gotoAndStop(2);
_root.hpenemy = 0;
}
}
Instance of Symbol 99 MovieClip "enemy" in Frame 3
onClipEvent (load) {
var follow = true;
distance = 60;
}
onClipEvent (enterFrame) {
ux = _root.char._x;
uy = _root.char._y;
ex = _root.enemy._x;
ey = _root.enemy._y;
if (follow == true) {
if (Math.sqrt(((ux - ex) * (ux - ex)) + ((uy - ey) * (uy - ey))) < distance) {
if (ux < (ex - 10)) {
this._x = this._x - 4;
_rotation = 270;
}
if (ux > (ex + 40)) {
this._x = this._x + 4;
_rotation = 90;
}
if (uy < (ey - 40)) {
this._y = this._y - 4;
_rotation = 180;
}
if (uy > (ey + 40)) {
this._y = this._y + 4;
}
if (_root.char.hitTest(_root.enemy.enemy_stand)) {
gotoAndStop (3);
follow = true;
}
if (_root.char.magic.fire.hitTest(_root.enemy.enemy_stand)) {
distance = 80;
follow = true;
}
if (this._currentframe == 2) {
follow = false;
}
}
}
}
Instance of Symbol 97 MovieClip "hpenemy1sc" in Frame 3
onClipEvent (enterFrame) {
_root.hpenemy1sc._xscale = _root.hpenemy1;
if (_root.hpenemy1 <= 0) {
_root.msg21._x = -300;
_root.hpenemy1sc._x = -300;
_root.hpenemy22._x = -300;
_root.enemy1.gotoAndStop(2);
_root.hpenemy1 = 0;
}
}
Instance of Symbol 63 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.char._x = _root.char._x + 5;
}
}
Instance of Symbol 65 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.char._y = _root.char._y + 5;
}
}
Instance of Symbol 21 MovieClip [coin] "coin3" in Frame 3
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 21 MovieClip [coin] "coin5" in Frame 3
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 21 MovieClip [coin] "coin2" in Frame 3
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 21 MovieClip [coin] "coin4" in Frame 3
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 21 MovieClip [coin] "coin1" in Frame 3
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 21 MovieClip [coin] "coin" in Frame 3
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Instance of Symbol 21 MovieClip [coin] "coin11" in Frame 3
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
this._x = -300;
_root.cash++;
}
}
Frame 4
stop();
Symbol 13 MovieClip Frame 5
if (this.hitTest(_root.enemy)) {
_root.hpenemy = _root.hpenemy - (random(_root.attack) + 3);
}
if (this.hitTest(_root.enemy1)) {
_root.hpenemy1 = _root.hpenemy1 - (random(_root.attack) + 3);
}
Symbol 13 MovieClip Frame 12
_root.char.gotoAndStop(1);
Instance of Symbol 15 MovieClip "fire" in Symbol 18 MovieClip Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.enemy)) {
_root.hpenemy = _root.hpenemy - (random(5) + 3);
}
if (this.hitTest(_root.enemy1)) {
_root.hpenemy1 = _root.hpenemy1 - (random(5) + 3);
}
}
Instance of Symbol 17 MovieClip "boom" in Symbol 18 MovieClip Frame 6
onClipEvent (enterFrame) {
if (this.hitTest(_root.enemy)) {
_root.hpenemy = _root.hpenemy - (random(5) + 3);
}
if (this.hitTest(_root.enemy1)) {
_root.hpenemy1 = _root.hpenemy1 - (random(5) + 3);
}
}
Symbol 18 MovieClip Frame 11
_root.char.gotoAndStop(1);
Symbol 19 MovieClip [char] Frame 1
stop();
if (_root.sword.hitTest(_root.char)) {
_root.attachMovie("sword");
_root.sword._x = -14.9;
_root.sword._y = -4.2;
}
if (_root.sword.hitTest(_root.char)) {
_root.attachMovie("shield");
_root.shield._x = -3;
_root.shield._y = -7.7;
}
Symbol 27 Button
on (release) {
gotoAndStop (2);
}
Symbol 39 MovieClip Frame 1
stop();
Instance of Symbol 39 MovieClip "msg" in Symbol 40 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.char.hitTest(_root.npc)) {
_root.npc.msg.gotoAndStop(2);
} else {
_root.npc.msg.gotoAndStop(1);
}
}
Symbol 59 MovieClip Frame 1
stop();
Symbol 72 Button
on (release) {
_root.hp = _root.hp + 5;
_root.cash--;
}
Symbol 91 MovieClip Frame 4
if (this.hitTest(_root.char)) {
_root.hp = _root.hp - ((random(30) + 5) - _root.defence);
}
Symbol 91 MovieClip Frame 21
_root.enemy.gotoAndStop(1);
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 2
stop();
_root.attachMovie("coin11");
_root.coin11._x = this._x;
_root.coin11._y = this._y;
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 2
stop();
Symbol 99 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 2
stop();
_root.attachMovie("coin");
_root.coin._x = this._x;
_root.coin._y = this._y;
Symbol 108 Button
on (release) {
gotoAndStop (1);
}