Frame 1
stop();
var soundReady = true;
Frame 2
var heroineLevel = "normal";
var chairLevel = "normal";
var funLevel = "normal";
var tuttiBank = 0;
var totalT = 0;
var day = 1;
var tm = 10;
var improve = true;
var music = new Sound();
var click_snd = new Sound();
var levelup_snd = new Sound();
var gameover_snd = new Sound();
var Paused = false;
var Psd = false;
levelup_snd.attachSound("levelup_snd");
gameover_snd.attachSound("gameover_snd");
music.attachSound("music");
click_snd.attachSound("click_snd");
stopAllSounds();
if (_root.soundReady) {
music.start();
}
music.onSoundComplete = function () {
if (_root.soundReady) {
music.start();
}
};
stop();
Frame 10
stop();
Frame 11
function initScene() {
switch (day) {
case 1 :
target = 30;
customerSpeed = 8;
tme = 70;
break;
case 2 :
tme = 80;
customerSpeed = 8;
target = 40;
break;
case 3 :
tme = 90;
rlsArray1 = [1, 1, 0, 0, 0, 0, 0, 0];
target = 80;
break;
case 4 :
tme = 100;
target = 90;
rlsArray1 = [1, 1, 1, 1, 0, 0, 0, 0, 0];
break;
case 5 :
tme = 110;
target = 110;
rlsArray1 = [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0];
break;
case 6 :
tme = 110;
target = 130;
rlsArray1 = [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0];
break;
case 7 :
tme = 120;
target = 150;
rlsArray1 = [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0];
break;
case 8 :
tme = 120;
target = 180;
rlsArray1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0];
break;
case 9 :
tme = 130;
target = 200;
rlsArray1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0];
break;
case 10 :
tme = 130;
target = 230;
rlsArray1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0];
break;
case 11 :
tme = 140;
target = 260;
rlsArray1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0];
break;
case 12 :
tme = 140;
target = 290;
rlsArray1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0];
break;
case 13 :
tme = 150;
target = 320;
rlsArray1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0];
break;
case 14 :
tme = 150;
target = 350;
rlsArray1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0];
break;
default :
tme = 160;
target = 400;
rlsArray1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0];
}
var _local3 = rlsArray1.length;
while (_local3 > 0) {
var _local4 = random(rlsArray1.length);
rlsArray2.push(rlsArray1[_local4]);
rlsArray1.splice(_local4, 1);
_local3--;
}
pausedArray.splice(0);
processQueue.splice(0);
_root.attachMovie("table", "table3", 108, {_x:640.45, _y:160.75});
_root.attachMovie("table", "table4", 208, {_x:600.05, _y:391.35});
_root.attachMovie("table", "table1", 150, {_x:360.05, _y:235.35});
_root.attachMovie("table", "table2", 250, {_x:330.45, _y:450.75});
table1.onPress = function () {
if (_root.Paused) {
return(undefined);
}
if ((_root.selectedCustomer != "") && (this.tState == "empty")) {
if (_root[selectedCustomer].currentState != "walkToExit") {
this.tState = "notempty";
_root.moveCustToNode("T1");
}
} else if (!_root.heroineBusy) {
_root.heroineBusy = true;
_root.moveToNode("T1");
} else {
processQueue.push("T1");
}
};
table2.onPress = function () {
if (_root.Paused) {
return(undefined);
}
if ((_root.selectedCustomer != "") && (this.tState == "empty")) {
if (_root[selectedCustomer].currentState != "walkToExit") {
this.tState = "notempty";
_root.moveCustToNode("T2");
}
} else if (!_root.heroineBusy) {
_root.heroineBusy = true;
_root.moveToNode("T2");
} else {
processQueue.push("T2");
}
};
table3.onPress = function () {
if (_root.Paused) {
return(undefined);
}
if ((_root.selectedCustomer != "") && (this.tState == "empty")) {
if (_root[selectedCustomer].currentState != "walkToExit") {
this.tState = "notempty";
_root.moveCustToNode("T3");
}
} else if (!_root.heroineBusy) {
_root.heroineBusy = true;
_root.moveToNode("T3");
} else {
processQueue.push("T3");
}
};
table4.onPress = function () {
if (_root.Paused) {
return(undefined);
}
if ((_root.selectedCustomer != "") && (this.tState == "empty")) {
if (_root[selectedCustomer].currentState != "walkToExit") {
this.tState = "notempty";
_root.moveCustToNode("T4");
}
} else if (!_root.heroineBusy) {
_root.heroineBusy = true;
_root.moveToNode("T4");
} else {
processQueue.push("T4");
}
};
Thrash.onPress = function () {
if (_root.Paused) {
return(undefined);
}
if (!_root.heroineBusy) {
_root.heroineBusy = true;
_root.moveToNode("Tr");
} else {
processQueue.push("Tr");
}
};
table1.onRollOver = (table2.onRollOver = (table3.onRollOver = (table4.onRollOver = function () {
if (_root.Paused) {
return(undefined);
}
var _local3 = this.filters[0];
_local3.color = 15179518 /* 0xE79EFE */;
_local3.alpha = 1;
this.filters = new Array(_local3);
_root["chair" + this._name.charAt(5)].filters = new Array(_local3);
_root[this.customer1].filters = new Array(_local3);
_root[this.customer2].filters = new Array(_local3);
})));
table1.onRollOut = (table2.onRollOut = (table3.onRollOut = (table4.onRollOut = (table1.onReleaseOutside = (table2.onReleaseOutside = (table3.onReleaseOutside = (table4.onReleaseOutside = (table1.onDragOut = (table2.onDragOut = (table3.onDragOut = (table4.onDragOut = function () {
var _local3 = this.filters[0];
_local3.color = 0;
_local3.alpha = 0;
this.filters = new Array(_local3);
_root["chair" + this._name.charAt(5)].filters = new Array(_local3);
_root[this.customer1].filters = new Array(_local3);
_root[this.customer2].filters = new Array(_local3);
})))))))))));
table1.filters = (table2.filters = (table3.filters = (table4.filters = filterArray)));
_root.attachMovie("hero", "heroine", 180, {_x:F1._x, _y:F1._y});
_root.heroine._xscale = 80;
_root.heroine._yscale = 80;
_root.attachMovie("bomma", "bomma", 1270, {_x:115, _y:535});
_root.bomma.cap.gotoAndStop(1 + random(3));
_root.bomma.shall.gotoAndStop(1 + random(3));
_root.bomma.shall.shall.stop();
_root.bomma.glass.gotoAndStop(1 + random(3));
_root.attachMovie("menubar", "menubar", 1275, {_x:405, _y:590});
_local3 = 1;
while (_local3 < 5) {
_root["table" + _local3]._xscale = 85;
_root["table" + _local3]._yscale = 85;
_root["table" + _local3].tState = "empty";
_root["table" + _local3].customer1 = "";
_root["table" + _local3].customer2 = "";
_root["table" + _local3].order1 = "";
_root["table" + _local3].order2 = "";
_root["table" + _local3].gold.gotoAndStop("null");
_root["table" + _local3].food1.gotoAndStop("null");
_root["table" + _local3].food2.gotoAndStop("null");
_root["table" + _local3].gotoAndStop(chairLevel);
_local3++;
}
switch (chairLevel) {
case "normal" :
maxT = 10;
break;
case "upgrade1" :
maxT = 12;
break;
case "upgrade2" :
maxT = 15;
}
switch (heroineLevel) {
case "normal" :
if (d < 3) {
heroineSpeed = 8;
} else {
heroineSpeed = 11;
}
break;
case "upgrade1" :
heroineSpeed = 15;
break;
case "upgrade2" :
heroineSpeed = 20;
}
switch (funLevel) {
case "normal" :
if (day < 3) {
readMenuTime = 4;
waitTimeStart = 25;
waitTimeFuriousStart = 21;
waitTimeNormalStart = 15;
waitTimeAngryStart = 18;
waitTime = 25;
waitTimeFurious = 21;
waitTimeNormal = 15;
waitTimeAngry = 18;
foodMakeTime = 3;
eatTime = 2;
}
waitTime = waitTimeStart;
waitTimeFurious = waitTimeFuriousStart;
waitTimeNormal = waitTimeNormalStart;
waitTimeAngry = waitTimeAngryStart;
break;
case "upgrade1" :
waitTime = waitTimeStart + 2;
waitTimeAngry = waitTimeAngryStart + 2;
waitTimeFurious = waitTimeFuriousStart + 2;
waitTimeNormal = waitTimeNormalStart + 2;
break;
case "upgrade2" :
waitTime = waitTimeStart + 5;
waitTimeAngry = waitTimeAngryStart + 5;
waitTimeFurious = waitTimeFuriousStart + 5;
waitTimeNormal = waitTimeNormalStart + 5;
}
currentT = 0;
currentTU.text = "0";
currentTT.text = "0";
currentTH.text = "0";
availableKitchenPlaces.splice(0);
availableKitchenPlaces = new Array(0, 0, 0, 0, 0, 0, 0, 0);
orderList.splice(0);
funBox.gotoAndStop(funLevel);
heroineDirection = "down";
heroineState = "noTray";
destinationNode = "";
changedDestinationNode = "";
heroineMoving = false;
heroineBusy = false;
custInQueue = 0;
pathNode.splice(0);
custArray.splice(0);
heroine.food1 = -1;
heroine.food2 = -1;
heroine._x = F1._x;
heroine._y = F1._y;
currentNode = "F1";
heroine.gotoAndStop(heroineLevel);
heroine.hero.clip.gotoAndStop(heroineDirection);
heroine.hero.gotoAndStop(heroineState);
clock_mc.gotoAndStop(1);
customerDepth = customerDepthMax;
customerIndex = 10;
selectedCustomer = "";
selectedFood = "";
thisIsFollowerDoor = false;
thisIsFollowerTable = false;
doorClosed = false;
timeOver = false;
_root.onEnterFrame = function () {
menubar.menubtn.onPress = function () {
if (_root.Paused) {
return(undefined);
}
if (!Paused) {
_root.clearDiner();
_root.helpDisplay_mc.removeMovieClip();
_root.gotoAndPlay("menu");
}
};
menubar.helpbtn.onPress = function () {
Paused = true;
Psd = true;
togglePause();
_root.attachMovie("helpDisplay_mc", "helpDisplay_mc", 1234543, {_x:375, _y:225});
};
heroine.hero.clip.gotoAndStop(heroineDirection);
var _local2 = String(1000 + currentT);
currentTU.text = _local2.charAt(3);
currentTT.text = _local2.charAt(2);
currentTH.text = _local2.charAt(1);
if (Paused) {
heroine.hero.clip.anim.stop();
heroine.hero.clip.anim.dress1.shall.stop();
heroine.hero.clip.anim.dress2.shall.stop();
return(undefined);
}
updateClock();
handleCustomers();
processOrders();
if (heroineMoving) {
heroine.hero.clip.anim.play();
heroine.hero.clip.anim.dress1.shall.play();
heroine.hero.clip.anim.dress2.shall.play();
depthEngine();
if (destinationNode == "") {
destinationNode = pathNode.pop();
angleEngine(false);
} else if ((Math.abs(heroine._x - _root[destinationNode]._x) <= heroineSpeed) && (Math.abs(heroine._y - _root[destinationNode]._y) <= heroineSpeed)) {
heroine._x = _root[destinationNode]._x;
heroine._y = _root[destinationNode]._y;
currentNode = destinationNode;
if (changedDestinationNode == "") {
if (pathNode.length == 0) {
heroineMoving = false;
angleEngine(true);
destinationNode = "";
} else {
destinationNode = pathNode.pop();
angleEngine(false);
}
} else {
heroineMoving = false;
destinationNode = "";
moveToNode(changedDestinationNode);
}
} else {
if ((heroine._x < _root[destinationNode]._x) && (Math.abs(heroine._x - _root[destinationNode]._x) >= heroineSpeed)) {
heroine._x = heroine._x + heroineSpeed;
} else if ((heroine._x > _root[destinationNode]._x) && (Math.abs(heroine._x - _root[destinationNode]._x) >= heroineSpeed)) {
heroine._x = heroine._x - heroineSpeed;
}
if ((heroine._y < _root[destinationNode]._y) && (Math.abs(heroine._y - _root[destinationNode]._y) > heroineSpeed)) {
heroine._y = heroine._y + heroineSpeed;
} else if ((heroine._y > _root[destinationNode]._y) && (Math.abs(heroine._y - _root[destinationNode]._y) > heroineSpeed)) {
heroine._y = heroine._y - heroineSpeed;
}
}
} else {
heroine.hero.clip.anim.stop();
heroine.hero.clip.anim.dress1.shall.stop();
heroine.hero.clip.anim.dress2.shall.stop();
}
};
}
function depthEngine() {
var _local1 = heroine.getDepth();
if (heroine._y < 200) {
heroine.swapDepths(135);
} else if (heroine._y > 380) {
heroine.swapDepths(280);
} else if (heroine._y > 300) {
heroine.swapDepths(235);
} else if (heroine._y > 200) {
heroine.swapDepths(180);
}
}
function custDepthEngine(customer) {
var _local4 = _root[customer].getDepth();
var _local3 = _root[customer].customerIndex;
if (_root[customer]._y < 152) {
_root[customer].swapDepths(130 + _local3);
} else if (_root[customer]._y > 400) {
_root[customer].swapDepths(262 + _local3);
} else if (_root[customer]._y > 255) {
_root[customer].swapDepths(220 + _local3);
} else if (_root[customer]._y > 200) {
_root[customer].swapDepths(162 + _local3);
}
if ((_root[customer].char._currentframe >= 4) && (_root[customer].char._currentframe <= 8)) {
if (((_root[customer]._x - heroine._x) < 70) && ((_root[customer]._x - heroine._x) > -70)) {
if (((_root[customer]._y - heroine._y) < 100) && ((_root[customer]._y - heroine._y) > -100)) {
if ((_root[customer]._y + (_root[customer]._height / 2)) > (heroine._y + (heroine._height / 2))) {
if (_root[customer].getDepth() < heroine.getDepth()) {
_root[customer].swapDepths(heroine.getDepth() + 1);
}
}
if ((_root[customer]._y + (_root[customer]._height / 2)) < (heroine._y + (heroine._height / 2))) {
if (_root[customer].getDepth() > heroine.getDepth()) {
_root[customer].swapDepths(heroine.getDepth() - 1);
}
}
}
}
}
}
function assignChair(customer) {
switch (_root[customer].chair) {
case 1 :
if (_root[customer].getDepth() != 146) {
_root[customer].swapDepths(146);
}
break;
case 2 :
if (_root[customer].getDepth() != 147) {
_root[customer].swapDepths(147);
}
break;
case 7 :
if (_root[customer].getDepth() != 204) {
_root[customer].swapDepths(204);
}
break;
case 8 :
if (_root[customer].getDepth() != 205) {
_root[customer].swapDepths(205);
}
break;
case 5 :
if (_root[customer].getDepth() != 104) {
_root[customer].swapDepths(104);
}
break;
case 6 :
if (_root[customer].getDepth() != 105) {
_root[customer].swapDepths(105);
}
break;
case 3 :
if (_root[customer].getDepth() != 246) {
_root[customer].swapDepths(246);
}
break;
case 4 :
if (_root[customer].getDepth() == 247) {
break;
}
_root[customer].swapDepths(247);
}
}
function angleEngine(turn) {
if (!turn) {
var _local4 = heroine._x - _root[destinationNode]._x;
var _local3 = heroine._y - _root[destinationNode]._y;
if (Math.abs(_local4) > Math.abs(_local3)) {
if (_local4 > 0) {
heroineDirection = "left";
} else {
heroineDirection = "right";
}
} else if (_local3 > 0) {
heroineDirection = "up";
} else {
heroineDirection = "down";
}
} else {
if ((destinationNode == "F1") || (destinationNode == "F2")) {
heroineDirection = "left";
takeFood();
} else if ((((destinationNode == "T2") || (destinationNode == "T5")) || (destinationNode == "T3")) || (destinationNode == "T4")) {
checkTable(destinationNode);
heroineDirection = "right";
} else if (destinationNode == "T1") {
checkTable(destinationNode);
heroineDirection = "up";
} else if (destinationNode == "Tr") {
thrashAll();
}
if (processQueue.length == 0) {
heroineBusy = false;
} else {
var _local2 = processQueue[0];
if (String(_local2).charAt(0) == "F") {
selectedFood = processQueue[1];
processQueue.splice(1, 1);
}
processQueue.splice(0, 1);
moveToNode(_local2);
}
}
}
function thrashAll() {
if (heroine.food1 != -1) {
currentT = currentT - 2;
}
if (heroine.food2 != -1) {
currentT = currentT - 2;
}
if (currentT < 0) {
currentT = 0;
}
heroineState = "noTray";
heroine.food1 = -1;
heroine.food2 = -1;
heroine.hero.gotoAndStop(heroineState);
heroineDirection = "left";
}
function takeFood() {
if (heroineState != "twoTray") {
availableKitchenPlaces[_root[selectedFood].id] = 0;
if (heroineState == "oneTray") {
heroine.food2 = _root[selectedFood]._currentframe;
heroineState = "twoTray";
} else {
heroine.food1 = _root[selectedFood]._currentframe;
heroineState = "oneTray";
}
_root[selectedFood].removeMovieClip();
selectedFood = "";
} else if (_root[selectedFood].clicked) {
_root[selectedFood].clicked = false;
}
heroine.hero.gotoAndStop(heroineState);
}
function checkTable(Table) {
switch (_root["table" + Table.charAt(1)].tState) {
case "empty" :
break;
case "notempty" :
break;
case "order" :
_root[_root["table" + Table.charAt(1)].customer1].currentState = "waitFood";
_root["table" + Table.charAt(1)].tState = "waitForFood";
_root[_root["table" + Table.charAt(1)].customer1].timer = waitTime;
if (chairLevel == "upgrade2") {
_root[_root["table" + Table.charAt(1)].customer1].char.gotoAndStop("sit1");
_root[_root["table" + Table.charAt(1)].customer1 + "dupe"].char.gotoAndStop("sit1");
} else {
_root[_root["table" + Table.charAt(1)].customer1].char.gotoAndStop("sit");
_root[_root["table" + Table.charAt(1)].customer1 + "dupe"].char.gotoAndStop("sit");
}
_root[_root["table" + Table.charAt(1)].customer1].char.body.head.gotoAndStop("head" + _root[_root["table" + Table.charAt(1)].customer1].tempCust1);
_root[_root["table" + Table.charAt(1)].customer1].char.body.gotoAndStop("dress" + _root[_root["table" + Table.charAt(1)].customer1].tempCust);
_root[_root["table" + Table.charAt(1)].customer1].char.body.head.head1.gotoAndPlay("normal");
_root[_root["table" + Table.charAt(1)].customer1 + "dupe"].char.body.head.head1.gotoAndPlay("normal");
_root[_root["table" + Table.charAt(1)].customer1].startTime = getTimer();
if (Table.charAt(1) == "1") {
var _local6 = 162;
} else if (Table.charAt(1) == "2") {
var _local6 = 262;
} else if (Table.charAt(1) == "3") {
var _local6 = 125;
} else if (Table.charAt(1) == "4") {
var _local6 = 220;
}
if (_root[_root["table" + Table.charAt(1)].customer1].dual) {
_root[_root["table" + Table.charAt(1)].customer2].currentState = "waitFood";
_root[_root["table" + Table.charAt(1)].customer2].timer = waitTime;
if (chairLevel == "upgrade2") {
_root[_root["table" + Table.charAt(1)].customer2].char.gotoAndStop("sit1");
_root[_root["table" + Table.charAt(1)].customer2 + "dupe"].char.gotoAndStop("sit1");
} else {
_root[_root["table" + Table.charAt(1)].customer2].char.gotoAndStop("sit");
_root[_root["table" + Table.charAt(1)].customer2 + "dupe"].char.gotoAndStop("sit");
}
_root[_root["table" + Table.charAt(1)].customer2].char.body.head.gotoAndStop("head" + _root[_root["table" + Table.charAt(1)].customer2].tempCust1);
_root[_root["table" + Table.charAt(1)].customer2].char.body.gotoAndStop("dress" + _root[_root["table" + Table.charAt(1)].customer2].tempCust);
_root[_root["table" + Table.charAt(1)].customer2].char.body.head.head1.gotoAndPlay("normal");
_root[_root["table" + Table.charAt(1)].customer2 + "dupe"].char.body.head.head1.gotoAndPlay("normal");
_root[_root["table" + Table.charAt(1)].customer2].startTime = getTimer();
_root.attachMovie("popupDouble", ("pop" + Table.charAt(1)) + "1", _local6, {_x:_root[_root["table" + Table.charAt(1)].customer1]._x, _y:_root[_root["table" + Table.charAt(1)].customer1]._y - 10});
var _local4 = 7 + random(13);
var _local3 = 7 + random(13);
if (_local4 == (6 + _root[_root["table" + Table.charAt(1)].customer1].tempCust)) {
_local4 = _local4 + 1;
}
if (_local3 == (6 + _root[_root["table" + Table.charAt(1)].customer2].tempCust)) {
_local3 = _local3 + 1;
}
_root[("pop" + Table.charAt(1)) + "1"].food1.gotoAndStop(_local4);
_root[("pop" + Table.charAt(1)) + "1"].food2.gotoAndStop(_local3);
_root[("pop" + Table.charAt(1)) + "1"].food1.shall.stop();
_root[("pop" + Table.charAt(1)) + "1"].food2.shall.stop();
_root[("pop" + Table.charAt(1)) + "1"].food1._xscale = 30;
_root[("pop" + Table.charAt(1)) + "1"].food2._yscale = 30;
_root[("pop" + Table.charAt(1)) + "1"].food1._yscale = 30;
_root[("pop" + Table.charAt(1)) + "1"].food2._xscale = 30;
orderList.push(_root[("pop" + Table.charAt(1)) + "1"].food1._currentframe - 6);
orderList.push(foodMakeTime);
orderList.push(getTimer());
orderList.push(_root[("pop" + Table.charAt(1)) + "1"].food2._currentframe - 6);
orderList.push(foodMakeTime);
orderList.push(getTimer());
} else {
_root.attachMovie("popup", ("pop" + Table.charAt(1)) + "1", _local6, {_x:_root[_root["table" + Table.charAt(1)].customer1]._x, _y:_root[_root["table" + Table.charAt(1)].customer1]._y - 90});
var _local5 = 7 + random(13);
if (_local5 == (6 + _root[_root["table" + Table.charAt(1)].customer1].tempCust)) {
_local5 = _local5 + 1;
}
_root[("pop" + Table.charAt(1)) + "1"].gotoAndStop(_local5);
_root[("pop" + Table.charAt(1)) + "1"].shall.stop();
_root[("pop" + Table.charAt(1)) + "1"]._xscale = 30;
_root[("pop" + Table.charAt(1)) + "1"]._yscale = 30;
orderList.push(_root[("pop" + Table.charAt(1)) + "1"]._currentframe - 6);
orderList.push(foodMakeTime);
orderList.push(getTimer());
}
break;
case "waitForFood" :
if (_root[_root["table" + Table.charAt(1)].customer1].dual) {
if (heroine.food1 == (_root[("pop" + Table.charAt(1)) + "1"].food1._currentframe - 6)) {
_root["table" + Table.charAt(1)].food1.gotoAndStop(heroine.food1);
dressup(heroine.food1, _root["table" + Table.charAt(1)].customer1, 12);
if (heroineState == "oneTray") {
heroine.food1 = -1;
heroineState = "noTray";
} else {
heroine.food1 = heroine.food2;
heroine.food2 = -1;
heroineState = "oneTray";
}
if (!_root[("pop" + Table.charAt(1)) + "1"].food2._visible) {
_root[_root["table" + Table.charAt(1)].customer2].timer = eatTime;
_root[_root["table" + Table.charAt(1)].customer2].startTime = getTimer();
_root[("pop" + Table.charAt(1)) + "1"].removeMovieClip();
_root["table" + Table.charAt(1)].tState = "eating";
} else {
_root[_root["table" + Table.charAt(1)].customer1].timer = eatTime;
_root[_root["table" + Table.charAt(1)].customer1].startTime = getTimer();
_root[("pop" + Table.charAt(1)) + "1"].food1.gotoAndStop(1);
_root[("pop" + Table.charAt(1)) + "1"].food1._visible = false;
}
heroine.hero.gotoAndStop(heroineState);
} else if (heroine.food2 == (_root[("pop" + Table.charAt(1)) + "1"].food1._currentframe - 6)) {
_root["table" + Table.charAt(1)].food1.gotoAndStop(heroine.food2);
dressup(heroine.food1, _root["table" + Table.charAt(1)].customer1, 12);
heroine.food2 = -1;
if (heroineState == "oneTray") {
heroineState = "noTray";
} else {
heroineState = "oneTray";
}
if (!_root[("pop" + Table.charAt(1)) + "1"].food2._visible) {
_root[_root["table" + Table.charAt(1)].customer2].timer = eatTime;
_root[_root["table" + Table.charAt(1)].customer2].startTime = getTimer();
_root[("pop" + Table.charAt(1)) + "1"].removeMovieClip();
_root["table" + Table.charAt(1)].tState = "eating";
} else {
_root[_root["table" + Table.charAt(1)].customer1].timer = eatTime;
_root[_root["table" + Table.charAt(1)].customer1].startTime = getTimer();
_root[("pop" + Table.charAt(1)) + "1"].food1.gotoAndStop(1);
_root[("pop" + Table.charAt(1)) + "1"].food1._visible = false;
}
heroine.hero.gotoAndStop(heroineState);
}
if (heroine.food1 == (_root[("pop" + Table.charAt(1)) + "1"].food2._currentframe - 6)) {
_root["table" + Table.charAt(1)].food2.gotoAndStop(heroine.food1);
dressup(heroine.food1, _root["table" + Table.charAt(1)].customer2, 12);
if (heroineState == "oneTray") {
heroine.food1 = -1;
heroineState = "noTray";
} else {
heroine.food1 = heroine.food2;
heroine.food2 = -1;
heroineState = "oneTray";
}
if (!_root[("pop" + Table.charAt(1)) + "1"].food1._visible) {
_root[_root["table" + Table.charAt(1)].customer1].timer = eatTime;
_root[_root["table" + Table.charAt(1)].customer1].startTime = getTimer();
_root[("pop" + Table.charAt(1)) + "1"].removeMovieClip();
_root["table" + Table.charAt(1)].tState = "eating";
} else {
_root[_root["table" + Table.charAt(1)].customer2].timer = eatTime;
_root[_root["table" + Table.charAt(1)].customer2].startTime = getTimer();
_root[("pop" + Table.charAt(1)) + "1"].food2.gotoAndStop(1);
_root[("pop" + Table.charAt(1)) + "1"].food2._visible = false;
}
heroine.hero.gotoAndStop(heroineState);
} else if (heroine.food2 == (_root[("pop" + Table.charAt(1)) + "1"].food2._currentframe - 6)) {
_root["table" + Table.charAt(1)].food2.gotoAndStop(heroine.food2);
dressup(heroine.food2, _root["table" + Table.charAt(1)].customer2, 12);
heroine.food2 = -1;
if (heroineState == "oneTray") {
heroineState = "noTray";
} else {
heroineState = "oneTray";
}
if (!_root[("pop" + Table.charAt(1)) + "1"].food1._visible) {
_root[_root["table" + Table.charAt(1)].customer1].timer = eatTime;
_root[_root["table" + Table.charAt(1)].customer1].startTime = getTimer();
_root[("pop" + Table.charAt(1)) + "1"].removeMovieClip();
_root["table" + Table.charAt(1)].tState = "eating";
} else {
_root[_root["table" + Table.charAt(1)].customer2].timer = eatTime;
_root[_root["table" + Table.charAt(1)].customer2].startTime = getTimer();
_root[("pop" + Table.charAt(1)) + "1"].food2.gotoAndStop(1);
_root[("pop" + Table.charAt(1)) + "1"].food2._visible = false;
}
heroine.hero.gotoAndStop(heroineState);
}
} else if (heroine.food1 == (_root[("pop" + Table.charAt(1)) + "1"]._currentframe - 6)) {
_root["table" + Table.charAt(1)].food1.gotoAndStop(heroine.food1);
dressup(heroine.food1, _root["table" + Table.charAt(1)].customer1, 12);
_root["table" + Table.charAt(1)].tState = "eating";
_root[_root["table" + Table.charAt(1)].customer1].timer = eatTime;
_root[_root["table" + Table.charAt(1)].customer1].startTime = getTimer();
if (heroineState == "oneTray") {
heroine.food1 = -1;
heroineState = "noTray";
} else {
heroine.food1 = heroine.food2;
heroine.food2 = -1;
heroineState = "oneTray";
}
_root[("pop" + Table.charAt(1)) + "1"].removeMovieClip();
heroine.hero.gotoAndStop(heroineState);
} else if (heroine.food2 == (_root[("pop" + Table.charAt(1)) + "1"]._currentframe - 6)) {
_root["table" + Table.charAt(1)].food1.gotoAndStop(heroine.food2);
dressup(heroine.food2, _root["table" + Table.charAt(1)].customer1, 12);
_root["table" + Table.charAt(1)].tState = "eating";
_root[_root["table" + Table.charAt(1)].customer1].timer = eatTime;
_root[_root["table" + Table.charAt(1)].customer1].startTime = getTimer();
heroine.food2 = -1;
if (heroineState == "oneTray") {
heroineState = "noTray";
} else {
heroineState = "oneTray";
}
_root[("pop" + Table.charAt(1)) + "1"].removeMovieClip();
heroine.hero.gotoAndStop(heroineState);
}
break;
case "money" :
_root["table" + Table.charAt(1)].gold.gotoAndStop("null");
_root["table" + Table.charAt(1)].food1.gotoAndStop("null");
_root["table" + Table.charAt(1)].food2.gotoAndStop("null");
if (Table.charAt(1) == "1") {
var _local6 = 162;
} else if (Table.charAt(1) == "2") {
var _local6 = 262;
} else if (Table.charAt(1) == "3") {
var _local6 = 125;
} else if (Table.charAt(1) == "4") {
var _local6 = 220;
}
_root.attachMovie("moneyRise", ("money" + Table.charAt(1)) + "1", _local6, {_x:_root["table" + Table.charAt(1)]._x + 100, _y:_root["table" + Table.charAt(1)]._y - 80});
_root[("money" + Table.charAt(1)) + "1"].money = _root["table" + Table.charAt(1)].currT;
currentT = currentT + _root["table" + Table.charAt(1)].currT;
_root["table" + Table.charAt(1)].currT = 0;
_root["table" + Table.charAt(1)].tState = "empty";
}
}
function dressup(food, customer, one) {
_root[customer + "dupe"].char.gotoAndStop("stand");
_root[customer].char.gotoAndStop("stand");
_root[customer + "dupe"].char.body.head.gotoAndStop("head" + _root[customer].tempCust1);
_root[customer + "dupe"].char.body.gotoAndStop("dress" + _root[customer].tempCust);
_root[customer].char.body.head.gotoAndStop("head" + _root[customer].tempCust1);
_root[customer].char.body.gotoAndStop("dress" + _root[customer].tempCust);
if (food <= 4) {
_root.attachMovie("dresschange", "dresschange" + one, _root[customer + "dupe"].getDepth() + one, {_x:_root[customer]._x, _y:_root[customer]._y});
_root[customer].tempCust = food;
_root[customer + "dupe"].char.body.gotoAndStop("dress" + _root[customer].tempCust);
_root[customer].char.body.gotoAndStop("dress" + _root[customer].tempCust);
_root[customer].currT = _root[customer].currT + 3;
} else if ((food >= 5) && (food <= 7)) {
_root[customer].tempCustcap = food - 3;
_root[customer + "dupe"].char.body.head.cap.gotoAndStop(food - 3);
_root[customer].char.body.head.cap.gotoAndStop(food - 3);
_root[customer].currT = _root[customer].currT + 1;
} else if ((food >= 8) && (food <= 10)) {
_root[customer].tempCustshall = food - 6;
_root[customer + "dupe"].char.body.head.shall.gotoAndStop(food - 6);
_root[customer].char.body.head.shall.gotoAndStop(food - 6);
_root[customer + "dupe"].char.body.head.shall.shall.stop();
_root[customer].char.body.head.shall.shall.stop();
_root[customer].currT = _root[customer].currT + 1;
} else if ((food >= 11) && (food <= 13)) {
_root[customer].tempCustglass = food - 9;
_root[customer + "dupe"].char.body.head.glass.gotoAndStop(food - 9);
_root[customer].char.body.head.glass.gotoAndStop(food - 9);
_root[customer].currT = _root[customer].currT + 2;
}
_root[customer].currentState = "eat";
}
function moveToNode(node) {
if (destinationNode != "") {
changedDestinationNode = node;
} else {
changedDestinationNode = "";
}
if (currentNode != node) {
pathNode.splice(0);
pathNode = _root[currentNode + "Array"][_root[node + "Num"]].split(":");
pathNode.reverse();
heroineMoving = true;
} else if (!heroineMoving) {
if ((String(node) != "Tr") && (String(node).charAt(0) == "T")) {
checkTable(node);
} else if ((String(node) != "Tr") && (String(node).charAt(0) == "F")) {
takeFood();
} else if (String(node) == "Tr") {
thrashAll();
}
if (processQueue.length == 0) {
heroineBusy = false;
} else {
var _local3 = processQueue[0];
if (String(_local3).charAt(0) == "F") {
selectedFood = processQueue[1];
processQueue.splice(1, 1);
}
processQueue.splice(0, 1);
moveToNode(_local3);
}
}
}
function moveCustToNode(node) {
if (_root[selectedCustomer].currentState != "walkToExit") {
if (_root[selectedCustomer].dual) {
thisIsFollowerTable = true;
globalNode = node;
} else {
thisIsFollowerTable = false;
}
custInQueue--;
_root[selectedCustomer].currentNode = "cd1";
_root[selectedCustomer].currentState = "walkToTable";
_root[selectedCustomer].char.gotoAndStop("walk");
_root[selectedCustomer].char.body.head.gotoAndStop("head" + _root[selectedCustomer].tempCust1);
_root[selectedCustomer].char.body.gotoAndStop("dress" + _root[selectedCustomer].tempCust);
_root[selectedCustomer].destination = "";
_root[selectedCustomer].timer = 0;
if (_root[selectedCustomer].currentNode != node) {
_root[selectedCustomer].pathNode.splice(0);
var _local2 = Number(String(node).substr(1, 1));
_root[selectedCustomer].table = _local2;
if (_root[selectedCustomer].second) {
_local2 = ((_local2 - 1) * 2) + 1;
} else {
_local2 = ((_local2 - 1) * 2) + 2;
}
_root[selectedCustomer].pathNode = custEntryArray[_local2].split(":");
_root[selectedCustomer].chair = _local2;
_root[selectedCustomer].pathNode.reverse();
_root[selectedCustomer].walking = true;
}
selectedCustomer = "";
updateQueue();
} else {
selectedCustomer = "";
}
}
function moveCustToExit(customer) {
_root[customer]._xscale = 80;
_root[customer + "dupe"].removeMovieClip();
_root[customer].currentState = "walkToExit";
_root[customer].char.gotoAndStop("walk");
_root[customer].char.body.head.gotoAndStop("head" + _root[customer].tempCust1);
_root[customer].char.body.gotoAndStop("dress" + _root[customer].tempCust);
_root[customer].char.body.head.cap.gotoAndStop(_root[customer].tempCustcap);
_root[customer].char.body.head.shall.gotoAndStop(_root[customer].tempCustshall);
_root[customer].char.body.head.shall.shall.play();
_root[customer].char.body.head.glass.gotoAndStop(_root[customer].tempCustglass);
_root[customer].destination = "";
_root[customer].timer = 0;
_root[customer].pathNode.splice(0);
_root[customer].pathNode = custExitArray[_root[customer].chair].split(":");
_root[customer].table = null;
_root[customer].chair = null;
_root[customer].pathNode.reverse();
_root[customer].walking = true;
}
function attachCustomer(dual, second) {
custInQueue++;
var _local4 = 1 + random(4);
var _local5 = _local4;
var _local6 = 1;
var _local11 = 1;
var _local12 = 1;
_root.attachMovie("char", "cust" + customerDepth, customerDepth, {_x:350, _y:20});
_root["cust" + customerDepth].char.gotoAndStop("walk");
_root["cust" + customerDepth].char.body.head.gotoAndStop("head" + _local4);
_root["cust" + customerDepth].char.body.gotoAndStop("dress" + _local4);
_root["cust" + customerDepth].destination = "cd" + custInQueue;
_root["cust" + customerDepth].currentState = "entry";
_root["cust" + customerDepth].currT = maxT;
_root["cust" + customerDepth].dual = dual;
_root["cust" + customerDepth].second = second;
_root["cust" + customerDepth]._xscale = 80;
_root["cust" + customerDepth]._yscale = 80;
_root["cust" + customerDepth].tempCust = _local4;
_root["cust" + customerDepth].tempCust1 = _local5;
_root["cust" + customerDepth].tempCustcap = 1;
_root["cust" + customerDepth].tempCustglass = 1;
_root["cust" + customerDepth].tempCustshall = 1;
if (!second) {
_root["cust" + customerDepth].onPress = function () {
if (_root.Paused) {
return(undefined);
}
if (this.currentState == "doorWait") {
_root.selectedCustomer = this._name;
} else if ((((this.currentState == "readMenu") || (this.currentState == "waitFood")) || (this.currentState == "waitForOrder")) || (this.currentState == "eat")) {
if (!_root.heroineBusy) {
_root.heroineBusy = true;
_root.moveToNode("T" + this.table);
} else {
processQueue.push("T" + this.table);
}
}
};
} else {
_root["cust" + customerDepth]._y = 1;
_root["cust" + customerDepth].onPress = function () {
if (_root.Paused) {
return(undefined);
}
if (this.currentState == "doorWait") {
_root.selectedCustomer = this._name;
} else if ((((this.currentState == "readMenu") || (this.currentState == "waitFood")) || (this.currentState == "waitForOrder")) || (this.currentState == "eat")) {
if (!_root.heroineBusy) {
_root.heroineBusy = true;
_root.moveToNode("T" + this.table);
} else {
processQueue.push("T" + this.table);
}
}
};
}
_root["cust" + customerDepth].onRollOver = function () {
if (_root.Paused) {
return(undefined);
}
var _local3 = this.filters[0];
_local3.color = 15179518 /* 0xE79EFE */;
_local3.alpha = 1;
this.filters = new Array(_local3);
if ((((this.currentState == "readMenu") || (this.currentState == "waitFood")) || (this.currentState == "waitForOrder")) || (this.currentState == "eat")) {
_root["chair" + this.table].filters = new Array(_local3);
_root["table" + this.table].filters = new Array(_local3);
}
};
_root["cust" + customerDepth].onRollOut = (_root["cust" + customerDepth].onReleaseOutside = (_root["cust" + customerDepth].onDragOut = function () {
var _local3 = this.filters[0];
_local3.color = 0;
_local3.alpha = 0;
this.filters = new Array(_local3);
if ((((this.currentState == "readMenu") || (this.currentState == "waitFood")) || (this.currentState == "waitForOrder")) || (this.currentState == "eat")) {
_root["chair" + this.table].filters = new Array(_local3);
_root["table" + this.table].filters = new Array(_local3);
}
}));
_root["cust" + customerDepth].filters = filterArray;
_root["cust" + customerDepth].customerIndex = customerIndex;
custArray.push("cust" + customerDepth);
_root["cust" + customerDepth].id = custArray.length - 1;
customerDepth--;
customerIndex--;
if (dual) {
attachCustomer(0, 1);
}
if (customerDepth < 21) {
customerDepth = customerDepthMax;
}
if (customerIndex < 2) {
customerIndex = 10;
}
}
function releaseCustomer() {
if (_root.Paused) {
return(undefined);
}
if ((custInQueue < maxCustInQueue) && (day > 2)) {
cnt++;
cnt1++;
if (cnt > (rlsArray2.length - 1)) {
cnt = random(rlsArray2.length);
}
attachCustomer(rlsArray2[cnt], 0);
} else if (custInQueue < maxCustInQueue) {
cnt++;
cnt1++;
attachCustomer(0, 0);
}
}
function startDiner() {
releaseCustomer();
if (day < 3) {
var _local1 = 10000;
} else {
var _local1 = 10000 - (day * 100);
}
customerInterval = setInterval(releaseCustomer, _local1);
clock_mc.timer = 120;
}
function handleTimeover(customer, which) {
switch (which) {
case "door" :
if (_root[customer].dual) {
swapCustomer = customer;
thisIsFollowerDoor = true;
globalNode = "exit";
} else {
swapCustomer = "";
thisIsFollowerDoor = false;
}
_root[customer].currentState = "walkToExit";
_root[customer].char.gotoAndStop("walk");
_root[customer].char.body.head.gotoAndStop("head" + _root[customer].tempCust1);
_root[customer].char.body.gotoAndStop("dress" + _root[customer].tempCust);
_root[customer].destination = "";
_root[customer].timer = 0;
_root[customer].pathNode.splice(0);
_root[customer].pathNode = custDoorExitArray[0].split(":");
_root[customer].table = null;
_root[customer].chair = null;
_root[customer].pathNode.reverse();
_root[customer].walking = true;
selectedCustomer = "";
custInQueue--;
updateQueue();
break;
case "menu" :
if (chairLevel == "upgrade2") {
_root[customer].char.gotoAndPlay("situp1");
_root[customer + "dupe"].char.gotoAndPlay("situp1");
} else {
_root[customer].char.gotoAndPlay("situp");
_root[customer + "dupe"].char.gotoAndPlay("situp");
}
_root[customer].char.body.head.gotoAndStop("head" + _root[customer].tempCust1);
_root[customer].char.body.gotoAndStop("dress" + _root[customer].tempCust);
_root[customer].char.body.head.head1.gotoAndPlay("normal");
_root[customer + "dupe"].char.body.head.head1.gotoAndPlay("normal");
_root[customer].currentState = "waitForOrder";
_root["table" + _root[customer].table].tState = "order";
_root[customer].timer = waitTime;
_root[customer].startTime = getTimer();
break;
case "order" :
if (_root[customer].dual) {
_root["table" + _root[customer].table].tState = "empty";
moveCustToExit(_root["table" + _root[customer].table].customer2);
moveCustToExit(customer);
} else if (!_root[customer].second) {
_root["table" + _root[customer].table].tState = "empty";
moveCustToExit(customer);
}
break;
case "food" :
if (_root[customer].dual) {
if (_root[("pop" + _root[customer].table) + "1"].food2._visible) {
_root[("pop" + _root[customer].table) + "1"].removeMovieClip();
_root["table" + _root[customer].table].tState = "empty";
moveCustToExit(_root["table" + _root[customer].table].customer2);
moveCustToExit(customer);
} else {
_root[customer].startTime = _root[customer].startTime + ((waitTime - waitTimeFurious) * 1000);
}
} else if (!_root[customer].second) {
_root[("pop" + _root[customer].table) + "1"].removeMovieClip();
_root["table" + _root[customer].table].tState = "empty";
moveCustToExit(customer);
}
break;
case "exit" :
if (_root[customer].dual) {
if (!_root[("pop" + _root[customer].table) + "1"].food2._visible) {
_root["table" + _root[customer].table].gold.gotoAndStop("large");
_root["table" + _root[customer].table].currT = 2 * _root[customer].currT;
} else {
_root["table" + _root[customer].table].gold.gotoAndStop("small");
_root["table" + _root[customer].table].currT = _root[customer].currT;
}
_root[("pop" + _root[customer].table) + "1"].removeMovieClip();
_root["table" + _root[customer].table].tState = "money";
_root["table" + _root[customer].table].food1.gotoAndStop(11);
_root["table" + _root[customer].table].food2.gotoAndStop(11);
moveCustToExit(_root["table" + _root[customer].table].customer2);
moveCustToExit(customer);
} else if (!_root[customer].second) {
_root["table" + _root[customer].table].tState = "money";
_root["table" + _root[customer].table].food1.gotoAndStop(11);
_root["table" + _root[customer].table].gold.gotoAndStop("small");
_root["table" + _root[customer].table].currT = _root[customer].currT;
moveCustToExit(customer);
} else {
if (!_root[("pop" + _root[customer].table) + "1"].food1._visible) {
break;
}
_root[("pop" + _root[customer].table) + "1"].removeMovieClip();
_root["table" + _root[customer].table].tState = "money";
_root["table" + _root[customer].table].food2.gotoAndStop(11);
_root["table" + _root[customer].table].gold.gotoAndStop("small");
_root["table" + _root[customer].table].currT = _root[customer].currT;
moveCustToExit(_root["table" + _root[customer].table].customer1);
moveCustToExit(customer);
}
}
}
function processOrders() {
if (orderList.length > 0) {
i = 0;
while (i < orderList.length) {
if ((i % 3) == 0) {
if (int((getTimer() - orderList[i + 2]) / 1000) == orderList[i + 1]) {
j = 0;
while (j < availableKitchenPlaces.length) {
if (availableKitchenPlaces[j] != 1) {
availableKitchenPlaces[j] = 1;
_root.attachMovie("food_mc", "food" + (15 - j), 15 - j, {_x:_root["kPlace" + (j + 1)]._x, _y:_root["kPlace" + (j + 1)]._y});
_root["food" + (15 - j)].id = j;
_root["food" + (15 - j)].clicked = false;
_root["food" + (15 - j)].gotoAndStop(orderList[i]);
if (orderList[i] <= 4) {
_root["food" + (15 - j)]._rotation = -240;
_root["food" + (15 - j)]._xscale = 35;
_root["food" + (15 - j)]._yscale = 35;
}
if ((orderList[i] >= 5) && (orderList[i] <= 7)) {
_root["food" + (15 - j)]._xscale = 45;
_root["food" + (15 - j)]._yscale = 45;
}
if ((orderList[i] >= 8) && (orderList[i] <= 10)) {
_root["food" + (15 - j)]._rotation = -240;
_root["food" + (15 - j)]._xscale = 50;
_root["food" + (15 - j)]._yscale = 50;
}
if (orderList[i] >= 11) {
_root["food" + (15 - j)]._rotation = -240;
_root["food" + (15 - j)]._xscale = 40;
_root["food" + (15 - j)]._yscale = 40;
}
_root["food" + (15 - j)].shall.stop();
if (j < 4) {
_root["food" + (15 - j)].onPress = function () {
if (_root.Paused) {
return(undefined);
}
if (!this.clicked) {
if (!_root.heroineBusy) {
_root.selectedFood = this._name;
_root.heroineBusy = true;
_root.moveToNode("F1");
} else {
processQueue.push("F1");
processQueue.push(this._name);
}
if (heroineState != "twoTray") {
this.clicked = true;
}
}
};
} else {
_root["food" + (15 - j)].onPress = function () {
if (_root.Paused) {
return(undefined);
}
if (!this.clicked) {
if (!_root.heroineBusy) {
_root.selectedFood = this._name;
_root.heroineBusy = true;
_root.moveToNode("F2");
} else {
processQueue.push("F2");
processQueue.push(this._name);
}
if (heroineState != "twoTray") {
this.clicked = true;
}
}
};
}
break;
}
j++;
}
orderList.splice(i, 3);
}
}
i++;
}
}
}
function handleCustomers() {
for (i in custArray) {
if ((_root[custArray[i]].timer != 0) && (_root[custArray[i]].timer != undefined)) {
if (int((getTimer() - _root[custArray[i]].startTime) / 1000) == waitTimeNormal) {
switch (_root[custArray[i]].currentState) {
case "doorWait" :
_root[custArray[i]].char.body.head.head1.gotoAndPlay("normal");
break;
case "waitFood" :
_root[custArray[i]].char.body.head.head1.gotoAndPlay("normal");
_root[custArray[i] + "dupe"].char.body.head.head1.gotoAndPlay("normal");
break;
case "waitForOrder" :
_root[custArray[i]].char.body.head.head1.gotoAndPlay("normal");
_root[custArray[i] + "dupe"].char.body.head.head1.gotoAndPlay("normal");
}
} else if (int((getTimer() - _root[custArray[i]].startTime) / 1000) == waitTimeAngry) {
switch (_root[custArray[i]].currentState) {
case "doorWait" :
_root[custArray[i]].char.body.head.head1.gotoAndPlay("unhappy");
break;
case "waitFood" :
_root[custArray[i]].char.body.head.head1.gotoAndPlay("unhappy");
_root[custArray[i] + "dupe"].char.body.head.head1.gotoAndPlay("unhappy");
break;
case "waitForOrder" :
_root[custArray[i]].char.body.head.head1.gotoAndPlay("unhappy");
_root[custArray[i] + "dupe"].char.body.head.head1.gotoAndPlay("unhappy");
}
} else if (int((getTimer() - _root[custArray[i]].startTime) / 1000) == waitTimeFurious) {
var _local2 = _root[custArray[i]].char._currentframe;
switch (_root[custArray[i]].currentState) {
case "doorWait" :
_root[custArray[i]].char.body.head.head1.gotoAndPlay("angry");
if (_root[custArray[i]].char._currentframe != _local2) {
_root[custArray[i]].currT = _root[custArray[i]].currT - 2;
}
break;
case "waitFood" :
_root[custArray[i]].char.body.head.head1.gotoAndPlay("angry");
_root[custArray[i] + "dupe"].char.body.head.head1.gotoAndPlay("angry");
if (_root[custArray[i]].char._currentframe != _local2) {
_root[custArray[i]].currT = _root[custArray[i]].currT - 2;
}
break;
case "waitForOrder" :
_root[custArray[i]].char.body.head.head1.gotoAndPlay("angry");
_root[custArray[i] + "dupe"].char.body.head.head1.gotoAndPlay("angry");
if (_root[custArray[i]].char._currentframe == _local2) {
break;
}
_root[custArray[i]].currT = _root[custArray[i]].currT - 2;
}
} else if (int((getTimer() - _root[custArray[i]].startTime) / 1000) == _root[custArray[i]].timer) {
_root[custArray[i]].timer = 0;
switch (_root[custArray[i]].currentState) {
case "doorWait" :
handleTimeover(custArray[i], "door");
break;
case "readMenu" :
handleTimeover(custArray[i], "menu");
break;
case "waitFood" :
handleTimeover(custArray[i], "food");
break;
case "waitForOrder" :
handleTimeover(custArray[i], "order");
break;
case "eat" :
handleTimeover(custArray[i], "exit");
}
}
}
switch (_root[custArray[i]].currentState) {
case "entry" :
if ((Math.abs(_root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x) <= customerSpeed) && (Math.abs(_root[custArray[i]]._y - _root[_root[custArray[i]].destination]._y) <= customerSpeed)) {
_root[custArray[i]]._x = _root[_root[custArray[i]].destination]._x;
_root[custArray[i]]._y = _root[_root[custArray[i]].destination]._y;
if (_root[custArray[i]].destination == "cd1") {
if (_root[custArray[i]].second && (thisIsFollowerTable || (thisIsFollowerDoor))) {
if ((String(globalNode) == "exit") && (thisIsFollowerDoor)) {
thisIsFollowerDoor = false;
_root[custArray[i]].currentState = "walkToExit";
_root[swapCustomer].swapDepths(_root[custArray[i]].getDepth());
_root[custArray[i]].char.gotoAndStop("walk");
_root[custArray[i]].char.body.head.gotoAndStop("head" + _root[custArray[i]].tempCust1);
_root[custArray[i]].char.body.gotoAndStop("dress" + _root[custArray[i]].tempCust);
_root[custArray[i]].destination = "";
_root[custArray[i]].timer = 0;
_root[custArray[i]].pathNode.splice(0);
_root[custArray[i]].pathNode = custDoorExitArray[0].split(":");
_root[custArray[i]].table = null;
_root[custArray[i]].chair = null;
_root[custArray[i]].pathNode.reverse();
_root[custArray[i]].walking = true;
selectedCustomer = "";
custInQueue--;
updateQueue();
} else if (thisIsFollowerTable) {
thisIsFollowerTable = false;
selectedCustomer = custArray[i];
if (_root[selectedCustomer].currentState != "walkToExit") {
moveCustToNode(globalNode);
}
}
} else {
_root[custArray[i]].currentState = "doorWait";
_root[custArray[i]].char.gotoAndStop("stand");
_root[custArray[i]].char.body.head.gotoAndStop("head" + _root[custArray[i]].tempCust1);
_root[custArray[i]].char.body.gotoAndStop("dress" + _root[custArray[i]].tempCust);
_root[custArray[i]].timer = waitTime;
_root[custArray[i]].startTime = getTimer();
}
} else {
_root[custArray[i]].currentState = "standWait";
_root[custArray[i]].gotoAndStop("stand");
_root[custArray[i]].char.gotoAndStop("stand");
_root[custArray[i]].char.body.head.gotoAndStop("head" + _root[custArray[i]].tempCust1);
_root[custArray[i]].char.body.gotoAndStop("dress" + _root[custArray[i]].tempCust);
}
} else {
if ((_root[custArray[i]]._x < _root[_root[custArray[i]].destination]._x) && (Math.abs(_root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x) >= customerSpeed)) {
_root[custArray[i]]._x = _root[custArray[i]]._x + customerSpeed;
} else if ((_root[custArray[i]]._x > _root[_root[custArray[i]].destination]._x) && (Math.abs(_root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x) >= customerSpeed)) {
_root[custArray[i]]._x = _root[custArray[i]]._x - customerSpeed;
}
if ((_root[custArray[i]]._y < _root[_root[custArray[i]].destination]._y) && (Math.abs(_root[custArray[i]]._y - _root[_root[custArray[i]].destination]._y) > customerSpeed)) {
_root[custArray[i]]._y = _root[custArray[i]]._y + customerSpeed;
} else if ((_root[custArray[i]]._y > _root[_root[custArray[i]].destination]._y) && (Math.abs(_root[custArray[i]]._y - _root[_root[custArray[i]].destination]._y) > customerSpeed)) {
_root[custArray[i]]._y = _root[custArray[i]]._y - customerSpeed;
}
}
break;
case "walkToTable" :
if (_root[custArray[i]].walking) {
custDepthEngine(custArray[i]);
if (_root[custArray[i]].destination == "") {
_root[custArray[i]].destination = _root[custArray[i]].pathNode.pop();
var _local3 = _root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x;
if (_local3 >= 0) {
_root[custArray[i]]._xscale = 80;
} else {
_root[custArray[i]]._xscale = -80;
}
} else if ((Math.abs(_root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x) <= customerSpeed) && (Math.abs(_root[custArray[i]]._y - _root[_root[custArray[i]].destination]._y) <= customerSpeed)) {
_root[custArray[i]]._x = _root[_root[custArray[i]].destination]._x;
_root[custArray[i]]._y = _root[_root[custArray[i]].destination]._y;
_root[custArray[i]].currentNode = _root[custArray[i]].destination;
if (_root[custArray[i]].pathNode.length == 0) {
if (_root[custArray[i]].second) {
_root[custArray[i]]._xscale = -80;
_root["table" + _root[custArray[i]].table].customer2 = custArray[i];
} else {
_root[custArray[i]]._xscale = 80;
_root["table" + _root[custArray[i]].table].customer1 = custArray[i];
}
_root[custArray[i]].walking = false;
_root[custArray[i]].destination = "";
_root[custArray[i]]._xscale = 80;
if (chairLevel == "upgrade2") {
_root[custArray[i]].char.gotoAndStop("sit1");
} else {
_root[custArray[i]].char.gotoAndStop("sit");
}
_root[custArray[i]].char.gotoAndStop("menu");
_root[custArray[i]].char.body.head.gotoAndStop("head" + _root[custArray[i]].tempCust1);
_root[custArray[i]].char.body.gotoAndStop("dress" + _root[custArray[i]].tempCust);
_root[custArray[i]].currentState = "readMenu";
if (_root["table" + _root[custArray[i]].table].tState == "menu") {
if (_root[custArray[i]].second) {
_root[_root["table" + _root[custArray[i]].table].customer1].timer = readMenuTime;
_root[_root["table" + _root[custArray[i]].table].customer1].startTime = getTimer();
} else {
_root[_root["table" + _root[custArray[i]].table].customer2].timer = readMenuTime;
_root[_root["table" + _root[custArray[i]].table].customer2].startTime = getTimer();
}
}
_root["table" + _root[custArray[i]].table].tState = "menu";
_root[custArray[i]].timer = readMenuTime;
_root[custArray[i]].startTime = getTimer();
assignChair(custArray[i]);
switch (_root[custArray[i]].getDepth()) {
case 104 :
var _local4 = 118;
break;
case 105 :
_local4 = 119;
break;
case 146 :
_local4 = 160;
break;
case 147 :
_local4 = 161;
break;
case 204 :
_local4 = 218;
break;
case 205 :
_local4 = 219;
break;
case 246 :
_local4 = 260;
break;
case 247 :
_local4 = 261;
}
_root[custArray[i]].duplicateMovieClip(custArray[i] + "dupe", _local4, {_x:_root[custArray[i]]._x, _y:_root[custArray[i]]._y});
if (chairLevel == "upgrade2") {
_root[custArray[i] + "dupe"].char.gotoAndStop("sit1");
} else {
_root[custArray[i] + "dupe"].char.gotoAndStop("sit");
}
_root[custArray[i] + "dupe"].char.gotoAndStop("menu");
_root[custArray[i] + "dupe"].char.body.head.gotoAndStop("head" + _root[custArray[i]].tempCust1);
_root[custArray[i] + "dupe"].char.body.gotoAndStop("dress" + _root[custArray[i]].tempCust);
_root[custArray[i]].currentState = "readMenu";
} else {
_root[custArray[i]].destination = _root[custArray[i]].pathNode.pop();
var _local3 = _root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x;
if (_local3 >= 0) {
_root[custArray[i]]._xscale = 80;
} else {
_root[custArray[i]]._xscale = -80;
}
}
} else {
if ((_root[custArray[i]]._x < _root[_root[custArray[i]].destination]._x) && (Math.abs(_root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x) >= customerSpeed)) {
_root[custArray[i]]._x = _root[custArray[i]]._x + customerSpeed;
} else if ((_root[custArray[i]]._x > _root[_root[custArray[i]].destination]._x) && (Math.abs(_root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x) >= customerSpeed)) {
_root[custArray[i]]._x = _root[custArray[i]]._x - customerSpeed;
}
if ((_root[custArray[i]]._y < _root[_root[custArray[i]].destination]._y) && (Math.abs(_root[custArray[i]]._y - _root[_root[custArray[i]].destination]._y) > customerSpeed)) {
_root[custArray[i]]._y = _root[custArray[i]]._y + customerSpeed;
} else if ((_root[custArray[i]]._y > _root[_root[custArray[i]].destination]._y) && (Math.abs(_root[custArray[i]]._y - _root[_root[custArray[i]].destination]._y) > customerSpeed)) {
_root[custArray[i]]._y = _root[custArray[i]]._y - customerSpeed;
}
}
}
break;
case "walkToExit" :
if (!_root[custArray[i]].walking) {
break;
}
custDepthEngine(custArray[i]);
if (_root[custArray[i]].destination == "") {
_root[custArray[i]].destination = _root[custArray[i]].pathNode.pop();
var _local3 = _root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x;
if (_local3 >= 0) {
_root[custArray[i]]._xscale = 80;
} else {
_root[custArray[i]]._xscale = -80;
}
} else if ((Math.abs(_root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x) <= customerSpeed) && (Math.abs(_root[custArray[i]]._y - _root[_root[custArray[i]].destination]._y) <= customerSpeed)) {
_root[custArray[i]]._x = _root[_root[custArray[i]].destination]._x;
_root[custArray[i]]._y = _root[_root[custArray[i]].destination]._y;
_root[custArray[i]].currentNode = _root[custArray[i]].destination;
if (_root[custArray[i]].pathNode.length == 0) {
_root[custArray[i]].removeMovieClip();
custArray.splice(i, 1);
} else {
_root[custArray[i]].destination = _root[custArray[i]].pathNode.pop();
var _local3 = _root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x;
if (_local3 >= 0) {
_root[custArray[i]]._xscale = 80;
} else {
_root[custArray[i]]._xscale = -80;
}
}
} else {
if ((_root[custArray[i]]._x < _root[_root[custArray[i]].destination]._x) && (Math.abs(_root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x) >= customerSpeed)) {
_root[custArray[i]]._x = _root[custArray[i]]._x + customerSpeed;
} else if ((_root[custArray[i]]._x > _root[_root[custArray[i]].destination]._x) && (Math.abs(_root[custArray[i]]._x - _root[_root[custArray[i]].destination]._x) >= customerSpeed)) {
_root[custArray[i]]._x = _root[custArray[i]]._x - customerSpeed;
}
if ((_root[custArray[i]]._y < _root[_root[custArray[i]].destination]._y) && (Math.abs(_root[custArray[i]]._y - _root[_root[custArray[i]].destination]._y) > customerSpeed)) {
_root[custArray[i]]._y = _root[custArray[i]]._y + customerSpeed;
} else {
if (!((_root[custArray[i]]._y > _root[_root[custArray[i]].destination]._y) && (Math.abs(_root[custArray[i]]._y - _root[_root[custArray[i]].destination]._y) > customerSpeed))) {
break;
}
_root[custArray[i]]._y = _root[custArray[i]]._y - customerSpeed;
}
}
}
}
}
function togglePause() {
_root.helpDisplay_mc.removeMovieClip();
_root.helpDisplay_mc._visible = false;
if (Paused) {
if ((door_mc._currentframe < 31) && (door_mc._currentframe != 17)) {
pausedArray.push("door_mc");
door_mc.stop();
}
for (i in custArray) {
switch (_root[custArray[i]].currentState) {
case "walkToTable" :
pausedArray.push(custArray[i]);
_root[custArray[i]].char.body.bodywalk.stop();
_root[custArray[i]].char.body.head.head1.stop();
break;
case "walkToExit" :
pausedArray.push(custArray[i]);
_root[custArray[i]].char.body.bodywalk.stop();
_root[custArray[i]].char.body.head.head1.stop();
break;
case "entry" :
pausedArray.push(custArray[i]);
_root[custArray[i]].char.body.bodywalk.stop();
_root[custArray[i]].char.body.head.head1.stop();
break;
case "waitForOrder" :
pausedArray.push(custArray[i]);
_root[custArray[i]].char.head.stop();
_root[custArray[i]].char.body.stop();
_root[custArray[i]].char.body.head.head1.stop();
break;
case "eat" :
pausedArray.push(custArray[i]);
_root[custArray[i] + "dupe"].char.head.stop();
_root[custArray[i]].char.body.head.head1.stop();
}
}
pauseTime = getTimer();
} else {
for (i in pausedArray) {
if (pausedArray[i] == "door_mc") {
_root[pausedArray[i]].play();
} else {
switch (_root[pausedArray[i]].currentState) {
case "walkToTable" :
_root[pausedArray[i]].char.body.bodywalk.play();
_root[custArray[i]].char.body.head.head1.play();
break;
case "walkToExit" :
_root[pausedArray[i]].char.body.bodywalk.play();
_root[custArray[i]].char.body.head.head1.play();
break;
case "entry" :
_root[pausedArray[i]].char.body.bodywalk.play();
_root[custArray[i]].char.body.head.head1.play();
break;
case "waitForOrder" :
_root[pausedArray[i]].char.head.play();
_root[custArray[i]].char.body.head.head1.play();
break;
case "eat" :
_root[pausedArray[i] + "dupe"].char.head.play();
_root[custArray[i]].char.body.head.head1.play();
}
}
}
pausedArray.splice(0);
var _local2 = getTimer() - pauseTime;
for (i in custArray) {
if ((_root[custArray[i]].timer != 0) && (_root[custArray[i]].timer != undefined)) {
_root[custArray[i]].startTime = _root[custArray[i]].startTime + _local2;
}
}
if (orderList.length > 0) {
j = 0;
while (j < orderList.length) {
if ((j % 3) == 0) {
orderList[j + 2] = orderList[j + 2] + _local2;
}
j++;
}
}
clock_mc.startTime = clock_mc.startTime + _local2;
}
}
function clearDiner() {
i = 1;
while (i <= 5) {
_root["table" + i].removeMovieClip();
_root["chair" + i].removeMovieClip();
_root[("pop" + i) + "1"].removeMovieClip();
_root[("money" + i) + "1"].removeMovieClip();
_root["food" + (15 - i)].removeMovieClip();
i++;
}
_root.food15.removeMovieClip();
for (j in custArray) {
_root[custArray[j] + "dupe"].removeMovieClip();
_root[custArray[j]].removeMovieClip();
}
bomma.removeMovieClip();
menubar.removeMovieClip();
heroine.removeMovieClip();
clearInterval(customerInterval);
delete onEnterFrame;
}
function updateClock() {
var _local3 = Math.floor((getTimer() - clock_mc.startTime) / 1000);
if (tm <= 0) {
tm = 0;
}
if (tm > 0) {
tm = tme - _local3;
}
if (_local3 <= tme) {
if (_local3 == tme) {
timeOver = true;
clearInterval(customerInterval);
}
clock_mc.gotoAndStop(_local3 + 1);
} else {
if (((custInQueue <= 0) && (!doorClosed)) && (timeOver)) {
trace(cnt1);
door_mc.gotoAndPlay("close");
doorClosed = true;
}
if (doorClosed && (timeOver)) {
if (custArray.length == 0) {
var _local2 = false;
k = 1;
while (k <= 5) {
if ((_root["table" + k].currT != 0) && (_root["table" + k].currT != undefined)) {
_local2 = true;
break;
}
k++;
}
if (!_local2) {
levelUp();
}
}
}
}
}
function levelUp() {
Paused = true;
clearDiner();
gotoAndStop ("upgrade");
}
function updateQueue() {
for (j in custArray) {
if ((_root[custArray[j]].currentState == "standWait") || (_root[custArray[j]].currentState == "entry")) {
_root[custArray[j]].destination = "cd" + (Number(_root[custArray[j]].destination.charAt(2)) - 1);
_root[custArray[j]].char.gotoAndStop("walk");
_root[custArray[i]].char.body.head.gotoAndStop("head" + _root[custArray[i]].tempCust1);
_root[custArray[i]].char.body.gotoAndStop("dress" + _root[custArray[i]].tempCust);
_root[custArray[j]].currentState = "entry";
}
}
}
function endDay() {
Paused = true;
clearDiner();
gotoAndStop ("results");
}
var filter = (new flash.filters.GlowFilter(0, 0, 16, 16, 2.5, 3, false, false));
var filterArray = new Array();
filterArray.push(filter);
var cnt = -1;
var cnt1 = 0;
var availableKitchenPlaces = new Array(0, 0, 0, 0, 0, 0, 0, 0);
var rlsArray1 = new Array();
var rlsArray2 = new Array();
var orderList = new Array();
var processQueue = new Array();
var heroineState;
var heroineDirection;
var heroineSpeed;
var heroineBusy;
var customerSpeed = 10;
var currentNode;
var destinationNode;
var changedDestinationNode;
var heroineMoving;
var pathNode = new Array();
var custArray = new Array();
var customerDepthMax = 80;
var customerDepth;
var selectedCustomer;
var selectedFood;
var custInQueue;
var doorClosed;
var timeOver;
var tm = 10;
var tme = 10;
clock_mc.startTime = getTimer();
var maxCustInQueue = 4;
var readMenuTime = 3;
var waitTimeStart = 23;
var waitTimeFuriousStart = 19;
var waitTimeNormalStart = 13;
var waitTimeAngryStart = 16;
var waitTime = 23;
var waitTimeFurious = 19;
var waitTimeNormal = 13;
var waitTimeAngry = 16;
var foodMakeTime = 3;
var eatTime = 2;
var customerIndex;
var customerInterval;
var customerIntervalDelayMax = 12300;
var currentT;
var maxT;
var swapCustomer = "";
var thisIsFollowerDoor;
var thisIsFollowerTable;
var globalNode;
var T1Array = new Array("", "J1:T2", "J2:T3", "J2:T4", "T4", "J1:Tr", "F1", "F1:F2");
var T2Array = new Array("J1:T1", "", "J1:J2:T3", "J1:J2:T4", "T5", "Tr", "Tr:F1", "Tr:F1:F2");
var T3Array = new Array("J2:T1", "J2:J1:T2", "", "J2:T4", "J2:T5", "J2:J1:Tr", "J2:J1:F1", "J2:J1:F1:F2");
var T4Array = new Array("J2:T1", "J1:T2", "J2:T3", "", "J2:T5", "J1:Tr", "J1:F1", "J1:F1:F2");
var T5Array = new Array("J2:T4:T1", "T2", "J2:T3", "J2:T4", "", "T2:Tr", "T2:Tr:F1", "T2:Tr:F1:F2");
var TrArray = new Array("J1:T1", "T2", "J1:J2:T3", "J1:J2:T4", "T2", "", "F1", "F1:F2");
var F1Array = new Array("J1:T1", "Tr:T2", "J2:T3", "J2:T4", "Tr:T2", "Tr", "", "F2");
var F2Array = new Array("F1:J1:T1", "F1:Tr:T2", "J1:J2:T3", "F1:J2:T4", "F1:Tr:T2", "F1:Tr", "F1", "");
var J1Array = new Array("T1", "T2", "J2:T3", "J2:T4", "T3:J2:T5", "Tr", "F1", "F1:F2");
var J2Array = new Array("T1", "J1:T2", "T3", "T4", "T5", "J1:Tr", "J1:F1", "J1:F1:F2");
var T1Num = 0;
var T2Num = 1;
var T3Num = 2;
var T4Num = 3;
var T5Num = 4;
var TrNum = 5;
var F1Num = 6;
var F2Num = 7;
var custEntryArray = new Array("", "p11:p12:cc1", "p1:p7:cc2", "p6:cc3", "p8:p5:cc4", "cjm:cc5", "cjm:cc6", "p3:p4:cc7", "p3:p4:cc8", "cjm:cc9", "cjm:cj2:cc10");
var custExitArray = new Array("", "cj2:ce", "cj2:ce", "cj1:ce", "cj1:ce", "g1:ce", "g1:ce", "g2:ce", "g2:ce", "cj2:ce", "ce");
var custDoorExitArray = new Array("cds:cde");
var target = 0;
var pauseTime = 0;
var pausedArray = new Array();
initScene();
stop();
Instance of Symbol 458 MovieClip "Thrash" in Frame 11
/* no clip actions */
Frame 12
if (currentT >= target) {
if (((_root.funLevel == "upgrade2") && (_root.heroineLevel == "upgrade2")) && (_root.chairLevel == "upgrade2")) {
if (day >= 10) {
upgrade.gotoAndPlay("gamewon");
if (soundReady) {
_root.levelup_snd.start();
}
} else {
upgrade.gotoAndPlay("levelup");
if (soundReady) {
_root.levelup_snd.start();
}
}
} else {
upgrade.gotoAndPlay("levelup");
if (soundReady) {
_root.levelup_snd.start();
}
}
var profit = (currentT - target);
day++;
totalT = totalT + currentT;
tuttiBank = tuttiBank + profit;
} else {
upgrade.gotoAndPlay("gameover");
if (soundReady) {
_root.gameover_snd.start();
}
stopFrame = 3;
var profit = 0;
}
stop();
Instance of Symbol 85 MovieClip "dress1" in Symbol 90 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 94 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 101 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 105 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food2);
}
Instance of Symbol 85 MovieClip "dress2" in Symbol 105 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress2" in Symbol 106 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food2);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 106 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 106 MovieClip Frame 3
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress2" in Symbol 107 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food2);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 107 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 128 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 129 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress2" in Symbol 131 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food2);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 131 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress2" in Symbol 132 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food2);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 132 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 132 MovieClip Frame 3
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress2" in Symbol 133 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food2);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 133 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 154 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 155 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 156 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress2" in Symbol 158 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food2);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 158 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress2" in Symbol 159 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food2);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 159 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 159 MovieClip Frame 3
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Instance of Symbol 85 MovieClip "dress2" in Symbol 160 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food2);
}
Instance of Symbol 85 MovieClip "dress1" in Symbol 160 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.heroine.food1);
}
Symbol 170 MovieClip Frame 4
gotoAndPlay ("normalnoTray");
Symbol 170 MovieClip Frame 8
gotoAndPlay ("upgrade1noTray");
Symbol 170 MovieClip Frame 12
gotoAndPlay ("upgrade2noTray");
Symbol 170 MovieClip Frame 17
gotoAndPlay ("normaloneTray");
Symbol 170 MovieClip Frame 21
gotoAndPlay ("upgrade1oneTray");
Symbol 170 MovieClip Frame 25
gotoAndPlay ("upgrade2oneTray");
Symbol 170 MovieClip Frame 30
gotoAndPlay ("normaltwoTray");
Symbol 170 MovieClip Frame 34
gotoAndPlay ("upgrade1twoTray");
Symbol 170 MovieClip Frame 38
gotoAndPlay ("upgrade2twoTray");
Symbol 173 MovieClip Frame 4
gotoAndPlay ("normalnoTray");
Symbol 173 MovieClip Frame 8
gotoAndPlay ("upgrade1noTray");
Symbol 173 MovieClip Frame 12
gotoAndPlay ("upgrade2noTray");
Symbol 173 MovieClip Frame 17
gotoAndPlay ("normaloneTray");
Symbol 173 MovieClip Frame 21
gotoAndPlay ("upgrade1oneTray");
Symbol 173 MovieClip Frame 25
gotoAndPlay ("upgrade2oneTray");
Symbol 173 MovieClip Frame 30
gotoAndPlay ("normaltwoTray");
Symbol 173 MovieClip Frame 34
gotoAndPlay ("upgrade1twoTray");
Symbol 173 MovieClip Frame 38
gotoAndPlay ("upgrade2twoTray");
Symbol 174 MovieClip Frame 4
gotoAndPlay ("normalnoTray");
Symbol 174 MovieClip Frame 8
gotoAndPlay ("upgrade1noTray");
Symbol 174 MovieClip Frame 12
gotoAndPlay ("upgrade2noTray");
Symbol 174 MovieClip Frame 17
gotoAndPlay ("normaloneTray");
Symbol 174 MovieClip Frame 21
gotoAndPlay ("upgrade1oneTray");
Symbol 174 MovieClip Frame 25
gotoAndPlay ("upgrade2oneTray");
Symbol 174 MovieClip Frame 30
gotoAndPlay ("normaltwoTray");
Symbol 174 MovieClip Frame 34
gotoAndPlay ("upgrade1twoTray");
Symbol 174 MovieClip Frame 38
gotoAndPlay ("upgrade2twoTray");
Symbol 178 MovieClip Frame 4
gotoAndPlay ("normalnoTray");
Symbol 178 MovieClip Frame 8
gotoAndPlay ("upgrade1noTray");
Symbol 178 MovieClip Frame 12
gotoAndPlay ("upgrade2noTray");
Symbol 178 MovieClip Frame 17
gotoAndPlay ("normaloneTray");
Symbol 178 MovieClip Frame 21
gotoAndPlay ("upgrade1oneTray");
Symbol 178 MovieClip Frame 25
gotoAndPlay ("upgrade2oneTray");
Symbol 178 MovieClip Frame 30
gotoAndPlay ("normaltwoTray");
Symbol 178 MovieClip Frame 34
gotoAndPlay ("upgrade1twoTray");
Symbol 178 MovieClip Frame 38
gotoAndPlay ("upgrade2twoTray");
Instance of Symbol 188 MovieClip "snd_mc" in Symbol 204 MovieClip [menubar] Frame 1
onClipEvent (load) {
if (_root.soundReady) {
_root.menubar.snd_mc.gotoAndStop(2);
} else {
_root.menubar.snd_mc.gotoAndStop(1);
}
}
on (release) {
if (_root.soundReady) {
_root.soundReady = false;
stopAllSounds();
_root.menubar.snd_mc.gotoAndStop(1);
} else {
_root.music.start();
_root.soundReady = true;
_root.menubar.snd_mc.gotoAndStop(2);
}
}
Symbol 213 MovieClip [dresschange] Frame 9
removeMovieClip(this);
Symbol 213 MovieClip [dresschange] Frame 10
stop();
Symbol 226 MovieClip Frame 1
stop();
Symbol 237 MovieClip Frame 14
gotoAndPlay ("normal");
Symbol 237 MovieClip Frame 28
gotoAndPlay ("unhappy");
Symbol 237 MovieClip Frame 42
gotoAndPlay ("angry");
Symbol 241 MovieClip Frame 1
stop();
Symbol 245 MovieClip Frame 1
stop();
Symbol 255 MovieClip Frame 14
gotoAndPlay ("normal");
Symbol 255 MovieClip Frame 28
gotoAndPlay ("unhappy");
Symbol 255 MovieClip Frame 42
gotoAndPlay ("angry");
Symbol 263 MovieClip Frame 14
gotoAndPlay ("normal");
Symbol 263 MovieClip Frame 28
gotoAndPlay ("unhappy");
Symbol 263 MovieClip Frame 42
gotoAndPlay ("angry");
Symbol 268 MovieClip Frame 14
gotoAndPlay ("normal");
Symbol 268 MovieClip Frame 28
gotoAndPlay ("unhappy");
Symbol 268 MovieClip Frame 42
gotoAndPlay ("angry");
Symbol 325 MovieClip Frame 8
gotoAndPlay ("walk");
Symbol 325 MovieClip Frame 28
gotoAndPlay ("situp1");
Symbol 325 MovieClip Frame 49
gotoAndPlay ("situp");
Symbol 325 MovieClip Frame 50
stop();
Symbol 340 MovieClip [table] Frame 1
stop();
Symbol 343 MovieClip Frame 1
Symbol 347 MovieClip Frame 1
Symbol 348 MovieClip Frame 1
Symbol 355 Button
on (release) {
_root.helpDisplay_mc.removeMovieClip();
this.removeMovieClip();
_root.Psd = false;
_root.Paused = false;
_root.togglePause();
}
Symbol 365 MovieClip Frame 1
_root.stop();
Symbol 365 MovieClip Frame 2
fLoaded = Math.round(_root.getBytesLoaded());
fTotal = Math.round(_root.getBytesTotal());
fPercent = fLoaded / fTotal;
loaderTxt.text = ("Loading... " + Math.round(fPercent * 100)) + "%";
logoMask._y = 60 - (fPercent * 70);
if (fLoaded >= fTotal) {
loaderTxt._y = -3000;
loaderTxt._x = -3000;
_parent.play();
} else {
gotoAndPlay (1);
}
Symbol 381 MovieClip Frame 1
stop();
fSitebutton.onRelease = function () {
getURL ("http://www.games2girls.com/", "_blank");
};
Symbol 381 MovieClip Frame 123
stop();
_root.play();
Symbol 388 Button
on (release) {
_root.gotoAndPlay("game");
}
Symbol 398 Button
on (release) {
gotoAndPlay ("help");
}
Symbol 421 Button
on (release) {
gotoAndPlay ("menu");
}
Instance of Symbol 393 MovieClip "snd_mc" in Symbol 424 MovieClip Frame 1
onClipEvent (load) {
if (_root.soundReady) {
_root.menu.snd_mc.gotoAndStop(2);
} else {
_root.menu.snd_mc.gotoAndStop(1);
}
}
on (release) {
if (_root.soundReady) {
_root.soundReady = false;
stopAllSounds();
_root.menu.snd_mc.gotoAndStop(1);
} else {
_root.music.start();
_root.soundReady = true;
_root.menu.snd_mc.gotoAndStop(2);
}
}
Symbol 424 MovieClip Frame 27
stop();
Symbol 424 MovieClip Frame 38
stop();
Symbol 433 MovieClip Frame 17
stop();
_root.Paused = false;
_root.startDiner();
Symbol 433 MovieClip Frame 31
stop();
Symbol 466 MovieClip Frame 1
stop();
Symbol 467 MovieClip Frame 1
stop();
Symbol 468 MovieClip Frame 1
stop();
Symbol 469 MovieClip Frame 1
stop();
Symbol 476 MovieClip [moneyRise] Frame 15
removeMovieClip(this);
Symbol 484 Button
on (release) {
if (_root.day == 0) {
_root.funLevel = (_root.heroineLevel = (_root.chairLevel = "normal"));
_root.tuttiBank = 0;
_root.totalT = 0;
_root.day = 1;
}
_root.menuMusic.stop("music");
_root.gotoAndStop("game");
}
Symbol 488 Button
on (release) {
gotoAndStop ("upgradepage");
}
Symbol 491 Button
on (release) {
if (_root.day == 0) {
_root.funLevel = (_root.heroineLevel = (_root.chairLevel = "normal"));
_root.tuttiBank = 0;
_root.totalT = 0;
_root.day = 1;
}
_root.menuMusic.stop("music");
_root.gotoAndStop("game");
}
Symbol 507 Button
on (release) {
gotoAndStop ("next");
}
Symbol 515 MovieClip Frame 1
stop();
Symbol 518 MovieClip Frame 1
stop();
Symbol 521 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 1
stop();
Symbol 527 MovieClip Frame 1
stop();
Symbol 531 MovieClip Frame 1
stop();
Symbol 541 Button
on (release) {
_root.improve = false;
gotoAndPlay ("nextday");
}
Symbol 554 MovieClip Frame 22
stop();
Symbol 556 Button
on (release) {
_root.improve = true;
gotoAndPlay ("nextday");
}
Symbol 563 MovieClip Frame 22
stop();
Symbol 564 Button
on (release) {
_root.gotoAndPlay("menu");
}
Symbol 569 MovieClip Frame 22
stop();
Symbol 570 MovieClip Frame 1
if (_root.improve) {
currentDay._visible = false;
} else {
nextDay._visible = false;
}
Symbol 570 MovieClip Frame 8
stop();
Symbol 570 MovieClip Frame 9
if (_root.improve) {
currentDay._visible = false;
} else {
nextDay._visible = false;
}
Symbol 570 MovieClip Frame 20
function assignUpgrade(which, id, cost) {
if (_root.tuttiBank >= cost) {
switch (which) {
case "shoe" :
if (_root.heroineLevel == "normal") {
if (id == 1) {
_root.tuttiBank = _root.tuttiBank - cost;
_root.heroineLevel = "upgrade" + id;
}
} else if (Number(_root.heroineLevel.charAt(7)) < id) {
_root.tuttiBank = _root.tuttiBank - cost;
_root.heroineLevel = "upgrade" + id;
}
break;
case "chair" :
if (_root.chairLevel == "normal") {
if (id == 1) {
_root.tuttiBank = _root.tuttiBank - cost;
_root.chairLevel = "upgrade" + id;
}
} else if (Number(_root.chairLevel.charAt(7)) < id) {
_root.tuttiBank = _root.tuttiBank - cost;
_root.chairLevel = "upgrade" + id;
}
break;
case "jukebox" :
if (_root.funLevel == "normal") {
if (id == 1) {
_root.tuttiBank = _root.tuttiBank - cost;
_root.funLevel = "upgrade" + id;
}
} else {
if (Number(_root.funLevel.charAt(7)) >= id) {
break;
}
_root.tuttiBank = _root.tuttiBank - cost;
_root.funLevel = "upgrade" + id;
}
}
initUpgrades();
}
}
function initUpgrades() {
congUpg._visible = false;
upg_shoe1.gotoAndStop(2);
upg_shoe2.gotoAndStop(2);
upg_chair1.gotoAndStop(2);
upg_chair2.gotoAndStop(2);
upg_jukebox1.gotoAndStop(2);
upg_jukebox2.gotoAndStop(2);
switch (_root.chairLevel) {
case "normal" :
upg_chair1.gotoAndStop(3);
break;
case "upgrade1" :
upg_chair1.gotoAndStop(1);
upg_chair2.gotoAndStop(3);
break;
case "upgrade2" :
upg_chair1.gotoAndStop(1);
upg_chair2.gotoAndStop(1);
}
switch (_root.heroineLevel) {
case "normal" :
upg_shoe1.gotoAndStop(3);
break;
case "upgrade1" :
upg_shoe1.gotoAndStop(1);
upg_shoe2.gotoAndStop(3);
break;
case "upgrade2" :
upg_shoe1.gotoAndStop(1);
upg_shoe2.gotoAndStop(1);
}
switch (_root.funLevel) {
case "normal" :
upg_jukebox1.gotoAndStop(3);
break;
case "upgrade1" :
upg_jukebox1.gotoAndStop(1);
upg_jukebox2.gotoAndStop(3);
break;
case "upgrade2" :
upg_jukebox1.gotoAndStop(1);
upg_jukebox2.gotoAndStop(1);
}
}
initUpgrades();
stop();
Instance of Symbol 515 MovieClip "upg_shoe1" in Symbol 570 MovieClip Frame 20
on (release) {
_root.upgrade.assignUpgrade("shoe", 1, 70);
}
Instance of Symbol 518 MovieClip "upg_chair1" in Symbol 570 MovieClip Frame 20
on (release) {
_root.upgrade.assignUpgrade("chair", 1, 100);
}
Instance of Symbol 521 MovieClip "upg_jukebox1" in Symbol 570 MovieClip Frame 20
on (release) {
_root.upgrade.assignUpgrade("jukebox", 1, 120);
}
Instance of Symbol 524 MovieClip "upg_shoe2" in Symbol 570 MovieClip Frame 20
on (release) {
_root.upgrade.assignUpgrade("shoe", 2, 120);
}
Instance of Symbol 527 MovieClip "upg_chair2" in Symbol 570 MovieClip Frame 20
on (release) {
_root.upgrade.assignUpgrade("chair", 2, 150);
}
Instance of Symbol 531 MovieClip "upg_jukebox2" in Symbol 570 MovieClip Frame 20
on (release) {
_root.upgrade.assignUpgrade("jukebox", 2, 170);
}
Symbol 570 MovieClip Frame 26
stop();
Symbol 570 MovieClip Frame 27
stop();
Symbol 570 MovieClip Frame 59
stop();
Symbol 570 MovieClip Frame 86
stop();
Symbol 570 MovieClip Frame 113
stop();