Frame 1
stop();
Frame 2
stop();
Frame 3
_root.currentView = "inventory";
_root.robot1team = "alpha";
_root.robot2team = "alpha";
_root.robot3team = "alpha";
_root.robot4team = "alpha";
_root.robot5team = "alpha";
_root.robot6team = "beta";
_root.robot7team = "beta";
_root.robot8team = "beta";
_root.robot9team = "beta";
_root.robot10team = "beta";
_root.alphacolor = 7;
_root.betacolor = 2;
_root.ht = 0;
_root.bulletline = 0;
stop();
Instance of Symbol 66 MovieClip "Drobot1" in Frame 3
onClipEvent (load) {
gunID = _root.storeBOT1weapon;
gun.gotoAndStop(eval ("_root.DB" + gunID)[5] + 1);
armourID = _root.storeBOT1armour;
processorID = _root.storeBOT1processor;
}
on (press) {
_root.selectedBot.currentSelection = 1;
}
onClipEvent (enterFrame) {
gunName = eval ("_root.DB" + gunID)[0];
gunClass = eval ("_root.DB" + gunID)[1];
}
Instance of Symbol 66 MovieClip "Drobot2" in Frame 3
onClipEvent (load) {
gunID = _root.storeBOT2weapon;
gun.gotoAndStop(eval ("_root.DB" + gunID)[5] + 1);
armourID = _root.storeBOT2armour;
processorID = _root.storeBOT2processor;
}
on (press) {
_root.selectedBot.currentSelection = 2;
}
onClipEvent (enterFrame) {
gunName = eval ("_root.DB" + gunID)[0];
gunClass = eval ("_root.DB" + gunID)[1];
}
Instance of Symbol 66 MovieClip "Drobot3" in Frame 3
onClipEvent (load) {
gunID = _root.storeBOT3weapon;
gun.gotoAndStop(eval ("_root.DB" + gunID)[5] + 1);
armourID = _root.storeBOT3armour;
processorID = _root.storeBOT3processor;
}
on (press) {
_root.selectedBot.currentSelection = 3;
}
onClipEvent (enterFrame) {
gunName = eval ("_root.DB" + gunID)[0];
gunClass = eval ("_root.DB" + gunID)[1];
}
Instance of Symbol 70 MovieClip "Drobot4" in Frame 3
onClipEvent (load) {
gunID = eval (("_root." + _name) + "currentWeapon");
}
Instance of Symbol 70 MovieClip "Drobot5" in Frame 3
onClipEvent (load) {
gunID = eval (("_root." + _name) + "currentWeapon");
}
Instance of Symbol 101 MovieClip "inventory" in Frame 3
onClipEvent (load) {
changeNow = true;
_root.DBnogun = ["No Weapon", "", "weapon", 0, "No Weapon.", 0, 0, 1, 0, "", 0, 0, 0];
_root.DBblaster1 = ["Blaster", "RTRn1", "weapon", 1, "Sturdy and reliable, the 'RTRn1' is ideal for a range of situations. Perfect for the economically handicapped.", 1, 5, 2, 20, "gs3", 60, 150, 1000];
_root.DBblaster2 = ["Blaster", "RTRn2se", "weapon", 2, "The 'RTRn2se' is the improved model of its predecessor, and has an greater damage output, making it generally more efficient on the battlefield.", 1, 7, 2, 20, "gs3", 60, 150, 1200];
_root.DBnailgun1 = ["Nailgun", "Torricka 340-a", "weapon", 3, "Torricka, always well known for their expertize in producing quality hardware, have manufactured a version of their product that fits onto almost any Bot.", 2, 4, 8, 8, "gs2", 10, 100, 2000];
_root.DBnailgun2 = ["Nailgun", "DD-400mk", "weapon", 4, "The 'DD-400mk' Nailgun is, without doubt, the finest Nailgun available for purchase in the arena, and with its amazing refire rate, it is a devistating weapon", 3, 6, 8, 4, "gs5", 10, 110, 4500];
_root.DBtaiser1 = ["Taiser", "K'ha-vitia", "weapon", 4, "The 'DD-400mk' Nailgun is, without doubt, the finest Nailgun available for purchase in the arena, and with its amazing refire rate, it is a devistating weapon", 4, 13, 11, 8, "gs6", 10, 140, 4800];
items = _root.playeritems;
amountOfItems = items.length;
}
onClipEvent (enterFrame) {
_root.displayedcash = "Cash: $" + _root.cash;
if (_root.currentView == "inventory") {
_visible = true;
if (changeNow == true) {
changeNow = false;
if (amountOfItems > 0) {
k = amountOfItems;
while (k > 0) {
removeMovieClip("holder.item" + (k - 1));
k--;
}
}
amountOfItems = items.length;
_root.inventoryDetails.selectedItem = 0;
selectedone = 0;
i = 0;
createList = items.length;
while (createList > 0) {
duplicateMovieClip ("holder.tempBox", "item" + i, i);
setProperty("holder.item" + i, _x , _parent._x);
setProperty("holder.item" + i, _y , _parent._y + (i * 100));
eval ("holder.item" + i).IDnumber = i + 1;
eval ("holder.item" + i).title = eval ("_root.DB" + items[i])[0];
eval ("holder.item" + i).subtitle = eval ("_root.DB" + items[i])[1];
eval ("holder.item" + i).description = eval ("_root.DB" + items[i])[4];
eval ("holder.item" + i).itemImage.gotoAndStop(eval ("_root.DB" + items[i])[3]);
eval ("holder.item" + i).cost = eval ("_root.DB" + items[i])[12];
createList--;
i++;
}
if (items.length > 0) {
selectedone = 1;
}
}
} else {
_visible = false;
}
}
Instance of Symbol 104 MovieClip "shop" in Frame 3
onClipEvent (load) {
changeNow = true;
items = ["blaster1", "blaster2", "nailgun1", "nailgun2"];
amountOfItems = items.length;
selectedone = 1;
}
onClipEvent (enterFrame) {
if (_root.currentView == "shop") {
_visible = true;
if (changeNow == true) {
changeNow = false;
if (amountOfItems > 0) {
k = amountOfItems;
while (k > 0) {
removeMovieClip("holder.item" + (k - 1));
k--;
}
}
amountOfItems = items.length;
_root.inventoryDetails.selectedItem = 0;
selectedone = 0;
i = 0;
createList = items.length;
while (createList > 0) {
duplicateMovieClip ("holder.tempBox", "item" + i, i);
setProperty("holder.item" + i, _x , _parent._x);
setProperty("holder.item" + i, _y , _parent._y + (i * 100));
eval ("holder.item" + i).IDnumber = i + 1;
eval ("holder.item" + i).title = eval ("_root.DB" + items[i])[0];
eval ("holder.item" + i).subtitle = eval ("_root.DB" + items[i])[1];
eval ("holder.item" + i).description = eval ("_root.DB" + items[i])[4];
eval ("holder.item" + i).itemImage.gotoAndStop(eval ("_root.DB" + items[i])[3]);
eval ("holder.item" + i).cost = eval ("_root.DB" + items[i])[12];
createList--;
i++;
}
}
} else {
_visible = false;
}
}
Instance of Symbol 108 MovieClip "inventoryDetails" in Frame 3
onClipEvent (load) {
title = "";
subtitle = "";
description = "";
selectedItem = 0;
resale = "";
}
onClipEvent (enterFrame) {
if (resale == "Scrap value: $") {
resale = "";
}
if (_root.currentView == "inventory") {
_visible = true;
} else {
_visible = false;
}
if (selectedItem == 0) {
title = "";
subtitle = "";
description = "";
resale = "";
}
}
Instance of Symbol 117 MovieClip "shopDetails" in Frame 3
onClipEvent (load) {
title = "";
subtitle = "";
description = "";
cost = "";
selectedItem = 0;
}
onClipEvent (enterFrame) {
if (cost == "$") {
cost = "";
}
if (_root.currentView == "shop") {
_visible = true;
} else {
_visible = false;
}
if (selectedItem == 0) {
title = "";
subtitle = "";
description = "";
cost = "";
}
}
Instance of Symbol 120 MovieClip "soundManager" in Frame 3
onClipEvent (load) {
_visible = false;
playsound1 = undefined;
playsound2 = undefined;
playsound3 = "song2";
soundchannel1 = new Sound();
soundchannel2 = new Sound();
soundchannel3 = new Sound();
}
onClipEvent (enterFrame) {
if (playsound1 != undefined) {
soundchannel1.attachSound(playsound1);
soundchannel1.start();
playsound1 = undefined;
}
if (playsound2 != undefined) {
soundchannel2.attachSound(playsound2);
soundchannel2.start();
playsound2 = undefined;
}
if (playsound3 != undefined) {
soundchannel3.attachSound(playsound3);
soundchannel3.start(0, 999);
playsound3 = undefined;
}
if (_root._currentframe != 3) {
stopAllSounds();
}
}
onClipEvent (unload) {
stopAllSounds();
}
Instance of Symbol 124 MovieClip "robot1name" in Frame 3
onClipEvent (load) {
text = "ROBOT1";
}
onClipEvent (enterFrame) {
robot1name = text;
}
Instance of Symbol 124 MovieClip "robot2name" in Frame 3
onClipEvent (load) {
text = "ROBOT2";
}
onClipEvent (enterFrame) {
robot1name = text;
}
Instance of Symbol 124 MovieClip "robot3name" in Frame 3
onClipEvent (load) {
text = "ROBOT3";
}
onClipEvent (enterFrame) {
robot1name = text;
}
Instance of Symbol 124 MovieClip in Frame 3
onClipEvent (load) {
text = "ROBOT4";
textBox._visible = false;
}
onClipEvent (enterFrame) {
robot1name = text;
}
Instance of Symbol 124 MovieClip in Frame 3
onClipEvent (load) {
text = "ROBOT5";
textBox._visible = false;
}
onClipEvent (enterFrame) {
robot1name = text;
}
Instance of Symbol 146 MovieClip in Frame 3
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.currentView == "shop") {
_visible = true;
if (_root.cash >= eval ("_root.DB" + _root.shop.items[_root.shop.selectedone - 1])[12]) {
if (_root.shop.selectedone > 0) {
_visible = true;
}
_root.shopDetails.costStatus._visible = false;
_root.shopDetails.costText.textColor = "0x999999";
} else {
_visible = false;
_root.shopDetails.costStatus._visible = true;
_root.shopDetails.costText.textColor = "0xFF0000";
}
if (_currentframe < 3) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
} else {
_visible = false;
}
}
on (press) {
if (_currentframe < 3) {
if (_root.cash >= eval ("_root.DB" + _root.shop.items[_root.shop.selectedone - 1])[12]) {
gotoAndPlay (3);
_root.soundManager.playsound1 = "cash";
_root.shopDetails.statusDisplay._alpha = 100;
_root.cash = _root.cash - eval ("_root.DB" + _root.shop.items[_root.shop.selectedone - 1])[12];
_root.inventory.items.splice(_root.inventory.items.length, 0, _root.shop.items[_root.shop.selectedone - 1]);
_root.inventory.changeNow = true;
}
}
}
Instance of Symbol 147 MovieClip in Frame 3
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.currentView == "inventory") {
_visible = true;
if ((eval ("_root.Drobot" + _root.selectedBot.currentSelection).gunID == "nogun") && (_root.inventory.selectedone != 0)) {
_visible = true;
} else {
_visible = false;
}
if (_currentframe < 3) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
} else {
_visible = false;
}
}
on (press) {
if (_root.inventory.selectedone != 0) {
if ((eval ("_root.DB" + _root.inventory.items[_root.inventoryDetails.selectedItem - 1])[2] == "weapon") && (eval ("_root.Drobot" + _root.selectedBot.currentSelection).gunID == "nogun")) {
eval ("_root.Drobot" + _root.selectedBot.currentSelection).gunID = _root.inventory.items[_root.inventory.selectedone - 1];
_root.inventory.items.splice(_root.inventory.selectedone - 1, 1);
_root.inventoryDetails.selectedItem = 0;
_root.inventory.changeNow = true;
_root.soundManager.playsound1 = "drill";
eval ("_root.Drobot" + _root.selectedBot.currentSelection).gun.gotoAndStop(eval ("_root.DB" + eval ("_root.Drobot" + _root.selectedBot.currentSelection).gunID)[5] + 1);
_root.inventory.selectedone = 0;
gotoAndPlay (3);
}
}
}
Instance of Symbol 154 MovieClip in Frame 3
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.currentView == "inventory") {
_visible = true;
if (eval ("_root.Drobot" + _root.selectedBot.currentSelection).gunID != "nogun") {
_visible = true;
} else {
_visible = false;
}
if (_currentframe < 3) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
} else {
_visible = false;
}
}
on (press) {
if (eval ("_root.Drobot" + _root.selectedBot.currentSelection).gunID != "nogun") {
_root.inventory.items.splice(_root.inventory.items.length, 0, eval ("_root.Drobot" + _root.selectedBot.currentSelection).gunID);
eval ("_root.Drobot" + _root.selectedBot.currentSelection).gunID = "nogun";
eval ("_root.Drobot" + _root.selectedBot.currentSelection).gun.gotoAndStop(1);
_root.inventory.changeNow = true;
gotoAndPlay (3);
}
}
Instance of Symbol 161 MovieClip in Frame 3
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.currentView == "inventory") {
_visible = true;
if (_root.inventory.selectedone != 0) {
_visible = true;
} else {
_visible = false;
}
if (_currentframe < 3) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
} else {
_visible = false;
}
}
on (press) {
if (_root.inventory.selectedone != 0) {
_root.cash = _root.cash + (eval ("_root.DB" + _root.inventory.items[_root.inventoryDetails.selectedItem - 1])[12] * _root.resalevalue);
_root.inventory.items.splice(_root.inventory.selectedone - 1, 1);
_root.inventoryDetails.selectedItem = 0;
_root.inventory.changeNow = true;
_root.inventory.selectedone = 0;
gotoAndPlay (3);
}
}
Instance of Symbol 165 MovieClip in Frame 3
on (press) {
if (_root.currentView == "inventory") {
_root.currentView = "shop";
gotoAndStop (2);
} else if (_root.currentView == "shop") {
_root.currentView = "inventory";
gotoAndStop (1);
}
}
Instance of Symbol 168 MovieClip "selectedBot" in Frame 3
onClipEvent (load) {
currentSelection = 1;
}
onClipEvent (enterFrame) {
_x = eval ("_root.Drobot" + currentSelection)._x;
}
Frame 4
displaycash = "$" + _root.cash;
Instance of Symbol 176 MovieClip in Frame 4
onClipEvent (load) {
entryfee = 0;
gotoAndStop (1);
if (_root.cash < entryfee) {
_alpha = 35;
}
}
on (release) {
if (_root.cash >= entryfee) {
_root.cash = _root.cash - entryfee;
_root.prizemoney = 150;
_root.robot6gunID = "blaster1";
_root.robot7gunID = "nogun";
_root.robot8gunID = "blaster1";
_root.robot6botname = "HATEBOT";
_root.robot7botname = "DIVERSION";
_root.robot8botname = "KILLBOT";
_root.robot6guntype = eval ("_root.DB" + _root.robot6gunID)[5];
_root.robot6gundamage = eval ("_root.DB" + _root.robot6gunID)[6];
_root.robot6spark = eval ("_root.DB" + _root.robot6gunID)[7];
_root.robot6firespeed = eval ("_root.DB" + _root.robot6gunID)[8];
_root.robot6gunsound = eval ("_root.DB" + _root.robot6gunID)[9];
_root.robot6guntooclose = eval ("_root.DB" + _root.robot6gunID)[10];
_root.robot6gunrange = eval ("_root.DB" + _root.robot6gunID)[11];
_root.robot7guntype = eval ("_root.DB" + _root.robot7gunID)[5];
_root.robot7gundamage = eval ("_root.DB" + _root.robot7gunID)[6];
_root.robot7spark = eval ("_root.DB" + _root.robot7gunID)[7];
_root.robot7firespeed = eval ("_root.DB" + _root.robot7gunID)[8];
_root.robot7gunsound = eval ("_root.DB" + _root.robot7gunID)[9];
_root.robot7guntooclose = eval ("_root.DB" + _root.robot7gunID)[10];
_root.robot7gunrange = eval ("_root.DB" + _root.robot7gunID)[11];
_root.robot8guntype = eval ("_root.DB" + _root.robot8gunID)[5];
_root.robot8gundamage = eval ("_root.DB" + _root.robot8gunID)[6];
_root.robot8spark = eval ("_root.DB" + _root.robot8gunID)[7];
_root.robot8firespeed = eval ("_root.DB" + _root.robot8gunID)[8];
_root.robot8gunsound = eval ("_root.DB" + _root.robot8gunID)[9];
_root.robot8guntooclose = eval ("_root.DB" + _root.robot8gunID)[10];
_root.robot8gunrange = eval ("_root.DB" + _root.robot8gunID)[11];
_root.arenamap = 1;
_root.spotlightX = 380;
_root.spotlightY = 80;
_root.gotoAndStop(5);
}
}
Instance of Symbol 176 MovieClip in Frame 4
onClipEvent (load) {
entryfee = 0;
gotoAndStop (1);
}
on (release) {
if (_root.cash >= entryfee) {
_root.cash = _root.cash - entryfee;
_root.prizemoney = 250;
_root.robot6gunID = "blaster2";
_root.robot7gunID = "blaster1";
_root.robot8gunID = "blaster2";
_root.robot6botname = "KNIGHT";
_root.robot7botname = "KING";
_root.robot8botname = "KNIGHT";
_root.robot6guntype = eval ("_root.DB" + _root.robot6gunID)[5];
_root.robot6gundamage = eval ("_root.DB" + _root.robot6gunID)[6];
_root.robot6spark = eval ("_root.DB" + _root.robot6gunID)[7];
_root.robot6firespeed = eval ("_root.DB" + _root.robot6gunID)[8];
_root.robot6gunsound = eval ("_root.DB" + _root.robot6gunID)[9];
_root.robot6guntooclose = eval ("_root.DB" + _root.robot6gunID)[10];
_root.robot6gunrange = eval ("_root.DB" + _root.robot6gunID)[11];
_root.robot7guntype = eval ("_root.DB" + _root.robot7gunID)[5];
_root.robot7gundamage = eval ("_root.DB" + _root.robot7gunID)[6];
_root.robot7spark = eval ("_root.DB" + _root.robot7gunID)[7];
_root.robot7firespeed = eval ("_root.DB" + _root.robot7gunID)[8];
_root.robot7gunsound = eval ("_root.DB" + _root.robot7gunID)[9];
_root.robot7guntooclose = eval ("_root.DB" + _root.robot7gunID)[10];
_root.robot7gunrange = eval ("_root.DB" + _root.robot7gunID)[11];
_root.robot8guntype = eval ("_root.DB" + _root.robot8gunID)[5];
_root.robot8gundamage = eval ("_root.DB" + _root.robot8gunID)[6];
_root.robot8spark = eval ("_root.DB" + _root.robot8gunID)[7];
_root.robot8firespeed = eval ("_root.DB" + _root.robot8gunID)[8];
_root.robot8gunsound = eval ("_root.DB" + _root.robot8gunID)[9];
_root.robot8guntooclose = eval ("_root.DB" + _root.robot8gunID)[10];
_root.robot8gunrange = eval ("_root.DB" + _root.robot8gunID)[11];
_root.arenamap = 2;
_root.spotlightX = 380;
_root.spotlightY = 80;
_root.gotoAndStop(5);
}
}
Instance of Symbol 176 MovieClip in Frame 4
onClipEvent (load) {
entryfee = 0;
gotoAndStop (1);
}
on (release) {
if (_root.cash >= entryfee) {
_root.cash = _root.cash - entryfee;
_root.prizemoney = 500;
_root.robot6gunID = "nailgun1";
_root.robot7gunID = "nailgun1";
_root.robot8gunID = "nailgun1";
_root.robot6botname = "DRONE1";
_root.robot7botname = "DRONE2";
_root.robot8botname = "DRONE3";
_root.robot6guntype = eval ("_root.DB" + _root.robot6gunID)[5];
_root.robot6gundamage = eval ("_root.DB" + _root.robot6gunID)[6];
_root.robot6spark = eval ("_root.DB" + _root.robot6gunID)[7];
_root.robot6firespeed = eval ("_root.DB" + _root.robot6gunID)[8];
_root.robot6gunsound = eval ("_root.DB" + _root.robot6gunID)[9];
_root.robot6guntooclose = eval ("_root.DB" + _root.robot6gunID)[10];
_root.robot6gunrange = eval ("_root.DB" + _root.robot6gunID)[11];
_root.robot7guntype = eval ("_root.DB" + _root.robot7gunID)[5];
_root.robot7gundamage = eval ("_root.DB" + _root.robot7gunID)[6];
_root.robot7spark = eval ("_root.DB" + _root.robot7gunID)[7];
_root.robot7firespeed = eval ("_root.DB" + _root.robot7gunID)[8];
_root.robot7gunsound = eval ("_root.DB" + _root.robot7gunID)[9];
_root.robot7guntooclose = eval ("_root.DB" + _root.robot7gunID)[10];
_root.robot7gunrange = eval ("_root.DB" + _root.robot7gunID)[11];
_root.robot8guntype = eval ("_root.DB" + _root.robot8gunID)[5];
_root.robot8gundamage = eval ("_root.DB" + _root.robot8gunID)[6];
_root.robot8spark = eval ("_root.DB" + _root.robot8gunID)[7];
_root.robot8firespeed = eval ("_root.DB" + _root.robot8gunID)[8];
_root.robot8gunsound = eval ("_root.DB" + _root.robot8gunID)[9];
_root.robot8guntooclose = eval ("_root.DB" + _root.robot8gunID)[10];
_root.robot8gunrange = eval ("_root.DB" + _root.robot8gunID)[11];
_root.arenamap = 3;
_root.spotlightX = 380;
_root.spotlightY = 80;
_root.gotoAndStop(5);
}
}
Instance of Symbol 176 MovieClip in Frame 4
onClipEvent (load) {
entryfee = 200;
gotoAndStop (4);
}
on (release) {
if (_root.cash >= entryfee) {
_root.cash = _root.cash - entryfee;
_root.prizemoney = 1000;
_root.robot6gunID = "nailgun2";
_root.robot7gunID = "blaster2";
_root.robot8gunID = "nailgun2";
_root.robot6botname = "RUSTY";
_root.robot7botname = "SCREWED";
_root.robot8botname = "FRENZY";
_root.robot6guntype = eval ("_root.DB" + _root.robot6gunID)[5];
_root.robot6gundamage = eval ("_root.DB" + _root.robot6gunID)[6];
_root.robot6spark = eval ("_root.DB" + _root.robot6gunID)[7];
_root.robot6firespeed = eval ("_root.DB" + _root.robot6gunID)[8];
_root.robot6gunsound = eval ("_root.DB" + _root.robot6gunID)[9];
_root.robot6guntooclose = eval ("_root.DB" + _root.robot6gunID)[10];
_root.robot6gunrange = eval ("_root.DB" + _root.robot6gunID)[11];
_root.robot7guntype = eval ("_root.DB" + _root.robot7gunID)[5];
_root.robot7gundamage = eval ("_root.DB" + _root.robot7gunID)[6];
_root.robot7spark = eval ("_root.DB" + _root.robot7gunID)[7];
_root.robot7firespeed = eval ("_root.DB" + _root.robot7gunID)[8];
_root.robot7gunsound = eval ("_root.DB" + _root.robot7gunID)[9];
_root.robot7guntooclose = eval ("_root.DB" + _root.robot7gunID)[10];
_root.robot7gunrange = eval ("_root.DB" + _root.robot7gunID)[11];
_root.robot8guntype = eval ("_root.DB" + _root.robot8gunID)[5];
_root.robot8gundamage = eval ("_root.DB" + _root.robot8gunID)[6];
_root.robot8spark = eval ("_root.DB" + _root.robot8gunID)[7];
_root.robot8firespeed = eval ("_root.DB" + _root.robot8gunID)[8];
_root.robot8gunsound = eval ("_root.DB" + _root.robot8gunID)[9];
_root.robot8guntooclose = eval ("_root.DB" + _root.robot8gunID)[10];
_root.robot8gunrange = eval ("_root.DB" + _root.robot8gunID)[11];
_root.arenamap = 4;
_root.spotlightX = 380;
_root.spotlightY = 80;
_root.gotoAndStop(5);
}
}
Instance of Symbol 176 MovieClip in Frame 4
onClipEvent (load) {
entryfee = 2000;
gotoAndStop (5);
}
on (release) {
if (_root.cash >= entryfee) {
_root.cash = _root.cash - entryfee;
_root.prizemoney = 5000;
_root.robot6gunID = "nailgun2";
_root.robot7gunID = "taiser1";
_root.robot8gunID = "nailgun2";
_root.robot6botname = "SLAVE";
_root.robot7botname = "LOGIKILL";
_root.robot8botname = "SLAVE";
_root.robot6guntype = eval ("_root.DB" + _root.robot6gunID)[5];
_root.robot6gundamage = eval ("_root.DB" + _root.robot6gunID)[6];
_root.robot6spark = eval ("_root.DB" + _root.robot6gunID)[7];
_root.robot6firespeed = eval ("_root.DB" + _root.robot6gunID)[8];
_root.robot6gunsound = eval ("_root.DB" + _root.robot6gunID)[9];
_root.robot6guntooclose = eval ("_root.DB" + _root.robot6gunID)[10];
_root.robot6gunrange = eval ("_root.DB" + _root.robot6gunID)[11];
_root.robot7guntype = eval ("_root.DB" + _root.robot7gunID)[5];
_root.robot7gundamage = eval ("_root.DB" + _root.robot7gunID)[6];
_root.robot7spark = eval ("_root.DB" + _root.robot7gunID)[7];
_root.robot7firespeed = eval ("_root.DB" + _root.robot7gunID)[8];
_root.robot7gunsound = eval ("_root.DB" + _root.robot7gunID)[9];
_root.robot7guntooclose = eval ("_root.DB" + _root.robot7gunID)[10];
_root.robot7gunrange = eval ("_root.DB" + _root.robot7gunID)[11];
_root.robot8guntype = eval ("_root.DB" + _root.robot8gunID)[5];
_root.robot8gundamage = eval ("_root.DB" + _root.robot8gunID)[6];
_root.robot8spark = eval ("_root.DB" + _root.robot8gunID)[7];
_root.robot8firespeed = eval ("_root.DB" + _root.robot8gunID)[8];
_root.robot8gunsound = eval ("_root.DB" + _root.robot8gunID)[9];
_root.robot8guntooclose = eval ("_root.DB" + _root.robot8gunID)[10];
_root.robot8gunrange = eval ("_root.DB" + _root.robot8gunID)[11];
_root.arenamap = 5;
_root.spotlightX = 380;
_root.spotlightY = 80;
_root.gotoAndStop(5);
}
}
Frame 5
stop();
soundplayer = new Sound();
soundplayer.attachSound("gs1");
MovieClip.prototype.roundHitTest = function (that) {
if (that._alpha > 0) {
var dx = (this._x - that._x);
var dy = (this._y - that._y);
return(Math.sqrt((dx * dx) + (dy * dy)) <= 40);
}
};
wallimpactdamage = 1;
alphateamname = "Alpha Team";
alphalog = alphateamname + " datalog.";
betateamname = "Beta Team";
betalog = betateamname + " datalog.";
Instance of Symbol 200 MovieClip in Frame 5
onClipEvent (load) {
gotoAndStop(_root.arenamap);
}
Instance of Symbol 202 MovieClip "spotlight" in Frame 5
onClipEvent (load) {
_visible = false;
_x = _root.spotlightX;
_y = _root.spotlightY;
}
Instance of Symbol 204 MovieClip "walls" in Frame 5
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 247 MovieClip "robot1" in Frame 5
onClipEvent (load) {
gunsound = eval (("_root." + _name) + "gunsound");
guntype = eval (("_root." + _name) + "guntype");
gun.gotoAndStop(guntype + 1);
gundamage = eval (("_root." + _name) + "gundamage");
movespeed = 3;
accelspeed = 0.5;
range = 200;
gunrange = eval (("_root." + _name) + "gunrange");
logic = 1;
sublogic = "wander";
maxhealth = 200;
health = maxhealth;
robotname = eval (("_root." + _name) + "botname");
gunspark = eval (("_root." + _name) + "spark");
tooclose = eval (("_root." + _name) + "guntooclose");
scanspeed = 10;
firetime = eval (("_root." + _name) + "firespeed");
firecharge = firetime;
targetname = "undefined";
checktargets = 0;
team = eval (("_root." + _name) + "team");
if (team == "alpha") {
teamcolor = _root.alphacolor;
}
if (team == "beta") {
teamcolor = _root.betacolor;
}
AIwait = false;
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
time = "i";
if (logic == 1) {
AItime = 30 + random(25);
if (team == "alpha") {
AIdown = true;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
if (team == "beta") {
AIup = true;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
AItime = 30 + random(25);
}
if (logic == 2) {
AItime = 0;
if (team == "alpha") {
gotoX = random(300) + 100;
gotoY = random(100) + 300;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
if (team == "beta") {
gotoX = random(300) + 100;
gotoY = random(100) + 100;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
}
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
if (_x < (_root.SG_TL._x + 15)) {
_x = (_x + 30);
}
if (_x > (_root.SG_BR._x - 15)) {
_x = (_x - 30);
}
if (_y < (_root.SG_TL._y + 15)) {
_y = (_y + 30);
}
if (_y > (_root.SG_BR._y - 15)) {
_y = (_y - 30);
}
}
if ((((((((this.roundHitTest(_parent.robot2) || (this.roundHitTest(_parent.robot3))) || (this.roundHitTest(_parent.robot4))) || (this.roundHitTest(_parent.robot5))) || (this.roundHitTest(_parent.robot6))) || (this.roundHitTest(_parent.robot7))) || (this.roundHitTest(_parent.robot8))) || (this.roundHitTest(_parent.robot9))) || (this.roundHitTest(_parent.robot10))) {
collisiontolerance++;
_y = (_y + (ymove * -3));
_x = (_x + (xmove * -3));
xmove = -xmove;
ymove = -ymove;
if (logic == 1) {
AIup = !AIup;
AIdown = !AIdown;
AIleft = !AIleft;
AIright = !AIright;
}
}
findtargets++;
_x = (_x + xmove);
_y = (_y + ymove);
if (logic == 1) {
AItime--;
if (AItime <= 0) {
directional = random(8) + 1;
if (directional == 1) {
AIup = false;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 2) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 3) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = false;
}
if (directional == 4) {
AIup = true;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 5) {
AIup = false;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 6) {
AIup = false;
AIdown = true;
AIleft = true;
AIright = false;
}
if (directional == 7) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = false;
}
if (directional == 8) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = true;
}
AItime = 50;
}
}
if (logic == 2) {
collisionwaiting++;
if (collisionwaiting > 25) {
collisionwaiting = 0;
if (collisiontolerance >= 1) {
collisiontolerance--;
}
}
if (collisiontolerance >= 1) {
collisiontolerance = 0;
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
sens = 50;
AItime--;
if (AItime <= 0) {
if ((((_x < (gotoX + sens)) && (_x > (gotoX - sens))) && (_y < (gotoY + sens))) && (_y > (gotoY - sens))) {
if (sublogic == "wander") {
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
if (sublogic == "cocky") {
gotoX = (_parent.robot6._x + (_parent.robot7._x / 2)) - _parent._x;
gotoY = (_parent.robot6._y + (_parent.robot7._y / 2)) - _parent._y;
}
}
if ((_x < (gotoX + sens)) && (_x > (gotoX - sens))) {
AIleft = false;
AIright = false;
AItime = 25;
}
if ((_y < (gotoY + sens)) && (_y > (gotoY - sens))) {
AIup = false;
AIdown = false;
AItime = 25;
}
if (_x < (gotoX - sens)) {
AIleft = false;
AIright = true;
AItime = 25;
}
if (_x > (gotoX + sens)) {
AIleft = true;
AIright = false;
AItime = 25;
}
if (_y < (gotoY - sens)) {
AIdown = true;
AIup = false;
AItime = 25;
}
if (_y > (gotoY + sens)) {
AIdown = false;
AIup = true;
AItime = 25;
}
}
}
if (health <= 0) {
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
AIwait = true;
if (firstdie == undefined) {
duplicateMovieClip (_root.tempDisa, "fader" + this._name, _root.br);
_root.br++;
firstdie = "begin";
dieP = 0;
}
if (firstdie == "begin") {
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , dieP);
dieP = dieP + 5;
if (dieP >= 100) {
firstdie = "begin2";
}
}
if (firstdie == "begin2") {
_alpha = (_alpha-1);
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , _alpha);
if (_alpha <= 0) {
removeMovieClip("_root.fader" + _name);
_x = -100;
_y = -100;
firstdie = "finished";
}
}
}
if (AIleft) {
if (xmove > (-movespeed)) {
xmove = xmove - accelspeed;
}
} else if (xmove <= (-accelspeed)) {
xmove = xmove + accelspeed;
} else if (xmove < 0) {
xmove = xmove - xmove;
}
if (AIright) {
if (xmove < movespeed) {
xmove = xmove + accelspeed;
}
} else if (xmove >= accelspeed) {
xmove = xmove - accelspeed;
} else if (xmove > 0) {
xmove = xmove - xmove;
}
if (AIup) {
if (ymove > (-movespeed)) {
ymove = ymove - accelspeed;
}
} else if (ymove <= (-accelspeed)) {
ymove = ymove + accelspeed;
} else if (ymove < 0) {
ymove = ymove - ymove;
}
if (AIdown) {
if (ymove < movespeed) {
ymove = ymove + accelspeed;
}
} else if (ymove >= accelspeed) {
ymove = ymove - accelspeed;
} else if (ymove > 0) {
ymove = ymove - ymove;
}
if (AIwait) {
if ((xmove > -0.5) && (xmove < 0.5)) {
xmove = 0;
} else if (xmove <= -0.5) {
xmove = xmove + accelspeed;
} else if (xmove >= 0.5) {
xmove = xmove - accelspeed;
}
}
if (xmove > movespeed) {
xmove = movespeed;
}
if (xmove < (-movespeed)) {
xmove = -movespeed;
}
if (ymove > movespeed) {
ymove = movespeed;
}
if (ymove < (-movespeed)) {
ymove = -movespeed;
}
if (findtargets > scanspeed) {
findtargets = 0;
storedistance = 1000;
targetname = "undefined";
i = 1;
while (i <= 10) {
if (eval ("_parent.robot" + i).team != team) {
tempDistX = Math.pow(this._x - _root["robot" + i]._x, 2);
tempDistY = Math.pow(this._y - _root["robot" + i]._y, 2);
distance = Math.pow(tempDistX + tempDistY, 0.5);
if (eval ("_parent.robot" + i).health > 0) {
if (distance <= range) {
if (storedistance > distance) {
storedistance = distance;
targetname = eval ("_parent.robot" + i);
}
}
}
}
i++;
}
}
}
Instance of Symbol 255 MovieClip "tempDisa" in Frame 5
onClipEvent (enterFrame) {
if (_name == "tempDisa") {
_visible = false;
}
if (_root._currentframe != 5) {
removeMovieClip(this);
}
}
Instance of Symbol 247 MovieClip "robot6" in Frame 5
onClipEvent (load) {
gunsound = eval (("_root." + _name) + "gunsound");
guntype = eval (("_root." + _name) + "guntype");
gun.gotoAndStop(guntype + 1);
gundamage = eval (("_root." + _name) + "gundamage");
movespeed = 3;
accelspeed = 0.5;
range = 200;
gunrange = eval (("_root." + _name) + "gunrange");
logic = 1;
sublogic = "wander";
maxhealth = 200;
health = maxhealth;
robotname = eval (("_root." + _name) + "botname");
gunspark = eval (("_root." + _name) + "spark");
tooclose = eval (("_root." + _name) + "guntooclose");
scanspeed = 10;
firetime = eval (("_root." + _name) + "firespeed");
firecharge = firetime;
targetname = "undefined";
checktargets = 0;
team = eval (("_root." + _name) + "team");
if (team == "alpha") {
teamcolor = _root.alphacolor;
}
if (team == "beta") {
teamcolor = _root.betacolor;
}
AIwait = false;
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
time = "i";
if (logic == 1) {
AItime = 30 + random(25);
if (team == "alpha") {
AIdown = true;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
if (team == "beta") {
AIup = true;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
AItime = 30 + random(25);
}
if (logic == 2) {
AItime = 0;
if (team == "alpha") {
gotoX = random(300) + 100;
gotoY = random(100) + 300;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
if (team == "beta") {
gotoX = random(300) + 100;
gotoY = random(100) + 100;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
}
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
if (_x < (_root.SG_TL._x + 15)) {
_x = (_x + 30);
}
if (_x > (_root.SG_BR._x - 15)) {
_x = (_x - 30);
}
if (_y < (_root.SG_TL._y + 15)) {
_y = (_y + 30);
}
if (_y > (_root.SG_BR._y - 15)) {
_y = (_y - 30);
}
}
if ((((((((this.roundHitTest(_parent.robot2) || (this.roundHitTest(_parent.robot3))) || (this.roundHitTest(_parent.robot4))) || (this.roundHitTest(_parent.robot5))) || (this.roundHitTest(_parent.robot1))) || (this.roundHitTest(_parent.robot7))) || (this.roundHitTest(_parent.robot8))) || (this.roundHitTest(_parent.robot9))) || (this.roundHitTest(_parent.robot10))) {
collisiontolerance++;
_y = (_y + (ymove * -3));
_x = (_x + (xmove * -3));
xmove = -xmove;
ymove = -ymove;
if (logic == 1) {
AIup = !AIup;
AIdown = !AIdown;
AIleft = !AIleft;
AIright = !AIright;
}
}
findtargets++;
_x = (_x + xmove);
_y = (_y + ymove);
if (logic == 1) {
AItime--;
if (AItime <= 0) {
directional = random(8) + 1;
if (directional == 1) {
AIup = false;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 2) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 3) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = false;
}
if (directional == 4) {
AIup = true;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 5) {
AIup = false;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 6) {
AIup = false;
AIdown = true;
AIleft = true;
AIright = false;
}
if (directional == 7) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = false;
}
if (directional == 8) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = true;
}
AItime = 50;
}
}
if (logic == 2) {
collisionwaiting++;
if (collisionwaiting > 25) {
collisionwaiting = 0;
if (collisiontolerance >= 1) {
collisiontolerance--;
}
}
if (collisiontolerance >= 1) {
collisiontolerance = 0;
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
sens = 50;
AItime--;
if (AItime <= 0) {
if ((((_x < (gotoX + sens)) && (_x > (gotoX - sens))) && (_y < (gotoY + sens))) && (_y > (gotoY - sens))) {
if (sublogic == "wander") {
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
if (sublogic == "cocky") {
gotoX = (_parent.robot6._x + (_parent.robot7._x / 2)) - _parent._x;
gotoY = (_parent.robot6._y + (_parent.robot7._y / 2)) - _parent._y;
}
}
if ((_x < (gotoX + sens)) && (_x > (gotoX - sens))) {
AIleft = false;
AIright = false;
AItime = 25;
}
if ((_y < (gotoY + sens)) && (_y > (gotoY - sens))) {
AIup = false;
AIdown = false;
AItime = 25;
}
if (_x < (gotoX - sens)) {
AIleft = false;
AIright = true;
AItime = 25;
}
if (_x > (gotoX + sens)) {
AIleft = true;
AIright = false;
AItime = 25;
}
if (_y < (gotoY - sens)) {
AIdown = true;
AIup = false;
AItime = 25;
}
if (_y > (gotoY + sens)) {
AIdown = false;
AIup = true;
AItime = 25;
}
}
}
if (health <= 0) {
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
AIwait = true;
if (firstdie == undefined) {
duplicateMovieClip (_root.tempDisa, "fader" + this._name, _root.br);
_root.br++;
firstdie = "begin";
dieP = 0;
}
if (firstdie == "begin") {
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , dieP);
dieP = dieP + 5;
if (dieP >= 100) {
firstdie = "begin2";
}
}
if (firstdie == "begin2") {
_alpha = (_alpha-1);
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , _alpha);
if (_alpha <= 0) {
removeMovieClip("_root.fader" + _name);
_x = -100;
_y = -100;
firstdie = "finished";
}
}
}
if (AIleft) {
if (xmove > (-movespeed)) {
xmove = xmove - accelspeed;
}
} else if (xmove <= (-accelspeed)) {
xmove = xmove + accelspeed;
} else if (xmove < 0) {
xmove = xmove - xmove;
}
if (AIright) {
if (xmove < movespeed) {
xmove = xmove + accelspeed;
}
} else if (xmove >= accelspeed) {
xmove = xmove - accelspeed;
} else if (xmove > 0) {
xmove = xmove - xmove;
}
if (AIup) {
if (ymove > (-movespeed)) {
ymove = ymove - accelspeed;
}
} else if (ymove <= (-accelspeed)) {
ymove = ymove + accelspeed;
} else if (ymove < 0) {
ymove = ymove - ymove;
}
if (AIdown) {
if (ymove < movespeed) {
ymove = ymove + accelspeed;
}
} else if (ymove >= accelspeed) {
ymove = ymove - accelspeed;
} else if (ymove > 0) {
ymove = ymove - ymove;
}
if (AIwait) {
if ((xmove > -0.5) && (xmove < 0.5)) {
xmove = 0;
} else if (xmove <= -0.5) {
xmove = xmove + accelspeed;
} else if (xmove >= 0.5) {
xmove = xmove - accelspeed;
}
}
if (xmove > movespeed) {
xmove = movespeed;
}
if (xmove < (-movespeed)) {
xmove = -movespeed;
}
if (ymove > movespeed) {
ymove = movespeed;
}
if (ymove < (-movespeed)) {
ymove = -movespeed;
}
if (findtargets > scanspeed) {
findtargets = 0;
storedistance = 1000;
targetname = "undefined";
i = 1;
while (i <= 10) {
if (eval ("_parent.robot" + i).team != team) {
tempDistX = Math.pow(this._x - _root["robot" + i]._x, 2);
tempDistY = Math.pow(this._y - _root["robot" + i]._y, 2);
distance = Math.pow(tempDistX + tempDistY, 0.5);
if (eval ("_parent.robot" + i).health > 0) {
if (distance <= range) {
if (storedistance > distance) {
storedistance = distance;
targetname = eval ("_parent.robot" + i);
}
}
}
}
i++;
}
}
}
Instance of Symbol 247 MovieClip "robot7" in Frame 5
onClipEvent (load) {
gunsound = eval (("_root." + _name) + "gunsound");
guntype = eval (("_root." + _name) + "guntype");
gun.gotoAndStop(guntype + 1);
gundamage = eval (("_root." + _name) + "gundamage");
movespeed = 3;
accelspeed = 0.5;
range = 200;
gunrange = eval (("_root." + _name) + "gunrange");
logic = 1;
sublogic = "wander";
maxhealth = 200;
health = maxhealth;
robotname = eval (("_root." + _name) + "botname");
gunspark = eval (("_root." + _name) + "spark");
tooclose = eval (("_root." + _name) + "guntooclose");
scanspeed = 10;
firetime = eval (("_root." + _name) + "firespeed");
firecharge = firetime;
targetname = "undefined";
checktargets = 0;
team = eval (("_root." + _name) + "team");
if (team == "alpha") {
teamcolor = _root.alphacolor;
}
if (team == "beta") {
teamcolor = _root.betacolor;
}
AIwait = false;
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
time = "i";
if (logic == 1) {
AItime = 30 + random(25);
if (team == "alpha") {
AIdown = true;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
if (team == "beta") {
AIup = true;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
AItime = 30 + random(25);
}
if (logic == 2) {
AItime = 0;
if (team == "alpha") {
gotoX = random(300) + 100;
gotoY = random(100) + 300;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
if (team == "beta") {
gotoX = random(300) + 100;
gotoY = random(100) + 100;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
}
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
if (_x < (_root.SG_TL._x + 15)) {
_x = (_x + 30);
}
if (_x > (_root.SG_BR._x - 15)) {
_x = (_x - 30);
}
if (_y < (_root.SG_TL._y + 15)) {
_y = (_y + 30);
}
if (_y > (_root.SG_BR._y - 15)) {
_y = (_y - 30);
}
}
if ((((((((this.roundHitTest(_parent.robot2) || (this.roundHitTest(_parent.robot3))) || (this.roundHitTest(_parent.robot4))) || (this.roundHitTest(_parent.robot5))) || (this.roundHitTest(_parent.robot6))) || (this.roundHitTest(_parent.robot1))) || (this.roundHitTest(_parent.robot8))) || (this.roundHitTest(_parent.robot9))) || (this.roundHitTest(_parent.robot10))) {
collisiontolerance++;
_y = (_y + (ymove * -3));
_x = (_x + (xmove * -3));
xmove = -xmove;
ymove = -ymove;
if (logic == 1) {
AIup = !AIup;
AIdown = !AIdown;
AIleft = !AIleft;
AIright = !AIright;
}
}
findtargets++;
_x = (_x + xmove);
_y = (_y + ymove);
if (logic == 1) {
AItime--;
if (AItime <= 0) {
directional = random(8) + 1;
if (directional == 1) {
AIup = false;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 2) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 3) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = false;
}
if (directional == 4) {
AIup = true;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 5) {
AIup = false;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 6) {
AIup = false;
AIdown = true;
AIleft = true;
AIright = false;
}
if (directional == 7) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = false;
}
if (directional == 8) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = true;
}
AItime = 50;
}
}
if (logic == 2) {
collisionwaiting++;
if (collisionwaiting > 25) {
collisionwaiting = 0;
if (collisiontolerance >= 1) {
collisiontolerance--;
}
}
if (collisiontolerance >= 1) {
collisiontolerance = 0;
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
sens = 50;
AItime--;
if (AItime <= 0) {
if ((((_x < (gotoX + sens)) && (_x > (gotoX - sens))) && (_y < (gotoY + sens))) && (_y > (gotoY - sens))) {
if (sublogic == "wander") {
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
if (sublogic == "cocky") {
gotoX = (_parent.robot6._x + (_parent.robot7._x / 2)) - _parent._x;
gotoY = (_parent.robot6._y + (_parent.robot7._y / 2)) - _parent._y;
}
}
if ((_x < (gotoX + sens)) && (_x > (gotoX - sens))) {
AIleft = false;
AIright = false;
AItime = 25;
}
if ((_y < (gotoY + sens)) && (_y > (gotoY - sens))) {
AIup = false;
AIdown = false;
AItime = 25;
}
if (_x < (gotoX - sens)) {
AIleft = false;
AIright = true;
AItime = 25;
}
if (_x > (gotoX + sens)) {
AIleft = true;
AIright = false;
AItime = 25;
}
if (_y < (gotoY - sens)) {
AIdown = true;
AIup = false;
AItime = 25;
}
if (_y > (gotoY + sens)) {
AIdown = false;
AIup = true;
AItime = 25;
}
}
}
if (health <= 0) {
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
AIwait = true;
if (firstdie == undefined) {
duplicateMovieClip (_root.tempDisa, "fader" + this._name, _root.br);
_root.br++;
firstdie = "begin";
dieP = 0;
}
if (firstdie == "begin") {
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , dieP);
dieP = dieP + 5;
if (dieP >= 100) {
firstdie = "begin2";
}
}
if (firstdie == "begin2") {
_alpha = (_alpha-1);
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , _alpha);
if (_alpha <= 0) {
removeMovieClip("_root.fader" + _name);
_x = -100;
_y = -100;
firstdie = "finished";
}
}
}
if (AIleft) {
if (xmove > (-movespeed)) {
xmove = xmove - accelspeed;
}
} else if (xmove <= (-accelspeed)) {
xmove = xmove + accelspeed;
} else if (xmove < 0) {
xmove = xmove - xmove;
}
if (AIright) {
if (xmove < movespeed) {
xmove = xmove + accelspeed;
}
} else if (xmove >= accelspeed) {
xmove = xmove - accelspeed;
} else if (xmove > 0) {
xmove = xmove - xmove;
}
if (AIup) {
if (ymove > (-movespeed)) {
ymove = ymove - accelspeed;
}
} else if (ymove <= (-accelspeed)) {
ymove = ymove + accelspeed;
} else if (ymove < 0) {
ymove = ymove - ymove;
}
if (AIdown) {
if (ymove < movespeed) {
ymove = ymove + accelspeed;
}
} else if (ymove >= accelspeed) {
ymove = ymove - accelspeed;
} else if (ymove > 0) {
ymove = ymove - ymove;
}
if (AIwait) {
if ((xmove > -0.5) && (xmove < 0.5)) {
xmove = 0;
} else if (xmove <= -0.5) {
xmove = xmove + accelspeed;
} else if (xmove >= 0.5) {
xmove = xmove - accelspeed;
}
}
if (xmove > movespeed) {
xmove = movespeed;
}
if (xmove < (-movespeed)) {
xmove = -movespeed;
}
if (ymove > movespeed) {
ymove = movespeed;
}
if (ymove < (-movespeed)) {
ymove = -movespeed;
}
if (findtargets > scanspeed) {
findtargets = 0;
storedistance = 1000;
targetname = "undefined";
i = 1;
while (i <= 10) {
if (eval ("_parent.robot" + i).team != team) {
tempDistX = Math.pow(this._x - _root["robot" + i]._x, 2);
tempDistY = Math.pow(this._y - _root["robot" + i]._y, 2);
distance = Math.pow(tempDistX + tempDistY, 0.5);
if (eval ("_parent.robot" + i).health > 0) {
if (distance <= range) {
if (storedistance > distance) {
storedistance = distance;
targetname = eval ("_parent.robot" + i);
}
}
}
}
i++;
}
}
}
Instance of Symbol 247 MovieClip "robot8" in Frame 5
onClipEvent (load) {
gunsound = eval (("_root." + _name) + "gunsound");
guntype = eval (("_root." + _name) + "guntype");
gun.gotoAndStop(guntype + 1);
gundamage = eval (("_root." + _name) + "gundamage");
movespeed = 3;
accelspeed = 0.5;
range = 200;
gunrange = eval (("_root." + _name) + "gunrange");
logic = 1;
sublogic = "wander";
maxhealth = 200;
health = maxhealth;
robotname = eval (("_root." + _name) + "botname");
gunspark = eval (("_root." + _name) + "spark");
tooclose = eval (("_root." + _name) + "guntooclose");
scanspeed = 10;
firetime = eval (("_root." + _name) + "firespeed");
firecharge = firetime;
targetname = "undefined";
checktargets = 0;
team = eval (("_root." + _name) + "team");
if (team == "alpha") {
teamcolor = _root.alphacolor;
}
if (team == "beta") {
teamcolor = _root.betacolor;
}
AIwait = false;
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
time = "i";
if (logic == 1) {
AItime = 30 + random(25);
if (team == "alpha") {
AIdown = true;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
if (team == "beta") {
AIup = true;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
AItime = 30 + random(25);
}
if (logic == 2) {
AItime = 0;
if (team == "alpha") {
gotoX = random(300) + 100;
gotoY = random(100) + 300;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
if (team == "beta") {
gotoX = random(300) + 100;
gotoY = random(100) + 100;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
}
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
if (_x < (_root.SG_TL._x + 15)) {
_x = (_x + 30);
}
if (_x > (_root.SG_BR._x - 15)) {
_x = (_x - 30);
}
if (_y < (_root.SG_TL._y + 15)) {
_y = (_y + 30);
}
if (_y > (_root.SG_BR._y - 15)) {
_y = (_y - 30);
}
}
if ((((((((this.roundHitTest(_parent.robot2) || (this.roundHitTest(_parent.robot3))) || (this.roundHitTest(_parent.robot4))) || (this.roundHitTest(_parent.robot5))) || (this.roundHitTest(_parent.robot6))) || (this.roundHitTest(_parent.robot7))) || (this.roundHitTest(_parent.robot1))) || (this.roundHitTest(_parent.robot9))) || (this.roundHitTest(_parent.robot10))) {
collisiontolerance++;
_y = (_y + (ymove * -3));
_x = (_x + (xmove * -3));
xmove = -xmove;
ymove = -ymove;
if (logic == 1) {
AIup = !AIup;
AIdown = !AIdown;
AIleft = !AIleft;
AIright = !AIright;
}
}
findtargets++;
_x = (_x + xmove);
_y = (_y + ymove);
if (logic == 1) {
AItime--;
if (AItime <= 0) {
directional = random(8) + 1;
if (directional == 1) {
AIup = false;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 2) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 3) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = false;
}
if (directional == 4) {
AIup = true;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 5) {
AIup = false;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 6) {
AIup = false;
AIdown = true;
AIleft = true;
AIright = false;
}
if (directional == 7) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = false;
}
if (directional == 8) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = true;
}
AItime = 50;
}
}
if (logic == 2) {
collisionwaiting++;
if (collisionwaiting > 25) {
collisionwaiting = 0;
if (collisiontolerance >= 1) {
collisiontolerance--;
}
}
if (collisiontolerance >= 1) {
collisiontolerance = 0;
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
sens = 50;
AItime--;
if (AItime <= 0) {
if ((((_x < (gotoX + sens)) && (_x > (gotoX - sens))) && (_y < (gotoY + sens))) && (_y > (gotoY - sens))) {
if (sublogic == "wander") {
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
if (sublogic == "cocky") {
gotoX = (_parent.robot6._x + (_parent.robot7._x / 2)) - _parent._x;
gotoY = (_parent.robot6._y + (_parent.robot7._y / 2)) - _parent._y;
}
}
if ((_x < (gotoX + sens)) && (_x > (gotoX - sens))) {
AIleft = false;
AIright = false;
AItime = 25;
}
if ((_y < (gotoY + sens)) && (_y > (gotoY - sens))) {
AIup = false;
AIdown = false;
AItime = 25;
}
if (_x < (gotoX - sens)) {
AIleft = false;
AIright = true;
AItime = 25;
}
if (_x > (gotoX + sens)) {
AIleft = true;
AIright = false;
AItime = 25;
}
if (_y < (gotoY - sens)) {
AIdown = true;
AIup = false;
AItime = 25;
}
if (_y > (gotoY + sens)) {
AIdown = false;
AIup = true;
AItime = 25;
}
}
}
if (health <= 0) {
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
AIwait = true;
if (firstdie == undefined) {
duplicateMovieClip (_root.tempDisa, "fader" + this._name, _root.br);
_root.br++;
firstdie = "begin";
dieP = 0;
}
if (firstdie == "begin") {
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , dieP);
dieP = dieP + 5;
if (dieP >= 100) {
firstdie = "begin2";
}
}
if (firstdie == "begin2") {
_alpha = (_alpha-1);
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , _alpha);
if (_alpha <= 0) {
removeMovieClip("_root.fader" + _name);
_x = -100;
_y = -100;
firstdie = "finished";
}
}
}
if (AIleft) {
if (xmove > (-movespeed)) {
xmove = xmove - accelspeed;
}
} else if (xmove <= (-accelspeed)) {
xmove = xmove + accelspeed;
} else if (xmove < 0) {
xmove = xmove - xmove;
}
if (AIright) {
if (xmove < movespeed) {
xmove = xmove + accelspeed;
}
} else if (xmove >= accelspeed) {
xmove = xmove - accelspeed;
} else if (xmove > 0) {
xmove = xmove - xmove;
}
if (AIup) {
if (ymove > (-movespeed)) {
ymove = ymove - accelspeed;
}
} else if (ymove <= (-accelspeed)) {
ymove = ymove + accelspeed;
} else if (ymove < 0) {
ymove = ymove - ymove;
}
if (AIdown) {
if (ymove < movespeed) {
ymove = ymove + accelspeed;
}
} else if (ymove >= accelspeed) {
ymove = ymove - accelspeed;
} else if (ymove > 0) {
ymove = ymove - ymove;
}
if (AIwait) {
if ((xmove > -0.5) && (xmove < 0.5)) {
xmove = 0;
} else if (xmove <= -0.5) {
xmove = xmove + accelspeed;
} else if (xmove >= 0.5) {
xmove = xmove - accelspeed;
}
}
if (xmove > movespeed) {
xmove = movespeed;
}
if (xmove < (-movespeed)) {
xmove = -movespeed;
}
if (ymove > movespeed) {
ymove = movespeed;
}
if (ymove < (-movespeed)) {
ymove = -movespeed;
}
if (findtargets > scanspeed) {
findtargets = 0;
storedistance = 1000;
targetname = "undefined";
i = 1;
while (i <= 10) {
if (eval ("_parent.robot" + i).team != team) {
tempDistX = Math.pow(this._x - _root["robot" + i]._x, 2);
tempDistY = Math.pow(this._y - _root["robot" + i]._y, 2);
distance = Math.pow(tempDistX + tempDistY, 0.5);
if (eval ("_parent.robot" + i).health > 0) {
if (distance <= range) {
if (storedistance > distance) {
storedistance = distance;
targetname = eval ("_parent.robot" + i);
}
}
}
}
i++;
}
}
}
Instance of Symbol 247 MovieClip "robot2" in Frame 5
onClipEvent (load) {
gunsound = eval (("_root." + _name) + "gunsound");
guntype = eval (("_root." + _name) + "guntype");
gun.gotoAndStop(guntype + 1);
gundamage = eval (("_root." + _name) + "gundamage");
movespeed = 3;
accelspeed = 0.5;
range = 200;
gunrange = eval (("_root." + _name) + "gunrange");
logic = 1;
sublogic = "wander";
maxhealth = 200;
health = maxhealth;
robotname = eval (("_root." + _name) + "botname");
gunspark = eval (("_root." + _name) + "spark");
tooclose = eval (("_root." + _name) + "guntooclose");
scanspeed = 10;
firetime = eval (("_root." + _name) + "firespeed");
firecharge = firetime;
targetname = "undefined";
checktargets = 0;
team = eval (("_root." + _name) + "team");
if (team == "alpha") {
teamcolor = _root.alphacolor;
}
if (team == "beta") {
teamcolor = _root.betacolor;
}
AIwait = false;
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
time = "i";
if (logic == 1) {
AItime = 30 + random(25);
if (team == "alpha") {
AIdown = true;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
if (team == "beta") {
AIup = true;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
AItime = 30 + random(25);
}
if (logic == 2) {
AItime = 0;
if (team == "alpha") {
gotoX = random(300) + 100;
gotoY = random(100) + 300;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
if (team == "beta") {
gotoX = random(300) + 100;
gotoY = random(100) + 100;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
}
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
if (_x < (_root.SG_TL._x + 15)) {
_x = (_x + 30);
}
if (_x > (_root.SG_BR._x - 15)) {
_x = (_x - 30);
}
if (_y < (_root.SG_TL._y + 15)) {
_y = (_y + 30);
}
if (_y > (_root.SG_BR._y - 15)) {
_y = (_y - 30);
}
}
if ((((((((this.roundHitTest(_parent.robot1) || (this.roundHitTest(_parent.robot3))) || (this.roundHitTest(_parent.robot4))) || (this.roundHitTest(_parent.robot5))) || (this.roundHitTest(_parent.robot6))) || (this.roundHitTest(_parent.robot7))) || (this.roundHitTest(_parent.robot8))) || (this.roundHitTest(_parent.robot9))) || (this.roundHitTest(_parent.robot10))) {
collisiontolerance++;
_y = (_y + (ymove * -3));
_x = (_x + (xmove * -3));
xmove = -xmove;
ymove = -ymove;
if (logic == 1) {
AIup = !AIup;
AIdown = !AIdown;
AIleft = !AIleft;
AIright = !AIright;
}
}
findtargets++;
_x = (_x + xmove);
_y = (_y + ymove);
if (logic == 1) {
AItime--;
if (AItime <= 0) {
directional = random(8) + 1;
if (directional == 1) {
AIup = false;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 2) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 3) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = false;
}
if (directional == 4) {
AIup = true;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 5) {
AIup = false;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 6) {
AIup = false;
AIdown = true;
AIleft = true;
AIright = false;
}
if (directional == 7) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = false;
}
if (directional == 8) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = true;
}
AItime = 50;
}
}
if (logic == 2) {
collisionwaiting++;
if (collisionwaiting > 25) {
collisionwaiting = 0;
if (collisiontolerance >= 1) {
collisiontolerance--;
}
}
if (collisiontolerance >= 1) {
collisiontolerance = 0;
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
sens = 50;
AItime--;
if (AItime <= 0) {
if ((((_x < (gotoX + sens)) && (_x > (gotoX - sens))) && (_y < (gotoY + sens))) && (_y > (gotoY - sens))) {
if (sublogic == "wander") {
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
if (sublogic == "cocky") {
gotoX = (_parent.robot6._x + (_parent.robot7._x / 2)) - _parent._x;
gotoY = (_parent.robot6._y + (_parent.robot7._y / 2)) - _parent._y;
}
}
if ((_x < (gotoX + sens)) && (_x > (gotoX - sens))) {
AIleft = false;
AIright = false;
AItime = 25;
}
if ((_y < (gotoY + sens)) && (_y > (gotoY - sens))) {
AIup = false;
AIdown = false;
AItime = 25;
}
if (_x < (gotoX - sens)) {
AIleft = false;
AIright = true;
AItime = 25;
}
if (_x > (gotoX + sens)) {
AIleft = true;
AIright = false;
AItime = 25;
}
if (_y < (gotoY - sens)) {
AIdown = true;
AIup = false;
AItime = 25;
}
if (_y > (gotoY + sens)) {
AIdown = false;
AIup = true;
AItime = 25;
}
}
}
if (health <= 0) {
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
AIwait = true;
if (firstdie == undefined) {
duplicateMovieClip (_root.tempDisa, "fader" + this._name, _root.br);
_root.br++;
firstdie = "begin";
dieP = 0;
}
if (firstdie == "begin") {
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , dieP);
dieP = dieP + 5;
if (dieP >= 100) {
firstdie = "begin2";
}
}
if (firstdie == "begin2") {
_alpha = (_alpha-1);
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , _alpha);
if (_alpha <= 0) {
removeMovieClip("_root.fader" + _name);
_x = -100;
_y = -100;
firstdie = "finished";
}
}
}
if (AIleft) {
if (xmove > (-movespeed)) {
xmove = xmove - accelspeed;
}
} else if (xmove <= (-accelspeed)) {
xmove = xmove + accelspeed;
} else if (xmove < 0) {
xmove = xmove - xmove;
}
if (AIright) {
if (xmove < movespeed) {
xmove = xmove + accelspeed;
}
} else if (xmove >= accelspeed) {
xmove = xmove - accelspeed;
} else if (xmove > 0) {
xmove = xmove - xmove;
}
if (AIup) {
if (ymove > (-movespeed)) {
ymove = ymove - accelspeed;
}
} else if (ymove <= (-accelspeed)) {
ymove = ymove + accelspeed;
} else if (ymove < 0) {
ymove = ymove - ymove;
}
if (AIdown) {
if (ymove < movespeed) {
ymove = ymove + accelspeed;
}
} else if (ymove >= accelspeed) {
ymove = ymove - accelspeed;
} else if (ymove > 0) {
ymove = ymove - ymove;
}
if (AIwait) {
if ((xmove > -0.5) && (xmove < 0.5)) {
xmove = 0;
} else if (xmove <= -0.5) {
xmove = xmove + accelspeed;
} else if (xmove >= 0.5) {
xmove = xmove - accelspeed;
}
}
if (xmove > movespeed) {
xmove = movespeed;
}
if (xmove < (-movespeed)) {
xmove = -movespeed;
}
if (ymove > movespeed) {
ymove = movespeed;
}
if (ymove < (-movespeed)) {
ymove = -movespeed;
}
if (findtargets > scanspeed) {
findtargets = 0;
storedistance = 1000;
targetname = "undefined";
i = 1;
while (i <= 10) {
if (eval ("_parent.robot" + i).team != team) {
tempDistX = Math.pow(this._x - _root["robot" + i]._x, 2);
tempDistY = Math.pow(this._y - _root["robot" + i]._y, 2);
distance = Math.pow(tempDistX + tempDistY, 0.5);
if (eval ("_parent.robot" + i).health > 0) {
if (distance <= range) {
if (storedistance > distance) {
storedistance = distance;
targetname = eval ("_parent.robot" + i);
}
}
}
}
i++;
}
}
}
Instance of Symbol 247 MovieClip "robot3" in Frame 5
onClipEvent (load) {
gunsound = eval (("_root." + _name) + "gunsound");
guntype = eval (("_root." + _name) + "guntype");
gun.gotoAndStop(guntype + 1);
gundamage = eval (("_root." + _name) + "gundamage");
movespeed = 3;
accelspeed = 0.5;
range = 200;
gunrange = eval (("_root." + _name) + "gunrange");
logic = 1;
sublogic = "wander";
maxhealth = 200;
health = maxhealth;
robotname = eval (("_root." + _name) + "botname");
gunspark = eval (("_root." + _name) + "spark");
tooclose = eval (("_root." + _name) + "guntooclose");
scanspeed = 10;
firetime = eval (("_root." + _name) + "firespeed");
firecharge = firetime;
targetname = "undefined";
checktargets = 0;
team = eval (("_root." + _name) + "team");
if (team == "alpha") {
teamcolor = _root.alphacolor;
}
if (team == "beta") {
teamcolor = _root.betacolor;
}
AIwait = false;
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
time = "i";
if (logic == 1) {
AItime = 30 + random(25);
if (team == "alpha") {
AIdown = true;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
if (team == "beta") {
AIup = true;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": ONLINE. HP%") + ((health * 100) / maxhealth));
}
AItime = 30 + random(25);
}
if (logic == 2) {
AItime = 0;
if (team == "alpha") {
gotoX = random(300) + 100;
gotoY = random(100) + 300;
_root.alphalog = _root.alphalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
if (team == "beta") {
gotoX = random(300) + 100;
gotoY = random(100) + 100;
_root.betalog = _root.betalog + ((("\r" + robotname) + ": Online. Health check... %") + ((health * 100) / maxhealth));
}
}
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
if (_x < (_root.SG_TL._x + 15)) {
_x = (_x + 30);
}
if (_x > (_root.SG_BR._x - 15)) {
_x = (_x - 30);
}
if (_y < (_root.SG_TL._y + 15)) {
_y = (_y + 30);
}
if (_y > (_root.SG_BR._y - 15)) {
_y = (_y - 30);
}
}
if ((((((((this.roundHitTest(_parent.robot2) || (this.roundHitTest(_parent.robot1))) || (this.roundHitTest(_parent.robot4))) || (this.roundHitTest(_parent.robot5))) || (this.roundHitTest(_parent.robot6))) || (this.roundHitTest(_parent.robot7))) || (this.roundHitTest(_parent.robot8))) || (this.roundHitTest(_parent.robot9))) || (this.roundHitTest(_parent.robot10))) {
collisiontolerance++;
_y = (_y + (ymove * -3));
_x = (_x + (xmove * -3));
xmove = -xmove;
ymove = -ymove;
if (logic == 1) {
AIup = !AIup;
AIdown = !AIdown;
AIleft = !AIleft;
AIright = !AIright;
}
}
findtargets++;
_x = (_x + xmove);
_y = (_y + ymove);
if (logic == 1) {
AItime--;
if (AItime <= 0) {
directional = random(8) + 1;
if (directional == 1) {
AIup = false;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 2) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = true;
}
if (directional == 3) {
AIup = true;
AIdown = false;
AIleft = false;
AIright = false;
}
if (directional == 4) {
AIup = true;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 5) {
AIup = false;
AIdown = false;
AIleft = true;
AIright = false;
}
if (directional == 6) {
AIup = false;
AIdown = true;
AIleft = true;
AIright = false;
}
if (directional == 7) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = false;
}
if (directional == 8) {
AIup = false;
AIdown = true;
AIleft = false;
AIright = true;
}
AItime = 50;
}
}
if (logic == 2) {
collisionwaiting++;
if (collisionwaiting > 25) {
collisionwaiting = 0;
if (collisiontolerance >= 1) {
collisiontolerance--;
}
}
if (collisiontolerance >= 1) {
collisiontolerance = 0;
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
sens = 50;
AItime--;
if (AItime <= 0) {
if ((((_x < (gotoX + sens)) && (_x > (gotoX - sens))) && (_y < (gotoY + sens))) && (_y > (gotoY - sens))) {
if (sublogic == "wander") {
gotoX = random(300) + 100;
gotoY = random(300) + 100;
}
if (sublogic == "cocky") {
gotoX = (_parent.robot6._x + (_parent.robot7._x / 2)) - _parent._x;
gotoY = (_parent.robot6._y + (_parent.robot7._y / 2)) - _parent._y;
}
}
if ((_x < (gotoX + sens)) && (_x > (gotoX - sens))) {
AIleft = false;
AIright = false;
AItime = 25;
}
if ((_y < (gotoY + sens)) && (_y > (gotoY - sens))) {
AIup = false;
AIdown = false;
AItime = 25;
}
if (_x < (gotoX - sens)) {
AIleft = false;
AIright = true;
AItime = 25;
}
if (_x > (gotoX + sens)) {
AIleft = true;
AIright = false;
AItime = 25;
}
if (_y < (gotoY - sens)) {
AIdown = true;
AIup = false;
AItime = 25;
}
if (_y > (gotoY + sens)) {
AIdown = false;
AIup = true;
AItime = 25;
}
}
}
if (health <= 0) {
AIleft = false;
AIright = false;
AIup = false;
AIdown = false;
AIwait = true;
if (firstdie == undefined) {
duplicateMovieClip (_root.tempDisa, "fader" + this._name, _root.br);
_root.br++;
firstdie = "begin";
dieP = 0;
}
if (firstdie == "begin") {
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , dieP);
dieP = dieP + 5;
if (dieP >= 100) {
firstdie = "begin2";
}
}
if (firstdie == "begin2") {
_alpha = (_alpha-1);
setProperty("_root.fader" + _name, _x , _x);
setProperty("_root.fader" + _name, _y , _y);
setProperty("_root.fader" + _name, _alpha , _alpha);
if (_alpha <= 0) {
removeMovieClip("_root.fader" + _name);
_x = -100;
_y = -100;
firstdie = "finished";
}
}
}
if (AIleft) {
if (xmove > (-movespeed)) {
xmove = xmove - accelspeed;
}
} else if (xmove <= (-accelspeed)) {
xmove = xmove + accelspeed;
} else if (xmove < 0) {
xmove = xmove - xmove;
}
if (AIright) {
if (xmove < movespeed) {
xmove = xmove + accelspeed;
}
} else if (xmove >= accelspeed) {
xmove = xmove - accelspeed;
} else if (xmove > 0) {
xmove = xmove - xmove;
}
if (AIup) {
if (ymove > (-movespeed)) {
ymove = ymove - accelspeed;
}
} else if (ymove <= (-accelspeed)) {
ymove = ymove + accelspeed;
} else if (ymove < 0) {
ymove = ymove - ymove;
}
if (AIdown) {
if (ymove < movespeed) {
ymove = ymove + accelspeed;
}
} else if (ymove >= accelspeed) {
ymove = ymove - accelspeed;
} else if (ymove > 0) {
ymove = ymove - ymove;
}
if (AIwait) {
if ((xmove > -0.5) && (xmove < 0.5)) {
xmove = 0;
} else if (xmove <= -0.5) {
xmove = xmove + accelspeed;
} else if (xmove >= 0.5) {
xmove = xmove - accelspeed;
}
}
if (xmove > movespeed) {
xmove = movespeed;
}
if (xmove < (-movespeed)) {
xmove = -movespeed;
}
if (ymove > movespeed) {
ymove = movespeed;
}
if (ymove < (-movespeed)) {
ymove = -movespeed;
}
if (findtargets > scanspeed) {
findtargets = 0;
storedistance = 1000;
targetname = "undefined";
i = 1;
while (i <= 10) {
if (eval ("_parent.robot" + i).team != team) {
tempDistX = Math.pow(this._x - _root["robot" + i]._x, 2);
tempDistY = Math.pow(this._y - _root["robot" + i]._y, 2);
distance = Math.pow(tempDistX + tempDistY, 0.5);
if (eval ("_parent.robot" + i).health > 0) {
if (distance <= range) {
if (storedistance > distance) {
storedistance = distance;
targetname = eval ("_parent.robot" + i);
}
}
}
}
i++;
}
}
}
Instance of Symbol 257 MovieClip "wallTop" in Frame 5
onClipEvent (load) {
_alpha = 0;
startY = _y;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = ((_alpha / 1.1) - 1);
_y = ((startY - (_alpha / 20)) + random(_alpha / 10));
}
if (_alpha < 0) {
_alpha = 0;
}
}
Instance of Symbol 259 MovieClip "wallBottom" in Frame 5
onClipEvent (load) {
_alpha = 0;
startY = _y;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = ((_alpha / 1.1) - 1);
_y = ((startY - (_alpha / 20)) + random(_alpha / 10));
}
if (_alpha < 0) {
_alpha = 0;
}
}
Instance of Symbol 261 MovieClip "wallLeft" in Frame 5
onClipEvent (load) {
_alpha = 0;
startX = _x;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = ((_alpha / 1.1) - 1);
_x = ((startX - (_alpha / 20)) + random(_alpha / 10));
}
if (_alpha < 0) {
_alpha = 0;
}
}
Instance of Symbol 263 MovieClip "wallRight" in Frame 5
onClipEvent (load) {
_alpha = 0;
startX = _x;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = ((_alpha / 1.1) - 1);
_x = ((startX - (_alpha / 20)) + random(_alpha / 10));
}
if (_alpha < 0) {
_alpha = 0;
}
}
Instance of Symbol 265 MovieClip "wallTop2" in Frame 5
onClipEvent (load) {
_alpha = 0;
startY = _y;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = ((_alpha / 1.1) - 1);
_y = ((startY - (_alpha / 10)) + random(_alpha / 5));
}
if (_alpha < 0) {
_alpha = 0;
}
}
Instance of Symbol 267 MovieClip "wallBottom2" in Frame 5
onClipEvent (load) {
_alpha = 0;
startY = _y;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = ((_alpha / 1.1) - 1);
_y = ((startY - (_alpha / 10)) + random(_alpha / 5));
}
if (_alpha < 0) {
_alpha = 0;
}
}
Instance of Symbol 269 MovieClip "wallRight2" in Frame 5
onClipEvent (load) {
_alpha = 0;
startX = _x;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = ((_alpha / 1.1) - 1);
_x = ((startX - (_alpha / 10)) + random(_alpha / 5));
}
if (_alpha < 0) {
_alpha = 0;
}
}
Instance of Symbol 271 MovieClip "wallLeft2" in Frame 5
onClipEvent (load) {
_alpha = 0;
startX = _x;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = ((_alpha / 1.1) - 1);
_x = ((startX - (_alpha / 10)) + random(_alpha / 5));
}
if (_alpha < 0) {
_alpha = 0;
}
}
Instance of Symbol 280 MovieClip "gunSparkTemp" in Frame 5
onClipEvent (load) {
if (_name == "gunSparkTemp") {
_visible = false;
}
}
Instance of Symbol 281 MovieClip "bulletTemp" in Frame 5
onClipEvent (load) {
_root.soundManager.playsound1 = gunsound;
distance = 150;
speed = 3;
startX = _x;
startY = _y;
}
onClipEvent (enterFrame) {
if (distance < 0) {
removeMovieClip(this);
}
while (distance >= 0) {
if (eval (Target).hitTest(_x, _y, true)) {
eval (Target).health = eval (Target).health - damage;
endX = _x;
endY = _y;
removeMovieClip(this);
}
_x = (_x + (math.sin((Math.PI/180) * _rotation) * speed));
_y = (_y - (math.cos((Math.PI/180) * _rotation) * speed));
distance = distance - speed;
}
}
Instance of Symbol 284 MovieClip in Frame 5
onClipEvent (load) {
_visible = false;
winner = "dontknow";
}
onClipEvent (enterFrame) {
while ((((winner == "dontknow") && (_root.robot1.health <= 0)) && (_root.robot2.health <= 0)) && (_root.robot3.health <= 0)) {
winner = "beta";
_root.gameStatus.gotoAndStop(3);
_root.robot6.health = 0;
_root.robot7.health = 0;
_root.robot8.health = 0;
winner = "whocaresnow";
}
while ((((winner == "dontknow") && (_root.robot6.health <= 0)) && (_root.robot7.health <= 0)) && (_root.robot8.health <= 0)) {
winner = "alpha";
_root.gameStatus.gotoAndStop(2);
_root.robot1.health = 0;
_root.robot2.health = 0;
_root.robot3.health = 0;
winner = "whocaresnow";
_root.cash = _root.cash + _root.prizemoney;
}
}
Instance of Symbol 120 MovieClip "soundManager" in Frame 5
onClipEvent (load) {
_visible = false;
playsound1 = undefined;
playsound2 = undefined;
playsound3 = "song1";
soundchannel1 = new Sound();
soundchannel2 = new Sound();
soundchannel3 = new Sound();
}
onClipEvent (enterFrame) {
if (playsound1 != undefined) {
soundchannel1.attachSound(playsound1);
soundchannel1.start();
playsound1 = undefined;
}
if (playsound2 != undefined) {
soundchannel2.attachSound(playsound2);
soundchannel2.start();
playsound2 = undefined;
}
if (playsound3 != undefined) {
soundchannel3.attachSound(playsound3);
soundchannel3.start(0, 999);
playsound3 = undefined;
}
if (_root._currentframe != 5) {
stopAllSounds();
}
}
onClipEvent (unload) {
stopAllSounds();
}
Symbol 17 MovieClip Frame 12
_parent.divers.gotoAndStop(2);
Symbol 17 MovieClip Frame 14
stop();
_parent.gotoAndStop(2);
Symbol 41 MovieClip Frame 14
stop();
Symbol 48 Button
on (release) {
_root.gotoAndPlay(2);
}
Symbol 49 MovieClip Frame 1
stop();
Instance of Symbol 17 MovieClip in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
_root.PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
_root.whatbits = (_root.getBytesLoaded() / _root.getBytesTotal()) * 80;
_root.ticks = Number(String(_root.whatbits + 10).charAt(1));
if ((_root.PercentLoaded >= 100) && (_currentframe == 1)) {
if (_parent.lite8._currentframe > 13) {
play();
}
}
}
Instance of Symbol 28 MovieClip "loadticks" in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
gotoAndStop(_root.ticks + 1);
}
Instance of Symbol 33 MovieClip "divers" in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Instance of Symbol 41 MovieClip "lite2" in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
_root.PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if ((_root.PercentLoaded > 25) && (_currentframe == 1)) {
if (_parent.lite1._currentframe > 3) {
play();
}
}
}
Instance of Symbol 41 MovieClip "lite3" in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
_root.PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if ((_root.PercentLoaded > 37.5) && (_currentframe == 1)) {
if (_parent.lite2._currentframe > 3) {
play();
}
}
}
Instance of Symbol 41 MovieClip "lite4" in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
_root.PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if ((_root.PercentLoaded > 50) && (_currentframe == 1)) {
if (_parent.lite3._currentframe > 3) {
play();
}
}
}
Instance of Symbol 41 MovieClip "lite5" in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
_root.PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if ((_root.PercentLoaded > 62.5) && (_currentframe == 1)) {
if (_parent.lite4._currentframe > 3) {
play();
}
}
}
Instance of Symbol 41 MovieClip "lite6" in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
_root.PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if ((_root.PercentLoaded > 75) && (_currentframe == 1)) {
if (_parent.lite5._currentframe > 3) {
play();
}
}
}
Instance of Symbol 41 MovieClip "lite1" in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
_root.PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if ((_root.PercentLoaded > 12.5) && (_currentframe == 1)) {
play();
}
}
Instance of Symbol 41 MovieClip "lite8" in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
_root.PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if ((_root.PercentLoaded >= 100) && (_currentframe == 1)) {
if (_parent.lite7._currentframe > 3) {
play();
}
}
}
Instance of Symbol 41 MovieClip "lite7" in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
_root.PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if ((_root.PercentLoaded > 87.5) && (_currentframe == 1)) {
if (_parent.lite6._currentframe > 3) {
play();
}
}
}
Instance of Symbol 44 MovieClip in Symbol 49 MovieClip Frame 2
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha < 100) {
_alpha = (_alpha + 3);
}
}
Symbol 55 Button
on (press) {
_root.gotoAndStop(3);
_root.resalevalue = 0.5;
_root.storeBOT1weapon = "nogun";
_root.storeBOT1armour = "noarmour";
_root.storeBOT1processor = "noprocessor";
_root.storeBOT1slot1 = "nomisc";
_root.storeBOT1slot2 = "nomisc";
_root.storeBOT1slot3 = "nomisc";
_root.storeBOT1slot4 = "nomisc";
_root.storeBOT1slot5 = "nomisc";
_root.storeBOT2weapon = "nogun";
_root.storeBOT2armour = "noarmour";
_root.storeBOT2processor = "noprocessor";
_root.storeBOT2slot1 = "nomisc";
_root.storeBOT2slot2 = "nomisc";
_root.storeBOT2slot3 = "nomisc";
_root.storeBOT2slot4 = "nomisc";
_root.storeBOT2slot5 = "nomisc";
_root.storeBOT3weapon = "nogun";
_root.storeBOT4weapon = "nogun";
_root.storeBOT5weapon = "nogun";
_root.cash = 3000;
_root.robot1guntype = 0;
_root.robot1gundamage = 0;
_root.robot1spark = 0;
_root.robot1firespeed = 0;
_root.robot1gunsound = 0;
_root.robot1guntooclose = 0;
_root.robot1gunrange = 0;
_root.robot2guntype = 0;
_root.robot2gundamage = 0;
_root.robot2spark = 0;
_root.robot1firespeed = 0;
_root.robot2gunsound = 0;
_root.robot2guntooclose = 0;
_root.robot2gunrange = 0;
_root.robot3guntype = 0;
_root.robot3gundamage = 0;
_root.robot3spark = 0;
_root.robot3firespeed = 0;
_root.robot3gunsound = 0;
_root.robot3guntooclose = 0;
_root.robot3gunrange = 0;
_root.playeritems = [];
}
Symbol 65 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 1
stop();
Instance of Symbol 86 MovieClip "tempBox" in Symbol 87 MovieClip Frame 1
on (press) {
if (_parent._parent._name == "inventory") {
_parent._parent.selectedone = IDnumber;
}
}
onClipEvent (enterFrame) {
if (_parent._parent._name == "inventory") {
if (_parent._parent.selectedone == IDnumber) {
effect.gotoAndStop(3);
_root.inventoryDetails.title = title;
_root.inventoryDetails.subtitle = subtitle;
_root.inventoryDetails.resale = "Scrap value: $" + (cost * _root.resalevalue);
_root.inventoryDetails.description = description;
_root.inventoryDetails.selectedItem = IDnumber;
} else if (hitTest(_root._xmouse, _root._ymouse, true)) {
if ((!_parent._parent.downScroll.hitTest(_root._xmouse, _root._ymouse, true)) && (!_parent._parent.upScroll.hitTest(_root._xmouse, _root._ymouse, true))) {
effect.gotoAndStop(2);
} else {
effect.gotoAndStop(1);
}
} else {
effect.gotoAndStop(1);
}
if (_parent._parent.downScroll.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_y > (((IDnumber - _parent._parent.items.length) * 100) + 140)) {
_y = (_y - 10);
}
}
if (_parent._parent.upScroll.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_y < ((IDnumber * 100) - 100)) {
_y = (_y + 10);
}
}
}
}
Symbol 97 MovieClip Frame 1
stop();
Instance of Symbol 92 MovieClip "upScroll" in Symbol 101 MovieClip Frame 1
onClipEvent (enterFrame) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 97 MovieClip "downScroll" in Symbol 101 MovieClip Frame 1
onClipEvent (enterFrame) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 100 MovieClip in Symbol 101 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.items.length <= 0) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 102 MovieClip "tempBox" in Symbol 103 MovieClip Frame 1
on (press) {
if (_parent._parent._name == "shop") {
_parent._parent.selectedone = IDnumber;
}
}
onClipEvent (enterFrame) {
if (_parent._parent._name == "shop") {
if (_parent._parent.selectedone == IDnumber) {
effect.gotoAndStop(3);
_root.shopDetails.title = title;
_root.shopDetails.subtitle = subtitle;
_root.shopDetails.description = description;
_root.shopDetails.selectedItem = IDnumber;
_root.shopDetails.cost = "$" + cost;
} else if (hitTest(_root._xmouse, _root._ymouse, true)) {
if ((!_parent._parent.downScroll.hitTest(_root._xmouse, _root._ymouse, true)) && (!_parent._parent.upScroll.hitTest(_root._xmouse, _root._ymouse, true))) {
effect.gotoAndStop(2);
} else {
effect.gotoAndStop(1);
}
} else {
effect.gotoAndStop(1);
}
if (_parent._parent.downScroll.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_y > (((IDnumber - _parent._parent.items.length) * 100) + 140)) {
_y = (_y - 10);
}
}
if (_parent._parent.upScroll.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_y < ((IDnumber * 100) - 100)) {
_y = (_y + 10);
}
}
}
}
Instance of Symbol 92 MovieClip "upScroll" in Symbol 104 MovieClip Frame 1
onClipEvent (enterFrame) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 97 MovieClip "downScroll" in Symbol 104 MovieClip Frame 1
onClipEvent (enterFrame) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 116 MovieClip "statusDisplay" in Symbol 117 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha > 1) {
_alpha = (_alpha / 1.1);
} else {
_alpha = 0;
}
}
Symbol 132 Button
on (release) {
_root.storeBOT1weapon = _root.Drobot1.gunID;
_root.storeBOT2weapon = _root.Drobot2.gunID;
_root.storeBOT3weapon = _root.Drobot3.gunID;
_root.storeBOT4weapon = _root.Drobot4.gunID;
_root.storeBOT5weapon = _root.Drobot5.gunID;
_root.robot1guntype = eval ("_root.DB" + _root.Drobot1.gunID)[5];
_root.robot1gundamage = eval ("_root.DB" + _root.Drobot1.gunID)[6];
_root.robot1spark = eval ("_root.DB" + _root.Drobot1.gunID)[7];
_root.robot1firespeed = eval ("_root.DB" + _root.Drobot1.gunID)[8];
_root.robot1gunsound = eval ("_root.DB" + _root.Drobot1.gunID)[9];
_root.robot1guntooclose = eval ("_root.DB" + _root.Drobot1.gunID)[10];
_root.robot1gunrange = eval ("_root.DB" + _root.Drobot1.gunID)[11];
_root.robot2guntype = eval ("_root.DB" + _root.Drobot2.gunID)[5];
_root.robot2gundamage = eval ("_root.DB" + _root.Drobot2.gunID)[6];
_root.robot2spark = eval ("_root.DB" + _root.Drobot2.gunID)[7];
_root.robot2firespeed = eval ("_root.DB" + _root.Drobot2.gunID)[8];
_root.robot2gunsound = eval ("_root.DB" + _root.Drobot2.gunID)[9];
_root.robot2guntooclose = eval ("_root.DB" + _root.Drobot2.gunID)[10];
_root.robot2gunrange = eval ("_root.DB" + _root.Drobot2.gunID)[11];
_root.robot3guntype = eval ("_root.DB" + _root.Drobot3.gunID)[5];
_root.robot3gundamage = eval ("_root.DB" + _root.Drobot3.gunID)[6];
_root.robot3spark = eval ("_root.DB" + _root.Drobot3.gunID)[7];
_root.robot3firespeed = eval ("_root.DB" + _root.Drobot3.gunID)[8];
_root.robot3gunsound = eval ("_root.DB" + _root.Drobot3.gunID)[9];
_root.robot3guntooclose = eval ("_root.DB" + _root.Drobot3.gunID)[10];
_root.robot3gunrange = eval ("_root.DB" + _root.Drobot3.gunID)[11];
_root.robot1botname = _root.robot1name.text;
_root.robot2botname = _root.robot2name.text;
_root.robot3botname = _root.robot3name.text;
_root.gotoAndStop(4);
}
Symbol 139 Button
on (press) {
if (_root.inventory.selectedone != 0) {
if ((eval ("_root.DB" + _root.inventory.items[_root.inventoryDetails.selectedItem - 1])[2] == "weapon") && (eval ("_root.Drobot" + _root.selectedBot.currentSelection).gunID == "nogun")) {
eval ("_root.Drobot" + _root.selectedBot.currentSelection).gunID = _root.inventory.items[_root.inventory.selectedone - 1];
_root.inventory.items.splice(_root.inventory.selectedone - 1, 1);
_root.inventoryDetails.selectedItem = 0;
_root.inventory.changeNow = true;
_root.inventory.selectedone = 0;
}
}
}
Symbol 146 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 1
stop();
Symbol 176 MovieClip Frame 1
stop();
Symbol 200 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 2
stop();
Symbol 235 MovieClip Frame 1
stop();
Instance of Symbol 243 MovieClip in Symbol 246 MovieClip Frame 1
onClipEvent (enterFrame) {
_xscale = ((_parent._parent.health * 100) / _parent._parent.maxhealth);
if (_parent._parent.health > 0) {
_parent._visible = true;
} else {
_parent._visible = false;
}
}
Instance of Symbol 206 MovieClip in Symbol 247 MovieClip Frame 1
onClipEvent (load) {
this.pointAt = function (x, y, offset) {
var dx = (x - this._x);
var dy = (y - this._y);
var dist = Math.sqrt((dx * dx) + (dy * dy));
var angle;
if (dy < 0) {
angle = (Math.PI*2) - Math.acos(dx / dist);
} else {
angle = Math.acos(dx / dist);
}
this._rotation = offset + ((angle * 180) / Math.PI);
};
}
onClipEvent (enterFrame) {
this.pointAt(_root.spotlight._x - _parent._x, _root.spotlight._y - _parent._y, 180);
var zx = (_root.spotlight._x - _parent._x);
var zy = (_root.spotlight._y - _parent._y);
var dista = Math.sqrt((zx * zx) + (zy * zy));
_alpha = (dista * 1.2);
}
Instance of Symbol 217 MovieClip "screen" in Symbol 247 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.health > 0) {
gotoAndStop(_parent.teamcolor);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 227 MovieClip "gun" in Symbol 247 MovieClip Frame 1
onClipEvent (load) {
this.pointAt = function (x, y, offset) {
var dx = (x - this._x);
var dy = (y - this._y);
var dist = Math.sqrt((dx * dx) + (dy * dy));
var angle;
if (dy < 0) {
angle = (Math.PI*2) - Math.acos(dx / dist);
} else {
angle = Math.acos(dx / dist);
}
this._rotation = offset + ((angle * 180) / Math.PI);
};
_rotation = random(360);
}
onClipEvent (enterFrame) {
if (_parent.health > 0) {
if ((_parent.logic == 1) || (_parent.logic == 2)) {
if (_parent.firecharge < _parent.firetime) {
_parent.firecharge++;
}
if (_parent.targetname == "undefined") {
_rotation = (_rotation+1);
} else {
this.pointAt(eval (_parent.targetname)._x - _parent._x, eval (_parent.targetname)._y - _parent._y, 270);
if (_parent.firecharge >= _parent.firetime) {
tdX = Math.pow(_parent._x - eval (_parent.targetname)._x, 2);
tdY = Math.pow(_parent._y - eval (_parent.targetname)._y, 2);
dist = Math.pow(tdX + tdY, 0.5);
if ((dist > _parent.tooclose) && (dist < _parent.gunrange)) {
_parent.firecharge = 0;
duplicateMovieClip (_root.gunSparkTemp, "spark" + _root.ht, _root.ht);
eval ("_root.spark" + _root.ht).gotoAndPlay(_parent.gunspark);
setProperty("_root.spark" + _root.ht, _x , (_parent._x - (math.sin((Math.PI/180) * _rotation) * gunPoint._y)) + _parent.xmove);
setProperty("_root.spark" + _root.ht, _y , (_parent._y + (math.cos((Math.PI/180) * _rotation) * gunPoint._y)) + _parent.ymove);
setProperty("_root.spark" + _root.ht, _rotation , _rotation - 270);
_root.ht++;
duplicateMovieClip (_root.bulletTemp, "bullet" + _root.ht, _root.ht);
eval ("_root.bullet" + _root.ht).Target = _parent.targetname;
eval ("_root.bullet" + _root.ht).damage = _parent.gundamage;
eval ("_root.bullet" + _root.ht).gunsound = _parent.gunsound;
eval ("_root.bullet" + _root.ht).distance = _parent.gunrange;
setProperty("_root.bullet" + _root.ht, _x , (_parent._x - (math.sin((Math.PI/180) * _rotation) * gunPoint._y)) + _parent.xmove);
setProperty("_root.bullet" + _root.ht, _y , (_parent._y + (math.cos((Math.PI/180) * _rotation) * gunPoint._y)) + _parent.ymove);
setProperty("_root.bullet" + _root.ht, _rotation , _rotation - 180);
_root.ht++;
}
}
}
}
}
}
Instance of Symbol 235 MovieClip "healthglow" in Symbol 247 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_parent.teamcolor);
_xscale = ((_parent.health * 100) / _parent.maxhealth);
_yscale = ((_parent.health * 100) / _parent.maxhealth);
if ((_xscale <= 0) && (_yscale <= 0)) {
_visible = false;
} else {
_visible = true;
}
}
Instance of Symbol 236 MovieClip "bottom" in Symbol 247 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.walls.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.soundManager.playsound2 = "shz";
_parent._y = _parent._y + (_parent.ymove * -2);
_parent.health = _parent.health - (_root.wallimpactdamage * _parent.ymove);
_parent.xmove = 0;
_parent.ymove = (-_parent.ymove) * 1.5;
_parent.AIdown = false;
_parent.AIup = true;
if (_parent.logic == 1) {
_parent.AItime = 25;
}
_root.wallBottom._alpha = 100;
_root.wallBottom2._alpha = 100;
}
}
Instance of Symbol 237 MovieClip "left" in Symbol 247 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.walls.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.soundManager.playsound2 = "shz";
_parent._x = _parent._x + (_parent.xmove * -2);
_parent.health = _parent.health - (_root.wallimpactdamage * (-_parent.xmove));
_parent.xmove = (-_parent.xmove) * 1.5;
_parent.ymove = 0;
_parent.AIleft = false;
_parent.AIright = true;
if (_parent.logic == 1) {
_parent.AItime = 25;
}
_root.wallLeft._alpha = 100;
_root.wallLeft2._alpha = 100;
}
}
Instance of Symbol 238 MovieClip "right" in Symbol 247 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.walls.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.soundManager.playsound2 = "shz";
_parent._x = _parent._x + (_parent.xmove * -2);
_parent.health = _parent.health - (_root.wallimpactdamage * _parent.xmove);
_parent.xmove = (-_parent.xmove) * 1.5;
_parent.ymove = 0;
_parent.AIright = false;
_parent.AIleft = true;
if (_parent.logic == 1) {
_parent.AItime = 25;
}
_root.wallRight._alpha = 100;
_root.wallRight2._alpha = 100;
}
}
Instance of Symbol 239 MovieClip "top" in Symbol 247 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.walls.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.soundManager.playsound2 = "shz";
_parent._y = _parent._y + (_parent.ymove * -2);
_parent.health = _parent.health - (_root.wallimpactdamage * (-_parent.ymove));
_parent.xmove = 0;
_parent.ymove = (-_parent.ymove) * 1.5;
_parent.AIup = false;
_parent.AIdown = true;
if (_parent.logic == 1) {
_parent.AItime = 25;
}
_root.wallTop._alpha = 100;
_root.wallTop2._alpha = 100;
}
}
Instance of Symbol 241 MovieClip in Symbol 247 MovieClip Frame 1
onClipEvent (enterFrame) {
_visible = false;
_rotation = (_rotation + 0.7);
_x = (_parent.gotoX - _parent._x);
_y = (_parent.gotoY - _parent._y);
}
Instance of Symbol 252 MovieClip in Symbol 255 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 23);
}
Instance of Symbol 254 MovieClip in Symbol 255 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 56);
}
Symbol 280 MovieClip Frame 4
removeMovieClip(this);
Symbol 280 MovieClip Frame 7
removeMovieClip(this);
Symbol 280 MovieClip Frame 10
removeMovieClip(this);
Symbol 280 MovieClip Frame 13
removeMovieClip(this);
Symbol 290 Button
on (press) {
_root.gotoAndStop(3);
}
Symbol 293 MovieClip Frame 1
stop();