Frame 1
_accProps = new Object();
_accProps.silent = true;
stopAllSounds();
_root.bytesLoaded = _root.getBytesLoaded();
_root.bytesTotal = _root.getBytesTotal();
_root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
_root.percentLoadedText = _root.percentLoaded + "%";
_root.bar.gotoAndStop(percentLoaded);
Frame 2
if (_root.percentLoaded == 100) {
play();
} else {
gotoAndPlay (1);
}
Frame 3
stop();
Frame 161
System.security.allowDomain("http://h3games.awardspace.com");
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
var GameMode = "None";
ding = new Sound(this);
ding.attachSound("CLINK.mp3");
var speed = 5;
var bulletrandom = true;
var bulletnum = 100;
var Best_time = 0;
var shieldEnabled = true;
var Score1 = 0;
var Score2 = 0;
var Wins = 0;
var Loss = 0;
var BonusUnlocked = false;
var MINI = false;
var SFX = true;
var BGM = 1;
var GT = 0;
var GTList = new Array(4);
_root.createEmptyMovieClip("GT1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("GT2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("GT3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("GT4", _root.getNextHighestDepth());
GTList[0] = new Sound(GT1);
GTList[1] = new Sound(GT3);
GTList[2] = new Sound(GT2);
GTList[3] = new Sound(GT4);
GTList[0].attachSound("GT1.mp3");
GTList[1].attachSound("GT2.mp3");
GTList[2].attachSound("GT3.mp3");
GTList[3].attachSound("GT4.mp3");
_root.createEmptyMovieClip("BGMMC", _root.getNextHighestDepth());
var BG = new Sound(BGMMC);
BG.attachSound("BGM1.mp3");
BG.start(0, 99999);
Frame 162
var alive = true;
var alive2 = true;
var shieldOn = false;
var shieldOn2 = false;
var BarReady = true;
var BarReady2 = true;
if (BonusUnlocked) {
bonusbutton._visible = true;
} else {
bonusbutton._visible = false;
}
function ShieldBar() {
if (alive) {
if (!shieldOn) {
if (BarReady) {
if (Key.isDown(16)) {
this.nextFrame();
this.nextFrame();
this.nextFrame();
this.nextFrame();
}
if (!Key.isDown(16)) {
if (this._currentframe > 26) {
this.prevFrame();
}
}
} else {
this.prevFrame();
}
} else if (!BarReady) {
this.prevFrame();
}
}
}
function Move() {
if (alive) {
if (Key.isDown(37)) {
if ((this._x > 14) && (!player2.hitTest(this._x - 12, this._y))) {
this._x = this._x - 5;
this.gotoAndStop(3);
}
if (player2.hitTest(this._x - 12, this._y) && (player2._x > 12)) {
player2._x = player2._x - 1;
}
}
if (Key.isDown(39)) {
if ((this._x < 536) && (!player2.hitTest(this._x + 12, this._y))) {
this._x = this._x + 5;
this.gotoAndStop(2);
}
if (player2.hitTest(this._x + 12, this._y) && (player2._x < 541)) {
player2._x = player2._x + 1;
}
}
if (Key.isDown(38)) {
if ((this._y > 14) && (!player2.hitTest(this._x, this._y - 12))) {
this._y = this._y - 5;
}
if (player2.hitTest(this._x, this._y - 12) && (player2._y > 14)) {
player2._y = player2._y - 1;
}
}
if (Key.isDown(40)) {
if ((this._y < 389) && (!player2.hitTest(this._x, this._y + 12))) {
this._y = this._y + 5;
}
if (player2.hitTest(this._x, this._y + 12) && (player2._y < 389)) {
player2._y = player2._y + 1;
}
}
} else {
_root.player.gotoAndStop(4);
}
}
function Giga() {
this._x = _root.player._x;
this._y = _root.player._y;
if (_root.shieldOn) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
function Charged() {
this._x = _root.player._x;
this._y = _root.player._y;
}
stop();
Time_Start = getTimer();
watchKeyBoard = new Object();
watchKeyBoard.onKeyUp = function () {
if (_root.alive) {
player.gotoAndStop(1);
}
if (_root.alive2) {
player2.gotoAndStop(1);
}
};
Key.addListener(watchKeyBoard);
lines.onEnterFrame = Charged;
charger.onEnterFrame = ShieldBar;
player.onEnterFrame = Move;
giga.onEnterFrame = Giga;
stop();
Frame 190
alive = true;
shieldOn = false;
BarReady = true;
speed = 5;
var Time_Start = 0;
var Time_End = 0;
var Survival_time = 0;
GameMode = "HS";
stop();
if (Wins > 49) {
mini_secret._visible = true;
} else {
mini_secret._visible = false;
}
_root.scoretable.filename = "scores.sco";
_root.scoretable.scoresize = 10;
_root.scoretable.action = "VIEW";
_root.scoretable.viewtype = "FLASH";
url = "http://h3games.awardspace.com/scores.php?cachebuster=" + new Date().getTime();
_root.scoretable.loadVariables(url, "GET");
Frame 191
stop();
Time_Start = getTimer();
if (MINI) {
player._xscale = 45;
player._yscale = 45;
} else {
player._xscale = 60;
player._yscale = 60;
}
lines.onEnterFrame = Charged;
charger.onEnterFrame = ShieldBar;
player.onEnterFrame = Move;
giga.onEnterFrame = Giga;
function bulletpath() {
TX = this.gettarget_x();
TY = this.gettarget_y();
if (_root.player.hitTest(this._x, this._y)) {
if ((!shieldOn) && (_root.alive)) {
_root.alive = false;
Time_End = getTimer();
}
} else if (_root.giga.hitTest(this._x, this._y) && (!this.getreversed())) {
_root.giga.Sflash.gotoAndPlay(2);
if (SFX) {
ding.start(0, 1);
}
this.reversepath();
} else if ((((this._x > 560) || (this._y > 410)) || (this._x < -20)) || (this._y < -20)) {
this.reset(_root.player._x, _root.player._y);
this._x = this.getx();
this._y = this.gety();
}
X = this.getx();
Y = this.gety();
if (alive) {
if (((TX >= X) && (TY >= Y)) || ((TX >= X) && (TY <= Y))) {
this._x = this._x + this.getpath_x();
this._y = this._y - this.getpath_y();
} else if (((TX <= X) && (TY >= Y)) || ((TX <= X) && (TY <= Y))) {
this._x = this._x - this.getpath_x();
this._y = this._y + this.getpath_y();
}
}
}
var bulletArray = Array();
i = 0;
while (i < 100) {
bulletArray.push(this.attachMovie("bullet", "b" + i, this.getNextHighestDepth()));
bulletArray[i].setpath(this.player._x, this.player._y);
bulletArray[i].onEnterFrame = bulletpath;
bulletArray[i]._x = bulletArray[i].getx();
bulletArray[i]._y = bulletArray[i].gety();
i++;
}
Frame 192
stop();
Survival_time = (Time_End - Time_Start) / 1000;
if ((Survival_time > 20) && (BonusUnlocked == false)) {
BonusUnlocked = true;
}
i = 0;
while (i < 100) {
bulletArray[i].removeMovieClip();
i++;
}
Frame 210
alive = true;
shieldOn = false;
BarReady = true;
var Time_Start = 0;
var Time_End = 0;
var Survival_time = 0;
GameMode = "Custom";
function BulletOption() {
if (_root.bulletrandom) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
function ShieldOption() {
if (_root.shieldEnabled) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
function BulletnumOption() {
switch (_root.bulletnum) {
case 25 :
this.gotoAndStop(1);
break;
case 50 :
this.gotoAndStop(2);
break;
case 100 :
this.gotoAndStop(3);
break;
case 200 :
this.gotoAndStop(4);
}
}
function SpeedOption() {
switch (_root.speed) {
case 3 :
this.gotoAndStop(1);
break;
case 5 :
this.gotoAndStop(2);
break;
case 8 :
this.gotoAndStop(3);
}
}
shield_option.onEnterFrame = ShieldOption;
speed_option.onEnterFrame = SpeedOption;
bullet_option.onEnterFrame = BulletOption;
bulletnum_option.onEnterFrame = BulletnumOption;
stop();
Frame 211
function Move() {
if (alive) {
if (Key.isDown(37)) {
if (this._x > 14) {
this._x = this._x - speed;
this.gotoAndStop(3);
}
}
if (Key.isDown(39)) {
if (this._x < 536) {
this._x = this._x + speed;
this.gotoAndStop(2);
}
}
if (Key.isDown(38)) {
if (this._y > 14) {
this._y = this._y - speed;
}
}
if (Key.isDown(40)) {
if (this._y < 389) {
this._y = this._y + speed;
}
}
} else {
_root.player.gotoAndStop(4);
}
}
stop();
Time_Start = getTimer();
if (shieldEnabled) {
lines.onEnterFrame = Charged;
charger.onEnterFrame = ShieldBar;
giga.onEnterFrame = Giga;
} else {
lines._visible = false;
charger._visible = false;
giga._visible = false;
}
player.onEnterFrame = Move;
function bulletpath() {
TX = this.gettarget_x();
TY = this.gettarget_y();
if (_root.player.hitTest(this._x, this._y)) {
if ((!shieldOn) && (_root.alive)) {
_root.alive = false;
Time_End = getTimer();
}
} else if (_root.giga.hitTest(this._x, this._y) && (!this.getreversed())) {
_root.giga.Sflash.gotoAndPlay(2);
if (SFX) {
ding.start(0, 1);
}
this.reversepath();
} else if ((((this._x > 560) || (this._y > 410)) || (this._x < -20)) || (this._y < -20)) {
this.reset(_root.player._x, _root.player._y);
this._x = this.getx();
this._y = this.gety();
}
X = this.getx();
Y = this.gety();
if (alive) {
if (((TX >= X) && (TY >= Y)) || ((TX >= X) && (TY <= Y))) {
this._x = this._x + this.getpath_x();
this._y = this._y - this.getpath_y();
} else if (((TX <= X) && (TY >= Y)) || ((TX <= X) && (TY <= Y))) {
this._x = this._x - this.getpath_x();
this._y = this._y + this.getpath_y();
}
}
}
var bulletArray = Array();
i = 0;
while (i < bulletnum) {
bulletArray.push(this.attachMovie("bullet", "b" + i, this.getNextHighestDepth()));
bulletArray[i].setRandomspeed(bulletrandom);
bulletArray[i].setpath(this.player._x, this.player._y);
bulletArray[i].onEnterFrame = bulletpath;
bulletArray[i]._x = bulletArray[i].getx();
bulletArray[i]._y = bulletArray[i].gety();
i++;
}
Frame 212
stop();
Survival_time = (Time_End - Time_Start) / 1000;
if (Survival_time > Best_time) {
Best_time = Survival_time;
}
stats.text = (("Survival Time: " + Survival_time) + " seconds") + newline;
stats.text = stats.text + ((" Best: " + Best_time) + " seconds");
i = 0;
while (i < bulletnum) {
bulletArray[i].removeMovieClip();
i++;
}
Frame 230
alive = true;
alive2 = true;
shieldOn = false;
BarReady = true;
shieldOn2 = false;
BarReady2 = true;
speed = 5;
GameMode = "TP";
stop();
function ShieldBar2() {
if (alive2) {
if (!shieldOn2) {
if (BarReady2) {
if (Key.isDown(71)) {
this.nextFrame();
this.nextFrame();
this.nextFrame();
this.nextFrame();
}
if (!Key.isDown(71)) {
if (this._currentframe > 26) {
this.prevFrame();
}
}
} else {
this.prevFrame();
}
} else if (!BarReady2) {
this.prevFrame();
}
}
}
function Move2() {
if (alive2) {
if (Key.isDown(65)) {
if ((this._x > 14) && (!player.hitTest(this._x - 12, this._y))) {
this._x = this._x - 5;
this.gotoAndStop(3);
}
if (player.hitTest(this._x - 12, this._y) && (player._x > 12)) {
player._x = player._x - 1;
}
}
if (Key.isDown(68)) {
if ((this._x < 536) && (!player.hitTest(this._x + 12, this._y))) {
this._x = this._x + 5;
this.gotoAndStop(2);
}
if (player.hitTest(this._x + 12, this._y) && (player._x < 541)) {
player._x = player._x + 1;
}
}
if (Key.isDown(87)) {
if ((this._y > 14) && (!player.hitTest(this._x, this._y - 12))) {
this._y = this._y - 5;
}
if (player.hitTest(this._x, this._y - 12) && (player._y > 14)) {
player._y = player._y - 1;
}
}
if (Key.isDown(83)) {
if ((this._y < 389) && (!player.hitTest(this._x, this._y + 12))) {
this._y = this._y + 5;
}
if (player.hitTest(this._x, this._y + 12) && (player._y < 389)) {
player._y = player._y + 1;
}
}
} else {
_root.player2.gotoAndStop(4);
}
}
function Giga2() {
this._x = _root.player2._x;
this._y = _root.player2._y;
if (_root.shieldOn2) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
function Charged2() {
this._x = _root.player2._x;
this._y = _root.player2._y;
}
stop();
Time_Start = getTimer();
lines.onEnterFrame = Charged;
lines2.onEnterFrame = Charged2;
charger.onEnterFrame = ShieldBar;
charger2.onEnterFrame = ShieldBar2;
player.onEnterFrame = Move;
player2.onEnterFrame = Move2;
giga.onEnterFrame = Giga;
giga2.onEnterFrame = Giga2;
Frame 231
function refill() {
bulletArray.push(this.attachMovie("bullet", h++, this.getNextHighestDepth()));
i = bulletArray.length - 1;
bulletArray[i].setForTwo();
bulletArray[i].onEnterFrame = bulletpath2;
bulletArray[i]._x = bulletArray[i].getx();
bulletArray[i]._y = bulletArray[i].gety();
}
function bulletpath2() {
TX = this.gettarget_x();
TY = this.gettarget_y();
if (_root.player.hitTest(this._x, this._y)) {
if ((!shieldOn) && (_root.alive)) {
_root.alive = false;
Time_End = getTimer();
}
} else if (_root.player2.hitTest(this._x, this._y)) {
if ((!shieldOn2) && (_root.alive2)) {
_root.alive2 = false;
Time_End = getTimer();
}
} else if (_root.giga.hitTest(this._x, this._y) || (_root.giga2.hitTest(this._x, this._y))) {
if (_root.giga.hitTest(this._x, this._y) && (this.COLOR != "Red")) {
_root.giga.Sflash.gotoAndPlay(2);
this.targetPlayer(_root.player2._x, _root.player2._y, 1);
if (SFX) {
ding.start(0, 1);
}
} else if (_root.giga2.hitTest(this._x, this._y) && (this.COLOR != "Blue")) {
_root.giga2.Sflash.gotoAndPlay(2);
this.targetPlayer(_root.player._x, _root.player._y, 2);
if (SFX) {
ding.start(0, 1);
}
}
} else if ((((this._x > 560) || (this._y > 410)) || (this._x < -20)) || (this._y < -20)) {
refill();
this.removeMovieClip();
}
X = this.getx();
Y = this.gety();
if (alive && (alive2)) {
if (this.reversed) {
if (((TX >= X) && (TY >= Y)) || ((TX >= X) && (TY <= Y))) {
this._x = this._x + this.getpath_x();
this._y = this._y - this.getpath_y();
} else if (((TX <= X) && (TY >= Y)) || ((TX <= X) && (TY <= Y))) {
this._x = this._x - this.getpath_x();
this._y = this._y + this.getpath_y();
}
} else {
this._y = this._y + this.getpath_y();
}
}
}
var bulletArray = Array();
i = 0;
while (i < 50) {
bulletArray.push(this.attachMovie("bullet", "b" + i, this.getNextHighestDepth()));
bulletArray[i].setForTwo();
bulletArray[i].onEnterFrame = bulletpath2;
bulletArray[i]._x = bulletArray[i].getx();
bulletArray[i]._y = bulletArray[i].gety();
i++;
}
Frame 232
i = 0;
while (i < bulletArray.length) {
bulletArray[i].removeMovieClip();
i++;
}
if (alive) {
this.stats.text = "Player 1 wins!!";
Score1++;
} else if (alive2) {
this.stats.text = "Player 2 wins!!";
Score2++;
} else {
this.stats.text = "DRAW!!";
}
Frame 250
stop();
score.text = (Wins + ":") + Loss;
Frame 252
var v = new Sound();
v.attachSound("Decision2.wav");
var Current_Number = 0;
var Current_Dice = 0;
var Player_Number = 0;
var Player_Dice = 0;
var CompsTurn = false;
var OneCalled = false;
var BSCalled = false;
var PlayerHand = Array();
var CompHand = Array();
function wildcard() {
if (_root.OneCalled) {
oneinfo.info.text = "NOT wildcard";
} else {
oneinfo.info.text = "is wildcard";
}
}
i = 0;
while (i < 5) {
PlayerHand[i] = random(6) + 1;
CompHand[i] = random(6) + 1;
i++;
}
oneinfo.onEnterFrame = wildcard;
var Computer = new AI(CompHand);
trace(CompHand);
CurrentPanel.gotoAndStop(1);
score.text = (Wins + ":") + Loss;
Frame 341
stop();
Frame 351
Player_Number = 0;
Player_Dice = 0;
CompsTurn = false;
Frame 352
stop();
Dice_Display.onEnterFrame = function () {
this.gotoAndStop(Player_Dice + 1);
};
TD.gotoAndPlay(1);
Frame 371
CompsTurn = true;
comptext.text = "Computer thinks...";
TD.gotoAndPlay(1);
controlpanel.gotoAndStop(2);
Frame 382
var temp = Computer.getHand();
var i = 2;
while (i < 7) {
if (_root.Current_Number <= temp[i]) {
trace("Skipping BS");
gotoAndPlay (408);
break;
}
i++;
}
Frame 392
if (Computer.CallBS(_root.Current_Number, _root.Current_Dice, OneCalled)) {
comptext.text = "Comp calls BS!";
gotoAndPlay ("Bullshit");
}
Frame 408
Computer.CalculateCall(_root.Current_Number, _root.Current_Dice, OneCalled);
Current_Number = Computer.getNum();
Current_Dice = Computer.getDice();
v.start();
if (Current_Dice == 1) {
OneCalled = true;
}
Frame 420
comptext.text = "Computer Called";
gotoAndPlay ("player_turn");
Frame 421
var FinalNumber = 0;
BSCalled = true;
CurrentPanel.gotoAndStop(2);
controlpanel.gotoAndStop(2);
var buzz = new Sound();
buzz.attachSound("buzzer1.wav");
buzz.start();
Frame 436
compcup.play();
stop();
Frame 466
FCDP.onEnterFrame = function () {
this.gotoAndStop(_root.Current_Dice + 1);
};
j = Current_Dice;
v.start();
i = 0;
while (i < 5) {
if (!OneCalled) {
if ((CompHand[i] == j) || (CompHand[i] == 1)) {
FinalNumber++;
}
if ((PlayerHand[i] == j) || (PlayerHand[i] == 1)) {
FinalNumber++;
}
} else {
if (CompHand[i] == j) {
FinalNumber++;
}
if (PlayerHand[i] == j) {
FinalNumber++;
}
}
i++;
}
Frame 486
v.start();
if (CompsTurn) {
if (Current_Number <= FinalNumber) {
brief.text = "Your call was correct!\r\r YOU WIN";
Wins++;
} else {
brief.text = "Your call was BS!\r\r YOU LOSE";
Loss++;
}
} else if (Current_Number <= FinalNumber) {
brief.text = "Computer's call was correct!\r\r YOU LOSE";
Loss++;
} else {
brief.text = "Computer's call was BS!\r\r YOU WIN";
Wins++;
}
stop();
Symbol 29 MovieClip [bullet] Frame 1
#initclip 3
Object.registerClass("bullet", Bullet);
#endinitclip
stop();
Symbol 31 Button
on (release) {
_root.Player_Dice = this.Dice;
}
Symbol 33 MovieClip [six] Frame 1
Dice = 6;
stop();
Symbol 34 Button
on (release) {
_root.Player_Dice = this.Dice;
}
Symbol 36 MovieClip [five] Frame 1
Dice = 5;
stop();
Symbol 37 Button
on (release) {
_root.Player_Dice = this.Dice;
}
Symbol 39 MovieClip [four] Frame 1
Dice = 4;
stop();
Symbol 40 Button
on (release) {
_root.Player_Dice = this.Dice;
}
Symbol 42 MovieClip [three] Frame 1
stop();
Dice = 3;
Symbol 43 Button
on (release) {
_root.Player_Dice = this.Dice;
}
Symbol 45 MovieClip [two] Frame 1
stop();
Dice = 2;
Symbol 46 Button
on (release) {
_root.Player_Dice = this.Dice;
}
Symbol 48 MovieClip [one] Frame 1
stop();
Dice = 1;
Symbol 82 MovieClip [plane_explode] Frame 1
boom = new Sound();
boom.attachSound("Explsion.wav");
if (_root.SFX) {
boom.start(0, 1);
}
Symbol 82 MovieClip [plane_explode] Frame 6
trace(_root.GameMode);
_root.gotoAndStop(_root.GameMode);
stop();
Symbol 84 MovieClip Frame 5
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 4
stop();
Symbol 87 MovieClip [shield] Frame 1
stop();
Symbol 87 MovieClip [shield] Frame 2
buzz = new Sound(this);
buzz.attachSound("BUZZ.wav");
if (_root.SFX) {
buzz.start(0, 1);
}
stop();
Symbol 454 MovieClip [__Packages.Bullet] Frame 0
class Bullet extends MovieClip
{
var speed, x_start, y_start, reversed, COLOR, target_x, target_y, path_x, path_y, RandomSpeed, _x, _y, gotoAndStop;
function Bullet () {
super();
speed = random(4) + 3;
var _local3 = random(2);
if (_local3 == 1) {
x_start = random(550);
y_start = thisorthat(-10, 400);
} else {
x_start = thisorthat(-10, 550);
y_start = random(400);
}
reversed = false;
COLOR = "None";
}
function setForTwo() {
reversed = false;
x_start = random(550);
y_start = 0;
target_x = x_start;
target_y = y_start + 410;
path_x = 0;
path_y = speed;
COLOR = "None";
}
function setpath(TX, TY) {
target_x = TX;
target_y = TY;
var _local4 = TX - x_start;
var _local3 = y_start - TY;
var _local2 = Math.atan(_local3 / _local4);
path_x = speed * Math.cos(_local2);
path_y = speed * Math.sin(_local2);
COLOR = "None";
}
function getx() {
return(x_start);
}
function gety() {
return(y_start);
}
function getpath_x() {
return(path_x);
}
function getpath_y() {
return(path_y);
}
function gettarget_x() {
return(target_x);
}
function gettarget_y() {
return(target_y);
}
function getreversed() {
return(reversed);
}
function reset(TX, TY) {
if (RandomSpeed) {
speed = random(4) + 3;
} else {
speed = 4;
}
var _local2 = random(2);
if (_local2 == 1) {
x_start = random(550);
y_start = thisorthat(-10, 400);
} else {
x_start = thisorthat(-10, 550);
y_start = random(400);
}
setpath(TX, TY);
reversed = false;
COLOR = "None";
}
function thisorthat(X, Y) {
var _local1 = random(2);
if (_local1 == 1) {
return(X);
}
return(Y);
}
function reversepath() {
path_x = (-path_x) * 2;
path_y = (-path_y) * 2;
reversed = true;
}
function targetPlayer(X, Y, Z) {
speed = speed + 2;
reversed = true;
x_start = _x;
y_start = _y;
setpath(X, Y);
if (Z == 1) {
COLOR = "Red";
gotoAndStop(2);
} else {
COLOR = "Blue";
gotoAndStop(3);
}
}
function setRandomspeed(X) {
RandomSpeed = X;
if (X) {
speed = random(4) + 3;
} else {
speed = 4;
}
}
}
Symbol 455 MovieClip [__Packages.AI] Frame 0
class AI
{
var CallNum, CallDice, FirstCall;
function AI (CompHand) {
var _local2 = 0;
while (_local2 < 7) {
Hand[_local2] = 0;
_local2++;
}
_local2 = 0;
while (_local2 < 5) {
switch (CompHand[_local2]) {
case 1 :
Hand[1]++;
break;
case 2 :
Hand[2]++;
break;
case 3 :
Hand[3]++;
break;
case 4 :
Hand[4]++;
break;
case 5 :
Hand[5]++;
break;
case 6 :
Hand[6]++;
}
_local2++;
}
CallNum = 0;
CallDice = 0;
FirstCall = true;
PreviousDiceCalls.push(0);
}
function getHand() {
return(Hand);
}
function CallBS(num, dice, onecalled) {
var _local5 = Hand[dice];
if (!onecalled) {
_local5 = _local5 + Hand[1];
}
PreviousDiceCalls.push(dice);
var _local2 = PreviousDiceCalls.length - 1;
var _local3 = 0;
while (PreviousDiceCalls[_local2] != 0) {
if (PreviousDiceCalls[_local2] == dice) {
_local3++;
}
_local2--;
}
trace("DECIDING FOR BS");
var _local6 = num - _local5;
if (_local6 <= 1) {
trace("Difference only 1 or less, noBS ");
return(false);
}
if (_local6 > 4) {
trace("Too much Difference, BS!");
return(true);
}
switch (_local6) {
case 2 :
trace("Difference = 2");
_local2 = random(6);
trace(_local2);
if (_local2 == 3) {
trace("taking chance, call BS");
return(true);
}
trace("no BS");
return(false);
case 3 :
trace("Difference = 3");
if (_local3 > 1) {
trace("player called number more than once, no BS");
return(false);
}
trace("BS!");
return(true);
case 4 :
trace("Difference = 4");
_local2 = random(6);
trace(_local2);
if (_local2 == 3) {
trace("taking chance, no BS");
return(false);
}
trace("BS!");
return(true);
}
}
function CalculateCall(num, dice, onecalled) {
var _local5 = 0;
var _local3 = 0;
var _local6 = 0;
var _local4 = 6;
var _local8 = Array();
var _local7 = Array();
var _local2 = 2;
while (_local2 < 7) {
if (Hand[_local2] > _local3) {
_local5 = _local2;
_local3 = Hand[_local2];
}
if (Hand[_local2] == 0) {
_local8.push(_local2);
} else if (Hand[_local2] < _local4) {
_local6 = _local2;
_local4 = Hand[_local2];
}
_local2++;
}
if (num == 0) {
_local2 = random(3);
trace(_local2);
if ((Hand[1] <= 2) && (random(3) == 0)) {
CallNum = 2;
CallDice = 1;
} else {
switch (_local2) {
case 0 :
trace("First Call...Calling min");
_local2 = random(Hand[1] + _local4) + 1;
if (_local2 < 2) {
_local2 = 2;
}
CallNum = _local2;
CallDice = _local6;
break;
case 1 :
trace("First Call...Calling max");
_local2 = random(Hand[1] + _local3) + 1;
if (_local2 < 2) {
_local2 = 2;
}
CallNum = _local2;
CallDice = _local5;
break;
case 2 :
trace("First Call...Bluffing");
CallNum = random(2) + 2;
_local2 = _local8.length;
if (_local2 == 0) {
CallDice = random(6) + 1;
} else {
CallDice = _local8[random(_local2)];
}
}
}
} else {
var _local11 = Hand[dice];
if (!onecalled) {
_local11 = _local11 + Hand[1];
_local3 = _local3 + Hand[1];
_local4 = _local4 + Hand[1];
}
var _local12 = num - _local11;
_local2 = random(3);
switch (_local2) {
case 0 :
trace("BLUFFING");
CallNum = num + 1;
CallDice = dice;
break;
case 1 :
case 2 :
if ((_local4 >= num) && (_local6 > dice)) {
trace("Safe calling min");
CallNum = _local4 + random(2);
CallDice = _local6;
} else if ((_local3 >= num) && (_local5 > dice)) {
trace("Safe calling max");
CallNum = _local3 + random(2);
CallDice = _local5;
} else if ((_local12 < 3) && (Hand[1] > 0)) {
_local2 = 2;
while (_local2 < 7) {
if (Hand[_local2] > 0) {
_local7.push(_local2);
}
_local2++;
}
_local2 = _local7.length;
trace("Risky calling....ANY on hand");
CallDice = _local7[random(_local2)];
if (CallDice <= dice) {
CallNum = num + 1;
} else {
CallNum = num;
}
} else {
trace("Safe bet calling....MOST on hand");
CallDice = _local5;
if (CallDice <= dice) {
CallNum = num + 1;
} else {
CallNum = num;
}
}
}
}
}
function getNum() {
return(CallNum);
}
function getDice() {
return(CallDice);
}
function gethand() {
return(Hand);
}
var Hand = Array(7);
var PreviousDiceCalls = Array();
}
Symbol 105 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 112 MovieClip Frame 81
_root.play();
_root.play();
Symbol 119 MovieClip Frame 48
stop();
Symbol 121 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 1
_root.BarReady = true;
_root.lines.play();
this.shield_info.text = "READY";
gotoAndStop (26);
Symbol 124 MovieClip Frame 25
_root.shieldOn = false;
this.shield_info.text = "RECHARGING";
Symbol 124 MovieClip Frame 50
_root.shieldOn = true;
_root.BarReady = false;
this.shield_info.text = "ACTIVATED";
Symbol 128 MovieClip Frame 7
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 131 Button
on (release) {
if (_currentframe != 5) {
gotoAndStop (5);
_root.BG.stop();
_root.BGM = _currentframe;
}
}
Symbol 132 Button
on (release) {
if (_currentframe != 4) {
gotoAndStop (4);
_root.BG.stop();
_root.BG.attachSound("Canon.mp3");
_root.BG.start(0, 99999);
_root.BGM = _currentframe;
}
}
Symbol 133 Button
on (release) {
if (_currentframe != 3) {
gotoAndStop (3);
_root.BG.stop();
_root.BG.attachSound("BGM3.mp3");
_root.BG.start(0, 99999);
_root.BGM = _currentframe;
}
}
Symbol 134 Button
on (release) {
if (_currentframe != 2) {
gotoAndStop (2);
_root.BG.stop();
_root.BG.attachSound("BGM2.mp3");
_root.BG.start(0, 99999);
_root.BGM = _currentframe;
}
}
Symbol 135 Button
on (release) {
if (_currentframe != 1) {
gotoAndStop (1);
_root.BG.stop();
_root.BG.attachSound("BGM1.mp3");
_root.BG.start(0, 99999);
_root.BGM = _currentframe;
}
}
Symbol 141 MovieClip Frame 1
gotoAndStop(_root.BGM);
Symbol 145 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 149 Button
on (release) {
gotoAndStop (250);
}
Symbol 172 Button
on (release) {
gotoAndStop (230);
}
Symbol 176 Button
on (release) {
gotoAndStop ("Custom Mode");
}
Symbol 187 Button
on (release) {
gotoAndStop ("High Score Mode");
}
Symbol 189 Button
on (keyPress "<Space>") {
if (GT < 4) {
BG.setVolume(0);
GTList[GT].start(0, 99999);
}
nextFrame();
}
Symbol 190 Button
on (release) {
if (_currentframe != 5) {
gotoAndStop (5);
_root.GT = 4;
}
}
Symbol 191 Button
on (release) {
if (_currentframe != 4) {
gotoAndStop (4);
_root.GT = 3;
}
}
Symbol 192 Button
on (release) {
if (_currentframe != 3) {
gotoAndStop (3);
_root.GT = 2;
}
}
Symbol 193 Button
on (release) {
if (_currentframe != 2) {
gotoAndStop (2);
_root.GT = 1;
}
}
Symbol 194 Button
on (release) {
if (_currentframe != 1) {
gotoAndStop (1);
_root.GT = 0;
}
}
Symbol 201 MovieClip Frame 1
gotoAndStop(_root.GT + 1);
Symbol 203 Button
on (release) {
if (_root.MINI == false) {
_root.MINI = true;
nextFrame();
} else {
_root.MINI = false;
prevFrame();
}
}
Symbol 206 MovieClip Frame 1
if (_root.MINI) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
Symbol 210 Button
on (release) {
gotoAndStop (162);
}
Symbol 213 Button
on (keyPress "<Space>") {
if (GT < 4) {
GTList[GT].stop();
BG.setVolume(100);
}
gotoAndStop (190);
}
Symbol 225 Button
on (release) {
filename = "scores.sco";
scoresize = 10;
action = "INSERT";
viewtype = "FLASH";
winname = this.namefield.text;
winscore = _root.Survival_time;
url = "http://h3games.awardspace.com/scores.php?cachebuster=" + new Date().getTime();
this.loadVariables(url, "GET");
play();
}
Symbol 228 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 10
if (_root.GT < 4) {
_root.GTList[_root.GT].stop();
_root.BG.setVolume(100);
}
_root.gotoAndStop("High Score Mode");
Symbol 231 MovieClip Frame 1
this.result.text = ("Survival Time: " + _root.Survival_time) + " seconds";
filename = "scores.sco";
scoresize = 10;
action = "VIEW";
viewtype = "FLASH";
SCORE9 = 0;
this.loadVariables("http://h3games.awardspace.com/scores.php?cachebuster=" + new Date().getTime(), "GET");
Symbol 231 MovieClip Frame 2
if (SCORE9 != 0) {
if (SCORE9 > _root.Survival_time) {
gotoAndStop (4);
} else {
gotoAndStop (5);
}
}
Symbol 231 MovieClip Frame 3
gotoAndPlay (2);
Symbol 231 MovieClip Frame 4
SCORE9 = 0;
Symbol 231 MovieClip Frame 5
SCORE9 = 0;
_root.restartHS._visible = false;
Symbol 232 Button
on (release) {
_root.shieldEnabled = false;
}
Symbol 233 Button
on (release) {
_root.shieldEnabled = true;
}
Symbol 243 MovieClip Frame 1
stop();
Symbol 244 Button
on (release) {
_root.bulletnum = 200;
}
Symbol 245 Button
on (release) {
_root.bulletnum = 100;
}
Symbol 246 Button
on (release) {
_root.bulletnum = 50;
}
Symbol 247 Button
on (release) {
_root.bulletnum = 25;
}
Symbol 257 MovieClip Frame 1
stop();
Symbol 258 Button
on (release) {
_root.bulletrandom = false;
}
Symbol 259 Button
on (release) {
_root.bulletrandom = true;
}
Symbol 286 MovieClip Frame 1
stop();
Symbol 287 Button
on (release) {
_root.speed = 3;
}
Symbol 288 Button
on (release) {
_root.speed = 5;
}
Symbol 289 Button
on (release) {
_root.speed = 8;
}
Symbol 302 MovieClip Frame 1
stop();
Symbol 303 Button
on (keyPress "<Space>") {
if (_root.GT < 4) {
_root.BG.setVolume(0);
_root.GTList[_root.GT].start(0, 99999);
}
nextFrame();
}
Symbol 306 MovieClip Frame 1
stop();
Symbol 307 Button
on (keyPress "<Space>") {
if (_root.GT < 4) {
_root.GTList[_root.GT].stop();
_root.BG.setVolume(100);
}
gotoAndStop (210);
}
Symbol 308 Button
on (release) {
Best_time = 0;
stats.text = (("Survival Time: " + Survival_time) + " seconds") + newline;
stats.text = stats.text + ((" Best: " + Best_time) + " seconds");
}
Symbol 316 MovieClip Frame 1
_root.BarReady2 = true;
_root.lines2.play();
this.shield_info.text = "READY";
gotoAndStop (26);
Symbol 316 MovieClip Frame 25
_root.shieldOn2 = false;
this.shield_info.text = "RECHARGING";
Symbol 316 MovieClip Frame 50
_root.shieldOn2 = true;
_root.BarReady2 = false;
this.shield_info.text = "ACTIVATED";
Symbol 317 Button
on (keyPress "<Space>") {
if (_root.GT < 4) {
_root.GTList[_root.GT].stop();
_root.BG.setVolume(100);
}
gotoAndStop (230);
}
Symbol 326 Button
on (release) {
nextFrame();
}
Symbol 333 Button
on (release) {
gotoAndPlay (252);
}
Symbol 334 Button
on (release) {
getURL ("http://www.newgrounds.com/portal/view/324113", "_blank");
}
Symbol 343 Button
on (release) {
gotoAndStop (250);
}
Symbol 346 MovieClip Frame 62
stop();
Symbol 346 MovieClip Frame 94
_root.play();
Symbol 346 MovieClip Frame 115
stop();
Symbol 347 MovieClip Frame 1
stop();
Symbol 356 MovieClip Frame 1
CDP.onEnterFrame = function () {
this.gotoAndStop(_root.Current_Dice + 1);
};
stop();
Symbol 358 MovieClip Frame 1
var DiceArray = Array();
i = 0;
while (i < 5) {
if (_root.CompHand[i] == 1) {
DiceArray[i] = this.attachMovie("onegraphic", "dice" + i, this.getNextHighestDepth());
} else if (_root.CompHand[i] == 2) {
DiceArray[i] = this.attachMovie("twographic", "dice" + i, this.getNextHighestDepth());
} else if (_root.CompHand[i] == 3) {
DiceArray[i] = this.attachMovie("threegraphic", "dice" + i, this.getNextHighestDepth());
} else if (_root.CompHand[i] == 4) {
DiceArray[i] = this.attachMovie("fourgraphic", "dice" + i, this.getNextHighestDepth());
} else if (_root.CompHand[i] == 5) {
DiceArray[i] = this.attachMovie("fivegraphic", "dice" + i, this.getNextHighestDepth());
} else if (_root.CompHand[i] == 6) {
DiceArray[i] = this.attachMovie("sixgraphic", "dice" + i, this.getNextHighestDepth());
}
DiceArray[i]._width = (DiceArray[i]._height = 31);
i++;
}
DiceArray[0]._x = 0;
DiceArray[0]._y = 0;
DiceArray[1]._x = 0;
DiceArray[1]._y = -35;
DiceArray[2]._x = 0;
DiceArray[2]._y = 35;
DiceArray[3]._x = 35;
DiceArray[3]._y = 0;
DiceArray[4]._x = -35;
DiceArray[4]._y = 0;
Symbol 359 MovieClip Frame 1
var DiceArray = Array();
i = 0;
while (i < 5) {
if (_root.PlayerHand[i] == 1) {
DiceArray[i] = this.attachMovie("onegraphic", "dice" + i, this.getNextHighestDepth());
} else if (_root.PlayerHand[i] == 2) {
DiceArray[i] = this.attachMovie("twographic", "dice" + i, this.getNextHighestDepth());
} else if (_root.PlayerHand[i] == 3) {
DiceArray[i] = this.attachMovie("threegraphic", "dice" + i, this.getNextHighestDepth());
} else if (_root.PlayerHand[i] == 4) {
DiceArray[i] = this.attachMovie("fourgraphic", "dice" + i, this.getNextHighestDepth());
} else if (_root.PlayerHand[i] == 5) {
DiceArray[i] = this.attachMovie("fivegraphic", "dice" + i, this.getNextHighestDepth());
} else if (_root.PlayerHand[i] == 6) {
DiceArray[i] = this.attachMovie("sixgraphic", "dice" + i, this.getNextHighestDepth());
}
DiceArray[i]._width = (DiceArray[i]._height = 31);
i++;
}
DiceArray[0]._x = 0;
DiceArray[0]._y = 0;
DiceArray[1]._x = 0;
DiceArray[1]._y = -35;
DiceArray[2]._x = 0;
DiceArray[2]._y = 35;
DiceArray[3]._x = 35;
DiceArray[3]._y = 0;
DiceArray[4]._x = -35;
DiceArray[4]._y = 0;
Symbol 364 Button
on (release) {
_root.gotoAndPlay("comp_turn");
}
Symbol 369 Button
on (release) {
i = random(2);
if (i == 0) {
_root.gotoAndPlay("player_turn");
} else {
_root.gotoAndPlay("comp_turn");
}
}
Symbol 373 Button
on (release) {
_root.gotoAndPlay("player_turn");
}
Symbol 380 MovieClip Frame 30
stop();
Symbol 383 MovieClip Frame 30
stop();
Symbol 384 MovieClip Frame 1
if (_root.CompsTurn) {
gotoAndStop (3);
} else {
gotoAndStop (2);
}
Symbol 393 Button
on (release) {
_root.Player_Number = Value;
_root.Player_Dice = 0;
}
Symbol 395 MovieClip Frame 1
Value = 10;
Symbol 397 Button
on (release) {
_root.Player_Number = Value;
_root.Player_Dice = 0;
}
Symbol 398 MovieClip Frame 1
Value = 9;
Symbol 400 Button
on (release) {
_root.Player_Number = Value;
_root.Player_Dice = 0;
}
Symbol 401 MovieClip Frame 1
Value = 8;
Symbol 403 Button
on (release) {
_root.Player_Number = Value;
_root.Player_Dice = 0;
}
Symbol 404 MovieClip Frame 1
Value = 7;
Symbol 406 Button
on (release) {
_root.Player_Number = Value;
_root.Player_Dice = 0;
}
Symbol 407 MovieClip Frame 1
Value = 6;
Symbol 409 Button
on (release) {
_root.Player_Number = Value;
_root.Player_Dice = 0;
}
Symbol 410 MovieClip Frame 1
Value = 5;
Symbol 412 Button
on (release) {
_root.Player_Number = Value;
_root.Player_Dice = 0;
}
Symbol 413 MovieClip Frame 1
Value = 4;
Symbol 415 Button
on (release) {
_root.Player_Number = Value;
_root.Player_Dice = 0;
}
Symbol 416 MovieClip Frame 1
Value = 3;
Symbol 418 Button
on (release) {
_root.Player_Number = Value;
_root.Player_Dice = 0;
}
Symbol 419 MovieClip Frame 1
Value = 2;
Symbol 424 Button
on (release) {
_root.gotoAndPlay("Bullshit");
}
Symbol 432 Button
on (release) {
var v = new Sound();
v.attachSound("Decision2.wav");
_root.Current_Number = _root.Player_Number;
_root.Current_Dice = _root.Player_Dice;
v.start();
if (_root.Current_Dice == 1) {
_root.OneCalled = true;
}
_root.play();
_parent.gotoAndStop(2);
}
Symbol 438 MovieClip Frame 1
function DiceButton() {
if (((_root.Player_Number == _root.Current_Number) && (_root.Current_Dice >= this.Dice)) || (_root.Player_Number == 0)) {
this._visible = false;
} else {
this._visible = true;
if (_root.Player_Dice == this.Dice) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
}
function NumberButton() {
if (_root.Player_Number == this.Value) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
function CallButton() {
if ((_root.Player_Number == 0) || (_root.Player_Dice == 0)) {
this._visible = false;
} else {
this._visible = true;
}
}
function BSButton() {
if ((_root.Current_Number == 0) && (_root.Current_Dice == 0)) {
this._visible = false;
} else if (_root.BSCalled) {
this._visible = false;
} else {
this._visible = true;
}
}
stop();
b2.onEnterFrame = NumberButton;
b3.onEnterFrame = NumberButton;
b4.onEnterFrame = NumberButton;
b5.onEnterFrame = NumberButton;
b6.onEnterFrame = NumberButton;
b7.onEnterFrame = NumberButton;
b8.onEnterFrame = NumberButton;
b9.onEnterFrame = NumberButton;
b10.onEnterFrame = NumberButton;
d1.onEnterFrame = DiceButton;
d2.onEnterFrame = DiceButton;
d3.onEnterFrame = DiceButton;
d4.onEnterFrame = DiceButton;
d5.onEnterFrame = DiceButton;
d6.onEnterFrame = DiceButton;
c.onEnterFrame = CallButton;
b.onEnterFrame = BSButton;
j = _root.Current_Number;
switch (j) {
case 10 :
this.b9._visible = false;
case 9 :
this.b8._visible = false;
case 8 :
this.b7._visible = false;
case 7 :
this.b6._visible = false;
case 6 :
this.b5._visible = false;
case 5 :
this.b4._visible = false;
case 4 :
this.b3._visible = false;
case 3 :
this.b2._visible = false;
}
if (_root.Current_Dice == 6) {
switch (j) {
case 9 :
this.b9._visible = false;
break;
case 8 :
this.b8._visible = false;
break;
case 7 :
this.b7._visible = false;
break;
case 6 :
this.b6._visible = false;
break;
case 5 :
this.b5._visible = false;
break;
case 4 :
this.b4._visible = false;
break;
case 3 :
this.b3._visible = false;
break;
case 2 :
this.b2._visible = false;
}
}
Symbol 450 Button
on (release) {
gotoAndPlay ("game_start");
}