Frame 1
function doSomething() {
_quality = "HIGH";
}
function doSomething2() {
_quality = "MEDIUM";
}
function doSomething3() {
_quality = "LOW";
}
stop();
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("High", doSomething);
Functioned2 = new ContextMenuItem("Medium", doSomething2);
Functioned3 = new ContextMenuItem("Low", doSomething3);
MENU.customItems.push(Functioned);
MENU.customItems.push(Functioned2);
MENU.customItems.push(Functioned3);
_root.menu = MENU;
System.setClipboard("Thank you for playing Pirates! Copyright CorkySurprise.com & Ollie the Magic Hobo 2006");
Instance of Symbol 474 MovieClip in Frame 1
onClipEvent (enterFrame) {
_root.percent = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (_root.percent == 100) {
this.gotoAndStop(2);
}
}
Frame 2
function loadAllSounds() {
_root.createEmptyMovieClip("MENUSFXMC", 3071);
rollOver = new Sound(_root.MENUSFXMC);
rollOver.attachSound("CLICK");
click = new Sound(_root.MENUSFXMC);
click.attachSound("SELECT");
error = new Sound(_root.MENUSFXMC);
error.attachSound("COINCHING");
error2 = new Sound(_root.MENUSFXMC);
error2.attachSound("DISABLE");
cashreg = new Sound(_root.MENUSFXMC);
cashreg.attachSound("cashreg");
swallow = new Sound(_root.MENUSFXMC);
swallow.attachSound("swallow");
_root.createEmptyMovieClip("SFXMC", 8021);
footstep_grass = new Sound(_root.SFXMC);
footstep_grass.attachSound("footstep_grass");
chargeUp = new Sound(_root.SFXMC);
chargeUp.attachSound("chargeUp");
cannonFire = new Sound(_root.SFXMC);
cannonFire.attachSound("Cannon");
beep = new Sound(_root.SFXMC);
beep.attachSound("BEEPMED");
splat1 = new Sound(_root.SFXMC);
splat1.attachSound("splat1");
splat2 = new Sound(_root.SFXMC);
splat2.attachSound("splat2");
splat3 = new Sound(_root.SFXMC);
splat3.attachSound("splat3");
splat4 = new Sound(_root.SFXMC);
splat4.attachSound("splat4");
missile = new Sound(_root.SFXMC);
missile.attachSound("missile");
boing1 = new Sound(_root.SFXMC);
boing1.attachSound("boing1");
boing2 = new Sound(_root.SFXMC);
boing2.attachSound("boing2");
bombFall = new Sound(_root.SFXMC);
bombFall.attachSound("bombFall");
shotgunFire = new Sound(_root.SFXMC);
shotgunFire.attachSound("shotgunFire");
windUp = new Sound(_root.SFXMC);
windUp.attachSound("windUp");
lowTime = new Sound(_root.SFXMC);
lowTime.attachSound("lowTime");
explode1 = new Sound(_root.SFXMC);
explode1.attachSound("explode1");
explode2 = new Sound(_root.SFXMC);
explode2.attachSound("explode2");
explode3 = new Sound(_root.SFXMC);
explode3.attachSound("explode3");
S1 = new Sound(_root.SFXMC);
S1.attachSound("1");
S2 = new Sound(_root.SFXMC);
S2.attachSound("2");
S3 = new Sound(_root.SFXMC);
S3.attachSound("3");
S4 = new Sound(_root.SFXMC);
S4.attachSound("4");
S5 = new Sound(_root.SFXMC);
S5.attachSound("5");
S6 = new Sound(_root.SFXMC);
S6.attachSound("6");
S7 = new Sound(_root.SFXMC);
S7.attachSound("7");
S8 = new Sound(_root.SFXMC);
S8.attachSound("8");
S9 = new Sound(_root.SFXMC);
S9.attachSound("9");
S10 = new Sound(_root.SFXMC);
S10.attachSound("10");
S11 = new Sound(_root.SFXMC);
S11.attachSound("11");
S12 = new Sound(_root.SFXMC);
S12.attachSound("12");
S13 = new Sound(_root.SFXMC);
S13.attachSound("13");
S14 = new Sound(_root.SFXMC);
S14.attachSound("14");
S15 = new Sound(_root.SFXMC);
S15.attachSound("15");
S16 = new Sound(_root.SFXMC);
S16.attachSound("16");
S17 = new Sound(_root.SFXMC);
S17.attachSound("17");
S18 = new Sound(_root.SFXMC);
S18.attachSound("18");
S19 = new Sound(_root.SFXMC);
S19.attachSound("19");
S20 = new Sound(_root.SFXMC);
S20.attachSound("20");
S21 = new Sound(_root.SFXMC);
S21.attachSound("21");
S22 = new Sound(_root.SFXMC);
S22.attachSound("22");
S23 = new Sound(_root.SFXMC);
S23.attachSound("23");
S24 = new Sound(_root.SFXMC);
S24.attachSound("24");
S25 = new Sound(_root.SFXMC);
S25.attachSound("25");
oof1 = new Sound(_root.SFXMC);
oof1.attachSound("oof1");
oof2 = new Sound(_root.SFXMC);
oof2.attachSound("oof2");
oof3 = new Sound(_root.SFXMC);
oof3.attachSound("oof3");
oof4 = new Sound(_root.SFXMC);
oof4.attachSound("oof4");
oof5 = new Sound(_root.SFXMC);
oof5.attachSound("oof5");
oof6 = new Sound(_root.SFXMC);
oof6.attachSound("oof6");
oof7 = new Sound(_root.SFXMC);
oof7.attachSound("oof7");
YaMissed = new Sound(_root.SFXMC);
YaMissed.attachSound("Ya Missed");
YCTAS = new Sound(_root.SFXMC);
YCTAS.attachSound("You Call that a shot");
YNAEP = new Sound(_root.SFXMC);
YNAEP.attachSound("You need another eyepatch");
FLAGWAVE = new Sound(_root.SFXMC);
FLAGWAVE.attachSound("FLAGWAVE");
metalTankJump = new Sound(_root.IFButton);
metalTankJump.attachSound("metalTankJump");
metalTankJump.setVolume(200);
splash = new Sound(_root.SFXMC);
splash.attachSound("splashLight");
parrot1 = new Sound(_root.SFXMC);
parrot1.attachSound("parrot1");
parrot2 = new Sound(_root.SFXMC);
parrot2.attachSound("parrot2");
bbeard = new Sound(_root.SFXMC);
bbeard.attachSound("bbeard");
Holy = new Sound(_root.SFXMC);
Holy.attachSound("Holy");
GoodShot = new Sound(_root.SFXMC);
GoodShot.attachSound("Good Shot");
Illkillya = new Sound(_root.SFXMC);
Illkillya.attachSound("Ill kill ya");
Scalliwag = new Sound(_root.SFXMC);
Scalliwag.attachSound("Scalliwag");
totheplankwithya = new Sound(_root.SFXMC);
totheplankwithya.attachSound("to the plank with ya");
}
stop();
_quality = "HIGH";
stop();
loadAllSounds();
Instance of Symbol 502 MovieClip in Frame 2
on (release) {
getURL ("http://www.crazymonkeygames.com", "_blank");
}
Frame 3
stop();
Instance of Symbol 518 MovieClip in Frame 3
on (release) {
getURL ("http://www.corkysurprise.com", "_blank");
}
Instance of Symbol 502 MovieClip in Frame 3
on (release) {
getURL ("http://www.corkysurprise.com", "_blank");
}
Frame 4
stop();
Instance of Symbol 534 MovieClip "w1" in Frame 5
onClipEvent (load) {
function goUp() {
_root.IFC1++;
YS = YS + wetness;
}
rate = 2;
fakeYS = _yscale;
YS = _yscale;
wetness = 5;
}
onClipEvent (enterFrame) {
if (fakeYS < YS) {
fakeYS = fakeYS + rate;
}
_yscale = fakeYS;
}
Instance of Symbol 534 MovieClip "w1" in Frame 5
onClipEvent (load) {
function goUp() {
_root.IFC1++;
YS = YS + wetness;
}
rate = 2;
fakeYS = _yscale;
YS = _yscale;
wetness = 5;
}
onClipEvent (enterFrame) {
if (fakeYS < YS) {
fakeYS = fakeYS + rate;
}
_yscale = fakeYS;
}
Instance of Symbol 534 MovieClip "w1" in Frame 5
onClipEvent (load) {
function goUp() {
_root.IFC1++;
YS = YS + wetness;
}
rate = 2;
fakeYS = _yscale;
YS = _yscale;
wetness = 5;
}
onClipEvent (enterFrame) {
if (fakeYS < YS) {
fakeYS = fakeYS + rate;
}
_yscale = fakeYS;
}
Instance of Symbol 567 MovieClip "cursor" in Frame 5
onClipEvent (enterFrame) {
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
}
Frame 73
_root.gotoAndStop("Menu");
Frame 74
stop();
_root.team1Win = false;
_root.team2Win = false;
Instance of Symbol 534 MovieClip "w1" in Frame 74
onClipEvent (load) {
function goUp() {
_root.IFC1++;
YS = YS + wetness;
}
rate = 2;
fakeYS = _yscale;
YS = _yscale;
wetness = 5;
}
onClipEvent (enterFrame) {
if (fakeYS < YS) {
fakeYS = fakeYS + rate;
}
_yscale = fakeYS;
}
Instance of Symbol 534 MovieClip "w1" in Frame 74
onClipEvent (load) {
function goUp() {
_root.IFC1++;
YS = YS + wetness;
}
rate = 2;
fakeYS = _yscale;
YS = _yscale;
wetness = 5;
}
onClipEvent (enterFrame) {
if (fakeYS < YS) {
fakeYS = fakeYS + rate;
}
_yscale = fakeYS;
}
Instance of Symbol 534 MovieClip "w1" in Frame 74
onClipEvent (load) {
function goUp() {
_root.IFC1++;
YS = YS + wetness;
}
rate = 2;
fakeYS = _yscale;
YS = _yscale;
wetness = 5;
}
onClipEvent (enterFrame) {
if (fakeYS < YS) {
fakeYS = fakeYS + rate;
}
_yscale = fakeYS;
}
Instance of Symbol 588 MovieClip "commentGenerator" in Frame 74
onClipEvent (load) {
function makeBadComment() {
done = true;
this.gotoAndStop(2);
busy = true;
_root.SAC = _root.helpText;
}
helpText = undefined;
busy = false;
done = false;
}
onClipEvent (enterFrame) {
if (!busy) {
if (done == false) {
if (!(helpText === _root.helpText)) {
makeBadComment();
helpText = undefined;
}
}
}
}
Instance of Symbol 597 MovieClip "deleteWarning" in Frame 74
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 567 MovieClip "cursor" in Frame 74
onClipEvent (load) {
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
}
onClipEvent (enterFrame) {
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
}
Instance of Symbol 599 MovieClip "popup" in Frame 74
onClipEvent (load) {
stop();
_visible = false;
}
Instance of Symbol 601 MovieClip "blackSilence" in Frame 74
onClipEvent (load) {
_visible = false;
time = 0;
delay = 40;
}
onClipEvent (enterFrame) {
if (_visible) {
time++;
}
if (time >= delay) {
_height = 1000;
_width = 1000;
_x = 350;
_y = 250;
_root.gotoAndStop("fakeLoader");
}
}
on (press) {
bleh();
}
Instance of Symbol 603 MovieClip in Frame 74
onClipEvent (load) {
function loadMenuMusic() {
_root.createEmptyMovieClip("MENUMUSICMC", 3080);
music = new Sound(_root.MENUMUSICMC);
music.attachSound("Level 1");
}
loadMenuMusic();
music.start(0, 99999);
}
onClipEvent (enterFrame) {
_root.soundVolume = (_root.soundsVolumePos / 617.1) * 100;
_root.musicVolume = (_root.musicVolumePos / 617.1) * 110;
menusoundV = new Sound(_root.MENUSFXMC);
menusoundV.setVolume(_root.soundVolume);
GamesoundV = new Sound(_root.SFXMC);
GamesoundV.setVolume(_root.soundVolume);
musicVolumeV = new Sound(_root.MENUMUSICMC);
musicVolumeV.setVolume(_root.musicVolume);
}
Instance of Symbol 619 MovieClip in Frame 76
on (press) {
_root.gotoAndStop("Menu");
}
Instance of Symbol 793 MovieClip "detailedInfo" in Frame 76
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 619 MovieClip in Frame 78
on (press) {
_root.gotoAndStop("menuOptions");
}
Frame 80
function checkSavedGame() {
saveGame();
_root.backButton.goBack = true;
_root.selectedTeam = undefined;
}
function showWarning2() {
deleteWarning._visible = true;
}
function saveGame() {
myLSO = SharedObject.getLocal("Pirates");
if (myLSO.data.myObj == undefined) {
_root.helpText = "New game File Created";
} else {
_root.helpText = "Game Data Overwritten";
}
myObj = {};
myObj.objArray = new Array();
myObj.objArray[0] = _root.teamListNumber;
myObj.objArray[1] = _root.unlocked;
myObj.objArray[2] = _root.gold;
myObj.objArray[3] = _root.soundsVolumePos;
myObj.objArray[4] = _root.musicVolumePos;
myObj.objArray[5] = _root.team1.name;
myObj.objArray[6] = _root.team1.p1;
myObj.objArray[7] = _root.team1.p2;
myObj.objArray[8] = _root.team1.p3;
myObj.objArray[9] = _root.team1.grave;
myObj.objArray[10] = _root.team1.lefteyechance;
myObj.objArray[11] = _root.team1.hatchance;
myObj.objArray[12] = _root.team1.beardchance;
myObj.objArray[13] = _root.team1.lefthandchance;
myObj.objArray[14] = _root.team1.righthandchance;
myObj.objArray[15] = _root.team1.lefthairchance;
myObj.objArray[16] = _root.team1.legchance;
myObj.objArray[17] = _root.team2.name;
myObj.objArray[18] = _root.team2.p1;
myObj.objArray[19] = _root.team2.p2;
myObj.objArray[20] = _root.team2.p3;
myObj.objArray[21] = _root.team2.grave;
myObj.objArray[22] = _root.team2.lefteyechance;
myObj.objArray[23] = _root.team2.hatchance;
myObj.objArray[24] = _root.team2.beardchance;
myObj.objArray[25] = _root.team2.lefthandchance;
myObj.objArray[26] = _root.team2.righthandchance;
myObj.objArray[27] = _root.team2.lefthairchance;
myObj.objArray[28] = _root.team2.legchance;
myObj.objArray[29] = _root.team3.name;
myObj.objArray[30] = _root.team3.p1;
myObj.objArray[31] = _root.team3.p2;
myObj.objArray[32] = _root.team3.p3;
myObj.objArray[33] = _root.team3.grave;
myObj.objArray[34] = _root.team3.lefteyechance;
myObj.objArray[35] = _root.team3.hatchance;
myObj.objArray[36] = _root.team3.beardchance;
myObj.objArray[37] = _root.team3.lefthandchance;
myObj.objArray[38] = _root.team3.righthandchance;
myObj.objArray[39] = _root.team3.lefthairchance;
myObj.objArray[40] = _root.team3.legchance;
myObj.objArray[41] = _root.team1.colour;
myObj.objArray[42] = _root.team2.colour;
myObj.objArray[43] = _root.team3.colour;
myObj.objArray[44] = _root.doneArrow;
myLSO.data.myObj = myObj;
}
function loadGame() {
myLSO = SharedObject.getLocal("Pirates");
if (myLSO.data.myObj == undefined) {
_root.helpText = "No Saved Game Found";
} else {
_root.helpText = "Game Loaded";
_root.teamListNumber = myLSO.data.myObj.objArray[0];
if (!(myLSO.data.myObj.objArray[1] === undefined)) {
_root.unlocked = myLSO.data.myObj.objArray[1];
}
if (!(myLSO.data.myObj.objArray[2] === undefined)) {
_root.gold = myLSO.data.myObj.objArray[2];
}
_root.soundsVolumePos = myLSO.data.myObj.objArray[3];
_root.musicVolumePos = myLSO.data.myObj.objArray[4];
_root.team1 = new Object();
_root.team1.name = myLSO.data.myObj.objArray[5];
_root.team1.p1 = myLSO.data.myObj.objArray[6];
_root.team1.p2 = myLSO.data.myObj.objArray[7];
_root.team1.p3 = myLSO.data.myObj.objArray[8];
_root.team1.grave = myLSO.data.myObj.objArray[9];
_root.team1.lefteyechance = myLSO.data.myObj.objArray[10];
_root.team1.hatchance = myLSO.data.myObj.objArray[11];
_root.team1.beardchance = myLSO.data.myObj.objArray[12];
_root.team1.lefthandchance = myLSO.data.myObj.objArray[13];
_root.team1.righthandchance = myLSO.data.myObj.objArray[14];
_root.team1.lefthairchance = myLSO.data.myObj.objArray[15];
_root.team1.legchance = myLSO.data.myObj.objArray[16];
_root.team2 = new Object();
_root.team2.name = myLSO.data.myObj.objArray[17];
_root.team2.p1 = myLSO.data.myObj.objArray[18];
_root.team2.p2 = myLSO.data.myObj.objArray[19];
_root.team2.p3 = myLSO.data.myObj.objArray[20];
_root.team2.grave = myLSO.data.myObj.objArray[21];
_root.team2.lefteyechance = myLSO.data.myObj.objArray[22];
_root.team2.hatchance = myLSO.data.myObj.objArray[23];
_root.team2.beardchance = myLSO.data.myObj.objArray[24];
_root.team2.lefthandchance = myLSO.data.myObj.objArray[25];
_root.team2.righthandchance = myLSO.data.myObj.objArray[26];
_root.team2.lefthairchance = myLSO.data.myObj.objArray[27];
_root.team2.legchance = myLSO.data.myObj.objArray[28];
_root.team3 = new Object();
_root.team3.name = myLSO.data.myObj.objArray[29];
_root.team3.p1 = myLSO.data.myObj.objArray[30];
_root.team3.p2 = myLSO.data.myObj.objArray[31];
_root.team3.p3 = myLSO.data.myObj.objArray[32];
_root.team3.grave = myLSO.data.myObj.objArray[33];
_root.team3.lefteyechance = myLSO.data.myObj.objArray[34];
_root.team3.hatchance = myLSO.data.myObj.objArray[35];
_root.team3.beardchance = myLSO.data.myObj.objArray[36];
_root.team3.lefthandchance = myLSO.data.myObj.objArray[37];
_root.team3.righthandchance = myLSO.data.myObj.objArray[38];
_root.team3.lefthairchance = myLSO.data.myObj.objArray[39];
_root.team3.legchance = myLSO.data.myObj.objArray[40];
_root.team1.colour = myLSO.data.myObj.objArray[41];
_root.team2.colour = myLSO.data.myObj.objArray[42];
_root.team3.colour = myLSO.data.myObj.objArray[43];
if (!(myLSO.data.myObj.objArray[44] === undefined)) {
_root.doneArrow = myLSO.data.myObj.objArray[44];
}
}
if (_root.soundsVolumePos == undefined) {
_root.soundsVolumePos = 399.6;
}
if (_root.musicVolumePos == undefined) {
_root.musicVolumePos = 475.6;
}
}
function deleteGameData() {
deleteTempVariables();
var _local2 = SharedObject.getLocal("Pirates");
for (var _local3 in _local2.data) {
delete _local2.data[_local3];
_root.helpText = "Game Data Deleted";
}
_root.helpText = "Game Data Deleted";
}
function deleteTempVariables() {
_root.team1 = undefined;
_root.team2 = undefined;
_root.team3 = undefined;
_root.soundsVolumePos = 250;
_root.musicVolumePos = 250;
}
if (_root.unlocked == undefined) {
_root.unlocked = [""];
}
if (_root.gold == undefined) {
_root.gold = 20;
}
trace(_root.team1.name);
Instance of Symbol 619 MovieClip in Frame 81
on (press) {
_root.gotoAndStop("Menu");
}
Frame 94
function createBoom() {
popup._visible = true;
popup.play();
_root.blackSilence._visible = true;
i = 2;
while (i <= numBoom) {
var _local2 = "BOOMBALL" + bD;
_root.attachMovie("BOOMBALL", _local2, bD);
_root[_local2]._x = 350;
_root[_local2]._y = 250;
bD++;
i++;
}
}
stop();
numBoom = 50;
bD = 10;
_root.selectedMap = "Random";
delete _root.vTeam1;
delete _root.vTeam2;
Instance of Symbol 1192 MovieClip "ADDTEAM1" in Frame 95
on (press) {
if (!(_parent.cST === undefined)) {
if (!(_root.vTeam2 === _parent.cST)) {
_root.vTeam1 = _parent.cST;
}
}
if (_parent.cST == undefined) {
_root.helpText = "Please choose a team to add";
_root.error2.start();
}
if (_root.vTeam2 == _parent.cST) {
if (!(_parent.cST === undefined)) {
_root.helpText = "That team is already being used for Team 2";
_root.error.start();
}
}
}
Instance of Symbol 1192 MovieClip "ADDTEAM2" in Frame 95
on (press) {
if (!(_parent.cST === undefined)) {
if (!(_root.vTeam1 === _parent.cST)) {
_root.vTeam2 = _parent.cST;
}
}
if (_parent.cST == undefined) {
_root.helpText = "Please choose a team to add";
_root.error2.start();
}
if (_root.vTeam1 == _parent.cST) {
if (!(_parent.cST === undefined)) {
_root.helpText = "That team is already being used for Team 1";
_root.error.start();
}
}
}
Instance of Symbol 1198 MovieClip in Frame 95
on (press) {
_root.vTeam1 = "";
}
Instance of Symbol 1198 MovieClip in Frame 95
on (press) {
_root.vTeam2 = "";
}
Instance of Symbol 1202 MovieClip in Frame 95
onClipEvent (load) {
if (_root.healthDisplay == undefined) {
_root.healthDisplay = 100;
}
max = 200;
}
on (press) {
if (_root.healthDisplay == 200) {
_root.healthDisplay = 15;
}
if (_root.healthDisplay < max) {
_root.healthDisplay = _root.healthDisplay + 5;
if (_root.healthDisplay > max) {
_root.healthDisplay = 15;
}
}
_root.rollOver.start();
}
on (rollOver) {
_root.helpText = "Click to change the game start-health";
}
Instance of Symbol 1209 MovieClip in Frame 95
on (press) {
_root.click.start();
_root.smGoto = 4;
_root.gotoAndStop("1PlayerMapChoose");
}
Instance of Symbol 1211 MovieClip in Frame 95
on (press) {
_parent.teamListScroller._y = _parent.teamListScroller._y - 10;
}
Instance of Symbol 1211 MovieClip in Frame 95
on (press) {
if (_parent.teamListScroller._y < 217.75) {
_parent.teamListScroller._y = _parent.teamListScroller._y + 10;
}
}
Instance of Symbol 1213 MovieClip in Frame 95
onClipEvent (load) {
function checkForErrors() {
vT1 = new Object();
vT2 = new Object();
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t1.teamName) {
vT1.type = "cpu";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t2.teamName) {
vT1.type = "cpu";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t3.teamName) {
vT1.type = "cpu";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t1.teamName) {
vT2.type = "cpu";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t2.teamName) {
vT2.type = "cpu";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t3.teamName) {
vT2.type = "cpu";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t4.teamName) {
vT1.type = "human";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t5.teamName) {
vT1.type = "human";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t6.teamName) {
vT1.type = "human";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t7.teamName) {
vT1.type = "human";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t8.teamName) {
vT1.type = "human";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t4.teamName) {
vT2.type = "human";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t5.teamName) {
vT2.type = "human";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t6.teamName) {
vT2.type = "human";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t7.teamName) {
vT2.type = "human";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t8.teamName) {
vT2.type = "human";
}
if (!(vT1.type === vT2.type)) {
if (_root.blackSilence._visible == false) {
if (!(_root.vTeam1 === undefined)) {
if (!(_root.vTeam2 === undefined)) {
startIt();
}
}
}
}
}
function setMatchVariables() {
_root.turnTime = _root.timeDisplay;
_root.gameMode = "1 Player";
_root.startHealth = _root.healthDisplay;
if (_root.vTeam1 == _root.preSetTeam1.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.preSetTeam1;
}
}
if (_root.vTeam1 == _root.preSetTeam2.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.preSetTeam2;
}
}
if (_root.vTeam1 == _root.preSetTeam3.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.preSetTeam3;
}
}
if (_root.vTeam1 == _root.preSetTeam4.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.preSetTeam4;
}
}
if (_root.vTeam1 == _root.preSetTeam5.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.preSetTeam5;
}
}
if (_root.vTeam1 == _root.team1.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.team1;
}
}
if (_root.vTeam1 == _root.team2.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.team2;
}
}
if (_root.vTeam1 == _root.team3.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.team3;
}
}
if (_root.vTeam1 == _root.preSetTeam1.name) {
if (vT1.type == "cpu") {
_root.matchedTeam2 = _root.preSetTeam1;
}
}
if (_root.vTeam1 == _root.preSetTeam2.name) {
if (vT1.type == "cpu") {
_root.matchedTeam2 = _root.preSetTeam2;
}
}
if (_root.vTeam1 == _root.preSetTeam3.name) {
if (vT1.type == "cpu") {
_root.matchedTeam2 = _root.preSetTeam3;
}
}
if (_root.vTeam1 == _root.preSetTeam4.name) {
if (vT1.type == "cpu") {
_root.matchedTeam2 = _root.preSetTeam4;
}
}
if (_root.vTeam1 == _root.preSetTeam5.name) {
if (vT1.type == "cpu") {
_root.matchedTeam2 = _root.preSetTeam5;
}
}
if (_root.vTeam1 == _root.team1.name) {
if (vT1.type == "cpu") {
_root.matchedTeam2 = _root.team1;
}
}
if (_root.vTeam1 == _root.team2.name) {
if (vT1.type == "cpu") {
_root.matchedTeam2 = _root.team2;
}
}
if (_root.vTeam1 == _root.team3.name) {
if (vT1.type == "cpu") {
_root.matchedTeam2 = _root.team3;
}
}
if (_root.vTeam2 == _root.preSetTeam1.name) {
if (vT2.type == "human") {
_root.matchedTeam1 = _root.preSetTeam1;
}
}
if (_root.vTeam2 == _root.preSetTeam2.name) {
if (vT2.type == "human") {
_root.matchedTeam1 = _root.preSetTeam2;
}
}
if (_root.vTeam2 == _root.preSetTeam3.name) {
if (vT2.type == "human") {
_root.matchedTeam1 = _root.preSetTeam3;
}
}
if (_root.vTeam2 == _root.preSetTeam4.name) {
if (vT2.type == "human") {
_root.matchedTeam1 = _root.preSetTeam4;
}
}
if (_root.vTeam2 == _root.preSetTeam5.name) {
if (vT2.type == "human") {
_root.matchedTeam1 = _root.preSetTeam5;
}
}
if (_root.vTeam2 == _root.team1.name) {
if (vT2.type == "human") {
_root.matchedTeam1 = _root.team1;
}
}
if (_root.vTeam2 == _root.team2.name) {
if (vT2.type == "human") {
_root.matchedTeam1 = _root.team2;
}
}
if (_root.vTeam2 == _root.team3.name) {
if (vT2.type == "human") {
_root.matchedTeam1 = _root.team3;
}
}
if (_root.vTeam2 == _root.preSetTeam1.name) {
if (vT2.type == "cpu") {
_root.matchedTeam2 = _root.preSetTeam1;
}
}
if (_root.vTeam2 == _root.preSetTeam2.name) {
if (vT2.type == "cpu") {
_root.matchedTeam2 = _root.preSetTeam2;
}
}
if (_root.vTeam2 == _root.preSetTeam3.name) {
if (vT2.type == "cpu") {
_root.matchedTeam2 = _root.preSetTeam3;
}
}
if (_root.vTeam2 == _root.preSetTeam4.name) {
if (vT2.type == "cpu") {
_root.matchedTeam2 = _root.preSetTeam4;
}
}
if (_root.vTeam2 == _root.preSetTeam5.name) {
if (vT2.type == "cpu") {
_root.matchedTeam2 = _root.preSetTeam5;
}
}
if (_root.vTeam2 == _root.team1.name) {
if (vT2.type == "cpu") {
_root.matchedTeam2 = _root.team1;
}
}
if (_root.vTeam2 == _root.team2.name) {
if (vT2.type == "cpu") {
_root.matchedTeam2 = _root.team2;
}
}
if (_root.vTeam2 == _root.team3.name) {
if (vT2.type == "cpu") {
_root.matchedTeam2 = _root.team3;
}
}
trace(_root.matchedTeam1.name);
trace(_root.matchedTeam2.name);
}
function startIt() {
setMatchVariables();
_root.createBoom();
}
}
on (press) {
checkForErrors();
if (_root.vTeam2 == undefined) {
_root.helpText = "You need to choose your second team!";
_root.error.start();
}
if (_root.vTeam1 == undefined) {
_root.helpText = "You need to choose your first team!";
_root.error.start();
}
if (vT1.type == vT2.type) {
if ((vT1.type == "cpu") and (vT2.type == "cpu")) {
_root.helpText = "You can't select 2 CPU Teams!";
_root.error.start();
}
if ((vT1.type == "human") and (vT2.type == "human")) {
_root.helpText = "You can't select 2 human Teams! Choose 2 player mode!";
_root.error.start();
}
}
}
Instance of Symbol 619 MovieClip in Frame 95
on (press) {
_root.gotoAndPlay("gameMode");
}
Instance of Symbol 619 MovieClip in Frame 96
on (press) {
_root.gotoAndStop("1PlayerModeSetup");
}
Instance of Symbol 1192 MovieClip "ADDTEAM1" in Frame 97
on (press) {
if (!(_parent.cST === undefined)) {
if (!(_root.vTeam2 === _parent.cST)) {
_root.vTeam1 = _parent.cST;
}
}
if (_parent.cST == undefined) {
_root.helpText = "Please choose a team to add";
_root.error2.start();
}
if (_root.vTeam2 == _parent.cST) {
if (!(_parent.cST === undefined)) {
_root.helpText = "That team is already being used for Team 2";
_root.error.start();
}
}
}
Instance of Symbol 1192 MovieClip "ADDTEAM2" in Frame 97
on (press) {
if (!(_parent.cST === undefined)) {
if (!(_root.vTeam1 === _parent.cST)) {
_root.vTeam2 = _parent.cST;
}
}
if (_parent.cST == undefined) {
_root.helpText = "Please choose a team to add";
_root.error2.start();
}
if (_root.vTeam1 == _parent.cST) {
if (!(_parent.cST === undefined)) {
_root.helpText = "That team is already being used for Team 1";
_root.error.start();
}
}
}
Instance of Symbol 1198 MovieClip in Frame 97
on (press) {
_root.vTeam1 = "";
}
Instance of Symbol 1198 MovieClip in Frame 97
on (press) {
_root.vTeam2 = "";
}
Instance of Symbol 1213 MovieClip in Frame 97
onClipEvent (load) {
function checkForErrors() {
vT1 = new Object();
vT2 = new Object();
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t4.teamName) {
vT1.type = "human";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t5.teamName) {
vT1.type = "human";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t6.teamName) {
vT1.type = "human";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t7.teamName) {
vT1.type = "human";
}
if (_root.vTeam1 == _parent.teamListScroller.Menu_GS_t8.teamName) {
vT1.type = "human";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t4.teamName) {
vT2.type = "human";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t5.teamName) {
vT2.type = "human";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t6.teamName) {
vT2.type = "human";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t7.teamName) {
vT2.type = "human";
}
if (_root.vTeam2 == _parent.teamListScroller.Menu_GS_t8.teamName) {
vT2.type = "human";
}
if (_root.blackSilence._visible == false) {
if (!(_root.vTeam1 === undefined)) {
if (!(_root.vTeam2 === undefined)) {
startIt();
}
}
}
}
function setMatchVariables() {
_root.turnTime = _root.timeDisplay;
_root.gameMode = "2 Player";
_root.startHealth = _root.healthDisplay;
if (_root.vTeam1 == _root.preSetTeam4.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.preSetTeam4;
}
}
if (_root.vTeam1 == _root.preSetTeam5.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.preSetTeam5;
}
}
if (_root.vTeam1 == _root.team1.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.team1;
}
}
if (_root.vTeam1 == _root.team2.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.team2;
}
}
if (_root.vTeam1 == _root.team3.name) {
if (vT1.type == "human") {
_root.matchedTeam1 = _root.team3;
}
}
if (_root.vTeam2 == _root.preSetTeam4.name) {
_root.matchedTeam2 = _root.preSetTeam4;
}
if (_root.vTeam2 == _root.preSetTeam5.name) {
_root.matchedTeam2 = _root.preSetTeam5;
}
if (_root.vTeam2 == _root.team1.name) {
_root.matchedTeam2 = _root.team1;
}
if (_root.vTeam2 == _root.team2.name) {
_root.matchedTeam2 = _root.team2;
}
if (_root.vTeam2 == _root.team3.name) {
_root.matchedTeam2 = _root.team3;
}
trace(_root.matchedTeam1.name);
trace(_root.matchedTeam2.name);
}
function startIt() {
setMatchVariables();
_root.createBoom();
}
}
on (press) {
checkForErrors();
if (_root.vTeam2 == undefined) {
_root.helpText = "You need to choose your second team!";
_root.error.start();
}
if (_root.vTeam1 == undefined) {
_root.helpText = "You need to choose your first team!";
_root.error.start();
}
}
Instance of Symbol 1209 MovieClip in Frame 97
on (press) {
_root.click.start();
_root.gotoAndStop("2PlayerMapChoose");
}
Instance of Symbol 1202 MovieClip in Frame 97
onClipEvent (load) {
if (_root.healthDisplay == undefined) {
_root.healthDisplay = 100;
}
max = 200;
}
on (press) {
if (_root.healthDisplay == 200) {
_root.healthDisplay = 15;
}
if (_root.healthDisplay < max) {
_root.healthDisplay = _root.healthDisplay + 5;
if (_root.healthDisplay > max) {
_root.healthDisplay = 15;
}
}
_root.rollOver.start();
}
on (rollOver) {
_root.helpText = "Click to change the game start-health";
}
Instance of Symbol 619 MovieClip in Frame 97
on (press) {
_root.gotoAndPlay("gameMode");
}
Instance of Symbol 619 MovieClip in Frame 98
on (press) {
_root.gotoAndStop("2PlayerModeSetup");
}
Frame 99
stop();
Instance of Symbol 1382 MovieClip in Frame 99
onClipEvent (load) {
function decideLocation() {
if (_root.healthDisplay == 100) {
_root.startHealth = 100;
}
if (_root.gameMode == "Quick Game") {
_root.gotoAndStop("quickGame");
}
if (_root.gameMode == "1 Player") {
_root.gotoAndStop("1 Player");
}
if (_root.gameMode == "2 Player") {
_root.gotoAndStop("2 Player");
}
}
timeWaiter = 0;
delayUS = 50;
}
onClipEvent (enterFrame) {
timeWaiter++;
if (timeWaiter >= delayUS) {
this.gotoAndStop(2);
}
}
Instance of Symbol 1522 MovieClip in Frame 99
onClipEvent (load) {
x = 1;
y = _totalframes;
frameChosen = Math.round(Math.random() * (y - x)) + x;
this.gotoAndStop(frameChosen);
}
Instance of Symbol 567 MovieClip in Frame 99
onClipEvent (enterFrame) {
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
}
Frame 100
function makeTeam1() {
Tn1 = Tn.length - 1;
x = 0;
TnD = Math.round(Math.random() * (Tn1 - x)) + x;
teamNameHolder = Tn[TnD];
_root.matchedTeam1 = teamNameHolder;
}
function makeTeam2() {
Tn1 = Tn.length - 1;
x = 0;
TnD = Math.round(Math.random() * (Tn1 - x)) + x;
teamNameHolder = Tn[TnD];
_root.matchedTeam2 = teamNameHolder;
if (_root.matchedTeam2 == _root.matchedTeam1) {
makeTeam2();
}
}
function exchangeTurn() {
if (!_root.team2Win) {
if (!_root.team1Win) {
if (_root.turn == _root.pirate) {
nT = _root.piratec;
_root.teamType = "human";
}
if (_root.turn == _root.pirateb) {
nT = _root.pirated;
_root.teamType = "CPU";
}
if (_root.turn == _root.piratec) {
nT = _root.piratee;
_root.teamType = "human";
}
if (_root.turn == _root.pirated) {
nT = _root.piratef;
_root.teamType = "CPU";
}
if (_root.turn == _root.piratee) {
nT = _root.pirate;
_root.teamType = "human";
}
if (_root.turn == _root.piratef) {
nT = _root.pirateb;
_root.teamType = "CPU";
}
}
}
finishOFF();
}
function dT() {
if (_root.previousTurn == _root.pirate) {
nT = _root.pirateb;
_root.teamType = "CPU";
}
if (_root.previousTurn == _root.pirateb) {
nT = _root.piratec;
_root.teamType = "human";
}
if (_root.previousTurn == _root.piratec) {
nT = _root.pirated;
_root.teamType = "CPU";
}
if (_root.previousTurn == _root.pirated) {
nT = _root.piratee;
_root.teamType = "human";
}
if (_root.previousTurn == _root.piratee) {
nT = _root.piratef;
_root.teamType = "CPU";
}
if (_root.previousTurn == _root.piratef) {
nT = _root.pirate;
_root.teamType = "human";
}
doIt();
_root.changeTurn = true;
_root.whosOn = nT;
}
function doIt() {
if ((((((_root.attention == _root.pirate) or (_root.attention == _root.pirateb)) or (_root.attention == _root.piratec)) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratee)) or (_root.attention == _root.piratef)) {
finishOFF();
} else {
startTimer = true;
talkBad();
}
}
function finishOFF() {
if ((_root.previousTurn.shotNumber > 0) and (!(_root.previousTurn.shotNumber === _root.maxSGShots))) {
nT = _root.previousTurn;
_root.teamType = "human";
}
weaponChance = random(8);
if (weaponChance == 0) {
choise = "cannon";
}
if (weaponChance == 1) {
choise = "toySoldier";
}
if (weaponChance == 2) {
choise = "rottenRations";
}
if (weaponChance == 3) {
choise = "anchor";
}
if (weaponChance == 4) {
choise = "beachball";
}
if (weaponChance == 5) {
choise = "anchor";
}
if (weaponChance == 6) {
choise = "cannon";
}
if (weaponChance == 7) {
choise = "cannon";
}
if (_root.teamType == "CPU") {
nT.weaponOut = choise;
}
if (_root.teamType == "human") {
if (nT.shotNumber == 0) {
nT.weaponOut = "cannon";
}
if ((nT.weaponOut == "homingMissile1") or (_root.turn.weaponOut == "airStrike1")) {
nT.weaponOut = "cannon";
}
}
_root.target = undefined;
_root.InGameCursor.gotoAndStop(1);
if ((nT.shotNumber == 0) or (nT.shotNumber == undefined)) {
if ((!(nT.weaponOut === "Swap Go")) or (!(_root.turn.weaponOut === "Swap Go"))) {
_root.turnTime = _root.startTime;
_root.fakeTime = _root.startTime;
}
}
_root.attention = nT;
_root.turn = nT;
nT.jump = false;
nT.FIRENOW = false;
tellTarget (nT) {
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
};
tellTarget (_root.statistics.counter) {
resetTime = getTimer() + delay;
};
trace(_root.turn.weaponOut);
if (_root.statistics.WM._currentframe == 3) {
_root.statistics.WM.gotoAndStop(4);
}
_root.goldCounter++;
}
function talkBad() {
soundChance = random(10);
if (soundChance == 2) {
YaMissed.start();
}
if (soundChance == 7) {
YCTAS.start();
}
if (soundChance == 4) {
YNAEP.start();
}
}
Gamemusic = new Sound(_root.MENUMUSICMC);
Gamemusic.attachSound("The Tragic Prince");
Gamemusic.start(0, 999);
_root.startHealth = 100;
_root.minFall = 1;
startTimer = false;
Tn = ["Psycho", "In the Zone", "PJ Party", "The Odd Crew", "Donkey Sanctuary", "Sabian", "Plank Walkers", "The large ladies", "Dubble Bubble", "The Choir Boys", "Bacon Sandwich", "Trivial Pursuers", "The Foreigners", "The Editors", "The meat crew", "The touchables", "The Anoraks", "The Protestors", "The Riot Police", "The Thong Masters", "The old and up for it", "The Desperate", "The English Teachers", "The carpenters", "The 3.4 wise men", "Decomposing Elderly", "The Attornies", "The mess around crew", "Team BullyBeef", "Final Xenon Saga"];
_root.goldCounter = 0;
makeTeam1();
makeTeam2();
_root.startTime = 25;
_root.maxSGShots = 2;
turnDelay = 20;
swapTurnTimeDelay = 0;
_root.graveDepth = 80000 /* 0x013880 */;
_root.deathHealth = 0;
startChance = random(2);
startTurn = _root.pirate;
_root.teamType = "human";
_root.whosOn = startTurn;
_root.attention = startTurn;
nT = startTurn;
_root.changeTurn = true;
_root.turn = startTurn;
_root.gravity = 2;
_root.onEnterFrame = function () {
if (startTimer) {
swapTurnTimeDelay++;
if (swapTurnTimeDelay > turnDelay) {
finishOFF();
startTimer = false;
swapTurnTimeDelay = 0;
}
}
};
randomXPosMin = 0;
randomXPosMax = 1800;
if (_root.selectedMap == "Movie Theatre") {
randomXPosMin = -200;
randomXPosMax = 1200;
}
if (_root.selectedMap == "Ghost Ship") {
randomXPosMin = -300;
randomXPosMax = 1000;
}
if (_root.selectedMap == "Big Ben") {
randomXPosMin = -400;
randomXPosMax = 700;
}
FLAGWAVE.start();
mapChanceA = 1;
mapChanceB = 4;
mapChosen = Math.round(Math.random() * (mapChanceB - mapChanceA)) + mapChanceA;
bg.gotoAndStop(mapChosen);
back_bg.gotoAndStop(mapChosen);
Instance of Symbol 1617 MovieClip "cam" in Frame 100
onClipEvent (load) {
if (_root.selectedMap == "Indirect Fight") {
Motion = 5;
} else {
Motion = 7;
}
scrollTarget = ["bg", "back_bg", "pirate", "pirateb", "piratec", "pirated", "piratee", "piratef", "InGameCursor", "s1", "s2", "s3", "s4", "s5", "s6", "blackWilderness", "IFButton", "IFW1H", "IFW2H"];
}
onClipEvent (enterFrame) {
distanceX = Math.round(_x - _root.attention._x);
distanceY = Math.round(_y - _root.attention._y);
for (i in scrollTarget) {
_parent[scrollTarget[i]]._x = _parent[scrollTarget[i]]._x + (distanceX / Motion);
_parent[scrollTarget[i]]._y = _parent[scrollTarget[i]]._y + (distanceY / Motion);
}
_root.distanceX = distanceX / Motion;
_root.distanceY = distanceY / Motion;
}
Instance of Symbol 1648 MovieClip "pirate" in Frame 100
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
if (health > _root.deathHealth) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
CChance = random(6);
if (CChance == 0) {
_root.randomTeam1C = "red";
}
if (CChance == 1) {
_root.randomTeam1C = "blue";
}
if (CChance == 2) {
_root.randomTeam1C = "green";
}
if (CChance == 3) {
_root.randomTeam1C = "purple";
}
if (CChance == 4) {
_root.randomTeam1C = "orange";
}
if (CChance == 5) {
_root.randomTeam1C = "black";
}
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
teamName = _root.matchedTeam1;
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
colour = _root.randomTeam1C;
FIRENOW = false;
if (_root.selectedMap == "Indirect Fight") {
_x = -164.6;
_y = 150;
enemies = ["IFButton"];
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirateb", "pirated", "piratef"];
}
alive = true;
fn = ["Scruffy", "Scrumpy", "Ugly", "Friendly", "Lumpy", "Handsome", "Moody", "Cheesy", "Squeaky", "Pokey", "Stinky", "Pretty", "Frisky", "Jumpy", "Frumpy", "Dirty", "Sleazy", "Sleepy", "Grumpy", "Angry", "Smarmy", "No-Eyes", "Captain", "Darius", "Bloody"];
ln = ["Jim", "Pete", "Joe", "the Janitor", "Bob", "Mike", "Pegleg", "Wilson", "Jack", "Sonny", "the Scalliwag", "Pegleg", " Bloodsmear", "Periwinkle", "KeelHaul", "The Red"];
NameX = 0;
y1 = fn.length - 1;
y2 = ln.length - 1;
fnD = Math.round(Math.random() * (y1 - NameX)) + NameX;
fN = fn[fnD];
lnD = Math.round(Math.random() * (y2 - NameX)) + NameX;
lN = ln[lnD];
firstName = fN;
lastName = lN;
name = (firstName add " ") add lastName;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (_root.gravity == 2) {
_root.maxFall = _root.ExplosionStrength;
}
if (_root.gravity < 2) {
_root.maxFall = 1;
}
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team2Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team1Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
fallDamage = yvel / 5;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team2Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = (("airStrike1" + bc) + random(200));
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(300));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1648 MovieClip "piratee" in Frame 100
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (health > _root.deathHealth) {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
teamName = _root.matchedTeam1;
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
colour = _root.randomTeam1C;
FIRENOW = false;
if (_root.selectedMap == "Indirect Fight") {
_x = -164.6;
_y = 150;
enemies = ["IFButton"];
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirateb", "pirated", "piratef"];
}
alive = true;
fn = ["Scruffy", "Scrumpy", "Ugly", "Friendly", "Lumpy", "Handsome", "Moody", "Cheesy", "Squeaky", "Pokey", "Stinky", "Pretty", "Frisky", "Jumpy", "Frumpy", "Dirty", "Sleazy", "Sleepy", "Grumpy", "Angry", "Smarmy", "No-Eyes", "Captain", "Darius", "Bloody"];
ln = ["Jim", "Pete", "Joe", "the Janitor", "Bob", "Mike", "Pegleg", "Wilson", "Jack", "Sonny", "the Scalliwag", "Pegleg", " Bloodsmear", "Periwinkle", "KeelHaul", "The Red"];
NameX = 0;
y1 = fn.length - 1;
y2 = ln.length - 1;
fnD = Math.round(Math.random() * (y1 - NameX)) + NameX;
fN = fn[fnD];
lnD = Math.round(Math.random() * (y2 - NameX)) + NameX;
lN = ln[lnD];
firstName = fN;
lastName = lN;
name = (firstName add " ") add lastName;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team2Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team1Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
fallDamage = yvel / 5;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team2Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = (("airStrike1" + bc) + random(200));
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(300));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1657 MovieClip "s1" in Frame 100
onClipEvent (load) {
target = _root.pirate;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s2" in Frame 100
onClipEvent (load) {
target = _root.pirateb;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s3" in Frame 100
onClipEvent (load) {
target = _root.piratec;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s4" in Frame 100
onClipEvent (load) {
target = _root.pirated;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s5" in Frame 100
onClipEvent (load) {
target = _root.piratee;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s6" in Frame 100
onClipEvent (load) {
target = _root.piratef;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1648 MovieClip "piratec" in Frame 100
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (health > _root.deathHealth) {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
teamName = _root.matchedTeam1;
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
colour = _root.randomTeam1C;
FIRENOW = false;
if (_root.selectedMap == "Indirect Fight") {
_x = -164.6;
_y = 150;
enemies = ["IFButton"];
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirateb", "pirated", "piratef"];
}
alive = true;
fn = ["Scruffy", "Scrumpy", "Ugly", "Friendly", "Lumpy", "Handsome", "Moody", "Cheesy", "Squeaky", "Pokey", "Stinky", "Pretty", "Frisky", "Jumpy", "Frumpy", "Dirty", "Sleazy", "Sleepy", "Grumpy", "Angry", "Smarmy", "No-Eyes", "Captain", "Darius", "Bloody"];
ln = ["Jim", "Pete", "Joe", "the Janitor", "Bob", "Mike", "Pegleg", "Wilson", "Jack", "Sonny", "the Scalliwag", "Pegleg", " Bloodsmear", "Periwinkle", "KeelHaul", "The Red"];
NameX = 0;
y1 = fn.length - 1;
y2 = ln.length - 1;
fnD = Math.round(Math.random() * (y1 - NameX)) + NameX;
fN = fn[fnD];
lnD = Math.round(Math.random() * (y2 - NameX)) + NameX;
lN = ln[lnD];
firstName = fN;
lastName = lN;
name = (firstName add " ") add lastName;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team2Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team1Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
fallDamage = yvel / 5;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team2Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = (("airStrike1" + bc) + random(200));
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(300));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1674 MovieClip "pirateb" in Frame 100
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
misses = 0;
flyspeed = 8;
airResistance = 0.05;
teamName = _root.matchedTeam2;
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
x = _xscale;
easiestMode = -100;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
fn = ["Scruffy", "Scrumpy", "Ugly", "Friendly", "Lumpy", "Handsome", "Moody", "Cheesy", "Squeaky", "Pokey", "Stinky", "Pretty", "Frisky", "Jumpy", "Frumpy", "Dirty", "Sleazy", "Sleepy", "Grumpy", "Angry", "Smarmy", "No-Eyes", "Captain", "Darius", "Bloody"];
ln = ["Jim", "Pete", "Joe", "the Janitor", "Bob", "Mike", "Pegleg", "Wilson", "Jack", "Sonny", "the Scalliwag", "Pegleg", " Bloodsmear", "Periwinkle", "KeelHaul", "The Red"];
NameX = 0;
y1 = fn.length - 1;
y2 = ln.length - 1;
fnD = Math.round(Math.random() * (y1 - NameX)) + NameX;
fN = fn[fnD];
lnD = Math.round(Math.random() * (y2 - NameX)) + NameX;
lN = ln[lnD];
firstName = fN;
lastName = lN;
name = (firstName add " ") add lastName;
if (_root.selectedMap == "Indirect Fight") {
_x = -164.6;
_y = 150;
enemies = ["IFButton"];
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirate", "piratec", "piratee"];
}
alive = true;
weaponOut = "cannon";
range = 500;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 45;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 7;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
colour = _root.randomTeam2C;
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (_root.turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
if (_root.selectedMap == "Indirect Fight") {
target = _parent[enemies[0]];
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
maxPower = distance;
if (_root.attention == this) {
if (_root.turn == this) {
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
}
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (_root.turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (_root.attention == this) {
if (_root.turn == this) {
if (this._currentFrame == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
_root.attention = _root[n];
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
_root.chargeUp.stop();
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (alive) {
if (_root.turn == this) {
if (!(addExplosion === "pirated")) {
if (_currentframe == 2) {
if ((((!(_currentframe === 6)) or (!(_currentframe === 7))) or (!(_currentframe === 8))) or (!(_currentframe === 9))) {
if (!jump) {
_root.previousTurn = this;
this.gotoAndStop(5);
trace(("It's " add this) add "'s fault");
}
}
}
}
}
}
}
}
}
Instance of Symbol 1674 MovieClip "pirated" in Frame 100
onClipEvent (load) {
function makeTeam2H() {
CChance = random(6);
if (CChance == 0) {
_root.randomTeam2C = "red";
}
if (CChance == 1) {
_root.randomTeam2C = "blue";
}
if (CChance == 2) {
_root.randomTeam2C = "green";
}
if (CChance == 3) {
_root.randomTeam2C = "purple";
}
if (CChance == 4) {
_root.randomTeam2C = "orange";
}
if (CChance == 5) {
_root.randomTeam2C = "black";
}
}
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
makeTeam2H();
if (_root.randomTeam1C == _root.randomTeam2C) {
makeTeam2H();
}
misses = 0;
flyspeed = 8;
airResistance = 0.05;
teamName = _root.matchedTeam2;
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
x = _xscale;
easiestMode = -100;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
fn = ["Scruffy", "Scrumpy", "Ugly", "Friendly", "Lumpy", "Handsome", "Moody", "Cheesy", "Squeaky", "Pokey", "Stinky", "Pretty", "Frisky", "Jumpy", "Frumpy", "Dirty", "Sleazy", "Sleepy", "Grumpy", "Angry", "Smarmy", "No-Eyes", "Captain", "Darius", "Bloody"];
ln = ["Jim", "Pete", "Joe", "the Janitor", "Bob", "Mike", "Pegleg", "Wilson", "Jack", "Sonny", "the Scalliwag", "Pegleg", " Bloodsmear", "Periwinkle", "KeelHaul", "The Red"];
NameX = 0;
y1 = fn.length - 1;
y2 = ln.length - 1;
fnD = Math.round(Math.random() * (y1 - NameX)) + NameX;
fN = fn[fnD];
lnD = Math.round(Math.random() * (y2 - NameX)) + NameX;
lN = ln[lnD];
firstName = fN;
lastName = lN;
name = (firstName add " ") add lastName;
if (_root.selectedMap == "Indirect Fight") {
_x = -164.6;
_y = 150;
enemies = ["IFButton"];
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirate", "piratec", "piratee"];
}
alive = true;
weaponOut = "cannon";
range = 500;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 45;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 7;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
colour = _root.randomTeam2C;
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (_root.turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
if (_root.selectedMap == "Indirect Fight") {
target = _parent[enemies[0]];
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
maxPower = distance;
if (_root.attention == this) {
if (_root.turn == this) {
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
}
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (_root.turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (_root.attention == this) {
if (_root.turn == this) {
if (this._currentFrame == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
_root.attention = _root[n];
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
_root.chargeUp.stop();
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (alive) {
if (_root.turn == this) {
if (!(addExplosion === "pirated")) {
if (_currentframe == 2) {
if ((((!(_currentframe === 6)) or (!(_currentframe === 7))) or (!(_currentframe === 8))) or (!(_currentframe === 9))) {
if (!jump) {
_root.previousTurn = this;
this.gotoAndStop(5);
trace(("It's " add this) add "'s fault");
}
}
}
}
}
}
}
}
}
Instance of Symbol 1674 MovieClip "piratef" in Frame 100
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
misses = 0;
flyspeed = 8;
airResistance = 0.05;
teamName = _root.matchedTeam2;
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
x = _xscale;
easiestMode = -100;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
fn = ["Scruffy", "Scrumpy", "Ugly", "Friendly", "Lumpy", "Handsome", "Moody", "Cheesy", "Squeaky", "Pokey", "Stinky", "Pretty", "Frisky", "Jumpy", "Frumpy", "Dirty", "Sleazy", "Sleepy", "Grumpy", "Angry", "Smarmy", "No-Eyes", "Captain", "Darius", "Bloody"];
ln = ["Jim", "Pete", "Joe", "the Janitor", "Bob", "Mike", "Pegleg", "Wilson", "Jack", "Sonny", "the Scalliwag", "Pegleg", " Bloodsmear", "Periwinkle", "KeelHaul", "The Red"];
NameX = 0;
y1 = fn.length - 1;
y2 = ln.length - 1;
fnD = Math.round(Math.random() * (y1 - NameX)) + NameX;
fN = fn[fnD];
lnD = Math.round(Math.random() * (y2 - NameX)) + NameX;
lN = ln[lnD];
firstName = fN;
lastName = lN;
name = (firstName add " ") add lastName;
if (_root.selectedMap == "Indirect Fight") {
_x = -164.6;
_y = 150;
enemies = ["IFButton"];
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirate", "piratec", "piratee"];
}
alive = true;
weaponOut = "cannon";
range = 500;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 45;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 7;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
colour = _root.randomTeam2C;
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (_root.turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
if (_root.selectedMap == "Indirect Fight") {
target = _parent[enemies[0]];
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
maxPower = distance;
if (_root.attention == this) {
if (_root.turn == this) {
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
}
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (_root.turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (_root.attention == this) {
if (_root.turn == this) {
if (this._currentFrame == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
_root.attention = _root[n];
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
_root.chargeUp.stop();
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (alive) {
if (_root.turn == this) {
if (!(addExplosion === "pirated")) {
if (_currentframe == 2) {
if ((((!(_currentframe === 6)) or (!(_currentframe === 7))) or (!(_currentframe === 8))) or (!(_currentframe === 9))) {
if (!jump) {
_root.previousTurn = this;
this.gotoAndStop(5);
trace(("It's " add this) add "'s fault");
}
}
}
}
}
}
}
}
}
Instance of Symbol 1772 MovieClip "statistics" in Frame 100
onClipEvent (load) {
var lTime = 0;
var frameCount = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(8)) {
trace("Turn is " add _root.turn);
trace("Camera is on " add _root.attention);
}
timesf = getTimer();
frameCount++;
if ((getTimer() - lTime) >= 1000) {
lTime = getTimer();
_root.fpsm = frameCount;
frameCount = 0;
}
_root.misscount = [_root.pirate.misses, _root.pirateb.misses, _root.piratec.misses, _root.pirated.misses, _root.piratee.misses, _root.piratef.misses];
_root.misscount.sortOn(_root.misscount, Array.NUMERIC);
}
Instance of Symbol 1780 MovieClip "InGameCursor" in Frame 100
onClipEvent (load) {
InUse = false;
}
onClipEvent (enterFrame) {
m = _root.statistics.getDepth();
i = this.getDepth();
if (m > i) {
this.swapDepths(_root.statistics);
}
}
Instance of Symbol 1781 MovieClip "gameCursor" in Frame 100
onClipEvent (load) {
InUse = false;
startTime = getTimer();
delay = 10000;
resetTime = getTimer() + delay;
_root.matchEnd = false;
}
onClipEvent (enterFrame) {
if (_root.InGameCursor.InUse) {
_visible = false;
} else {
_visible = true;
}
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
m = _root.statistics.getDepth();
i = this.getDepth();
if (m > i) {
this.swapDepths(_root.statistics);
}
}
onClipEvent (enterFrame) {
if (!_root.team1Win) {
if (!_root.team2Win) {
if (_root.statistics.YOUWIN._currentframe == 1) {
elapsedTime = getTimer() - startTime;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
_root.timer_txt = (((((hours + ":") + minutes) + ":") + seconds) + ":") + hundredths;
}
}
}
}
onClipEvent (enterFrame) {
if (getTimer() > resetTime) {
if (!_root.team1Win) {
if (!_root.team2Win) {
if (_root.statistics.YOUWIN._currentframe == 1) {
if (_root.matchEnd == false) {
_root.goldCounter++;
resetTime = getTimer() + delay;
}
}
}
}
}
}
Frame 101
function chooseMap() {
if (_root.selectedMap == "Random") {
mapChanceA = 1;
mapChanceB = 5;
mapChosen = Math.round(Math.random() * (mapChanceB - mapChanceA)) + mapChanceA;
if (mapChosen == 1) {
_root.selectedMap = "Wet Weather";
}
if (mapChosen == 2) {
_root.selectedMap = "The Moon";
}
if (mapChosen == 3) {
_root.selectedMap = "PegLeg Island";
}
if (mapChosen == 4) {
_root.selectedMap = "Artic Fight";
}
if (mapChosen == 5) {
_root.selectedMap = "Indirect Fight";
}
if (mapChosen == 6) {
_root.selectedMap = "Music Room";
}
if (mapChosen == 7) {
_root.selectedMap = "Movie Theatre";
}
if (mapChosen == 8) {
_root.selectedMap = "Ghost Ship";
}
if (mapChosen == 9) {
_root.selectedMap = "Big Ben";
}
if (mapChosen == 10) {
_root.selectedMap = "Pirate Bay";
}
bg.gotoAndStop(mapChosen);
back_bg.gotoAndStop(mapChosen);
}
}
function exchangeTurn() {
if (!_root.team2Win) {
if (!_root.team1Win) {
if (_root.turn == _root.pirate) {
nT = _root.piratec;
_root.teamType = "human";
}
if (_root.turn == _root.pirateb) {
nT = _root.pirated;
_root.teamType = "CPU";
}
if (_root.turn == _root.piratec) {
nT = _root.piratee;
_root.teamType = "human";
}
if (_root.turn == _root.pirated) {
nT = _root.piratef;
_root.teamType = "CPU";
}
if (_root.turn == _root.piratee) {
nT = _root.pirate;
_root.teamType = "human";
}
if (_root.turn == _root.piratef) {
nT = _root.pirateb;
_root.teamType = "CPU";
}
}
}
finishOFF();
}
function dT() {
if (_root.previousTurn == _root.pirate) {
nT = _root.pirateb;
_root.teamType = "CPU";
}
if (_root.previousTurn == _root.pirateb) {
nT = _root.piratec;
_root.teamType = "human";
}
if (_root.previousTurn == _root.piratec) {
nT = _root.pirated;
_root.teamType = "CPU";
}
if (_root.previousTurn == _root.pirated) {
nT = _root.piratee;
_root.teamType = "human";
}
if (_root.previousTurn == _root.piratee) {
nT = _root.piratef;
_root.teamType = "CPU";
}
if (_root.previousTurn == _root.piratef) {
nT = _root.pirate;
_root.teamType = "human";
}
doIt();
_root.changeTurn = true;
_root.whosOn = nT;
}
function doIt() {
if ((((((_root.attention == _root.pirate) or (_root.attention == _root.pirateb)) or (_root.attention == _root.piratec)) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratee)) or (_root.attention == _root.piratef)) {
finishOFF();
} else {
startTimer = true;
if (!(_root.selectedMap === "Indirect Fight")) {
talkBad();
}
}
}
function finishOFF() {
if ((_root.previousTurn.shotNumber > 0) and (!(_root.previousTurn.shotNumber === _root.maxSGShots))) {
nT = _root.previousTurn;
_root.teamType = "human";
}
weaponChance = random(8);
if (weaponChance == 0) {
choise = "cannon";
}
if (weaponChance == 1) {
choise = "toySoldier";
}
if (weaponChance == 2) {
choise = "rottenRations";
}
if (weaponChance == 3) {
choise = "anchor";
}
if (weaponChance == 4) {
choise = "beachball";
}
if (weaponChance == 5) {
choise = "anchor";
}
if (weaponChance == 6) {
choise = "cannon";
}
if (weaponChance == 7) {
choise = "cannon";
}
if (_root.selectedMap == "Indirect Fight") {
weaponChanceB = random(2);
if (weaponChanceB == 0) {
choise = "cannon";
}
if (weaponChanceB == 1) {
choise = "anchor";
}
}
if (_root.teamType == "CPU") {
nT.weaponOut = choise;
}
if (_root.teamType == "human") {
if (nT.shotNumber == 0) {
nT.weaponOut = "cannon";
}
if ((nT.weaponOut == "homingMissile1") or (_root.turn.weaponOut == "airStrike1")) {
nT.weaponOut = "cannon";
}
}
_root.target = undefined;
_root.InGameCursor.gotoAndStop(1);
if ((nT.shotNumber == 0) or (nT.shotNumber == undefined)) {
if ((!(nT.weaponOut === "Swap Go")) or (!(_root.turn.weaponOut === "Swap Go"))) {
_root.turnTime = _root.startTime;
_root.fakeTime = _root.startTime;
}
}
_root.attention = nT;
_root.turn = nT;
nT.jump = false;
nT.FIRENOW = false;
tellTarget (nT) {
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
};
tellTarget (_root.statistics.counter) {
resetTime = getTimer() + delay;
};
if (_root.statistics.WM._currentframe == 3) {
_root.statistics.WM.gotoAndStop(4);
}
_root.goldCounter++;
}
function talkBad() {
soundChance = random(10);
if (soundChance == 2) {
YaMissed.start();
}
if (soundChance == 7) {
YCTAS.start();
}
if (soundChance == 4) {
YNAEP.start();
}
}
Gamemusic = new Sound(_root.MENUMUSICMC);
Gamemusic.attachSound("The Tragic Prince");
Gamemusic.start(0, 999);
chooseMap();
if (_root.selectedMap == "Wet Weather") {
Mapnumber = 1;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "The Moon") {
Mapnumber = 2;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "PegLeg Island") {
Mapnumber = 3;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Artic Fight") {
Mapnumber = 4;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Indirect Fight") {
Mapnumber = 5;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Movie Theatre") {
Mapnumber = 7;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Ghost Ship") {
Mapnumber = 8;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Big Ben") {
Mapnumber = 9;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Pirate Bay") {
Mapnumber = 10;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
_root.minFall = 1;
startTimer = false;
_root.startTime = _root.turnTime;
_root.maxSGShots = 2;
_root.goldCounter = 0;
turnDelay = 20;
swapTurnTimeDelay = 0;
_root.graveDepth = 80000 /* 0x013880 */;
_root.deathHealth = 0;
startChance = random(2);
startTurn = _root.pirate;
_root.teamType = "human";
_root.whosOn = startTurn;
_root.attention = startTurn;
nT = startTurn;
_root.changeTurn = true;
_root.turn = startTurn;
_root.gravity = 2;
_root.onEnterFrame = function () {
if (startTimer) {
swapTurnTimeDelay++;
if (swapTurnTimeDelay > turnDelay) {
finishOFF();
startTimer = false;
swapTurnTimeDelay = 0;
}
}
};
randomXPosMin = 0;
randomXPosMax = 1800;
if (_root.selectedMap == "Movie Theatre") {
randomXPosMin = -200;
randomXPosMax = 1200;
}
if (_root.selectedMap == "Ghost Ship") {
randomXPosMin = -300;
randomXPosMax = 1000;
}
if (_root.selectedMap == "Big Ben") {
randomXPosMin = -100;
randomXPosMax = 700;
}
FLAGWAVE.start();
Instance of Symbol 1617 MovieClip "cam" in Frame 101
onClipEvent (load) {
if (_root.selectedMap == "Indirect Fight") {
Motion = 5;
} else {
Motion = 7;
}
scrollTarget = ["bg", "back_bg", "pirate", "pirateb", "piratec", "pirated", "piratee", "piratef", "InGameCursor", "s1", "s2", "s3", "s4", "s5", "s6", "blackWilderness", "IFButton", "IFW1H", "IFW2H"];
}
onClipEvent (enterFrame) {
distanceX = Math.round(_x - _root.attention._x);
distanceY = Math.round(_y - _root.attention._y);
for (i in scrollTarget) {
_parent[scrollTarget[i]]._x = _parent[scrollTarget[i]]._x + (distanceX / Motion);
_parent[scrollTarget[i]]._y = _parent[scrollTarget[i]]._y + (distanceY / Motion);
}
_root.distanceX = distanceX / Motion;
_root.distanceY = distanceY / Motion;
}
Instance of Symbol 1648 MovieClip "piratec" in Frame 101
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
if (!(_root.matchedTeam1.theme === undefined)) {
theme = _root.matchedTeam1.theme;
}
hatchance = _root.matchedTeam1.hatchance;
lefthairchance = _root.matchedTeam1.lefthairchance;
lefteyechance = _root.matchedTeam1.lefteyechance;
beardchance = _root.matchedTeam1.beardchance;
lefthandchance = _root.matchedTeam1.lefthandchance;
righthandchance = _root.matchedTeam1.righthandchance;
legchance = _root.matchedTeam1.legchance;
colour = _root.matchedTeam1.colour;
grave = _root.matchedTeam1.grave;
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
if (_root.selectedMap == "Indirect Fight") {
_x = -164.6;
_y = 150;
enemies = ["IFButton"];
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirateb", "pirated", "piratef"];
}
team = "blue";
FIRENOW = false;
teamName = _root.matchedTeam1.name;
firstDeath = true;
alive = true;
name = _root.matchedTeam1.p2;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team2Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team1Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
fallDamage = yvel / 5;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team2Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = (("airStrike1" + bc) + random(200));
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(300));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1674 MovieClip "pirateb" in Frame 101
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
theme = _root.matchedTeam2.theme;
colour = _root.matchedTeam2.colour;
grave = _root.matchedTeam2.grave;
misses = 0;
flyspeed = 8;
airResistance = 0.05;
teamName = _root.matchedTeam2.name;
if (_root.selectedMap == "Indirect Fight") {
_x = 1140;
_y = 170;
enemies = ["IFButton"];
range = 99999 /* 0x01869F */;
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirate", "piratec", "piratee"];
range = 500;
}
x = _xscale;
easiestMode = -100;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
name = _root.matchedTeam2.p2;
alive = true;
weaponOut = "cannon";
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 45;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 7;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (_root.turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
if (_root.selectedMap == "Indirect Fight") {
target = _parent[enemies[0]];
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
maxPower = distance;
if (_root.attention == this) {
if (_root.turn == this) {
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
}
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (_root.turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (_root.attention == this) {
if (_root.turn == this) {
if (this._currentFrame == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
_root.attention = _root[n];
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
_root.chargeUp.stop();
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (alive) {
if (_root.turn == this) {
if (!(addExplosion === "pirated")) {
if (_currentframe == 2) {
if ((((!(_currentframe === 6)) or (!(_currentframe === 7))) or (!(_currentframe === 8))) or (!(_currentframe === 9))) {
if (!jump) {
_root.previousTurn = this;
this.gotoAndStop(5);
trace(("It's " add this) add "'s fault");
}
}
}
}
}
}
}
}
}
Instance of Symbol 1648 MovieClip "pirate" in Frame 101
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
if (!(_root.matchedTeam1.theme === undefined)) {
theme = _root.matchedTeam1.theme;
}
hatchance = _root.matchedTeam1.hatchance;
lefthairchance = _root.matchedTeam1.lefthairchance;
lefteyechance = _root.matchedTeam1.lefteyechance;
beardchance = _root.matchedTeam1.beardchance;
lefthandchance = _root.matchedTeam1.lefthandchance;
righthandchance = _root.matchedTeam1.righthandchance;
legchance = _root.matchedTeam1.legchance;
colour = _root.matchedTeam1.colour;
grave = _root.matchedTeam1.grave;
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
FIRENOW = false;
teamName = _root.matchedTeam1.name;
firstDeath = true;
if (_root.selectedMap == "Indirect Fight") {
_x = -420;
_y = 40;
enemies = ["IFButton"];
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirateb", "pirated", "piratef"];
}
alive = true;
name = _root.matchedTeam1.p1;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (_root.gravity == 2) {
_root.maxFall = _root.ExplosionStrength;
}
if (_root.gravity < 2) {
_root.maxFall = 1;
}
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team2Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team1Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
fallDamage = yvel / 5;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team2Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = (("airStrike1" + bc) + random(200));
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(300));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1674 MovieClip "pirated" in Frame 101
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
theme = _root.matchedTeam2.theme;
colour = _root.matchedTeam2.colour;
grave = _root.matchedTeam2.grave;
misses = 0;
flyspeed = 8;
airResistance = 0.05;
teamName = _root.matchedTeam2.name;
if (_root.selectedMap == "Indirect Fight") {
_x = 880;
_y = 230;
enemies = ["IFButton"];
range = 99999 /* 0x01869F */;
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirate", "piratec", "piratee"];
range = 500;
}
x = _xscale;
easiestMode = -100;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
name = _root.matchedTeam2.p1;
alive = true;
weaponOut = "cannon";
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 45;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 7;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (_root.turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
if (_root.selectedMap == "Indirect Fight") {
target = _parent[enemies[0]];
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
maxPower = distance;
if (_root.attention == this) {
if (_root.turn == this) {
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
}
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (_root.turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (_root.attention == this) {
if (_root.turn == this) {
if (this._currentFrame == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
_root.attention = _root[n];
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
_root.chargeUp.stop();
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (alive) {
if (_root.turn == this) {
if (!(addExplosion === "pirated")) {
if (_currentframe == 2) {
if ((((!(_currentframe === 6)) or (!(_currentframe === 7))) or (!(_currentframe === 8))) or (!(_currentframe === 9))) {
if (!jump) {
_root.previousTurn = this;
this.gotoAndStop(5);
trace(("It's " add this) add "'s fault");
}
}
}
}
}
}
}
}
}
Instance of Symbol 1648 MovieClip "piratee" in Frame 101
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
if (!(_root.matchedTeam1.theme === undefined)) {
theme = _root.matchedTeam1.theme;
}
hatchance = _root.matchedTeam1.hatchance;
lefthairchance = _root.matchedTeam1.lefthairchance;
lefteyechance = _root.matchedTeam1.lefteyechance;
beardchance = _root.matchedTeam1.beardchance;
lefthandchance = _root.matchedTeam1.lefthandchance;
righthandchance = _root.matchedTeam1.righthandchance;
legchance = _root.matchedTeam1.legchance;
colour = _root.matchedTeam1.colour;
grave = _root.matchedTeam1.grave;
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
if (_root.selectedMap == "Indirect Fight") {
_x = 212.7;
_y = 230;
enemies = ["IFButton"];
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirateb", "pirated", "piratef"];
}
team = "blue";
FIRENOW = false;
teamName = _root.matchedTeam1.name;
firstDeath = true;
alive = true;
name = _root.matchedTeam1.p3;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team2Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team1Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
fallDamage = yvel / 5;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team2Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = (("airStrike1" + bc) + random(200));
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(300));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1674 MovieClip "piratef" in Frame 101
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
theme = _root.matchedTeam2.theme;
colour = _root.matchedTeam2.colour;
grave = _root.matchedTeam2.grave;
misses = 0;
flyspeed = 8;
airResistance = 0.05;
teamName = _root.matchedTeam2.name;
if (_root.selectedMap == "Indirect Fight") {
_x = 1440;
_y = 30;
enemies = ["IFButton"];
range = 999999 /* 0x0F423F */;
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirate", "piratec", "piratee"];
range = 500;
}
x = _xscale;
easiestMode = -100;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
name = _root.matchedTeam2.p3;
alive = true;
weaponOut = "cannon";
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 45;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 7;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (_root.turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.attention == this) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
if (_root.selectedMap == "Indirect Fight") {
target = _parent[enemies[0]];
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
maxPower = distance;
if (_root.attention == this) {
if (_root.turn == this) {
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
}
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
if (_root.turn == this) {
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (_root.attention == this) {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (_root.turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (_root.attention == this) {
if (_root.turn == this) {
if (this._currentFrame == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
_root.attention = _root[n];
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
_root.chargeUp.stop();
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (alive) {
if (_root.turn == this) {
if (!(addExplosion === "pirated")) {
if (_currentframe == 2) {
if ((((!(_currentframe === 6)) or (!(_currentframe === 7))) or (!(_currentframe === 8))) or (!(_currentframe === 9))) {
if (!jump) {
_root.previousTurn = this;
this.gotoAndStop(5);
trace(("It's " add this) add "'s fault");
}
}
}
}
}
}
}
}
}
Instance of Symbol 1657 MovieClip "s1" in Frame 101
onClipEvent (load) {
target = _root.pirate;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s2" in Frame 101
onClipEvent (load) {
target = _root.pirateb;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s3" in Frame 101
onClipEvent (load) {
target = _root.piratec;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s4" in Frame 101
onClipEvent (load) {
target = _root.pirated;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s5" in Frame 101
onClipEvent (load) {
target = _root.piratee;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s6" in Frame 101
onClipEvent (load) {
target = _root.piratef;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1785 MovieClip "IFButton" in Frame 101
onClipEvent (load) {
function addExplosion() {
this.gotoAndStop(2);
if (_root.turn == _root.pirate) {
target = _root.bg.water.w2;
}
if (_root.turn == _root.pirateb) {
target = _root.bg.water.w1;
}
if (_root.turn == _root.piratec) {
target = _root.bg.water.w2;
}
if (_root.turn == _root.pirated) {
target = _root.bg.water.w1;
}
if (_root.turn == _root.piratee) {
target = _root.bg.water.w2;
}
if (_root.turn == _root.piratef) {
target = _root.bg.water.w1;
}
target.goUp();
_root.dT();
_root.metalTankJump.start();
}
if (_root.selectedMap == "Indirect Fight") {
_visible = true;
} else {
_visible = false;
}
_root.IFC1 = 0;
_root.IFC2 = 0;
}
Instance of Symbol 1803 MovieClip "statistics" in Frame 101
onClipEvent (load) {
var lTime = 0;
var frameCount = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(8)) {
trace("Turn is " add _root.turn);
trace("Camera is on " add _root.attention);
}
timesf = getTimer();
frameCount++;
if ((getTimer() - lTime) >= 1000) {
lTime = getTimer();
_root.fpsm = frameCount;
frameCount = 0;
}
_root.misscount = [_root.pirate.misses, _root.pirateb.misses, _root.piratec.misses, _root.pirated.misses, _root.piratee.misses, _root.piratef.misses];
_root.misscount.sortOn(_root.misscount, Array.NUMERIC);
}
Instance of Symbol 1780 MovieClip "InGameCursor" in Frame 101
onClipEvent (load) {
InUse = false;
}
onClipEvent (enterFrame) {
m = _root.statistics.getDepth();
i = this.getDepth();
if (m > i) {
this.swapDepths(_root.statistics);
}
}
Instance of Symbol 1781 MovieClip "gameCursor" in Frame 101
onClipEvent (load) {
InUse = false;
startTime = getTimer();
delay = 10000;
resetTime = getTimer() + delay;
_root.matchEnd = false;
}
onClipEvent (enterFrame) {
if (_root.InGameCursor.InUse) {
_visible = false;
} else {
_visible = true;
}
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
m = _root.statistics.getDepth();
i = this.getDepth();
if (m > i) {
this.swapDepths(_root.statistics);
}
}
onClipEvent (enterFrame) {
if (!_root.team1Win) {
if (!_root.team2Win) {
if (_root.statistics.YOUWIN._currentframe == 1) {
elapsedTime = getTimer() - startTime;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
_root.timer_txt = (((((hours + ":") + minutes) + ":") + seconds) + ":") + hundredths;
}
}
}
}
onClipEvent (enterFrame) {
if (getTimer() > resetTime) {
if (!_root.team1Win) {
if (!_root.team2Win) {
if (_root.statistics.YOUWIN._currentframe == 1) {
if (_root.matchEnd == false) {
_root.goldCounter++;
resetTime = getTimer() + delay;
}
}
}
}
}
}
Frame 102
function chooseMap() {
if (_root.selectedMap == "Random") {
mapChanceA = 1;
mapChanceB = 6;
mapChosen = Math.round(Math.random() * (mapChanceB - mapChanceA)) + mapChanceA;
if (mapChosen == 1) {
_root.selectedMap = "Wet Weather";
}
if (mapChosen == 2) {
_root.selectedMap = "The Moon";
}
if (mapChosen == 3) {
_root.selectedMap = "PegLeg Island";
}
if (mapChosen == 4) {
_root.selectedMap = "Artic Fight";
}
if (mapChosen == 5) {
_root.selectedMap = "Indirect Fight";
}
if (mapChosen == 6) {
_root.selectedMap = "Music Room";
}
if (mapChosen == 7) {
_root.selectedMap = "Movie Theatre";
}
if (mapChosen == 8) {
_root.selectedMap = "Ghost Ship";
}
if (mapChosen == 9) {
_root.selectedMap = "Big Ben";
}
if (mapChosen == 10) {
_root.selectedMap = "Pirate Bay";
}
bg.gotoAndStop(mapChosen);
back_bg.gotoAndStop(mapChosen);
}
}
function exchangeTurn() {
if (!_root.team2Win) {
if (!_root.team1Win) {
if (_root.turn == _root.pirate) {
nT = _root.piratec;
_root.teamType = "human";
}
if (_root.turn == _root.pirateb) {
nT = _root.pirated;
_root.teamType = "human";
}
if (_root.turn == _root.piratec) {
nT = _root.piratee;
_root.teamType = "human";
}
if (_root.turn == _root.pirated) {
nT = _root.piratef;
_root.teamType = "human";
}
if (_root.turn == _root.piratee) {
nT = _root.pirate;
_root.teamType = "human";
}
if (_root.turn == _root.piratef) {
nT = _root.pirateb;
_root.teamType = "human";
}
}
}
finishOFF();
}
function dT() {
if (_root.previousTurn == _root.pirate) {
nT = _root.pirateb;
_root.teamType = "human";
}
if (_root.previousTurn == _root.pirateb) {
nT = _root.piratec;
_root.teamType = "human";
}
if (_root.previousTurn == _root.piratec) {
nT = _root.pirated;
_root.teamType = "human";
}
if (_root.previousTurn == _root.pirated) {
nT = _root.piratee;
_root.teamType = "human";
}
if (_root.previousTurn == _root.piratee) {
nT = _root.piratef;
_root.teamType = "human";
}
if (_root.previousTurn == _root.piratef) {
nT = _root.pirate;
_root.teamType = "human";
}
doIt();
_root.changeTurn = true;
_root.whosOn = nT;
}
function doIt() {
if ((((((_root.attention == _root.pirate) or (_root.attention == _root.pirateb)) or (_root.attention == _root.piratec)) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratee)) or (_root.attention == _root.piratef)) {
finishOFF();
} else {
startTimer = true;
if (!(_root.selectedMap === "Indirect Fight")) {
talkBad();
}
}
}
function finishOFF() {
powerUpChance++;
if ((_root.previousTurn.shotNumber > 0) and (!(_root.previousTurn.shotNumber === _root.maxSGShots))) {
nT = _root.previousTurn;
_root.teamType = "human";
}
weaponChance = random(8);
if (weaponChance == 0) {
choise = "cannon";
}
if (weaponChance == 1) {
choise = "toySoldier";
}
if (weaponChance == 2) {
choise = "rottenRations";
}
if (weaponChance == 3) {
choise = "anchor";
}
if (weaponChance == 4) {
choise = "beachball";
}
if (weaponChance == 5) {
choise = "anchor";
}
if (weaponChance == 6) {
choise = "cannon";
}
if (weaponChance == 7) {
choise = "cannon";
}
if (_root.teamType == "CPU") {
nT.weaponOut = choise;
}
if (_root.teamType == "human") {
if (nT.shotNumber == 0) {
nT.weaponOut = "cannon";
}
if ((nT.weaponOut == "homingMissile1") or (_root.turn.weaponOut == "airStrike1")) {
nT.weaponOut = "cannon";
}
}
_root.target = undefined;
_root.InGameCursor.gotoAndStop(1);
if ((nT.shotNumber == 0) or (nT.shotNumber == undefined)) {
if ((!(nT.weaponOut === "Swap Go")) or (!(_root.turn.weaponOut === "Swap Go"))) {
_root.turnTime = _root.startTime;
_root.fakeTime = _root.startTime;
}
}
_root.attention = nT;
_root.turn = nT;
nT.jump = false;
nT.FIRENOW = false;
tellTarget (nT) {
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
};
tellTarget (_root.statistics.counter) {
resetTime = getTimer() + delay;
};
if (_root.statistics.WM._currentframe == 3) {
_root.statistics.WM.gotoAndStop(4);
}
_root.goldCounter++;
}
function makePowerUp() {
meh = random(81910);
var _local2 = "powerUp" + meh;
_root.attachMovie("PowerUp", _local2, meh);
_root[_local2]._y - 200;
_root[_local2]._x = Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin;
}
function talkBad() {
soundChance = random(10);
if (soundChance == 2) {
YaMissed.start();
}
if (soundChance == 7) {
YCTAS.start();
}
if (soundChance == 4) {
YNAEP.start();
}
}
Gamemusic = new Sound(_root.MENUMUSICMC);
Gamemusic.attachSound("The Tragic Prince");
Gamemusic.start(0, 999);
chooseMap();
if (_root.selectedMap == "Wet Weather") {
Mapnumber = 1;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "The Moon") {
Mapnumber = 2;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "PegLeg Island") {
Mapnumber = 3;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Artic Fight") {
Mapnumber = 4;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Indirect Fight") {
Mapnumber = 5;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Music Room") {
Mapnumber = 6;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Movie Theatre") {
Mapnumber = 7;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Ghost Ship") {
Mapnumber = 8;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Big Ben") {
Mapnumber = 9;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
if (_root.selectedMap == "Pirate Bay") {
Mapnumber = 10;
bg.gotoAndStop(Mapnumber);
back_bg.gotoAndStop(Mapnumber);
}
_root.minFall = 1;
startTimer = false;
_root.startTime = _root.turnTime;
_root.maxSGShots = 2;
_root.goldCounter = 0;
powerUpChance = 0;
turnDelay = 20;
swapTurnTimeDelay = 0;
_root.graveDepth = 80000 /* 0x013880 */;
_root.deathHealth = 0;
startChance = random(2);
startTurn = _root.pirate;
_root.teamType = "human";
_root.whosOn = startTurn;
_root.attention = startTurn;
nT = startTurn;
_root.changeTurn = true;
_root.turn = startTurn;
_root.gravity = 2;
_root.onEnterFrame = function () {
if (startTimer) {
swapTurnTimeDelay++;
if (swapTurnTimeDelay > turnDelay) {
finishOFF();
startTimer = false;
swapTurnTimeDelay = 0;
}
}
};
randomXPosMin = 0;
randomXPosMax = 1800;
if (_root.selectedMap == "Movie Theatre") {
randomXPosMin = -200;
randomXPosMax = 1200;
}
if (_root.selectedMap == "Ghost Ship") {
randomXPosMin = -300;
randomXPosMax = 1000;
}
if (_root.selectedMap == "Big Ben") {
randomXPosMin = -100;
randomXPosMax = 700;
}
FLAGWAVE.start();
_root.killAll = false;
Instance of Symbol 1785 MovieClip "IFButton" in Frame 102
onClipEvent (load) {
function addExplosion() {
this.gotoAndStop(2);
if (_root.turn == _root.pirate) {
target = _root.bg.water.w2;
}
if (_root.turn == _root.pirateb) {
target = _root.bg.water.w1;
}
if (_root.turn == _root.piratec) {
target = _root.bg.water.w2;
}
if (_root.turn == _root.pirated) {
target = _root.bg.water.w1;
}
if (_root.turn == _root.piratee) {
target = _root.bg.water.w2;
}
if (_root.turn == _root.piratef) {
target = _root.bg.water.w1;
}
target.goUp();
_root.dT();
_root.metalTankJump.start();
}
if (_root.selectedMap == "Indirect Fight") {
_visible = true;
} else {
_visible = false;
}
_root.IFC1 = 0;
_root.IFC2 = 0;
}
Instance of Symbol 1617 MovieClip "cam" in Frame 102
onClipEvent (load) {
if (_root.selectedMap == "Indirect Fight") {
Motion = 5;
} else {
Motion = 7;
}
scrollTarget = ["bg", "back_bg", "pirate", "pirateb", "piratec", "pirated", "piratee", "piratef", "InGameCursor", "s1", "s2", "s3", "s4", "s5", "s6", "blackWilderness", "IFButton", "IFW1H", "IFW2H"];
}
onClipEvent (enterFrame) {
distanceX = Math.round(_x - _root.attention._x);
distanceY = Math.round(_y - _root.attention._y);
for (i in scrollTarget) {
_parent[scrollTarget[i]]._x = _parent[scrollTarget[i]]._x + (distanceX / Motion);
_parent[scrollTarget[i]]._y = _parent[scrollTarget[i]]._y + (distanceY / Motion);
}
_root.distanceX = distanceX / Motion;
_root.distanceY = distanceY / Motion;
}
Instance of Symbol 1657 MovieClip "s1" in Frame 102
onClipEvent (load) {
target = _root.pirate;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s2" in Frame 102
onClipEvent (load) {
target = _root.pirateb;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s3" in Frame 102
onClipEvent (load) {
target = _root.piratec;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s4" in Frame 102
onClipEvent (load) {
target = _root.pirated;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1648 MovieClip "piratec" in Frame 102
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
walkCounter = 0;
if (!(_root.matchedTeam1.theme === undefined)) {
theme = _root.matchedTeam1.theme;
}
hatchance = _root.matchedTeam1.hatchance;
lefthairchance = _root.matchedTeam1.lefthairchance;
lefteyechance = _root.matchedTeam1.lefteyechance;
beardchance = _root.matchedTeam1.beardchance;
lefthandchance = _root.matchedTeam1.lefthandchance;
righthandchance = _root.matchedTeam1.righthandchance;
legchance = _root.matchedTeam1.legchance;
colour = _root.matchedTeam1.colour;
grave = _root.matchedTeam1.grave;
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
if (_root.selectedMap == "Indirect Fight") {
_x = -164.6;
_y = 150;
enemies = ["IFButton"];
}
if (_root.selectedMap == "Pirate Bay") {
xChance = random(2);
if (xChance == 0) {
bayX = -300;
bayY = -20;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
if (xChance == 1) {
bayX = 1400;
bayY = 2300;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirateb", "pirated", "piratef"];
}
FIRENOW = false;
teamName = _root.matchedTeam1.name;
firstDeath = true;
alive = true;
name = _root.matchedTeam1.p2;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team2Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team1Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
_root.previousTurn = this;
fallDamage = yvel / 5;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team2Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = (("airStrike1" + bc) + random(200));
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(400));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1648 MovieClip "pirate" in Frame 102
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
walkCounter = 0;
if (!(_root.matchedTeam1.theme === undefined)) {
theme = _root.matchedTeam1.theme;
}
hatchance = _root.matchedTeam1.hatchance;
lefthairchance = _root.matchedTeam1.lefthairchance;
lefteyechance = _root.matchedTeam1.lefteyechance;
beardchance = _root.matchedTeam1.beardchance;
lefthandchance = _root.matchedTeam1.lefthandchance;
righthandchance = _root.matchedTeam1.righthandchance;
legchance = _root.matchedTeam1.legchance;
colour = _root.matchedTeam1.colour;
grave = _root.matchedTeam1.grave;
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
FIRENOW = false;
teamName = _root.matchedTeam1.name;
firstDeath = true;
if (_root.selectedMap == "Indirect Fight") {
_x = -420;
_y = 40;
enemies = ["IFButton"];
}
if (_root.selectedMap == "Pirate Bay") {
xChance = random(2);
if (xChance == 0) {
bayX = -300;
bayY = -20;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
if (xChance == 1) {
bayX = 1400;
bayY = 2300;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirateb", "pirated", "piratef"];
}
alive = true;
name = _root.matchedTeam1.p1;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (_root.maxFall == undefined) {
_root.maxFall = 2;
}
if (_root.gravity == 2) {
_root.maxFall = _root.ExplosionStrength;
}
if (_root.gravity < 2) {
_root.maxFall = 1;
}
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team2Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team1Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
_root.previousTurn = this;
fallDamage = yvel / 5;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team2Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = (("airStrike1" + bc) + random(200));
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(400));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1648 MovieClip "pirateb" in Frame 102
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
walkCounter = 0;
if (!(_root.matchedTeam2.theme === undefined)) {
theme = _root.matchedTeam1.theme;
}
hatchance = _root.matchedTeam2.hatchance;
lefthairchance = _root.matchedTeam2.lefthairchance;
lefteyechance = _root.matchedTeam2.lefteyechance;
beardchance = _root.matchedTeam2.beardchance;
lefthandchance = _root.matchedTeam2.lefthandchance;
righthandchance = _root.matchedTeam2.righthandchance;
legchance = _root.matchedTeam2.legchance;
colour = _root.matchedTeam2.colour;
grave = _root.matchedTeam2.grave;
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
if (_root.selectedMap == "Indirect Fight") {
_x = 880;
_y = 230;
enemies = ["IFButton"];
}
if (_root.selectedMap == "Pirate Bay") {
xChance = random(2);
if (xChance == 0) {
bayX = -300;
bayY = -20;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
if (xChance == 1) {
bayX = 1400;
bayY = 2300;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
}
if (_root.selectedMap == "Pirate Bay") {
xChance = random(2);
if (xChance == 0) {
bayX = -300;
bayY = -20;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
if (xChance == 1) {
bayX = 1400;
bayY = 2300;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirate", "piratec", "piratee"];
}
FIRENOW = false;
teamName = _root.matchedTeam2.name;
firstDeath = true;
alive = true;
name = _root.matchedTeam2.p1;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team2Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
_root.previousTurn = this;
fallDamage = yvel / 5;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team1Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = ("airStrike1" + bc);
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(400));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1648 MovieClip "pirated" in Frame 102
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
walkCounter = 0;
if (!(_root.matchedTeam2.theme === undefined)) {
theme = _root.matchedTeam1.theme;
}
hatchance = _root.matchedTeam2.hatchance;
lefthairchance = _root.matchedTeam2.lefthairchance;
lefteyechance = _root.matchedTeam2.lefteyechance;
beardchance = _root.matchedTeam2.beardchance;
lefthandchance = _root.matchedTeam2.lefthandchance;
righthandchance = _root.matchedTeam2.righthandchance;
legchance = _root.matchedTeam2.legchance;
colour = _root.matchedTeam2.colour;
grave = _root.matchedTeam2.grave;
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
if (_root.selectedMap == "Indirect Fight") {
_x = 1140;
_y = 170;
enemies = ["IFButton"];
}
if (_root.selectedMap == "Pirate Bay") {
xChance = random(2);
if (xChance == 0) {
bayX = -300;
bayY = -20;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
if (xChance == 1) {
bayX = 1400;
bayY = 2300;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirate", "piratec", "piratee"];
}
FIRENOW = false;
teamName = _root.matchedTeam2.name;
firstDeath = true;
alive = true;
name = _root.matchedTeam2.p2;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team2Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
fallDamage = yvel / 5;
_root.previousTurn = this;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team1Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = ("airStrike1" + bc);
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(400));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1648 MovieClip "piratee" in Frame 102
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
walkCounter = 0;
if (!(_root.matchedTeam1.theme === undefined)) {
theme = _root.matchedTeam1.theme;
}
hatchance = _root.matchedTeam1.hatchance;
lefthairchance = _root.matchedTeam1.lefthairchance;
lefteyechance = _root.matchedTeam1.lefteyechance;
beardchance = _root.matchedTeam1.beardchance;
lefthandchance = _root.matchedTeam1.lefthandchance;
righthandchance = _root.matchedTeam1.righthandchance;
legchance = _root.matchedTeam1.legchance;
colour = _root.matchedTeam1.colour;
grave = _root.matchedTeam1.grave;
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
if (_root.selectedMap == "Indirect Fight") {
_x = 91;
_y = 230;
enemies = ["IFButton"];
}
if (_root.selectedMap == "Pirate Bay") {
xChance = random(2);
if (xChance == 0) {
bayX = -300;
bayY = -20;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
if (xChance == 1) {
bayX = 1400;
bayY = 2300;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirateb", "pirated", "piratef"];
}
FIRENOW = false;
teamName = _root.matchedTeam1.name;
firstDeath = true;
alive = true;
name = _root.matchedTeam1.p3;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team2Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team1Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
_root.previousTurn = this;
fallDamage = yvel / 5;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team2Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = (("airStrike1" + bc) + random(200));
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(400));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1648 MovieClip "piratef" in Frame 102
onClipEvent (load) {
function scroll() {
if (alive) {
if (_root.turn == this) {
if (_root.attention == this) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
}
}
}
}
}
if (alive) {
if (_root.attention == this) {
if (_root.turn == this) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
this.gotoAndStop(6);
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
}
}
function fireShotgun() {
if (weaponOut == "shotgun") {
if (okToFire) {
Bulletspeed = 100;
delete n;
var n = ("SGBullet" + bc);
_root.attachMovie("SGBullet", n, bc);
_root[n]._rotation = angle;
okToFire = false;
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
}
walkCounter = 0;
if (!(_root.matchedTeam2.theme === undefined)) {
theme = _root.matchedTeam1.theme;
}
hatchance = _root.matchedTeam2.hatchance;
lefthairchance = _root.matchedTeam2.lefthairchance;
lefteyechance = _root.matchedTeam2.lefteyechance;
beardchance = _root.matchedTeam2.beardchance;
lefthandchance = _root.matchedTeam2.lefthandchance;
righthandchance = _root.matchedTeam2.righthandchance;
legchance = _root.matchedTeam2.legchance;
colour = _root.matchedTeam2.colour;
grave = _root.matchedTeam2.grave;
misses = 0;
airResistance = 0.05;
shotNumber = 0;
okToFire = true;
if (_root.selectedMap == "Indirect Fight") {
_x = 1440;
_y = 30;
enemies = ["IFButton"];
}
if (_root.selectedMap == "Pirate Bay") {
xChance = random(2);
if (xChance == 0) {
bayX = -300;
bayY = -20;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
if (xChance == 1) {
bayX = 1400;
bayY = 2300;
_x = (Math.round(Math.random() * (bayY - bayX)) + bayX);
}
}
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (Math.round(Math.random() * (_root.randomXPosMax - _root.randomXPosMin)) + _root.randomXPosMin);
enemies = ["pirate", "piratec", "piratee"];
}
FIRENOW = false;
teamName = _root.matchedTeam2.name;
firstDeath = true;
alive = true;
name = _root.matchedTeam2.p3;
fallLimit = 55;
falling = false;
rate = 1;
this.health = _root.startHealth;
this.fakehealth = _root.startHealth;
maxShotPower = 45;
weaponOut = "cannon";
dir = 1;
angle = 0;
Bulletspeed = 0;
bc = _root.getNextHighestDepth();
fireallowed = false;
gravity = _root.gravity;
jumpamount = 20;
x = _xscale;
speed = 7;
flyspeed = 8;
if (_xscale == x) {
facing = "right";
}
if (_xscale == (-x)) {
facing = "right";
}
}
onClipEvent (enterFrame) {
gravity = _root.gravity;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
}
onClipEvent (enterFrame) {
if (health < 0) {
health = 0;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
if (_root.turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
return(undefined);
}
if (_root.team2Win) {
if (alive) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x + speed);
_xscale = x;
}
}
if (facing == "left") {
if (!(_root.selectedMap === "Indirect Fight")) {
_x = (_x - speed);
_xscale = (-x);
}
}
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (!alive) {
return(undefined);
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(13) and onfloor) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (Key.isDown(37) and onfloor) {
_xscale = (-x);
this.gotoAndStop(2);
xvel = -speed;
facing = "left";
dir = 2;
scroll();
} else if (Key.isDown(39) and onfloor) {
if (_root.turn == this) {
if (_root.attention == this) {
_xscale = x;
this.gotoAndStop(2);
xvel = speed;
facing = "right";
scroll();
dir = 1;
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
if (!_root.team1Win) {
yvel = yvel + gravity;
}
if (yvel >= fallLimit) {
if (_root.attention == this) {
if (_root.turn == this) {
if (alive) {
if (_currentframe == 5) {
fallDamage = yvel / 5;
_root.previousTurn = this;
this.gotoAndStop(6);
falling = true;
}
}
}
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
health = Math.round(health);
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (Key.isDown(32)) {
if (_root.turn == this) {
if (_root.attention == this) {
if (((((((weaponOut == "rottenRations") or (weaponOut == "toySoldier")) or (weaponOut == "anchor")) or (weaponOut == "shotgun")) or (weaponOut == "Skip Go")) or (weaponOut == "Surrender")) or (weaponOut == "Swap Go")) {
FIRENOW = true;
if (weaponOut == "Skip Go") {
_root.previousTurn = this;
_root.dT();
}
if (weaponOut == "Surrender") {
_root.team1Win = true;
}
if (weaponOut == "Swap Go") {
this.gotoAndStop(1);
_root.exchangeTurn();
}
}
}
}
if (_root.turn == this) {
if (_root.attention == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
maxShotPower = 45;
}
}
}
}
}
if (FIRENOW) {
if ((Bulletspeed > 0) and (_currentframe == 4)) {
if (weaponOut == "cannon") {
var n = ("bullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("bullet", n, bc);
_root[n]._rotation = angle;
}
if (weaponOut == "homingMissile1") {
var n = ("homingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("homingMissile1", n, bc);
_root[n].enemies = _parent[enemies];
_root[n].target = _root.target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRations" + bc);
Bulletspeed = 50;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("toySoldier" + bc);
_root.attachMovie("toySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("anchor" + bc);
Bulletspeed = maxShotPower + 20;
_root.attachMovie("anchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("beachball" + bc);
_root.attachMovie("beachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
if (weaponOut == "airStrike1") {
var n = ("airStrike1" + bc);
_root.attachMovie("airStrike1", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "airStrike2") {
var n = (("airStrike2" + bc) + random(400));
_root.attachMovie("airStrike2", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "djLocker") {
var n = ("djLocker" + bc);
_root.attachMovie("djLocker", n, bc);
_root[n].target = _root.target;
}
if (weaponOut == "Rum Bottle") {
var n = ("Rum Bottle" + bc);
_root.attachMovie("Rum Bottle", n, bc);
}
if (weaponOut == "Blackbeard") {
var n = ("Blackbeard" + bc);
_root.attachMovie("Blackbeard", n, bc);
_root[n].target = _root.target;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n]._y = _y - 80;
_root[n].parent = this;
if (!(weaponOut === "shotgun")) {
_root.attention = _root[n];
this.gotoAndStop(1);
}
_root.previousTurn = this;
_root[n].strength = Bulletspeed;
bc++;
Bulletspeed = -15;
FIRENOW = false;
}
}
if (yvel <= fallLimit) {
if (!_root.bg.hitTest(_x, _y + 50, true)) {
onfloor = false;
if (_root.turn == this) {
if (_currentframe == 2) {
_root.previousTurn = this;
this.gotoAndStop(5);
}
}
}
}
}
onClipEvent (keyUp) {
if (health > _root.deathHealth) {
if (alive) {
if (onfloor) {
if (_root.turn == this) {
if (Key.getCode() == 39) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (onfloor) {
if (alive) {
if (_root.turn == this) {
if (Key.getCode() == 37) {
this.gotoAndStop(1);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (_currentframe == 4) {
if (!(okToFire === false)) {
if (Key.getCode() == 32) {
FIRENOW = true;
}
}
}
}
}
}
Instance of Symbol 1657 MovieClip "s5" in Frame 102
onClipEvent (load) {
target = _root.piratee;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1657 MovieClip "s6" in Frame 102
onClipEvent (load) {
target = _root.piratef;
}
onClipEvent (enterFrame) {
this.name = target.name;
this.health = target.fakehealth;
team = target.colour;
this.nameHolder.name = target.name;
this.healthHolder.health = target.fakehealth;
_x = target._x;
_y = (target._y - 220);
if (!target.alive) {
_visible = false;
}
if (target._currentframe == 10) {
_visible = false;
}
}
Instance of Symbol 1810 MovieClip "statistics" in Frame 102
onClipEvent (load) {
var lTime = 0;
var frameCount = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(8)) {
trace("Turn is " add _root.turn);
trace("Camera is on " add _root.attention);
}
timesf = getTimer();
frameCount++;
if ((getTimer() - lTime) >= 1000) {
lTime = getTimer();
_root.fpsm = frameCount;
frameCount = 0;
}
_root.misscount = [_root.pirate.misses, _root.pirateb.misses, _root.piratec.misses, _root.pirated.misses, _root.piratee.misses, _root.piratef.misses];
_root.misscount.sortOn(_root.misscount, Array.NUMERIC);
}
Instance of Symbol 1780 MovieClip "InGameCursor" in Frame 102
onClipEvent (load) {
InUse = false;
}
onClipEvent (enterFrame) {
m = _root.statistics.getDepth();
i = this.getDepth();
if (m > i) {
this.swapDepths(_root.statistics);
}
}
Instance of Symbol 1781 MovieClip "gameCursor" in Frame 102
onClipEvent (load) {
InUse = false;
startTime = getTimer();
delay = 10000;
resetTime = getTimer() + delay;
_root.matchEnd = false;
}
onClipEvent (enterFrame) {
if (_root.InGameCursor.InUse) {
_visible = false;
} else {
_visible = true;
}
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
m = _root.statistics.getDepth();
i = this.getDepth();
if (m > i) {
this.swapDepths(_root.statistics);
}
}
onClipEvent (enterFrame) {
if (!_root.team1Win) {
if (!_root.team2Win) {
if (_root.statistics.YOUWIN._currentframe == 1) {
elapsedTime = getTimer() - startTime;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
_root.timer_txt = (((((hours + ":") + minutes) + ":") + seconds) + ":") + hundredths;
}
}
}
}
onClipEvent (enterFrame) {
if (getTimer() > resetTime) {
if (!_root.team1Win) {
if (!_root.team2Win) {
if (_root.statistics.YOUWIN._currentframe == 1) {
if (_root.matchEnd == false) {
_root.goldCounter++;
resetTime = getTimer() + delay;
}
}
}
}
}
}
Frame 103
Mouse.show();
_root.SFXMC.removeMovieClip();
_root.distanceX = undefined;
_root.distanceY = undefined;
_root.startHealth = 100;
_root.team1 = "Psycho";
_root.team2 = "CPU";
_root.startTime = 25;
_root.graveDepth = 80000 /* 0x013880 */;
_root.deathHealth = 0;
startChance = random(2);
startTurn = _root.pirate;
_root.teamType = "human";
_root.whosOn = startTurn;
attention = startTurn;
nT = startTurn;
_root.changeTurn = true;
_root.minFall = 1.5;
turn = startTurn;
_root.gravity = 2;
Instance of Symbol 1828 MovieClip "p2" in Frame 103
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1828 MovieClip in Frame 103
onClipEvent (enterFrame) {
_x = (_x + _root.SS);
}
Instance of Symbol 1829 MovieClip "1" in Frame 103
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
attention = this;
turn = this;
misses = 0;
flyspeed = 0.5;
weaponOut = "rottenRations";
airResistance = 0.05;
teamName = _root.team2;
x = _xscale;
easiestMode = 300;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
team = "red";
name = "Mr Sheen";
enemies = ["11", "12", "13", "14", "15"];
alive = true;
weaponOut = "cannon";
range = random(300) + 400;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 30;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = 1000;
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 0.5;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
_root.maxFall = 1.4;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
if (_x < 500) {
inrange = true;
}
}
onClipEvent (enterFrame) {
if (turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (alive) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
if (alive) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
maxPower = distance;
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (attention == this) {
if (turn == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("CPUbullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUbullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("CPUhomingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUhomingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRa99tions" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("CPUtoySoloidier" + bc);
_root.attachMovie("CPUtoySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("CPUanchoor" + bc);
_root.attachMovie("CPUanchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("CPUbeachbiall" + bc);
_root.attachMovie("CPUbeachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
_root[n]._height = 2;
_root[n]._width = 2;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
}
}
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1829 MovieClip "11" in Frame 103
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
attention = this;
turn = this;
misses = 0;
flyspeed = 0.5;
weaponOut = "rottenRations";
airResistance = 0.05;
teamName = _root.team2;
x = _xscale;
easiestMode = 300;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
team = "red";
name = "Mr Sheen";
enemies = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
alive = true;
weaponOut = "cannon";
range = random(300) + 400;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 30;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = 14000;
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 0.5;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
if (_x < 500) {
inrange = true;
}
}
onClipEvent (enterFrame) {
if (turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (alive) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
if (alive) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
maxPower = distance;
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (attention == this) {
if (turn == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("CPUbullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUbullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("CPUhomingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUhomingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRa99tions" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("CPUtoySoloidier" + bc);
_root.attachMovie("CPUtoySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("CPUanchoor" + bc);
_root.attachMovie("CPUanchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("CPUbeachbiall" + bc);
_root.attachMovie("CPUbeachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
_root[n]._height = 2;
_root[n]._width = 2;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
}
}
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1829 MovieClip "12" in Frame 103
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
attention = this;
turn = this;
misses = 0;
flyspeed = 0.5;
weaponOut = "rottenRations";
airResistance = 0.05;
teamName = _root.team2;
x = _xscale;
easiestMode = 300;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
team = "red";
name = "Mr Sheen";
enemies = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
alive = true;
weaponOut = "cannon";
range = random(300) + 400;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 30;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = 15000;
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 0.5;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
if (_x < 500) {
inrange = true;
}
}
onClipEvent (enterFrame) {
if (turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (alive) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
if (alive) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
maxPower = distance;
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (attention == this) {
if (turn == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("CPUbullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUbullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("CPUhomingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUhomingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRa99tions" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("CPUtoySoloidier" + bc);
_root.attachMovie("CPUtoySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("CPUanchoor" + bc);
_root.attachMovie("CPUanchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("CPUbeachbiall" + bc);
_root.attachMovie("CPUbeachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
_root[n]._height = 2;
_root[n]._width = 2;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
}
}
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1829 MovieClip "13" in Frame 103
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
attention = this;
turn = this;
misses = 0;
flyspeed = 0.5;
weaponOut = "rottenRations";
airResistance = 0.05;
teamName = _root.team2;
x = _xscale;
easiestMode = 300;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
team = "red";
name = "Mr Sheen";
enemies = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
alive = true;
weaponOut = "cannon";
range = random(300) + 400;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 30;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = 13000;
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 0.5;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
if (_x < 500) {
inrange = true;
}
}
onClipEvent (enterFrame) {
if (turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (alive) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
if (alive) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
maxPower = distance;
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (attention == this) {
if (turn == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("CPUbullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUbullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("CPUhomingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUhomingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRa99tions" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("CPUtoySoloidier" + bc);
_root.attachMovie("CPUtoySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("CPUanchoor" + bc);
_root.attachMovie("CPUanchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("CPUbeachbiall" + bc);
_root.attachMovie("CPUbeachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
_root[n]._height = 2;
_root[n]._width = 2;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
}
}
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1829 MovieClip "14" in Frame 103
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
attention = this;
turn = this;
misses = 0;
flyspeed = 0.5;
weaponOut = "rottenRations";
airResistance = 0.05;
teamName = _root.team2;
x = _xscale;
easiestMode = 300;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
team = "red";
name = "Mr Sheen";
enemies = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
alive = true;
weaponOut = "cannon";
range = random(300) + 400;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 30;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = 20000;
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 0.5;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
if (_x < 500) {
inrange = true;
}
}
onClipEvent (enterFrame) {
if (turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (alive) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
if (alive) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
maxPower = distance;
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (attention == this) {
if (turn == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("CPUbullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUbullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("CPUhomingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUhomingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRa99tions" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("CPUtoySoloidier" + bc);
_root.attachMovie("CPUtoySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("CPUanchoor" + bc);
_root.attachMovie("CPUanchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("CPUbeachbiall" + bc);
_root.attachMovie("CPUbeachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
_root[n]._height = 2;
_root[n]._width = 2;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
}
}
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1829 MovieClip "2" in Frame 103
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
attention = this;
turn = this;
misses = 0;
flyspeed = 0.5;
weaponOut = "rottenRations";
airResistance = 0.05;
teamName = _root.team2;
x = _xscale;
easiestMode = 300;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
team = "red";
name = "Mr Sheen";
enemies = ["11", "12", "13", "14", "15"];
alive = true;
weaponOut = "cannon";
range = random(300) + 400;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 30;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = 2000;
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 0.5;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
_root.maxFall = 1.4;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
if (_x < 500) {
inrange = true;
}
}
onClipEvent (enterFrame) {
if (turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (alive) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
if (alive) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
maxPower = distance;
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (attention == this) {
if (turn == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("CPUbullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUbullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("CPUhomingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUhomingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("CPUrottenRations" + bc);
Bulletspeed = 40;
_root.attachMovie("CPUrottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("CPUtoySoloidier" + bc);
_root.attachMovie("CPUtoySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("CPUanchoor" + bc);
_root.attachMovie("CPUanchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("CPUbeachbiall" + bc);
_root.attachMovie("CPUbeachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
_root[n]._height = 2;
_root[n]._width = 2;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
}
}
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1829 MovieClip "3" in Frame 103
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
attention = this;
turn = this;
misses = 0;
flyspeed = 0.5;
weaponOut = "rottenRations";
airResistance = 0.05;
teamName = _root.team2;
x = _xscale;
easiestMode = 300;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
team = "red";
name = "Mr Sheen";
enemies = ["11", "12", "13", "14", "15"];
alive = true;
weaponOut = "cannon";
range = random(300) + 400;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 30;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = 3000;
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 0.5;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
_root.maxFall = 1.4;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
if (_x < 500) {
inrange = true;
}
}
onClipEvent (enterFrame) {
if (turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (alive) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
if (alive) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
maxPower = distance;
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (attention == this) {
if (turn == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("CPUbullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUbullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("CPUhomingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUhomingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("CPUrottenRations" + bc);
Bulletspeed = 40;
_root.attachMovie("CPUrottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("CPUtoySoloidier" + bc);
_root.attachMovie("CPUtoySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("CPUanchoor" + bc);
_root.attachMovie("CPUanchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("CPUbeachbiall" + bc);
_root.attachMovie("CPUbeachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
_root[n]._height = 2;
_root[n]._width = 2;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
}
}
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1829 MovieClip "4" in Frame 103
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
attention = this;
turn = this;
misses = 0;
flyspeed = 0.5;
weaponOut = "rottenRations";
airResistance = 0.05;
teamName = _root.team2;
x = _xscale;
easiestMode = 300;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
team = "red";
name = "Mr Sheen";
enemies = ["11", "12", "13", "14", "15"];
alive = true;
weaponOut = "cannon";
range = random(300) + 400;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 30;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = 4000;
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 0.5;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
_root.maxFall = 1.4;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
if (_x < 500) {
inrange = true;
}
}
onClipEvent (enterFrame) {
if (turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (alive) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
if (alive) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
maxPower = distance;
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (attention == this) {
if (turn == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("CPUbullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUbullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("CPUhomingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUhomingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("CPUrottenRations" + bc);
Bulletspeed = 40;
_root.attachMovie("CPUrottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("CPUtoySoloidier" + bc);
_root.attachMovie("CPUtoySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("CPUanchoor" + bc);
_root.attachMovie("CPUanchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("CPUbeachbiall" + bc);
_root.attachMovie("CPUbeachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
_root[n]._height = 2;
_root[n]._width = 2;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
}
}
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1829 MovieClip "5" in Frame 103
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
attention = this;
turn = this;
misses = 0;
flyspeed = 0.5;
weaponOut = "rottenRations";
airResistance = 0.05;
teamName = _root.team2;
x = _xscale;
easiestMode = 300;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
team = "red";
name = "Mr Sheen";
enemies = ["11", "12", "13", "14", "15"];
alive = true;
weaponOut = "cannon";
range = random(300) + 400;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 30;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = 5000;
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 0.5;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
_root.maxFall = 1.4;
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
if (_x < 500) {
inrange = true;
}
}
onClipEvent (enterFrame) {
if (turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (alive) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
if (alive) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
maxPower = distance;
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (attention == this) {
if (turn == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("CPUbullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUbullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("CPUhomingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUhomingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("CPUrottenRations" + bc);
Bulletspeed = 40;
_root.attachMovie("CPUrottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("CPUtoySoloidier" + bc);
_root.attachMovie("CPUtoySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("CPUanchoor" + bc);
_root.attachMovie("CPUanchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("CPUbeachbiall" + bc);
_root.attachMovie("CPUbeachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
_root[n]._height = 2;
_root[n]._width = 2;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
}
}
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1829 MovieClip "15" in Frame 103
onClipEvent (load) {
function scroll() {
if (alive) {
if (health > _root.deathHealth) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
_x = (_x - speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
if (health > _root.deathHealth) {
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
if (onfloor) {
this.gotoAndStop(2);
}
}
}
}
}
}
function scrollGeneral() {
if (alive) {
if (!_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (facing == "left") {
this.gotoAndStop(6);
_x = (_x + (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = (-x);
}
}
}
if (alive) {
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
this.gotoAndStop(6);
_x = (_x - (flyspeed * _root.ExplosionStrength));
if (flyspeed > 0) {
flyspeed = flyspeed - airResistance;
}
_xscale = x;
}
}
}
}
function addExplosion() {
if (alive) {
scrollGeneral();
jump = true;
onfloor = false;
heightUp = Math.round(Math.random() * (_root.maxFall - _root.minFall)) + _root.minFall;
yvel = (-jumpamount) * heightUp;
this.gotoAndStop(6);
}
}
attention = this;
turn = this;
misses = 0;
flyspeed = 0.5;
weaponOut = "rottenRations";
airResistance = 0.05;
teamName = _root.team2;
x = _xscale;
easiestMode = 300;
hardestMode = 100;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
team = "red";
name = "Mr Sheen";
enemies = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
alive = true;
weaponOut = "cannon";
range = random(300) + 400;
rate = 1;
fallLimit = 55;
falling = false;
this.fakehealth = _root.startHealth;
this.health = _root.startHealth;
_root.ExplosionStrength = 0;
maxShotPower = 30;
Bulletspeed = 0;
hdf = false;
rand = random(10) + 10;
resetTime = getTimer() + delay;
inrange = false;
delay = 4000;
dir = 1;
angle = 0;
bc = 204000 /* 0x031CE0 */;
fireallowed = false;
friction = 2;
airresist = 1;
gravity = _root.gravity;
jumpamount = 20;
speed = 0.5;
xvel = speed;
onfloor = true;
}
onClipEvent (enterFrame) {
while (this.hitTest(_root.back_bg.b1)) {
_x = (_x + speed);
}
while (this.hitTest(_root.back_bg.b2)) {
_x = (_x - speed);
}
if (_x < 500) {
inrange = true;
}
}
onClipEvent (enterFrame) {
if (turn == this) {
if (!_root.team1Win) {
if (!alive) {
_root.exchangeTurn();
}
}
}
if (health < 0) {
health = 0;
}
if (_root.bg.water.hitTest(_x, _y + 5, true)) {
_rotation = 0;
this.gotoAndStop(9);
alive = false;
}
if (this.fakehealth < health) {
fakehealth = fakehealth + rate;
}
if (this.fakehealth > health) {
fakehealth = fakehealth - rate;
}
}
onClipEvent (enterFrame) {
if (!alive) {
return(undefined);
}
if (_root.team2Win) {
this.gotoAndStop(10);
if (!_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
_x = (_x + speed);
_xscale = x;
}
if (facing == "left") {
_x = (_x - speed);
_xscale = (-x);
}
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
dirChance = random(3);
if (dirChance == 0) {
facing = facing;
}
if (dirChance == 1) {
facing = "left";
}
if (dirChance == 2) {
facing = "right";
}
jump = true;
onfloor = false;
yvel = -jumpamount;
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
}
return(undefined);
}
if (_parent[enemies[0]].alive == false) {
enemies.splice(0, 1);
}
if (_parent[enemies[1]].alive == false) {
enemies.splice(1, 1);
}
if (_parent[enemies[2]].alive == false) {
enemies.splice(2, 1);
}
if (alive) {
if (_x > target._x) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
_xscale = (-x);
dir = 2;
facing = "left";
}
}
}
}
if (alive) {
if (!(_currentframe === 6)) {
if (!(_currentframe === 7)) {
if (_x < target._x) {
_xscale = x;
dir = 1;
facing = "right";
}
}
}
}
health = Math.round(health);
for (i in enemies) {
if (_parent[enemies[0]].alive or (_parent[enemies[0]] == undefined)) {
_root.disa = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
}
if (_parent[enemies[1]].alive or (_parent[enemies[1]] == undefined)) {
_root.disb = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
}
if (_parent[enemies[2]].alive or (_parent[enemies[2]] == undefined)) {
_root.disc = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
}
}
if (!_parent[enemies[0]].alive) {
_root.disa = Infinity;
}
if (!_parent[enemies[1]].alive) {
_root.disb = Infinity;
}
if (!_parent[enemies[2]].alive) {
_root.disc = Infinity;
}
if (_root.disa < _root.disb) {
if (_root.disa < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[0]]._x) * (_x - _parent[enemies[0]]._x)) + ((_y - _parent[enemies[0]]._y) * (_y - _parent[enemies[0]]._y)));
target = _parent[enemies[0]];
}
}
if (_root.disb < _root.disa) {
if (_root.disb < _root.disc) {
distance = Math.sqrt(((_x - _parent[enemies[1]]._x) * (_x - _parent[enemies[1]]._x)) + ((_y - _parent[enemies[1]]._y) * (_y - _parent[enemies[1]]._y)));
target = _parent[enemies[1]];
}
}
if (_root.disc < _root.disa) {
if (_root.disc < _root.disb) {
distance = Math.sqrt(((_x - _parent[enemies[2]]._x) * (_x - _parent[enemies[2]]._x)) + ((_y - _parent[enemies[2]]._y) * (_y - _parent[enemies[2]]._y)));
target = _parent[enemies[2]];
}
}
maxPower = distance;
disy = _y - target._y;
if (disy >= range) {
inrange = true;
weaponOut = "homingMissile1";
}
if (distance < range) {
inrange = true;
} else if (!(weaponOut === "homingMissile1")) {
inrange = false;
}
if (!inrange) {
if ((dir == 2) and onfloor) {
scroll();
xvel = -speed;
facing = "left";
}
if (!inrange) {
if ((dir == 1) and onfloor) {
scroll();
xvel = speed;
facing = "right";
}
}
}
if (alive) {
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
if (!jump) {
if (facing == "left") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
if (alive) {
if (!jump) {
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
if (facing == "right") {
if (!inrange) {
jump = true;
onfloor = false;
yvel = -jumpamount;
this.gotoAndStop(5);
}
}
}
}
}
this._y = this._y + yvel;
if (!_root.bg.hitTest(_x, _y + 1, true)) {
yvel = yvel + gravity;
if (yvel >= fallLimit) {
if (turn == this) {
fallDamage = yvel / 6;
this.gotoAndStop(6);
falling = true;
}
}
} else {
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (_currentframe == 5) {
this.gotoAndStop(1);
}
if (_currentframe == 6) {
this.gotoAndStop(7);
}
}
onfloor = true;
yvel = 0;
}
if (Bulletspeed < 0) {
Bulletspeed++;
}
if (hdf) {
if (attention == this) {
if (turn == this) {
if (this._currentframe == 4) {
if (Bulletspeed <= maxShotPower) {
Bulletspeed = Bulletspeed + 5;
}
}
}
}
} else if (Bulletspeed > 0) {
if (weaponOut == "cannon") {
var n = ("CPUbullet" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUbullet", n, bc);
}
if (weaponOut == "homingMissile1") {
var n = ("CPUhomingMissile1" + bc);
Bulletspeed = Bulletspeed + 10;
_root.attachMovie("CPUhomingMissile1", n, bc);
_root[n].target = target;
_root[n].angle = angle;
_root[n].speed = Bulletspeed;
}
if (weaponOut == "rottenRations") {
var n = ("rottenRa99tions" + bc);
Bulletspeed = 40;
_root.attachMovie("rottenRations", n, bc);
_root[n].angle = angle;
_root[n].dir = facing;
}
if (weaponOut == "toySoldier") {
var n = ("CPUtoySoloidier" + bc);
_root.attachMovie("CPUtoySoldier", n, bc);
_root[n].dir = facing;
bc++;
}
if (weaponOut == "anchor") {
var n = ("CPUanchoor" + bc);
_root.attachMovie("CPUanchor", n, bc);
_root[n]._rotation = angle;
bc++;
}
if (weaponOut == "beachball") {
var n = ("CPUbeachbiall" + bc);
_root.attachMovie("CPUbeachball", n, bc);
_root[n]._rotation = angle;
_root[n].vyb = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
}
_root[n].vx = Math.sin(angle * (Math.PI/180)) * Bulletspeed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * Bulletspeed;
_root[n]._x = _x;
_root[n].strength = Bulletspeed;
_root[n]._y = _y;
_root[n].parent = this;
_root[n].strength = Bulletspeed;
_root.previousTurn = this;
_root[n]._height = 2;
_root[n]._width = 2;
if (weaponOut == "cannon") {
_root[n]._rotation = angle;
}
this.gotoAndStop(1);
bc++;
Bulletspeed = -15;
}
}
onClipEvent (enterFrame) {
_x = (_x - _root.SS);
}
Instance of Symbol 1849 MovieClip in Frame 103
onClipEvent (load) {
moveSpeed = 3;
}
onClipEvent (enterFrame) {
_y = (_y - moveSpeed);
if (_y < -2600) {
moveSpeed = 0;
this.gotoAndStop(2);
_y = 600;
}
}
Symbol 70 MovieClip [CPUrottenRations] Frame 1
function dWgH() {
trace(enemies[whois_hitting]);
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
gotoAndStop (3);
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
vx = vx * 0.95;
vy = vy + 0.8;
rad_rot = Math.atan2(vy, vx);
if (dir == "right") {
_rotation = (_rotation + 10);
}
if (dir == "left") {
_rotation = (_rotation - 10);
}
hit = false;
_x = (_x + vx);
_y = (_y + vy);
enemies = parent.enemies;
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
parent.misses++;
gotoAndStop (3);
}
_root.ExplosionStrength = 0.75;
Symbol 70 MovieClip [CPUrottenRations] Frame 2
gotoAndPlay (1);
Symbol 70 MovieClip [CPUrottenRations] Frame 3
function explode() {
i = 2;
while (i <= piecesofFood) {
var _local3 = "FoodMCHolder" + foodDepth;
_root.attachMovie("FoodMCHolder", _local3, foodDepth);
_root["CPUFoodMCHolder" + foodDepth]._x = _x;
_root["CPUFoodMCHolder" + foodDepth]._y = _y;
_root[_local3].enemies = enemies;
_root["CPUFoodMCHolder" + foodDepth]._xscale = 1;
_root["CPUFoodMCHolder" + foodDepth]._yscale = 1;
_root[_local3].parent = this;
if (foodsFired == Math.ceil(piecesofFood / 2)) {
if (!hit) {
_root.attention = _root[_local3];
}
}
foodDepth++;
time = 0;
foodsFired++;
i++;
}
}
_rotation = 180;
foodsFired = 0;
foodDepth = 2299;
enemies = parent.enemies;
piecesofFood = random(10) + 5;
explode();
piecesofFoodDestroyed = 0;
Symbol 86 MovieClip Frame 1
_root.InGameCursor.gotoAndStop(1);
Symbol 86 MovieClip Frame 18
stop();
if (_parent.parent.hit == true) {
swapDepths(0);
this.removeMovieClip();
}
Symbol 87 MovieClip [CPUhomingMissile1] Frame 1
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
fire = false;
rocketdelay = 40;
d = _root.d;
timewaited = 0;
_rotation = (angle + 90);
_root.ExplosionStrength = 3.5;
if (_x < target._x) {
dir = "right";
}
if (_x > target._x) {
dir = "left";
}
active = true;
g = 0;
time = 0;
enemies = parent.enemies;
hit = false;
speed = 5;
Symbol 87 MovieClip [CPUhomingMissile1] Frame 2
function dWgH() {
trace(enemies[whois_hitting]);
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
gotoAndStop (25);
}
if (Math.abs(speed) > 50) {
speed = speed * 0.7;
}
speed = speed * 0.98;
x = Math.sin(angle * (Math.PI/180)) * speed;
y = (Math.cos(angle * (Math.PI/180)) * speed) * -1;
_x = (_x + x);
_y = (_y + y);
timewaited++;
if (timewaited > rocketdelay) {
speed = speed - 3;
if (speed < 1) {
gotoAndPlay (20);
}
}
enemies = parent.enemies;
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
parent.misses++;
_root.dT();
gotoAndStop (25);
}
Symbol 87 MovieClip [CPUhomingMissile1] Frame 3
gotoAndPlay (2);
Symbol 87 MovieClip [CPUhomingMissile1] Frame 23
time++;
if (time > 300) {
active = false;
_y = (_y + g);
g++;
_rotation = (_rotation + 15);
}
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
parent.misses++;
gotoAndStop (25);
_root.dT();
}
if (_x < target._x) {
if (_y > target._y) {
dir = "right";
}
}
if (_x > target._x) {
if (_y > target._y) {
dir = "left";
}
}
dx = this._x - target._x;
dy = this._y - target._y;
radians = Math.atan2(dy, dx);
rot = (360 * radians) / (Math.PI*2);
if ((this._rotation >= (rot - 30)) && (this._rotation <= (rot + 30))) {
if (dir == "right") {
if (active) {
mRot = (-(this._rotation - rot)) / 8;
}
}
if (dir == "left") {
if (active) {
mRot = (this._rotation - rot) / 8;
}
}
} else if ((this._rotation <= (rot - 30)) && (this._rotation >= (rot - 90))) {
if (active) {
mRot = speed;
}
} else if ((this._rotation >= (rot + 30)) && (this._rotation <= (rot - 90))) {
if (active) {
mRot = -speed;
}
} else {
mRot = 8;
}
if (dir == "right") {
this._rotation = this._rotation + mRot;
}
if (dir == "left") {
this._rotation = this._rotation - mRot;
}
if (active) {
this._x = this._x - (Math.cos((this._rotation / 360) * (Math.PI*2)) * speed);
this._y = this._y - (Math.sin((this._rotation / 360) * (Math.PI*2)) * speed);
}
xdist = Math.round(target._x - this._x);
ydist = Math.round(target._y - this._y);
dist = Math.round(Math.sqrt((xdist * xdist) + (ydist * ydist)));
speed = 25 - (dist / 20);
if (speed < 40) {
speed = 40;
}
if (target == undefined) {
_xscale = 1000;
_yscale = 1000;
gotoAndStop (25);
}
Symbol 87 MovieClip [CPUhomingMissile1] Frame 24
gotoAndPlay(_currentframe - 1);
Symbol 87 MovieClip [CPUhomingMissile1] Frame 25
_root.rcursor.gotoAndStop(1);
root.target._visible = false;
_root.target = undefined;
_rotation = 0;
Instance of Symbol 91 MovieClip in Symbol 92 MovieClip Frame 1
onClipEvent (enterFrame) {
a2 = _parent._parent._parent._y - _root.attention._y;
b2 = _parent._parent._parent._x - _root.attention._x;
angleA2 = Math.atan2(a2, b2);
degrees2 = angleA2 / (Math.PI/180);
setProperty(this, _rotation , degrees2);
}
Instance of Symbol 91 MovieClip in Symbol 92 MovieClip Frame 1
onClipEvent (enterFrame) {
a2 = _parent._parent._parent._y - _root.attention._y;
b2 = _parent._parent._parent._x - _root.attention._x;
angleA2 = Math.atan2(a2, b2);
degrees2 = angleA2 / (Math.PI/180);
setProperty(this, _rotation , degrees2);
}
Instance of Symbol 91 MovieClip in Symbol 100 MovieClip Frame 1
onClipEvent (enterFrame) {
a2 = _parent._parent._y - _root.attention._y;
b2 = _parent._parent._x - _root.attention._x;
angleA2 = Math.atan2(a2, b2);
degrees2 = angleA2 / (Math.PI/180);
setProperty(this, _rotation , degrees2);
}
Symbol 108 MovieClip Frame 1
time = new Date();
seconds = time.getSeconds();
minutes = time.getMinutes();
hours = time.getHours();
hours = hours + (minutes / 60);
seconds = seconds * 6;
minutes = minutes * 6;
hours = hours * 30;
sec._rotation = seconds;
min._rotation = minutes;
hour._rotation = hours;
Symbol 114 MovieClip Frame 1
time = new Date();
var seconds = time.getSeconds();
var minutes = time.getMinutes();
var hours = time.getHours();
if (hours < 12) {
ampm = "AM";
} else {
ampm = "PM";
}
while (hours > 12) {
hours = hours - 12;
}
if (hours < 10) {
hours = hours;
}
if (minutes < 10) {
minutes = "0" + minutes;
}
if (seconds < 10) {
seconds = "0" + seconds;
}
clock_txt = (hours + ":") + minutes;
Symbol 114 MovieClip Frame 2
gotoAndPlay (1);
Symbol 136 MovieClip [Grave] Frame 1
stop();
m = 1;
i = _totalframes;
goTo = Math.round(Math.random() * (i - m)) + m;
gotoAndStop(goTo);
tombstone.name = name;
Instance of Symbol 98 MovieClip "tombstone" in Symbol 136 MovieClip [Grave] Frame 1
onClipEvent (load) {
this.name = name;
}
Symbol 136 MovieClip [Grave] Frame 2
stop();
Symbol 136 MovieClip [Grave] Frame 3
stop();
grave.tombof = tombof;
Instance of Symbol 108 MovieClip "grave" in Symbol 136 MovieClip [Grave] Frame 3
onClipEvent (enterFrame) {
if (_root.turn == tombof) {
_root.dT();
}
}
Symbol 136 MovieClip [Grave] Frame 4
stop();
Symbol 136 MovieClip [Grave] Frame 5
stop();
Symbol 136 MovieClip [Grave] Frame 6
stop();
Symbol 136 MovieClip [Grave] Frame 7
stop();
Symbol 136 MovieClip [Grave] Frame 8
stop();
Symbol 149 MovieClip Frame 6
stop();
if (_parent.parent.hit == true) {
swapDepths(0);
this.removeMovieClip();
}
Symbol 150 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 2
stop();
Symbol 150 MovieClip Frame 3
stop();
Symbol 150 MovieClip Frame 4
stop();
Symbol 150 MovieClip Frame 5
stop();
Symbol 150 MovieClip Frame 6
stop();
Symbol 150 MovieClip Frame 7
stop();
Symbol 150 MovieClip Frame 8
stop();
Symbol 150 MovieClip Frame 9
stop();
_rotation = 180;
Instance of Symbol 149 MovieClip in Symbol 150 MovieClip Frame 9
onClipEvent (load) {
time = 0;
}
onClipEvent (enterFrame) {
if (_parent.parent.hit == false) {
time++;
if (time > 50) {
if (_parent.parent.hit == false) {
_root.dT();
swapDepths(0);
this.removeMovieClip();
}
}
}
}
Symbol 151 MovieClip [CPUFoodMCHolder] Frame 1
_y = (_y - 50);
time = 0;
x = -5;
y = 5;
_x = ((_x + Math.round(Math.random() * (y - x))) + x);
minV = 5;
maxV = 20;
velocity = Math.round(Math.random() * (maxV - minV)) + minV;
gravity = 0.9;
go = true;
disperseRate = Math.round(Math.random() * (y - x)) + x;
r = random(10) + 10;
alive = true;
play();
damage = 2;
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
Instance of Symbol 150 MovieClip in Symbol 151 MovieClip [CPUFoodMCHolder] Frame 1
onClipEvent (load) {
x2 = 1;
y2 = 8;
frame = Math.round(Math.random() * (y2 - x2)) + x2;
this.gotoAndStop(frame);
minBig = 30;
maxBig = 60;
size = Math.round(Math.random() * (maxBig - minBig)) + minBig;
}
Symbol 151 MovieClip [CPUFoodMCHolder] Frame 2
function dWgH() {
parent.hit = true;
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
_root[enemies[whois_hitting]].health = _root[enemies[whois_hitting]].health - damage;
gotoAndStop (4);
}
time++;
_rotation = (_rotation + r);
_y = (_y - (velocity / gravity));
velocity--;
_x = (_x + disperseRate);
if (_root.bg.hitTest(_x, _y, true)) {
if (time > 10) {
parent.misses++;
gotoAndStop (4);
if (!(parent.hit === true)) {
parent.hit = false;
}
}
}
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
Symbol 151 MovieClip [CPUFoodMCHolder] Frame 3
gotoAndPlay (2);
Symbol 151 MovieClip [CPUFoodMCHolder] Frame 4
stop();
_rotation = 0;
Instance of Symbol 149 MovieClip in Symbol 151 MovieClip [CPUFoodMCHolder] Frame 4
onClipEvent (load) {
if (_parent.parent.AlreadyDone == undefined) {
_parent.parent.AlreadyDone = false;
}
time = 0;
delay = 70;
}
onClipEvent (enterFrame) {
if (_parent.parent.hit == false) {
time++;
if (time > delay) {
if (_parent.parent.hit == false) {
if (_parent.parent.AlreadyDone == false) {
_root.dT();
_parent.parent.AlreadyDone = true;
swapDepths(0);
this.removeMovieClip();
}
}
}
}
}
Symbol 160 MovieClip Frame 7
_parent.swapDepths(20);
_parent.removeMovieClip();
Symbol 161 MovieClip [CPUBullet] Frame 1
function dWgH() {
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
gotoAndStop (3);
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
if (hit == undefined) {
hit = false;
}
enemies = parent.enemies;
vx = vx * 0.98;
power = 1.2;
rad_rot = Math.atan2(vy, vx);
_root.ExplosionStrength = (power * strength) / 30;
vy = vy + 0.5;
_rotation = ((rad_rot / (Math.PI/180)) + 90);
_x = (_x + vx);
_y = (_y + vy);
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
hit = true;
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
if (!hit) {
parent.misses++;
_root.dT();
gotoAndStop (3);
}
}
Symbol 161 MovieClip [CPUBullet] Frame 2
gotoAndPlay (1);
Symbol 161 MovieClip [CPUBullet] Frame 3
stop();
Symbol 172 MovieClip Frame 18
if (_parent.hit) {
_parent.swapDepths(20);
_parent.removeMovieClip();
}
stop();
Symbol 173 MovieClip [CPUbeachball] Frame 1
function bounce() {
friction = 0.99;
onfloor = false;
vy = vyb * bounciness;
if (vyb < 30) {
vyb = vyb + 0.8;
}
if (vyb > 30) {
vy = 0;
}
}
function dWgH() {
gotoAndStop (3);
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
bounciness = 0.9;
if (hit == undefined) {
hit = false;
}
if (time == undefined) {
time = 0;
}
if (!(time === undefined)) {
time++;
}
if (time > 200) {
parent.misses++;
gotoAndStop (3);
}
if (vx >= 0) {
dir = "right";
}
if (vx <= 0) {
dir = "left";
}
if (vx >= 50) {
vx = 50;
}
if (vx <= -50) {
vx = -50;
}
friction = 0.99;
enemies = parent.enemies;
if (vx < 0) {
speed = -vx;
}
if (vx > 0) {
speed = vx;
}
power = 1.3;
vx = vx * friction;
if (dir == "left") {
_rotation = (_rotation - speed);
}
if (dir == "right") {
_rotation = (_rotation + speed);
}
_root.ExplosionStrength = (power * speed) / 20;
if (!_root.bg.hitTest(_x, _y, true)) {
vy = vy + 1;
onfloor = false;
}
if (this.hitTest(_root.bg.water)) {
parent.misses++;
gotoAndPlay (3);
hit = false;
}
_x = (_x + vx);
_y = (_y + vy);
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
hit = true;
}
}
if (_root.bg.hitTest(_x, _y, true)) {
onfloor = false;
bounce();
}
while (_root.bg.hitTest(_x, _y + 1, true)) {
if (vy > 0) {
onfloor = true;
}
this._y = this._y - 1;
}
if (onfloor) {
friction = 0.97;
if (ypos == undefined) {
ypos = parent._y;
}
ymoved = _y - ypos;
ypos = _y;
if (dir == "right") {
vx = vx + (ymoved / 8);
}
if (dir == "left") {
vx = vx - (ymoved / 8);
}
}
Symbol 173 MovieClip [CPUbeachball] Frame 2
gotoAndPlay (1);
Symbol 173 MovieClip [CPUbeachball] Frame 3
function dWgH() {
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
hit = true;
}
stop();
_rotation = 0;
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
Instance of Symbol 172 MovieClip in Symbol 173 MovieClip [CPUbeachball] Frame 3
onClipEvent (load) {
time = 0;
delay = 35;
}
onClipEvent (enterFrame) {
if (!_parent.hit) {
time++;
if (time > delay) {
_root.dT();
_parent.swapDepths(20);
_parent.removeMovieClip();
}
}
}
Symbol 175 MovieClip [CPUanchor] Frame 1
function dWgH() {
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
this.swapDepths(20);
this.removeMovieClip();
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
enemies = parent.enemies;
vx = vx * 0.9;
power = 2;
_root.ExplosionStrength = power + (strength / 100);
vy = vy + 1;
rad_rot = Math.atan2(vy, vx);
_rotation = ((rad_rot / (Math.PI/180)) + 90);
_x = (_x + (vx * 1.4));
_y = (_y + vy);
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
parent.misses++;
this.swapDepths(20);
_root.dT();
this.removeMovieClip();
}
Symbol 175 MovieClip [CPUanchor] Frame 2
gotoAndPlay (1);
Symbol 188 MovieClip [blackbeardblurr] Frame 1
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
_alpha = (_alpha - 5);
if (_alpha < 10) {
this.removeMovieClip();
}
Symbol 188 MovieClip [blackbeardblurr] Frame 2
gotoAndPlay (1);
Symbol 189 MovieClip [Blackbeard] Frame 1
function dWgH() {
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
_root[enemies[whois_hitting]].health = _root[enemies[whois_hitting]].health - damage;
_root.bbeard.stop();
this.removeMovieClip();
}
hit = false;
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
_x = (target._x - 1400);
_y = _root.target._y;
speed = 30;
enemies = parent.enemies;
time = 0;
_root.ExplosionStrength = 0;
damage = 1000;
bc = 583919 /* 0x08E8EF */;
m = 0;
_root.bbeard.start();
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.blackbeards--;
Symbol 189 MovieClip [Blackbeard] Frame 2
_x = (_x + speed);
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
hit = true;
_root.InGameCursor.gotoAndStop(1);
dWgH();
}
}
m++;
time++;
Symbol 189 MovieClip [Blackbeard] Frame 3
if (time > 100) {
if (!hit) {
_root.InGameCursor.gotoAndStop(1);
_root.dT();
_root.bbeard.stop();
this.removeMovieClip();
}
}
if (m == 6) {
var copy = ("blackbeardblurr" + bc);
_root.attachMovie("blackbeardblurr", copy, bc);
_root[copy]._x = _x - 10;
_root[copy]._y = _y;
bc++;
m = 0;
}
gotoAndPlay (2);
Symbol 191 MovieClip [Rum Bottle] Frame 1
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
parent.health = parent.health + 100;
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.rumBottles--;
_root.Holy.start();
_root.dT();
this.removeMovieClip();
Symbol 195 MovieClip [djLocker] Frame 1
function dWgH() {
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
_root[enemies[whois_hitting]].health = _root[enemies[whois_hitting]].health - 4;
hit = true;
}
function bounce() {
if (_xscale > 0) {
_xscale = (_xscale - 10);
}
if (_yscale > 0) {
_yscale = (_yscale - 10);
}
hits++;
_root.explode2.start();
friction = 0.99;
onfloor = false;
vy = vyb * bounciness;
if (vy < 0) {
_root.boing1.start();
}
if (vyb < 30) {
vyb = vyb + 5;
}
if (vyb > 30) {
vy = 0;
}
}
hits = 0;
_root.ExplosionStrength = 3.6;
_x = _root.target._x;
_y = -2000;
bounciness = 4;
vy = -15;
vyb = -15;
hit = false;
enemies = parent.enemies;
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.daveyJonesLockers--;
Symbol 195 MovieClip [djLocker] Frame 2
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
hit = true;
}
}
if (!_root.bg.hitTest(_x, _y, true)) {
vy = vy + 2;
onfloor = false;
}
_y = (_y + vy);
if (_root.bg.hitTest(_x, _y, true)) {
onfloor = false;
bounce();
}
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
}
if (_root.bg.hitTest(_x, _y + 1, true)) {
if (vy > 0) {
onfloor = true;
}
}
if (onfloor) {
friction = 0.97;
if (ypos == undefined) {
ypos = parent._y;
}
ymoved = _y - ypos;
ypos = _y;
}
if (_xscale < 10) {
if (_yscale < 10) {
if (!hit) {
_root.dT();
this.removeMovieClip();
}
}
}
if (_xscale < 10) {
if (_yscale < 10) {
this.removeMovieClip();
}
}
Symbol 195 MovieClip [djLocker] Frame 3
gotoAndPlay (2);
Symbol 214 MovieClip Frame 1
_root.explode2.start();
Symbol 214 MovieClip Frame 18
stop();
Symbol 215 MovieClip [parrot] Frame 1
function dWgH() {
parent.hit = true;
parent.target = _root[enemies[whois_hitting]];
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
_root[enemies[whois_hitting]].health = _root[enemies[whois_hitting]].health - damage;
gotoAndStop (4);
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
fire = false;
rocketdelay = 40;
d = _root.d;
timewaited = 0;
_rotation = (angle + 90);
_root.ExplosionStrength = 0.2;
if (_x < target._x) {
dir = "right";
}
if (_x > target._x) {
dir = "left";
}
active = true;
g = 0;
time = 0;
damage = 7;
maxSpeed = 28;
enemies = parent.enemies;
hit = false;
soundC = random(2);
if (soundC == 0) {
_root.parrot1.start();
}
if (soundC == 1) {
_root.parrot2.start();
}
Symbol 215 MovieClip [parrot] Frame 2
time++;
if (time > 300) {
active = false;
_y = (_y + g);
g++;
_rotation = (_rotation + 15);
}
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
if (_rotation > 90) {
if (dir == "right") {
_yscale = -100;
}
}
if (_rotation < 100) {
if (dir == "left") {
_yscale = 100;
}
}
if (_root.bg.hitTest(_x, _y, true)) {
parent.misses++;
gotoAndStop (4);
if (!(parent.hit === true)) {
parent.hit = false;
}
}
if (_x < target._x) {
if (_y > target._y) {
dir = "right";
}
}
if (_x > target._x) {
if (_y > target._y) {
dir = "left";
}
}
dx = this._x - target._x;
dy = this._y - target._y;
radians = Math.atan2(dy, dx);
rot = (360 * radians) / (Math.PI*2);
if ((this._rotation >= (rot - 30)) && (this._rotation <= (rot + 30))) {
if (dir == "right") {
if (active) {
mRot = (-(this._rotation - rot)) / 8;
}
}
if (dir == "left") {
if (active) {
mRot = (this._rotation - rot) / 8;
}
}
} else if ((this._rotation <= (rot - 30)) && (this._rotation >= (rot - 90))) {
if (active) {
mRot = speed;
}
} else if ((this._rotation >= (rot + 30)) && (this._rotation <= (rot - 90))) {
if (active) {
mRot = -speed;
}
} else {
mRot = 8;
}
if (dir == "right") {
this._rotation = this._rotation + mRot;
}
if (dir == "left") {
this._rotation = this._rotation - mRot;
}
if (active) {
this._x = this._x - (Math.cos((this._rotation / 360) * (Math.PI*2)) * speed);
this._y = this._y - (Math.sin((this._rotation / 360) * (Math.PI*2)) * speed);
}
xdist = Math.round(target._x - this._x);
ydist = Math.round(target._y - this._y);
dist = Math.round(Math.sqrt((xdist * xdist) + (ydist * ydist)));
speed = 25 - (dist / 20);
if (speed < maxSpeed) {
speed = maxSpeed;
}
target = parent.target;
Symbol 215 MovieClip [parrot] Frame 3
gotoAndPlay (2);
Symbol 215 MovieClip [parrot] Frame 4
stop();
Instance of Symbol 214 MovieClip in Symbol 215 MovieClip [parrot] Frame 4
onClipEvent (load) {
time = 0;
}
onClipEvent (enterFrame) {
if (_parent.parent.hit == false) {
time++;
trace(time);
if (time > 150) {
if (_parent.parent.hit == false) {
_root.dT();
_parent.parent.removeMovieClip();
swapDepths(0);
this.removeMovieClip();
}
}
}
}
Symbol 225 MovieClip [airStrike2] Frame 1
function fireBomb() {
var _local3 = "parrot" + bombDepth;
_root.attachMovie("parrot", _local3, bombDepth);
mB = _root[_local3] add middleBomb;
_root[_local3]._x = _x;
_root[_local3].parent = this;
_root[_local3]._y = _y + 90;
_root[_local3].enemies = enemies;
_root[_local3].target = target;
if (bombsFired == Math.ceil(bombs / 2)) {
_root.attention = _root[_local3];
}
bombDepth++;
time = 0;
bombsFired++;
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
if (target._y < -1000) {
_y = (target._y - 1000);
} else {
_y = -1000;
}
hit = false;
if (_root.CursorFacing == "right") {
_x = (target._x - 1400);
}
if (_root.CursorFacing == "left") {
_x = (target._x + 1400);
_xscale = -100;
}
rangeBarrier = 100;
speed = 30;
bombDepth = 1000000 /* 0x0F4240 */;
enemies = parent.enemies;
speed = 30;
bombTime = 5;
time = 0;
minBombs = 8;
maxBombs = 12;
bombs = Math.round(Math.random() * (maxBombs - minBombs)) + minBombs;
bombsFired = 0;
inrange = false;
timeElapsed = 0;
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.parrotStrikes--;
Symbol 225 MovieClip [airStrike2] Frame 2
if (_root.CursorFacing == "right") {
_x = (_x + speed);
}
if (_root.CursorFacing == "left") {
_x = (_x - speed);
}
time++;
distance = Math.ceil(_x - target._x);
if (_root.CursorFacing == "right") {
if (distance > (-rangeBarrier)) {
inrange = true;
}
}
if (_root.CursorFacing == "left") {
if (distance < rangeBarrier) {
inrange = true;
}
}
if (time >= bombTime) {
if (bombsFired < bombs) {
if (inrange) {
fireBomb();
}
}
}
timeElapsed++;
trace(timeElapsed);
if (timeElapsed > 7000) {
if (hit) {
trace("Parrot strike killled itself");
kill = true;
}
}
if (kill) {
trace("Parrot strike killled itself");
this.swapDepths(20003);
this.removeMovieClip();
}
Symbol 225 MovieClip [airStrike2] Frame 3
gotoAndPlay (2);
Symbol 227 MovieClip [rottenRations] Frame 1
function dWgH() {
trace(enemies[whois_hitting]);
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
gotoAndStop (3);
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
vx = vx * 0.98;
vy = vy + 1;
rad_rot = Math.atan2(vy, vx);
if (dir == "right") {
_rotation = (_rotation + 10);
}
if (dir == "left") {
_rotation = (_rotation - 10);
}
hit = false;
_x = (_x + vx);
_y = (_y + vy);
enemies = parent.enemies;
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
parent.misses++;
gotoAndStop (3);
}
_root.ExplosionStrength = 0.75;
if (bleh == undefined) {
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.rottenRations--;
bleh = false;
}
Symbol 227 MovieClip [rottenRations] Frame 2
gotoAndPlay (1);
Symbol 227 MovieClip [rottenRations] Frame 3
function explode() {
i = 2;
while (i <= piecesofFood) {
var _local3 = "FoodMCHolder" + foodDepth;
_root.attachMovie("FoodMCHolder", _local3, foodDepth);
_root["FoodMCHolder" + foodDepth]._x = _x;
_root["FoodMCHolder" + foodDepth]._y = _y;
_root[_local3].enemies = enemies;
_root[_local3].parent = this;
if (foodsFired == Math.ceil(piecesofFood / 2)) {
if (!hit) {
_root.attention = _root[_local3];
}
}
foodDepth++;
time = 0;
foodsFired++;
i++;
}
}
_rotation = 180;
foodsFired = 0;
foodDepth = 65638 /* 0x010066 */;
enemies = parent.enemies;
piecesofFood = random(40) + 20;
explode();
piecesofFoodDestroyed = 0;
_root.cannonFire.start();
Symbol 238 MovieClip Frame 1
_root.explode2.start();
_root.InGameCursor.gotoAndStop(1);
Symbol 238 MovieClip Frame 18
stop();
if (_parent.parent.hit) {
_parent.swapDepths(5900);
_parent.parent.removeMovieClip();
_parent.removeMovieClip();
}
Symbol 239 MovieClip [treasureChest] Frame 1
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
fall = 0;
rotateRate = 20;
_root.ExplosionStrength = 3;
damage = 15;
_root.bombFall.start();
Symbol 239 MovieClip [treasureChest] Frame 2
function dWgH() {
parent.hit = true;
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
_root[enemies[whois_hitting]].health = _root[enemies[whois_hitting]].health - damage;
parent.swapDepths(2894732);
parent.removeMovieClip();
gotoAndStop (4);
}
if (_root.bg.hitTest(_x, _y, true)) {
parent.misses++;
gotoAndStop (4);
if (!(parent.hit === true)) {
parent.hit = false;
}
}
_rotation = (_rotation + rotateRate);
_y = (_y + fall);
fall++;
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
Symbol 239 MovieClip [treasureChest] Frame 3
gotoAndPlay (2);
Symbol 239 MovieClip [treasureChest] Frame 4
stop();
_root.bombFall.stop();
Instance of Symbol 238 MovieClip in Symbol 239 MovieClip [treasureChest] Frame 4
onClipEvent (load) {
time = 0;
}
onClipEvent (enterFrame) {
if (_parent.parent.hit == false) {
time++;
if (time > 50) {
if (_parent.parent.hit == false) {
_root.dT();
_parent.parent.kill = true;
_parent.swapDepths(0);
_parent.removeMovieClip();
this.swapDepths(0);
this.removeMovieClip();
}
}
}
}
Symbol 252 MovieClip Frame 1
_root.windUp.start();
Symbol 253 MovieClip [toySoldier] Frame 1
function getLegHit(l, o) {
var _local3;
var _local2;
_local3 = Math.cos(((_rotation + o) * Math.PI) / 180) * l;
_local2 = Math.sin(((_rotation + o) * Math.PI) / 180) * l;
return(_root.bg.hitTest(_x + _local3, (_y + _local2) - 1, true));
}
function move(x, y) {
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * x));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * x));
if (!_root.bg.hitTest(_x, _y + y, true)) {
_y = (_y + y);
}
}
function dWgH() {
hit = true;
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
hit = true;
gotoAndStop (4);
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
speed = 6;
timeElapsed = 0;
hit = false;
_root.attention = this;
xvel = speed;
jumpAmount = 12;
_root.ExplosionStrength = 3.75;
x = _xscale;
xMin = -10;
xMax = 10;
yMin = -30;
yMax = 0;
timeWaited = 0;
deathTimeSec = 20;
deathTime = deathTimeSec * 1000;
b = this.getBounds(this);
enemies = parent.enemies;
timeCD = 8;
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.evilDolls--;
Symbol 253 MovieClip [toySoldier] Frame 2
timeElapsed = timeElapsed + 60;
if (timeElapsed >= deathTime) {
if (!hit) {
parent.misses++;
gotoAndStop (4);
hit = false;
}
}
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
hit = true;
dWgH();
}
}
if (_root.bg.hitTest((_x - xvel) - (_width / 2), _y - 40, true)) {
changeDirchance = random(4);
if (changeDirchance == 1) {
dir = "right";
}
_xscale = x;
if ((!jump) && (_root.bg.hitTest(_x, _y + 5, true))) {
jump = true;
vy = -jumpAmount;
}
}
if (_root.bg.hitTest((_x + xvel) + (_width / 2), _y - 40, true)) {
changeDirchance = random(4);
if (changeDirchance == 1) {
dir = "left";
}
_xscale = (-x);
if ((!jump) && (_root.bg.hitTest(_x, _y + 5, true))) {
jump = true;
vy = -jumpAmount;
}
}
move(0, 1);
jumpChance = random(120);
if (((jumpChance == 21) && (!jump)) && (_root.bg.hitTest(_x, _y + 5, true))) {
jump = true;
vy = -jumpAmount;
}
if (jump) {
move(0, -jumpAmount);
move(0, vy++);
if (vy > 10) {
jump = false;
}
}
if (!getLegHit(5, 90)) {
move(0, 10);
if ((_rotation + 4) <= 0) {
_rotation = (_rotation + 4);
} else if ((_rotation - 4) >= 360) {
_rotation = (_rotation - 4);
} else {
_rotation = 0;
}
}
if (dir == "right") {
_xscale = x;
if (!getLegHit(b.xMax + 5, -45)) {
if (getLegHit(5, 90)) {
if (getLegHit(b.xMax, 0)) {
_rotation = (_rotation - 4);
} else if (!getLegHit(b.xMax, 4)) {
_rotation = (_rotation + 4);
}
}
move(speed, 0);
}
}
if (dir == "left") {
_xscale = (-x);
if (!getLegHit(b.xMin - 5, 45)) {
if (getLegHit(5, 90)) {
if (getLegHit(b.xMin, 0)) {
_rotation = (_rotation + 4);
} else if (!getLegHit(b.Mmin, -4)) {
_rotation = (_rotation - 4);
}
}
}
move(-speed, 0);
}
Symbol 253 MovieClip [toySoldier] Frame 3
gotoAndPlay (2);
Symbol 253 MovieClip [toySoldier] Frame 4
stop();
_root.windUp.stop();
if (hit == false) {
_root.dT();
}
Symbol 255 MovieClip [SGBullet] Frame 1
function dWgH() {
parent.gotoAndStop(1);
_root[enemies[whois_hitting]].addExplosion();
_root[enemies[whois_hitting]].health = _root[enemies[whois_hitting]].health - damage;
_root.attention = _root[enemies[whois_hitting]];
if (parent.shotNumber >= maxShots) {
_root.previousTurn = parent;
parent.shotNumber = 0;
parent.gotoAndStop(1);
}
parent.okToFire = true;
this.removeMovieClip();
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
maxShots = _root.maxSGShots;
parent.shotNumber++;
if (parent.shotNumber < maxShots) {
_root.teamType = undefined;
_root.attention = parent;
_root.turn = parent;
}
if (parent.shotNumber >= maxShots) {
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.shotguns--;
_root.previousTurn = parent;
}
enemies = parent.enemies;
power = 0.55;
rad_rot = Math.atan2(vy, vx);
_root.ExplosionStrength = (power * strength) / 30;
damage = 20;
_rotation = ((rad_rot / (Math.PI/180)) + 90);
time = 0;
removeTime = 30;
_root.shotgunFire.start();
Symbol 255 MovieClip [SGBullet] Frame 2
time++;
if (time >= removeTime) {
if (parent.shotNumber >= maxShots) {
_root.previousTurn = parent;
_root.dT();
parent.gotoAndStop(1);
parent.shotNumber = 0;
}
parent.okToFire = true;
this.removeMovieClip();
}
_x = (_x + vx);
_y = (_y + vy);
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
parent.misses++;
parent.okToFire = true;
if (parent.shotNumber >= maxShots) {
_root.previousTurn = parent;
_root.dT();
parent.gotoAndStop(1);
parent.shotNumber = 0;
}
this.removeMovieClip();
}
Symbol 255 MovieClip [SGBullet] Frame 3
gotoAndPlay (2);
Symbol 261 MovieClip [homingMissile1] Frame 1
_root.explode3.start();
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
fire = false;
rocketdelay = 40;
d = _root.d;
timewaited = 0;
_rotation = (angle + 90);
_root.ExplosionStrength = 3.5;
if (_x < target._x) {
dir = "right";
}
if (_x > target._x) {
dir = "left";
}
active = true;
g = 0;
time = 0;
enemies = parent.enemies;
hit = false;
distance = Math.sqrt(((_x - target._x) * (_x - target._x)) + ((_y - target._y) * (_y - target._y)));
delay = distance;
resetTime = getTimer() + delay;
_root.missile.start();
distance = Math.sqrt(((_x - target._x) * (_x - target._x)) + ((_y - target._y) * (_y - target._y)));
delay = distance * 1.5;
timeWaited = timeWaited + 50;
if (timeWaited >= delay) {
_root.beep.start();
timeWaited = 0;
}
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.homingMissiles--;
Symbol 261 MovieClip [homingMissile1] Frame 2
function dWgH() {
trace(enemies[whois_hitting]);
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
gotoAndStop (25);
}
if (Math.abs(speed) > 50) {
speed = speed * 0.7;
}
speed = speed * 0.98;
x = Math.sin(angle * (Math.PI/180)) * speed;
y = (Math.cos(angle * (Math.PI/180)) * speed) * -1;
_x = (_x + x);
_y = (_y + y);
timewaited++;
if (timewaited > rocketdelay) {
speed = speed - 3;
if (speed < 1) {
gotoAndPlay (20);
}
}
enemies = parent.enemies;
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
parent.misses++;
_root.dT();
gotoAndStop (25);
}
_root.missile.start();
distance = Math.sqrt(((_x - target._x) * (_x - target._x)) + ((_y - target._y) * (_y - target._y)));
delay = distance * 1.5;
timeWaited = timeWaited + 50;
if (timeWaited >= delay) {
_root.beep.start();
timeWaited = 0;
}
Symbol 261 MovieClip [homingMissile1] Frame 3
gotoAndPlay (2);
Symbol 261 MovieClip [homingMissile1] Frame 23
time++;
if (time > 300) {
active = false;
_y = (_y + g);
g++;
_rotation = (_rotation + 15);
}
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
parent.misses++;
gotoAndStop (25);
_root.dT();
}
if (_x < target._x) {
if (_y > target._y) {
dir = "right";
}
}
if (_x > target._x) {
if (_y > target._y) {
dir = "left";
}
}
dx = this._x - target._x;
dy = this._y - target._y;
radians = Math.atan2(dy, dx);
rot = (360 * radians) / (Math.PI*2);
if ((this._rotation >= (rot - 30)) && (this._rotation <= (rot + 30))) {
if (dir == "right") {
if (active) {
mRot = (-(this._rotation - rot)) / 8;
}
}
if (dir == "left") {
if (active) {
mRot = (this._rotation - rot) / 8;
}
}
} else if ((this._rotation <= (rot - 30)) && (this._rotation >= (rot - 90))) {
if (active) {
mRot = speed;
}
} else if ((this._rotation >= (rot + 30)) && (this._rotation <= (rot - 90))) {
if (active) {
mRot = -speed;
}
} else {
mRot = 8;
}
if (dir == "right") {
this._rotation = this._rotation + mRot;
}
if (dir == "left") {
this._rotation = this._rotation - mRot;
}
if (active) {
this._x = this._x - (Math.cos((this._rotation / 360) * (Math.PI*2)) * speed);
this._y = this._y - (Math.sin((this._rotation / 360) * (Math.PI*2)) * speed);
}
xdist = Math.round(target._x - this._x);
ydist = Math.round(target._y - this._y);
dist = Math.round(Math.sqrt((xdist * xdist) + (ydist * ydist)));
speed = 25 - (dist / 20);
if (speed < 40) {
speed = 40;
}
distance = Math.sqrt(((_x - target._x) * (_x - target._x)) + ((_y - target._y) * (_y - target._y)));
delay = distance * 1.5;
timeWaited = timeWaited + 50;
if (timeWaited >= delay) {
_root.beep.start();
timeWaited = 0;
}
if (active) {
_root.missile.start();
}
Symbol 261 MovieClip [homingMissile1] Frame 24
distance = Math.sqrt(((_x - target._x) * (_x - target._x)) + ((_y - target._y) * (_y - target._y)));
delay = distance * 1.5;
timeWaited = timeWaited + 50;
if (timeWaited >= delay) {
_root.beep.start();
timeWaited = 0;
}
gotoAndPlay(_currentframe - 1);
Symbol 261 MovieClip [homingMissile1] Frame 25
_root.rcursor.gotoAndStop(1);
root.target._visible = false;
_root.target = undefined;
_rotation = 0;
_root.missile.stop();
Instance of Symbol 267 MovieClip in Symbol 268 MovieClip Frame 1
onClipEvent (enterFrame) {
a2 = _parent._parent._y - _root.attention._y;
b2 = _parent._parent._x - _root.attention._x;
angleA2 = Math.atan2(a2, b2);
degrees2 = angleA2 / (Math.PI/180);
setProperty(this, _rotation , degrees2);
}
Symbol 275 MovieClip Frame 1
time = new Date();
seconds = time.getSeconds();
minutes = time.getMinutes();
hours = time.getHours();
hours = hours + (minutes / 60);
seconds = seconds * 6;
minutes = minutes * 6;
hours = hours * 30;
sec._rotation = seconds;
min._rotation = minutes;
hour._rotation = hours;
Symbol 280 MovieClip Frame 1
time = new Date();
var seconds = time.getSeconds();
var minutes = time.getMinutes();
var hours = time.getHours();
if (hours < 12) {
ampm = "AM";
} else {
ampm = "PM";
}
while (hours > 12) {
hours = hours - 12;
}
if (hours < 10) {
hours = hours;
}
if (minutes < 10) {
minutes = "0" + minutes;
}
if (seconds < 10) {
seconds = "0" + seconds;
}
clock_txt = (hours + ":") + minutes;
Symbol 280 MovieClip Frame 2
gotoAndPlay (1);
Symbol 291 MovieClip [Grave] Frame 1
stop();
this.onEnterFrame = function () {
if (_root.killAll) {
this.removeMovieClip();
}
};
gotoAndStop(grave);
tombstone.name = name;
Instance of Symbol 265 MovieClip "tombstone" in Symbol 291 MovieClip [Grave] Frame 1
onClipEvent (load) {
this.name = name;
}
Symbol 291 MovieClip [Grave] Frame 2
stop();
Symbol 291 MovieClip [Grave] Frame 3
stop();
grave.tombof = tombof;
Instance of Symbol 275 MovieClip "grave" in Symbol 291 MovieClip [Grave] Frame 3
onClipEvent (enterFrame) {
if (_root.turn == tombof) {
_root.dT();
}
}
Symbol 291 MovieClip [Grave] Frame 4
stop();
Symbol 291 MovieClip [Grave] Frame 5
stop();
Symbol 291 MovieClip [Grave] Frame 6
stop();
Symbol 291 MovieClip [Grave] Frame 7
stop();
Symbol 291 MovieClip [Grave] Frame 8
stop();
Symbol 301 MovieClip Frame 6
stop();
if (_parent.parent.hit == true) {
swapDepths(0);
this.removeMovieClip();
}
Symbol 302 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 2
stop();
Symbol 302 MovieClip Frame 3
stop();
Symbol 302 MovieClip Frame 4
stop();
Symbol 302 MovieClip Frame 5
stop();
Symbol 302 MovieClip Frame 6
stop();
Symbol 302 MovieClip Frame 7
stop();
Symbol 302 MovieClip Frame 8
stop();
Symbol 302 MovieClip Frame 9
stop();
_rotation = 180;
Instance of Symbol 301 MovieClip in Symbol 302 MovieClip Frame 9
onClipEvent (load) {
time = 0;
}
onClipEvent (enterFrame) {
if (_parent.parent.hit == false) {
time++;
if (time > 50) {
if (_parent.parent.hit == false) {
_root.dT();
swapDepths(0);
this.removeMovieClip();
}
}
}
}
Symbol 303 MovieClip [FoodMCHolder] Frame 1
_y = (_y - 50);
time = 0;
x = -10;
y = 10;
_x = ((_x + Math.round(Math.random() * (y - x))) + x);
minV = 20;
maxV = 40;
velocity = Math.round(Math.random() * (maxV - minV)) + minV;
gravity = 2;
go = true;
disperseRate = Math.round(Math.random() * (y - x)) + x;
r = random(10) + 10;
alive = true;
play();
damage = 3;
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
Instance of Symbol 302 MovieClip in Symbol 303 MovieClip [FoodMCHolder] Frame 1
onClipEvent (load) {
x2 = 1;
y2 = 8;
frame = Math.round(Math.random() * (y2 - x2)) + x2;
this.gotoAndStop(frame);
minBig = 30;
maxBig = 60;
size = Math.round(Math.random() * (maxBig - minBig)) + minBig;
_xscale = size;
_yscale = size;
}
Symbol 303 MovieClip [FoodMCHolder] Frame 2
function dWgH() {
parent.hit = true;
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
_root[enemies[whois_hitting]].health = _root[enemies[whois_hitting]].health - damage;
gotoAndStop (4);
}
time++;
_rotation = (_rotation + r);
_y = (_y - (velocity / gravity));
velocity--;
_x = (_x + disperseRate);
if (_root.bg.hitTest(_x, _y, true)) {
if (time > 10) {
parent.misses++;
gotoAndStop (4);
if (!(parent.hit === true)) {
parent.hit = false;
}
}
}
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
Symbol 303 MovieClip [FoodMCHolder] Frame 3
gotoAndPlay (2);
Symbol 303 MovieClip [FoodMCHolder] Frame 4
soundChance = random(10);
if (soundChance == 0) {
_root.splat1.start();
}
if (soundChance == 3) {
_root.splat2.start();
}
if (soundChance == 6) {
_root.splat3.start();
}
if (soundChance == 9) {
_root.splat4.start();
}
stop();
_rotation = 0;
Instance of Symbol 301 MovieClip in Symbol 303 MovieClip [FoodMCHolder] Frame 4
onClipEvent (load) {
if (_parent.parent.AlreadyDone == undefined) {
_parent.parent.AlreadyDone = false;
}
time = 0;
delay = 70;
}
onClipEvent (enterFrame) {
if (_parent.parent.hit == false) {
time++;
if (time > delay) {
if (_parent.parent.hit == false) {
if (_parent.parent.AlreadyDone == false) {
trace("HAHAHAHAHA YOU MISSED EVERY SHOT");
_root.dT();
_parent.parent.AlreadyDone = true;
swapDepths(0);
this.removeMovieClip();
}
}
}
}
}
Symbol 307 MovieClip Frame 7
_parent.swapDepths(20);
_parent.removeMovieClip();
Symbol 308 MovieClip [bullet] Frame 1
function dWgH() {
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
gotoAndStop (3);
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
if (hit == undefined) {
hit = false;
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.cannons--;
}
enemies = parent.enemies;
vx = vx * 0.98;
power = 1.2;
rad_rot = Math.atan2(vy, vx);
_root.ExplosionStrength = (power * strength) / 30;
vy = vy + 1;
_rotation = ((rad_rot / (Math.PI/180)) + 90);
_x = (_x + vx);
_y = (_y + vy);
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
hit = true;
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
if (!hit) {
trace("Miss");
parent.misses++;
_root.dT();
gotoAndStop (3);
}
}
if (notDone == undefined) {
_root.cannonFire.start();
notDone = false;
}
Symbol 308 MovieClip [bullet] Frame 2
gotoAndPlay (1);
Symbol 308 MovieClip [bullet] Frame 3
stop();
if (!(_root.selectedMap === "Indirect Fight")) {
_root.explode1.start();
}
Symbol 319 MovieClip Frame 1
_root.explode2.start();
Symbol 319 MovieClip Frame 18
if (_parent.hit) {
_parent.swapDepths(20);
_parent.removeMovieClip();
}
stop();
Symbol 320 MovieClip [beachball] Frame 1
function bounce() {
friction = 0.99;
onfloor = false;
vy = vyb * bounciness;
if (vy < 0) {
_root.boing1.start();
}
if (vyb < 30) {
vyb = vyb + 5;
}
if (vyb > 30) {
vy = 0;
}
}
function dWgH() {
gotoAndStop (3);
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
bounciness = 0.9;
if (hit == undefined) {
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.beachballs--;
hit = false;
}
if (time == undefined) {
time = 0;
_root.explode1.start();
}
if (!(time === undefined)) {
time++;
}
if (time > 200) {
parent.misses++;
gotoAndStop (3);
}
if (vx >= 0) {
dir = "right";
}
if (vx <= 0) {
dir = "left";
}
if (vx >= 50) {
vx = 50;
}
if (vx <= -50) {
vx = -50;
}
friction = 0.99;
enemies = parent.enemies;
if (vx < 0) {
speed = -vx;
}
if (vx > 0) {
speed = vx;
}
power = 1.3;
vx = vx * friction;
if (dir == "left") {
_rotation = (_rotation - speed);
}
if (dir == "right") {
_rotation = (_rotation + speed);
}
_root.ExplosionStrength = (power * speed) / 20;
if (!_root.bg.hitTest(_x, _y, true)) {
vy = vy + 1;
onfloor = false;
}
if (this.hitTest(_root.bg.water)) {
parent.misses++;
gotoAndPlay (3);
hit = false;
}
if (this.hitTest(_root.bg.ceiling)) {
parent.misses++;
gotoAndPlay (3);
hit = false;
}
_x = (_x + vx);
_y = (_y + vy);
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
hit = true;
}
}
if (_root.bg.hitTest(_x, _y, true)) {
onfloor = false;
bounce();
}
while (_root.bg.hitTest(_x, _y + 1, true)) {
this._y = this._y - 1;
if (vy > 0) {
onfloor = true;
}
}
if (onfloor) {
friction = 0.97;
if (ypos == undefined) {
ypos = parent._y;
}
ymoved = _y - ypos;
ypos = _y;
if (dir == "right") {
vx = vx + (ymoved / 8);
}
if (dir == "left") {
vx = vx - (ymoved / 8);
}
}
Symbol 320 MovieClip [beachball] Frame 2
gotoAndPlay (1);
Symbol 320 MovieClip [beachball] Frame 3
function dWgH() {
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
hit = true;
}
stop();
_rotation = 0;
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
_root.boing1.start();
Instance of Symbol 319 MovieClip in Symbol 320 MovieClip [beachball] Frame 3
onClipEvent (load) {
time = 0;
delay = 35;
}
onClipEvent (enterFrame) {
if (!_parent.hit) {
time++;
if (time > delay) {
_root.dT();
_parent.swapDepths(20);
_parent.removeMovieClip();
}
}
}
Symbol 335 MovieClip Frame 7
this.swapDepths(20);
this.removeMovieClip();
Symbol 336 MovieClip [anchor] Frame 1
function dWgH() {
hit = true;
_root[enemies[whois_hitting]].addExplosion();
_root.attention = _root[enemies[whois_hitting]];
gotoAndStop (3);
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
enemies = parent.enemies;
vx = vx * 0.98;
power = 3.2;
_root.ExplosionStrength = power + (strength / 100);
vy = vy + 1;
rad_rot = Math.atan2(vy, vx);
_rotation = ((rad_rot / (Math.PI/180)) + 90);
_x = (_x + (vx * 1.4));
_y = (_y + vy);
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
if (_root.bg.hitTest(_x, _y, true)) {
if (_root.attention == this) {
if (!hit) {
parent.misses++;
_root.dT();
gotoAndStop (3);
}
}
}
if (notDone == undefined) {
_root.cannonFire.start();
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.anchors--;
notDone = false;
}
Symbol 336 MovieClip [anchor] Frame 2
gotoAndPlay (1);
Symbol 356 MovieClip [airStrike1] Frame 1
function fireBomb() {
var _local3 = "treasureChest" + bombDepth;
_root.attachMovie("treasureChest", _local3, bombDepth);
mB = _root[_local3] add middleBomb;
_root[_local3]._x = _x - dirAmount;
_root[_local3].parent = this;
_root[_local3]._y = _y + 90;
_root[_local3].enemies = enemies;
if (bombsFired == Math.ceil(bombs / 2)) {
_root.attention = _root[_local3];
}
bombDepth++;
time = 0;
bombsFired++;
}
hit = false;
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
if (target._y < -1000) {
_y = (target._y - 1000);
} else {
_y = -1000;
}
if (_root.CursorFacing == "right") {
_x = (target._x - 1400);
dirAmount = 220;
rangeBarrier = -150;
}
if (_root.CursorFacing == "left") {
_x = (target._x + 1400);
_xscale = -100;
dirAmount = -220;
rangeBarrier = -150;
}
speed = 30;
bombDepth = 1000000 /* 0x0F4240 */;
enemies = parent.enemies;
speed = 30;
bombTime = 3;
time = 0;
timeElapsed = 0;
minBombs = 2;
maxBombs = 5;
bombs = Math.round(Math.random() * (maxBombs - minBombs)) + minBombs;
bombsFired = 0;
inrange = false;
if (((parent == _root.pirate) or (parent == _root.piratec)) or (parent == _root.piratee)) {
quantityTarget = _root.team1Quantities;
}
if (((parent == _root.pirateb) or (parent == _root.pirated)) or (parent == _root.piratef)) {
quantityTarget = _root.team2Quantities;
}
quantityTarget.treasureStrikes--;
Symbol 356 MovieClip [airStrike1] Frame 2
if (_root.CursorFacing == "right") {
_x = (_x + speed);
}
if (_root.CursorFacing == "left") {
_x = (_x - speed);
}
time++;
distance = Math.ceil(_x - target._x);
if (_root.CursorFacing == "right") {
if (distance > (-rangeBarrier)) {
inrange = true;
}
}
if (_root.CursorFacing == "left") {
if (distance < rangeBarrier) {
inrange = true;
}
}
if (time >= bombTime) {
if (bombsFired < bombs) {
if (inrange) {
fireBomb();
}
}
}
timeElapsed++;
if (timeElapsed > 200) {
trace(timeElapsed);
kill = true;
}
if (kill) {
trace(":D");
this.swapDepths(20003);
this.removeMovieClip();
}
Symbol 356 MovieClip [airStrike1] Frame 3
gotoAndPlay (2);
Symbol 358 MovieClip [BOOMBALL] Frame 1
_xscale = random(100);
_yscale = _xscale;
deltaX = random(760);
deltaY = random(800);
angle = -Math.atan2(deltaX, deltaY);
xb = -50;
yb = 50;
xSpeed = Math.round(Math.random() * (yb - xb)) + xb;
x = -50;
y = 50;
ySpeed = Math.round(Math.random() * (y - x)) + x;
time = 0;
delay = 40;
Symbol 358 MovieClip [BOOMBALL] Frame 2
_x = (_x + xSpeed);
_y = (_y + ySpeed);
time++;
if (time >= delay) {
this.removeMovieClip();
}
Symbol 358 MovieClip [BOOMBALL] Frame 3
gotoAndPlay (2);
Instance of Symbol 360 MovieClip in Symbol 361 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_root.attention == _parent._parent) {
if (_parent._parent.onfloor) {
this.play();
if (active) {
_root.dT();
active = false;
}
} else {
this.stop();
}
}
}
Symbol 367 MovieClip [PowerUp] Frame 1
function dWgH() {
if (_root.attention == _root[enemies[whois_hitting]]) {
_root[enemies[whois_hitting]].health = _root[enemies[whois_hitting]].health + 50;
_root.Holy.start();
this.removeMovieClip();
}
}
function bounce() {
friction = 0.99;
onfloor = false;
vy = vyb * bounciness;
if (vy < 0) {
_root.boing1.start();
}
if (vyb < 30) {
vyb = vyb + 5;
}
if (vyb > 30) {
vy = 0;
}
}
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
};
stop();
bounciness = 2;
vy = -15;
vyb = -15;
enemies = ["pirate", "pirateb", "piratec", "pirated", "piratee", "piratef"];
this.onEnterFrame = function () {
_x = (_x + _root.distanceX);
_y = (_y + _root.distanceY);
if (!_root.bg.hitTest(_x, _y, true)) {
vy = vy + 2;
onfloor = false;
}
if (this.hitTest(_root.bg.water)) {
_root.dT();
onfloor = false;
this.removeMovieClip();
}
_y = (_y + vy);
if (_root.bg.hitTest(_x, _y, true)) {
onfloor = false;
bounce();
}
while (_root.bg.hitTest(_x, _y + 1, true)) {
if (vy > 0) {
onfloor = true;
}
this._y = this._y - 2;
}
if (onfloor) {
friction = 0.97;
if (ypos == undefined) {
ypos = parent._y;
}
ymoved = _y - ypos;
ypos = _y;
}
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
};
_root.attention = this;
Symbol 367 MovieClip [PowerUp] Frame 2
stop();
Symbol 398 MovieClip Frame 24
stop();
Symbol 413 MovieClip Frame 22
stop();
Symbol 425 MovieClip Frame 19
stop();
Symbol 436 MovieClip Frame 20
stop();
Symbol 449 MovieClip Frame 21
stop();
Symbol 460 MovieClip Frame 21
stop();
Instance of Symbol 398 MovieClip in Symbol 461 MovieClip Frame 1
onClipEvent (load) {
this.stop();
}
onClipEvent (enterFrame) {
if (_root.percent > 28) {
this.nextFrame();
}
}
Instance of Symbol 413 MovieClip in Symbol 461 MovieClip Frame 1
onClipEvent (load) {
this.stop();
}
onClipEvent (enterFrame) {
if (_root.percent > 42) {
this.nextFrame();
}
}
Instance of Symbol 425 MovieClip in Symbol 461 MovieClip Frame 1
onClipEvent (load) {
this.stop();
}
onClipEvent (enterFrame) {
if (_root.percent > 56) {
this.nextFrame();
}
}
Instance of Symbol 436 MovieClip in Symbol 461 MovieClip Frame 1
onClipEvent (load) {
this.stop();
}
onClipEvent (enterFrame) {
if (_root.percent > 70) {
this.nextFrame();
}
}
Instance of Symbol 449 MovieClip in Symbol 461 MovieClip Frame 1
onClipEvent (load) {
this.stop();
}
onClipEvent (enterFrame) {
if (_root.percent > 80) {
this.nextFrame();
}
}
Instance of Symbol 460 MovieClip in Symbol 461 MovieClip Frame 1
onClipEvent (load) {
this.stop();
}
onClipEvent (enterFrame) {
if (_root.percent > 90) {
this.nextFrame();
}
}
Symbol 464 MovieClip Frame 10
stop();
Symbol 468 MovieClip Frame 1
_xscale = _root.percent;
Symbol 468 MovieClip Frame 2
gotoAndPlay (1);
Symbol 473 MovieClip Frame 1
stop();
Symbol 474 MovieClip Frame 1
stop();
Instance of Symbol 473 MovieClip in Symbol 474 MovieClip Frame 2
on (release) {
edifjdoifjdof = new Sound(this);
edifjdoifjdof.attachSound("Cannon");
edifjdoifjdof.start();
_root.gotoAndStop("Logos");
}
Symbol 500 MovieClip Frame 115
_root.play();
Symbol 517 MovieClip Frame 30
_root.play();
Symbol 518 MovieClip Frame 28
function __com_mochibot__(swfid, mc, lv) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = ((((((((((("http://" + mbc) + "/my/core.swf?mv=5&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("330415da", this, 10301);
Symbol 518 MovieClip Frame 107
stop();
Symbol 527 MovieClip Frame 88
function checkSavedGame() {
saveGame();
_root.backButton.goBack = true;
_root.selectedTeam = undefined;
}
function saveGame() {
myLSO = SharedObject.getLocal("Pirates");
if (myLSO.data.myObj == undefined) {
_root.helpText = "New game File Created";
} else {
_root.helpText = "Game Data Overwritten";
}
myObj = {};
myObj.objArray = new Array();
myObj.objArray[0] = _root.teamListNumber;
myObj.objArray[1] = _root.unlocked;
myObj.objArray[2] = _root.gold;
myObj.objArray[3] = _root.soundsVolumePos;
myObj.objArray[4] = _root.musicVolumePos;
myObj.objArray[5] = _root.team1.name;
myObj.objArray[6] = _root.team1.p1;
myObj.objArray[7] = _root.team1.p2;
myObj.objArray[8] = _root.team1.p3;
myObj.objArray[9] = _root.team1.grave;
myObj.objArray[10] = _root.team1.lefteyechance;
myObj.objArray[11] = _root.team1.hatchance;
myObj.objArray[12] = _root.team1.beardchance;
myObj.objArray[13] = _root.team1.lefthandchance;
myObj.objArray[14] = _root.team1.righthandchance;
myObj.objArray[15] = _root.team1.lefthairchance;
myObj.objArray[16] = _root.team1.legchance;
myObj.objArray[17] = _root.team2.name;
myObj.objArray[18] = _root.team2.p1;
myObj.objArray[19] = _root.team2.p2;
myObj.objArray[20] = _root.team2.p3;
myObj.objArray[21] = _root.team2.grave;
myObj.objArray[22] = _root.team2.lefteyechance;
myObj.objArray[23] = _root.team2.hatchance;
myObj.objArray[24] = _root.team2.beardchance;
myObj.objArray[25] = _root.team2.lefthandchance;
myObj.objArray[26] = _root.team2.righthandchance;
myObj.objArray[27] = _root.team2.lefthairchance;
myObj.objArray[28] = _root.team2.legchance;
myObj.objArray[29] = _root.team3.name;
myObj.objArray[30] = _root.team3.p1;
myObj.objArray[31] = _root.team3.p2;
myObj.objArray[32] = _root.team3.p3;
myObj.objArray[33] = _root.team3.grave;
myObj.objArray[34] = _root.team3.lefteyechance;
myObj.objArray[35] = _root.team3.hatchance;
myObj.objArray[36] = _root.team3.beardchance;
myObj.objArray[37] = _root.team3.lefthandchance;
myObj.objArray[38] = _root.team3.righthandchance;
myObj.objArray[39] = _root.team3.lefthairchance;
myObj.objArray[40] = _root.team3.legchance;
myObj.objArray[41] = _root.team1.colour;
myObj.objArray[42] = _root.team2.colour;
myObj.objArray[43] = _root.team3.colour;
myObj.objArray[44] = _root.doneArrow;
myLSO.data.myObj = myObj;
}
function loadGame() {
myLSO = SharedObject.getLocal("Pirates");
if (myLSO.data.myObj == undefined) {
_root.helpText = "No Saved Game Found";
} else {
_root.helpText = "Game Loaded";
_root.teamListNumber = myLSO.data.myObj.objArray[0];
if (!(myLSO.data.myObj.objArray[1] === undefined)) {
_root.unlocked = myLSO.data.myObj.objArray[1];
}
if (!(myLSO.data.myObj.objArray[2] === undefined)) {
_root.gold = myLSO.data.myObj.objArray[2];
}
_root.soundsVolumePos = myLSO.data.myObj.objArray[3];
_root.musicVolumePos = myLSO.data.myObj.objArray[4];
_root.team1 = new Object();
_root.team1.name = myLSO.data.myObj.objArray[5];
_root.team1.p1 = myLSO.data.myObj.objArray[6];
_root.team1.p2 = myLSO.data.myObj.objArray[7];
_root.team1.p3 = myLSO.data.myObj.objArray[8];
_root.team1.grave = myLSO.data.myObj.objArray[9];
_root.team1.lefteyechance = myLSO.data.myObj.objArray[10];
_root.team1.hatchance = myLSO.data.myObj.objArray[11];
_root.team1.beardchance = myLSO.data.myObj.objArray[12];
_root.team1.lefthandchance = myLSO.data.myObj.objArray[13];
_root.team1.righthandchance = myLSO.data.myObj.objArray[14];
_root.team1.lefthairchance = myLSO.data.myObj.objArray[15];
_root.team1.legchance = myLSO.data.myObj.objArray[16];
_root.team2 = new Object();
_root.team2.name = myLSO.data.myObj.objArray[17];
_root.team2.p1 = myLSO.data.myObj.objArray[18];
_root.team2.p2 = myLSO.data.myObj.objArray[19];
_root.team2.p3 = myLSO.data.myObj.objArray[20];
_root.team2.grave = myLSO.data.myObj.objArray[21];
_root.team2.lefteyechance = myLSO.data.myObj.objArray[22];
_root.team2.hatchance = myLSO.data.myObj.objArray[23];
_root.team2.beardchance = myLSO.data.myObj.objArray[24];
_root.team2.lefthandchance = myLSO.data.myObj.objArray[25];
_root.team2.righthandchance = myLSO.data.myObj.objArray[26];
_root.team2.lefthairchance = myLSO.data.myObj.objArray[27];
_root.team2.legchance = myLSO.data.myObj.objArray[28];
_root.team3 = new Object();
_root.team3.name = myLSO.data.myObj.objArray[29];
_root.team3.p1 = myLSO.data.myObj.objArray[30];
_root.team3.p2 = myLSO.data.myObj.objArray[31];
_root.team3.p3 = myLSO.data.myObj.objArray[32];
_root.team3.grave = myLSO.data.myObj.objArray[33];
_root.team3.lefteyechance = myLSO.data.myObj.objArray[34];
_root.team3.hatchance = myLSO.data.myObj.objArray[35];
_root.team3.beardchance = myLSO.data.myObj.objArray[36];
_root.team3.lefthandchance = myLSO.data.myObj.objArray[37];
_root.team3.righthandchance = myLSO.data.myObj.objArray[38];
_root.team3.lefthairchance = myLSO.data.myObj.objArray[39];
_root.team3.legchance = myLSO.data.myObj.objArray[40];
_root.team1.colour = myLSO.data.myObj.objArray[41];
_root.team2.colour = myLSO.data.myObj.objArray[42];
_root.team3.colour = myLSO.data.myObj.objArray[43];
if (!(myLSO.data.myObj.objArray[44] === undefined)) {
_root.doneArrow = myLSO.data.myObj.objArray[44];
}
}
if (_root.soundsVolumePos == undefined) {
_root.soundsVolumePos = 250;
}
if (_root.musicVolumePos == undefined) {
_root.musicVolumePos = 250;
}
}
function deleteGameData() {
deleteTempVariables();
var _local2 = SharedObject.getLocal("Pirates");
for (var _local3 in _local2.data) {
delete _local2.data[_local3];
_root.helpText = "Game Data Deleted";
}
_root.helpText = "Game Data Deleted";
}
function makeCPUTeams() {
_root.preSetTeam1 = new Object();
_root.preSetTeam1.name = "The Cowboys";
_root.preSetTeam1.p1 = "Clint";
_root.preSetTeam1.p2 = "Walker";
_root.preSetTeam1.p3 = "Billy the Kid";
_root.preSetTeam1.theme = "Cowboy";
_root.preSetTeam1.colour = "orange";
_root.preSetTeam2 = new Object();
_root.preSetTeam2.name = "Techno Team";
_root.preSetTeam2.p1 = "Colonel Clunk";
_root.preSetTeam2.p2 = "Exterminator";
_root.preSetTeam2.p3 = "Johnny 6";
_root.preSetTeam2.theme = "Robot";
_root.preSetTeam2.colour = "black";
_root.preSetTeam3 = new Object();
_root.preSetTeam3.name = "The Funky Kids";
_root.preSetTeam3.p1 = "Jazz Mcfizzle";
_root.preSetTeam3.p2 = "Vitamin Cool";
_root.preSetTeam3.p3 = "Funkmaster Z";
_root.preSetTeam3.theme = "funky";
_root.preSetTeam3.colour = "purple";
}
function makeHumanTeams() {
_root.preSetTeam4 = new Object();
_root.preSetTeam4.name = "Outcasts";
_root.preSetTeam4.p1 = "Patrick the Pirate";
_root.preSetTeam4.p2 = "Scruffy the Carpenter";
_root.preSetTeam4.p3 = "Lynda";
_root.preSetTeam4.theme = "odd";
_root.preSetTeam4.colour = "green";
_root.preSetTeam5 = new Object();
_root.preSetTeam5.name = "Pirate Crew";
_root.preSetTeam5.p1 = "Captain Pegleg";
_root.preSetTeam5.p2 = "Bogbeard";
_root.preSetTeam5.p3 = "Marrow";
_root.preSetTeam5.theme = "Pirate";
_root.preSetTeam5.colour = "red";
}
loadGame();
if (_root.unlocked == undefined) {
_root.unlocked = [""];
}
if (_root.gold == undefined) {
_root.gold = 20;
}
makeCPUTeams();
makeHumanTeams();
Symbol 527 MovieClip Frame 108
stopAllSounds();
_root.play();
Symbol 537 Button
on (press) {
_quality = "Low";
}
Symbol 540 Button
on (press) {
_quality = "Medium";
}
Symbol 543 Button
on (press) {
_quality = "High";
}
Symbol 546 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.cannonFire.start();
_root.gotoAndStop("menuOptions");
}
Symbol 549 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.cannonFire.start();
_root.gotoAndStop("instructions");
}
Symbol 552 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.cannonFire.start();
_root.gotoAndStop("goldShoppe");
}
Symbol 555 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.cannonFire.start();
}
Symbol 573 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.cannonFire.start();
_root.gotoAndStop("instructions");
}
Symbol 575 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.gotoAndPlay("gameMode");
}
Symbol 578 Button
on (press) {
stopAllSounds();
_root.gotoAndStop("Credits");
}
Symbol 579 Button
on (rollOver) {
_root.rollOver.start();
}
on (release) {
_root.cannonFire.start();
getURL ("http://www.crazymonkeygames.com", "_blank");
}
Symbol 585 MovieClip Frame 17
_parent.gotoAndStop(3);
Symbol 587 MovieClip Frame 17
_parent.gotoAndStop(1);
Symbol 588 MovieClip Frame 1
stop();
busy = false;
done = false;
Symbol 588 MovieClip Frame 2
stop();
Symbol 588 MovieClip Frame 3
stop();
helpText = _root.helpText;
Instance of Symbol 586 MovieClip in Symbol 588 MovieClip Frame 3
onClipEvent (load) {
waited = 0;
delay = 80;
}
onClipEvent (enterFrame) {
waited++;
if (waited >= delay) {
_parent.gotoAndStop(4);
}
}
Symbol 588 MovieClip Frame 4
stop();
Symbol 597 MovieClip Frame 1
info = "Are you sure you want to delete all your existing game data? <B> Cannot be undone </B>";
Instance of Symbol 591 MovieClip in Symbol 597 MovieClip Frame 1
on (press) {
_root.deleteGameData();
_parent._visible = false;
}
Instance of Symbol 593 MovieClip in Symbol 597 MovieClip Frame 1
on (press) {
_parent._visible = false;
}
Symbol 597 MovieClip Frame 2
gotoAndPlay (1);
Symbol 599 MovieClip Frame 2
_root.swallow.start();
Symbol 599 MovieClip Frame 12
stop();
Symbol 606 MovieClip Frame 1
stop();
Symbol 611 MovieClip Frame 1
stop();
Symbol 611 MovieClip Frame 2
stop();
Symbol 669 MovieClip Frame 1
stop();
Instance of Symbol 611 MovieClip in Symbol 669 MovieClip Frame 1
onClipEvent (load) {
itemName = "Game Objective";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_root.click.start();
_parent.gotoAndStop(2);
}
Instance of Symbol 611 MovieClip in Symbol 669 MovieClip Frame 1
onClipEvent (load) {
itemName = "In Game Controls";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_root.click.start();
_parent.gotoAndStop(3);
}
Instance of Symbol 611 MovieClip in Symbol 669 MovieClip Frame 1
onClipEvent (load) {
itemName = "Game Modes";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_root.click.start();
_parent.gotoAndStop(4);
}
Instance of Symbol 611 MovieClip in Symbol 669 MovieClip Frame 1
onClipEvent (load) {
itemName = "Creating and Modifying teams";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_root.click.start();
_parent.gotoAndStop(5);
}
Instance of Symbol 611 MovieClip in Symbol 669 MovieClip Frame 1
onClipEvent (load) {
itemName = "Customizing Matches";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_root.click.start();
_parent.gotoAndStop(6);
}
Instance of Symbol 611 MovieClip in Symbol 669 MovieClip Frame 1
onClipEvent (load) {
itemName = "Unlocking Secrets";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_root.click.start();
_parent.gotoAndStop(7);
}
Instance of Symbol 611 MovieClip in Symbol 669 MovieClip Frame 1
onClipEvent (load) {
itemName = "Hints and Tips";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_root.click.start();
_parent.gotoAndStop(8);
}
Instance of Symbol 615 MovieClip in Symbol 669 MovieClip Frame 1
on (press) {
_parent.nextFrame();
}
Instance of Symbol 619 MovieClip in Symbol 669 MovieClip Frame 1
on (press) {
_root.gotoAndStop("Menu");
}
Symbol 669 MovieClip Frame 2
stop();
Instance of Symbol 625 MovieClip in Symbol 669 MovieClip Frame 2
on (press) {
_parent.prevFrame();
}
Symbol 669 MovieClip Frame 3
stop();
Symbol 669 MovieClip Frame 4
stop();
Symbol 669 MovieClip Frame 5
stop();
Symbol 669 MovieClip Frame 6
stop();
Symbol 669 MovieClip Frame 7
stop();
Symbol 669 MovieClip Frame 8
stop();
Symbol 721 MovieClip Frame 1
function showDetail() {
if (_parent._parent.detailedInfo._visible == false) {
_parent._parent.detailedInfo.price = price;
_parent._parent.detailedInfo.productName = product;
_parent._parent.detailedInfo.details = productDetails;
_parent._parent.detailedInfo._visible = true;
_root.rollOver.start();
}
}
stop();
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 1
onClipEvent (load) {
product = "shotgun";
price = 40;
details = "A double - barreled shotgun which allows 2 shots per turn. Powerful close range gun. Approximatley 40 damage per shot.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 1
onClipEvent (load) {
product = "Rum Bottle";
price = 50;
details = "Rum Bottle, XXXXXX. Restores 100 health. Don't take with medication.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 1
onClipEvent (load) {
product = "Homing Parrot Strike";
price = 80;
details = "Launches a bird cage to fire a legion of parrots which aim towards a specified target. Changes target on contact. Polly wants blood.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 1
onClipEvent (load) {
product = "Davey Jones Locker";
price = 100;
details = "Launches the almighty Davey Jone's locker to crush a specified target.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 1
onClipEvent (load) {
product = "Blackbeard";
price = 120;
details = "The foulest of all pirates, steals an enemy Pirate's soul. Instant death.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Symbol 721 MovieClip Frame 2
function showDetail() {
if (_parent._parent.detailedInfo._visible == false) {
_parent._parent.detailedInfo.price = price;
_parent._parent.detailedInfo.productName = product;
_parent._parent.detailedInfo.details = productDetails;
_parent._parent.detailedInfo._visible = true;
_root.rollOver.start();
}
}
stop();
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 2
onClipEvent (load) {
product = "Movie Theatre";
price = 150;
details = "1 and 2 Player map, based around a movie theatre.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 2
onClipEvent (load) {
product = "Big Ben";
price = 200;
details = "2 Player exlcusive map, with multiple platforms. Displays real time!";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 2
onClipEvent (load) {
product = "Pirate Bay";
price = 250;
details = "2 Player exlclusive map, with sinking platforms.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 2
onClipEvent (load) {
product = "Ghost Ship";
price = 250;
details = "Haunted ship belonging to Blackbeard. Available for 1 and 2 Player.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Symbol 721 MovieClip Frame 3
function showDetail() {
if (_parent._parent.detailedInfo._visible == false) {
_parent._parent.detailedInfo.price = price;
_parent._parent.detailedInfo.productName = product;
_parent._parent.detailedInfo.details = productDetails;
_parent._parent.detailedInfo._visible = true;
_root.rollOver.start();
}
}
stop();
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Rainbow Wig";
price = 5;
details = "Rainbow-coloured Wig. Used as a hat.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Top Hat";
price = 5;
details = "Black Top Hat. Used as a hat.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Super Hero Mask";
price = 5;
details = "Super Hero Mask. Used as a hat.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Rubber Ducky";
price = 10;
details = "Rubber Ducky stolen from the Bathtub. Used as a hat.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Crown";
price = 15;
details = "Royality Crown stolen from Captain Pegleg. Used as a hat.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Candy Cane";
price = 5;
details = "Candy Cane made from rock candy. Used as a leg.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Spring";
price = 5;
details = "Rusty spring. Used as a leg.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Pom Pom";
price = 5;
details = "Cheer-leader Pom Pom. Cheer on your team! Used as a hand, available for left and right.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Knife";
price = 5;
details = "Fine stainless-steel cutlery from Italy. Used as a hand, available for left hand only.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Fork";
price = 5;
details = "Fine stainless-steel cutlery from Italy. Used as a hand, available for right hand only.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Gauntlet";
price = 5;
details = "Medieval Gauntlet. Cast Iron. Used as a hand, available for left and right";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Jeeves Glove";
price = 10;
details = "Once used by Jeeves himself. Used as a hand, available for left and right.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Skeleton Hand";
price = 10;
details = "Creepy Skeleton hand, taken from some random grave. Used as a hand, available for left and right.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Magic 8 Ball";
price = 5;
details = "While it doesn't answer your question, it does look weird. Used as an eye.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Scarred Eye";
price = 5;
details = "Eye which was poked out, so this will have to do. Used as an eye.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Bald";
price = 10;
details = "Leave the pirate's head cold in the wind. Useful to use, as it removes an easy target. Used as a hat.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Night vision Googles (G)";
price = 10;
details = "Night vision Googles, with green lighting. Covers both eyes.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Night vision Googles (R)";
price = 10;
details = "Night vision Googles, with red lighting. Covers both eyes.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Cowboy Set";
price = 40;
details = "Full cowboy-themed set. Includes Fun Hat, Cowboy Glove and Cowboy boot.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Robot Set";
price = 40;
details = "Full robot-themed set. Includes hat, beard, eye, glove and foot.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Instance of Symbol 681 MovieClip in Symbol 721 MovieClip Frame 3
onClipEvent (load) {
product = "Anime Eye";
price = 5;
details = "Look like a cute Shounen Star and impress all the boys with this uber massive eye.";
}
on (press) {
_parent.product = product;
_parent.price = price;
_parent.productDetails = details;
_parent.showDetail();
}
Symbol 729 MovieClip Frame 1
stop();
_root.GSD.productType = "Weapon Name";
_parent.productNames.info.gotoAndStop(1);
_parent.productNames._y = 260.3;
Instance of Symbol 724 MovieClip in Symbol 729 MovieClip Frame 1
on (press) {
_root.click.start();
_parent.gotoAndStop(3);
}
Instance of Symbol 726 MovieClip in Symbol 729 MovieClip Frame 1
on (press) {
_root.click.start();
_parent.gotoAndStop(2);
}
Symbol 729 MovieClip Frame 2
stop();
_root.GSD.productType = "Map Name";
_parent.productNames.info.gotoAndStop(2);
_parent.productNames._y = 260.3;
Instance of Symbol 728 MovieClip in Symbol 729 MovieClip Frame 2
on (press) {
_root.click.start();
_parent.gotoAndStop(1);
}
Symbol 729 MovieClip Frame 3
stop();
_root.GSD.productType = "Costume Parts";
_parent.productNames.info.gotoAndStop(3);
_parent.productNames._y = 260.3;
Instance of Symbol 726 MovieClip in Symbol 729 MovieClip Frame 3
on (press) {
_root.click.start();
_parent.gotoAndStop(2);
}
Instance of Symbol 738 MovieClip in Symbol 742 MovieClip Frame 1
onClipEvent (load) {
over = false;
down = false;
time = 0;
delay = 8;
}
onClipEvent (enterFrame) {
if (_parent._parent.productNames.info._currentframe == 1) {
max = -100;
}
if (_parent._parent.productNames.info._currentframe == 2) {
max = -100;
}
if (_parent._parent.productNames.info._currentframe == 3) {
max = -900;
}
}
on (press) {
if (_parent._parent.productNames._y > max) {
_parent._parent.productNames._y = _parent._parent.productNames._y - 5;
}
}
on (rollOver) {
over = true;
_root.rollOver.start();
}
on (rollOut) {
over = false;
down = false;
time = 0;
}
onClipEvent (mouseDown) {
if (over) {
down = true;
}
}
onClipEvent (mouseUp) {
down = false;
time = 0;
}
onClipEvent (enterFrame) {
if (down) {
time++;
if (time >= delay) {
if (_parent._parent.productNames._y > max) {
_parent._parent.productNames._y = _parent._parent.productNames._y - 5;
}
}
}
}
Instance of Symbol 738 MovieClip in Symbol 742 MovieClip Frame 1
onClipEvent (load) {
over = false;
down = false;
time = 0;
delay = 8;
max = _parent._parent.productNames._y;
}
on (press) {
if (_parent._parent.productNames._y < max) {
_parent._parent.productNames._y = _parent._parent.productNames._y + 5;
}
}
on (rollOver) {
over = true;
_root.rollOver.start();
}
on (rollOut) {
over = false;
down = false;
time = 0;
}
onClipEvent (mouseDown) {
if (over) {
down = true;
}
}
onClipEvent (mouseUp) {
down = false;
time = 0;
}
onClipEvent (enterFrame) {
if (down) {
time++;
if (time >= delay) {
if (_parent._parent.productNames._y < max) {
_parent._parent.productNames._y = _parent._parent.productNames._y + 5;
}
}
}
}
Symbol 781 MovieClip Frame 1
stop();
Symbol 781 MovieClip Frame 2
stop();
Symbol 781 MovieClip Frame 3
stop();
Symbol 781 MovieClip Frame 4
stop();
Instance of Symbol 775 MovieClip "CFMI" in Symbol 781 MovieClip Frame 22
onClipEvent (load) {
function showMapPreview() {
_parent._parent._parent.mapPreview.levelPreview.mapName = mapName;
_parent._parent._parent.mapPreview._visible = true;
}
}
on (press) {
showMapPreview();
}
Instance of Symbol 747 MovieClip in Symbol 793 MovieClip Frame 1
on (press) {
_parent._visible = false;
}
Instance of Symbol 781 MovieClip in Symbol 793 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.cost = "Cost : " add _parent.price;
if (_parent.productName == "shotgun") {
this.gotoAndStop(2);
}
if (_parent.productName == "Rainbow Wig") {
this.gotoAndStop(3);
}
if (_parent.productName == "Top Hat") {
this.gotoAndStop(4);
}
if (_parent.productName == "Super Hero Mask") {
this.gotoAndStop(5);
}
if (_parent.productName == "Bald") {
this.gotoAndStop(1);
}
if (_parent.productName == "Rubber Ducky") {
this.gotoAndStop(6);
}
if (_parent.productName == "Crown") {
this.gotoAndStop(7);
}
if (_parent.productName == "Candy Cane") {
this.gotoAndStop(8);
}
if (_parent.productName == "Spring") {
this.gotoAndStop(9);
}
if (_parent.productName == "Pom Pom") {
this.gotoAndStop(10);
}
if (_parent.productName == "Knife") {
this.gotoAndStop(11);
}
if (_parent.productName == "Fork") {
this.gotoAndStop(12);
}
if (_parent.productName == "Gauntlet") {
this.gotoAndStop(13);
}
if (_parent.productName == "Jeeves Glove") {
this.gotoAndStop(14);
}
if (_parent.productName == "Skeleton Hand") {
this.gotoAndStop(15);
}
if (_parent.productName == "Magic 8 Ball") {
this.gotoAndStop(16);
}
if (_parent.productName == "Scarred Eye") {
this.gotoAndStop(17);
}
if (_parent.productName == "Night vision Googles (G)") {
this.gotoAndStop(18);
}
if (_parent.productName == "Night vision Googles (R)") {
this.gotoAndStop(19);
}
if (_parent.productName == "Cowboy Set") {
this.gotoAndStop(20);
}
if (_parent.productName == "Robot Set") {
this.gotoAndStop(21);
}
if (_parent._parent.productNames.info._currentframe == 2) {
this.gotoAndStop(22);
this.CFMI.mapName = _parent.productName;
}
if (_parent.productName == "Anime Eye") {
this.gotoAndStop(23);
}
if (_parent.productName == "Rum Bottle") {
this.gotoAndStop(24);
}
if (_parent.productName == "Homing Parrot Strike") {
this.gotoAndStop(25);
}
if (_parent.productName == "Davey Jones Locker") {
this.gotoAndStop(26);
}
if (_parent.productName == "Blackbeard") {
this.gotoAndStop(27);
}
}
Instance of Symbol 788 MovieClip in Symbol 793 MovieClip Frame 1
on (press) {
_root.rollOver.start();
_parent._visible = false;
}
Instance of Symbol 792 MovieClip in Symbol 793 MovieClip Frame 1
onClipEvent (load) {
function buy() {
keyword = _parent.productName;
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked == false) {
_root.error2.start();
_root.helpText = "You have already purchased this item.";
return(undefined);
}
_root.unlocked.push(_parent.productName);
trace(_root.unlocked);
_root.cashreg.start();
_root.gold = _root.gold - _parent.price;
_parent._visible = false;
}
}
on (release) {
if (_root.gold >= _parent.price) {
buy();
return(undefined);
}
if (_root.gold < _parent.price) {
_root.error2.start();
_root.helpText = "You do not have enough gold to buy that";
}
}
Symbol 798 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.cannonFire.start();
_root.gotoAndStop("audioOption");
}
Symbol 802 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.cannonFire.start();
_root.gotoAndStop("dataOptions");
}
Symbol 806 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.cannonFire.start();
_root.gotoAndStop("teamOptions");
}
Instance of Symbol 810 MovieClip in Symbol 815 MovieClip Frame 1
onClipEvent (load) {
_x = _root.soundsVolumePos;
barWidth = 305;
top = _y;
left = 0;
right = left + 273;
bottom = _y;
down = false;
time = 0;
}
on (press) {
down = true;
startDrag (this, false, left, top, right, bottom);
_root.rollOver.start();
}
on (release) {
down = false;
stopDrag();
_root.soundsVolumePos = _x;
}
on (releaseOutside) {
down = false;
stopDrag();
}
onClipEvent (enterFrame) {
if (down) {
_root.soundsVolumePos = _x;
time++;
if (time > 4) {
_root.rollOver.start();
time = 0;
}
}
}
Instance of Symbol 810 MovieClip in Symbol 815 MovieClip Frame 1
onClipEvent (load) {
_x = _root.musicVolumePos;
barWidth = 305;
top = _y;
left = 0;
right = left + 273;
bottom = _y;
down = false;
}
on (press) {
down = true;
startDrag (this, false, left, top, right, bottom);
_root.rollOver.start();
}
on (release) {
down = false;
stopDrag();
_root.musicVolumePos = _x;
}
on (releaseOutside) {
down = false;
stopDrag();
}
onClipEvent (enterFrame) {
if (down) {
_root.musicVolumePos = _x;
}
}
Symbol 823 MovieClip Frame 1
stop();
Symbol 823 MovieClip Frame 2
stop();
Symbol 827 MovieClip Frame 1
stop();
Symbol 827 MovieClip Frame 2
stop();
Instance of Symbol 827 MovieClip "Menu_GS_t1" in Symbol 828 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.team1.name === undefined)) {
teamName = _root.team1.name;
}
if (_root.team1.name == undefined) {
_visible = false;
}
if (!(_root.team1.name === undefined)) {
_visible = true;
_root.teamListNumber++;
}
}
onClipEvent (enterFrame) {
if (!(_root.team1.name === undefined)) {
teamName = _root.team1.name;
}
if (_root.team1.name == undefined) {
_visible = false;
}
if (!(_root.team1.name === undefined)) {
_visible = true;
}
}
on (rollOver) {
_root.rollOver.start();
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_root.selectedTeam = _root.team1;
}
}
}
Instance of Symbol 827 MovieClip "Menu_GS_t2" in Symbol 828 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.team2.name === undefined)) {
teamName = _root.team2.name;
}
if (_root.team2.name == undefined) {
_visible = false;
}
if (!(_root.team2.name === undefined)) {
_visible = true;
_root.teamListNumber++;
}
}
onClipEvent (enterFrame) {
if (!(_root.team2.name === undefined)) {
teamName = _root.team2.name;
}
if (_root.team2.name == undefined) {
_visible = false;
}
if (!(_root.team2.name === undefined)) {
_visible = true;
}
}
on (rollOver) {
_root.rollOver.start();
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_root.selectedTeam = _root.team2;
}
}
}
Instance of Symbol 827 MovieClip "Menu_GS_t3" in Symbol 828 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.team3.name === undefined)) {
teamName = _root.team3.name;
}
if (_root.team3.name == undefined) {
_visible = false;
}
if (!(_root.team3.name === undefined)) {
_visible = true;
_root.teamListNumber++;
}
}
onClipEvent (enterFrame) {
if (!(_root.team3.name === undefined)) {
teamName = _root.team3.name;
}
if (_root.team3.name == undefined) {
_visible = false;
}
if (!(_root.team3.name === undefined)) {
_visible = true;
}
}
on (rollOver) {
_root.rollOver.start();
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_root.selectedTeam = _root.team3;
}
}
}
Symbol 855 MovieClip Frame 1
stop();
Instance of Symbol 838 MovieClip in Symbol 855 MovieClip Frame 1
on (press) {
_parent.going = "going";
_parent.prevFrame();
}
Instance of Symbol 840 MovieClip in Symbol 855 MovieClip Frame 1
on (press) {
_parent.going = "coming";
_parent.nextFrame();
}
Symbol 855 MovieClip Frame 2
stop();
Symbol 855 MovieClip Frame 3
stop();
Symbol 855 MovieClip Frame 4
stop();
keyword = "Fork";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 855 MovieClip Frame 5
stop();
keyword = "Jeeves Glove";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 855 MovieClip Frame 6
stop();
keyword = "Robot Set";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 855 MovieClip Frame 7
stop();
keyword = "Skeleton Hand";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 855 MovieClip Frame 8
stop();
keyword = "Pom Pom";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 855 MovieClip Frame 9
stop();
keyword = "Cowboy Set";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 855 MovieClip Frame 10
stop();
keyword = "Gauntlet";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
gotoAndStop (1);
}
if (going == "going") {
prevFrame();
}
}
Symbol 867 MovieClip Frame 1
stop();
Instance of Symbol 838 MovieClip in Symbol 867 MovieClip Frame 1
on (press) {
_parent.going = "going";
_parent.prevFrame();
}
Instance of Symbol 840 MovieClip in Symbol 867 MovieClip Frame 1
on (press) {
_parent.going = "coming";
_parent.nextFrame();
}
Symbol 867 MovieClip Frame 2
stop();
Symbol 867 MovieClip Frame 3
stop();
keyword = "Knife";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 867 MovieClip Frame 4
stop();
keyword = "Jeeves Glove";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 867 MovieClip Frame 5
stop();
keyword = "Robot Set";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 867 MovieClip Frame 6
stop();
keyword = "Skeleton Hand";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 867 MovieClip Frame 7
stop();
keyword = "Pom Pom";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 867 MovieClip Frame 8
stop();
keyword = "Cowboy Set";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 867 MovieClip Frame 9
stop();
keyword = "Gauntlet";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
gotoAndStop (1);
}
if (going == "going") {
prevFrame();
}
}
Symbol 871 MovieClip Frame 1
stop();
Instance of Symbol 838 MovieClip in Symbol 871 MovieClip Frame 1
on (press) {
_parent.prevFrame();
}
Instance of Symbol 840 MovieClip in Symbol 871 MovieClip Frame 1
on (press) {
_parent.nextFrame();
}
Symbol 871 MovieClip Frame 2
stop();
Symbol 877 MovieClip Frame 1
stop();
Symbol 877 MovieClip Frame 2
stop();
Symbol 877 MovieClip Frame 3
stop();
Symbol 885 MovieClip Frame 1
stop();
Instance of Symbol 838 MovieClip in Symbol 885 MovieClip Frame 1
on (press) {
_parent.going = "going";
_parent.prevFrame();
}
Instance of Symbol 840 MovieClip in Symbol 885 MovieClip Frame 1
on (press) {
_parent.going = "coming";
_parent.nextFrame();
}
Symbol 885 MovieClip Frame 2
stop();
Symbol 885 MovieClip Frame 3
stop();
Instance of Symbol 877 MovieClip in Symbol 885 MovieClip Frame 3
onClipEvent (enterFrame) {
if (!(_root.attention === _parent._parent._parent._parent._parent)) {
if (_parent._parent._parent._parent._parent.facing == "left") {
this.gotoAndStop(3);
}
if (!(_root.attention === _parent._parent._parent._parent._parent)) {
if (_parent._parent._parent._parent._parent.facing == "right") {
this.gotoAndStop(2);
}
}
}
}
Symbol 885 MovieClip Frame 4
stop();
Symbol 885 MovieClip Frame 5
stop();
keyword = "Eyepatch";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 885 MovieClip Frame 6
stop();
keyword = "Magic 8 Ball";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 885 MovieClip Frame 7
stop();
keyword = "Anime Eye";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 885 MovieClip Frame 8
stop();
keyword = "Scarred Eye";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 885 MovieClip Frame 9
stop();
keyword = "Robot Set";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 885 MovieClip Frame 10
stop();
keyword = "Night vision Googles (G)";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 885 MovieClip Frame 11
stop();
keyword = "Night vision Googles (R)";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
gotoAndStop (1);
}
if (going == "going") {
prevFrame();
}
}
Symbol 904 MovieClip Frame 1
stop();
Instance of Symbol 838 MovieClip in Symbol 904 MovieClip Frame 1
on (press) {
_parent.going = "going";
_parent.prevFrame();
}
Instance of Symbol 840 MovieClip in Symbol 904 MovieClip Frame 1
on (press) {
_parent.going = "coming";
_parent.nextFrame();
}
Symbol 904 MovieClip Frame 2
stop();
Symbol 904 MovieClip Frame 3
stop();
Symbol 904 MovieClip Frame 4
stop();
Symbol 904 MovieClip Frame 5
stop();
keyword = "Rainbow Wig";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 904 MovieClip Frame 6
stop();
keyword = "Top Hat";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 904 MovieClip Frame 7
stop();
keyword = "Cowboy Hat";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 904 MovieClip Frame 8
stop();
keyword = "Cowboy Set";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 904 MovieClip Frame 9
stop();
keyword = "theme-robot";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 904 MovieClip Frame 10
stop();
keyword = "Rubber Ducky";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 904 MovieClip Frame 11
stop();
keyword = "Super Hero Mask";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
trace(locked);
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 904 MovieClip Frame 12
stop();
keyword = "Bald";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 904 MovieClip Frame 13
stop();
keyword = "Crown";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
gotoAndStop (1);
}
if (going == "going") {
prevFrame();
}
}
Symbol 937 MovieClip Frame 1
stop();
Instance of Symbol 838 MovieClip in Symbol 937 MovieClip Frame 1
on (press) {
_parent.going = "going";
_parent.prevFrame();
}
Instance of Symbol 840 MovieClip in Symbol 937 MovieClip Frame 1
on (press) {
_parent.going = "coming";
_parent.nextFrame();
}
Symbol 937 MovieClip Frame 2
stop();
Symbol 937 MovieClip Frame 3
stop();
Symbol 937 MovieClip Frame 4
stop();
Symbol 937 MovieClip Frame 5
stop();
Symbol 937 MovieClip Frame 6
stop();
Symbol 937 MovieClip Frame 7
stop();
keyword = "Robot Set";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
gotoAndStop (1);
}
if (going == "going") {
prevFrame();
}
}
Symbol 953 MovieClip Frame 1
stop();
Instance of Symbol 838 MovieClip in Symbol 953 MovieClip Frame 1
on (press) {
_parent.going = "going";
_parent.prevFrame();
}
Instance of Symbol 840 MovieClip in Symbol 953 MovieClip Frame 1
on (press) {
_parent.going = "coming";
_parent.nextFrame();
}
Symbol 953 MovieClip Frame 2
stop();
Symbol 953 MovieClip Frame 3
stop();
Symbol 953 MovieClip Frame 4
keyword = "Cowboy Set";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 953 MovieClip Frame 5
keyword = "Candy Cane";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 953 MovieClip Frame 6
keyword = "Robot Set";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
nextFrame();
}
if (going == "going") {
prevFrame();
}
}
Symbol 953 MovieClip Frame 7
keyword = "Spring";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
if (going == "coming") {
gotoAndStop (1);
}
if (going == "going") {
prevFrame();
}
}
Symbol 973 MovieClip Frame 1
stop();
Symbol 973 MovieClip Frame 2
stop();
Symbol 973 MovieClip Frame 3
stop();
Symbol 973 MovieClip Frame 4
stop();
Symbol 973 MovieClip Frame 5
stop();
Symbol 973 MovieClip Frame 6
stop();
Symbol 973 MovieClip Frame 7
stop();
Instance of Symbol 973 MovieClip in Symbol 974 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent._currentframe == 1) {
myOwner = _parent._parent._parent;
}
if (_parent._parent._parent._parent._currentframe == 2) {
myOwner = _parent._parent._parent._parent;
}
if (_parent._parent._parent._currentframe == 4) {
myOwner = _parent._parent._parent;
}
if (myOwner.legchance == undefined) {
myOwner.legchance = random(3);
}
if (myOwner.theme == "Cowboy") {
myOwner.legchance = 3;
}
if (myOwner.theme == "Robot") {
myOwner.legchance = 5;
}
if (myOwner.theme == "funky") {
myOwner.legchance = 0;
}
if (myOwner.theme == "odd") {
myOwner.legchance = 2;
}
this.gotoAndStop(myOwner.legchance + 1);
}
onClipEvent (enterFrame) {
this.gotoAndStop(myOwner.legchance + 1);
if (myOwner.theme == "Cowboy") {
myOwner.legchance = 3;
}
if (myOwner.theme == "Robot") {
myOwner.legchance = 5;
}
if (myOwner.theme == "Pirate") {
myOwner.legchance = 0;
}
if (myOwner.theme == "funky") {
myOwner.legchance = 0;
}
if (myOwner.theme == "odd") {
myOwner.legchance = 2;
}
}
Instance of Symbol 977 MovieClip in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
colour = _parent._parent._parent.colour;
if (colour == "red") {
teamcolour = new Color(this);
teamcolour.setRGB(13369344);
}
if (colour == "blue") {
teamcolour = new Color(this);
teamcolour.setRGB(255);
}
if (colour == "green") {
teamcolour = new Color(this);
teamcolour.setRGB(52224);
}
if (colour == "purple") {
teamcolour = new Color(this);
teamcolour.setRGB(10027263);
}
if (colour == "orange") {
teamcolour = new Color(this);
teamcolour.setRGB(16763904);
}
if (colour == "black") {
teamcolour = new Color(this);
teamcolour.setRGB(0);
}
}
onClipEvent (enterFrame) {
colour = _parent._parent._parent.colour;
if (colour == "red") {
teamcolour = new Color(this);
teamcolour.setRGB(13369344);
}
if (colour == "blue") {
teamcolour = new Color(this);
teamcolour.setRGB(255);
}
if (colour == "green") {
teamcolour = new Color(this);
teamcolour.setRGB(52224);
}
if (colour == "purple") {
teamcolour = new Color(this);
teamcolour.setRGB(10027263);
}
if (colour == "orange") {
teamcolour = new Color(this);
teamcolour.setRGB(16763904);
}
if (colour == "black") {
teamcolour = new Color(this);
teamcolour.setRGB(0);
}
}
Instance of Symbol 979 MovieClip in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
colour = _parent._parent._parent.colour;
if (colour == "red") {
teamcolour = new Color(this);
teamcolour.setRGB(13369344);
}
if (colour == "blue") {
teamcolour = new Color(this);
teamcolour.setRGB(255);
}
if (colour == "green") {
teamcolour = new Color(this);
teamcolour.setRGB(52224);
}
if (colour == "purple") {
teamcolour = new Color(this);
teamcolour.setRGB(10027263);
}
if (colour == "orange") {
teamcolour = new Color(this);
teamcolour.setRGB(16763904);
}
if (colour == "black") {
teamcolour = new Color(this);
teamcolour.setRGB(0);
}
}
onClipEvent (enterFrame) {
colour = _parent._parent._parent.colour;
if (colour == "red") {
teamcolour = new Color(this);
teamcolour.setRGB(13369344);
}
if (colour == "blue") {
teamcolour = new Color(this);
teamcolour.setRGB(255);
}
if (colour == "green") {
teamcolour = new Color(this);
teamcolour.setRGB(52224);
}
if (colour == "purple") {
teamcolour = new Color(this);
teamcolour.setRGB(10027263);
}
if (colour == "orange") {
teamcolour = new Color(this);
teamcolour.setRGB(16763904);
}
if (colour == "black") {
teamcolour = new Color(this);
teamcolour.setRGB(0);
}
}
Instance of Symbol 981 MovieClip in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
colour = _parent._parent._parent.colour;
if (colour == "red") {
teamcolour = new Color(this);
teamcolour.setRGB(13369344);
}
if (colour == "blue") {
teamcolour = new Color(this);
teamcolour.setRGB(255);
}
if (colour == "green") {
teamcolour = new Color(this);
teamcolour.setRGB(52224);
}
if (colour == "purple") {
teamcolour = new Color(this);
teamcolour.setRGB(10027263);
}
if (colour == "orange") {
teamcolour = new Color(this);
teamcolour.setRGB(16763904);
}
if (colour == "black") {
teamcolour = new Color(this);
teamcolour.setRGB(0);
}
}
onClipEvent (enterFrame) {
colour = _parent._parent._parent.colour;
if (colour == "red") {
teamcolour = new Color(this);
teamcolour.setRGB(13369344);
}
if (colour == "blue") {
teamcolour = new Color(this);
teamcolour.setRGB(255);
}
if (colour == "green") {
teamcolour = new Color(this);
teamcolour.setRGB(52224);
}
if (colour == "purple") {
teamcolour = new Color(this);
teamcolour.setRGB(10027263);
}
if (colour == "orange") {
teamcolour = new Color(this);
teamcolour.setRGB(16763904);
}
if (colour == "black") {
teamcolour = new Color(this);
teamcolour.setRGB(0);
}
}
Symbol 994 MovieClip Frame 1
stop();
Symbol 994 MovieClip Frame 2
stop();
Symbol 994 MovieClip Frame 3
stop();
Symbol 994 MovieClip Frame 4
stop();
Symbol 994 MovieClip Frame 5
stop();
Symbol 994 MovieClip Frame 6
stop();
Symbol 994 MovieClip Frame 7
stop();
Symbol 994 MovieClip Frame 8
stop();
Symbol 994 MovieClip Frame 9
stop();
Instance of Symbol 994 MovieClip in Symbol 995 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent._currentframe == 1) {
myOwner = _parent._parent._parent;
}
if (_parent._parent._parent._parent._currentframe == 2) {
myOwner = _parent._parent._parent._parent;
}
if (_parent._parent._parent._currentframe == 3) {
myOwner = _parent._parent._parent;
}
if (_parent._parent._parent._currentframe == 4) {
myOwner = _parent._parent._parent;
}
if (_parent._parent._parent._parent._currentframe == 6) {
myOwner = _parent._parent._parent._parent;
}
if (_parent._parent._parent._parent._currentframe == 10) {
myOwner = _parent._parent._parent._parent;
}
if (myOwner.righthandchance == undefined) {
myOwner.righthandchance = random(2);
}
if (myOwner.theme == "Cowboy") {
myOwner.righthandchance = 7;
}
if (myOwner.theme == "Robot") {
myOwner.righthandchance = 4;
}
if (myOwner.theme == "funky") {
myOwner.righthandchance = 1;
}
if (myOwner.theme == "odd") {
myOwner.righthandchance = 0;
}
this.gotoAndStop(myOwner.righthandchance + 1);
}
onClipEvent (enterFrame) {
this.gotoAndStop(myOwner.righthandchance + 1);
if (myOwner.theme == "Cowboy") {
myOwner.righthandchance = 7;
}
if (myOwner.theme == "Robot") {
myOwner.righthandchance = 4;
}
if (myOwner.theme == "Pirate") {
myOwner.righthandchance = 0;
}
if (myOwner.theme == "funky") {
myOwner.righthandchance = 1;
}
if (myOwner.theme == "odd") {
myOwner.righthandchance = 0;
}
}
Symbol 1008 MovieClip Frame 1
stop();
Symbol 1008 MovieClip Frame 2
stop();
Symbol 1008 MovieClip Frame 3
stop();
Symbol 1008 MovieClip Frame 4
stop();
Symbol 1008 MovieClip Frame 5
stop();
Symbol 1008 MovieClip Frame 6
stop();
Symbol 1008 MovieClip Frame 7
stop();
Symbol 1008 MovieClip Frame 8
stop();
Symbol 1008 MovieClip Frame 9
stop();
Symbol 1008 MovieClip Frame 10
stop();
Instance of Symbol 1008 MovieClip in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent._currentframe == 1) {
myOwner = _parent._parent._parent;
}
if (_parent._parent._parent._parent._currentframe == 2) {
myOwner = _parent._parent._parent._parent;
}
if (_parent._parent._parent._currentframe == 3) {
myOwner = _parent._parent._parent;
}
if (_parent._parent._parent._currentframe == 4) {
myOwner = _parent._parent._parent;
}
if (_parent._parent._parent._parent._currentframe == 6) {
myOwner = _parent._parent._parent._parent;
}
if (_parent._parent._parent._parent._currentframe == 10) {
myOwner = _parent._parent._parent._parent;
}
if (myOwner.lefthandchance == undefined) {
myOwner.lefthandchance = random(3);
}
if (myOwner.theme == "Cowboy") {
myOwner.lefthandchance = 8;
}
if (myOwner.theme == "Robot") {
myOwner.lefthandchance = 5;
}
if (myOwner.theme == "funky") {
myOwner.lefthandchance = 2;
}
if (myOwner.theme == "odd") {
myOwner.lefthandchance = 0;
}
this.gotoAndStop(myOwner.lefthandchance + 1);
}
onClipEvent (enterFrame) {
this.gotoAndStop(myOwner.lefthandchance + 1);
if (myOwner.theme == "Cowboy") {
myOwner.lefthandchance = 8;
}
if (myOwner.theme == "Robot") {
myOwner.lefthandchance = 5;
}
if (myOwner.theme == "Pirate") {
myOwner.lefthandchance = 0;
}
if (myOwner.theme == "funky") {
myOwner.lefthandchance = 2;
}
if (myOwner.theme == "odd") {
myOwner.lefthandchance = 0;
}
}
Symbol 1018 MovieClip Frame 1
stop();
Symbol 1018 MovieClip Frame 2
stop();
Instance of Symbol 1018 MovieClip in Symbol 1019 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent._parent == undefined) {
_parent._parent._parent.lefthairchance = random(2);
}
this.gotoAndStop(_parent._parent._parent.lefthairchance + 1);
if (_parent._parent._parent.theme == "Cowboy") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "Pirate") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "funky") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "odd") {
_parent._parent._parent.lefthairchance = 1;
}
}
onClipEvent (enterFrame) {
if (_parent._parent._parent == undefined) {
_parent._parent._parent.lefthairchance = random(2);
}
if (_parent._parent._parent.theme == "Cowboy") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "Pirate") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "funky") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "odd") {
_parent._parent._parent.lefthairchance = 1;
}
this.gotoAndStop(_parent._parent._parent.lefthairchance + 1);
}
Symbol 1022 MovieClip Frame 1
stop();
Symbol 1022 MovieClip Frame 2
stop();
Instance of Symbol 1022 MovieClip in Symbol 1023 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent._parent == undefined) {
_parent._parent._parent.lefthairchance = random(2);
}
this.gotoAndStop(_parent._parent._parent.lefthairchance + 1);
if (_parent._parent._parent.theme == "Cowboy") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "Pirate") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "funky") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "odd") {
_parent._parent._parent.lefthairchance = 1;
}
}
onClipEvent (enterFrame) {
if (_parent._parent._parent == undefined) {
_parent._parent._parent.lefthairchance = random(2);
}
if (_parent._parent._parent.theme == "Cowboy") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "Pirate") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "funky") {
_parent._parent._parent.lefthairchance = 0;
}
if (parent.theme == "odd") {
_parent._parent._parent.lefthairchance = 1;
}
this.gotoAndStop(_parent._parent._parent.lefthairchance + 1);
}
Symbol 1041 MovieClip Frame 1
stop();
Symbol 1041 MovieClip Frame 2
stop();
Symbol 1041 MovieClip Frame 3
stop();
Symbol 1041 MovieClip Frame 4
stop();
Symbol 1041 MovieClip Frame 5
stop();
Symbol 1041 MovieClip Frame 6
stop();
Symbol 1041 MovieClip Frame 7
stop();
Symbol 1041 MovieClip Frame 8
stop();
Symbol 1041 MovieClip Frame 9
stop();
Symbol 1041 MovieClip Frame 10
stop();
Symbol 1041 MovieClip Frame 11
stop();
Symbol 1041 MovieClip Frame 12
stop();
Symbol 1041 MovieClip Frame 13
stop();
Instance of Symbol 1041 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
parent = _parent._parent._parent;
if (parent.hatchance == undefined) {
parent.hatchance = random(3);
}
if (parent.theme == "Cowboy") {
parent.hatchance = 7;
}
if (parent.theme == "Robot") {
parent.hatchance = 8;
}
if (parent.theme == "funky") {
parent.hatchance = 5;
}
if (parent.theme == "odd") {
parent.hatchance = 2;
}
this.gotoAndStop(parent.hatchance + 1);
}
onClipEvent (enterFrame) {
if (parent.theme == "Cowboy") {
parent.hatchance = 7;
}
if (parent.theme == "Robot") {
parent.hatchance = 8;
}
if (parent.theme == "Pirate") {
parent.hatchance = 0;
}
if (parent.theme == "funky") {
parent.hatchance = 5;
}
if (parent.theme == "odd") {
parent.hatchance = 2;
}
this.gotoAndStop(parent.hatchance + 1);
}
Symbol 1063 MovieClip Frame 1
stop();
Symbol 1063 MovieClip Frame 2
stop();
Symbol 1063 MovieClip Frame 3
stop();
Symbol 1063 MovieClip Frame 4
stop();
Symbol 1063 MovieClip Frame 5
stop();
Symbol 1063 MovieClip Frame 6
stop();
Symbol 1063 MovieClip Frame 7
stop();
Instance of Symbol 1063 MovieClip in Symbol 1064 MovieClip Frame 1
onClipEvent (load) {
parent = _parent._parent._parent;
if (parent.beardchance == undefined) {
parent.beardchance = random(6);
}
this.gotoAndStop(parent.beardchance + 1);
if (parent.theme == "Cowboy") {
parent.beardchance = 0;
}
if (parent.theme == "Robot") {
parent.beardchance = 6;
}
if (parent.theme == "funky") {
parent.beardchance = 3;
}
if (parent.theme == "odd") {
parent.beardchance = 2;
}
}
onClipEvent (enterFrame) {
if (parent.theme == "Cowboy") {
parent.beardchance = 0;
}
if (parent.theme == "Robot") {
parent.beardchance = 6;
}
if (parent.theme == "Pirate") {
parent.beardchance = 0;
}
if (parent.theme == "funky") {
parent.beardchance = 3;
}
if (parent.theme == "odd") {
parent.beardchance = 2;
}
this.gotoAndStop(parent.beardchance + 1);
}
Symbol 1072 MovieClip Frame 1
stop();
Symbol 1072 MovieClip Frame 2
stop();
Symbol 1072 MovieClip Frame 3
stop();
Symbol 1078 MovieClip Frame 1
stop();
Symbol 1078 MovieClip Frame 2
stop();
Symbol 1078 MovieClip Frame 3
stop();
Symbol 1084 MovieClip Frame 1
stop();
Symbol 1084 MovieClip Frame 2
stop();
Symbol 1084 MovieClip Frame 3
stop();
Symbol 1091 MovieClip Frame 1
stop();
Instance of Symbol 1078 MovieClip in Symbol 1091 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!(_root.attention === _parent._parent._parent._parent._parent)) {
if (_parent._parent._parent._parent._parent.facing == "left") {
this.gotoAndStop(3);
}
if (!(_root.attention === _parent._parent._parent._parent._parent)) {
if (_parent._parent._parent._parent._parent.facing == "right") {
this.gotoAndStop(2);
}
}
}
}
Symbol 1091 MovieClip Frame 2
stop();
Symbol 1091 MovieClip Frame 3
stop();
Instance of Symbol 1084 MovieClip in Symbol 1091 MovieClip Frame 3
onClipEvent (enterFrame) {
if (!(_root.attention === _parent._parent._parent._parent._parent)) {
if (_parent._parent._parent._parent._parent.facing == "left") {
this.gotoAndStop(3);
}
if (!(_root.attention === _parent._parent._parent._parent._parent)) {
if (_parent._parent._parent._parent._parent.facing == "right") {
this.gotoAndStop(2);
}
}
}
}
Symbol 1091 MovieClip Frame 4
stop();
Symbol 1091 MovieClip Frame 5
stop();
Symbol 1091 MovieClip Frame 6
stop();
Symbol 1091 MovieClip Frame 7
stop();
Symbol 1091 MovieClip Frame 8
stop();
Symbol 1091 MovieClip Frame 9
stop();
Symbol 1091 MovieClip Frame 10
stop();
Symbol 1091 MovieClip Frame 11
stop();
Instance of Symbol 1091 MovieClip "o" in Symbol 1092 MovieClip Frame 1
onClipEvent (load) {
parent = _parent._parent._parent._parent;
if (parent.lefteyechance == undefined) {
parent.lefteyechance = random(4);
}
if (parent.theme == "Cowboy") {
parent.lefteyechance = 3;
}
if (parent.theme == "Robot") {
parent.lefteyechance = 8;
}
if (parent.theme == "funky") {
parent.lefteyechance = 4;
}
if (parent.theme == "odd") {
parent.lefteyechance = 2;
}
this.gotoAndStop(parent.lefteyechance + 1);
}
onClipEvent (enterFrame) {
if (parent.theme == "Cowboy") {
parent.lefteyechance = 3;
}
if (parent.theme == "Robot") {
parent.lefteyechance = 8;
}
if (parent.theme == "Pirate") {
parent.lefteyechance = 0;
}
if (parent.theme == "funky") {
parent.lefteyechance = 4;
}
if (parent.theme == "odd") {
parent.lefteyechance = 2;
}
this.gotoAndStop(parent.lefteyechance + 1);
}
Instance of Symbol 1072 MovieClip in Symbol 1093 MovieClip Frame 1
onClipEvent (enterFrame) {
a2 = _parent._parent._parent._y - _root.attention._y;
b2 = _parent._parent._parent._x - _root.attention._x;
angleA2 = Math.atan2(a2, b2);
degrees2 = angleA2 / (Math.PI/180);
setProperty(this, _rotation , degrees2);
}
onClipEvent (enterFrame) {
if (!(_root.attention === _parent._parent._parent)) {
if (_parent._parent._parent.facing == "left") {
this.gotoAndStop(3);
}
if (!(_root.attention === _parent._parent._parent)) {
if (_parent._parent._parent.facing == "right") {
this.gotoAndStop(2);
}
}
}
}
Instance of Symbol 1092 MovieClip in Symbol 1093 MovieClip Frame 1
onClipEvent (enterFrame) {
a2 = _parent._parent._parent._y - _root.attention._y;
b2 = _parent._parent._parent._x - _root.attention._x;
angleA2 = Math.atan2(a2, b2);
degrees2 = angleA2 / (Math.PI/180);
if (((this.o._currentframe == 1) or (this.o._currentframe == 3)) or (this.o._currentframe == 9)) {
setProperty(this, _rotation , degrees2);
}
}
Symbol 1108 MovieClip Frame 1
stop();
Instance of Symbol 838 MovieClip in Symbol 1108 MovieClip Frame 1
on (press) {
_parent.prevFrame();
}
Instance of Symbol 840 MovieClip in Symbol 1108 MovieClip Frame 1
on (press) {
_parent.nextFrame();
}
Symbol 1108 MovieClip Frame 2
stop();
Instance of Symbol 267 MovieClip in Symbol 1108 MovieClip Frame 2
onClipEvent (enterFrame) {
a2 = _parent._y - _root.attention._y;
b2 = _parent._x - _root.attention._x;
angleA2 = Math.atan2(a2, b2);
degrees2 = angleA2 / (Math.PI/180);
setProperty(this, _rotation , degrees2);
}
Symbol 1108 MovieClip Frame 3
stop();
Symbol 1108 MovieClip Frame 4
stop();
Symbol 1108 MovieClip Frame 5
stop();
Symbol 1108 MovieClip Frame 6
stop();
Symbol 1108 MovieClip Frame 7
stop();
Symbol 1108 MovieClip Frame 8
stop();
Symbol 1115 MovieClip Frame 1
onEnterFrame = function () {
if (_visible == false) {
sO = _root.selectedTeam.name;
if (sO == _root.team1.name) {
subject = _root.team1;
}
if (sO == _root.team2.name) {
subject = _root.team2;
}
if (sO == _root.team3.name) {
subject = _root.team3;
}
tN.text = subject.name;
p1N.text = subject.p1;
p2N.text = subject.p2;
p3N.text = subject.p3;
grave = subject.grave;
colour = subject.colour;
lefteyechance = subject.lefteyechance;
hatchance = subject.hatchance;
beardchance = subject.beardchance;
lefthandchance = subject.lefthandchance;
righthandchance = subject.righthandchance;
lefthairchance = subject.lefthairchance;
legchance = subject.legchance;
}
};
Instance of Symbol 855 MovieClip in Symbol 1115 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._visible == false) {
this.gotoAndStop(_parent.lefthandchance + 1);
}
}
onClipEvent (enterFrame) {
if (_parent._visible) {
_parent.lefthandchance = _currentframe - 1;
}
}
Instance of Symbol 867 MovieClip in Symbol 1115 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._visible == false) {
this.gotoAndStop(_parent.righthandchance + 1);
}
}
onClipEvent (enterFrame) {
if (_parent._visible) {
_parent.righthandchance = _currentframe - 1;
}
}
Instance of Symbol 871 MovieClip in Symbol 1115 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._visible == false) {
this.gotoAndStop(_parent.lefthairchance + 1);
}
}
onClipEvent (enterFrame) {
if (_parent._visible) {
_parent.lefthairchance = _currentframe - 1;
}
}
Instance of Symbol 885 MovieClip "mE" in Symbol 1115 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._visible == false) {
this.gotoAndStop(_parent.lefteyechance + 1);
}
if (_parent._visible) {
_parent.lefteyechance = _currentframe - 1;
}
}
Instance of Symbol 904 MovieClip in Symbol 1115 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._visible == false) {
this.gotoAndStop(_parent.hatchance + 1);
}
}
onClipEvent (enterFrame) {
if (_parent._visible) {
_parent.hatchance = this._currentframe - 1;
}
}
Instance of Symbol 937 MovieClip in Symbol 1115 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._visible == false) {
this.gotoAndStop(_parent.beardchance + 1);
}
}
onClipEvent (enterFrame) {
if (_parent._visible) {
_parent.beardchance = _currentframe - 1;
}
}
Instance of Symbol 953 MovieClip in Symbol 1115 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._visible == false) {
this.gotoAndStop(_parent.legchance + 1);
}
}
onClipEvent (enterFrame) {
if (_parent._visible) {
_parent.legchance = _currentframe - 1;
}
}
Instance of Symbol 747 MovieClip in Symbol 1115 MovieClip Frame 1
on (release) {
_root.loadGameSaveButton._visible = true;
_root.saveGameButton._visible = true;
_root.helpText = "";
_parent._visible = false;
_root.error2.start();
}
on (rollOver) {
_root.helpText = "Ignore all changes";
}
Instance of Symbol 1098 MovieClip in Symbol 1115 MovieClip Frame 1
on (rollOver) {
_root.helpText = "Keep current changes";
}
on (release) {
if (((_parent.team == _root.preSetTeam2.name) or (_parent.team == _root.preSetTeam3.name)) or (_parent.team == _root.preSetTeam1.name)) {
_root.helpText = "That team name is reserved";
_root.error.start();
return(undefined);
}
_root.loadGameSaveButton._visible = true;
_root.saveGameButton._visible = true;
_root.click.start();
_parent._parent.saveTempChanges();
_parent._visible = false;
}
Instance of Symbol 1108 MovieClip in Symbol 1115 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._visible == false) {
this.gotoAndStop(_parent.grave);
}
}
onClipEvent (enterFrame) {
if (_parent._visible) {
_parent.grave = this._currentframe;
}
}
Instance of Symbol 1110 MovieClip in Symbol 1115 MovieClip Frame 1
on (press) {
_parent.colour = "red";
}
Instance of Symbol 1112 MovieClip in Symbol 1115 MovieClip Frame 1
on (press) {
_parent.colour = "green";
}
Instance of Symbol 1114 MovieClip in Symbol 1115 MovieClip Frame 1
on (press) {
_parent.colour = "blue";
}
Instance of Symbol 1110 MovieClip in Symbol 1115 MovieClip Frame 1
on (press) {
_parent.colour = "purple";
}
Instance of Symbol 1114 MovieClip in Symbol 1115 MovieClip Frame 1
on (press) {
_parent.colour = "orange";
}
Instance of Symbol 1112 MovieClip in Symbol 1115 MovieClip Frame 1
on (press) {
_parent.colour = "black";
}
Symbol 1132 MovieClip Frame 1
stop();
Instance of Symbol 1119 MovieClip in Symbol 1132 MovieClip Frame 1
on (release) {
if (((_parent.team == _root.preSetTeam2.name) or (_parent.team == _root.preSetTeam3.name)) or (_parent.team == _root.preSetTeam1.name)) {
_root.helpText = "That team name is reserved";
_root.error.start();
}
if (((_parent.team == _root.team1.name) or (_parent.team == _root.team2.name)) or (_parent.team == _root.team3.name)) {
_root.helpText = "That team name has been taken, please choose another";
_root.error2.start();
} else if (((!(_parent.team === _root.preSetTeam2.name)) and (!(_parent.team === _root.preSetTeam3.name))) and (!(_parent.team === _root.preSetTeam1.name))) {
_parent.nextFrame();
_root.rollOver.start();
}
}
Instance of Symbol 747 MovieClip in Symbol 1132 MovieClip Frame 1
on (release) {
_parent._parent.forgetAll();
}
Symbol 1132 MovieClip Frame 2
stop();
_root.helpText = "Your team will consist of 3 pirates, name them";
Instance of Symbol 1119 MovieClip in Symbol 1132 MovieClip Frame 2
on (release) {
_root.rollOver.start();
_parent.nextFrame();
}
Symbol 1132 MovieClip Frame 3
stop();
_root.helpText = "Please select a team flag colour";
Instance of Symbol 1119 MovieClip in Symbol 1132 MovieClip Frame 3
on (release) {
if (_parent.colour == undefined) {
_root.helpText = "Please Choose a Team Colour";
_root.error2.start();
} else {
_root.rollOver.start();
_parent.nextFrame();
}
}
Instance of Symbol 1110 MovieClip in Symbol 1132 MovieClip Frame 3
on (press) {
_parent.colour = "red";
}
Instance of Symbol 1112 MovieClip in Symbol 1132 MovieClip Frame 3
on (press) {
_parent.colour = "green";
}
Instance of Symbol 1114 MovieClip in Symbol 1132 MovieClip Frame 3
on (press) {
_parent.colour = "blue";
}
Instance of Symbol 1110 MovieClip in Symbol 1132 MovieClip Frame 3
on (press) {
_parent.colour = "purple";
}
Instance of Symbol 1114 MovieClip in Symbol 1132 MovieClip Frame 3
on (press) {
_parent.colour = "orange";
}
Instance of Symbol 1112 MovieClip in Symbol 1132 MovieClip Frame 3
on (press) {
_parent.colour = "black";
}
Symbol 1132 MovieClip Frame 4
stop();
_root.helpText = "Customize your pirates appearance (1 out of 3)";
Instance of Symbol 1119 MovieClip in Symbol 1132 MovieClip Frame 4
on (release) {
_root.rollOver.start();
_parent.nextFrame();
}
Instance of Symbol 1094 MovieClip "dummy" in Symbol 1132 MovieClip Frame 4
onClipEvent (load) {
_parent.lefthandchance = 0;
_parent.hatchance = 0;
_parent.legchance = 0;
_parent.righthandchance = 0;
_parent.leftbeardchance = 0;
_parent.lefteyechance = 0;
_parent.beardchance = 0;
}
Instance of Symbol 885 MovieClip in Symbol 1132 MovieClip Frame 4
onClipEvent (enterFrame) {
_parent.lefteyechance = _currentframe - 1;
}
Instance of Symbol 904 MovieClip in Symbol 1132 MovieClip Frame 4
onClipEvent (enterFrame) {
_parent.hatchance = _currentframe - 1;
}
Instance of Symbol 937 MovieClip in Symbol 1132 MovieClip Frame 4
onClipEvent (enterFrame) {
_parent.beardchance = _currentframe - 1;
}
Symbol 1132 MovieClip Frame 5
stop();
_root.helpText = "Customize your pirates appearance (2 out of 3)";
Instance of Symbol 855 MovieClip in Symbol 1132 MovieClip Frame 5
onClipEvent (enterFrame) {
_parent.lefthandchance = _currentframe - 1;
}
Instance of Symbol 867 MovieClip in Symbol 1132 MovieClip Frame 5
onClipEvent (enterFrame) {
_parent.righthandchance = _currentframe - 1;
}
Instance of Symbol 871 MovieClip in Symbol 1132 MovieClip Frame 5
onClipEvent (enterFrame) {
_parent.lefthairchance = _currentframe - 1;
}
Symbol 1132 MovieClip Frame 6
stop();
_root.helpText = "Customize your pirates appearance (3 out of 3)";
Instance of Symbol 953 MovieClip in Symbol 1132 MovieClip Frame 6
onClipEvent (enterFrame) {
_parent.legchance = _currentframe - 1;
}
Symbol 1132 MovieClip Frame 7
stop();
_root.helpText = "Choose a team grave";
Instance of Symbol 1108 MovieClip in Symbol 1132 MovieClip Frame 7
onClipEvent (enterFrame) {
_parent.grave = _currentframe;
}
Symbol 1132 MovieClip Frame 8
stop();
info = (("You are now creating the team <B>" add team) add "</B>") add " are you sure you want to continue?";
_root.helpText = "Are you sure you want to continue? If not click the X";
Instance of Symbol 1119 MovieClip in Symbol 1132 MovieClip Frame 8
on (release) {
_root.click.start();
_parent._parent.createNewTeam();
_parent._parent.forgetAll();
}
Symbol 1138 MovieClip Frame 1
info = (("Are you sure you want to <B>delete </B>the team <B>" add _root.selectedTeam.name) add "</B>") add "?";
Instance of Symbol 1134 MovieClip in Symbol 1138 MovieClip Frame 1
on (press) {
_parent._parent.deleteTeam();
}
Instance of Symbol 1135 MovieClip in Symbol 1138 MovieClip Frame 1
on (press) {
_parent._visible = false;
}
Symbol 1138 MovieClip Frame 2
gotoAndPlay (1);
Symbol 1139 MovieClip Frame 1
function createNewTeam() {
if (!teamListScroller.Menu_GS_t3._visible) {
_root.teamListNumber = 2;
}
if (!teamListScroller.Menu_GS_t2._visible) {
_root.teamListNumber = 1;
}
if (!teamListScroller.Menu_GS_t1._visible) {
_root.teamListNumber = 0;
}
if (_root.teamListNumber == 0) {
_root.team1 = new Object();
_root.team1.name = teamMaker.team;
_root.team1.p1 = teamMaker.p1;
_root.team1.p2 = teamMaker.p2;
_root.team1.p3 = teamMaker.p3;
_root.team1.grave = teamMaker.grave;
_root.team1.lefteyechance = teamMaker.lefteyechance;
_root.team1.hatchance = teamMaker.hatchance;
_root.team1.beardchance = teamMaker.beardchance;
_root.team1.lefthandchance = teamMaker.lefthandchance;
_root.team1.righthandchance = teamMaker.righthandchance;
_root.team1.lefthairchance = teamMaker.lefthairchance;
_root.team1.legchance = teamMaker.legchance;
_root.team1.colour = teamMaker.colour;
}
if (_root.teamListNumber == 1) {
_root.team2 = new Object();
_root.team2.name = teamMaker.team;
_root.team2.p1 = teamMaker.p1;
_root.team2.p2 = teamMaker.p2;
_root.team2.p3 = teamMaker.p3;
_root.team2.grave = teamMaker.grave;
_root.team2.lefteyechance = teamMaker.lefteyechance;
_root.team2.hatchance = teamMaker.hatchance;
_root.team2.beardchance = teamMaker.beardchance;
_root.team2.lefthandchance = teamMaker.lefthandchance;
_root.team2.righthandchance = teamMaker.righthandchance;
_root.team2.lefthairchance = teamMaker.lefthairchance;
_root.team2.legchance = teamMaker.legchance;
_root.team2.colour = teamMaker.colour;
}
if (_root.teamListNumber == 2) {
_root.team3 = new Object();
_root.team3.name = teamMaker.team;
_root.team3.p1 = teamMaker.p1;
_root.team3.p2 = teamMaker.p2;
_root.team3.p3 = teamMaker.p3;
_root.team3.grave = teamMaker.grave;
_root.team3.lefteyechance = teamMaker.lefteyechance;
_root.team3.hatchance = teamMaker.hatchance;
_root.team3.beardchance = teamMaker.beardchance;
_root.team3.lefthandchance = teamMaker.lefthandchance;
_root.team3.righthandchance = teamMaker.righthandchance;
_root.team3.lefthairchance = teamMaker.lefthairchance;
_root.team3.legchance = teamMaker.legchance;
_root.team3.colour = teamMaker.colour;
}
}
function forgetAll() {
teamMaker.team = "TEAM NAME HERE";
teamMaker.p1 = "Pirate 1";
teamMaker.p2 = "Pirate 2";
teamMaker.p3 = "Pirate 3";
teamMaker.lefteyechance = 0;
teamMaker.hatchance = 0;
teamMaker.beardchance = 0;
teamMaker.lefthandchance = 0;
teamMaker.righthandchance = 0;
teamMaker.lefthairchance = 0;
teamMaker.legchance = 0;
teamMaker.grave = 1;
teamMaker._visible = false;
teamMaker.colour = undefined;
teamMaker.gotoAndStop(1);
}
function deleteTeam() {
if (_root.selectedTeam == _root.team1) {
teamList.removeItemAt(0);
_root.team1 = undefined;
_root.teamListNumber = 0;
}
if (_root.selectedTeam == _root.team2) {
teamList.removeItemAt(selectedObject);
_root.team2 = undefined;
_root.teamListNumber = 1;
}
if (_root.selectedTeam == _root.team3) {
teamList.removeItemAt(selectedObject);
_root.team3 = undefined;
_root.teamListNumber = 2;
}
_root.selectedTeam = undefined;
warning._visible = false;
_root.helpText = "Team deleted";
}
function saveTempChanges() {
if (_root.selectedTeam == _root.team1) {
_root.team1.name = modifyTeam.team;
_root.team1.p1 = modifyTeam.p1;
_root.team1.p2 = modifyTeam.p2;
_root.team1.p3 = modifyTeam.p3;
_root.team1.grave = modifyTeam.grave;
_root.team1.lefteyechance = modifyTeam.lefteyechance;
_root.team1.hatchance = modifyTeam.hatchance;
_root.team1.beardchance = modifyTeam.beardchance;
_root.team1.lefthandchance = modifyTeam.lefthandchance;
_root.team1.righthandchance = modifyTeam.righthandchance;
_root.team1.lefthairchance = modifyTeam.lefthairchance;
_root.team1.legchance = modifyTeam.legchance;
_root.team1.colour = modifyTeam.colour;
}
if (_root.selectedTeam == _root.team2) {
_root.team2.name = modifyTeam.team;
_root.team2.p1 = modifyTeam.p1;
_root.team2.p2 = modifyTeam.p2;
_root.team2.p3 = modifyTeam.p3;
_root.team2.grave = modifyTeam.grave;
_root.team2.lefteyechance = modifyTeam.lefteyechance;
_root.team2.hatchance = modifyTeam.hatchance;
_root.team2.beardchance = modifyTeam.beardchance;
_root.team2.lefthandchance = modifyTeam.lefthandchance;
_root.team2.righthandchance = modifyTeam.righthandchance;
_root.team2.lefthairchance = modifyTeam.lefthairchance;
_root.team2.legchance = modifyTeam.legchance;
_root.team2.colour = modifyTeam.colour;
}
if (_root.selectedTeam == _root.team3) {
_root.team3.name = modifyTeam.team;
_root.team3.p1 = modifyTeam.p1;
_root.team3.p2 = modifyTeam.p2;
_root.team3.p3 = modifyTeam.p3;
_root.team4.grave = modifyTeam.grave;
_root.team3.lefteyechance = modifyTeam.lefteyechance;
_root.team3.hatchance = modifyTeam.hatchance;
_root.team3.beardchance = modifyTeam.beardchance;
_root.team3.lefthandchance = modifyTeam.lefthandchance;
_root.team3.righthandchance = modifyTeam.righthandchance;
_root.team3.lefthairchance = modifyTeam.lefthairchance;
_root.team3.legchance = modifyTeam.legchance;
_root.team3.colour = modifyTeam.colour;
}
}
maximumTeams = 3;
Instance of Symbol 817 MovieClip in Symbol 1139 MovieClip Frame 1
onClipEvent (load) {
full = false;
}
on (rollOver) {
if (!_parent.teamMaker._visible) {
if (!_parent.modifyTeam._visible) {
if (!_parent.warning._visible) {
_root.helpText = "Create a new Team";
}
}
}
}
onClipEvent (enterFrame) {
if ((_parent.teamListScroller.Menu_GS_t1._visible and _parent.teamListScroller.Menu_GS_t2._visible) and _parent.teamListScroller.Menu_GS_t3._visible) {
full = true;
} else {
full = false;
}
}
on (press) {
if (!_parent.warning._visible) {
if (full == false) {
if (!_parent.teamMaker._visible) {
if (!_parent.modifyTeam._visible) {
_root.helpText = "Select a name for your new Team";
_parent.teamMaker._visible = true;
}
}
}
}
if (full) {
_root.helpText = ("You can only create " add _parent.maximumTeams) add " teams";
}
}
Instance of Symbol 819 MovieClip in Symbol 1139 MovieClip Frame 1
on (rollOver) {
if (!_parent.teamMaker._visible) {
if (!_parent.modifyTeam._visible) {
if (!_parent.warning._visible) {
_root.helpText = "Delete selected Team";
}
}
}
}
on (press) {
if (!(_root.selectedTeam === undefined)) {
if (!_parent.warning._visible) {
if (!_parent.modifyTeam._visible) {
if (!_parent.teamMaker._visible) {
_parent.warning._visible = true;
}
}
}
}
if (_root.selectedTeam == undefined) {
if (!_parent.teamMaker._visible) {
if (!_parent.warning._visible) {
if (!_parent.modifyTeam._visible) {
_root.helpText = "You have not selected a team to delete";
}
}
}
}
}
Instance of Symbol 823 MovieClip in Symbol 1139 MovieClip Frame 1
on (rollOver) {
if (!_parent.teamMaker._visible) {
if (!_parent.modifyTeam._visible) {
if (!_parent.warning._visible) {
_root.helpText = "Modify selected Team";
}
}
}
}
onClipEvent (load) {
onenabled = false;
}
onClipEvent (enterFrame) {
if (_root.selectedTeam == undefined) {
onenabled = false;
this.gotoAndStop(1);
} else {
onenabled = true;
this.gotoAndStop(2);
}
}
on (press) {
if (!onenabled) {
if (!_parent.teamMaker._visible) {
if (!_parent.modifyTeam._visible) {
if (!_parent.warning._visible) {
_root.helpText = "Please select a team to modify";
_root.error2.start();
}
}
}
} else if (!(_root.selectedTeam === undefined)) {
_parent.modifyTeam._visible = true;
_parent.modifyTeam.selectedObject = _root.selectedTeam;
_root.helpText = "Modifying Team " add _root.selectedTeam.name;
_root.click.start();
}
}
Instance of Symbol 1115 MovieClip "modifyTeam" in Symbol 1139 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 1132 MovieClip "teamMaker" in Symbol 1139 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 1138 MovieClip "warning" in Symbol 1139 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 747 MovieClip in Symbol 1159 MovieClip Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_root.cursor)) {
_parent._parent._visible = false;
}
}
on (release) {
_parent._parent._visible = false;
}
on (press) {
_parent._parent._visible = false;
}
Instance of Symbol 1159 MovieClip in Symbol 1160 MovieClip Frame 1
on (press) {
fakeCommandHere();
}
Instance of Symbol 1145 MovieClip in Symbol 1161 MovieClip Frame 1
on (press) {
System.showSettings(1);
}
Instance of Symbol 1148 MovieClip in Symbol 1161 MovieClip Frame 1
on (press) {
_root.click.start();
_root.showWarning2();
}
Instance of Symbol 1150 MovieClip in Symbol 1161 MovieClip Frame 1
on (press) {
_root.click.start();
_root.loadGame();
}
Instance of Symbol 1152 MovieClip in Symbol 1161 MovieClip Frame 1
on (press) {
_root.click.start();
_root.checkSavedGame();
}
Instance of Symbol 1155 MovieClip in Symbol 1161 MovieClip Frame 1
on (press) {
_root.click.start();
_parent.Tshooter._visible = true;
}
Instance of Symbol 1160 MovieClip "Tshooter" in Symbol 1161 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 1168 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.gameMode = "Quick Game";
_root.createBoom();
}
Symbol 1177 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.cannonFire.start();
_root.gotoAndStop("1PlayerModeSetup");
}
Symbol 1178 Button
on (rollOver) {
_root.rollOver.start();
}
on (press) {
_root.cannonFire.start();
_root.gotoAndStop("2PlayerModeSetup");
}
Symbol 1183 MovieClip Frame 1
stop();
Symbol 1183 MovieClip Frame 2
stop();
Instance of Symbol 1183 MovieClip "Menu_GS_t1" in Symbol 1185 MovieClip Frame 1
onClipEvent (load) {
teamName = _root.preSetTeam1.name;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1183 MovieClip "Menu_GS_t2" in Symbol 1185 MovieClip Frame 1
onClipEvent (load) {
teamName = _root.preSetTeam2.name;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1183 MovieClip "Menu_GS_t3" in Symbol 1185 MovieClip Frame 1
onClipEvent (load) {
teamName = _root.preSetTeam3.name;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1183 MovieClip "Menu_GS_t4" in Symbol 1185 MovieClip Frame 1
onClipEvent (load) {
teamName = _root.preSetTeam4.name;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1183 MovieClip "Menu_GS_t5" in Symbol 1185 MovieClip Frame 1
onClipEvent (load) {
teamName = _root.preSetTeam5.name;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1183 MovieClip "Menu_GS_t6" in Symbol 1185 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.team1.name === undefined)) {
teamName = _root.team1.name;
} else {
_visible = false;
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1183 MovieClip "Menu_GS_t7" in Symbol 1185 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.team2.name === undefined)) {
teamName = _root.team2.name;
} else {
_visible = false;
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1183 MovieClip "Menu_GS_t8" in Symbol 1185 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.team3.name === undefined)) {
teamName = _root.team3.name;
} else {
_visible = false;
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
}
}
}
Instance of Symbol 1206 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) {
if (_root.timeDisplay == undefined) {
_root.timeDisplay = 10;
}
max = 65;
}
on (press) {
if (_root.timeDisplay == "\u03A9") {
_root.timeDisplay = 5;
}
if (_root.timeDisplay < max) {
_root.timeDisplay = _root.timeDisplay + 5;
if (_root.timeDisplay >= max) {
_root.timeDisplay = "\u03A9";
}
}
_root.rollOver.start();
}
on (rollOver) {
_root.helpText = "Click to change the game turn-time";
}
Instance of Symbol 1240 MovieClip in Symbol 1266 MovieClip Frame 1
onClipEvent (load) {
function goDown() {
target.setRGB(10040319);
}
function goUp() {
target.setRGB(16777215);
}
target = new Color(this);
}
Symbol 1331 MovieClip Frame 1
stop();
Symbol 1331 MovieClip Frame 2
stop();
Symbol 1331 MovieClip Frame 3
stop();
Symbol 1331 MovieClip Frame 4
stop();
Symbol 1331 MovieClip Frame 5
stop();
Instance of Symbol 1276 MovieClip "water" in Symbol 1331 MovieClip Frame 5
onClipEvent (load) {
function goUp() {
YS = YS + wetness;
}
rate = 0.3;
fakeYS = _yscale;
YS = _yscale;
wetness = 5;
}
onClipEvent (enterFrame) {
if (fakeYS < YS) {
fakeYS = fakeYS + rate;
}
_yscale = fakeYS;
}
Symbol 1331 MovieClip Frame 6
stop();
Symbol 1331 MovieClip Frame 7
stop();
Symbol 1331 MovieClip Frame 8
stop();
Symbol 1331 MovieClip Frame 9
stop();
Instance of Symbol 1302 MovieClip in Symbol 1331 MovieClip Frame 9
onClipEvent (enterFrame) {
_rotation = (_rotation + 2);
}
Instance of Symbol 1304 MovieClip in Symbol 1331 MovieClip Frame 9
onClipEvent (enterFrame) {
_rotation = (_rotation + 15);
}
Symbol 1331 MovieClip Frame 10
stop();
Symbol 1331 MovieClip Frame 11
stop();
Symbol 1331 MovieClip Frame 12
stop();
Symbol 1337 MovieClip Frame 1
stop();
Symbol 1337 MovieClip Frame 2
stop();
_parent._parent.levelPreview.mapName = mapName;
Instance of Symbol 1334 MovieClip in Symbol 1337 MovieClip Frame 2
onClipEvent (load) {
myX = _parent.mapName.length;
_xscale = (myX * 9);
}
Symbol 1337 MovieClip Frame 3
stop();
Instance of Symbol 1337 MovieClip in Symbol 1338 MovieClip Frame 1
onClipEvent (load) {
mapName = "The Moon";
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1338 MovieClip Frame 1
onClipEvent (load) {
mapName = "Indirect Fight";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1338 MovieClip Frame 1
onClipEvent (load) {
mapName = "PegLeg Island";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1338 MovieClip Frame 1
onClipEvent (load) {
mapName = "Artic Fight";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1338 MovieClip Frame 1
onClipEvent (load) {
mapName = "Movie Theatre";
_parent._parent._parent.selectedMap = mapName;
keyword = mapName;
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
this.gotoAndStop(3);
}
}
on (rollOver) {
if (!locked) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
}
on (rollOut) {
if (!locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
if (!locked) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1338 MovieClip Frame 1
onClipEvent (load) {
mapName = "Random";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1338 MovieClip Frame 1
onClipEvent (load) {
mapName = "Ghost Ship";
_parent._parent._parent.selectedMap = mapName;
keyword = mapName;
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
this.gotoAndStop(3);
}
}
on (rollOver) {
if (!locked) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
}
on (rollOut) {
if (!locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
if (!locked) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
}
Instance of Symbol 1331 MovieClip "levelPreview" in Symbol 1339 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.selectedMap === undefined)) {
mapName = _root.selectedMap;
}
if (mapName == "Wet Weather") {
this.gotoAndStop(1);
}
if (mapName == "The Moon") {
this.gotoAndStop(2);
}
if (mapName == "Music Room") {
this.gotoAndStop(3);
}
if (mapName == "The Terminal") {
this.gotoAndStop(4);
}
if (mapName == "Pirate Bay") {
this.gotoAndStop(5);
}
if (mapName == "Indirect Fight") {
this.gotoAndStop(6);
}
if (mapName == "Random") {
this.gotoAndStop(7);
}
if (mapName == "Movie Theatre") {
this.gotoAndStop(8);
}
if (mapName == "Big Ben") {
this.gotoAndStop(9);
}
if (mapName == "Ghost Ship") {
this.gotoAndStop(10);
}
if (mapName == "PegLeg Island") {
this.gotoAndStop(11);
}
if (mapName == "Artic Fight") {
this.gotoAndStop(12);
}
}
onClipEvent (enterFrame) {
if (_root._currentframe == 60) {
if (mapName == "Wet Weather") {
this.gotoAndStop(1);
}
if (mapName == "The Moon") {
this.gotoAndStop(2);
}
if (mapName == "Music Room") {
this.gotoAndStop(3);
}
if (mapName == "The Terminal") {
this.gotoAndStop(4);
}
if (mapName == "Pirate Bay") {
this.gotoAndStop(5);
}
if (mapName == "Indirect Fight") {
this.gotoAndStop(6);
}
if (mapName == "Random") {
this.gotoAndStop(7);
}
if (mapName == "Movie Theatre") {
this.gotoAndStop(8);
}
if (mapName == "Big Ben") {
this.gotoAndStop(9);
}
if (mapName == "Ghost Ship") {
this.gotoAndStop(10);
}
if (mapName == "PegLeg Island") {
this.gotoAndStop(11);
}
if (mapName == "Artic Fight") {
this.gotoAndStop(12);
}
}
if (!(_root._currentframe === 60)) {
if (_root.selectedMap == "Wet Weather") {
this.gotoAndStop(1);
}
if (_root.selectedMap == "The Moon") {
this.gotoAndStop(2);
}
if (_root.selectedMap == "Music Room") {
this.gotoAndStop(3);
}
if (_root.selectedMap == "The Terminal") {
this.gotoAndStop(4);
}
if (_root.selectedMap == "Pirate Bay") {
this.gotoAndStop(5);
}
if (_root.selectedMap == "Indirect Fight") {
this.gotoAndStop(6);
}
if (_root.selectedMap == "Random") {
this.gotoAndStop(7);
}
if (_root.selectedMap == "Movie Theatre") {
this.gotoAndStop(8);
}
if (_root.selectedMap == "Big Ben") {
this.gotoAndStop(9);
}
if (_root.selectedMap == "Ghost Ship") {
this.gotoAndStop(10);
}
if (_root.selectedMap == "PegLeg Island") {
this.gotoAndStop(11);
}
if (_root.selectedMap == "Artic Fight") {
this.gotoAndStop(12);
}
}
}
Instance of Symbol 1211 MovieClip in Symbol 1345 MovieClip Frame 1
onClipEvent (load) {
over = false;
down = false;
time = 0;
delay = 8;
max = undefined;
}
on (press) {
if (_parent.LevelHolderPreview.levelHolder._y <= max) {
_parent.LevelHolderPreview.levelHolder._y = _parent.LevelHolderPreview.levelHolder._y - 5;
}
}
on (rollOver) {
over = true;
_root.rollOver.start();
}
on (rollOut) {
over = false;
down = false;
time = 0;
}
on (dragOut) {
over = false;
down = false;
time = 0;
}
onClipEvent (mouseDown) {
if (over) {
down = true;
}
}
onClipEvent (mouseUp) {
down = false;
time = 0;
}
onClipEvent (enterFrame) {
if (down) {
time++;
if (time >= delay) {
if (_parent.LevelHolderPreview.levelHolder._y <= max) {
_parent.LevelHolderPreview.levelHolder._y = _parent.LevelHolderPreview.levelHolder._y - 5;
}
}
}
}
Instance of Symbol 1211 MovieClip in Symbol 1345 MovieClip Frame 1
onClipEvent (load) {
over = false;
down = false;
time = 0;
delay = 8;
max = 56.05;
}
on (press) {
if (_parent.LevelHolderPreview.levelHolder._y <= max) {
_parent.LevelHolderPreview.levelHolder._y = _parent.LevelHolderPreview.levelHolder._y + 5;
}
}
on (rollOver) {
over = true;
_root.rollOver.start();
}
on (rollOut) {
over = false;
down = false;
time = 0;
}
on (dragOut) {
over = false;
down = false;
time = 0;
}
onClipEvent (mouseDown) {
if (over) {
down = true;
}
}
onClipEvent (mouseUp) {
down = false;
time = 0;
}
onClipEvent (enterFrame) {
if (down) {
time++;
if (time >= delay) {
if (_parent.LevelHolderPreview.levelHolder._y <= max) {
_parent.LevelHolderPreview.levelHolder._y = _parent.LevelHolderPreview.levelHolder._y + 5;
}
}
}
}
Symbol 1349 MovieClip Frame 1
stop();
Symbol 1349 MovieClip Frame 2
stop();
Instance of Symbol 1349 MovieClip "Menu_GS_t4" in Symbol 1351 MovieClip Frame 1
onClipEvent (load) {
teamName = _root.preSetTeam4.name;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1349 MovieClip "Menu_GS_t5" in Symbol 1351 MovieClip Frame 1
onClipEvent (load) {
teamName = _root.preSetTeam5.name;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1349 MovieClip "Menu_GS_t6" in Symbol 1351 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.team1.name === undefined)) {
teamName = _root.team1.name;
} else {
_visible = false;
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1349 MovieClip "Menu_GS_t7" in Symbol 1351 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.team2.name === undefined)) {
teamName = _root.team2.name;
} else {
_visible = false;
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t8.gotoAndStop(1);
}
}
}
Instance of Symbol 1349 MovieClip "Menu_GS_t8" in Symbol 1351 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.team3.name === undefined)) {
teamName = _root.team3.name;
} else {
_visible = false;
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
if (!(_parent._parent.cST === teamName)) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent.myBarrier2thing)) {
_parent._parent.cST = teamName;
_parent.Menu_GS_t2.gotoAndStop(1);
_parent.Menu_GS_t3.gotoAndStop(1);
_parent.Menu_GS_t4.gotoAndStop(1);
_parent.Menu_GS_t1.gotoAndStop(1);
_parent.Menu_GS_t6.gotoAndStop(1);
_parent.Menu_GS_t7.gotoAndStop(1);
_parent.Menu_GS_t5.gotoAndStop(1);
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
mapName = "Music Room";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
mapName = "The Moon";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
if (!(_root._currentframe === _root.Stage3)) {
_visible = false;
}
mapName = "Pirate Bay";
_parent._parent._parent.selectedMap = mapName;
keyword = mapName;
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
this.gotoAndStop(3);
}
}
on (rollOver) {
if (!locked) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
}
on (rollOut) {
if (!locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
if (!locked) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
}
onClipEvent (enterFrame) {
if (!(_root._currentframe === _root.Stage3)) {
_visible = false;
} else if (!locked) {
_visible = true;
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
mapName = "Indirect Fight";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
mapName = "Random";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
if (!(_root._currentframe === _root.Stage3)) {
_visible = false;
}
mapName = "Movie Theatre";
_parent._parent._parent.selectedMap = mapName;
keyword = mapName;
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
this.gotoAndStop(3);
}
}
on (rollOver) {
if (!locked) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
}
on (rollOut) {
if (!locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
if (!locked) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
}
onClipEvent (enterFrame) {
if (!(_root._currentframe === _root.Stage3)) {
_visible = false;
} else if (!locked) {
_visible = true;
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
if (!(_root._currentframe === _root.Stage3)) {
_visible = false;
}
mapName = "Ghost Ship";
_parent._parent._parent.selectedMap = mapName;
keyword = mapName;
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
this.gotoAndStop(3);
}
}
on (rollOver) {
if (!locked) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
}
on (rollOut) {
if (!locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
if (!locked) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
}
onClipEvent (enterFrame) {
if (!(_root._currentframe === _root.Stage3)) {
_visible = false;
} else if (!locked) {
_visible = true;
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
if (!(_root._currentframe === _root.Stage3)) {
_visible = false;
}
mapName = "Big Ben";
_parent._parent._parent.selectedMap = mapName;
keyword = mapName;
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
this.gotoAndStop(3);
}
}
on (rollOver) {
if (!locked) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
}
on (rollOut) {
if (!locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
if (!locked) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
}
onClipEvent (enterFrame) {
if (!(_root._currentframe === _root.Stage3)) {
_visible = false;
} else if (!locked) {
_visible = true;
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
mapName = "PegLeg Island";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
mapName = "Artic Fight";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1337 MovieClip in Symbol 1363 MovieClip Frame 1
onClipEvent (load) {
mapName = "Wet Weather";
_parent._parent._parent.selectedMap = mapName;
}
on (rollOver) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
this.gotoAndStop(2);
}
}
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (!this.hitTest(_parent._parent._parent.myBarrier1thing)) {
if (!this.hitTest(_parent._parent._parent.myBarrier2thing)) {
_root.selectedMap = mapName;
_root.click.start();
}
}
}
Instance of Symbol 1331 MovieClip "levelPreview" in Symbol 1364 MovieClip Frame 1
onClipEvent (load) {
if (!(_root.selectedMap === undefined)) {
mapName = _root.selectedMap;
}
if (mapName == "Wet Weather") {
this.gotoAndStop(1);
}
if (mapName == "The Moon") {
this.gotoAndStop(2);
}
if (mapName == "Music Room") {
this.gotoAndStop(3);
}
if (mapName == "The Terminal") {
this.gotoAndStop(4);
}
if (mapName == "Pirate Bay") {
this.gotoAndStop(5);
}
if (mapName == "Indirect Fight") {
this.gotoAndStop(6);
}
if (mapName == "Random") {
this.gotoAndStop(7);
}
if (mapName == "Movie Theatre") {
this.gotoAndStop(8);
}
if (mapName == "Big Ben") {
this.gotoAndStop(9);
}
if (mapName == "Ghost Ship") {
this.gotoAndStop(10);
}
if (mapName == "PegLeg Island") {
this.gotoAndStop(11);
}
if (mapName == "Artic Fight") {
this.gotoAndStop(12);
}
}
onClipEvent (enterFrame) {
if (_root._currentframe == 60) {
if (mapName == "Wet Weather") {
this.gotoAndStop(1);
}
if (mapName == "The Moon") {
this.gotoAndStop(2);
}
if (mapName == "Music Room") {
this.gotoAndStop(3);
}
if (mapName == "The Terminal") {
this.gotoAndStop(4);
}
if (mapName == "Pirate Bay") {
this.gotoAndStop(5);
}
if (mapName == "Indirect Fight") {
this.gotoAndStop(6);
}
if (mapName == "Random") {
this.gotoAndStop(7);
}
if (mapName == "Movie Theatre") {
this.gotoAndStop(8);
}
if (mapName == "Big Ben") {
this.gotoAndStop(9);
}
if (mapName == "Ghost Ship") {
this.gotoAndStop(10);
}
if (mapName == "PegLeg Island") {
this.gotoAndStop(11);
}
if (mapName == "Artic Fight") {
this.gotoAndStop(12);
}
}
if (!(_root._currentframe === 60)) {
if (_root.selectedMap == "Wet Weather") {
this.gotoAndStop(1);
}
if (_root.selectedMap == "The Moon") {
this.gotoAndStop(2);
}
if (_root.selectedMap == "Music Room") {
this.gotoAndStop(3);
}
if (_root.selectedMap == "The Terminal") {
this.gotoAndStop(4);
}
if (_root.selectedMap == "Pirate Bay") {
this.gotoAndStop(5);
}
if (_root.selectedMap == "Indirect Fight") {
this.gotoAndStop(6);
}
if (_root.selectedMap == "Random") {
this.gotoAndStop(7);
}
if (_root.selectedMap == "Movie Theatre") {
this.gotoAndStop(8);
}
if (_root.selectedMap == "Big Ben") {
this.gotoAndStop(9);
}
if (_root.selectedMap == "Ghost Ship") {
this.gotoAndStop(10);
}
if (_root.selectedMap == "PegLeg Island") {
this.gotoAndStop(11);
}
if (_root.selectedMap == "Artic Fight") {
this.gotoAndStop(12);
}
}
}
Instance of Symbol 1211 MovieClip in Symbol 1365 MovieClip Frame 1
onClipEvent (load) {
over = false;
down = false;
time = 0;
delay = 8;
max = undefined;
}
on (press) {
if (_parent.LevelHolderPreview.levelHolder._y <= max) {
_parent.LevelHolderPreview.levelHolder._y = _parent.LevelHolderPreview.levelHolder._y - 5;
}
}
on (rollOver) {
over = true;
_root.rollOver.start();
}
on (rollOut) {
over = false;
down = false;
time = 0;
}
on (dragOut) {
over = false;
down = false;
time = 0;
}
onClipEvent (mouseDown) {
if (over) {
down = true;
}
}
onClipEvent (mouseUp) {
down = false;
time = 0;
}
onClipEvent (enterFrame) {
if (down) {
time++;
if (time >= delay) {
if (_parent.LevelHolderPreview.levelHolder._y <= max) {
_parent.LevelHolderPreview.levelHolder._y = _parent.LevelHolderPreview.levelHolder._y - 5;
}
}
}
}
Instance of Symbol 1211 MovieClip in Symbol 1365 MovieClip Frame 1
onClipEvent (load) {
over = false;
down = false;
time = 0;
delay = 8;
max = 56.05;
}
on (press) {
if (_parent.LevelHolderPreview.levelHolder._y <= max) {
_parent.LevelHolderPreview.levelHolder._y = _parent.LevelHolderPreview.levelHolder._y + 5;
}
}
on (rollOver) {
over = true;
_root.rollOver.start();
}
on (rollOut) {
over = false;
down = false;
time = 0;
}
on (dragOut) {
over = false;
down = false;
time = 0;
}
onClipEvent (mouseDown) {
if (over) {
down = true;
}
}
onClipEvent (mouseUp) {
down = false;
time = 0;
}
onClipEvent (enterFrame) {
if (down) {
time++;
if (time >= delay) {
if (_parent.LevelHolderPreview.levelHolder._y <= max) {
_parent.LevelHolderPreview.levelHolder._y = _parent.LevelHolderPreview.levelHolder._y + 5;
}
}
}
}
Symbol 1382 MovieClip Frame 1
stop();
Symbol 1382 MovieClip Frame 2
stop();
Instance of Symbol 1381 MovieClip in Symbol 1382 MovieClip Frame 2
on (press) {
stopAllSounds();
_parent.decideLocation();
}
Symbol 1417 MovieClip Frame 1
stop();
stop();
Instance of Symbol 1409 MovieClip in Symbol 1417 MovieClip Frame 5
onClipEvent (load) {
_root.chargeUp.start();
}
onClipEvent (enterFrame) {
if (Key.isDown(39) or Key.isDown(37)) {
_root.chargeUp.stop();
}
}
Symbol 1417 MovieClip Frame 41
stop();
_parent._parent._parent.FIRENOW = true;
_root.chargeUp.stop();
Symbol 1464 MovieClip Frame 4
_parent._parent._parent._parent._parent.fireShotgun();
Symbol 1464 MovieClip Frame 25
_parent._parent.gotoAndStop(1);
Symbol 1465 MovieClip Frame 1
stop();
Symbol 1465 MovieClip Frame 2
stop();
Symbol 1475 MovieClip Frame 1
stop();
if (_parent._parent._parent.weaponOut == "homingMissile1") {
gotoAndStop (2);
}
Symbol 1475 MovieClip Frame 2
stop();
_parent._parent._parent.weaponOut = "homingMissile1";
Instance of Symbol 1428 MovieClip in Symbol 1475 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.attention == _parent._parent._parent._parent) {
if (_parent._parent._parent._parent.weaponOut == "homingMissile1") {
_root.InGameCursor.gotoAndStop(2);
}
}
}
Symbol 1475 MovieClip Frame 3
stop();
Symbol 1475 MovieClip Frame 4
stop();
Symbol 1475 MovieClip Frame 5
stop();
Symbol 1475 MovieClip Frame 6
stop();
Symbol 1475 MovieClip Frame 7
stop();
Instance of Symbol 1436 MovieClip in Symbol 1475 MovieClip Frame 7
onClipEvent (enterFrame) {
if (_root.attention == _parent._parent._parent._parent) {
if (_parent._parent._parent._parent.weaponOut == "airStrike1") {
_root.InGameCursor.gotoAndStop(3);
}
}
}
Symbol 1475 MovieClip Frame 8
stop();
Instance of Symbol 1465 MovieClip in Symbol 1475 MovieClip Frame 8
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
if (_parent._parent._parent._parent.okToFire == true) {
if (_parent._parent._parent._parent._currentframe == 4) {
this.gotoAndStop(2);
}
}
}
}
Symbol 1475 MovieClip Frame 9
stop();
Instance of Symbol 1467 MovieClip in Symbol 1475 MovieClip Frame 9
onClipEvent (enterFrame) {
if (_root.attention == _parent._parent._parent._parent) {
if (_parent._parent._parent._parent.weaponOut == "airStrike2") {
_root.InGameCursor.gotoAndStop(4);
}
}
}
Symbol 1475 MovieClip Frame 10
stop();
Instance of Symbol 1469 MovieClip in Symbol 1475 MovieClip Frame 10
onClipEvent (enterFrame) {
if (_root.attention == _parent._parent._parent._parent) {
if (_parent._parent._parent._parent.weaponOut == "djLocker") {
_root.InGameCursor.gotoAndStop(4);
}
}
}
Symbol 1475 MovieClip Frame 11
stop();
Symbol 1475 MovieClip Frame 12
stop();
Instance of Symbol 1474 MovieClip in Symbol 1475 MovieClip Frame 12
onClipEvent (enterFrame) {
if (_root.attention == _parent._parent._parent._parent) {
if (_parent._parent._parent._parent.weaponOut == "Blackbeard") {
_root.InGameCursor.gotoAndStop(5);
}
}
}
Instance of Symbol 1417 MovieClip in Symbol 1476 MovieClip Frame 1
onClipEvent (load) {
power = 1;
parent = _parent._parent._parent;
}
onClipEvent (enterFrame) {
if (((((parent.weaponOut == "rottenRations") or (parent.weaponOut == "toySoldier")) or (parent.weaponOut == "anchor")) or (parent.weaponOut == "shotgun")) or (parent.weaponOut == "airStrike1")) {
return(undefined);
}
if (Key.isDown(32)) {
if (_root.turn == _parent._parent._parent) {
if (_root.attention == _parent._parent._parent) {
power++;
}
}
}
this.gotoAndStop(power);
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
_root.chargeUp.stop();
this.gotoAndStop(1);
}
}
Instance of Symbol 1475 MovieClip in Symbol 1476 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent._parent.weaponOut == "cannon") {
this.gotoAndStop(1);
}
if (_parent._parent._parent.weaponOut == "homingMissile1") {
this.gotoAndStop(2);
}
if (_parent._parent._parent.weaponOut == "rottenRations") {
this.gotoAndStop(3);
}
if (_parent._parent._parent.weaponOut == "toySoldier") {
this.gotoAndStop(4);
}
if (_parent._parent._parent.weaponOut == "anchor") {
this.gotoAndStop(5);
}
if (_parent._parent._parent.weaponOut == "beachball") {
this.gotoAndStop(6);
}
if (_parent._parent._parent.weaponOut == "airStrike1") {
this.gotoAndStop(7);
}
if (_parent._parent._parent.weaponOut == "shotgun") {
this.gotoAndStop(8);
}
if (_parent._parent._parent.weaponOut == "airStrike2") {
this.gotoAndStop(9);
}
if (_parent._parent._parent.weaponOut == "djLocker") {
this.gotoAndStop(10);
}
if (_parent._parent._parent.weaponOut == "Rum Bottle") {
this.gotoAndStop(11);
}
if (_parent._parent._parent.weaponOut == "Blackbeard") {
this.gotoAndStop(12);
}
}
onClipEvent (enterFrame) {
if (_parent._parent._parent.weaponOut == "cannon") {
this.gotoAndStop(1);
}
if (_parent._parent._parent.weaponOut == "homingMissile1") {
this.gotoAndStop(2);
}
if (_parent._parent._parent.weaponOut == "rottenRations") {
this.gotoAndStop(3);
}
if (_parent._parent._parent.weaponOut == "toySoldier") {
this.gotoAndStop(4);
}
if (_parent._parent._parent.weaponOut == "anchor") {
this.gotoAndStop(5);
}
if (_parent._parent._parent.weaponOut == "beachball") {
this.gotoAndStop(6);
}
if (_parent._parent._parent.weaponOut == "airStrike1") {
this.gotoAndStop(7);
}
if (_parent._parent._parent.weaponOut == "shotgun") {
this.gotoAndStop(8);
}
if (_parent._parent._parent.weaponOut == "airStrike2") {
this.gotoAndStop(9);
}
if (_parent._parent._parent.weaponOut == "djLocker") {
this.gotoAndStop(10);
}
if (_parent._parent._parent.weaponOut == "Rum Bottle") {
this.gotoAndStop(11);
}
if (_parent._parent._parent.weaponOut == "Blackbeard") {
this.gotoAndStop(12);
}
}
Symbol 1477 MovieClip Frame 1
if (_parent.dir == 1) {
_parent.angle = 180;
}
if (_parent.dir == 2) {
_parent.angle = -180;
}
Symbol 1477 MovieClip Frame 2
if (_parent.dir == 1) {
_parent.angle = 175;
}
if (_parent.dir == 2) {
_parent.angle = -175;
}
Symbol 1477 MovieClip Frame 3
if (_parent.dir == 1) {
_parent.angle = 170;
}
if (_parent.dir == 2) {
_parent.angle = -170;
}
Symbol 1477 MovieClip Frame 4
if (_parent.dir == 1) {
_parent.angle = 165;
}
if (_parent.dir == 2) {
_parent.angle = -165;
}
Symbol 1477 MovieClip Frame 5
if (_parent.dir == 1) {
_parent.angle = 160;
}
if (_parent.dir == 2) {
_parent.angle = -160;
}
Symbol 1477 MovieClip Frame 6
if (_parent.dir == 1) {
_parent.angle = 155;
}
if (_parent.dir == 2) {
_parent.angle = -155;
}
Symbol 1477 MovieClip Frame 7
if (_parent.dir == 1) {
_parent.angle = 150;
}
if (_parent.dir == 2) {
_parent.angle = -150;
}
Symbol 1477 MovieClip Frame 8
if (_parent.dir == 1) {
_parent.angle = 145;
}
if (_parent.dir == 2) {
_parent.angle = -145;
}
Symbol 1477 MovieClip Frame 9
if (_parent.dir == 1) {
_parent.angle = 140;
}
if (_parent.dir == 2) {
_parent.angle = -140;
}
Symbol 1477 MovieClip Frame 10
if (_parent.dir == 1) {
_parent.angle = 135;
}
if (_parent.dir == 2) {
_parent.angle = -135;
}
Symbol 1477 MovieClip Frame 11
if (_parent.dir == 1) {
_parent.angle = 130;
}
if (_parent.dir == 2) {
_parent.angle = -130;
}
Symbol 1477 MovieClip Frame 12
if (_parent.dir == 1) {
_parent.angle = 125;
}
if (_parent.dir == 2) {
_parent.angle = -125;
}
Symbol 1477 MovieClip Frame 13
if (_parent.dir == 1) {
_parent.angle = 120;
}
if (_parent.dir == 2) {
_parent.angle = -120;
}
Symbol 1477 MovieClip Frame 14
if (_parent.dir == 1) {
_parent.angle = 115;
}
if (_parent.dir == 2) {
_parent.angle = -115;
}
Symbol 1477 MovieClip Frame 15
if (_parent.dir == 1) {
_parent.angle = 110;
}
if (_parent.dir == 2) {
_parent.angle = -110;
}
Symbol 1477 MovieClip Frame 16
if (_parent.dir == 1) {
_parent.angle = 105;
}
if (_parent.dir == 2) {
_parent.angle = -105;
}
Symbol 1477 MovieClip Frame 17
if (_parent.dir == 1) {
_parent.angle = 100;
}
if (_parent.dir == 2) {
_parent.angle = -100;
}
Symbol 1477 MovieClip Frame 18
if (_parent.dir == 1) {
_parent.angle = 95;
}
if (_parent.dir == 2) {
_parent.angle = -95;
}
Symbol 1477 MovieClip Frame 19
if (_parent.dir == 1) {
_parent.angle = 90;
}
if (_parent.dir == 2) {
_parent.angle = -90;
}
Symbol 1477 MovieClip Frame 20
if (_parent.dir == 1) {
_parent.angle = 87.875;
}
if (_parent.dir == 2) {
_parent.angle = -87.875;
}
Symbol 1477 MovieClip Frame 21
if (_parent.dir == 1) {
_parent.angle = 85.75;
}
if (_parent.dir == 2) {
_parent.angle = -85.75;
}
Symbol 1477 MovieClip Frame 22
if (_parent.dir == 1) {
_parent.angle = 83.625;
}
if (_parent.dir == 2) {
_parent.angle = -83.625;
}
Symbol 1477 MovieClip Frame 23
if (_parent.dir == 1) {
_parent.angle = 81.5;
}
if (_parent.dir == 2) {
_parent.angle = -81.5;
}
Symbol 1477 MovieClip Frame 24
if (_parent.dir == 1) {
_parent.angle = 79.375;
}
if (_parent.dir == 2) {
_parent.angle = -79.375;
}
Symbol 1477 MovieClip Frame 25
if (_parent.dir == 1) {
_parent.angle = 77.25;
}
if (_parent.dir == 2) {
_parent.angle = -77.25;
}
Symbol 1477 MovieClip Frame 26
if (_parent.dir == 1) {
_parent.angle = 73;
}
if (_parent.dir == 2) {
_parent.angle = -73;
}
Symbol 1477 MovieClip Frame 27
if (_parent.dir == 1) {
_parent.angle = 70.875;
}
if (_parent.dir == 2) {
_parent.angle = -70.875;
}
Symbol 1477 MovieClip Frame 28
if (_parent.dir == 1) {
_parent.angle = 68.75;
}
if (_parent.dir == 2) {
_parent.angle = -68.75;
}
Symbol 1477 MovieClip Frame 29
if (_parent.dir == 1) {
_parent.angle = 66.625;
}
if (_parent.dir == 2) {
_parent.angle = -66.625;
}
Symbol 1477 MovieClip Frame 30
if (_parent.dir == 1) {
_parent.angle = 64.5;
}
if (_parent.dir == 2) {
_parent.angle = -64.5;
}
Symbol 1477 MovieClip Frame 31
if (_parent.dir == 1) {
_parent.angle = 62.375;
}
if (_parent.dir == 2) {
_parent.angle = -62.375;
}
Symbol 1477 MovieClip Frame 32
if (_parent.dir == 1) {
_parent.angle = 60.25;
}
if (_parent.dir == 2) {
_parent.angle = -60.25;
}
Symbol 1477 MovieClip Frame 33
if (_parent.dir == 1) {
_parent.angle = 58.125;
}
if (_parent.dir == 2) {
_parent.angle = -58.125;
}
Symbol 1477 MovieClip Frame 34
if (_parent.dir == 1) {
_parent.angle = 56;
}
if (_parent.dir == 2) {
_parent.angle = -56;
}
Symbol 1477 MovieClip Frame 35
if (_parent.dir == 1) {
_parent.angle = 53.875;
}
if (_parent.dir == 2) {
_parent.angle = -53.875;
}
Symbol 1477 MovieClip Frame 36
if (_parent.dir == 1) {
_parent.angle = 51.75;
}
if (_parent.dir == 2) {
_parent.angle = -51.75;
}
Symbol 1477 MovieClip Frame 37
if (_parent.dir == 1) {
_parent.angle = 49.625;
}
if (_parent.dir == 2) {
_parent.angle = -49.625;
}
Symbol 1477 MovieClip Frame 38
if (_parent.dir == 1) {
_parent.angle = 47.5;
}
if (_parent.dir == 2) {
_parent.angle = -47.5;
}
Symbol 1477 MovieClip Frame 39
if (_parent.dir == 1) {
_parent.angle = 45.375;
}
if (_parent.dir == 2) {
_parent.angle = -45.375;
}
Symbol 1477 MovieClip Frame 40
if (_parent.dir == 1) {
_parent.angle = 43.25;
}
if (_parent.dir == 2) {
_parent.angle = -43.25;
}
Symbol 1477 MovieClip Frame 41
if (_parent.dir == 1) {
_parent.angle = 41.125;
}
if (_parent.dir == 2) {
_parent.angle = -41.125;
}
Symbol 1477 MovieClip Frame 42
if (_parent.dir == 1) {
_parent.angle = 39;
}
if (_parent.dir == 2) {
_parent.angle = -39;
}
Symbol 1477 MovieClip Frame 43
if (_parent.dir == 1) {
_parent.angle = 36.875;
}
if (_parent.dir == 2) {
_parent.angle = -36.875;
}
Symbol 1477 MovieClip Frame 44
if (_parent.dir == 1) {
_parent.angle = 34.75;
}
if (_parent.dir == 2) {
_parent.angle = -34.75;
}
Symbol 1477 MovieClip Frame 45
if (_parent.dir == 1) {
_parent.angle = 32.625;
}
if (_parent.dir == 2) {
_parent.angle = -32.625;
}
Symbol 1477 MovieClip Frame 46
if (_parent.dir == 1) {
_parent.angle = 30.5;
}
if (_parent.dir == 2) {
_parent.angle = -30.5;
}
Symbol 1477 MovieClip Frame 47
if (_parent.dir == 1) {
_parent.angle = 28.375;
}
if (_parent.dir == 2) {
_parent.angle = -28.375;
}
Symbol 1477 MovieClip Frame 48
if (_parent.dir == 1) {
_parent.angle = 26.25;
}
if (_parent.dir == 2) {
_parent.angle = -26.25;
}
Symbol 1477 MovieClip Frame 49
if (_parent.dir == 1) {
_parent.angle = 24.125;
}
if (_parent.dir == 2) {
_parent.angle = -24.125;
}
Symbol 1477 MovieClip Frame 50
if (_parent.dir == 1) {
_parent.angle = 22;
}
if (_parent.dir == 2) {
_parent.angle = -22;
}
Symbol 1477 MovieClip Frame 51
if (_parent.dir == 1) {
_parent.angle = 19.875;
}
if (_parent.dir == 2) {
_parent.angle = -19.875;
}
Symbol 1477 MovieClip Frame 52
if (_parent.dir == 1) {
_parent.angle = 17.75;
}
if (_parent.dir == 2) {
_parent.angle = -17.75;
}
Symbol 1477 MovieClip Frame 53
if (_parent.dir == 1) {
_parent.angle = 15.625;
}
if (_parent.dir == 2) {
_parent.angle = -15.625;
}
Symbol 1477 MovieClip Frame 54
if (_parent.dir == 1) {
_parent.angle = 13.5;
}
if (_parent.dir == 2) {
_parent.angle = -13.5;
}
Symbol 1477 MovieClip Frame 55
if (_parent.dir == 1) {
_parent.angle = 11.375;
}
if (_parent.dir == 2) {
_parent.angle = -11.375;
}
Symbol 1477 MovieClip Frame 56
if (_parent.dir == 1) {
_parent.angle = 9.25;
}
if (_parent.dir == 2) {
_parent.angle = -9.25;
}
Symbol 1477 MovieClip Frame 57
if (_parent.dir == 1) {
_parent.angle = 7.125;
}
if (_parent.dir == 2) {
_parent.angle = -7.125;
}
Symbol 1477 MovieClip Frame 58
if (_parent.dir == 1) {
_parent.angle = 5;
}
if (_parent.dir == 2) {
_parent.angle = -5;
}
Symbol 1477 MovieClip Frame 59
if (_parent.dir == 1) {
_parent.angle = 2.875;
}
if (_parent.dir == 2) {
_parent.angle = -2.875;
}
Symbol 1477 MovieClip Frame 60
if (_parent.dir == 1) {
_parent.angle = 10;
}
if (_parent.dir == 2) {
_parent.angle = -10;
}
Symbol 1481 MovieClip Frame 9
function playSound() {
word = "S" + _parent.counter;
_root[word].start();
}
_parent.counter++;
_parent._parent.walkCounter++;
if (_parent.counter > 25) {
_parent.counter = 22;
}
playSound();
Symbol 1482 MovieClip Frame 1
if (_parent.counter == undefined) {
_parent.counter = 0;
}
if (_parent._parent.walkCounter == undefined) {
_parent._parent.walkCounter = 0;
}
Symbol 1482 MovieClip Frame 14
function playSound() {
word = "S" + _parent.counter;
_root[word].start();
}
_parent.counter++;
_parent._parent.walkCounter++;
if (_parent.counter > 25) {
_parent.counter = 22;
}
playSound();
Instance of Symbol 1404 MovieClip in Symbol 1522 MovieClip Frame 1
on (press) {
_parent.prevFrame();
}
Instance of Symbol 1406 MovieClip in Symbol 1522 MovieClip Frame 1
on (press) {
_parent.nextFrame();
}
Instance of Symbol 1477 MovieClip "aim" in Symbol 1522 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(19);
_parent.lefthandchance = 0;
_parent.hatchance = 0;
_parent.legchance = 0;
_parent.righthandchance = 0;
_parent.leftbeardchance = 0;
_parent.lefteyechance = 0;
_parent.beardchance = 0;
_parent.colour = "red";
}
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this.nextFrame();
}
if (Key.isDown(40)) {
this.prevFrame();
}
}
Instance of Symbol 1483 MovieClip in Symbol 1522 MovieClip Frame 3
onClipEvent (load) {
_parent.lefthandchance = 0;
_parent.hatchance = 0;
_parent.legchance = 0;
_parent.righthandchance = 0;
_parent.leftbeardchance = 0;
_parent.lefteyechance = 0;
_parent.beardchance = 0;
_parent.colour = "red";
}
Instance of Symbol 1094 MovieClip "dummy" in Symbol 1522 MovieClip Frame 11
onClipEvent (load) {
_parent.lefthandchance = 1;
_parent.hatchance = 2;
_parent.legchance = 2;
_parent.righthandchance = 0;
_parent.leftbeardchance = 0;
_parent.lefteyechance = 2;
_parent.beardchance = 3;
_parent.colour = "orange";
}
Instance of Symbol 1302 MovieClip in Symbol 1522 MovieClip Frame 14
onClipEvent (enterFrame) {
_rotation = (_rotation + 2);
}
Instance of Symbol 1304 MovieClip in Symbol 1522 MovieClip Frame 14
onClipEvent (enterFrame) {
_rotation = (_rotation + 15);
}
Symbol 1582 MovieClip Frame 1
time = new Date();
seconds = time.getSeconds();
minutes = time.getMinutes();
hours = time.getHours();
hours = hours + (minutes / 60);
seconds = seconds * 6;
minutes = minutes * 6;
hours = hours * 30;
sec._rotation = seconds;
min._rotation = minutes;
hour._rotation = hours;
Symbol 1582 MovieClip Frame 2
gotoAndPlay (1);
Instance of Symbol 1592 MovieClip "w2" in Symbol 1593 MovieClip Frame 1
onClipEvent (load) {
function goUp() {
_root.IFC2++;
YS = YS + wetness;
}
rate = 2;
fakeYS = _yscale;
YS = _yscale;
wetness = 5;
}
onClipEvent (enterFrame) {
if (fakeYS < YS) {
fakeYS = fakeYS + rate;
}
_yscale = fakeYS;
}
Instance of Symbol 534 MovieClip "w1" in Symbol 1593 MovieClip Frame 1
onClipEvent (load) {
function goUp() {
_root.IFC1++;
YS = YS + wetness;
}
rate = 2;
fakeYS = _yscale;
YS = _yscale;
wetness = 5;
}
onClipEvent (enterFrame) {
if (fakeYS < YS) {
fakeYS = fakeYS + rate;
}
_yscale = fakeYS;
}
Instance of Symbol 1603 MovieClip in Symbol 1604 MovieClip Frame 1
onClipEvent (load) {
this.stop();
time = 0;
}
onClipEvent (enterFrame) {
time++;
if (time > _parent.delay) {
this.play();
time = 0;
}
}
Symbol 1615 MovieClip Frame 1
stop();
_root.gravity = 2;
Instance of Symbol 1588 MovieClip "water" in Symbol 1615 MovieClip Frame 1
onClipEvent (load) {
function goUp() {
YS = YS + wetness;
}
rate = 0.3;
fakeYS = _yscale;
YS = _yscale;
wetness = 3;
}
onClipEvent (enterFrame) {
if (fakeYS < YS) {
fakeYS = fakeYS + rate;
}
_yscale = fakeYS;
}
Symbol 1615 MovieClip Frame 2
stop();
_root.gravity = 1;
_root.blackWilderness._visible = true;
Symbol 1615 MovieClip Frame 3
stop();
Symbol 1615 MovieClip Frame 4
stop();
Symbol 1615 MovieClip Frame 5
stop();
Symbol 1615 MovieClip Frame 6
stop();
Instance of Symbol 1604 MovieClip in Symbol 1615 MovieClip Frame 6
onClipEvent (load) {
function dWgH() {
_root[enemies[whois_hitting]].jump = true;
_root[enemies[whois_hitting]].yvel = -40;
_root[enemies[whois_hitting]].onfloor = false;
}
delay = 60;
enemies = ["pirate", "pirateb", "piratec", "pirated", "piratee", "piratef"];
}
onClipEvent (enterFrame) {
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
}
Instance of Symbol 1604 MovieClip in Symbol 1615 MovieClip Frame 6
onClipEvent (load) {
function dWgH() {
_root[enemies[whois_hitting]].jump = true;
_root[enemies[whois_hitting]].yvel = -40;
_root[enemies[whois_hitting]].onfloor = false;
}
delay = 40;
enemies = ["pirate", "pirateb", "piratec", "pirated", "piratee", "piratef"];
}
onClipEvent (enterFrame) {
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
}
Instance of Symbol 1604 MovieClip in Symbol 1615 MovieClip Frame 6
onClipEvent (load) {
function dWgH() {
_root[enemies[whois_hitting]].jump = true;
_root[enemies[whois_hitting]].yvel = -40;
_root[enemies[whois_hitting]].onfloor = false;
}
delay = 20;
enemies = ["pirate", "pirateb", "piratec", "pirated", "piratee", "piratef"];
}
onClipEvent (enterFrame) {
for (whois_hitting in enemies) {
if (this.hitTest(_root[enemies[whois_hitting]])) {
dWgH();
}
}
}
Symbol 1615 MovieClip Frame 7
stop();
Symbol 1615 MovieClip Frame 8
stop();
Symbol 1615 MovieClip Frame 9
stop();
Symbol 1617 MovieClip Frame 1
_visible = false;
Symbol 1618 MovieClip Frame 11
_parent.gotoAndStop(4);
stop();
stop();
stop();
Symbol 1619 MovieClip Frame 1
_root.boing2.start();
Symbol 1619 MovieClip Frame 7
stop();
Symbol 1621 MovieClip Frame 1
chance = random(8);
word = "oof" add chance;
_root[word].start();
stop();
Symbol 1622 MovieClip Frame 1
chance = random(8);
word = "oof" add chance;
_root[word].start();
Symbol 1622 MovieClip Frame 8
soundChance = random(10);
if (soundChance == 2) {
_root.GoodShot.start();
}
if (soundChance == 4) {
_root.Illkillya.start();
}
if (soundChance == 6) {
_root.Scalliwag.start();
}
if (soundChance == 8) {
_root.totheplankwithya.start();
}
Symbol 1622 MovieClip Frame 37
if (!_parent.alive) {
_parent._rotation = 0;
_parent.gotoAndStop(8);
}
if (_parent.fakehealth == _parent.health) {
if (_parent.health <= _root.deathHealth) {
if (_parent._rotation <= 15) {
if (_parent._rotation >= -5) {
_parent._rotation = 0;
_parent.gotoAndStop(8);
_root.attention = _parent;
}
}
}
}
_parent._parent.falling = false;
if (_parent.fakehealth == _parent.health) {
if (_root.attention == _parent) {
if (_parent.health > _root.deathHealth) {
if (_parent._rotation <= 15) {
if (_parent._rotation >= -5) {
_root.dT();
_parent._rotation = 0;
_parent.gotoAndStop(1);
}
}
}
}
}
Symbol 1622 MovieClip Frame 38
gotoAndPlay (37);
Symbol 1638 MovieClip Frame 29
play();
Symbol 1638 MovieClip Frame 49
var g = ("Grave" + _root.graveDepth);
_root.graveDepth++;
_root.attachMovie("Grave", g, _root.graveDepth);
_root.cam.scrollTarget.push(g);
_root.turn = _parent;
_root.attention = undefined;
_root[g]._x = _parent._x;
_root[g]._y = _parent._y;
_root[g].swapDepths(_root.statistics);
_root[g].grave = _parent.grave;
_root[g].name = _parent.name;
Symbol 1638 MovieClip Frame 64
_parent.alive = false;
Symbol 1638 MovieClip Frame 65
stop();
_parent.alive = false;
Instance of Symbol 1641 MovieClip in Symbol 1642 MovieClip Frame 1
onClipEvent (load) {
smallest = 5;
largest = 20;
size = Math.round(Math.random() * (largest - smallest)) + smallest;
_width = size;
_height = size;
minS = -5;
maxS = -10;
speed = Math.round(Math.random() * (maxS - minS)) + minS;
_x = (_x + random(10));
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.bg.water)) {
_y = (_y - speed);
} else {
this.swapDepths(100000);
this.removeMovieClip();
}
}
Instance of Symbol 1641 MovieClip in Symbol 1642 MovieClip Frame 1
onClipEvent (load) {
smallest = 5;
largest = 20;
size = Math.round(Math.random() * (largest - smallest)) + smallest;
_width = size;
_height = size;
minS = -5;
maxS = -10;
speed = Math.round(Math.random() * (maxS - minS)) + minS;
_x = (_x + random(10));
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.bg.water)) {
_y = (_y - speed);
} else {
this.swapDepths(100000);
this.removeMovieClip();
}
}
Instance of Symbol 1641 MovieClip in Symbol 1642 MovieClip Frame 1
onClipEvent (load) {
smallest = 5;
largest = 20;
size = Math.round(Math.random() * (largest - smallest)) + smallest;
_width = size;
_height = size;
minS = -5;
maxS = -10;
speed = Math.round(Math.random() * (maxS - minS)) + minS;
_x = (_x + random(10));
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.bg.water)) {
_y = (_y - speed);
} else {
this.swapDepths(100000);
this.removeMovieClip();
}
}
Instance of Symbol 1641 MovieClip in Symbol 1642 MovieClip Frame 1
onClipEvent (load) {
smallest = 5;
largest = 20;
size = Math.round(Math.random() * (largest - smallest)) + smallest;
_width = size;
_height = size;
minS = -5;
maxS = -10;
speed = Math.round(Math.random() * (maxS - minS)) + minS;
_x = (_x + random(10));
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.bg.water)) {
_y = (_y - speed);
} else {
this.swapDepths(100000);
this.removeMovieClip();
}
}
Instance of Symbol 1641 MovieClip in Symbol 1642 MovieClip Frame 1
onClipEvent (load) {
smallest = 5;
largest = 20;
size = Math.round(Math.random() * (largest - smallest)) + smallest;
_width = size;
_height = size;
minS = -5;
maxS = -10;
speed = Math.round(Math.random() * (maxS - minS)) + minS;
_x = (_x + random(10));
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.bg.water)) {
_y = (_y - speed);
} else {
this.swapDepths(100000);
this.removeMovieClip();
}
}
Symbol 1645 MovieClip Frame 1
if (counter == undefined) {
counter = 0;
}
Symbol 1645 MovieClip Frame 18
counter++;
if (counter > 20) {
gotoAndStop (19);
} else {
gotoAndPlay (1);
}
Symbol 1647 MovieClip Frame 41
stop();
Symbol 1648 MovieClip Frame 1
stop();
Instance of Symbol 1094 MovieClip in Symbol 1648 MovieClip Frame 1
onClipEvent (load) {
wait = 0;
delay = 5;
}
onClipEvent (enterFrame) {
_parent.falling = false;
if (_root.attention == _parent) {
if (_root.turn == _parent) {
if (!(_parent.weaponOut === "Skip Go")) {
wait++;
}
}
}
if (wait >= delay) {
_parent.gotoAndStop(3);
}
if (!(_root.attention === this._parent)) {
if (_parent._x > _root.attention._x) {
_parent._xscale = -_parent.x;
_parent.dir = 2;
_parent.facing = "right";
}
}
if (!((!_root.attention) === this._parent)) {
if (_parent._x < _root.attention._x) {
_parent._xscale = _parent.x;
_parent.dir = 1;
_parent.facing = "left";
}
}
if (_parent._xscale == _parent.x) {
_parent.facing = "right";
}
if (_parent._xscale == (-_parent.x)) {
_parent.facing = "left";
}
_parent._rotation = 0;
}
Symbol 1648 MovieClip Frame 2
stop();
Instance of Symbol 1483 MovieClip in Symbol 1648 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent._rotation = 0;
if (_parent.health <= _root.deathHealth) {
_parent._rotation = 0;
_parent.gotoAndStop(8);
}
if (_parent._xscale == _parent.x) {
_parent.facing = "right";
}
if (_parent._xscale == (-_parent.x)) {
_parent.facing = "left";
}
}
Symbol 1648 MovieClip Frame 3
stop();
Symbol 1648 MovieClip Frame 4
stop();
_parent.fireallowed = true;
Instance of Symbol 1477 MovieClip "aim" in Symbol 1648 MovieClip Frame 4
onClipEvent (load) {
this.gotoAndStop(19);
}
onClipEvent (enterFrame) {
if (_parent.weaponOut == "Skip Go") {
_parent.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if ((((((_parent.weaponOut == "toySoldier") or (_parent.weaponOut == "airStrike1")) or (_parent.weaponOut == "airStrike2")) or (_parent.weaponOut == "djLocker")) or (_parent.weaponOut == "Rum Bottle")) or (_parent.weaponOut == "blackbeard")) {
weaponType = "noAim";
} else {
weaponType = "aim";
}
if (Key.isDown(38)) {
if (weaponType == "aim") {
if (_root.attention == _parent) {
if (_root.turn == _parent) {
this.nextFrame();
}
}
}
}
if (Key.isDown(40)) {
if (weaponType == "aim") {
if (_root.attention == _parent) {
if (_root.turn == _parent) {
this.prevFrame();
}
}
}
}
if (_root.turn == _parent) {
if (_root.attention == _parent) {
_parent.angle = Math.ceil(_parent.angle);
}
}
}
Symbol 1648 MovieClip Frame 5
stop();
Instance of Symbol 1619 MovieClip in Symbol 1648 MovieClip Frame 5
onClipEvent (enterFrame) {
_parent.scroll();
while (_root.bg.hitTest(_parent._x, _parent._y + 5, true)) {
_parent.gotoAndStop(1);
}
}
Symbol 1648 MovieClip Frame 6
stop();
_root.turn = undefined;
Instance of Symbol 1621 MovieClip in Symbol 1648 MovieClip Frame 6
onClipEvent (load) {
waited = 0;
}
onClipEvent (enterFrame) {
waited++;
if (!_parent.falling) {
if (_parent.facing == "right") {
_parent._rotation = _parent._rotation - (_root.ExplosionStrength * 2);
_parent.xvel = _parent.speed;
}
}
if (!_parent.falling) {
if (_parent.facing == "left") {
_parent._rotation = _parent._rotation + (_root.ExplosionStrength * 2);
_parent.xvel = -_parent.speed;
}
}
_parent.scrollGeneral();
if (waited > 10) {
while (_root.bg.hitTest(_parent._x, _parent._y + 5, true)) {
_parent.rot = _rotation;
_parent.gotoAndStop(7);
}
}
if (!_parent.falling) {
if (_parent.facing == "right") {
_parent._xscale = -_parent.x;
_parent.dir = 2;
_parent.facing = "right";
}
}
if (!_parent.falling) {
if (_parent.facing == "left") {
_parent._xscale = _parent.x;
_parent.dir = 1;
_parent.facing = "left";
}
}
if (_parent.falling) {
if (_parent.facing == "right") {
_parent._rotation = _parent._rotation + _parent.fallDamage;
}
}
if (_parent.falling) {
if (_parent.facing == "left") {
_parent._rotation = _parent._rotation - _parent.fallDamage;
}
}
}
Symbol 1648 MovieClip Frame 7
stop();
if (falling) {
health = health - Math.round(fallDamage);
}
if (!falling) {
health = health - (_root.ExplosionStrength * 10);
}
flyspeed = 8;
Instance of Symbol 1622 MovieClip in Symbol 1648 MovieClip Frame 7
onClipEvent (load) {
waited = 0;
done = false;
}
onClipEvent (enterFrame) {
waited++;
if (waited > 10) {
if (_parent._rotation > 0) {
_parent._rotation = _parent._rotation - 10;
if (!done) {
this.gotoAndPlay(26);
done = true;
}
}
}
if (waited > 10) {
if (_parent._rotation < 0) {
_parent._rotation = _parent._rotation + 10;
if (!done) {
this.gotoAndPlay(26);
done = true;
}
}
}
if (!_parent.falling) {
if (_parent.facing == "right") {
_parent._xscale = -_parent.x;
_parent.dir = 2;
_parent.facing = "right";
}
}
if (!_parent.falling) {
if (_parent.facing == "left") {
_parent._xscale = _parent.x;
_parent.dir = 1;
_parent.facing = "left";
}
}
}
Symbol 1648 MovieClip Frame 8
stop();
_root.attention = undefined;
Symbol 1648 MovieClip Frame 9
stop();
if (_root.turn == this) {
suicide = true;
trace("Suicide");
}
if (_root.previousTurn == this) {
suicide = true;
trace("Suicide");
}
if (_root.attention == this) {
_root.turn = undefined;
}
_root.splash.start();
Instance of Symbol 1645 MovieClip in Symbol 1648 MovieClip Frame 9
onClipEvent (load) {
drownRate = 5;
removeTime = 100;
done = false;
time = 0;
m = 0;
_parent.health = 0;
}
onClipEvent (enterFrame) {
_parent.alive = false;
_parent._y = _parent._y + drownRate;
}
onClipEvent (enterFrame) {
time++;
m++;
if (time >= removeTime) {
if (!done) {
if (_parent.suicide) {
trace("SUICIDE");
_root.previousTurn = _parent;
_root.dT();
done = true;
}
}
if (!_parent.suicide) {
if (!done) {
if (_root.attention == undefined) {
if (_root.turn == undefined) {
_root.turn = _parent;
}
}
}
done = true;
_visible = false;
drownRate = 0;
}
}
if (m > 30) {
if (_root.attention == _parent) {
_root.attention = undefined;
}
}
}
Symbol 1648 MovieClip Frame 10
stop();
if (alive) {
_root.attention = this;
}
_rotation = 0;
_root.matchEnd = true;
Instance of Symbol 1647 MovieClip in Symbol 1648 MovieClip Frame 10
onClipEvent (load) {
timeWaited = 0;
delay = 80;
}
onClipEvent (enterFrame) {
timeWaited++;
if (timeWaited >= delay) {
if (!(_root.statistics.YOUWIN._currentframe === _root.statistics.YOUWIN._totalframes)) {
_root.statistics.YOUWIN.play();
}
}
}
Instance of Symbol 1652 MovieClip "healthHolder" in Symbol 1657 MovieClip Frame 1
onClipEvent (enterFrame) {
colour = _parent.team;
if (colour == "red") {
teamcolour = new Color(this);
teamcolour.setRGB(13369344);
}
if (colour == "blue") {
teamcolour = new Color(this);
teamcolour.setRGB(255);
}
if (colour == "green") {
teamcolour = new Color(this);
teamcolour.setRGB(52224);
}
if (colour == "purple") {
teamcolour = new Color(this);
teamcolour.setRGB(10027263);
}
if (colour == "orange") {
teamcolour = new Color(this);
teamcolour.setRGB(16763904);
}
if (colour == "black") {
teamcolour = new Color(this);
teamcolour.setRGB(0);
}
}
Instance of Symbol 1656 MovieClip "nameHolder" in Symbol 1657 MovieClip Frame 1
onClipEvent (enterFrame) {
colour = _parent.team;
if (colour == "red") {
teamcolour = new Color(this);
teamcolour.setRGB(13369344);
}
if (colour == "blue") {
teamcolour = new Color(this);
teamcolour.setRGB(255);
}
if (colour == "green") {
teamcolour = new Color(this);
teamcolour.setRGB(52224);
}
if (colour == "purple") {
teamcolour = new Color(this);
teamcolour.setRGB(10027263);
}
if (colour == "orange") {
teamcolour = new Color(this);
teamcolour.setRGB(16763904);
}
if (colour == "black") {
teamcolour = new Color(this);
teamcolour.setRGB(0);
}
}
Symbol 1664 MovieClip Frame 1
stop();
Symbol 1664 MovieClip Frame 2
_parent._parent._parent.hdf = true;
Instance of Symbol 1409 MovieClip in Symbol 1664 MovieClip Frame 2
onClipEvent (load) {
_root.chargeUp.start();
}
Symbol 1664 MovieClip Frame 40
_root.previousCPUturn = _parent._parent._parent;
_parent._parent._parent.hdf = false;
_parent._parent._parent.gotoAndStop(1);
Instance of Symbol 1409 MovieClip in Symbol 1664 MovieClip Frame 41
onClipEvent (load) {
_root.chargeUp.stop();
}
Symbol 1667 MovieClip Frame 1
stop();
Symbol 1667 MovieClip Frame 2
stop();
_parent._parent._parent.weaponOut = "homingMissile1";
Instance of Symbol 1428 MovieClip in Symbol 1667 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.cursor.gotoAndStop(1);
if (_root.attention == _parent._parent._parent._parent) {
if (_parent._parent._parent._parent.weaponOut == "homingMissile1") {
_root.rcursor.gotoAndStop(2);
}
}
}
Symbol 1667 MovieClip Frame 3
stop();
Symbol 1667 MovieClip Frame 4
stop();
Symbol 1667 MovieClip Frame 5
stop();
Symbol 1667 MovieClip Frame 6
stop();
Symbol 1667 MovieClip Frame 7
stop();
Instance of Symbol 1664 MovieClip "fmue" in Symbol 1668 MovieClip Frame 1
onClipEvent (load) {
numba = 0;
}
onClipEvent (enterFrame) {
if (_parent._parent._parent._currentframe == 4) {
if (_parent._parent.currentframe == _parent._parent.frame) {
numba = numba + 2;
this.gotoAndStop(numba);
}
}
}
Instance of Symbol 1667 MovieClip in Symbol 1668 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent._parent.weaponOut == "cannon") {
this.gotoAndStop(1);
}
if (_parent._parent._parent.weaponOut == "homingMissile1") {
this.gotoAndStop(2);
}
if (_parent._parent._parent.weaponOut == "rottenRations") {
this.gotoAndStop(3);
}
if (_parent._parent._parent.weaponOut == "toySoldier") {
this.gotoAndStop(4);
}
if (_parent._parent._parent.weaponOut == "anchor") {
this.gotoAndStop(5);
}
if (_parent._parent._parent.weaponOut == "beachball") {
this.gotoAndStop(6);
}
if (_parent._parent._parent.weaponOut == "airStrike1") {
this.gotoAndStop(7);
}
}
onClipEvent (enterFrame) {
if (_parent._parent._parent.weaponOut == "cannon") {
this.gotoAndStop(1);
}
if (_parent._parent._parent.weaponOut == "homingMissile1") {
this.gotoAndStop(2);
}
if (_parent._parent._parent.weaponOut == "rottenRations") {
this.gotoAndStop(3);
}
if (_parent._parent._parent.weaponOut == "toySoldier") {
this.gotoAndStop(4);
}
if (_parent._parent._parent.weaponOut == "anchor") {
this.gotoAndStop(5);
}
if (_parent._parent._parent.weaponOut == "beachball") {
this.gotoAndStop(6);
}
if (_parent._parent._parent.weaponOut == "airStrike1") {
this.gotoAndStop(7);
}
}
Symbol 1669 MovieClip Frame 11
stop();
_parent.gotoAndStop(4);
_parent.gotoAndStop(4);
stop();
stop();
stop();
stop();
stop();
stop();
stop();
stop();
stop();
stop();
stop();
stop();
Symbol 1671 MovieClip Frame 1
_root.boing2.start();
Symbol 1671 MovieClip Frame 7
stop();
Symbol 1672 MovieClip Frame 1
chance = random(8);
word = "oof" add chance;
_root[word].start();
Symbol 1672 MovieClip Frame 8
soundChance = random(10);
if (soundChance == 2) {
_root.GoodShot.start();
}
if (soundChance == 4) {
_root.Illkillya.start();
}
if (soundChance == 6) {
_root.Scalliwag.start();
}
if (soundChance == 8) {
_root.totheplankwithya.start();
}
Symbol 1672 MovieClip Frame 37
if (!_parent.alive) {
_parent._rotation = 0;
_parent.gotoAndStop(8);
}
if (_parent.fakehealth == _parent.health) {
if (_parent.health <= _root.deathHealth) {
if (_parent._rotation <= 15) {
if (_parent._rotation >= -5) {
_parent._rotation = 0;
_parent.gotoAndStop(8);
_root.attention = _parent;
}
}
}
}
_parent._parent.falling = false;
if (_parent.fakehealth == _parent.health) {
if (_root.attention == _parent) {
if (_parent.health > _root.deathHealth) {
if (_parent._rotation <= 15) {
if (_parent._rotation >= -5) {
_root.dT();
_parent._rotation = 0;
_parent.gotoAndStop(1);
}
}
}
}
}
Symbol 1672 MovieClip Frame 38
gotoAndPlay (37);
Symbol 1673 MovieClip Frame 41
stop();
Symbol 1674 MovieClip Frame 1
stop();
_parent.fireallowed = false;
_parent.jump = false;
Instance of Symbol 1658 MovieClip in Symbol 1674 MovieClip Frame 1
onClipEvent (load) {
_parent.jump = false;
wait = 0;
}
onClipEvent (enterFrame) {
_parent.falling = false;
if (_root.attention == this._parent) {
if (_root.turn == _parent) {
wait++;
}
}
if (wait > 4) {
if (_parent.inrange) {
_parent.gotoAndStop(3);
}
}
if (!(_root.attention === this._parent)) {
if (_parent._x > _root.attention._x) {
_parent._xscale = -_parent.x;
_parent.dir = 2;
_parent.facing = "right";
}
}
if (!((!_root.attention) === this._parent)) {
if (_parent._x < _root.attention._x) {
_parent._xscale = _parent.x;
_parent.dir = 1;
_parent.facing = "left";
}
}
if (_parent._xscale == _parent.x) {
_parent.facing = "right";
}
if (_parent._xscale == (-_parent.x)) {
_parent.facing = "left";
}
_parent._rotation = 0;
}
Symbol 1674 MovieClip Frame 2
stop();
_rotation = 0;
if (health <= _root.deathHealth) {
_parent._rotation = 0;
_parent.gotoAndStop(8);
}
Instance of Symbol 1659 MovieClip in Symbol 1674 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent._rotation = 0;
if (_parent.inrange) {
_parent.gotoAndStop(1);
}
if (_parent.health <= _root.deathHealth) {
_parent._rotation = 0;
_parent.gotoAndStop(8);
}
}
Symbol 1674 MovieClip Frame 3
stop();
Symbol 1674 MovieClip Frame 4
stop();
_parent.fireallowed = true;
Instance of Symbol 1670 MovieClip "aim" in Symbol 1674 MovieClip Frame 4
onClipEvent (load) {
miss = Math.floor(_parent.difficulty);
rate = 1;
this.gotoAndStop(90);
if (_parent.facing == "right") {
currentframe = _currentframe;
}
if (_parent.facing == "left") {
currentframe = -_currentframe;
}
timeElapsed = 0;
deltaX = (_parent._x - _parent.target._x) + miss;
deltaY = (_parent._y - _parent.target._y) + miss;
angle = -Math.atan2(deltaX, deltaY);
ySpeed = shotSpeed * Math.cos(angle);
xSpeed = shotSpeed * Math.sin(angle);
if (!(_parent.weaponOut === "homingMissile1")) {
frame = Math.round((angle * 180) / Math.PI);
}
if (_parent.weaponOut == "homingMissile1") {
frame = 0;
}
_parent.angle = frame;
}
onClipEvent (enterFrame) {
if (currentframe < frame) {
currentframe = currentframe + rate;
}
if (currentframe > frame) {
currentframe = currentframe - rate;
}
}
onClipEvent (enterFrame) {
if (_parent.facing == "right") {
this.gotoAndStop(180 - currentframe);
}
if (_parent.facing == "left") {
this.gotoAndStop(180 + currentframe);
}
}
Symbol 1674 MovieClip Frame 5
stop();
Instance of Symbol 1671 MovieClip in Symbol 1674 MovieClip Frame 5
onClipEvent (enterFrame) {
_parent.scroll();
while (_root.bg.hitTest(_parent._x, _parent._y + 5, true)) {
_parent.jump = false;
_parent.gotoAndStop(1);
}
}
Symbol 1674 MovieClip Frame 6
stop();
_root.turn = undefined;
Instance of Symbol 1621 MovieClip in Symbol 1674 MovieClip Frame 6
onClipEvent (load) {
waited = 0;
_parent.flySpeed = 8;
}
onClipEvent (enterFrame) {
waited++;
if (!_parent.falling) {
if (_parent.facing == "right") {
_parent._rotation = _parent._rotation - (_root.ExplosionStrength * 2);
_parent.xvel = _parent.speed;
}
}
if (!_parent.falling) {
if (_parent.facing == "left") {
_parent._rotation = _parent._rotation + (_root.ExplosionStrength * 2);
_parent.xvel = -_parent.speed;
}
}
_parent.scrollGeneral();
if (waited > 10) {
while (_root.bg.hitTest(_parent._x, _parent._y + 5, true)) {
_parent.rot = _rotation;
_parent.gotoAndStop(7);
}
}
if (!_parent.falling) {
if (_parent.facing == "right") {
_parent._xscale = -_parent.x;
_parent.dir = 2;
_parent.facing = "right";
}
}
if (!_parent.falling) {
if (_parent.facing == "left") {
_parent._xscale = _parent.x;
_parent.dir = 1;
_parent.facing = "left";
}
}
if (_parent.falling) {
if (_parent.facing == "right") {
_parent._rotation = _parent._rotation + _parent.fallDamage;
}
}
if (_parent.falling) {
if (_parent.facing == "left") {
_parent._rotation = _parent._rotation - _parent.fallDamage;
}
}
_parent.flySpeed = 8;
}
Symbol 1674 MovieClip Frame 7
stop();
if (_parent.falling) {
health = health - fallDamage;
}
if (!_parent.falling) {
health = health - (_root.ExplosionStrength * 10);
}
flyspeed = 8;
Instance of Symbol 1672 MovieClip in Symbol 1674 MovieClip Frame 7
onClipEvent (load) {
waited = 0;
done = false;
}
onClipEvent (enterFrame) {
waited++;
if (waited > 10) {
if (_parent._rotation > 0) {
_parent._rotation = _parent._rotation - 10;
if (!done) {
this.gotoAndPlay(26);
done = true;
}
}
}
if (waited > 10) {
if (_parent._rotation < 0) {
_parent._rotation = _parent._rotation + 10;
if (!done) {
this.gotoAndPlay(26);
done = true;
}
}
}
if (!_parent.falling) {
if (_parent.facing == "right") {
_parent._xscale = -_parent.x;
_parent.dir = 2;
_parent.facing = "right";
}
}
if (!_parent.falling) {
if (_parent.facing == "left") {
_parent._xscale = _parent.x;
_parent.dir = 1;
_parent.facing = "left";
}
}
}
Symbol 1674 MovieClip Frame 8
stop();
_root.attention = undefined;
Symbol 1674 MovieClip Frame 9
stop();
if (_root.turn == this) {
suicide = true;
trace("Suicide");
}
if (_root.previousTurn == this) {
suicide = true;
trace("Suicide");
}
if (_root.attention == this) {
_root.turn = undefined;
}
_root.splash.start();
Instance of Symbol 1645 MovieClip in Symbol 1674 MovieClip Frame 9
onClipEvent (load) {
drownRate = 5;
removeTime = 100;
done = false;
time = 0;
m = 0;
_parent.health = 0;
}
onClipEvent (enterFrame) {
_parent.alive = false;
_parent._y = _parent._y + drownRate;
}
onClipEvent (enterFrame) {
time++;
m++;
if (time >= removeTime) {
if (!done) {
if (_parent.suicide) {
_root.previousTurn = _parent;
trace("JAHAHAH&^%T&57253765372635656765");
_root.dT();
}
if (!_parent.suicide) {
if (_root.attention == undefined) {
if (_root.turn == undefined) {
_root.turn = _parent;
}
}
}
done = true;
_visible = false;
drownRate = 0;
}
}
if (m > 30) {
if (_root.attention == _parent) {
_root.attention = undefined;
}
}
}
Symbol 1674 MovieClip Frame 10
stop();
if (alive) {
_root.attention = this;
}
_rotation = 0;
_root.matchEnd = true;
Instance of Symbol 1673 MovieClip in Symbol 1674 MovieClip Frame 10
onClipEvent (load) {
timeWaited = 0;
delay = 80;
}
onClipEvent (enterFrame) {
timeWaited++;
if (timeWaited >= delay) {
if (!(_root.statistics.YOUWIN._currentframe === _root.statistics.YOUWIN._totalframes)) {
_root.statistics.YOUWIN.play();
}
}
}
Symbol 1680 MovieClip Frame 1
stop();
Symbol 1680 MovieClip Frame 2
stop();
Symbol 1682 MovieClip Frame 1
stop();
Symbol 1682 MovieClip Frame 2
stop();
Symbol 1684 MovieClip Frame 1
stop();
Symbol 1684 MovieClip Frame 2
stop();
Symbol 1686 MovieClip Frame 1
stop();
Symbol 1686 MovieClip Frame 2
stop();
Symbol 1688 MovieClip Frame 1
stop();
Symbol 1688 MovieClip Frame 2
stop();
Symbol 1690 MovieClip Frame 1
stop();
Symbol 1690 MovieClip Frame 2
stop();
Symbol 1692 MovieClip Frame 1
stop();
Symbol 1692 MovieClip Frame 2
stop();
Symbol 1694 MovieClip Frame 1
stop();
Symbol 1694 MovieClip Frame 2
stop();
Symbol 1696 MovieClip Frame 1
stop();
Symbol 1696 MovieClip Frame 2
stop();
Symbol 1698 MovieClip Frame 1
stop();
Symbol 1698 MovieClip Frame 2
stop();
Symbol 1700 MovieClip Frame 1
stop();
Symbol 1700 MovieClip Frame 2
stop();
Symbol 1702 MovieClip Frame 1
stop();
Symbol 1702 MovieClip Frame 2
stop();
Symbol 1704 MovieClip Frame 1
stop();
Symbol 1704 MovieClip Frame 2
stop();
Symbol 1706 MovieClip Frame 1
stop();
Symbol 1706 MovieClip Frame 2
stop();
Symbol 1708 MovieClip Frame 1
stop();
Symbol 1708 MovieClip Frame 2
stop();
Instance of Symbol 1680 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "cannon";
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.cannons;
if (quantity <= 4) {
_alpha = 40;
}
}
on (rollOver) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Cannon";
_parent._parent.detailedWeaponInfo = "Basic Pirate Cannon - The more power, the more damage";
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (quantity > 4) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
Instance of Symbol 1682 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "homingMissile1";
if (_root.selectedMap == "Indirect Fight") {
_visible = false;
}
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.homingMissiles;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
if (_visible) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Homing Missile x " add quantity;
_parent._parent.detailedWeaponInfo = "Missile stolen from NASA in the 60's, results cannot be guaranteed. Homes in on specified target.";
}
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (_visible) {
if (quantity > 0) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
}
Instance of Symbol 1684 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "rottenRations";
if (_root.selectedMap == "Indirect Fight") {
_visible = false;
}
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.rottenRations;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
if (_visible) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Rotten Rations Barrel x " add quantity;
_parent._parent.detailedWeaponInfo = "A barrel containing a random amount of rotten lobsters, wine bottles, oranges and more. Explodes on impact. No Power Control";
}
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (_visible) {
if (quantity > 0) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
}
Instance of Symbol 1686 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "toySoldier";
if (_root.selectedMap == "Indirect Fight") {
_visible = false;
}
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.evilDolls;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
if (_visible) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Toy Soldier x " add quantity;
_parent._parent.detailedWeaponInfo = "Possesed Toy Soldier - explodes on impact. No power Control";
}
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (_visible) {
if (quantity > 0) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
}
Instance of Symbol 1688 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "anchor";
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.anchors;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Anchor Cannon x " add quantity;
_parent._parent.detailedWeaponInfo = "A more powerful version of the Cannon. No Power Control";
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (quantity > 0) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
Instance of Symbol 1690 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "beachball";
if (_root.selectedMap == "Indirect Fight") {
_visible = false;
}
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.beachballs;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
if (_visible) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Beach Ball x " add quantity;
_parent._parent.detailedWeaponInfo = "Colourful beachball filled with explosives. Works well downhill.";
}
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (quantity > 0) {
if (_visible) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
}
Instance of Symbol 1692 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "airStrike1";
if (_root.selectedMap == "Indirect Fight") {
_visible = false;
}
if (_root.selectedMap == "Movie Theatre") {
_visible = false;
}
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.treasureStrikes;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
if (_visible) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Treasure Strike x " add quantity;
_parent._parent.detailedWeaponInfo = "Launches a pirate ship to drop a random amount of treasure chests from the sky at a specifed target.";
}
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (_visible) {
if (quantity > 0) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
}
Instance of Symbol 1694 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "shotgun";
if (_root.selectedMap == "Indirect Fight") {
_visible = false;
}
keyword = weapon;
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
_visible = false;
}
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.shotguns;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
if (_visible) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Shotgun x " add quantity;
_parent._parent.detailedWeaponInfo = "A powerful close-range shotgun. Double barrel (2 shots). Widespread shot.";
}
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (quantity > 0) {
if (_visible) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
}
Instance of Symbol 1696 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "Skip Go";
}
on (rollOver) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Skip Go";
_parent._parent.detailedWeaponInfo = "This can either be classed as a tatical move or you being cowardly. ";
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
Instance of Symbol 1698 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "Surrender";
}
on (rollOver) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Surrender";
_parent._parent.detailedWeaponInfo = "Give up the treasure and admit defeat.";
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
Instance of Symbol 1700 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "Swap Go";
}
on (rollOver) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Swap Go";
_parent._parent.detailedWeaponInfo = "Allows you to switch between your teammaters. Tatical Move.";
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
Instance of Symbol 1702 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
weapon = "airStrike2";
if (_root.selectedMap == "Indirect Fight") {
_visible = false;
}
if (_root.selectedMap == "Movie Theatre") {
_visible = false;
}
keyword = "Homing Parrot Strike";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
_visible = false;
}
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.parrotStrikes;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
if (_visible) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Homing Parrot Strike x " add quantity;
_parent._parent.detailedWeaponInfo = "Launches a bird cage to launch a random amount of Parrots to a specified target. Will automatically detect new target and change direction.";
}
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (quantity > 0) {
if (_visible) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
}
Instance of Symbol 1704 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
if (_root.selectedMap == "Indirect Fight") {
_visible = false;
}
if (_root.selectedMap == "Movie Theatre") {
_visible = false;
}
weapon = "djLocker";
keyword = "Davey Jones Locker";
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
_visible = false;
}
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.daveyJonesLockers;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
if (_visible) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Davey Jones Locker x " add quantity;
_parent._parent.detailedWeaponInfo = "Launches the almighty Davey Jones Locker on a specified target.";
}
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (quantity > 0) {
if (_visible) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
}
Instance of Symbol 1706 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
if (_root.selectedMap == "Indirect Fight") {
_visible = false;
}
weapon = "Rum Bottle";
keyword = weapon;
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
_visible = false;
}
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.rumBottles;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
if (_visible) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Rum Bottle x " add quantity;
_parent._parent.detailedWeaponInfo = "1897, a fine year. Restores Health. Ruins breath.";
}
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (quantity > 0) {
if (_visible) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
}
Instance of Symbol 1708 MovieClip in Symbol 1709 MovieClip Frame 1
onClipEvent (load) {
if (_root.selectedMap == "Indirect Fight") {
_visible = false;
}
weapon = "Blackbeard";
keyword = weapon;
done = false;
z = 0;
while (z < _root.unlocked.length) {
lockTester = _root.unlocked[z].indexOf(keyword);
if (lockTester == 0) {
locked = false;
done = true;
} else if (done == false) {
locked = true;
}
z++;
}
if (locked) {
_visible = false;
}
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
target = _root.team1Quantities;
}
if (((_root.attention == _root.pirateb) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratef)) {
target = _root.team2Quantities;
}
quantity = target.blackbeards;
if (quantity <= 0) {
_alpha = 40;
}
}
on (rollOver) {
if (_visible) {
this.gotoAndStop(2);
_parent._parent.weaponName = "Blackbeard x " add quantity;
_parent._parent.detailedWeaponInfo = "The foulest pirate in the 7 seas. Instant death on contact.";
}
}
on (rollOut) {
this.gotoAndStop(1);
_parent._parent.weaponName = "";
_parent._parent.detailedWeaponInfo = "";
}
on (press) {
if (quantity > 0) {
if (_visible) {
_parent._parent.weapon = weapon;
_parent._parent.changeWeapon();
_parent._parent.changeAnimation();
}
}
}
Symbol 1712 MovieClip Frame 25
_parent.gotoAndStop(3);
Symbol 1717 MovieClip Frame 25
_parent.gotoAndStop(1);
Symbol 1718 MovieClip Frame 1
weaponName = "";
stop();
Symbol 1718 MovieClip Frame 2
stop();
Symbol 1718 MovieClip Frame 3
weaponName = "";
detailedWeaponInfo = "";
stop();
Symbol 1718 MovieClip Frame 4
stop();
Symbol 1731 MovieClip Frame 17
_parent.gotoAndStop(3);
Symbol 1733 MovieClip Frame 17
_parent.gotoAndStop(1);
Symbol 1734 MovieClip Frame 1
stop();
busy = false;
Symbol 1734 MovieClip Frame 2
stop();
Symbol 1734 MovieClip Frame 3
stop();
Instance of Symbol 1732 MovieClip in Symbol 1734 MovieClip Frame 3
onClipEvent (load) {
waited = 0;
delay = 80;
}
onClipEvent (enterFrame) {
waited++;
if (waited >= delay) {
_parent.gotoAndStop(4);
}
}
Symbol 1734 MovieClip Frame 4
stop();
Instance of Symbol 1738 MovieClip in Symbol 1740 MovieClip Frame 1
onClipEvent (enterFrame) {
colour = _root.pirateb.colour;
if (colour == "red") {
teamcolour = new Color(this);
teamcolour.setRGB(13369344);
}
if (colour == "blue") {
teamcolour = new Color(this);
teamcolour.setRGB(255);
}
if (colour == "green") {
teamcolour = new Color(this);
teamcolour.setRGB(52224);
}
if (colour == "purple") {
teamcolour = new Color(this);
teamcolour.setRGB(10027263);
}
if (colour == "orange") {
teamcolour = new Color(this);
teamcolour.setRGB(16763904);
}
if (colour == "black") {
teamcolour = new Color(this);
teamcolour.setRGB(0);
}
}
Instance of Symbol 1738 MovieClip in Symbol 1741 MovieClip Frame 1
onClipEvent (enterFrame) {
colour = _root.pirate.colour;
if (colour == "red") {
teamcolour = new Color(this);
teamcolour.setRGB(13369344);
}
if (colour == "blue") {
teamcolour = new Color(this);
teamcolour.setRGB(255);
}
if (colour == "green") {
teamcolour = new Color(this);
teamcolour.setRGB(52224);
}
if (colour == "purple") {
teamcolour = new Color(this);
teamcolour.setRGB(10027263);
}
if (colour == "orange") {
teamcolour = new Color(this);
teamcolour.setRGB(16763904);
}
if (colour == "black") {
teamcolour = new Color(this);
teamcolour.setRGB(0);
}
}
Instance of Symbol 1747 MovieClip in Symbol 1748 MovieClip Frame 1
onClipEvent (load) {
decided = false;
}
onClipEvent (enterFrame) {
if (!decided) {
if (_root.team1Win) {
winningTeam = _root.matchedTeam1 add " Win!";
decided = true;
}
if (_root.team2Win) {
winningTeam = _root.matchedTeam2 add " Win!";
decided = true;
}
}
}
Symbol 1769 MovieClip Frame 1
stop();
Symbol 1769 MovieClip Frame 2
_root.goldCounter = _root.goldCounter + 5;
Symbol 1769 MovieClip Frame 71
stop();
if (_root.team1Win) {
winner = _root.matchedTeam1 add " Won!";
}
if (_root.team2Win) {
winner = _root.matchedTeam2 add " Won!";
}
trace("The highest one is " add _root.misscount[5]);
worstAimNumber = _root.misscount[5];
if (_root.pirate.misses == worstAimNumber) {
worstAim = _root.pirate.name;
}
if (_root.pirateb.misses == worstAimNumber) {
worstAim = _root.pirateb.name;
}
if (_root.piratec.misses == worstAimNumber) {
worstAim = _root.piratec.name;
}
if (_root.pirated.misses == worstAimNumber) {
worstAim = _root.pirated.name;
}
if (_root.piratee.misses == worstAimNumber) {
worstAim = _root.piratee.name;
}
if (_root.piratef.misses == worstAimNumber) {
worstAim = _root.piratef.name;
}
if (worstAim == undefined) {
worstAim = "Undecided";
}
if (_root.misscount[5] == 0) {
worstAim = "No Missed Shots";
}
worstAimer = worstAim;
_root.healthcount = [_root.pirate.health, _root.pirateb.health, _root.piratec.health, _root.pirated.health, _root.piratee.health, _root.piratef.health];
_root.healthcount.sortOn(_root.healthcount, Array.NUMERIC);
mostHealthN = _root.healthcount[5];
if (_root.pirate.health == mostHealthN) {
bestPirate = _root.pirate.name;
}
if (_root.pirateb.health == mostHealthN) {
bestPirate = _root.pirateb.name;
}
if (_root.piratec.health == mostHealthN) {
bestPirate = _root.piratec.name;
}
if (_root.pirated.health == mostHealthN) {
bestPirate = _root.pirated.name;
}
if (_root.piratee.health == mostHealthN) {
bestPirate = _root.piratee.name;
}
if (_root.piratef.health == mostHealthN) {
bestPirate = _root.piratef.name;
}
bestPirateName = bestPirate;
_root.stepcount = [_root.pirate.walkCounter, _root.pirateb.walkCounter, _root.piratec.walkCounter, _root.pirated.walkCounter, _root.piratee.walkCounter, _root.piratef.walkCounter];
_root.stepcount.sortOn(_root.stepcount, Array.NUMERIC);
stepCountN = _root.stepcount[5];
if (_root.pirate.walkCounter == stepCountN) {
walkerPirate = _root.pirate.name;
}
if (_root.pirateb.walkCounter == stepCountN) {
walkerPirate = _root.pirateb.name;
}
if (_root.piratec.walkCounter == stepCountN) {
walkerPirate = _root.piratec.name;
}
if (_root.pirated.walkCounter == stepCountN) {
walkerPirate = _root.pirated.name;
}
if (_root.piratee.walkCounter == stepCountN) {
walkerPirate = _root.piratee.name;
}
if (_root.piratef.walkCounter == stepCountN) {
walkerPirate = _root.piratef.name;
}
boringPirate = walkerPirate;
Instance of Symbol 1766 MovieClip in Symbol 1769 MovieClip Frame 71
on (press) {
function saveGame() {
myLSO = SharedObject.getLocal("Pirates");
if (myLSO.data.myObj == undefined) {
_root.helpText = "New game File Created";
} else {
_root.helpText = "Game Data Overwritten";
}
myObj = {};
myObj.objArray = new Array();
myObj.objArray[0] = _root.teamListNumber;
myObj.objArray[1] = _root.unlocked;
myObj.objArray[2] = _root.gold;
myObj.objArray[3] = _root.soundsVolumePos;
myObj.objArray[4] = _root.musicVolumePos;
myObj.objArray[5] = _root.team1.name;
myObj.objArray[6] = _root.team1.p1;
myObj.objArray[7] = _root.team1.p2;
myObj.objArray[8] = _root.team1.p3;
myObj.objArray[9] = _root.team1.grave;
myObj.objArray[10] = _root.team1.lefteyechance;
myObj.objArray[11] = _root.team1.hatchance;
myObj.objArray[12] = _root.team1.beardchance;
myObj.objArray[13] = _root.team1.lefthandchance;
myObj.objArray[14] = _root.team1.righthandchance;
myObj.objArray[15] = _root.team1.lefthairchance;
myObj.objArray[16] = _root.team1.legchance;
myObj.objArray[17] = _root.team2.name;
myObj.objArray[18] = _root.team2.p1;
myObj.objArray[19] = _root.team2.p2;
myObj.objArray[20] = _root.team2.p3;
myObj.objArray[21] = _root.team2.grave;
myObj.objArray[22] = _root.team2.lefteyechance;
myObj.objArray[23] = _root.team2.hatchance;
myObj.objArray[24] = _root.team2.beardchance;
myObj.objArray[25] = _root.team2.lefthandchance;
myObj.objArray[26] = _root.team2.righthandchance;
myObj.objArray[27] = _root.team2.lefthairchance;
myObj.objArray[28] = _root.team2.legchance;
myObj.objArray[29] = _root.team3.name;
myObj.objArray[30] = _root.team3.p1;
myObj.objArray[31] = _root.team3.p2;
myObj.objArray[32] = _root.team3.p3;
myObj.objArray[33] = _root.team3.grave;
myObj.objArray[34] = _root.team3.lefteyechance;
myObj.objArray[35] = _root.team3.hatchance;
myObj.objArray[36] = _root.team3.beardchance;
myObj.objArray[37] = _root.team3.lefthandchance;
myObj.objArray[38] = _root.team3.righthandchance;
myObj.objArray[39] = _root.team3.lefthairchance;
myObj.objArray[40] = _root.team3.legchance;
myObj.objArray[41] = _root.team1.colour;
myObj.objArray[42] = _root.team2.colour;
myObj.objArray[43] = _root.team3.colour;
myObj.objArray[44] = _root.doneArrow;
myLSO.data.myObj = myObj;
}
_root.musicPlay = undefined;
_root.Gamemusic.stop();
_root.gold = _root.gold + _root.goldCounter;
_root.cashreg.start();
_root.killAll = true;
if (_parent.saveClick) {
trace("GAME SAVED");
saveGame();
}
_root.InGameCursor.swapDepths(18230);
_root.InGameCursor.removeMovieClip();
_root.gameCursor.swapDepths(19230);
_root.gameCursor.removeMovieClip();
_root.helpText = ("Welcome Back, you now have " add _root.gold) add " Gold";
_root.gotoAndStop("Menu");
_root.statistics.removeMovieClip();
}
Instance of Symbol 1768 MovieClip in Symbol 1769 MovieClip Frame 71
on (press) {
_parent.saveClick = true;
_root.click.start();
}
Instance of Symbol 1718 MovieClip "WM" in Symbol 1772 MovieClip Frame 1
onClipEvent (load) {
function changeAnimation() {
if ((((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) or (_root.attention == _root.pirateg)) {
if (((((_root.attention._currentframe == 1) or (_root.attention._currentframe == 2)) or (_root.attention._currentframe == 3)) or (_root.attention._currentframe == 4)) or (_root.attention._currentframe == 5)) {
if (_currentframe == 1) {
this.gotoAndStop(2);
}
}
if (_currentframe == 3) {
this.gotoAndStop(4);
}
}
}
function changeWeapon() {
if (_root.teamType == "human") {
if ((((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) or (_root.attention == _root.pirateg)) {
if (_root.turn.shotNumber == 0) {
_root.turn.weaponOut = weapon;
_root.target = undefined;
}
}
}
}
_root.team1Quantities = new Object();
_root.team1Quantities.cannons = Infinity;
_root.team1Quantities.homingMissiles = 2;
_root.team1Quantities.rottenRations = 2;
_root.team1Quantities.evilDolls = 2;
_root.team1Quantities.anchors = 3;
_root.team1Quantities.beachballs = 3;
_root.team1Quantities.treasureStrikes = 1;
_root.team1Quantities.shotguns = 2;
_root.team1Quantities.parrotStrikes = 1;
_root.team1Quantities.daveyJonesLockers = 1;
_root.team1Quantities.rumBottles = 2;
_root.team1Quantities.blackbeards = 1;
_root.team2Quantities = new Object();
_root.team2Quantities.cannons = Infinity;
_root.team2Quantities.homingMissiles = 2;
_root.team2Quantities.rottenRations = 2;
_root.team2Quantities.evilDolls = 2;
_root.team2Quantities.anchors = 3;
_root.team2Quantities.beachballs = 3;
_root.team2Quantities.treasureStrikes = 1;
_root.team2Quantities.shotguns = 2;
_root.team2Quantities.parrotStrikes = 1;
_root.team2Quantities.daveyJonesLockers = 1;
_root.team2Quantities.rumBottles = 2;
_root.team2Quantities.blackbeards = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(113)) {
changeAnimation();
}
if (Key.isDown(32)) {
if (_currentframe == 3) {
this.gotoAndStop(4);
}
}
}
Instance of Symbol 1722 MovieClip "counter" in Symbol 1772 MovieClip Frame 1
onClipEvent (load) {
warningTime = 10;
_root.turnTime = _root.startTime;
_root.fakeTime = _root.turnTime;
delay = 1000;
resetTime = getTimer() + delay;
}
onClipEvent (enterFrame) {
if (!(_root.attention === _root.nT)) {
if (!(_root.attention === _root.InGameCursor)) {
return(undefined);
}
}
if (_root.team1Win or _root.team2Win) {
return(undefined);
}
if (getTimer() > resetTime) {
_root.turnTime--;
_root.fakeTime--;
resetTime = getTimer() + delay;
if (_root.fakeTime <= 5) {
_root.lowTime.start();
}
}
if (_root.turnTime <= warningTime) {
_root.turnTime = ("<P ALIGN=\"center\"><FONT COLOR=\"#000000\"><B>" add _root.fakeTime) add "</B></FONT>";
}
if (_root.fakeTime <= 0) {
_root.turn.shotNumber = 0;
_root.previousTurn = _root.turn;
_root.turn.gotoAndStop(1);
_root.dT();
}
}
Instance of Symbol 1734 MovieClip "commentGenerator" in Symbol 1772 MovieClip Frame 1
onClipEvent (load) {
function makeBadComment() {
done = true;
this.gotoAndStop(2);
busy = true;
commentNumber = Math.round(Math.random() * 12);
if (commentNumber == 0) {
_root.SAC = ("It's a shame " add whosDead.name) add " didn't pay his insurance...";
}
if (commentNumber == 1) {
_root.SAC = whosDead.name add " is now resting in pieces";
}
if (commentNumber == 2) {
_root.SAC = whosDead.name add " will be forgotten";
}
if (commentNumber == 3) {
_root.SAC = (("I'm sure " add whosDead.teamName) add " will manage without ") add whosDead.name;
}
if (commentNumber == 4) {
_root.SAC = whosDead.name add " didn't see that one coming";
}
if (commentNumber == 5) {
_root.SAC = "Oops...";
}
if (commentNumber == 6) {
_root.SAC = whosDead.name add " has gone to a slightly better place";
}
if (commentNumber == 7) {
_root.SAC = whosDead.name add " has gone to meet Elvis";
}
if (commentNumber == 8) {
_root.SAC = ("Damnit, " add whosDead.name) add " was 1 day off retirement";
}
if (commentNumber == 9) {
_root.SAC = whosDead.name add " has left the house";
}
if (commentNumber == 10) {
_root.SAC = whosDead.name add " wasn't a real pirate anyway";
}
if (commentNumber == 10) {
_root.SAC = ("No major loss, " add whosDead.name) add " was bound to die anyway...";
}
if (commentNumber == 11) {
_root.SAC = ("Oh Well, homeless pirates laughed at " add whosDead.name) add " anyway...";
}
if (commentNumber == 12) {
_root.SAC = whosDead.name add " bit the dust";
}
}
function makeGoodComment() {
done = true;
this.gotoAndStop(2);
busy = true;
commentNumber = Math.round(Math.random() * 16);
if (commentNumber == 0) {
_root.SAC = "Here comes " add whosOn.name;
}
if (commentNumber == 1) {
_root.SAC = ("Watch out, " add whosOn.name) add " is about";
}
if (commentNumber == 2) {
_root.SAC = ("Finally we get to see " add whosOn.name) add " in action...";
}
if (commentNumber == 3) {
_root.SAC = whosOn.name add " is looking for trouble...";
}
if (commentNumber == 4) {
_root.SAC = (whosOn.name add "'s arrogance will be the end of ") add whosOn.teamName;
}
if (commentNumber == 5) {
_root.SAC = ("Buy the new " add whosOn.name) add " actionfigure! In stores now";
}
if (commentNumber == 6) {
_root.SAC = whosOn.name add " knows the next move will count";
}
if (commentNumber == 7) {
_root.SAC = whosOn.name add " is armed and 'sorta' dangerous";
}
if (commentNumber == 8) {
_root.SAC = (whosOn.teamName add " wouldn't be the same without ") add whosOn.name;
}
if (commentNumber == 9) {
_root.SAC = "Why cant all pirates be like " add whosOn.name;
}
if (commentNumber == 10) {
_root.SAC = ((whosOn.name add " knows the fate of ") add whosOn.teamName) add " depends on him";
}
if (commentNumber == 11) {
_root.SAC = whosOn.name add " is still fighting; he wants his paycheck";
}
if (commentNumber == 12) {
_root.SAC = ("I speak for all of us when I say " add whosOn.name) add " is an idiot";
}
if (commentNumber == 13) {
_root.SAC = "Make way for " add whosOn.name;
}
if (commentNumber == 14) {
_root.SAC = whosOn.name add " moves in for the kill";
}
if (commentNumber == 15) {
_root.SAC = ("Can " add whosOn.name) add " turn the tables?";
}
if (commentNumber == 16) {
_root.SAC = whosOn.name add " is preparing for his 15 seconds of fame";
}
}
function makeWinSpeech() {
firstDeathS = false;
done = true;
this.gotoAndStop(2);
busy = true;
commentNumber = Math.round(Math.random() * 2);
if (commentNumber == 0) {
_root.SAC = ("Congratulations " add winner) add "!";
}
if (commentNumber == 1) {
_root.SAC = ("Looks like " add winner) add " just won this battle...";
}
if (commentNumber == 2) {
_root.SAC = winner add " had it in the bag from the start";
}
}
firstDeathS = true;
pirates = ["pirate", "pirateb", "piratec", "pirated"];
done = false;
lastTurn = _root.turn;
busy = false;
}
onClipEvent (enterFrame) {
whosOn = _root.turn;
whoHasTurn = _root.turn;
if (!(_root.turn === lastTurn)) {
done = false;
lastTurn = _root.turn;
}
}
onClipEvent (enterFrame) {
if (_root.changeTurn) {
if (!(whosOn === undefined)) {
if (!busy) {
if (done == false) {
if (whosOn.alive) {
commentChance = Math.round(Math.random() * 5);
done = true;
if (commentChance == 1) {
makeGoodComment();
_root.changeTurn = false;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (!busy) {
if (done == false) {
for (dead in pirates) {
if (_root[pirates[dead]].health == 0) {
if (_root[pirates[dead]].alive) {
whosDead = _root[pirates[dead]];
makeBadComment();
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (!busy) {
if (firstDeathS) {
if (done == false) {
if (_root.team1Win) {
winner = _root.matchedTeam1;
makeWinSpeech();
}
if (_root.team2Win) {
winner = _root.matchedTeam2;
makeWinSpeech();
}
}
}
}
}
Instance of Symbol 1740 MovieClip in Symbol 1772 MovieClip Frame 1
onClipEvent (load) {
teamMember1 = _root.pirateb;
teamMember2 = _root.pirated;
teamMember3 = _root.piratef;
}
onClipEvent (enterFrame) {
_parent.maxPercentB = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
totalHealth = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
percent = (totalHealth / _parent.highestNumber) * 100;
if (_xscale > 0) {
_xscale = percent;
}
if (((!teamMember1.alive) and (!teamMember2.alive)) and (!teamMember3.alive)) {
_root.team1Win = true;
}
}
Instance of Symbol 1741 MovieClip in Symbol 1772 MovieClip Frame 1
onClipEvent (load) {
teamMember1 = _root.pirate;
teamMember2 = _root.piratec;
teamMember3 = _root.piratee;
}
onClipEvent (enterFrame) {
_parent.maxPercentA = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
if (_parent.maxPercentA >= _parent.maxPercentB) {
if ((_parent.highestNumber == undefined) or (_parent.maxPercentA >= _parent.highestNumber)) {
_parent.highestNumber = _parent.maxPercentA;
}
}
if (_parent.maxPercentA < _parent.maxPercentB) {
if ((_parent.highestNumber == undefined) or (_parent.maxPercentB >= _parent.highestNumber)) {
_parent.highestNumber = _parent.maxPercentB;
}
}
totalHealth = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
percent = (totalHealth / _parent.highestNumber) * 100;
if (_xscale > 0) {
_xscale = percent;
}
if (((!teamMember1.alive) and (!teamMember2.alive)) and (!teamMember3.alive)) {
_root.team2Win = true;
}
}
Instance of Symbol 1744 MovieClip in Symbol 1772 MovieClip Frame 1
on (press) {
if (_quality == "HIGH") {
nQ = "MEDIUM";
}
if (_quality == "MEDIUM") {
nQ = "LOW";
}
if (_quality == "LOW") {
nQ = "HIGH";
}
_quality = nQ;
}
Instance of Symbol 1771 MovieClip in Symbol 1772 MovieClip Frame 1
onClipEvent (load) {
rate = 40;
byeTime = 60;
time = 0;
}
onClipEvent (enterFrame) {
_xscale = (_xscale + rate);
_yscale = (_yscale + rate);
time++;
if (time >= byeTime) {
this.swapDepths(2000);
this.removeMovieClip();
}
}
Symbol 1775 MovieClip Frame 1
stop();
_visible = true;
Instance of Symbol 1774 MovieClip in Symbol 1775 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.turn.weaponOut == "homingMissile1") or (_root.turn.weaponOut == "airStrike2")) {
if (_root.teamType == "human") {
if (_root.turn.alive) {
if (_root.target == undefined) {
_visible = true;
_root.attention = _parent._parent;
_parent._parent.InUse = true;
if (((this.hitTest(_root.back_bg.topWall) or this.hitTest(_root.back_bg.bottomWall)) or this.hitTest(_root.back_bg.leftWall)) or this.hitTest(_root.back_bg.rightWall)) {
ok = false;
} else {
ok = true;
}
if (ok) {
_parent._parent._x = _root._xmouse;
_parent._parent._y = _root._ymouse;
}
while (this.hitTest(_root.back_bg.topWall)) {
_parent._parent._y = _parent._parent._y + 10;
}
while (this.hitTest(_root.back_bg.bottomWall)) {
_parent._parent._y = _parent._parent._y - 10;
}
while (this.hitTest(_root.back_bg.leftWall)) {
_parent._parent._x = _parent._parent._x + 10;
}
while (this.hitTest(_root.back_bg.rightWall)) {
_parent._parent._x = _parent._parent._x - 10;
}
}
}
}
}
}
onClipEvent (mouseDown) {
if (_root.turn.alive) {
if (_root.teamType == "human") {
if ((_root.turn.weaponOut == "homingMissile1") or (_root.turn.weaponOut == "airStrike2")) {
if (_root.target == undefined) {
trace(":D");
_root.cam.Motion = 7;
_parent._parent.InUse = false;
_x = _x;
_y = _y;
_root.target = _parent._parent;
_root.attention = _root.turn;
}
}
}
}
}
Symbol 1780 MovieClip Frame 1
stop();
Symbol 1780 MovieClip Frame 2
stop();
Symbol 1780 MovieClip Frame 3
stop();
Instance of Symbol 1776 MovieClip in Symbol 1780 MovieClip Frame 3
onClipEvent (load) {
myX = _xscale;
_root.CursorFacing = "right";
tW = 0;
done = false;
allowed = true;
}
onClipEvent (enterFrame) {
if (_root.turn.weaponOut == "airStrike1") {
if (_root.teamType == "human") {
if (_root.target == undefined) {
_visible = true;
_root.attention = _parent;
_parent.InUse = true;
if (((this.hitTest(_root.back_bg.topWall) or this.hitTest(_root.back_bg.bottomWall)) or this.hitTest(_root.back_bg.leftWall)) or this.hitTest(_root.back_bg.rightWall)) {
ok = false;
} else {
ok = true;
}
if (ok) {
_parent._x = _root._xmouse;
_parent._y = _root._ymouse;
}
while (this.hitTest(_root.back_bg.topWall)) {
_parent._y = _parent._y + 10;
}
while (this.hitTest(_root.back_bg.bottomWall)) {
_parent._y = _parent._y - 10;
}
while (this.hitTest(_root.back_bg.leftWall)) {
_parent._x = _parent._x + 10;
}
while (this.hitTest(_root.back_bg.rightWall)) {
_parent._x = _parent._x - 10;
}
}
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
if (allowed) {
if (!done) {
if (_root.CursorFacing == "right") {
_xscale = (-myX);
_root.CursorFacing = "left";
done = true;
}
}
}
}
if (allowed) {
if (Key.isDown(68)) {
if (!done) {
if (_root.CursorFacing == "left") {
_xscale = myX;
_root.CursorFacing = "right";
done = true;
}
}
}
}
if (done) {
tW++;
if (tW > 5) {
done = false;
tW = 0;
}
}
}
onClipEvent (mouseDown) {
if (_root.teamType == "human") {
if (_root.turn.weaponOut == "airStrike1") {
if (_root.target == undefined) {
_parent.InUse = false;
_x = _x;
_y = _y;
allowed = false;
_root.target = _parent;
_root.attention = _root.turn;
}
}
}
}
Symbol 1780 MovieClip Frame 4
stop();
Instance of Symbol 1777 MovieClip in Symbol 1780 MovieClip Frame 4
onClipEvent (load) {
myX = _xscale;
_root.CursorFacing = "right";
tW = 0;
done = false;
allowed = true;
}
onClipEvent (enterFrame) {
if ((_root.turn.weaponOut == "airStrike2") or (_root.turn.weaponOut == "djLocker")) {
if (_root.teamType == "human") {
if (_root.target == undefined) {
_visible = true;
_root.attention = _parent;
_parent.InUse = true;
if (((this.hitTest(_root.back_bg.topWall) or this.hitTest(_root.back_bg.bottomWall)) or this.hitTest(_root.back_bg.leftWall)) or this.hitTest(_root.back_bg.rightWall)) {
ok = false;
} else {
ok = true;
}
if (ok) {
_parent._x = _root._xmouse;
_parent._y = _root._ymouse;
}
while (this.hitTest(_root.back_bg.topWall)) {
_parent._y = _parent._y + 10;
}
while (this.hitTest(_root.back_bg.bottomWall)) {
_parent._y = _parent._y - 10;
}
while (this.hitTest(_root.back_bg.leftWall)) {
_parent._x = _parent._x + 10;
}
while (this.hitTest(_root.back_bg.rightWall)) {
_parent._x = _parent._x - 10;
}
}
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
if (allowed) {
if (!done) {
if (_root.CursorFacing == "right") {
_xscale = (-myX);
_root.CursorFacing = "left";
done = true;
}
}
}
}
if (allowed) {
if (Key.isDown(68)) {
if (!done) {
if (_root.CursorFacing == "left") {
_xscale = myX;
_root.CursorFacing = "right";
done = true;
}
}
}
}
if (done) {
tW++;
if (tW > 5) {
done = false;
tW = 0;
}
}
}
onClipEvent (mouseDown) {
if (_root.teamType == "human") {
if ((_root.turn.weaponOut == "airStrike2") or (_root.turn.weaponOut == "djLocker")) {
if (_root.target == undefined) {
_parent.InUse = false;
_x = _x;
_y = _y;
allowed = false;
_root.target = _parent;
_root.attention = _root.turn;
}
}
}
}
Symbol 1780 MovieClip Frame 5
stop();
Instance of Symbol 1779 MovieClip in Symbol 1780 MovieClip Frame 5
onClipEvent (load) {
myX = _xscale;
tW = 0;
done = false;
allowed = true;
}
onClipEvent (enterFrame) {
if (_root.turn.weaponOut == "Blackbeard") {
if (_root.teamType == "human") {
if (_root.target == undefined) {
_visible = true;
_root.attention = _parent;
_parent.InUse = true;
if (((this.hitTest(_root.back_bg.topWall) or this.hitTest(_root.back_bg.bottomWall)) or this.hitTest(_root.back_bg.leftWall)) or this.hitTest(_root.back_bg.rightWall)) {
ok = false;
} else {
ok = true;
}
if (ok) {
_parent._x = _root._xmouse;
_parent._y = _root._ymouse;
}
while (this.hitTest(_root.back_bg.topWall)) {
_parent._y = _parent._y + 10;
}
while (this.hitTest(_root.back_bg.bottomWall)) {
_parent._y = _parent._y - 10;
}
while (this.hitTest(_root.back_bg.leftWall)) {
_parent._x = _parent._x + 10;
}
while (this.hitTest(_root.back_bg.rightWall)) {
_parent._x = _parent._x - 10;
}
}
}
}
}
onClipEvent (mouseDown) {
if (_root.teamType == "human") {
if (_root.turn.weaponOut == "Blackbeard") {
if (_root.target == undefined) {
_parent.InUse = false;
_x = _x;
_y = _y;
allowed = false;
_root.target = _parent;
_root.attention = _root.turn;
}
}
}
}
Symbol 1785 MovieClip Frame 1
stop();
Symbol 1785 MovieClip Frame 2
stop();
Instance of Symbol 1784 MovieClip in Symbol 1785 MovieClip Frame 2
onClipEvent (load) {
time = 0;
}
onClipEvent (enterFrame) {
time++;
if (time > 20) {
_parent.gotoAndStop(1);
}
}
Instance of Symbol 1793 MovieClip in Symbol 1794 MovieClip Frame 1
onClipEvent (load) {
decided = false;
}
onClipEvent (enterFrame) {
if (!decided) {
if (_root.team1Win) {
winningTeam = _root.matchedTeam1.name add " Win!";
decided = true;
}
if (_root.team2Win) {
winningTeam = _root.matchedTeam2.name add " Win!";
decided = true;
}
}
}
Symbol 1802 MovieClip Frame 1
stop();
Symbol 1802 MovieClip Frame 2
_root.goldCounter = _root.goldCounter + 5;
Symbol 1802 MovieClip Frame 71
stop();
if (_root.team1Win) {
winner = _root.matchedTeam1.name add " Won!";
}
if (_root.team2Win) {
winner = _root.matchedTeam2.name add " Won!";
}
trace("The highest one is " add _root.misscount[5]);
worstAimNumber = _root.misscount[5];
if (_root.pirate.misses == worstAimNumber) {
worstAim = _root.pirate.name;
}
if (_root.pirateb.misses == worstAimNumber) {
worstAim = _root.pirateb.name;
}
if (_root.piratec.misses == worstAimNumber) {
worstAim = _root.piratec.name;
}
if (_root.pirated.misses == worstAimNumber) {
worstAim = _root.pirated.name;
}
if (_root.piratee.misses == worstAimNumber) {
worstAim = _root.piratee.name;
}
if (_root.piratef.misses == worstAimNumber) {
worstAim = _root.piratef.name;
}
if (worstAim == undefined) {
worstAim = "Undecided";
}
worstAimer = worstAim;
_root.healthcount = [_root.pirate.health, _root.pirateb.health, _root.piratec.health, _root.pirated.health, _root.piratee.health, _root.piratef.health];
_root.healthcount.sortOn(_root.healthcount, Array.NUMERIC);
mostHealthN = _root.healthcount[5];
if (_root.pirate.health == mostHealthN) {
bestPirate = _root.pirate.name;
}
if (_root.pirateb.health == mostHealthN) {
bestPirate = _root.pirateb.name;
}
if (_root.piratec.health == mostHealthN) {
bestPirate = _root.piratec.name;
}
if (_root.pirated.health == mostHealthN) {
bestPirate = _root.pirated.name;
}
if (_root.piratee.health == mostHealthN) {
bestPirate = _root.piratee.name;
}
if (_root.piratef.health == mostHealthN) {
bestPirate = _root.piratef.name;
}
bestPirateName = bestPirate;
_root.stepcount = [_root.pirate.walkCounter, _root.pirateb.walkCounter, _root.piratec.walkCounter, _root.pirated.walkCounter, _root.piratee.walkCounter, _root.piratef.walkCounter];
_root.stepcount.sortOn(_root.stepcount, Array.NUMERIC);
stepCountN = _root.stepcount[5];
if (_root.pirate.walkCounter == stepCountN) {
walkerPirate = _root.pirate.name;
}
if (_root.pirateb.walkCounter == stepCountN) {
walkerPirate = _root.pirateb.name;
}
if (_root.piratec.walkCounter == stepCountN) {
walkerPirate = _root.piratec.name;
}
if (_root.pirated.walkCounter == stepCountN) {
walkerPirate = _root.pirated.name;
}
if (_root.piratee.walkCounter == stepCountN) {
walkerPirate = _root.piratee.name;
}
if (_root.piratef.walkCounter == stepCountN) {
walkerPirate = _root.piratef.name;
}
boringPirate = walkerPirate;
saveClick = false;
Instance of Symbol 1766 MovieClip in Symbol 1802 MovieClip Frame 71
on (press) {
function saveGame() {
myLSO = SharedObject.getLocal("Pirates");
if (myLSO.data.myObj == undefined) {
_root.helpText = "New game File Created";
} else {
_root.helpText = "Game Data Overwritten";
}
myObj = {};
myObj.objArray = new Array();
myObj.objArray[0] = _root.teamListNumber;
myObj.objArray[1] = _root.unlocked;
myObj.objArray[2] = _root.gold;
myObj.objArray[3] = _root.soundsVolumePos;
myObj.objArray[4] = _root.musicVolumePos;
myObj.objArray[5] = _root.team1.name;
myObj.objArray[6] = _root.team1.p1;
myObj.objArray[7] = _root.team1.p2;
myObj.objArray[8] = _root.team1.p3;
myObj.objArray[9] = _root.team1.grave;
myObj.objArray[10] = _root.team1.lefteyechance;
myObj.objArray[11] = _root.team1.hatchance;
myObj.objArray[12] = _root.team1.beardchance;
myObj.objArray[13] = _root.team1.lefthandchance;
myObj.objArray[14] = _root.team1.righthandchance;
myObj.objArray[15] = _root.team1.lefthairchance;
myObj.objArray[16] = _root.team1.legchance;
myObj.objArray[17] = _root.team2.name;
myObj.objArray[18] = _root.team2.p1;
myObj.objArray[19] = _root.team2.p2;
myObj.objArray[20] = _root.team2.p3;
myObj.objArray[21] = _root.team2.grave;
myObj.objArray[22] = _root.team2.lefteyechance;
myObj.objArray[23] = _root.team2.hatchance;
myObj.objArray[24] = _root.team2.beardchance;
myObj.objArray[25] = _root.team2.lefthandchance;
myObj.objArray[26] = _root.team2.righthandchance;
myObj.objArray[27] = _root.team2.lefthairchance;
myObj.objArray[28] = _root.team2.legchance;
myObj.objArray[29] = _root.team3.name;
myObj.objArray[30] = _root.team3.p1;
myObj.objArray[31] = _root.team3.p2;
myObj.objArray[32] = _root.team3.p3;
myObj.objArray[33] = _root.team3.grave;
myObj.objArray[34] = _root.team3.lefteyechance;
myObj.objArray[35] = _root.team3.hatchance;
myObj.objArray[36] = _root.team3.beardchance;
myObj.objArray[37] = _root.team3.lefthandchance;
myObj.objArray[38] = _root.team3.righthandchance;
myObj.objArray[39] = _root.team3.lefthairchance;
myObj.objArray[40] = _root.team3.legchance;
myObj.objArray[41] = _root.team1.colour;
myObj.objArray[42] = _root.team2.colour;
myObj.objArray[43] = _root.team3.colour;
myObj.objArray[44] = _root.doneArrow;
myLSO.data.myObj = myObj;
}
_root.musicPlay = undefined;
_root.Gamemusic.stop();
_root.gold = _root.gold + _root.goldCounter;
_root.cashreg.start();
_root.killAll = true;
if (_parent.saveClick) {
trace("GAME SAVED");
saveGame();
}
_root.InGameCursor.swapDepths(18230);
_root.InGameCursor.removeMovieClip();
_root.gameCursor.swapDepths(19230);
_root.gameCursor.removeMovieClip();
_root.helpText = ("Welcome Back, you now have " add _root.gold) add " Gold";
_root.gotoAndStop("Menu");
_root.statistics.removeMovieClip();
}
Instance of Symbol 1768 MovieClip in Symbol 1802 MovieClip Frame 71
on (press) {
_parent.saveClick = true;
_root.click.start();
}
Instance of Symbol 1718 MovieClip "WM" in Symbol 1803 MovieClip Frame 1
onClipEvent (load) {
function changeAnimation() {
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
if (((((_root.attention._currentframe == 1) or (_root.attention._currentframe == 2)) or (_root.attention._currentframe == 3)) or (_root.attention._currentframe == 4)) or (_root.attention._currentframe == 5)) {
if (_currentframe == 1) {
this.gotoAndStop(2);
}
if (_currentframe == 3) {
this.gotoAndStop(4);
}
}
}
}
function changeWeapon() {
if (_root.teamType == "human") {
if (((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.piratee)) {
if (_root.turn.shotNumber == 0) {
_root.turn.weaponOut = weapon;
_root.target = undefined;
}
}
}
}
_root.team1Quantities = new Object();
_root.team1Quantities.cannons = Infinity;
_root.team1Quantities.homingMissiles = 2;
_root.team1Quantities.rottenRations = 2;
_root.team1Quantities.evilDolls = 2;
_root.team1Quantities.anchors = 3;
_root.team1Quantities.beachballs = 3;
_root.team1Quantities.treasureStrikes = 1;
_root.team1Quantities.shotguns = 2;
_root.team1Quantities.parrotStrikes = 1;
_root.team1Quantities.daveyJonesLockers = 1;
_root.team1Quantities.rumBottles = 2;
_root.team1Quantities.blackbeards = 1;
_root.team2Quantities = new Object();
_root.team2Quantities.cannons = Infinity;
_root.team2Quantities.homingMissiles = 2;
_root.team2Quantities.rottenRations = 2;
_root.team2Quantities.evilDolls = 2;
_root.team2Quantities.anchors = 3;
_root.team2Quantities.beachballs = 3;
_root.team2Quantities.treasureStrikes = 1;
_root.team2Quantities.shotguns = 2;
_root.team2Quantities.parrotStrikes = 1;
_root.team2Quantities.daveyJonesLockers = 1;
_root.team2Quantities.rumBottles = 2;
_root.team2Quantities.blackbeards = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(113)) {
changeAnimation();
}
if (Key.isDown(32)) {
if (_currentframe == 3) {
this.gotoAndStop(4);
}
}
}
Instance of Symbol 1734 MovieClip "commentGenerator" in Symbol 1803 MovieClip Frame 1
onClipEvent (load) {
function makeBadComment() {
done = true;
this.gotoAndStop(2);
busy = true;
commentNumber = Math.round(Math.random() * 12);
if (commentNumber == 0) {
_root.SAC = ("It's a shame " add whosDead.name) add " didn't pay his insurance...";
}
if (commentNumber == 1) {
_root.SAC = whosDead.name add " is now resting in pieces";
}
if (commentNumber == 2) {
_root.SAC = whosDead.name add " will be forgotten";
}
if (commentNumber == 3) {
_root.SAC = (("I'm sure " add whosDead.teamName) add " will manage without ") add whosDead.name;
}
if (commentNumber == 4) {
_root.SAC = whosDead.name add " didn't see that one coming";
}
if (commentNumber == 5) {
_root.SAC = "Oops...";
}
if (commentNumber == 6) {
_root.SAC = whosDead.name add " has gone to a slightly better place";
}
if (commentNumber == 7) {
_root.SAC = whosDead.name add " has gone to meet Elvis";
}
if (commentNumber == 8) {
_root.SAC = ("Damnit, " add whosDead.name) add " was 1 day off retirement";
}
if (commentNumber == 9) {
_root.SAC = whosDead.name add " has left the house";
}
if (commentNumber == 10) {
_root.SAC = whosDead.name add " wasn't a real pirate anyway";
}
if (commentNumber == 10) {
_root.SAC = ("No major loss, " add whosDead.name) add " was bound to die anyway...";
}
if (commentNumber == 11) {
_root.SAC = ("Oh Well, homeless pirates laughed at " add whosDead.name) add " anyway...";
}
if (commentNumber == 12) {
_root.SAC = whosDead.name add " bit the dust";
}
}
function makeGoodComment() {
done = true;
this.gotoAndStop(2);
busy = true;
commentNumber = Math.round(Math.random() * 16);
if (commentNumber == 0) {
_root.SAC = "Here comes " add whosOn.name;
}
if (commentNumber == 1) {
_root.SAC = ("Watch out, " add whosOn.name) add " is about";
}
if (commentNumber == 2) {
_root.SAC = ("Finally we get to see " add whosOn.name) add " in action...";
}
if (commentNumber == 3) {
_root.SAC = whosOn.name add " is looking for trouble...";
}
if (commentNumber == 4) {
_root.SAC = (whosOn.name add "'s arrogance will be the end of ") add whosOn.teamName;
}
if (commentNumber == 5) {
_root.SAC = ("Buy the new " add whosOn.name) add " actionfigure! In stores now";
}
if (commentNumber == 6) {
_root.SAC = whosOn.name add " knows the next move will count";
}
if (commentNumber == 7) {
_root.SAC = whosOn.name add " is armed and 'sorta' dangerous";
}
if (commentNumber == 8) {
_root.SAC = (whosOn.teamName add " wouldn't be the same without ") add whosOn.name;
}
if (commentNumber == 9) {
_root.SAC = "Why cant all pirates be like " add whosOn.name;
}
if (commentNumber == 10) {
_root.SAC = ((whosOn.name add " knows the fate of ") add whosOn.teamName) add " depends on him";
}
if (commentNumber == 11) {
_root.SAC = whosOn.name add " is still fighting; he wants his paycheck";
}
if (commentNumber == 12) {
_root.SAC = ("I speak for all of us when I say " add whosOn.name) add " is an idiot";
}
if (commentNumber == 13) {
_root.SAC = "Make way for " add whosOn.name;
}
if (commentNumber == 14) {
_root.SAC = whosOn.name add " moves in for the kill";
}
if (commentNumber == 15) {
_root.SAC = ("Can " add whosOn.name) add " turn the tables?";
}
if (commentNumber == 16) {
_root.SAC = whosOn.name add " is preparing for his 15 seconds of fame";
}
}
function makeWinSpeech() {
firstDeathS = false;
done = true;
this.gotoAndStop(2);
busy = true;
commentNumber = Math.round(Math.random() * 2);
if (commentNumber == 0) {
_root.SAC = ("Congratulations " add winner) add "!";
}
if (commentNumber == 1) {
_root.SAC = ("Looks like " add winner) add " just won this battle...";
}
if (commentNumber == 2) {
_root.SAC = winner add " had it in the bag from the start";
}
}
firstDeathS = true;
pirates = ["pirate", "pirateb", "piratec", "pirated"];
done = false;
lastTurn = _root.turn;
busy = false;
}
onClipEvent (enterFrame) {
whosOn = _root.turn;
whoHasTurn = _root.turn;
if (!(_root.turn === lastTurn)) {
done = false;
lastTurn = _root.turn;
}
}
onClipEvent (enterFrame) {
if (_root.changeTurn) {
if (!(whosOn === undefined)) {
if (!busy) {
if (!_root.team1Win) {
if (!_root.team2Win) {
if (done == false) {
if (whosOn.health > _root.deathHealth) {
if (whosOn.alive) {
commentChance = Math.round(Math.random() * 5);
done = true;
if (commentChance == 1) {
makeGoodComment();
_root.changeTurn = false;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (!busy) {
if (done == false) {
for (dead in pirates) {
if (_root[pirates[dead]].health == 0) {
if (_root[pirates[dead]].alive) {
whosDead = _root[pirates[dead]];
makeBadComment();
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (!busy) {
if (firstDeathS) {
if (done == false) {
if (_root.team1Win) {
winner = _root.matchedTeam1.name;
makeWinSpeech();
}
if (_root.team2Win) {
winner = _root.matchedTeam2.name;
makeWinSpeech();
}
}
}
}
}
Instance of Symbol 1722 MovieClip "counter" in Symbol 1803 MovieClip Frame 1
onClipEvent (load) {
warningTime = 10;
_root.turnTime = _root.startTime;
_root.fakeTime = _root.turnTime;
delay = 1000;
resetTime = getTimer() + delay;
}
onClipEvent (enterFrame) {
if (_root.startTime == "\u03A9") {
_root.turnTime = "<P ALIGN=\"center\"><FONT COLOR=\"#000000\"><B>\u03A9</B></FONT>";
return(undefined);
}
if (!(_root.attention === _root.nT)) {
if (!(_root.attention === _root.InGameCursor)) {
return(undefined);
}
}
if (_root.team1Win or _root.team2Win) {
return(undefined);
}
if (getTimer() > resetTime) {
_root.turnTime--;
_root.fakeTime--;
resetTime = getTimer() + delay;
if (_root.fakeTime <= 5) {
_root.lowTime.start();
}
}
if (_root.turnTime <= warningTime) {
_root.turnTime = ("<P ALIGN=\"center\"><FONT COLOR=\"#000000\"><B>" add _root.fakeTime) add "</B></FONT>";
}
if (_root.fakeTime <= 0) {
_root.turn.shotNumber = 0;
_root.previousTurn = _root.turn;
_root.turn.gotoAndStop(1);
_root.dT();
}
}
Instance of Symbol 1740 MovieClip in Symbol 1803 MovieClip Frame 1
onClipEvent (load) {
teamMember1 = _root.pirateb;
teamMember2 = _root.pirated;
teamMember3 = _root.piratef;
}
onClipEvent (enterFrame) {
_parent.maxPercentB = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
totalHealth = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
percent = (totalHealth / _parent.highestNumber) * 100;
if (_xscale > 0) {
_xscale = percent;
}
if (((!teamMember1.alive) and (!teamMember2.alive)) and (!teamMember3.alive)) {
_root.team1Win = true;
}
}
Instance of Symbol 1741 MovieClip in Symbol 1803 MovieClip Frame 1
onClipEvent (load) {
teamMember1 = _root.pirate;
teamMember2 = _root.piratec;
teamMember3 = _root.piratee;
}
onClipEvent (enterFrame) {
_parent.maxPercentA = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
if (_parent.maxPercentA >= _parent.maxPercentB) {
if ((_parent.highestNumber == undefined) or (_parent.maxPercentA >= _parent.highestNumber)) {
_parent.highestNumber = _parent.maxPercentA;
}
}
if (_parent.maxPercentA < _parent.maxPercentB) {
if ((_parent.highestNumber == undefined) or (_parent.maxPercentB >= _parent.highestNumber)) {
_parent.highestNumber = _parent.maxPercentB;
}
}
totalHealth = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
percent = (totalHealth / _parent.highestNumber) * 100;
if (_xscale > 0) {
_xscale = percent;
}
if (((!teamMember1.alive) and (!teamMember2.alive)) and (!teamMember3.alive)) {
_root.team2Win = true;
}
}
Instance of Symbol 1744 MovieClip in Symbol 1803 MovieClip Frame 1
on (press) {
if (_quality == "HIGH") {
nQ = "MEDIUM";
}
if (_quality == "MEDIUM") {
nQ = "LOW";
}
if (_quality == "LOW") {
nQ = "HIGH";
}
_quality = nQ;
}
Instance of Symbol 1771 MovieClip in Symbol 1803 MovieClip Frame 1
onClipEvent (load) {
rate = 40;
byeTime = 60;
time = 0;
}
onClipEvent (enterFrame) {
_xscale = (_xscale + rate);
_yscale = (_yscale + rate);
time++;
if (time >= byeTime) {
this.swapDepths(2000);
this.removeMovieClip();
}
}
Instance of Symbol 1718 MovieClip "WM" in Symbol 1810 MovieClip Frame 1
onClipEvent (load) {
function changeAnimation() {
if ((((((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.pirateb)) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratee)) or (_root.attention == _root.piratef)) {
if (_currentframe == 1) {
this.gotoAndStop(2);
}
if (_currentframe == 3) {
this.gotoAndStop(4);
}
}
}
function changeWeapon() {
if (_root.teamType == "human") {
if ((((((_root.attention == _root.pirate) or (_root.attention == _root.piratec)) or (_root.attention == _root.pirateb)) or (_root.attention == _root.pirated)) or (_root.attention == _root.piratee)) or (_root.attention == _root.piratef)) {
if (_root.turn.shotNumber == 0) {
_root.turn.weaponOut = weapon;
_root.target = undefined;
}
}
}
}
_root.team1Quantities = new Object();
_root.team1Quantities.cannons = Infinity;
_root.team1Quantities.homingMissiles = 2;
_root.team1Quantities.rottenRations = 2;
_root.team1Quantities.evilDolls = 2;
_root.team1Quantities.anchors = 3;
_root.team1Quantities.beachballs = 3;
_root.team1Quantities.treasureStrikes = 1;
_root.team1Quantities.shotguns = 2;
_root.team1Quantities.parrotStrikes = 1;
_root.team1Quantities.daveyJonesLockers = 1;
_root.team1Quantities.rumBottles = 2;
_root.team1Quantities.blackbeards = 1;
_root.team2Quantities = new Object();
_root.team2Quantities.cannons = Infinity;
_root.team2Quantities.homingMissiles = 2;
_root.team2Quantities.rottenRations = 2;
_root.team2Quantities.evilDolls = 2;
_root.team2Quantities.anchors = 3;
_root.team2Quantities.beachballs = 3;
_root.team2Quantities.treasureStrikes = 1;
_root.team2Quantities.shotguns = 2;
_root.team2Quantities.parrotStrikes = 1;
_root.team2Quantities.daveyJonesLockers = 1;
_root.team2Quantities.rumBottles = 2;
_root.team2Quantities.blackbeards = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(113)) {
changeAnimation();
}
if (Key.isDown(32)) {
if (_currentframe == 3) {
this.gotoAndStop(4);
}
}
}
Instance of Symbol 1722 MovieClip "counter" in Symbol 1810 MovieClip Frame 1
onClipEvent (load) {
warningTime = 10;
_root.turnTime = _root.startTime;
_root.fakeTime = _root.turnTime;
delay = 1000;
resetTime = getTimer() + delay;
}
onClipEvent (enterFrame) {
if (_root.startTime == "\u03A9") {
_root.turnTime = "<P ALIGN=\"center\"><FONT COLOR=\"#000000\"><B>\u03A9</B></FONT>";
return(undefined);
}
if (!(_root.attention === _root.nT)) {
if (!(_root.attention === _root.InGameCursor)) {
return(undefined);
}
}
if (_root.team1Win or _root.team2Win) {
return(undefined);
}
if (getTimer() > resetTime) {
_root.turnTime--;
_root.fakeTime--;
resetTime = getTimer() + delay;
if (_root.fakeTime <= 5) {
_root.lowTime.start();
}
}
if (_root.turnTime <= warningTime) {
_root.turnTime = ("<P ALIGN=\"center\"><FONT COLOR=\"#000000\"><B>" add _root.fakeTime) add "</B></FONT>";
}
if (_root.fakeTime <= 0) {
_root.turn.shotNumber = 0;
_root.previousTurn = _root.turn;
_root.turn.gotoAndStop(1);
_root.dT();
}
}
Instance of Symbol 1734 MovieClip "commentGenerator" in Symbol 1810 MovieClip Frame 1
onClipEvent (load) {
function giveAdvice() {
done = true;
this.gotoAndStop(2);
busy = true;
if (_root.selectedMap == "Indirect Fight") {
_root.SAC = "Aim for the red Button to raise the enemy water level!";
}
if (_root.selectedMap == "Wet Weather") {
_root.SAC = "Looks like it's a bad day, better aim for high ground.";
}
}
function makeBadComment() {
done = true;
this.gotoAndStop(2);
busy = true;
commentNumber = Math.round(Math.random() * 12);
if (commentNumber == 0) {
_root.SAC = ("It's a shame " add whosDead.name) add " didn't pay his insurance...";
}
if (commentNumber == 1) {
_root.SAC = whosDead.name add " is now resting in pieces";
}
if (commentNumber == 2) {
_root.SAC = whosDead.name add " will be forgotten";
}
if (commentNumber == 3) {
_root.SAC = (("I'm sure " add whosDead.teamName) add " will manage without ") add whosDead.name;
}
if (commentNumber == 4) {
_root.SAC = whosDead.name add " didn't see that one coming";
}
if (commentNumber == 5) {
_root.SAC = "Oops...";
}
if (commentNumber == 6) {
_root.SAC = whosDead.name add " has gone to a slightly better place";
}
if (commentNumber == 7) {
_root.SAC = whosDead.name add " has gone to meet Elvis";
}
if (commentNumber == 8) {
_root.SAC = ("Damnit, " add whosDead.name) add " was 1 day off retirement";
}
if (commentNumber == 9) {
_root.SAC = whosDead.name add " has left the house";
}
if (commentNumber == 10) {
_root.SAC = whosDead.name add " wasn't a real pirate anyway";
}
if (commentNumber == 10) {
_root.SAC = ("No major loss, " add whosDead.name) add " was bound to die anyway...";
}
if (commentNumber == 11) {
_root.SAC = ("Oh Well, homeless pirates laughed at " add whosDead.name) add " anyway...";
}
if (commentNumber == 12) {
_root.SAC = whosDead.name add " bit the dust";
}
}
function makeGoodComment() {
done = true;
this.gotoAndStop(2);
busy = true;
commentNumber = Math.round(Math.random() * 16);
if (commentNumber == 0) {
_root.SAC = "Here comes " add whosOn.name;
}
if (commentNumber == 1) {
_root.SAC = ("Watch out, " add whosOn.name) add " is about";
}
if (commentNumber == 2) {
_root.SAC = ("Finally we get to see " add whosOn.name) add " in action...";
}
if (commentNumber == 3) {
_root.SAC = whosOn.name add " is looking for trouble...";
}
if (commentNumber == 4) {
_root.SAC = (whosOn.name add "'s arrogance will be the end of ") add whosOn.teamName;
}
if (commentNumber == 5) {
_root.SAC = ("Buy the new " add whosOn.name) add " actionfigure! In stores now";
}
if (commentNumber == 6) {
_root.SAC = whosOn.name add " knows the next move will count";
}
if (commentNumber == 7) {
_root.SAC = whosOn.name add " is armed and 'sorta' dangerous";
}
if (commentNumber == 8) {
_root.SAC = (whosOn.teamName add " wouldn't be the same without ") add whosOn.name;
}
if (commentNumber == 9) {
_root.SAC = "Why cant all pirates be like " add whosOn.name;
}
if (commentNumber == 10) {
_root.SAC = ((whosOn.name add " knows the fate of ") add whosOn.teamName) add " depends on him";
}
if (commentNumber == 11) {
_root.SAC = whosOn.name add " is still fighting; he wants his paycheck";
}
if (commentNumber == 12) {
_root.SAC = ("I speak for all of us when I say " add whosOn.name) add " is an idiot";
}
if (commentNumber == 13) {
_root.SAC = "Make way for " add whosOn.name;
}
if (commentNumber == 14) {
_root.SAC = whosOn.name add " moves in for the kill";
}
if (commentNumber == 15) {
_root.SAC = ("Can " add whosOn.name) add " turn the tables?";
}
if (commentNumber == 16) {
_root.SAC = whosOn.name add " is preparing for his 15 seconds of fame";
}
}
function makeWinSpeech() {
firstDeathS = false;
done = true;
this.gotoAndStop(2);
busy = true;
commentNumber = Math.round(Math.random() * 2);
if (commentNumber == 0) {
_root.SAC = ("Congratulations " add winner) add "!";
}
if (commentNumber == 1) {
_root.SAC = ("Looks like " add winner) add " just won this battle...";
}
if (commentNumber == 2) {
_root.SAC = winner add " had it in the bag from the start";
}
}
firstDeathS = true;
if (_root.selectedMap == "Indirect Fight") {
giveAdvice();
}
if (_root.selectedMap == "Wet Weather") {
if (_root.gameMode == "2 Player") {
giveAdvice();
}
}
pirates = ["pirate", "pirateb", "piratec", "pirated"];
done = false;
lastTurn = _root.turn;
busy = false;
}
onClipEvent (enterFrame) {
whosOn = _root.turn;
whoHasTurn = _root.turn;
if (!(_root.turn === lastTurn)) {
done = false;
lastTurn = _root.turn;
}
}
onClipEvent (enterFrame) {
if (_root.changeTurn) {
if (!(whosOn === undefined)) {
if (!busy) {
if (done == false) {
if (whosOn.alive) {
commentChance = Math.round(Math.random() * 5);
done = true;
if (commentChance == 1) {
makeGoodComment();
_root.changeTurn = false;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (!busy) {
if (done == false) {
for (dead in pirates) {
if (_root[pirates[dead]].health == 0) {
if (_root[pirates[dead]].alive) {
whosDead = _root[pirates[dead]];
makeBadComment();
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (!busy) {
if (firstDeathS) {
if (done == false) {
if (_root.team1Win) {
winner = _root.matchedTeam1.name;
makeWinSpeech();
}
if (_root.team2Win) {
winner = _root.matchedTeam2.name;
makeWinSpeech();
}
}
}
}
}
Instance of Symbol 1740 MovieClip in Symbol 1810 MovieClip Frame 1
onClipEvent (load) {
teamMember1 = _root.pirateb;
teamMember2 = _root.pirated;
teamMember3 = _root.piratef;
}
onClipEvent (enterFrame) {
_parent.maxPercentB = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
totalHealth = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
percent = (totalHealth / _parent.highestNumber) * 100;
if (_xscale > 0) {
_xscale = percent;
}
if (((!teamMember1.alive) and (!teamMember2.alive)) and (!teamMember3.alive)) {
_root.team1Win = true;
}
}
Instance of Symbol 1741 MovieClip in Symbol 1810 MovieClip Frame 1
onClipEvent (load) {
teamMember1 = _root.pirate;
teamMember2 = _root.piratec;
teamMember3 = _root.piratee;
}
onClipEvent (enterFrame) {
_parent.maxPercentA = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
if (_parent.maxPercentA >= _parent.maxPercentB) {
if ((_parent.highestNumber == undefined) or (_parent.maxPercentA >= _parent.highestNumber)) {
_parent.highestNumber = _parent.maxPercentA;
}
}
if (_parent.maxPercentA < _parent.maxPercentB) {
if ((_parent.highestNumber == undefined) or (_parent.maxPercentB >= _parent.highestNumber)) {
_parent.highestNumber = _parent.maxPercentB;
}
}
totalHealth = (teamMember1.fakehealth + teamMember2.fakehealth) + teamMember3.fakehealth;
percent = (totalHealth / _parent.highestNumber) * 100;
if (_xscale > 0) {
_xscale = percent;
}
if (((!teamMember1.alive) and (!teamMember2.alive)) and (!teamMember3.alive)) {
_root.team2Win = true;
}
}
Instance of Symbol 1744 MovieClip in Symbol 1810 MovieClip Frame 1
on (press) {
if (_quality == "HIGH") {
nQ = "MEDIUM";
}
if (_quality == "MEDIUM") {
nQ = "LOW";
}
if (_quality == "LOW") {
nQ = "HIGH";
}
_quality = nQ;
}
Instance of Symbol 1771 MovieClip in Symbol 1810 MovieClip Frame 1
onClipEvent (load) {
rate = 40;
byeTime = 60;
time = 0;
}
onClipEvent (enterFrame) {
_xscale = (_xscale + rate);
_yscale = (_yscale + rate);
time++;
if (time >= byeTime) {
this.swapDepths(2000);
this.removeMovieClip();
}
}
Instance of Symbol 1814 MovieClip in Symbol 1817 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + ((_root.SS / 3) + 0.05));
}
Instance of Symbol 1816 MovieClip in Symbol 1817 MovieClip Frame 1
/* no clip actions */
Symbol 1829 MovieClip Frame 1
stop();
_parent.fireallowed = false;
_parent.jump = false;
difficulty = Math.round(Math.random() * (easiestMode - hardestMode)) + hardestMode;
weaponChance = random(5);
if (weaponChance == 0) {
choise = "cannon";
}
if (weaponChance == 1) {
choise = "beachball";
}
if (weaponChance == 3) {
choise = "cannon";
}
if (weaponChance == 4) {
choise = "anchor";
}
weaponOut = choise;
if (choise == "cannon") {
maxShotPower = 5;
}
if (choise == "beachball") {
maxShotPower = 25;
}
if (choise == "anchor") {
maxShotPower = 25;
}
if (choise == "homingMissile1") {
maxShotPower = 15;
}
attention = this;
turn = this;
FIRENOW = false;
Instance of Symbol 1658 MovieClip in Symbol 1829 MovieClip Frame 1
onClipEvent (load) {
_parent.jump = false;
wait = 0;
}
onClipEvent (enterFrame) {
_parent.falling = false;
wait++;
if (wait > 4) {
if (_parent.inrange) {
_parent.gotoAndStop(3);
}
}
if (_parent._x > attention._x) {
_parent._xscale = -_parent.x;
_parent.dir = 2;
_parent.facing = "right";
}
if (_parent._x < attention._x) {
_parent._xscale = _parent.x;
_parent.dir = 1;
_parent.facing = "left";
}
if (_parent._xscale == _parent.x) {
_parent.facing = "right";
}
if (_parent._xscale == (-_parent.x)) {
_parent.facing = "left";
}
_parent._rotation = 0;
}
Symbol 1829 MovieClip Frame 2
stop();
_rotation = 0;
if (health <= _root.deathHealth) {
_parent._rotation = 0;
_parent.gotoAndStop(8);
}
Instance of Symbol 1659 MovieClip in Symbol 1829 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent._rotation = 0;
if (_parent.inrange) {
_parent.gotoAndStop(1);
}
if (_parent.health <= _root.deathHealth) {
_parent._rotation = 0;
_parent.gotoAndStop(8);
}
}
Symbol 1829 MovieClip Frame 3
stop();
Symbol 1829 MovieClip Frame 4
stop();
_parent.fireallowed = true;
Instance of Symbol 1670 MovieClip "aim" in Symbol 1829 MovieClip Frame 4
onClipEvent (load) {
miss = Math.floor(_parent.difficulty);
rate = 1;
this.gotoAndStop(90);
if (_parent.facing == "right") {
currentframe = _currentframe;
}
if (_parent.facing == "left") {
currentframe = -_currentframe;
}
timeElapsed = 0;
deltaX = (_parent._x - _parent.target._x) + miss;
deltaY = (_parent._y - _parent.target._y) + miss;
angle = -Math.atan2(deltaX, deltaY);
ySpeed = shotSpeed * Math.cos(angle);
xSpeed = shotSpeed * Math.sin(angle);
if (!(_parent.weaponOut === "homingMissile1")) {
frame = Math.round((angle * 180) / Math.PI);
}
if (_parent.weaponOut == "homingMissile1") {
frame = 0;
}
_parent.angle = frame;
}
onClipEvent (enterFrame) {
if (currentframe < frame) {
currentframe = currentframe + rate;
}
if (currentframe > frame) {
currentframe = currentframe - rate;
}
}
onClipEvent (enterFrame) {
if (_parent.facing == "right") {
this.gotoAndStop(180 - currentframe);
}
if (_parent.facing == "left") {
this.gotoAndStop(180 + currentframe);
}
}
Symbol 1829 MovieClip Frame 5
stop();
Instance of Symbol 1671 MovieClip in Symbol 1829 MovieClip Frame 5
onClipEvent (enterFrame) {
_parent.scroll();
while (_root.bg.hitTest(_parent._x, _parent._y + 5, true)) {
_parent.jump = false;
_parent.gotoAndStop(1);
}
}
Symbol 1829 MovieClip Frame 6
stop();
_root.turn = undefined;
Instance of Symbol 1621 MovieClip in Symbol 1829 MovieClip Frame 6
onClipEvent (load) {
waited = 0;
_parent.flySpeed = 8;
}
onClipEvent (enterFrame) {
waited++;
if (!_parent.falling) {
if (_parent.facing == "right") {
_parent._rotation = _parent._rotation - (_root.ExplosionStrength * 2);
_parent.xvel = _parent.speed;
}
}
if (!_parent.falling) {
if (_parent.facing == "left") {
_parent._rotation = _parent._rotation + (_root.ExplosionStrength * 2);
_parent.xvel = -_parent.speed;
}
}
_parent.scrollGeneral();
if (waited > 10) {
while (_root.bg.hitTest(_parent._x, _parent._y + 5, true)) {
_parent.rot = _rotation;
_parent.gotoAndStop(7);
}
}
if (!_parent.falling) {
if (_parent.facing == "right") {
_parent._xscale = -_parent.x;
_parent.dir = 2;
_parent.facing = "right";
}
}
if (!_parent.falling) {
if (_parent.facing == "left") {
_parent._xscale = _parent.x;
_parent.dir = 1;
_parent.facing = "left";
}
}
if (_parent.falling) {
if (_parent.facing == "right") {
_parent._rotation = _parent._rotation + _parent.fallDamage;
}
}
if (_parent.falling) {
if (_parent.facing == "left") {
_parent._rotation = _parent._rotation - _parent.fallDamage;
}
}
_parent.flySpeed = 8;
}
Symbol 1829 MovieClip Frame 7
stop();
if (_parent.falling) {
health = health - fallDamage;
}
if (!_parent.falling) {
health = health - (_root.ExplosionStrength * 10);
}
flyspeed = 8;
Instance of Symbol 1672 MovieClip in Symbol 1829 MovieClip Frame 7
onClipEvent (load) {
waited = 0;
done = false;
}
onClipEvent (enterFrame) {
waited++;
if (waited > 10) {
if (_parent._rotation > 0) {
_parent._rotation = _parent._rotation - 10;
if (!done) {
this.gotoAndPlay(26);
done = true;
}
}
}
if (waited > 10) {
if (_parent._rotation < 0) {
_parent._rotation = _parent._rotation + 10;
if (!done) {
this.gotoAndPlay(26);
done = true;
}
}
}
if (!_parent.falling) {
if (_parent.facing == "right") {
_parent._xscale = -_parent.x;
_parent.dir = 2;
_parent.facing = "right";
}
}
if (!_parent.falling) {
if (_parent.facing == "left") {
_parent._xscale = _parent.x;
_parent.dir = 1;
_parent.facing = "left";
}
}
}
Symbol 1829 MovieClip Frame 8
stop();
_root.attention = undefined;
Instance of Symbol 1638 MovieClip in Symbol 1829 MovieClip Frame 8
onClipEvent (enterFrame) {
if (_currentframe == 65) {
_parent._x = _root.attention._x;
_parent._y = _root.attention._y;
}
}
Symbol 1829 MovieClip Frame 9
stop();
if (_root.turn == this) {
suicide = true;
trace("Suicide");
}
if (_root.previousTurn == this) {
suicide = true;
trace("Suicide");
}
if (_root.attention == this) {
_root.turn = undefined;
}
_root.splash.start();
Instance of Symbol 1645 MovieClip in Symbol 1829 MovieClip Frame 9
onClipEvent (load) {
drownRate = 5;
removeTime = 100;
done = false;
time = 0;
m = 0;
_parent.health = 0;
}
onClipEvent (enterFrame) {
_parent.alive = false;
_parent._y = _parent._y + drownRate;
}
onClipEvent (enterFrame) {
time++;
m++;
if (time >= removeTime) {
if (!done) {
if (_parent.suicide) {
_root.previousTurn = _parent;
_root.dT();
}
if (!_parent.suicide) {
if (_root.attention == undefined) {
if (_root.turn == undefined) {
_root.turn = _parent;
}
}
}
done = true;
_visible = false;
drownRate = 0;
}
}
if (m > 30) {
if (_root.attention == _parent) {
_root.attention = undefined;
}
}
}
Symbol 1829 MovieClip Frame 10
stop();
if (alive) {
_root.attention = this;
}
_rotation = 0;
Instance of Symbol 1673 MovieClip in Symbol 1829 MovieClip Frame 10
onClipEvent (load) {
timeWaited = 0;
delay = 80;
}
onClipEvent (enterFrame) {
timeWaited++;
if (timeWaited >= delay) {
if (!(_root.statistics.YOUWIN._currentframe === _root.statistics.YOUWIN._totalframes)) {
_root.statistics.YOUWIN.play();
}
}
}
Symbol 1843 MovieClip Frame 1
stop();
Symbol 1843 MovieClip Frame 2
stop();
Instance of Symbol 1835 MovieClip in Symbol 1848 MovieClip Frame 1
on (press) {
getURL ("mailto:corkysurprise@aol.com");
}
Instance of Symbol 1838 MovieClip in Symbol 1848 MovieClip Frame 1
on (release) {
getURL ("http://talklikeapirate.com/piratehome.html", "_blank");
}
Instance of Symbol 1843 MovieClip in Symbol 1848 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (release) {
getURL ("http://www.corkysurprise.com", "_blank");
}
Instance of Symbol 1845 MovieClip in Symbol 1848 MovieClip Frame 1
on (release) {
function loadAllSounds() {
_root.createEmptyMovieClip("MENUSFXMC", 3071);
rollOver = new Sound(_root.MENUSFXMC);
rollOver.attachSound("CLICK");
click = new Sound(_root.MENUSFXMC);
click.attachSound("SELECT");
error = new Sound(_root.MENUSFXMC);
error.attachSound("COINCHING");
error2 = new Sound(_root.MENUSFXMC);
error2.attachSound("DISABLE");
cashreg = new Sound(_root.MENUSFXMC);
cashreg.attachSound("cashreg");
swallow = new Sound(_root.MENUSFXMC);
swallow.attachSound("swallow");
_root.createEmptyMovieClip("SFXMC", 8021);
footstep_grass = new Sound(_root.SFXMC);
footstep_grass.attachSound("footstep_grass");
chargeUp = new Sound(_root.SFXMC);
chargeUp.attachSound("chargeUp");
cannonFire = new Sound(_root.SFXMC);
cannonFire.attachSound("Cannon");
beep = new Sound(_root.SFXMC);
beep.attachSound("BEEPMED");
splat1 = new Sound(_root.SFXMC);
splat1.attachSound("splat1");
splat2 = new Sound(_root.SFXMC);
splat2.attachSound("splat2");
splat3 = new Sound(_root.SFXMC);
splat3.attachSound("splat3");
splat4 = new Sound(_root.SFXMC);
splat4.attachSound("splat4");
missile = new Sound(_root.SFXMC);
missile.attachSound("missile");
boing1 = new Sound(_root.SFXMC);
boing1.attachSound("boing1");
boing2 = new Sound(_root.SFXMC);
boing2.attachSound("boing2");
bombFall = new Sound(_root.SFXMC);
bombFall.attachSound("bombFall");
shotgunFire = new Sound(_root.SFXMC);
shotgunFire.attachSound("shotgunFire");
windUp = new Sound(_root.SFXMC);
windUp.attachSound("windUp");
lowTime = new Sound(_root.SFXMC);
lowTime.attachSound("lowTime");
explode1 = new Sound(_root.SFXMC);
explode1.attachSound("explode1");
explode2 = new Sound(_root.SFXMC);
explode2.attachSound("explode2");
explode3 = new Sound(_root.SFXMC);
explode3.attachSound("explode3");
S1 = new Sound(_root.SFXMC);
S1.attachSound("1");
S2 = new Sound(_root.SFXMC);
S2.attachSound("2");
S3 = new Sound(_root.SFXMC);
S3.attachSound("3");
S4 = new Sound(_root.SFXMC);
S4.attachSound("4");
S5 = new Sound(_root.SFXMC);
S5.attachSound("5");
S6 = new Sound(_root.SFXMC);
S6.attachSound("6");
S7 = new Sound(_root.SFXMC);
S7.attachSound("7");
S8 = new Sound(_root.SFXMC);
S8.attachSound("8");
S9 = new Sound(_root.SFXMC);
S9.attachSound("9");
S10 = new Sound(_root.SFXMC);
S10.attachSound("10");
S11 = new Sound(_root.SFXMC);
S11.attachSound("11");
S12 = new Sound(_root.SFXMC);
S12.attachSound("12");
S13 = new Sound(_root.SFXMC);
S13.attachSound("13");
S14 = new Sound(_root.SFXMC);
S14.attachSound("14");
S15 = new Sound(_root.SFXMC);
S15.attachSound("15");
S16 = new Sound(_root.SFXMC);
S16.attachSound("16");
S17 = new Sound(_root.SFXMC);
S17.attachSound("17");
S18 = new Sound(_root.SFXMC);
S18.attachSound("18");
S19 = new Sound(_root.SFXMC);
S19.attachSound("19");
S20 = new Sound(_root.SFXMC);
S20.attachSound("20");
S21 = new Sound(_root.SFXMC);
S21.attachSound("21");
S22 = new Sound(_root.SFXMC);
S22.attachSound("22");
S23 = new Sound(_root.SFXMC);
S23.attachSound("23");
S24 = new Sound(_root.SFXMC);
S24.attachSound("24");
S25 = new Sound(_root.SFXMC);
S25.attachSound("25");
oof1 = new Sound(_root.SFXMC);
oof1.attachSound("oof1");
oof2 = new Sound(_root.SFXMC);
oof2.attachSound("oof2");
oof3 = new Sound(_root.SFXMC);
oof3.attachSound("oof3");
oof4 = new Sound(_root.SFXMC);
oof4.attachSound("oof4");
oof5 = new Sound(_root.SFXMC);
oof5.attachSound("oof5");
oof6 = new Sound(_root.SFXMC);
oof6.attachSound("oof6");
oof7 = new Sound(_root.SFXMC);
oof7.attachSound("oof7");
YaMissed = new Sound(_root.SFXMC);
YaMissed.attachSound("Ya Missed");
YCTAS = new Sound(_root.SFXMC);
YCTAS.attachSound("You Call that a shot");
YNAEP = new Sound(_root.SFXMC);
YNAEP.attachSound("You need another eyepatch");
FLAGWAVE = new Sound(_root.SFXMC);
FLAGWAVE.attachSound("FLAGWAVE");
metalTankJump = new Sound(_root.IFButton);
metalTankJump.attachSound("metalTankJump");
metalTankJump.setVolume(200);
splash = new Sound(_root.SFXMC);
splash.attachSound("splashLight");
parrot1 = new Sound(_root.SFXMC);
parrot1.attachSound("parrot1");
parrot2 = new Sound(_root.SFXMC);
parrot2.attachSound("parrot2");
bbeard = new Sound(_root.SFXMC);
bbeard.attachSound("bbeard");
Holy = new Sound(_root.SFXMC);
Holy.attachSound("Holy");
GoodShot = new Sound(_root.SFXMC);
GoodShot.attachSound("Good Shot");
Illkillya = new Sound(_root.SFXMC);
Illkillya.attachSound("Ill kill ya");
Scalliwag = new Sound(_root.SFXMC);
Scalliwag.attachSound("Scalliwag");
totheplankwithya = new Sound(_root.SFXMC);
totheplankwithya.attachSound("to the plank with ya");
}
loadAllSounds();
stopAllSounds();
_root.gotoAndStop("Menu");
}
Symbol 1848 MovieClip Frame 51
stop();
Instance of Symbol 1835 MovieClip in Symbol 1848 MovieClip Frame 51
on (press) {
getURL ("mailto:corkysurprise@aol.com");
}
Instance of Symbol 1838 MovieClip in Symbol 1848 MovieClip Frame 51
on (release) {
getURL ("http://talklikeapirate.com/piratehome.html", "_blank");
}
Instance of Symbol 1843 MovieClip in Symbol 1848 MovieClip Frame 51
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (release) {
getURL ("http://www.corkysurprise.com", "_blank");
}
Instance of Symbol 1845 MovieClip in Symbol 1848 MovieClip Frame 51
on (release) {
function loadAllSounds() {
_root.createEmptyMovieClip("MENUSFXMC", 3071);
rollOver = new Sound(_root.MENUSFXMC);
rollOver.attachSound("CLICK");
click = new Sound(_root.MENUSFXMC);
click.attachSound("SELECT");
error = new Sound(_root.MENUSFXMC);
error.attachSound("COINCHING");
error2 = new Sound(_root.MENUSFXMC);
error2.attachSound("DISABLE");
cashreg = new Sound(_root.MENUSFXMC);
cashreg.attachSound("cashreg");
swallow = new Sound(_root.MENUSFXMC);
swallow.attachSound("swallow");
_root.createEmptyMovieClip("SFXMC", 8021);
footstep_grass = new Sound(_root.SFXMC);
footstep_grass.attachSound("footstep_grass");
chargeUp = new Sound(_root.SFXMC);
chargeUp.attachSound("chargeUp");
cannonFire = new Sound(_root.SFXMC);
cannonFire.attachSound("Cannon");
beep = new Sound(_root.SFXMC);
beep.attachSound("BEEPMED");
splat1 = new Sound(_root.SFXMC);
splat1.attachSound("splat1");
splat2 = new Sound(_root.SFXMC);
splat2.attachSound("splat2");
splat3 = new Sound(_root.SFXMC);
splat3.attachSound("splat3");
splat4 = new Sound(_root.SFXMC);
splat4.attachSound("splat4");
missile = new Sound(_root.SFXMC);
missile.attachSound("missile");
boing1 = new Sound(_root.SFXMC);
boing1.attachSound("boing1");
boing2 = new Sound(_root.SFXMC);
boing2.attachSound("boing2");
bombFall = new Sound(_root.SFXMC);
bombFall.attachSound("bombFall");
shotgunFire = new Sound(_root.SFXMC);
shotgunFire.attachSound("shotgunFire");
windUp = new Sound(_root.SFXMC);
windUp.attachSound("windUp");
lowTime = new Sound(_root.SFXMC);
lowTime.attachSound("lowTime");
explode1 = new Sound(_root.SFXMC);
explode1.attachSound("explode1");
explode2 = new Sound(_root.SFXMC);
explode2.attachSound("explode2");
explode3 = new Sound(_root.SFXMC);
explode3.attachSound("explode3");
S1 = new Sound(_root.SFXMC);
S1.attachSound("1");
S2 = new Sound(_root.SFXMC);
S2.attachSound("2");
S3 = new Sound(_root.SFXMC);
S3.attachSound("3");
S4 = new Sound(_root.SFXMC);
S4.attachSound("4");
S5 = new Sound(_root.SFXMC);
S5.attachSound("5");
S6 = new Sound(_root.SFXMC);
S6.attachSound("6");
S7 = new Sound(_root.SFXMC);
S7.attachSound("7");
S8 = new Sound(_root.SFXMC);
S8.attachSound("8");
S9 = new Sound(_root.SFXMC);
S9.attachSound("9");
S10 = new Sound(_root.SFXMC);
S10.attachSound("10");
S11 = new Sound(_root.SFXMC);
S11.attachSound("11");
S12 = new Sound(_root.SFXMC);
S12.attachSound("12");
S13 = new Sound(_root.SFXMC);
S13.attachSound("13");
S14 = new Sound(_root.SFXMC);
S14.attachSound("14");
S15 = new Sound(_root.SFXMC);
S15.attachSound("15");
S16 = new Sound(_root.SFXMC);
S16.attachSound("16");
S17 = new Sound(_root.SFXMC);
S17.attachSound("17");
S18 = new Sound(_root.SFXMC);
S18.attachSound("18");
S19 = new Sound(_root.SFXMC);
S19.attachSound("19");
S20 = new Sound(_root.SFXMC);
S20.attachSound("20");
S21 = new Sound(_root.SFXMC);
S21.attachSound("21");
S22 = new Sound(_root.SFXMC);
S22.attachSound("22");
S23 = new Sound(_root.SFXMC);
S23.attachSound("23");
S24 = new Sound(_root.SFXMC);
S24.attachSound("24");
S25 = new Sound(_root.SFXMC);
S25.attachSound("25");
oof1 = new Sound(_root.SFXMC);
oof1.attachSound("oof1");
oof2 = new Sound(_root.SFXMC);
oof2.attachSound("oof2");
oof3 = new Sound(_root.SFXMC);
oof3.attachSound("oof3");
oof4 = new Sound(_root.SFXMC);
oof4.attachSound("oof4");
oof5 = new Sound(_root.SFXMC);
oof5.attachSound("oof5");
oof6 = new Sound(_root.SFXMC);
oof6.attachSound("oof6");
oof7 = new Sound(_root.SFXMC);
oof7.attachSound("oof7");
YaMissed = new Sound(_root.SFXMC);
YaMissed.attachSound("Ya Missed");
YCTAS = new Sound(_root.SFXMC);
YCTAS.attachSound("You Call that a shot");
YNAEP = new Sound(_root.SFXMC);
YNAEP.attachSound("You need another eyepatch");
FLAGWAVE = new Sound(_root.SFXMC);
FLAGWAVE.attachSound("FLAGWAVE");
metalTankJump = new Sound(_root.IFButton);
metalTankJump.attachSound("metalTankJump");
metalTankJump.setVolume(200);
splash = new Sound(_root.SFXMC);
splash.attachSound("splashLight");
parrot1 = new Sound(_root.SFXMC);
parrot1.attachSound("parrot1");
parrot2 = new Sound(_root.SFXMC);
parrot2.attachSound("parrot2");
bbeard = new Sound(_root.SFXMC);
bbeard.attachSound("bbeard");
Holy = new Sound(_root.SFXMC);
Holy.attachSound("Holy");
GoodShot = new Sound(_root.SFXMC);
GoodShot.attachSound("Good Shot");
Illkillya = new Sound(_root.SFXMC);
Illkillya.attachSound("Ill kill ya");
Scalliwag = new Sound(_root.SFXMC);
Scalliwag.attachSound("Scalliwag");
totheplankwithya = new Sound(_root.SFXMC);
totheplankwithya.attachSound("to the plank with ya");
}
loadAllSounds();
stopAllSounds();
_root.gotoAndStop("Menu");
}
Symbol 1849 MovieClip Frame 1
stop();
Symbol 1849 MovieClip Frame 2
stop();