Frame 1
var preProgress = 20;
Frame 2
var loaded = Math.floor((getBytesLoaded() / getBytesTotal()) * 10);
if (preProgress > 0) {
preProgress--;
} else {
progress.gotoAndStop(2 + loaded);
}
Frame 3
if (loaded < 10) {
gotoAndPlay (2);
}
Frame 4
stop();
Frame 5
stop();
Frame 7
function init() {
tab = 0;
while (tab < numTables) {
eval ("custTable" + tab).gotoAndStop("customer_none");
eval ("table_meter" + tab).gotoAndStop("hide");
eval ("table" + tab).gotoAndStop("table_empty");
eval ("custTableOrder" + tab)._visible = false;
tab++;
}
}
function gameOver(type) {
if (type == "failure") {
gotoAndPlay (10);
} else {
gotoAndPlay (8);
}
}
function jakeMovement() {
if (jake.hasFallen) {
jake.gotoAndPlay("j_fall");
} else {
if (jake.hasOrder) {
jake.gotoAndPlay("j_walk_order");
}
if (jake.hasBucket) {
jake.gotoAndPlay("j_walk_cleaning");
}
if (jake.hasTrayFull) {
jake.gotoAndPlay("j_walk_tray_full");
}
if (jake.hasTrayDirty) {
jake.gotoAndPlay("j_walk_tray_dirty");
}
if (jake.hasNothing) {
jake.gotoAndPlay("j_walk");
}
}
}
function speechbubble(jDir) {
if (jDir == "left") {
orderBubble._visible = true;
orderBubble.gotoAndStop("walk_left");
orderBubble._x = jake._x - 50;
orderBubble._y = jake._y;
} else if (jDir == "right") {
orderBubble._visible = true;
orderBubble.gotoAndStop("walk_right");
orderBubble._x = jake._x + 50;
orderBubble._y = jake._y;
} else if (jDir == "up") {
orderBubble._visible = true;
orderBubble.gotoAndStop("walk_up");
orderBubble._x = jake._x - 45;
orderBubble._y = jake._y;
} else if (jDir == "down") {
orderBubble._visible = true;
orderBubble.gotoAndStop("walk_down");
orderBubble._x = jake._x - 45;
orderBubble._y = jake._y;
}
}
function processOrder(type, tableOrderNum, trayPosNum) {
numOrders = orders.length;
ordNum = 0;
while (ordNum < numOrders) {
if (type == "add") {
if (orders[ordNum][0] == 99) {
orders[ordNum][0] = tableOrderNum;
return;
}
}
if (type == "update") {
if (orders[ordNum][0] == tableOrderNum) {
orders[ordNum][0] = orders[3][0];
orders[ordNum][1] = 0;
orders[3][0] = orders[4][0];
orders[4][0] = orders[5][0];
orders[5][0] = 99;
}
}
if (type == "return") {
if (orders[ordNum][0] == tableOrderNum) {
orders[ordNum][0] = 99;
orders[ordNum][1] = 0;
}
if (ordNum == (trayPosNum - 1)) {
orders[trayPosNum - 1][0] = tableOrderNum;
orders[trayPosNum - 1][1] = 0;
eval ("_root.tray_" + trayPosNum)._x = eval (("_root.traysControls.tray_" + trayPosNum) + "_xpos");
eval ("_root.tray_" + trayPosNum)._y = eval (("_root.traysControls.tray_" + trayPosNum) + "_ypos");
}
}
ordNum++;
}
}
function tableTimer(table) {
if (_root.tables[table][0] == 1) {
eval ("_root.table_meter" + table).gotoFrame = eval ("_root.table_meter" + table).gotoFrame + eval ("_root.table_meter" + table).moveFrames;
eval ("_root.table_meter" + table).gotoAndStop(eval ("_root.table_meter" + table).gotoFrame);
}
if (_root.tables[table][3] == 1) {
eval ("_root.table_meter" + table).gotoFrame = 0;
eval ("_root.table_meter" + table).gotoAndStop("hide");
}
if ((_root.tables[table][0] == 1) && (_root.tables[table][3] == 0)) {
if (eval ("_root.table_meter" + table).gotoFrame > 200) {
eval ("_root.table_meter" + table).gotoFrame = 0;
eval ("_root.table_meter" + table).gotoAndStop("hide");
if (_root.orderBubble.orderNum.order.text == _root.tables[table][1]) {
_root.orderBubble._visible = false;
_root.jake.hasOrder = false;
}
_root.tables[table][0] = 0;
_root.tables[table][1] = 0;
_root.tables[table][2] = 0;
_root.tables[table][3] = 0;
_root.tables[table][4] = 1;
_root.tables[table][5] = 0;
eval ("_root.table" + table).gotoAndStop("table_empty");
eval ("custTable" + table).gotoAndStop("customer_none");
eval ("_root.custTableOrder" + table)._visible = false;
updateCustLevel("serve_none_tip");
}
}
}
function tableTips(table) {
frameServed = eval ("_root.table_meter" + table)._currentframe;
if (frameServed > 1) {
tip = "green";
}
if (frameServed > 140) {
tip = "amber";
}
if (frameServed > 185) {
tip = "none";
}
return(tip);
}
function updateCustLevel(tipType) {
currentLevel = _root.gameInterface.csLevel._currentframe;
switch (tipType) {
case "serve_green_tip" :
if (currentLevel <= 5) {
_root.gameInterface.csLevel.gotoAndStop(0);
} else {
_root.gameInterface.csLevel.gotoAndStop(currentLevel - 5);
}
break;
case "serve_amber_tip" :
_root.gameInterface.csLevel.gotoAndStop(currentLevel + 10);
break;
case "serve_none_tip" :
if (currentLevel > 196) {
_root.gameInterface.csLevel.gotoAndStop(201);
_root.gameOver("failure");
} else {
_root.gameInterface.csLevel.gotoAndStop(currentLevel + 20);
}
}
}
stop();
tables = new Array([0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 0]);
orders = new Array([99, 0], [99, 0], [99, 0], [99, 0], [99, 0], [99, 0]);
spillPos = new Array([260, 160], [410, 160], [560, 160], [260, 220], [410, 220], [560, 220]);
var tips = 0;
var numTrays = 3;
var numTables = tables.length;
var timer = 300;
var finalTips = "";
init();
Instance of Symbol 95 MovieClip "table0" in Frame 7
onClipEvent (load) {
tableNum = 0;
eatingTimeStart = false;
}
onClipEvent (enterFrame) {
if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart == false)) {
eatingTime = 100;
eatingTimeStart = true;
} else if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart)) {
eatingTime--;
if (eatingTime == 0) {
this.gotoAndStop("table_dirty");
_root.tables[tableNum][5] = 0;
eval ("_root.custTable" + tableNum).gotoAndStop("customer_none");
eatingTimeStart = false;
}
}
}
Instance of Symbol 95 MovieClip "table1" in Frame 7
onClipEvent (load) {
tableNum = 1;
eatingTimeStart = false;
}
onClipEvent (enterFrame) {
if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart == false)) {
eatingTime = 100;
eatingTimeStart = true;
} else if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart)) {
eatingTime--;
if (eatingTime == 0) {
this.gotoAndStop("table_dirty");
_root.tables[tableNum][5] = 0;
eval ("_root.custTable" + tableNum).gotoAndStop("customer_none");
eatingTimeStart = false;
}
}
}
Instance of Symbol 95 MovieClip "table2" in Frame 7
onClipEvent (load) {
tableNum = 2;
eatingTimeStart = false;
}
onClipEvent (enterFrame) {
if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart == false)) {
eatingTime = 100;
eatingTimeStart = true;
} else if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart)) {
eatingTime--;
if (eatingTime == 0) {
this.gotoAndStop("table_dirty");
_root.tables[tableNum][5] = 0;
eval ("_root.custTable" + tableNum).gotoAndStop("customer_none");
eatingTimeStart = false;
}
}
}
Instance of Symbol 95 MovieClip "table5" in Frame 7
onClipEvent (load) {
tableNum = 5;
eatingTimeStart = false;
}
onClipEvent (enterFrame) {
if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart == false)) {
eatingTime = 100;
eatingTimeStart = true;
} else if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart)) {
eatingTime--;
if (eatingTime == 0) {
this.gotoAndStop("table_dirty");
_root.tables[tableNum][5] = 0;
eval ("_root.custTable" + tableNum).gotoAndStop("customer_none");
eatingTimeStart = false;
}
}
}
Instance of Symbol 95 MovieClip "table4" in Frame 7
onClipEvent (load) {
tableNum = 4;
eatingTimeStart = false;
}
onClipEvent (enterFrame) {
if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart == false)) {
eatingTime = 100;
eatingTimeStart = true;
} else if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart)) {
eatingTime--;
if (eatingTime == 0) {
_root.tables[tableNum][5] = 0;
this.gotoAndStop("table_dirty");
eval ("_root.custTable" + tableNum).gotoAndStop("customer_none");
eatingTimeStart = false;
}
}
}
Instance of Symbol 95 MovieClip "table3" in Frame 7
onClipEvent (load) {
tableNum = 3;
eatingTimeStart = false;
}
onClipEvent (enterFrame) {
if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart == false)) {
eatingTime = 100;
eatingTimeStart = true;
} else if ((_root.tables[tableNum][3] == 1) && (eatingTimeStart)) {
eatingTime--;
if (eatingTime == 0) {
_root.tables[tableNum][5] = 0;
this.gotoAndStop("table_dirty");
eval ("_root.custTable" + tableNum).gotoAndStop("customer_none");
eatingTimeStart = false;
}
}
}
Instance of Symbol 106 MovieClip "spillage" in Frame 7
onClipEvent (load) {
timeTillNext = 80;
minWaitTime = 80;
additionalWaitTime = 200;
spill_visible = false;
}
onClipEvent (enterFrame) {
timeTillNext--;
if (timeTillNext == 0) {
if (spill_visible == false) {
spill_type = Math.floor(Math.random() * 4) + 1;
spill_position = Math.floor(Math.random() * 6);
jakeHit = _root.jake.hitTest(_root.spillPos[spill_position][0], _root.spillPos[spill_position][1], true);
while (jakeHit) {
spill_position = Math.floor(Math.random() * 6);
jakeHit = _root.jake.hitTest(_root.spillPos[spill_position][0], _root.spillPos[spill_position][1], true);
}
this.gotoAndStop("spill_" + spill_type);
this._x = _root.spillPos[spill_position][0];
this._y = _root.spillPos[spill_position][1];
spill_visible = true;
}
if (_root.timer < 120) {
additionalWaitTime = 100;
}
if (_root.timer < 90) {
additionalWaitTime = 80;
}
if (_root.timer < 60) {
additionalWaitTime = 40;
}
timeTillNext = minWaitTime + additionalWaitTime;
}
}
Instance of Symbol 135 MovieClip "table_meter0" in Frame 7
onClipEvent (load) {
tableNum = 0;
aniLength = 200;
waitingTime = 400;
moveFrames = aniLength / waitingTime;
gotoFrame = 0;
showing = false;
finished = false;
count = 0;
}
onClipEvent (enterFrame) {
_root.tableTimer(tableNum);
}
Instance of Symbol 135 MovieClip "table_meter1" in Frame 7
onClipEvent (load) {
tableNum = 1;
aniLength = 200;
waitingTime = 400;
moveFrames = aniLength / waitingTime;
gotoFrame = 0;
showing = false;
finished = false;
count = 0;
}
onClipEvent (enterFrame) {
_root.tableTimer(tableNum);
}
Instance of Symbol 135 MovieClip "table_meter2" in Frame 7
onClipEvent (load) {
tableNum = 2;
aniLength = 200;
waitingTime = 400;
moveFrames = aniLength / waitingTime;
gotoFrame = 0;
showing = false;
finished = false;
count = 0;
}
onClipEvent (enterFrame) {
_root.tableTimer(tableNum);
}
Instance of Symbol 135 MovieClip "table_meter3" in Frame 7
onClipEvent (load) {
tableNum = 3;
aniLength = 200;
waitingTime = 400;
moveFrames = aniLength / waitingTime;
gotoFrame = 0;
showing = false;
finished = false;
count = 0;
}
onClipEvent (enterFrame) {
_root.tableTimer(tableNum);
}
Instance of Symbol 135 MovieClip "table_meter4" in Frame 7
onClipEvent (load) {
tableNum = 4;
aniLength = 200;
waitingTime = 400;
moveFrames = aniLength / waitingTime;
gotoFrame = 0;
showing = false;
finished = false;
count = 0;
}
onClipEvent (enterFrame) {
_root.tableTimer(tableNum);
}
Instance of Symbol 135 MovieClip "table_meter5" in Frame 7
onClipEvent (load) {
tableNum = 5;
aniLength = 200;
waitingTime = 400;
moveFrames = aniLength / waitingTime;
gotoFrame = 0;
showing = false;
finished = false;
count = 0;
}
onClipEvent (enterFrame) {
_root.tableTimer(tableNum);
}
Instance of Symbol 139 MovieClip "traysControls" in Frame 7
onClipEvent (load) {
tray_1_xpos = 20;
tray_1_ypos = 155;
tray_2_xpos = 20;
tray_2_ypos = 225;
tray_3_xpos = 20;
tray_3_ypos = 305;
curOrderLength = _root.orders.length;
}
onClipEvent (enterFrame) {
tr = 1;
while (tr <= 3) {
if ((_root.orders[tr - 1][0] != 99) && (_root.orders[tr - 1][1] == 0)) {
arrayTrayNum = tr - 1;
eval ("_root.tray_" + tr)._x = eval (("tray_" + tr) + "_xpos");
eval ("_root.tray_" + tr)._y = eval (("tray_" + tr) + "_ypos");
eval ("_root.tray_" + tr).trayNum.text = _root.orders[arrayTrayNum][0];
}
if ((_root.orders[tr - 1][0] == 99) && (_root.orders[tr - 1][1] == 0)) {
eval ("_root.tray_" + tr)._x = -200;
eval ("_root.tray_" + tr)._y = 0;
}
tr++;
}
}
Instance of Symbol 168 MovieClip "jake" in Frame 7
onClipEvent (load) {
var speed = 4;
var dX = 0;
var dY = 0;
var action = false;
var walking = false;
var hasNothing = true;
var hasOrder = false;
var hasBucket = false;
var hasTrayFull = false;
var hasTrayDirty = false;
var hasFallen = false;
var jDirection = "right";
var fallCount = 0;
var fallLength = 80;
var currentTray = 99;
}
onClipEvent (enterFrame) {
if (hasFallen) {
walking = false;
dX = 0;
dY = 0;
fallCount++;
if (fallCount == fallLength) {
fallCount = 0;
hasFallen = false;
if (jDirection == "left") {
this._x = this._x + (_root.spillage._width / 2);
}
if (jDirection == "right") {
this._x = this._x - (_root.spillage._width / 2);
}
if (jDirection == "up") {
this._y = this._y + (_root.spillage._height / 2);
}
if (jDirection == "down") {
this._y = this._y - (_root.spillage._height / 2);
}
}
} else if (Key.isDown(37)) {
dX = dX - speed;
this._rotation = 0;
jDirection = "left";
walking = true;
} else if (Key.isDown(39)) {
dX = dX + speed;
this._rotation = 180;
jDirection = "right";
walking = true;
} else if (Key.isDown(40)) {
dY = dY + speed;
this._rotation = -90;
jDirection = "down";
walking = true;
} else if (Key.isDown(38)) {
dY = dY - speed;
this._rotation = 90;
jDirection = "up";
walking = true;
} else if (Key.isDown(32)) {
walking = false;
if (this.hit_zone.hitTest(_root.till_zone)) {
if (hasOrder) {
_root.sound_effects.gotoAndPlay("jake_till");
hasOrder = false;
_root.orderBubble._visible = false;
_root.processOrder("add", _root.orderBubble.orderNum.order.text, 0);
}
}
tray = 1;
while (tray <= _root.numTrays) {
if (this.hit_zone.hitTest(eval (("_root.tray_" + tray) + "_zone"))) {
if (((hasNothing && (jDirection == "left")) && (action == false)) && (_root.orders[tray - 1][0] != 99)) {
eval ("_root.tray_" + tray)._x = -200;
eval ("_root.tray_" + tray)._y = 0;
_root.orders[tray - 1][1] = 1;
hasTrayFull = true;
hasNothing = false;
currentTray = eval ("_root.tray_" + tray).trayNum.text;
action = true;
}
if (((hasTrayFull && (jDirection == "left")) && (action == false)) && (hasOrder == false)) {
_root.processOrder("return", currentTray, tray);
hasTrayFull = false;
hasNothing = true;
currentTray = 99;
action = true;
}
}
tray++;
}
table = 0;
while (table < _root.numTables) {
isSeated = _root.tables[table][0];
orderNum = _root.tables[table][1];
orderTaken = _root.tables[table][2];
isServed = _root.tables[table][3];
isClean = _root.tables[table][4];
customer = _root.tables[table][5];
service_type = _root.tables[table][6];
tableOrderNum = eval ("_root.custTableOrder" + table).order.text;
if (this.hit_zone.hitTest(eval (("_root.table_" + table) + "_zone"))) {
if (((jDirection == "up") && (((table == 0) || (table == 1)) || (table == 2))) || ((jDirection == "down") && (((table == 3) || (table == 4)) || (table == 5)))) {
if ((((hasNothing && (isSeated == 1)) && (orderTaken == 0)) && (hasOrder == false)) && (currentTray == 99)) {
orderTaken = 1;
_root.orderBubble.orderNum.order.text = orderNum;
eval ("_root.custTableOrder" + table)._visible = true;
eval ("_root.custTableOrder" + table).order.text = orderNum;
hasOrder = true;
} else if ((((hasTrayFull && (currentTray == tableOrderNum)) && (orderTaken == 1)) && (isSeated == 1)) && (hasOrder == false)) {
isClean = 0;
isServed = 1;
hasTrayFull = false;
hasNothing = true;
_root.processOrder("update", currentTray, 0);
currentTray = 99;
_root.sound_effects.gotoAndPlay("jake_serve");
eval ("_root.table" + table).gotoAndStop("table_served");
eval ("_root.custTable" + table).gotoAndStop(("customer_" + customer) + "_active");
service_type = ("serve_" + _root.tableTips(table)) + "_tip";
_root.updateCustLevel(service_type);
} else if (((((hasNothing && (isServed == 1)) && (isClean == 0)) && (customer == 0)) && (action == false)) && (hasOrder == false)) {
hasNothing = false;
hasTrayDirty = true;
isSeated = 0;
orderNum = 99;
orderTaken = 0;
isServed = 0;
isClean = 1;
customer = 0;
_root.sound_effects.gotoAndPlay("jake_clean");
eval ("_root.table" + table).gotoAndStop("table_empty");
eval ("_root.custTableOrder" + table)._visible = false;
if (service_type != "serve_none_tip") {
eval ("_root.tip_box" + table).gotoAndPlay(service_type);
}
service_type = 0;
action = true;
}
_root.tables[table][0] = isSeated;
_root.tables[table][1] = orderNum;
_root.tables[table][2] = orderTaken;
_root.tables[table][3] = isServed;
_root.tables[table][4] = isClean;
_root.tables[table][5] = customer;
_root.tables[table][6] = service_type;
}
}
table++;
}
if (this.hit_zone.hitTest(_root.bin_zone)) {
if (((hasTrayDirty && (jDirection == "down")) && (action == false)) && (hasOrder == false)) {
hasTrayDirty = false;
hasNothing = true;
action = true;
_root.sound_effects.gotoAndPlay("jake_bin");
_root.mc_bin.gotoAndPlay("clearTray_active");
}
tempOrderFound = false;
tab = 0;
while (tab < 6) {
if (_root.tables[tab][1] == currentTray) {
tempOrderFound = true;
}
tab++;
}
if ((((hasTrayFull && (jDirection == "down")) && (action == false)) && (tempOrderFound == false)) && (hasOrder == false)) {
hasTrayFull = false;
hasNothing = true;
action = true;
_root.processOrder("update", currentTray, 0);
currentTray = 99;
_root.mc_bin.gotoAndPlay("clearTray_active");
}
}
if (this.hit_zone.hitTest(_root.cleaning_zone)) {
if (((hasNothing && (jDirection == "up")) && (action == false)) && (hasOrder == false)) {
_root.mc_cupboard.gotoAndPlay("get_mop");
hasBucket = true;
hasNothing = false;
action = true;
} else if (((hasBucket && (jDirection == "up")) && (action == false)) && (hasOrder == false)) {
_root.mc_cupboard.gotoAndPlay("return_mop");
hasBucket = false;
hasNothing = true;
action = true;
_root.jakeMovement();
}
}
} else {
walking = false;
dX = 0;
dY = 0;
}
dX = dX * 0.7;
dY = dY * 0.7;
if (_root.boundaries.hitTest(this._x + dX, this._y + dY, true)) {
if (!_root.boundaries.hitTest(this._x + dX, this._y, true)) {
dY = 0;
} else if (!_root.boundaries.hitTest(this._x, this._y + dY, true)) {
dX = 0;
} else if (!_root.boundaries.hitTest(this._x + (dX / 2), this._y + (dY / 2), true)) {
dX = dX / 2;
dY = dY / 2;
}
} else {
this._x = this._x + dX;
this._y = this._y + dY;
}
if (!walking) {
_root.jakeMovement();
} else {
action = false;
if (hasOrder) {
_root.speechbubble(jDirection);
}
if (this.hit_zone.hitTest(_root.spillage.hit_zone) && (action == false)) {
if (hasBucket) {
action = true;
_root.sound_effects.gotoAndPlay("jake_mop");
_root.tip_box._x = _root.spillage._x;
_root.tip_box._y = _root.spillage._y;
_root.tip_box.gotoAndPlay("mop_tip");
_root.spillage._x = -200;
_root.spillage._y = 0;
hasBucket = false;
hasNothing = true;
_root.spillage.spill_visible = false;
_root.jakeMovement();
} else {
_root.sound_effects.gotoAndPlay("jake_fall");
hasFallen = true;
}
}
}
}
Instance of Symbol 201 MovieClip in Frame 7
onClipEvent (load) {
frames = 0;
fps = 20;
}
onClipEvent (enterFrame) {
frames++;
if (frames == fps) {
_root.timer--;
frames = 0;
}
mins = Math.floor(_root.timer / 60);
seconds = _root.timer - (mins * 60);
mins = "0" + mins;
if (seconds < 10) {
seconds = "0" + seconds;
}
_root.gameInterface.timer.text = (mins + ":") + seconds;
if (_root.timer == 0) {
_root.gameOver("success");
}
pounds = Math.floor(_root.tips);
pence = (_root.tips - pounds) * 100;
if (pence < 10) {
pence = "00";
}
_root.gameInterface.tips.text = (("\u00A3" + pounds) + ".") + pence;
_root.finalTips = _root.gameInterface.tips.text;
}
Instance of Symbol 204 MovieClip in Frame 7
onClipEvent (load) {
waitTillNext = 1;
minWaitTime = 100;
additionalWaitTime = 140;
}
onClipEvent (enterFrame) {
waitTillNext--;
if (waitTillNext == 0) {
table_num = Math.floor(Math.random() * 6);
customer_num = Math.floor(Math.random() * 3) + 1;
order_num = Math.floor(Math.random() * 6) + 1;
tableFull = _root.tables[table_num][0];
tableCount = 0;
do {
if (tableFull != 1) {
break;
}
table_num = Math.floor(Math.random() * 6);
tableFull = _root.tables[table_num][0];
tableCount++;
} while (tableCount != 6);
orderFound = false;
orderCount = 0;
tab = 0;
while (tab < 6) {
if ((_root.tables[tab][1] == order_num) || (_root.orders[tab][0] == order_num)) {
orderFound = true;
}
tab++;
}
do {
if (!orderFound) {
break;
}
orderFound = false;
order_num = Math.floor(Math.random() * 6) + 1;
orderCount++;
tab = 0;
while (tab < 6) {
if ((_root.tables[tab][1] == order_num) || (_root.orders[tab][0] == order_num)) {
orderFound = true;
break;
}
tab++;
}
} while (orderCount != 6);
if ((tableFull == 0) && (orderFound == false)) {
_root.tables[table_num][0] = 1;
_root.tables[table_num][1] = order_num;
_root.tables[table_num][5] = customer_num;
eval ("_root.custTable" + table_num).gotoAndStop(("customer_" + customer_num) + "_idle");
eval ("_root.table_meter" + table_num).waitingTime = 400 + Math.floor(Math.random() * 1200);
eval ("_root.table_meter" + table_num).gotoAndStop("show");
}
if (_root.timer < 180) {
additionalWaitTime = 120;
}
if (_root.timer < 150) {
additionalWaitTime = 100;
}
if (_root.timer < 120) {
additionalWaitTime = 80;
}
if (_root.timer < 90) {
additionalWaitTime = 40;
}
if (_root.timer < 60) {
additionalWaitTime = 0;
}
waitTillNext = minWaitTime + additionalWaitTime;
}
}
Frame 8
stopAllSounds();
Frame 9
stop();
Frame 10
stopAllSounds();
Frame 11
stop();
Symbol 13 MovieClip Frame 1
stop();
Symbol 28 Button
on (release) {
gotoAndPlay (6);
}
Symbol 34 Button
on (release) {
gotoAndPlay (5);
}
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 2
stop();
Symbol 95 MovieClip Frame 3
stop();
Symbol 102 MovieClip Frame 1
stop();
_parent.aniFinished = false;
Symbol 102 MovieClip Frame 12
stop();
_parent.aniFinished = true;
Symbol 102 MovieClip Frame 23
stop();
_parent.aniFinished = true;
Symbol 104 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
stop();
Symbol 106 MovieClip Frame 3
stop();
Symbol 106 MovieClip Frame 4
stop();
Symbol 127 MovieClip Frame 2
stop();
Symbol 127 MovieClip Frame 3
stop();
Symbol 127 MovieClip Frame 4
stop();
Symbol 127 MovieClip Frame 6
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 13
gotoAndPlay ("j_walk");
Symbol 168 MovieClip Frame 25
gotoAndPlay ("j_walk_tray_full");
Symbol 168 MovieClip Frame 37
gotoAndPlay ("j_walk_tray_empty");
Symbol 168 MovieClip Frame 49
gotoAndPlay ("j_walk_tray_dirty");
Symbol 168 MovieClip Frame 61
gotoAndPlay ("j_walk_cleaning");
Symbol 168 MovieClip Frame 73
gotoAndPlay ("j_walk_order");
Symbol 168 MovieClip Frame 74
stop();
Symbol 168 MovieClip Frame 84
gotoAndPlay ("j_idle");
Symbol 171 MovieClip Frame 1
stop();
Symbol 171 MovieClip Frame 2
stop();
Symbol 171 MovieClip Frame 3
stop();
Symbol 171 MovieClip Frame 4
stop();
Symbol 180 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 8
gotoAndStop (1);
Symbol 180 MovieClip Frame 15
gotoAndStop (1);
Symbol 180 MovieClip Frame 22
gotoAndStop (1);
Symbol 180 MovieClip Frame 29
gotoAndStop (1);
Symbol 180 MovieClip Frame 36
gotoAndStop (1);
Symbol 180 MovieClip Frame 43
gotoAndStop (1);
Symbol 185 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 17
_root.tips = _root.tips + 0.5;
stop();
gotoAndStop (1);
Symbol 185 MovieClip Frame 34
_root.tips = _root.tips + 2;
stop();
gotoAndStop (1);
Symbol 185 MovieClip Frame 51
_root.tips = _root.tips + 1;
stop();
gotoAndStop (1);
Symbol 195 MovieClip Frame 1
stop();
Symbol 214 Button
on (release) {
gotoAndPlay (4);
}