Frame 1
function makepercent(n, min, max) {
return(Math.floor(((n - min) / (max - min)) * 100));
}
contextmenu = new ContextMenu();
contextmenu.hideBuiltInItems();
_root.menu = contextmenu;
var loadin = 1;
this.onEnterFrame = function () {
if (loadin) {
var _local2 = makepercent(_root.getBytesLoaded(), 0, _root.getBytesTotal());
_root.percent.text = _local2 + "%";
if (_local2 == 100) {
loadin = 0;
_root.gotoAndStop("load");
}
}
};
this.stop();
Frame 2
this.prevFrame();
Frame 10
function gstate_transition(gstate, gaction) {
switch (gstate) {
case "enterpool" :
return("swim");
case "exitpool" :
return("swimsuit");
case "enterexitbed" :
if (gaction == "walkE") {
return("bed");
}
return("");
}
return(gstate);
}
function nomovement_transition(gstate) {
switch (gstate) {
case "enterpool" :
return(1);
case "exitpool" :
return(1);
case "enterexitbed" :
return(1);
}
return(0);
}
function singleton1(v) {
var _local2 = "ax12y33";
_root.fg.sorted[_local2].mc.play();
if (v) {
advancestates("sub_bitch,sub_les");
}
}
function change_clocks(t) {
t = t.split(",");
world_state.hour = Number(t[0]);
world_state.minute = Number(t[1]);
}
function change_world(t) {
t = t.split(",");
world_state[t[0]] = Number(t[1]);
if (t[0] == "state") {
var _local1 = 0;
while (_local1 < world_sprites.length) {
world_sprites[_local1][0].state++;
_local1++;
}
createarea();
var _local3 = world_sprites[0][0];
cam(Math.floor((_local3.tx * tilep.w) / Stage.width), Math.floor((_local3.ty * tilep.h) / Stage.height));
}
}
function locks(t) {
t = t.split(",");
var _local1 = 0;
while (_local1 < t.length) {
var _local3 = ((t[_local1] == "A") ? (world_interactA[Number(t[_local1 + 1])][Number(t[_local1 + 2])]) : (world_interactB[Number(t[_local1 + 1])][Number(t[_local1 + 2])]));
var _local4 = Number(t[_local1 + 3]);
if (_local4 == 2) {
_local3.lock = 1;
_local3.locktxt = t[_local1 + 4];
_local1 = _local1 + 1;
} else if (_local4 == 3) {
_local3.touch = Number(t[_local1 + 4]);
_local1 = _local1 + 1;
} else {
_local3.lock = _local4;
}
_local1++;
}
_local1 = _local1 + 3;
}
function advancestates(t, t2) {
t = t.split(",");
if (t2 != undefined) {
t2 = t2.split(",");
if (t2[0] == "if") {
var _local4 = 0;
var _local2 = 0;
while (_local2 < t.length) {
_local4 = _local4 + ((world_sprites[sub_numbers[t[_local2]]][0].state == Number(t2[_local2 + 1])) ? 1 : 0);
_local2++;
}
if (t.length == _local4) {
t2 = t2.slice(-_local4);
} else {
return(undefined);
}
}
var _local2 = 0;
while (_local2 < t.length) {
world_sprites[sub_numbers[t[_local2]]][0].state = Number(t2[_local2]);
_local2++;
}
return(undefined);
}
var _local2 = 0;
while (_local2 < t.length) {
world_sprites[sub_numbers[t[_local2]]][0].state++;
_local2++;
}
}
function refpush(t) {
t = t.split(",");
var _local3 = 0;
while (_local3 < t.length) {
var _local2 = sub_numbers[t[_local3]];
var _local1 = world_sprites[_local2][0];
update_mainstate(_local1, world_sprites[_local2][_local1.state]);
ref_sprites.push(_local2);
var _local4 = ((_local1.ganim == undefined) ? 1 : (_local1.ganim));
attachsprite(_local2, _local4);
_local3++;
}
}
function gameinit(lvl) {
if (design) {
backup_tilesA = copyarr(world_tilesA);
backup_tilesB = copyarr(world_tilesB);
}
backup_interactA = copyarr(world_interactA);
backup_interactB = copyarr(world_interactB);
bgaud.setVolume(100);
timer = 0;
backup_sprites = copyarr(world_sprites);
backup_world_state = copyob(world_state);
gamep = {state:"playing", timer:0, fcount:0, tcount:0, fpt:4, fps:60, snd:""};
gamep.tps = Math.round(gamep.fps / gamep.fpt);
frameon("game");
_root.fg._xscale = tilep.zoom;
_root.fg._yscale = tilep.zoom;
_root.overlay.gotoAndStop("game");
_root.overlay.spc.gotoAndStop(3);
if (!design) {
cam(0, 1);
}
createarea();
playerzone_check();
}
function gameexit() {
gamep.state = "exiting";
if (design) {
world_tilesA = copyarr(backup_tilesA);
world_tilesB = copyarr(backup_tilesB);
}
world_interactA = copyarr(backup_interactA);
world_interactB = copyarr(backup_interactB);
world_sprites = copyarr(backup_sprites);
world_state = copyob(backup_world_state);
}
function superexit() {
frameon("menu");
}
function simulation() {
snd_fade();
if (gamep.state == "text") {
textcontrol();
} else if (gamep.state == "cutscene") {
if (_root.overlay.mc._currentframe == _root.overlay.mc._totalframes) {
finishcutscene();
snd_initfade("bgaud", 0, 1, 100);
}
}
if (gamep.state != "playing") {
return(undefined);
}
gamep.timer++;
pdelay();
gamep.fcount = (((gamep.fcount + 1) == gamep.fpt) ? 0 : (gamep.fcount + 1));
if (gamep.fcount != 0) {
return(undefined);
}
gamep.tcount++;
var _local3 = 0;
while (_local3 < ref_sprites.length) {
var _local2 = ref_sprites[_local3];
var _local4 = world_sprites[_local2][0];
if (!_local4.live) {
} else {
_local4.ganim = _root.fg.sorted["s" + _local2].mc.mc._currentframe;
if (_local2 == 0) {
player();
} else {
npc(_local2);
}
if (gamep.state != "playing") {
return(undefined);
}
}
_local3++;
}
}
function npc(id) {
var _local1 = world_sprites[id][0];
var _local2 = world_sprites[id][_local1.state];
if (_local2.statejump) {
update_mainstate(_local1, _local2);
movesprite(id);
} else if (_local2.dir != undefined) {
var _local5 = world_sprites[id][_local1.state + 1];
if (_local2.dir == "ud") {
var _local4 = ((_local1.ty < _local5.ty) ? "d" : "u");
_local1.gaction = ((_local4 == "d") ? "walkS" : "walkN");
} else if (_local2.dir == "lr") {
var _local4 = ((_local1.tx < _local5.tx) ? "r" : "l");
_local1.gaction = ((_local4 == "r") ? "walkE" : "walkW");
} else {
var _local4 = _local2.dir;
}
update_gstate(id, _local2);
var _local6 = 0;
if ((_local4 == "u") || (_local4 == "d")) {
if (_local1.ty == _local5.ty) {
_local6 = 1;
}
} else if (_local1.tx == _local5.tx) {
_local6 = 1;
}
if (_local6) {
_local1.state++;
update_gstate(id, _local5);
movesprite(id);
playerzone_check();
return(undefined);
}
if ((_local4 == "u") || (_local4 == "d")) {
var _local8 = ((_local4 == "u") ? "d" : "u");
} else {
var _local8 = ((_local4 == "l") ? "r" : "l");
}
var _local7 = checktileto(_local4, _local8, id);
if (_local7 != 0) {
preparespritemove(id, _local2.spd, _local7);
if (_local2.spd != undefined) {
_local1.spd = _local2.spd;
}
}
} else {
update_gstate(id, _local2);
movesprite(id);
}
}
function player_statejump() {
var _local2 = 0;
var _local1 = world_sprites[_local2][0];
var _local3 = world_sprites[_local2][_local1.state];
if (_local3.statejump) {
update_mainstate(_local1, _local3);
if ((((_local1.tx < tilearea.xMin) || (_local1.tx >= tilearea.xMax)) || (_local1.ty < tilearea.yMin)) || (_local1.ty >= tilearea.yMax)) {
cam(Math.floor((_local1.tx * tilep.w) / Stage.width), Math.floor((_local1.ty * tilep.h) / Stage.height));
} else {
movesprite(_local2);
}
}
}
function player() {
var _local6 = 0;
var _local3 = world_sprites[_local6][0];
if ((((_local3.tx < tilearea.xMin) || (_local3.tx >= tilearea.xMax)) || (_local3.ty < tilearea.yMin)) || (_local3.ty >= tilearea.yMax)) {
cam(Math.floor((_local3.tx * tilep.w) / Stage.width), Math.floor((_local3.ty * tilep.h) / Stage.height));
}
var _local2 = interact_check();
if (_local2 != -1) {
if (_local2.push == undefined) {
_root.overlay.spc.gotoAndStop(1);
if (clicks.space == 1) {
clicks.space = 2;
var _local10 = 1;
}
} else if (clicks.up && (_local2.push == "u")) {
clicks.up = 2;
var _local10 = 1;
} else if (clicks.down && (_local2.push == "d")) {
clicks.down = 2;
var _local10 = 1;
} else if (clicks.left && (_local2.push == "l")) {
clicks.left = 2;
var _local10 = 1;
} else if (clicks.right && (_local2.push == "r")) {
clicks.right = 2;
var _local10 = 1;
}
if (_local10) {
if (_local2.id != undefined) {
var _local4 = world_sprites[_local2.id][0];
var _local5 = world_sprites[_local2.id][_local4.state];
}
if (_local5.taction || (_local5.tstate)) {
if (_local5.taction == "face") {
switch (_local3.gaction) {
case "standN" :
_local4.gaction = "standS";
break;
case "standS" :
_local4.gaction = "standN";
break;
case "standE" :
_local4.gaction = "standW";
break;
case "standW" :
_local4.gaction = "standE";
}
} else if (_local5.taction) {
_local4.gaction = _local5.taction;
}
movesprite(_local2.id);
}
var _local12 = performaction(world_text[_local2.txt]);
if (_local5.touchskip) {
_local4.state++;
}
if (_local12) {
return(undefined);
}
if (_local2.tx != undefined) {
var _local9 = (_local3.l ? ((("bx" + _local2.tx) + "y") + _local2.ty) : ((("ax" + _local2.tx) + "y") + _local2.ty));
_root.fg.sorted[_local9].mc.play();
}
return(undefined);
}
} else {
_root.overlay.spc.gotoAndStop(3);
if (clicks.space == 1) {
clicks.space = 2;
}
}
if (clicks.up && (clicks.canup)) {
clicks.up = 2;
var _local8 = "u";
var _local11 = "d";
_local3.gaction = "walkN";
} else if (clicks.down && (clicks.candown)) {
clicks.down = 2;
var _local8 = "d";
var _local11 = "u";
_local3.gaction = "walkS";
} else if (clicks.left && (clicks.canleft)) {
clicks.left = 2;
var _local8 = "l";
var _local11 = "r";
_local3.gaction = "walkW";
} else if (clicks.right && (clicks.canright)) {
clicks.right = 2;
var _local8 = "r";
var _local11 = "l";
_local3.gaction = "walkE";
} else {
changestand(_local6);
}
if (_local8) {
var _local7 = checktileto(_local8, _local11, _local6);
if (_local7 != 0) {
_root.overlay.spc.gotoAndStop(3);
preparespritemove(_local6, undefined, _local7);
} else {
changestand(_local6);
}
}
}
function changestand(id) {
var _local1 = world_sprites[id][0];
switch (_local1.gaction) {
case "walkN" :
_local1.gaction = "standN";
break;
case "walkS" :
_local1.gaction = "standS";
break;
case "walkE" :
_local1.gaction = "standE";
break;
case "walkW" :
_local1.gaction = "standW";
break;
}
movesprite(id);
}
function finishcutscene() {
_root.overlay.gotoAndStop("game");
_root.overlay.spc.gotoAndStop(3);
gamep.state = "playing";
clicks.up = 0;
clicks.down = 0;
clicks.left = 0;
clicks.right = 0;
clicks.space = 2;
playerzone_check();
}
function interact_check() {
var _local10 = 0;
var _local6 = world_sprites[_local10][0];
if ((_local6.gaction == "standN") || (_local6.gaction == "standS")) {
var _local7 = {tx:_local6.tx};
_local7.ty = ((_local6.gaction == "standN") ? (_local6.ty - 1) : (_local6.ty + 1));
var _local9 = ((_local6.gaction == "standN") ? "u" : "d");
var _local5 = ((_local9 == "d") ? "u" : "d");
var _local14 = ((_local9 == "d") ? "standN" : "standS");
} else {
var _local7 = {ty:_local6.ty};
_local7.tx = ((_local6.gaction == "standW") ? (_local6.tx - 1) : (_local6.tx + 1));
var _local9 = ((_local6.gaction == "standW") ? "l" : "r");
var _local5 = ((_local9 == "r") ? "l" : "r");
var _local14 = ((_local9 == "r") ? "standW" : "standE");
}
var _local4 = 0;
while (_local4 < ref_sprites.length) {
var _local2 = ref_sprites[_local4];
if (_local2 == _local10) {
} else {
var _local3 = world_sprites[_local2][0];
if (((!_local3.live) || (_local3.tx != _local7.tx)) || (_local3.ty != _local7.ty)) {
} else {
var _local1 = world_sprites[_local2][_local3.state];
if (_local1.touchx != undefined) {
return({txt:_local1.touchx, id:_local2});
}
if (_local1.pushx != undefined) {
return({txt:_local1.pushx, id:_local2, push:_local9});
}
if (_local1["touch" + _local5] != undefined) {
var _local8 = _local1["touch" + _local5];
return({txt:_local8, id:_local2});
}
if (_local1["push" + _local5] != undefined) {
var _local8 = _local1["push" + _local5];
return({txt:_local8, id:_local2, push:_local9});
}
}
}
_local4++;
}
tlon = (_local6.l ? (world_interactB[_local7.tx][_local7.ty]) : (world_interactA[_local7.tx][_local7.ty]));
if ((tlon.touch != undefined) && (tlon.touch != -1)) {
return({txt:tlon.touch, tx:_local7.tx, ty:_local7.ty});
}
var tlon = (_local6.l ? (world_interactB[_local6.tx][_local6.ty]) : (world_interactA[_local6.tx][_local6.ty]));
if (tlon.touch != undefined) {
return({txt:tlon.touch, tx:_local6.tx, ty:_local6.ty});
}
return(-1);
}
function playerzone_check() {
var _local1 = world_sprites[0][0];
if (_local1.turnarrive != 0) {
return(undefined);
}
var _local4 = 0;
for ( ; _local4 < ref_sprites.length ; _local4++) {
var _local3 = ref_sprites[_local4];
var _local5 = world_sprites[_local3][0];
var _local2 = world_sprites[_local3][_local5.state];
if (_local2.pa == undefined) {
} else if ((_local2.pdelay != undefined) && (_local1.pdelay > -1)) {
} else if ((_local2.pxmin == undefined) || ((((_local2.pxmin <= _local1.tx) && (_local2.pxmax >= _local1.tx)) && (_local2.pymin <= _local1.ty)) && (_local2.pymax >= _local1.ty))) {
if (_local2.pdelay != undefined) {
if (_local1.pdelay == -1) {
_local1.pdelay = gamep.timer + (_local2.pdelay * gamep.fps);
_local1.psprite = _local3;
continue;
}
if (_local1.pdelay == -2) {
_local1.pdelay = -1;
}
}
var _local6 = world_text[_local2.pa];
changestand(0);
_local5.state++;
if (_local3 == 0) {
if ((((_local1.tx < tilearea.xMin) || (_local1.tx >= tilearea.xMax)) || (_local1.ty < tilearea.yMin)) || (_local1.ty >= tilearea.yMax)) {
cam(Math.floor((_local1.tx * tilep.w) / Stage.width), Math.floor((_local1.ty * tilep.h) / Stage.height));
}
}
performaction(_local6);
return(undefined);
}
}
}
function pdelay() {
var _local1 = world_sprites[0][0];
if (_local1.pdelay < 0) {
return(undefined);
}
if (gamep.timer >= _local1.pdelay) {
var _local3 = world_sprites[_local1.psprite][0];
var _local2 = world_sprites[_local1.psprite][_local3.state];
if ((_local2.pxmin == undefined) || ((((_local2.pxmin <= _local1.tx) && (_local2.pxmax >= _local1.tx)) && (_local2.pymin <= _local1.ty)) && (_local2.pymax >= _local1.ty))) {
var _local4 = world_text[_local2.pa];
changestand(0);
_local3.state++;
performaction(_local4);
_local1.pdelay = -1;
playerzone_check();
return(undefined);
}
_local1.pdelay = -2;
}
}
function performaction(sub) {
var _local3 = typeof(sub);
if (sub instanceof Array) {
gamep.state = "text";
_root.overlay.gotoAndStop("text");
var _local4 = copyarr(sub);
text_end = _local4.shift();
text_text = copyarr(_local4);
text_on = 0;
updatetext();
clicks.left = 2;
clicks.right = 2;
clicks.space = 2;
return(1);
}
if (_local3 == "object") {
if (sub.canright != undefined) {
clicks.canright = sub.canright;
}
if (sub.canleft != undefined) {
clicks.canleft = sub.canleft;
}
if (sub.canup != undefined) {
clicks.canup = sub.canup;
}
if (sub.candown != undefined) {
clicks.candown = sub.candown;
}
if (sub.audio != undefined) {
snd_play(sub.audio);
}
if (sub.sprite != undefined) {
if (sub.animate) {
_root.fg.sorted["s" + sub.sprite].mc.mc.play();
}
var _local5 = world_sprites[sub.sprite][0];
var _local6 = sub["propval" + _local5[sub.propname]];
var _local7 = ((_local6 == undefined) ? (sub.propval) : (_local6));
_local5[sub.propname] = _local7;
}
if (sub.func) {
if ((sub.func2 == undefined) && (sub.func2pass != undefined)) {
_root[sub.func](sub.funcpass, sub.func2pass);
} else {
_root[sub.func](sub.funcpass);
}
}
if (sub.func2) {
_root[sub.func2](sub.func2pass);
}
if (sub.cut) {
gamep.state = "cutscene";
snd_initfade("bgaud", 0, 1, 0);
_root.overlay.gotoAndStop(sub.cut);
return(1);
}
if (sub.propname == "state") {
playerzone_check();
}
finishcutscene();
} else if (_local3 == "string") {
finishcutscene();
} else if (_local3 == "number") {
finishcutscene();
}
}
function textcontrol() {
var _local1 = text_on;
if (clicks.space == 1) {
clicks.space = 2;
if (text_on == (text_text.length - 1)) {
performaction(text_end);
clicks.up = 0;
clicks.down = 0;
clicks.left = 0;
clicks.right = 0;
clicks.space = 2;
return(undefined);
}
}
if (clicks.right == 1) {
_local1++;
clicks.right = 2;
}
if (clicks.left == 1) {
_local1--;
clicks.left = 2;
}
if (((_local1 != text_on) && (_local1 > -1)) && (_local1 < text_text.length)) {
text_on = _local1;
updatetext();
}
}
function updatetext() {
var _local6 = ((text_on == 0) ? 2 : 1);
var _local3 = text_on == (text_text.length - 1);
var _local5 = (_local3 ? 2 : 1);
var _local4 = (_local3 ? 1 : 2);
_root.overlay.lft.gotoAndStop(_local6);
_root.overlay.rght.gotoAndStop(_local5);
_root.overlay.spc.gotoAndStop(_local4);
var _local2 = text_text[text_on].split("::");
_root.overlay.heads.gotoAndStop(_local2[0]);
_root.overlay.heads.mc.gotoAndStop(_local2[1]);
_root.overlay.txt.text = _local2[2];
}
function update_gstate(id, dub) {
var _local2 = world_sprites[id][0];
if (dub.gchar) {
_local2.gchar = dub.gchar;
}
if (dub.gstate) {
_local2.gstate = dub.gstate;
}
if (dub.gaction) {
_local2.gaction = dub.gaction;
}
if (dub.forceinclude != undefined) {
_local2.forceinclude = dub.forceinclude;
}
if (dub.ignoreblocking != undefined) {
_local2.ignoreblocking = dub.ignoreblocking;
}
}
function exportworld() {
var _local1 = "";
var _local2 = new Date();
_local1 = _local1 + ((((((((("//" + _local2.getFullYear()) + "/") + (_local2.getMonth() + 1)) + "/") + _local2.getDate()) + " ") + _local2.getHours()) + ":") + _local2.getMinutes());
_local1 = _local1 + newline;
_local1 = _local1 + (("world_txtA = \"" + exporttiles(world_tilesA)) + "\";");
_local1 = _local1 + newline;
_local1 = _local1 + (("world_txtB = \"" + exporttiles(world_tilesB)) + "\";");
_local1 = _local1 + newline;
_local1 = _local1 + "world_tilesA = importtiles(world_txtA);";
_local1 = _local1 + newline;
_local1 = _local1 + "world_tilesB = importtiles(world_txtB);";
trace(_local1);
}
function exportvar(nam, val, multi) {
var _local3 = nam + " = ";
if (multi) {
_local3 = _local3 + "new Array();\r";
var _local1 = 0;
while (_local1 < val.length) {
_local3 = _local3 + (((((((nam + "[") + _local1) + "]") + " = ") + exportarray(val[_local1])) + ";") + newline);
_local1++;
}
return(_local3);
}
var _local5 = typeof(val);
if (val instanceof Array) {
_local3 = _local3 + exportarray(val);
} else if (_local5 == "object") {
_local3 = _local3 + exportobject(val);
} else if (_local5 == "string") {
_local3 = _local3 + (("\"" + val) + "\"");
} else if (_local5 == "number") {
_local3 = _local3 + val;
}
_local3 = _local3 + ";";
return(_local3);
}
function exportarray(arr, kill) {
var _local3 = "[";
var _local1 = 0;
while (_local1 < arr.length) {
var _local4 = typeof(arr[_local1]);
if (arr[_local1] == undefined) {
_local3 = _local3 + (kill ? "" : ",0");
} else {
if (_local1) {
_local3 = _local3 + ", ";
}
if (arr[_local1] instanceof Array) {
_local3 = _local3 + exportarray(arr[_local1]);
} else if (_local4 == "object") {
_local3 = _local3 + exportobject(arr[_local1]);
} else if (_local4 == "string") {
_local3 = _local3 + (("\"" + arr[_local1]) + "\"");
} else if (_local4 == "number") {
_local3 = _local3 + arr[_local1];
}
}
_local1++;
}
_local3 = _local3 + "]";
if (_local3 == "[]") {
_local3 = "0";
}
return(_local3);
}
function exportobject(obj) {
var _local2 = "{";
var _local4 = 0;
for (var _local5 in obj) {
if (_local4) {
_local2 = _local2 + ", ";
}
var _local3 = typeof(obj[_local5]);
if (obj[_local5] == undefined) {
_local2 = _local2 + ((_local5 + ":") + 0);
} else if (_local3 == "string") {
_local2 = _local2 + (((_local5 + ":\"") + obj[_local5]) + "\"");
} else if (_local3 == "number") {
_local2 = _local2 + ((_local5 + ":") + obj[_local5]);
}
_local4++;
}
_local2 = _local2 + "}";
return(_local2);
}
function importarray(txt) {
var _local4 = new Array();
txt = txt.slice(1, -1);
while (true) {
var _local6 = txt.charAt(0);
if (_local6 == "[") {
var _local2 = 1;
var _local7 = 1;
while (true) {
_local7 = txt.indexOf("]", _local7);
_local2 = txt.indexOf("[", _local2);
if ((_local2 == -1) || (_local2 > _local7)) {
break;
}
_local2++;
_local7++;
}
_local7++;
var _local8 = txt.slice(0, _local7);
_local4.push(importarray(_local8));
txt = txt.slice(_local7);
} else if (_local6 == "{") {
var _local7 = txt.indexOf("}") + 1;
_local4.push(importobject(txt.slice(0, _local7)));
txt = txt.slice(_local7);
} else {
_local4 = txt.split(", ");
var _local3 = 0;
while (_local3 < _local4.length) {
var _local5 = Number(_local4[_local3]);
if (!isNaN(_local5)) {
_local4[_local3] = _local5;
}
_local3++;
}
}
if (txt.charAt(0) == ",") {
txt = txt.slice(2);
continue;
}
return(_local4);
}
}
function importobject(txt) {
var _local5 = new Object();
txt = txt.slice(1, -1);
var _local4 = txt.split(", ");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local1 = _local4.split(":");
var _local3 = ((_local1[1].charAt(0) == "\"") ? (_local1[1].slice(1, -1)) : (Number(_local1[_local2])));
_local5[_local1[0]] = _local3;
_local2++;
}
return(_local5);
}
function copyarr(arr) {
var _local4 = new Array();
var _local1 = 0;
while (_local1 < arr.length) {
var _local2 = arr[_local1];
if (_local2 instanceof Array) {
var _local5 = copyarr(arr[_local1]);
_local4.push(_local5);
} else if (typeof(_local2) == "object") {
var _local5 = copyob(arr[_local1]);
_local4.push(_local5);
} else {
_local4.push(_local2);
}
_local1++;
}
return(_local4);
}
function copyob(ob) {
var _local2 = new Object();
for (var _local3 in ob) {
_local2[_local3] = ob[_local3];
}
return(_local2);
}
function importtiles(txt) {
txt = txt.split(",");
var _local6 = new Array();
var _local5 = 0;
var _local2 = 0;
_local6[_local5] = new Array();
var _local4 = 0;
while (_local4 < txt.length) {
if (txt[_local4] == "br") {
_local5++;
_local6[_local5] = new Array();
_local2 = 0;
} else {
var _local1 = txt[_local4].split("x");
if (_local1.length == 0) {
} else if (_local1.length == 1) {
_local6[_local5][_local2] = Number(_local1[0]);
_local2++;
} else {
_local1[0] = Number(_local1[0]);
_local1[1] = Number(_local1[1]);
if (_local1[0] == 0) {
_local2 = _local2 + _local1[1];
} else {
var _local3 = 0;
while (_local3 < _local1[1]) {
_local6[_local5][_local2] = _local1[0];
_local2++;
_local3++;
}
}
}
}
_local4++;
}
return(_local6);
}
function exporttiles(arr) {
var _local2 = "";
var _local3 = 0;
var _local4 = 0;
var _local6 = 0;
while (_local6 < arr.length) {
if (_local6 != 0) {
if (_local3 != 0) {
_local2 = _local2 + ((_local2.length == 0) ? "" : ",");
_local2 = _local2 + ((_local4 > 1) ? ((_local3 + "x") + _local4) : (_local3));
}
_local2 = _local2 + ((_local2.length == 0) ? "" : ",");
_local2 = _local2 + "br";
_local3 = 0;
_local4 = 0;
}
var _local1 = 0;
while (_local1 < arr[_local6].length) {
if (arr[_local6][_local1] == undefined) {
arr[_local6][_local1] = 0;
}
if (arr[_local6][_local1] == _local3) {
_local4++;
} else {
_local2 = _local2 + ((_local2.length == 0) ? "" : ",");
_local2 = _local2 + ((_local4 > 1) ? ((_local3 + "x") + _local4) : (_local3));
_local3 = arr[_local6][_local1];
_local4 = 1;
}
_local1++;
}
_local6++;
}
var _local7 = _local2.split(",");
_local6 = _local7.length - 1;
while (_local6 > 0) {
if (_local7[_local6] != "br") {
_local7.splice(_local6 + 1);
_local2 = _local7.join(",");
break;
}
_local6--;
}
return(_local2);
}
function cam(xto, yto) {
if (!design) {
snd_ambience(xto, yto);
}
if (xto != -999) {
_root.fg._x = -(xto * Stage.width);
}
if (yto != -999) {
_root.fg._y = -(yto * Stage.height);
}
campointa = {x:0, y:0};
_root.fg.globalToLocal(campointa);
campointb = {x:Stage.width, y:Stage.height};
_root.fg.globalToLocal(campointb);
createarea();
}
function createarea() {
var _local8 = {xMin:campointa.x - tlradius.l, xMax:campointb.x + tlradius.r, yMin:campointa.y - tlradius.u, yMax:campointb.y + tlradius.d};
tilearea = {xMin:gettilex(_local8.xMin), xMax:gettilex(_local8.xMax), yMin:gettiley(_local8.yMin), yMax:gettiley(_local8.yMax)};
tilearea.line = (tilearea.xMax - tilearea.xMin) + 2;
tilearea.layer = (tilearea.line * ((tilearea.yMax - tilearea.yMin) + 2)) * 2;
_root.fg.gotoAndStop(3);
_root.fg.gotoAndStop(1);
var _local3 = tilearea.xMin;
while (_local3 <= tilearea.xMax) {
if (world_tilesA[_local3] == undefined) {
world_tilesA[_local3] = new Array();
}
if (world_tilesB[_local3] == undefined) {
world_tilesB[_local3] = new Array();
}
var _local2 = tilearea.yMin;
while (_local2 <= tilearea.yMax) {
if (world_tilesA[_local3][_local2] == undefined) {
world_tilesA[_local3][_local2] = 0;
}
if (world_tilesB[_local3][_local2] == undefined) {
world_tilesB[_local3][_local2] = 0;
}
var _local6 = world_tilesA[_local3][_local2];
if (_local6 != 0) {
attachtile(_local3, _local2, _local6, 0);
}
_local6 = world_tilesB[_local3][_local2];
if (_local6 != 0) {
attachtile(_local3, _local2, _local6, 1);
}
_local2++;
}
_local3++;
}
if (design == 1) {
return(undefined);
}
ref_sprites = new Array();
var _local5 = 0;
for ( ; _local5 < world_sprites.length ; _local5++) {
var _local4 = world_sprites[_local5][0];
update_mainstate(_local4, world_sprites[_local5][_local4.state]);
if (_local4.forceinclude) {
} else if ((((_local4.tx < (tilearea.xMin - 1)) || (_local4.tx > (tileare.xMax + 1))) || (_local4.ty < (tilearea.yMin - 1))) || (_local4.ty > (tilearea.yMax + 1))) {
continue;
}
ref_sprites.push(_local5);
var _local7 = ((_local4.ganim == undefined) ? 1 : (_local4.ganim));
attachsprite(_local5, _local7);
}
}
function update_mainstate(sub, dub) {
if (dub.statejump) {
if (dub.spd != undefined) {
sub.spd = dub.spd;
}
sub.tx = dub.tx;
sub.ty = dub.ty;
sub.l = dub.l;
sub.state++;
}
if (dub.forceinclude != undefined) {
sub.forceinclude = dub.forceinclude;
}
if (dub.ignoreblocking != undefined) {
sub.ignoreblocking = dub.ignoreblocking;
}
if (dub.gchar != undefined) {
sub.gchar = dub.gchar;
}
if (dub.gstate != undefined) {
sub.gstate = dub.gstate;
}
if (dub.gaction != undefined) {
sub.gaction = dub.gaction;
}
sub.turnarrive = 0;
sub.live = 1;
}
function attachtile(tx, ty, tl, l) {
var _local3 = (l ? ((("bx" + tx) + "y") + ty) : ((("ax" + tx) + "y") + ty));
var _local2 = tiledata[tl];
var _local8 = (_local2.over ? 1 : 0);
var _local7 = get_depth(tx, ty, l, _local8, 0);
_root.fg.sorted.attachMovie("tiles", _local3, _local7);
_root.fg.sorted[_local3]._x = tx * tilep.w;
_root.fg.sorted[_local3]._y = ty * tilep.h;
tl = ((tl == 0) ? (tiledata.length) : (tl));
_root.fg.sorted[_local3].gotoAndStop(tl);
if (_local2.checkerz) {
_root.fg.sorted[_local3].multi.gotoAndStop(((tx + ty) % _local2.checkerz) + 1);
} else if (_local2.checkerx && (_local2.checkery)) {
_root.fg.sorted[_local3].multi.gotoAndStop(((tx % _local2.checkerx) + 1) + ((ty % _local2.checkery) * _local2.checkerx));
} else if (_local2.checkerx) {
_root.fg.sorted[_local3].multi.gotoAndStop((tx % _local2.checkerx) + 1);
} else if (_local2.checkery) {
_root.fg.sorted[_local3].multi.gotoAndStop((ty % _local2.checkery) + 1);
}
}
function gettilex(cord) {
return(Math.floor(cord / tilep.w));
}
function gettiley(cord) {
return(Math.floor(cord / tilep.h));
}
function hastile(tx, ty, l) {
var _local1 = (l ? (world_tilesB[tx][ty]) : (world_tilesA[tx][ty]));
if (_local1 > 0) {
return(_local1);
}
return(0);
}
function settile(tx, ty, l, tl) {
if (l) {
var _local6 = world_tilesB[tx][ty];
var _local5 = (("bx" + tx) + "y") + ty;
world_tilesB[tx][ty] = tl;
} else {
var _local6 = world_tilesA[tx][ty];
var _local5 = (("ax" + tx) + "y") + ty;
world_tilesA[tx][ty] = tl;
}
if ((_local6 == 0) && (_root.fg.sorted[_local5] == undefined)) {
attachtile(tx, ty, tl, l);
} else {
tl = ((tl == 0) ? (tiledata.length) : (tl));
_root.fg.sorted[_local5].gotoAndStop(tl);
}
}
function attachsprite(id, ganim) {
var _local2 = "s" + id;
_root.fg.sorted.attachMovie("sprites", _local2, _root.fg.sorted.getNextHighestDepth());
movesprite(id);
_root.fg.sorted[_local2].mc.mc.gotoAndStop(ganim);
}
function movesprite(id) {
sprite_depth(id);
sprite_position(id);
}
function sprite_depth(id) {
var _local2 = world_sprites[id][0];
if ((((_local2.tx < (tilearea.xMin - 1)) || (_local2.tx > (tilearea.xMax + 1))) || (_local2.ty < (tilearea.yMin - 1))) || (_local2.ty > (tilearea.yMax + 1))) {
return(undefined);
}
var _local4 = "s" + id;
var _local3 = get_depth(_local2.tx, _local2.ty, _local2.l, 1, 1);
_root.fg.sorted[_local4].swapDepths(_local3);
}
function sprite_position(id) {
var _local2 = world_sprites[id][0];
var _local4 = "s" + id;
var _local9 = (_local2.l ? (world_tilesB[_local2.tx][_local2.ty]) : (world_tilesA[_local2.tx][_local2.ty]));
var _local3 = tiledata[_local9];
var _local7 = _local2.tx * tilep.w;
_local7 = _local7 + (_local3.sitx ? (_local3.sitx) : 0);
var _local6 = _local2.ty * tilep.h;
_local6 = _local6 + (_local3.sity ? (_local3.sity) : 0);
_root.fg.sorted[_local4]._x = _local7;
_root.fg.sorted[_local4]._y = _local6;
var _local5 = _local2.gstate;
var _local8 = _local2.gaction;
if ((((_local2.gaction == "standN") || (_local2.gaction == "standS")) || (_local2.gaction == "standE")) || (_local2.gaction == "standW")) {
_local5 = ((_local3.xstate != undefined) ? (_local3.xstate) : (_local2.gstate));
_local8 = ((_local3.xaction != undefined) ? (_local3.xaction) : (_local2.gaction));
}
_root.fg.sorted[_local4].gotoAndStop(_local2.gchar + _local5);
_root.fg.sorted[_local4].mc.gotoAndStop(_local8);
}
function get_depth(tx, ty, l, o, s) {
var _local1 = 0;
if (l) {
_local1 = _local1 + (tilearea.layer * 2);
}
if (o) {
_local1 = _local1 + tilearea.layer;
}
if (o) {
_local1 = _local1 + ((ty - tilearea.yMin) * (tilearea.line * 2));
} else {
_local1 = _local1 + ((ty - tilearea.yMin) * tilearea.line);
}
if (s) {
_local1 = _local1 + ((tx - tilearea.xMin) + tilearea.line);
} else {
_local1 = _local1 + (tx - tilearea.xMin);
}
return(_local1);
}
function render() {
if (gamep.state != "playing") {
return(undefined);
}
var _local1 = 0;
while (_local1 < ref_sprites.length) {
var _local2 = ref_sprites[_local1];
animatesprite(_local2);
_local1++;
}
}
function animatesprite(id) {
var _local2 = world_sprites[id][0];
if (!_local2.turnarrive) {
return(undefined);
}
var _local3 = "s" + id;
_root.fg.sorted[_local3]._x = _root.fg.sorted[_local3]._x + _local2.moveratex;
_root.fg.sorted[_local3]._y = _root.fg.sorted[_local3]._y + _local2.moveratey;
if (_local2.turnarrive == -25) {
if (_root.fg.sorted[_local3].mc.mc._currentframe == _root.fg.sorted[_local3].mc.mc._totalframes) {
_local2.turnarrive = 0;
_local2.live = 1;
}
} else if (_local2.turnarrive <= gamep.tcount) {
_local2.turnarrive = 0;
_local2.live = 1;
}
if (_local2.live && (id == 0)) {
clicks.up = 0;
clicks.down = 0;
clicks.left = 0;
clicks.right = 0;
clicks.space = 0;
playerzone_check();
}
}
function checktileto(dir, opdir, id) {
var _local2 = world_sprites[id][0];
var _local22 = (_local2.l ? (world_tilesB[_local2.tx][_local2.ty]) : (world_tilesA[_local2.tx][_local2.ty]));
var _local9 = tiledata[_local22];
var _local8 = _local2.l;
var _local12 = 0;
if ((!_local2.l) && (_local9["layer" + dir])) {
_local8 = 1;
_local12 = 1;
}
var _local13 = (_local9["exit" + dir] ? (_local9["exit" + dir]) : 0);
switch (dir) {
case "u" :
var _local20 = _local2.tx + _local13;
var _local19 = _local2.ty - 1;
break;
case "d" :
_local20 = _local2.tx + _local13;
_local19 = _local2.ty + 1;
break;
case "l" :
_local20 = _local2.tx - 1;
_local19 = _local2.ty + _local13;
break;
case "r" :
_local20 = _local2.tx + 1;
_local19 = _local2.ty + _local13;
}
var _local21 = world_tilesA[_local20][_local19];
var _local6 = tiledata[_local21];
if (_local8) {
if (_local6["layer" + opdir]) {
_local8 = 0;
_local12 = 1;
} else {
_local21 = world_tilesB[_local20][_local19];
_local6 = tiledata[_local21];
}
}
if (_local2.ignoreblocking) {
_local12 = 1;
}
if (!_local12) {
var _local15 = ((_local6.blockstate == _local2.gstate) ? 1 : 0);
var _local16 = (((_local6.dontblockstate != undefined) && (_local6.dontblockstate != _local2.gstate)) ? 1 : 0);
if ((((_local6.blockx || (_local15)) || (_local16)) || (_local21 == undefined)) || (_local21 == 0)) {
if ((_local15 || (_local16)) && (_local6.blocktxt != undefined)) {
changestand(id);
movesprite(id);
performaction([0, _local6.blocktxt]);
}
return(0);
}
switch (dir) {
case "u" :
if ((_local9.blocku || (_local6.blockd)) || (_local6.trapd)) {
return(0);
}
break;
case "d" :
if ((_local9.blockd || (_local6.blocku)) || (_local6.trapu)) {
return(0);
}
break;
case "l" :
if ((_local9.blockl || (_local6.blockr)) || (_local6.trapr)) {
return(0);
}
break;
case "r" :
if (!((_local9.blockr || (_local6.blockl)) || (_local6.trapl))) {
break;
}
return(0);
}
}
var _local4 = 0;
while (_local4 < ref_sprites.length) {
var _local5 = ref_sprites[_local4];
if (_local5 == id) {
} else {
var _local3 = world_sprites[_local5][0];
if (((_local8 == _local3.l) && (_local3.tx == _local20)) && (_local3.ty == _local19)) {
return(0);
}
}
_local4++;
}
var _local10 = (_local8 ? (world_interactB[_local20][_local19]) : (world_interactA[_local20][_local19]));
if ((id == 0) && (_local10.lock || ((_local10.sprite > -1) && (world_sprites[_local10.sprite][0][_local10.propname] == _local10.propval)))) {
if (_local10.locktxt != undefined) {
changestand(id);
movesprite(id);
performaction([0, _local10.locktxt]);
}
return(0);
}
if (_local9["anim" + dir]) {
var _local17 = (_local2.l ? ((("bx" + _local2.tx) + "y") + _local2.ty) : ((("ax" + _local2.tx) + "y") + _local2.ty));
_root.fg.sorted[_local17].mc.gotoAndPlay(2);
}
if (_local6["anim" + opdir]) {
var _local17 = (_local8 ? ((("bx" + _local20) + "y") + _local19) : ((("ax" + _local20) + "y") + _local19));
_root.fg.sorted[_local17].mc.gotoAndPlay(2);
}
if (_local9["gstate" + dir]) {
_local2.gstate = _local9["gstate" + dir];
} else if (_local6["gstate" + opdir]) {
_local2.gstate = _local6["gstate" + opdir];
}
if (_local2.l != _local8) {
if (_local8) {
sprite_position(id);
_local2.l = 1;
sprite_depth(id);
} else {
movesprite(id);
_local2.l = 0;
}
} else if (_local19 > _local2.ty) {
sprite_position(id);
var _local18 = _local2.ty;
_local2.ty = _local19;
sprite_depth(id);
_local2.ty = _local18;
} else {
movesprite(id);
}
return({tx:_local20, ty:_local19, tlon:_local22, tlto:_local21});
}
function preparespritemove(id, spd, obj) {
var _local1 = world_sprites[id][0];
var _local3 = tiledata[obj.tlon];
var _local5 = tiledata[obj.tlto];
if (nomovement_transition(_local1.gstate)) {
_local1.moveratey = 0;
_local1.moveratex = 0;
_local1.turnarrive = -25;
_local1.live = 0;
} else {
var _local11 = _local1.tx * tilep.w;
_local11 = _local11 + (_local3.sitx ? (_local3.sitx) : 0);
var _local9 = obj.tx * tilep.w;
_local9 = _local9 + (_local5.sitx ? (_local5.sitx) : 0);
var _local13 = _local9 - _local11;
var _local10 = _local1.ty * tilep.h;
_local10 = _local10 + (_local3.sity ? (_local3.sity) : 0);
var _local8 = obj.ty * tilep.h;
_local8 = _local8 + (_local5.sity ? (_local5.sity) : 0);
var _local12 = _local8 - _local10;
if (spd == undefined) {
if (_local3.spd != undefined) {
spd = _local3.spd;
} else {
spd = _local1.spd;
}
}
var _local7 = (gamep_spd[spd] * gamep.fpt) + 2;
_local1.moveratey = _local12 / _local7;
_local1.moveratex = _local13 / _local7;
_local1.turnarrive = gamep.tcount + gamep_spd[spd];
_local1.live = 0;
}
_local1.gstate = gstate_transition(_local1.gstate, _local1.gaction);
var _local4 = (_local1.l ? (world_interactB[obj.tx][obj.ty]) : (world_interactA[obj.tx][obj.ty]));
if (_local4.l != undefined) {
_local1.l = _local4.l;
_local1.tx = _local4.tx;
_local1.ty = _local4.ty;
return(undefined);
}
_local1.tx = obj.tx;
_local1.ty = obj.ty;
}
function controls() {
var _local4 = (design ? 10 : 6);
var _local2 = 0;
while (_local2 < _local4) {
var _local1 = inputs[_local2];
var _local3 = Key.isDown(_local1.kcode) || (Key.isDown(_local1.kcode2));
if (_local3 && (!clicks[_local1.tag])) {
clicks[_local1.tag] = 1;
} else if ((!_local3) && (clicks[_local1.tag] == 2)) {
clicks[_local1.tag] = 0;
}
_local2++;
}
}
function switch_keyboard(a) {
switch (a) {
case "qwerty" :
inputs[0].kcode = 74;
inputs[0].kcode2 = 65;
inputs[1].kcode = 76;
inputs[1].kcode2 = 68;
inputs[2].kcode = 73;
inputs[2].kcode2 = 87;
inputs[3].kcode = 75;
inputs[3].kcode2 = 83;
keyboard_type = 1;
return(undefined);
case "azerty" :
inputs[0].kcode = 74;
inputs[0].kcode2 = 81;
inputs[1].kcode = 76;
inputs[1].kcode2 = 68;
inputs[2].kcode = 73;
inputs[2].kcode2 = 90;
inputs[3].kcode = 75;
inputs[3].kcode2 = 83;
keyboard_type = 2;
return(undefined);
case "dvorak" :
inputs[0].kcode = 84;
inputs[0].kcode2 = 65;
inputs[1].kcode = 69;
inputs[1].kcode2 = 83;
inputs[2].kcode = 82;
inputs[2].kcode2 = 188;
inputs[3].kcode = 78;
inputs[3].kcode2 = 79;
keyboard_type = 3;
return(undefined);
case "fallback" :
inputs[0].kcode = 100;
inputs[0].kcode2 = 37;
inputs[1].kcode = 102;
inputs[1].kcode2 = 39;
inputs[2].kcode = 104;
inputs[2].kcode2 = 38;
inputs[3].kcode = 101;
inputs[3].kcode2 = 40;
keyboard_type = 4;
return(undefined);
}
}
function snd_play(snd) {
var _local2 = "aud_" + snd;
if (_root[_local2] == undefined) {
_root.attachMovie("empty", "mc" + _local2, _root.getNextHighestDepth());
_root[_local2] = new Sound(_root["mc" + _local2]);
}
_root[_local2].attachSound(snd + ".wav");
_root[_local2].start();
}
function snd_stop(snd) {
var _local2 = "aud_" + snd;
_root[_local2].stop();
}
function snd_ambience(xto, yto) {
var _local1 = world_map[yto][xto];
if (_local1.snd == gamep.snd) {
return(undefined);
}
gamep.snd = _local1.snd;
bgaud.stop();
bgaud.attachSound(_local1.snd + ".wav");
bgaud.start(0, 9999);
}
function snd_initfade(sndname, ease, len, vol) {
fadep.snd = sndname;
fadep.ease = ease / 100;
fadep.timers = timer;
fadep.timere = timer + (len * gamep.fps);
fadep.vols = _root[sndname].getVolume();
fadep.vole = vol;
}
function snd_fade() {
if (fadep.snd == "") {
return(undefined);
}
var _local3 = makepercent(timer, fadep.timers, fadep.timere);
var _local2 = demakepercent(_local3, fadep.vols, fadep.vole);
_root[fadep.snd].setVolume(_local2);
if (_local2 == fadep.vole) {
fadep.snd = "";
}
}
function makepercent(n, min, max) {
return(Math.floor(((n - min) / (max - min)) * 100));
}
function demakepercent(p, min, max) {
var _local1 = (p / 100) * Math.abs(max - min);
_local1 = ((min < max) ? (_local1 + min) : (min - _local1));
return(_local1);
}
function designinit() {
clicks.spinner = 0;
clicks.leftclick = 2;
frameon("game");
_root.fg._xscale = tilep.zoom;
_root.fg._yscale = tilep.zoom;
_root.overlay.gotoAndStop("designer");
_root.overlay.l.text = designp.l;
cam(designp.camx, designp.camy);
}
function designloop() {
var _local4 = gettilex(_root.fg._xmouse);
var _local3 = gettiley(_root.fg._ymouse);
var _local2 = hastile(_local4, _local3, designp.l);
_root.overlay.t.text = (((("x" + _local4) + "_y") + _local3) + "_tl") + _local2;
if ((((clicks.left == 1) || (clicks.right == 1)) || (clicks.up == 1)) || (clicks.down == 1)) {
var _local6 = designp.camx;
_local6 = _local6 - (clicks.left ? 1 : 0);
_local6 = _local6 + (clicks.right ? 1 : 0);
var _local5 = designp.camy;
_local5 = _local5 - (clicks.up ? 1 : 0);
_local5 = _local5 + (clicks.down ? 1 : 0);
cam(_local6, _local5);
designp.camx = _local6;
designp.camy = _local5;
clicks.left = 2;
clicks.right = 2;
clicks.up = 2;
clicks.down = 2;
}
if (clicks.space == 1) {
designp.l = (designp.l ? 0 : 1);
_root.overlay.l.text = designp.l;
clicks.space = 2;
}
if (clicks.spinner != 0) {
_local2 = _local2 + clicks.spinner;
_local2 = ((_local2 == tiledata.length) ? 0 : (_local2));
_local2 = ((_local2 == -1) ? (tiledata.length - 1) : (_local2));
settile(_local4, _local3, designp.l, _local2);
clicks.spinner = 0;
}
if (clicks.middleclick) {
if (clicks.middleclick == 1) {
designp.copypasta = hastile(_local4, _local3, designp.l);
clicks.middleclick = 2;
} else {
settile(_local4, _local3, designp.l, designp.copypasta);
}
}
if (clicks.playtest == 1) {
clicks.playtest = 2;
design = 2;
gameinit(0);
}
}
function testloop() {
if (clicks.playtest == 1) {
clicks.playtest = 2;
design = 1;
gameexit();
designinit();
return(undefined);
}
if (clicks.leftclick == 1) {
var _local4 = gettilex(_root.fg._xmouse);
var _local3 = gettiley(_root.fg._ymouse);
clicks.leftclick = 2;
var _local2 = world_sprites[0][0];
_local2.tx = _local4;
_local2.ty = _local3;
createarea();
}
if (clicks.test == 1) {
clicks.test = 2;
}
}
function onEnterFrame() {
if (gamep.state != "paused") {
timer++;
}
controls();
if (framein == "game") {
if (design == 1) {
designloop();
} else if (design == 2) {
testloop();
render();
simulation();
} else {
render();
simulation();
}
}
}
function frameon(goto) {
framein = goto;
_root.gotoAndStop(goto);
}
function designing(b) {
if (b == 0) {
design = 0;
frameon("menu");
} else {
design = 1;
frameon("designer");
}
}
function finishgame() {
finished = 3;
gameexit();
frameon("menu");
}
world_txtA = "br,0x50,1,br,0x47,6x2,9,78,76x2,br,0x47,6x2,9,78,76x2,br,0x47,6x2,9,78,76x2,br,0x47,6x2,9,78,76x2,br,0x16,6x2,9,16x6,0x22,6x2,9,79,76x2,br,0x16,6,15,9,17,16,17,16,17,16,0x22,6x2,9,80,76x2,br,0x5,93x2,94,89x2,0x6,6,15,9,20,21,20,21,20,21,0x4,6x2,9,41,38x5,0x9,6x2,9,76x3,br,0x5,93,98,99,89x2,0x6,6,15,9,16x6,0x4,6x2,9,42,38x5,0x9,6x2,14,76x3,br,0x5,93x2,94,89x2,0x6,6x2,9,17,16,17,16,17,16,0x4,6x2,9,43,38x5,0x9,6x2,9,76x3,br,0x3,93x2,94,89x4,0x6,6x2,9,20,21,20,21,20,21,0x4,6x2,9,38x3,6,9,38,0x9,6x2,9,77,76x2,br,0x3,93x2,94,89x4,0x6,6,15,9,16x6,0x4,6x2,9,39,40,38,6,9,38,0x9,6x2,9,78,76x2,br,0x3,93x2,94,90,89x3,0x6,6,15,9,17,16,17,16,17,16,0x4,6x2,9,39,40,38,6,9,38x2,5,0x7,6x2,9,78,76x2,br,0x3,93,95,94,89x4,0x6,6,15,9,20,21,20,21,20,21,0x4,6x2,9,39,40,38,6,9,38x2,5,0x7,6x2,9,78,76x2,br,0x3,93,96,94,89,92,89x2,0x6,6x2,9,16x6,0x22,6x2,9,78,76x2,br,0x3,93,96,94,91,89x3,0x6,6,7,9,25,34,16x4,5,0x21,6x2,9,80,76x2,br,0x3,93x2,94,89x4,0x6,6x2,9,16,35,16x4,5,0x21,6x2,9,76x3,br,0x16,6x2,9,16x6,0x22,6x2,9,76x3,br,0x47,6x2,12,76x3,br,0x47,6,8,9,76x3,br,0x47,6x2,13,76x3,br,0x47,6x2,9,76x3,br,0x47,6x2,9,76x3,br,0x47,6x2,9,77,76x2,br,0x47,6x2,9,78,76x2,br,0x47,6x2,9,78,76x2,br,0x30,6x2,9,78,76x2,0x11,6x2,9,78,76x2,br,0x30,6x2,9,78,76x2,0x11,6x2,9,78,76x2,br,0x15,6x2,9,16x9,0x3,6x2,9,78,76x2,0x11,6x2,9,80,76x2,br,0x15,6x2,9,16x3,17,16x5,5,0x2,6x2,9,80,76x2,0x11,6x2,9,76x3,br,0x15,6x2,9,16,37,36x2,24,27,16x3,5,0x2,6x2,9,76x20,br,0x15,6x2,9,19,37,36x2,25,28,16x3,0x3,6x2,9,76x20,br,0x15,6x2,9,16,37,36x2,26,29,16x3,0x3,6x2,9,76x20,br,0x15,6x2,9,16,18,16,18,16x5,0x3,6x2,9,76x20,br,0x3,6x2,9,81x6,0x3,6x2,9,16x9,0x3,6x2,9,76x20,br,0x3,6x2,9,83,81x3,20,86,0x3,6x2,9,16x9,0x3,6x3,9,45x3,0x10,6x2,9,76x3,br,0x3,6,7,9,84,82,81x2,20,87,0x3,6x2,9,16x4,17,16x4,0x20,6x2,9,76x3,br,0x3,6x2,9,85,81x3,20,88,0x3,6x2,9,16x4,37,24,27,16x2,0x20,6x2,14,76x3,br,0x3,6x2,9,81x6,0x3,6x2,9,16x3,19,37,25,28,16x2,0x20,6x2,9,76x3,br,0x4,6x2,9,81x2,0x6,6x2,9,23,16,23,19,37,25,28,16x2,0x20,6x2,9,76x3,br,0x7,3x2,0x6,6x2,9,22,16,22,19,37,25,28,16x2,br,0x15,6x2,9,23,16,23,16,37,25,28,16x2,br,0x15,6x2,9,23,16,23,19,37,25,28,16,30,br,0x15,6x2,9,22,16,22,16,37,26,29,16,31,br,0x15,6x2,9,23,16,23,16,18,16x3,32,br,br,br,br,br,0x15,6x3,9,4x3,br,0x14,6x2,9,44x19,br,0x14,6x2,9,44x2,46x7,64,46x5,44x4,0x12,6x2,9,78,76x2,br,0x8,6x2,9,68,5,0,6x2,9,44,47,44x5,63,44,62,44x4,47,44x4,0x12,6x2,9,78,76x2,br,0x8,6x2,9,68,5,0,6x2,9,44,47,44x5,63,44,62,44x4,47,44x4,0x12,6x2,9,78,76x2,br,0x8,6x2,9,68,0x2,6x2,13,44,47,44x5,63,44,62,44x4,47,44x4,0x12,6x2,9,80,76x2,br,0x8,6x2,9,68,0x2,6x2,9,44,47,44x5,63,44,62,44x4,47,44x4,0x12,6x2,9,76x3,br,0x8,6x2,9,68,0x2,6x2,9,44,47,44x5,63,44,62,44x4,47,44x4,0x12,6x2,9,76x3,br,0,6x2,9,68x8,0x2,6x2,9,44,47,44x5,54,52,55,44x4,47,44x4,0x12,6x2,9,76x3,br,0,6x2,9,68x8,0x2,6x2,9,44,47,44x5,58,61,59,44x4,47,44x4,0x7,6x2,9,81x2,6x2,9,76x3,br,0,6x2,9,69,73,100,69,73,100,69,73,0x2,6x2,9,44,47,44x12,47,44x4,0x7,76x11,5,br,0,6x2,9,70,74,100,70,74,100,70,74,0x2,6x2,9,44,47,44x12,47,44x4,0x7,76x11,5,br,0,6x2,9,70,74,100,70,74,100,70,74,0x2,6x2,9,66,47,44x12,47,44x4,0x7,76x11,5,br,0,6x2,9,70,74,100,70,74,100,70,74,0x2,6x2,9,67,47,44x12,47,44x4,0x7,76x11,5,br,0,6x2,9,70,74,100,71,74,100,70,74,0x2,6x2,9,66,47,44x12,47,44x4,0x7,76x11,5,br,0,6x2,9,70,74,100,70,74,100,70,74,0x2,6x2,9,67,47,44x12,47,44x4,0x12,6x2,9,76x3,br,0,6x2,9,70,74,100,70,74,100,70,74,0x2,6x2,9,66,47,44x12,47,44x4,0x12,6x2,9,76x3,br,0,6x2,9,70,74,100,70,74,100,70,74,0x2,6,7,9,67,47,44x12,47,44x4,0x12,6x2,9,76x3,br,0,6x2,9,70,74,100,70,74,100,70,74,0x2,6x2,9,66,47,44x12,47,44x4,0x12,6x2,9,76x3,br,0,6x2,9,72,75,100,72,75,100,72,75,0x2,6x2,9,67,47,44x12,47,44x4,0x12,6x2,9,77,76x2,br,0,6x2,9,68x8,0x2,6x2,9,44,47,44x12,47,44x4,0x12,6x2,9,78,76x2,br,0,6x2,9,68x8,0x2,6x2,9,44,47,44x5,56,60,57,44x4,47,44x4,0x12,6x2,9,78,76x2,br,0x5,6x2,9,3x2,0x4,6x2,9,44,47,49x5,50,49,51,49x4,48,44x4,0x12,6x2,9,78,76x2,br,0x14,6x2,9,44,47,52x5,54,52,55,52x4,53,44x4,br,0x14,6x2,9,44,47,44x5,58,61,59,44x4,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x12,47,44x4,br,0x14,6x2,9,44,47,44x5,56,60,57,44x4,47,44x4,br,0x14,6x2,9,44,47,44x5,50,49,51,44x4,47,44x4,br,0x14,6x2,9,44,47,44x5,63,44,62,44x4,47,44x4,br,0x14,6x2,9,44,47,44x5,63,44,62,44x4,47,44x4,br,0x14,6x2,9,44,47,44x5,63,44,62,44x4,47,44x4,br,0x14,6x2,12,44,47,44x5,63,44,62,44x4,47,44x4,br,0x14,6x2,9,44,47,44x5,63,44,62,44x4,47,44x4,br,0x14,6x2,9,44x2,45x7,65,45x5,44x4,br,0x14,6x2,9,44x19";
world_txtB = "br,br,br,br,br,br,br,br,br,br,br,0x34,6,br,0x34,6,br,0x34,6,br,0x34,6";
world_tilesA = importtiles(world_txtA);
world_tilesB = importtiles(world_txtB);
tiledata = new Array();
tiledata[6] = {blockx:1};
tiledata[7] = {blockx:1};
tiledata[8] = {blockx:1};
tiledata[9] = {blockx:1};
tiledata[10] = {over:1, sity:10};
tiledata[11] = {over:1, sity:10};
tiledata[12] = {over:1, sity:10};
tiledata[13] = {over:1, sity:10};
tiledata[14] = {animd:1, over:1, sity:10};
tiledata[15] = {blockx:1};
tiledata[17] = {blockl:1, xstate:"sit", xaction:"standE", over:1};
tiledata[18] = {blockr:1, xstate:"sit", xaction:"standW", over:1};
tiledata[19] = {blocku:1, xstate:"sit", xaction:"standS", over:1};
tiledata[20] = {blockx:1};
tiledata[21] = {over:1};
tiledata[22] = {blocku:1, over:1};
tiledata[23] = {blocku:1, over:1};
tiledata[24] = {blockx:1};
tiledata[25] = {blockx:1};
tiledata[26] = {blockx:1};
tiledata[27] = {over:1};
tiledata[28] = {over:1};
tiledata[29] = {over:1};
tiledata[30] = {blocku:1, over:1};
tiledata[31] = {blocku:1, over:1, sity:6};
tiledata[32] = {blocku:1, over:1};
tiledata[33] = {blockl:1, over:1};
tiledata[34] = {blockx:1, over:1};
tiledata[35] = {blocku:1, over:1};
tiledata[36] = {blockx:1};
tiledata[37] = {blockx:1, over:1};
tiledata[39] = {blockl:1, blockr:1, blocku:1, over:1, xstate:"sit", xaction:"standS"};
tiledata[40] = {animu:1, over:1};
tiledata[41] = {over:1};
tiledata[42] = {over:1};
tiledata[43] = {over:1};
tiledata[44] = {checkerz:3};
tiledata[45] = {checkerz:3};
tiledata[46] = {checkerz:3};
tiledata[47] = {checkerz:3, over:1};
tiledata[48] = {checkerz:3};
tiledata[49] = {checkerz:3};
tiledata[50] = {checkerz:3};
tiledata[51] = {checkerz:3};
tiledata[52] = {checkerz:3};
tiledata[53] = {checkerz:3};
tiledata[54] = {checkerz:3};
tiledata[55] = {checkerz:3};
tiledata[56] = {checkerz:3};
tiledata[57] = {checkerz:3};
tiledata[58] = {checkerz:3};
tiledata[59] = {checkerz:3};
tiledata[60] = {checkerz:3};
tiledata[61] = {checkerz:3};
tiledata[62] = {checkerz:3};
tiledata[63] = {checkerz:3};
tiledata[64] = {checkerz:3, blocku:1, over:1};
tiledata[65] = {checkerz:3, blocku:1, over:1};
tiledata[66] = {checkerz:3, blocku:1, over:1};
tiledata[67] = {checkerz:3, blocku:1, over:1};
tiledata[69] = {blocku:1, over:1};
tiledata[70] = {blocku:1, over:1};
tiledata[71] = {blocku:1, over:1};
tiledata[72] = {blocku:1, over:1};
tiledata[73] = {over:1};
tiledata[74] = {blocku:1, over:1};
tiledata[75] = {over:1};
tiledata[76] = {checkerz:2};
tiledata[77] = {checkerz:2, over:1};
tiledata[78] = {checkerz:2, over:1};
tiledata[79] = {checkerz:2, over:1};
tiledata[80] = {checkerz:2, over:1};
tiledata[82] = {blockx:1, over:1, xstate:"sit", xaction:"standS", sity:10};
tiledata[83] = {over:1};
tiledata[84] = {over:1};
tiledata[85] = {over:1};
tiledata[86] = {blocku:1, over:1};
tiledata[87] = {blocku:1, over:1};
tiledata[88] = {blocku:1, over:1};
tiledata[90] = {over:1};
tiledata[91] = {over:1};
tiledata[92] = {over:1};
tiledata[100] = {blockx:1};
world_map = new Array();
world_map[0] = [{desc:"herroom", snd:"inside"}, {desc:"counsellor", snd:"inside"}, {desc:"changeroom", snd:"tiled"}, {desc:"hisbedroom2", snd:"inside"}];
world_map[1] = [{desc:"math", snd:"class"}, {desc:"science", snd:"class"}, {desc:"gym", snd:"gym"}, {desc:"gym", snd:"gym"}];
world_map[2] = [{desc:"bathroom", snd:"tiled"}, {desc:"halltogym", snd:"hall"}, {desc:"gym", snd:"gym"}, {desc:"gym", snd:"gym"}];
world_map[3] = [{desc:"halltomath", snd:"hall"}, {desc:"halltoscience", snd:"hall"}, {desc:"halltocounsel", snd:"hall"}];
world_text = new Array();
world_interactA = new Array();
world_interactB = new Array();
var i = 0;
while (i < 100) {
world_interactA[i] = new Array();
i++;
}
world_interactA[16][25] = {lock:1, locktxt:"pc::stupid::(Oh wait, I need to get the Hall pass first.)", tx:9, ty:50, l:0};
world_interactA[17][25] = {lock:1, locktxt:"pc::stupid::(Oh wait, I need to get the Hall pass first.)", tx:9, ty:50, l:0};
world_interactA[9][49] = {lock:1, tx:17, ty:24, l:0};
world_interactA[13][39] = {tx:19, ty:50, l:0};
world_interactA[14][39] = {tx:19, ty:50, l:0};
world_interactA[19][49] = {tx:13, ty:38, l:0};
world_interactA[1][50] = {lock:1, tx:0, ty:0, l:0};
world_interactA[6][49] = {};
world_interactA[30][27] = {lock:0, tx:38, ty:50, l:0};
world_interactA[31][27] = {lock:0, tx:38, ty:50, l:0};
world_interactA[38][49] = {lock:1, tx:31, ty:26, l:0};
world_interactA[8][37] = {lock:0, locktxt:"pc::blush::(Nearly forgot to wash my hands.)"};
world_interactA[9][37] = {lock:0, locktxt:"pc::blush::(Nearly forgot to wash my hands.)"};
world_interactA[10][37] = {lock:0, locktxt:"pc::blush::(Nearly forgot to wash my hands.)"};
world_interactA[23][50] = {lock:0, locktxt:"pc::stupid::(Can't go to Science class without my books.)"};
world_interactA[23][51] = {lock:0, locktxt:"pc::stupid::(Can't go to Science class without my books.)"};
world_interactA[23][52] = {lock:0, locktxt:"pc::stupid::(Can't go to Science class without my books.)"};
world_interactA[36][34] = {lock:1, tx:51, ty:19, l:0};
world_interactA[36][35] = {lock:1, tx:51, ty:20, l:0};
world_interactA[36][36] = {lock:1, tx:51, ty:21, l:0};
world_interactA[50][19] = {lock:1, tx:35, ty:34, l:0};
world_interactA[50][20] = {lock:1, tx:35, ty:35, l:0};
world_interactA[50][21] = {lock:1, tx:35, ty:36, l:0};
world_interactA[53][12] = {lock:1, tx:55, ty:17, l:0};
world_interactA[54][12] = {lock:1, tx:55, ty:17, l:0};
world_interactA[55][16] = {tx:54, ty:11, l:0};
world_interactA[72][8] = {lock:1, locktxt:"pc::default::(I'm not sure why this door is here but it leads to the boys changing room... It's locked of course.)"};
world_interactA[72][9] = {lock:1, locktxt:"pc::default::(I'm not sure why this door is here but it leads to the boys changing room... It's locked of course.)"};
world_interactA[64][6] = {};
world_interactA[91][16] = {lock:1, tx:87, ty:7, l:0, locktxt:"pc::shifty::(Unlike those other girls I wouldn't even dare think of going into the boys changing room.)"};
world_interactA[41][7] = {tx:60, ty:47, l:0};
world_interactA[41][8] = {tx:60, ty:47, l:0};
world_interactA[59][46] = {lock:1, tx:40, ty:7, l:0};
world_interactA[59][47] = {lock:1, tx:40, ty:8, l:0};
world_interactA[21][49] = {lock:1, locktxt:"pc::shock::(W-wait, this is the boys room. Nearly made a huge mistake!)"};
world_interactA[64][6] = {touch:0};
world_text[0] = {sprite:0, propname:"gstate", propval:"gym", propvalgym:""};
world_sprites = new Array();
sub_pc = (world_sprites[0] = new Array());
sub_fat = (world_sprites[1] = new Array());
sub_pretty = (world_sprites[2] = new Array());
sub_les = (world_sprites[3] = new Array());
sub_bitch = (world_sprites[4] = new Array());
sub_slut = (world_sprites[5] = new Array());
sub_david = (world_sprites[6] = new Array());
sub_melissa = (world_sprites[7] = new Array());
sub_teech = (world_sprites[8] = new Array());
sub_extra1 = (world_sprites[9] = new Array());
sub_extra2 = (world_sprites[10] = new Array());
sub_extra3 = (world_sprites[11] = new Array());
sub_extra4 = (world_sprites[12] = new Array());
sub_extra5 = (world_sprites[13] = new Array());
sub_extra6 = (world_sprites[14] = new Array());
sub_extra7 = (world_sprites[15] = new Array());
sub_extra8 = (world_sprites[16] = new Array());
sub_jock = (world_sprites[17] = new Array());
sub_numbers = {sub_pc:0, sub_fat:1, sub_pretty:2, sub_les:3, sub_bitch:4, sub_slut:5, sub_david:6, sub_melissa:7, sub_teech:8, sub_extra1:9, sub_extra2:10, sub_extra3:11, sub_extra4:12, sub_extra5:13, sub_extra6:14, sub_extra7:15, sub_extra8:16, sub_jock:17};
sub_pretty.push({tx:1, ty:1, state:1, l:0, gchar:"pretty", gstate:"", gaction:"standW", spd:1});
sub_david.push({tx:1, ty:1, state:1, l:0, gchar:"david", gstate:"", gaction:"standW", spd:1});
sub_extra7.push({tx:1, ty:1, state:1, l:0, gchar:"extraM", gstate:"", gaction:"standW", spd:2});
sub_extra8.push({tx:1, ty:1, state:1, l:0, gchar:"extraF", gstate:"", gaction:"standW", spd:1});
sub_jock.push({tx:1, ty:1, state:1, l:0, gchar:"jock", gstate:"", gaction:"standW", spd:2});
sub_pretty.push({});
sub_david.push({});
sub_extra7.push({});
sub_extra8.push({});
sub_jock.push({});
sub_teech.push({tx:17, ty:21, state:1, l:0, gchar:"math", gstate:"", gaction:"standW", spd:2});
sub_pc.push({tx:10, ty:19, state:1, l:0, gchar:"pc", gstate:"", gaction:"standE", spd:2, pdelay:-1});
sub_fat.push({tx:7, ty:19, state:1, l:0, gchar:"fat", gstate:"", gaction:"standE", spd:3});
sub_melissa.push({tx:10, ty:23, state:1, l:0, gchar:"melissa", gstate:"", gaction:"standE", spd:2});
sub_extra1.push({tx:7, ty:21, state:1, l:0, gchar:"extraM", gstate:"", gaction:"standE", spd:3});
sub_extra2.push({tx:10, ty:21, state:1, l:0, gchar:"extraF", gstate:"", gaction:"standE", spd:2});
sub_extra3.push({tx:13, ty:21, state:1, l:0, gchar:"extraF", gstate:"", gaction:"standE", spd:3});
sub_extra4.push({tx:7, ty:23, state:1, l:0, gchar:"extraM", gstate:"", gaction:"standE", spd:2});
sub_extra5.push({tx:13, ty:23, state:1, l:0, gchar:"extraF", gstate:"", gaction:"standE", spd:2});
sub_extra6.push({tx:13, ty:19, state:1, l:0, gchar:"extraF", gstate:"", gaction:"standE", spd:2});
sub_fat.push({});
sub_melissa.push({});
sub_extra1.push({});
sub_extra2.push({});
sub_extra3.push({});
sub_extra4.push({});
sub_extra5.push({});
sub_extra6.push({});
sub_pc.push({pa:1});
world_text[1] = [{sprite:0, animate:1, canright:0, canleft:0, canup:0, candown:0}, "math::default::Remember, when you divide or multiply both sides of an inequality by a negative number you have to swap the inequality.", "math::default::So does anyone want to come up and solve this?"];
sub_teech.push({pa:2, pdelay:2});
world_text[2] = [{canright:1, canleft:1, canup:1, candown:1}, "math::excited::Ann, you want to solve it?", "pc::default::I need to use the toilet.", "math::dispoint::Oh... ok, come get a hall pass."];
sub_teech.push({touchx:3, gaction:"standN", touchskip:1, taction:"face"});
world_text[3] = [{func:"locks", funcpass:"A,16,25,0,A,17,25,0"}, "math::dispoint::Here you go."];
sub_pc.push({pa:9, pxmin:9, pxmax:9, pymin:50, pymax:50});
world_text[9] = [0, "math::default::Alright, who can solve this?", "math::pissed::Anyone?", "pc::sigh::(I really do need to use the toilet but I can't understand this stuff either.)"];
sub_teech.push({gaction:"standW"});
sub_les.push({tx:10, ty:32, state:1, l:0, gchar:"les", gstate:"", gaction:"standS", spd:2});
sub_bitch.push({tx:9, ty:32, state:1, l:0, gchar:"bitch", gstate:"", gaction:"standE", spd:2});
sub_slut.push({tx:12, ty:32, state:1, l:0, gchar:"slut", gstate:"", gaction:"standS", spd:1});
sub_les.push({});
sub_bitch.push({});
sub_pc.push({pa:4, pxmin:8, pxmax:10, pymin:35, pymax:35});
world_text[4] = [{func:"advancestates", funcpass:"sub_bitch,sub_les", canright:0, canleft:0, canup:0, candown:0}, "les::smoke::Hey, look.", "bitch::cunt::How about we... *pss sss pss sss*", "les::smokelaugh::Ha ha, yeah ok."];
sub_les.push({tx:10, ty:32, gaction:"walkS", dir:"d"});
sub_bitch.push({tx:9, ty:32, gaction:"walkS", dir:"d"});
sub_les.push({tx:10, ty:33, gaction:"walkE", dir:"r"});
sub_bitch.push({tx:9, ty:33, gaction:"walkE", dir:"r"});
sub_les.push({tx:14, ty:33, gaction:"walkN", dir:"u"});
sub_bitch.push({tx:13, ty:33, gaction:"walkN", dir:"u"});
sub_les.push({tx:14, ty:32, gaction:"standS", pa:5});
sub_les.push({});
sub_bitch.push({tx:13, ty:32, gaction:"standS"});
world_text[5] = {canright:1, canleft:1, canup:1, candown:1};
sub_pc.push({pa:6, pxmin:12, pxmax:12, pymin:33, pymax:33});
world_text[6] = {func:"change_world", funcpass:"stopdoor,1"};
sub_slut.push({pushd:7, touchskip:1});
world_text[7] = {func:"singleton1", funcpass:1, canright:0, canleft:0, canup:0, candown:0, cut:"blowjob1"};
sub_bitch.push({tx:13, ty:32, gaction:"walkN", dir:"u"});
sub_bitch.push({tx:13, ty:32, gaction:"walkS", dir:"d"});
sub_bitch.push({tx:13, ty:33, gaction:"standW"});
world_text[8] = {func:"change_world", funcpass:"stopdoor,0"};
sub_les.push({pa:8});
sub_les.push({tx:14, ty:32, gaction:"walkS", dir:"d"});
sub_les.push({tx:14, ty:34, gaction:"walkW", dir:"l"});
sub_les.push({tx:13, ty:34, gaction:"standW", pa:10});
world_text[10] = [{func:"singleton1", funcpass:0}, "les::smokelaugh::Ha ha, she's just standing there watching.", "bitch::cunt::What a dirty slut.", "les::smoke::I think you've watched long enough, slut."];
sub_les.push({tx:13, ty:34, gaction:"walkW", dir:"l"});
sub_les.push({tx:10, ty:34, gaction:"walkN", dir:"u"});
sub_les.push({tx:10, ty:32, gaction:"standN", pa:11});
world_text[11] = [{func:"advancestates", funcpass:"sub_bitch", canright:1, canleft:1, canup:1, candown:1}, "bitch::cunt::I'm gonna borrow your Hall Pass.", "pc::shock::But that's-", "bitch::douche::Move, bitch."];
sub_bitch.push({tx:13, ty:33, gaction:"walkW", dir:"l"});
sub_bitch.push({tx:11, ty:33, gaction:"walkN", dir:"u"});
sub_bitch.push({tx:11, ty:32, gaction:"standW"});
sub_pc.push({pa:12, pxmin:13, pxmax:14, pymin:32, pymax:32});
world_text[12] = {cut:"transition", audio:"bathroomtransition", func:"locks", funcpass:"A,38,49,0,A,8,37,1,A,9,37,1,A,10,37,1,A,23,50,1,A,23,51,1,A,23,52,1"};
sub_pc.push({});
sub_les.push({});
sub_slut.push({});
sub_les.push({statejump:1, tx:1, ty:1, l:0});
sub_bitch.push({statejump:1, tx:1, ty:1, l:0});
sub_slut.push({statejump:1, tx:1, ty:1, l:0});
sub_pretty.push({statejump:1, tx:32, ty:18, gaction:"standS", l:0});
sub_extra1.push({statejump:1, tx:30, ty:21, l:0});
sub_extra3.push({statejump:1, tx:43, ty:21, l:0});
sub_extra4.push({statejump:1, tx:41, ty:21, l:0});
sub_extra6.push({statejump:1, tx:40, ty:21, l:0});
sub_jock.push({statejump:1, tx:27, ty:50, gaction:"standN", l:0});
sub_extra5.push({statejump:1, tx:37, ty:22, l:0});
sub_teech.push({statejump:1, tx:38, ty:25, gchar:"science", gaction:"standN", l:0});
sub_extra8.push({statejump:1, tx:45, ty:22, l:0, gaction:"standW"});
sub_pretty.push({});
sub_extra1.push({});
sub_extra3.push({});
sub_extra4.push({});
sub_extra6.push({});
sub_jock.push({});
sub_extra5.push({});
sub_teech.push({});
sub_extra8.push({});
sub_extra2.push({statejump:1, tx:30, ty:51, gaction:"standE", l:0});
sub_extra2.push({tx:30, ty:51, gaction:"standE"});
sub_extra2.push({tx:30, ty:51, gaction:"walkE", dir:"r"});
sub_extra2.push({tx:32, ty:51, gaction:"walkS", dir:"d"});
sub_extra2.push({tx:32, ty:52, gaction:"walkE", dir:"r"});
sub_extra2.push({tx:38, ty:51, gaction:"walkN", dir:"u"});
sub_extra2.push({tx:31, ty:24, gaction:"walkE", dir:"r"});
sub_extra2.push({tx:34, ty:24, gaction:"walkN", dir:"u"});
sub_extra2.push({tx:34, ty:21, gaction:"standW"});
sub_extra7.push({statejump:1, tx:5, ty:51, gaction:"standE", l:0});
sub_extra7.push({tx:5, ty:51, gaction:"walkE", dir:"r"});
sub_extra7.push({tx:9, ty:51, gaction:"walkN", dir:"u"});
sub_extra7.push({tx:16, ty:24, gaction:"standN"});
world_interactA[9][31] = {touch:13};
world_interactA[10][31] = {touch:13};
world_text[13] = {func:"locks", funcpass:"A,8,37,0,A,9,37,0,A,10,37,0", audio:"washhands"};
sub_fat.push({statejump:1, tx:7, ty:50, gaction:"standS", l:0});
sub_pc.push({pa:14, pxmin:12, pxmax:12, pymin:37, pymax:37});
world_text[14] = [0, "pc::default::(I left my books in Math class.)", "pc::default::(I'll have to go back and get them before getting the Science books from my locker.)"];
sub_pc.push({pa:15, pxmin:9, pxmax:9, pymin:50, pymax:52});
world_text[15] = [0, "fat::nervous::Hey, Ann.", "pc::think::(What was his name?)", "pc::blush::Uh, hi?", "fat::determined::I have your books.", "pc::happy::Oh, thanks!", "fat::nervous::Heh, no problemo."];
sub_fat.push({touchd:16, touchr:16, taction:"face", touchskip:1});
world_text[16] = [{func:"locks", funcpass:"A,6,49,3,17"}, "fat::determined::Here you are. Bye.", "pc::happy::Bye."];
sub_fat.push({tx:7, ty:50, gaction:"walkW", dir:"l"});
sub_fat.push({tx:0, ty:0, gaction:"standW"});
world_text[17] = [{func:"locks", funcpass:"A,6,49,3,-1,A,23,50,0,A,23,51,0,A,23,52,0"}, "pc::default::(I really should learn that guys name.)", "pc::happy::(Ok, time for my favorite class... Science!)"];
sub_pc.push({pa:20, pxmin:25, pxmax:25, pymin:50, pymax:52});
world_text[20] = {func:"advancestates", funcpass:"sub_extra2"};
sub_pc.push({pa:18, pxmin:30, pxmax:30, pymin:50, pymax:52});
world_text[18] = [{func:"advancestates", funcpass:"sub_david,sub_melissa"}, "david::lovey::No, I love YOU more.", "melissa::lovey::Nooooo, I love YOU more.", "pc::happy::(They're so cute.)", "melissa::sad::Aww, I gotta get to P.E.", "david::sad::I'll miss you."];
sub_david.push({statejump:1, tx:33, ty:51, gaction:"standE", l:0});
sub_melissa.push({statejump:1, tx:34, ty:51, gaction:"standW", l:0});
sub_david.push({});
sub_melissa.push({});
sub_melissa.push({tx:34, ty:51, gaction:"walkN", dir:"u"});
sub_melissa.push({tx:34, ty:35, gaction:"walkE", dir:"r"});
tempstate = sub_melissa.push({tx:51, ty:20, gaction:"standE"}) - 1;
sub_david.push({tx:33, ty:51, gaction:"walkE", dir:"r"});
sub_david.push({tx:38, ty:51, gaction:"walkN", dir:"u", spd:2});
sub_david.push({tx:31, ty:24, gaction:"walkE", dir:"r"});
sub_david.push({tx:36, ty:24, gaction:"walkN", dir:"u"});
sub_david.push({tx:36, ty:21, gaction:"walkE", dir:"r"});
sub_david.push({tx:39, ty:21, gaction:"standS", spd:1});
sub_pc.push({pa:19, pxmin:30, pxmax:31, pymin:26, pymax:26});
world_text[19] = {func:"locks", funcpass:"A,30,27,1,A,31,27,1", audio:"bell", sprite:sub_numbers.sub_melissa, propname:"state", propval:tempstate};
sub_pc.push({pa:21, pxmin:34, pxmax:34, pymin:19, pymax:19});
world_text[21] = [{func:"advancestates", funcpass:"sub_teech", cut:"footsie", canright:0, canleft:0, canup:0, candown:0}, "pc::sigh::(Made it.)", "science::default::Last time we were discussing Vapor Pressure. Open up to page 113.", "science::default::Remember, we were discussing how heavy molecules have a low vapor pressure.", "science::default::Also molecules at low temperatures or with strong intermolecular forces have a low vapor pressure.", "science::default::Now we'll be learning about molecules with a high volatility, a high vapor pressure.", "pc::lipbite::(He definitely didn't brush his hair today.)", "pretty::default::...", "pc::shifty::(I wonder if I could get perfect eyelashes like his.)", "pretty::smile::...", "pc::blush::(He caught me staring!)", "pretty::smirk::...", "pc::shock::(He just touched his leg to mine!)"];
sub_teech.push({statejump:1, tx:33, ty:24, gaction:"standN", l:0});
sub_teech.push({tx:33, ty:24, gaction:"walkN", dir:"u"});
sub_teech.push({tx:33, ty:23, gaction:"standN", pa:22});
sub_teech.push({});
world_text[22] = [{func:"change_clocks", funcpass:"2,3", cut:"transition", audio:"bell"}, "science::mad::Ann!", "pc::shock::Ah, what?!", "science::mad::How many degrees, Celsius, is equal to atmospheric pressure at sea level?", "pc::think::Uhhh... (He's still touching me!)", "pc::stupid::64?", "pretty::laugh::Pfffbbt.", "science::mad::If you would stop staring at Michael for half-a-second and actually paid attention to the lessons you wouldn't be flunking.", "pc::blush::Ok. (I'm so embarrassed.)", "science::default::I want you to stay after class."];
sub_david.push({statejump:1, tx:15, ty:21, l:0, gaction:"standW"});
sub_melissa.push({statejump:1, tx:15, ty:21, l:0, gaction:"standW"});
sub_extra4.push({statejump:1, tx:15, ty:21, l:0, gaction:"standW"});
sub_extra5.push({statejump:1, tx:15, ty:21, l:0, gaction:"standW"});
sub_extra6.push({statejump:1, tx:15, ty:21, l:0, gaction:"standW"});
sub_extra7.push({statejump:1, tx:15, ty:21, l:0, gaction:"standW"});
sub_extra8.push({statejump:1, tx:15, ty:21, l:0, gaction:"standW"});
sub_extra3.push({statejump:1, tx:15, ty:21, l:0, gaction:"standW"});
sub_les.push({});
sub_bitch.push({});
sub_slut.push({});
sub_les.push({});
sub_bitch.push({});
sub_slut.push({});
sub_fat.push({statejump:1, tx:56, ty:20, l:0, gstate:"", gaction:"standN", spd:4});
sub_extra1.push({statejump:1, tx:58, ty:20, l:0, gstate:"gym", gaction:"standN", spd:3});
sub_pretty.push({statejump:1, tx:60, ty:20, l:0, gstate:"gym", gaction:"standN", spd:3});
sub_extra2.push({statejump:1, tx:67, ty:10, l:0, gstate:"gym", gaction:"standN", spd:3});
sub_extra2.push({tx:67, ty:10, gaction:"walkW", dir:"l"});
sub_extra2.push({tx:60, ty:10, gaction:"walkS", dir:"d"});
sub_extra2.push({tx:60, ty:11, gaction:"walkW", dir:"l"});
sub_extra2.push({tx:54, ty:11, gaction:"walkS", dir:"d"});
sub_extra2.push({tx:55, ty:22, gaction:"walkE", dir:"r"});
sub_extra2.push({tx:56, ty:22, gaction:"standN"});
sub_jock.push({statejump:1, tx:75, ty:20, l:0, gstate:"gym", gaction:"standW"});
sub_jock.push({});
sub_jock.push({tx:75, ty:20, gaction:"walkW", dir:"l"});
sub_jock.push({tx:71, ty:20, gaction:"walkS", dir:"d"});
sub_jock.push({tx:71, ty:22, gaction:"walkW", dir:"l"});
tempstate = sub_jock.push({statejump:1, l:0, tx:58, ty:22, gaction:"standN"}) - 1;
sub_teech.push({statejump:1, tx:41, ty:25, gaction:"standW", l:0});
sub_teech.push({tx:41, ty:25, gaction:"walkS", dir:"d"});
sub_teech.push({tx:41, ty:26, gaction:"walkE", dir:"r"});
sub_teech.push({tx:43, ty:26, gaction:"standN", pa:23});
world_text[23] = [{func:"locks", funcpass:"A,30,27,0,A,31,27,0,A,38,49,1,A,36,34,0,A,36,35,0,A,36,36,0", canright:1, canleft:1, canup:1, candown:1}, "science::default::So no more slacking off, got it?", "pc::shame::Yes ma'am.", "science::default::Get to class."];
sub_teech.push({});
sub_teech.push({statejump:1, tx:59, ty:18, l:0, gchar:"gym", gaction:"standS"});
sub_teech.push({});
sub_pc.push({});
sub_pc.push({statejump:1, tx:40, ty:25, gaction:"standE", l:0});
sub_pc.push({pa:24, pxmin:36, pxmax:36, pymin:50, pymax:52});
world_text[24] = [{sprite:0, propname:"spd", propval:3}, "pc::default::(I have to get to P.E. quick.)"];
sub_pc.push({pa:25, pxmin:31, pxmax:35, pymin:39, pymax:39});
world_text[25] = {func:"advancestates", funcpass:"sub_teech,sub_jock", audio:"bell"};
sub_pc.push({pa:26, pxmin:51, pxmax:51, pymin:19, pymax:21});
world_text[26] = [{func:"locks", funcpass:"A,64,6,3,27"}, "gym::yell::Go get changed, hurry it up!"];
world_text[27] = {func:"locks", funcpass:"A,64,6,3,-1,A,53,12,0,A,54,12,0", sprite:0, propname:"gstate", propval:"gym"};
sub_pc.push({pa:30, pxmin:57, pxmax:57, pymin:11, pymax:11});
world_text[30] = {sprite:sub_numbers.sub_jock, propname:"state", propval:tempstate};
sub_pc.push({pa:28, pxmin:60, pxmax:60, pymin:22, pymax:22});
world_text[28] = [{func2:"refpush", func2pass:"sub_slut,sub_bitch,sub_les", sprite:0, propname:"gstate", propval:"jack", canright:0, canleft:0, canup:0, candown:0, func:"advancestates", funcpass:"sub_jock,sub_fat,sub_pretty,sub_extra1,sub_extra2,sub_slut,sub_bitch,sub_les"}, "gym::default::Alright everyone, jump some jacks."];
sub_jock.push({});
sub_jock.push({gstate:"jack"});
sub_extra2.push({gstate:"jack"});
sub_fat.push({});
sub_fat.push({gstate:"jack"});
sub_pretty.push({});
sub_pretty.push({gstate:"jack"});
sub_extra1.push({});
sub_extra1.push({gstate:"jack"});
sub_les.push({statejump:1, tx:30, ty:35, l:0, gstate:"", gaction:"walkE", spd:2});
sub_bitch.push({statejump:1, tx:30, ty:34, l:0, gstate:"", gaction:"walkE", spd:2});
sub_slut.push({statejump:1, tx:29, ty:35, l:0, gstate:"", gaction:"walkE", spd:1});
sub_bitch.push({tx:30, ty:34, gaction:"walkE", dir:"r"});
sub_les.push({tx:30, ty:35, gaction:"walkE", dir:"r"});
sub_slut.push({tx:29, ty:35, gaction:"walkE", dir:"r"});
sub_bitch.push({tx:54, ty:19, gaction:"standE"});
sub_les.push({tx:54, ty:20, gaction:"standE"});
sub_slut.push({tx:53, ty:20, gaction:"standE", pa:29});
world_text[29] = [{func:"advancestates", funcpass:"sub_bitch,sub_les", sprite:0, propname:"gaction", propval:"standW"}, "gym::yell::You're tardy, ladies!", "bitch::cunt::We have a Hall Pass.", "pc::shifty::...", "gym::default::If I didn't give it to you then I don't care. This is the 6th time you've been tardy this mo-", "slut::default::We're on our period.", "gym::lost::Uh, eh... well go change."];
sub_bitch.push({tx:54, ty:19, gaction:"walkE", dir:"r"});
sub_les.push({tx:54, ty:20, gaction:"walkE", dir:"r"});
sub_slut.push({tx:53, ty:20, gaction:"walkE", dir:"r"});
sub_bitch.push({tx:55, ty:19, gaction:"walkN", dir:"u"});
sub_les.push({tx:55, ty:20, gaction:"walkN", dir:"u"});
sub_slut.push({tx:55, ty:20, gaction:"walkN", dir:"u"});
sub_bitch.push({tx:54, ty:11, gaction:"walkE", dir:"r"});
sub_les.push({tx:54, ty:11, gaction:"walkE", dir:"r"});
sub_slut.push({tx:54, ty:11, gaction:"walkE", dir:"r"});
sub_bitch.push({tx:71, ty:11, gaction:"standW", gstate:"gym"});
sub_les.push({tx:70, ty:11, gaction:"standW", gstate:"gym"});
sub_slut.push({tx:69, ty:11, gaction:"standW", gstate:"gym", pa:31});
sub_slut.push({});
world_text[31] = [{sprite:0, propname:"gstate", propval:"jog", func:"advancestates", funcpass:"sub_jock,sub_fat,sub_pretty,sub_extra1,sub_extra2,sub_teech"}, "gym::yell::Alright, jog laps!"];
sub_fat.push({spd:4, tx:56, ty:20, gstate:"jog", gaction:"walkW", dir:"l", forceinclude:1});
sub_jock.push({spd:4, tx:58, ty:22, gstate:"jog", gaction:"walkW", dir:"l", forceinclude:1});
sub_extra1.push({spd:3, tx:58, ty:20, gstate:"jog", gaction:"walkW", dir:"l"});
sub_pretty.push({spd:3, tx:60, ty:20, gstate:"jog", gaction:"walkW", dir:"l"});
sub_pretty.push({tx:56, ty:20, gaction:"walkW", pa:41});
sub_pretty.push({tx:56, ty:20, gaction:"walkW", dir:"l"});
sub_extra2.push({spd:3, tx:56, ty:22, gstate:"jog", gaction:"walkW", dir:"l"});
tempstate1 = sub_fat.push({tx:54, ty:20, gaction:"walkS", dir:"d"}) - 1;
tempstate2 = sub_jock.push({tx:54, ty:22, gaction:"walkS", dir:"d"}) - 1;
tempstate4 = sub_extra1.push({tx:53, ty:20, gaction:"walkS", dir:"d"}) - 1;
tempstate3 = sub_pretty.push({tx:53, ty:20, gaction:"walkS", dir:"d"}) - 1;
tempstate5 = sub_extra2.push({tx:53, ty:22, gaction:"walkS", dir:"d"}) - 1;
sub_fat.push({tx:54, ty:31, gaction:"walkE", dir:"r"});
sub_jock.push({tx:54, ty:31, gaction:"walkE", dir:"r"});
sub_extra1.push({tx:53, ty:32, gaction:"walkE", dir:"r"});
sub_pretty.push({tx:53, ty:32, gaction:"walkE", dir:"r"});
sub_extra2.push({tx:53, ty:32, gaction:"walkE", dir:"r"});
sub_fat.push({tx:91, ty:31, gaction:"walkN", dir:"u"});
sub_jock.push({tx:91, ty:31, gaction:"walkN", dir:"u"});
sub_extra1.push({tx:92, ty:32, gaction:"walkN", dir:"u"});
sub_pretty.push({tx:92, ty:32, gaction:"walkN", dir:"u"});
sub_extra2.push({tx:92, ty:32, gaction:"walkN", dir:"u"});
sub_fat.push({tx:91, ty:19, gaction:"walkW", dir:"l"});
sub_jock.push({tx:91, ty:19, gaction:"walkW", dir:"l"});
sub_extra1.push({tx:92, ty:18, gaction:"walkW", dir:"l"});
sub_pretty.push({tx:92, ty:18, gaction:"walkW", dir:"l"});
sub_extra2.push({tx:92, ty:18, gaction:"walkW", dir:"l"});
sub_fat.push({tx:54, ty:19, pa:32});
sub_jock.push({tx:54, ty:19, pa:33});
sub_extra1.push({tx:53, ty:18, pa:34});
sub_pretty.push({tx:53, ty:18, pa:35});
sub_extra2.push({tx:53, ty:18, pa:37});
sub_fat.push({});
sub_jock.push({});
sub_extra1.push({});
sub_pretty.push({});
sub_extra2.push({});
world_text[32] = {sprite:sub_numbers.sub_fat, propname:"state", propval:tempstate1};
world_text[33] = {sprite:sub_numbers.sub_jock, propname:"state", propval:tempstate2};
world_text[34] = {sprite:sub_numbers.sub_extra1, propname:"state", propval:tempstate4};
world_text[35] = {sprite:sub_numbers.sub_pretty, propname:"state", propval:tempstate3};
world_text[37] = {sprite:sub_numbers.sub_extra2, propname:"state", propval:tempstate5};
world_text[38] = {canright:0, canleft:0, canup:0, candown:1};
world_text[39] = {canright:1, canleft:0, canup:0, candown:0};
world_text[40] = {canright:0, canleft:0, canup:1, candown:0};
world_text[41] = {canright:0, canleft:1, canup:0, candown:0};
sub_pc.push({pa:38, pxmin:53, pxmax:53, pymin:18, pymax:22});
sub_pc.push({pa:39, pxmin:53, pxmax:53, pymin:32, pymax:32});
sub_pc.push({pa:42, pxmin:83, pxmax:85, pymin:31, pymax:33});
world_text[42] = [{func:"change_clocks", funcpass:"2,4"}, "pc::think::(Did playing footsie mean he likes me?)", "pc::sigh::(He laughed at me when I got in trouble...)"];
sub_pc.push({pa:40, pxmin:92, pxmax:92, pymin:32, pymax:32});
sub_pc.push({pa:41, pxmin:92, pxmax:92, pymin:18, pymax:18});
sub_pc.push({pa:43, pxmin:59, pxmax:62, pymin:17, pymax:19});
world_text[43] = [0, "pc::happy::(His hair is bouncing.)", "gym::default::Keep it up, people."];
sub_pc.push({pa:38, pxmin:53, pxmax:53, pymin:18, pymax:18});
sub_pc.push({pa:39, pxmin:53, pxmax:53, pymin:32, pymax:32});
sub_pc.push({pa:44, pxmin:83, pxmax:85, pymin:31, pymax:33});
world_text[44] = [{func:"change_clocks", funcpass:"2,5"}, "pc::lipbite::(His shorts are riding up his butt.)", "pc::lipbite::(I want to touch it.)"];
sub_pc.push({pa:40, pxmin:92, pxmax:92, pymin:32, pymax:32});
sub_pc.push({pa:41, pxmin:92, pxmax:92, pymin:18, pymax:18});
sub_pc.push({pa:45, pxmin:59, pxmax:62, pymin:17, pymax:19});
world_text[45] = [0, "gym::default::What the heck is taking those girls so long?"];
sub_pc.push({pa:38, pxmin:53, pxmax:53, pymin:18, pymax:18});
sub_pc.push({pa:39, pxmin:53, pxmax:53, pymin:32, pymax:32});
sub_pc.push({pa:46, pxmin:83, pxmax:85, pymin:31, pymax:33});
world_text[46] = [{func2:"advancestates", func2pass:"sub_slut,sub_bitch,sub_les,sub_teech", func:"change_clocks", funcpass:"2,6"}, "pc::sweaty::Huff huuuu huff huuuu."];
sub_pc.push({pa:40, pxmin:92, pxmax:92, pymin:32, pymax:32});
sub_pc.push({pa:41, pxmin:92, pxmax:92, pymin:18, pymax:18});
sub_pc.push({pa:47, pxmin:59, pxmax:62, pymin:17, pymax:19});
world_text[47] = [{func:"advancestates", funcpass:"sub_slut,sub_bitch,sub_les,sub_teech"}, "gym::yell::You took your sweet time!", "gym::default::Line up and start with jumping-jacks."];
sub_pc.push({pa:38, pxmin:53, pxmax:53, pymin:18, pymax:18});
sub_pc.push({pa:39, pxmin:53, pxmax:53, pymin:32, pymax:32});
sub_pc.push({pa:48, pxmin:83, pxmax:85, pymin:31, pymax:33});
world_text[48] = {func:"change_clocks", funcpass:"2,7", func2:"locks", func2pass:"A,64,6,3,50,A,53,12,1,A,54,12,1"};
sub_pc.push({pa:40, pxmin:92, pxmax:92, pymin:32, pymax:32});
sub_pc.push({pa:41, pxmin:92, pxmax:92, pymin:18, pymax:18});
sub_pc.push({pa:49, pxmin:59, pxmax:62, pymin:17, pymax:19});
sub_teech.push({tx:59, ty:18, gaction:"walkS", dir:"u"});
sub_teech.push({tx:59, ty:17, gaction:"standS"});
sub_teech.push({tx:59, ty:17, gaction:"standW"});
sub_teech.push({tx:59, ty:17, gaction:"standS"});
sub_bitch.push({statejump:1, l:0, tx:57, ty:17, gaction:"standE"});
sub_les.push({statejump:1, l:0, tx:56, ty:17, gaction:"standE"});
sub_slut.push({statejump:1, l:0, tx:55, ty:17, gaction:"standS"});
sub_bitch.push({});
sub_les.push({});
sub_slut.push({});
sub_slut.push({tx:55, ty:17, gaction:"walkS", dir:"d", forceinclude:1});
sub_slut.push({tx:55, ty:20, gaction:"standN", gstate:"jack"});
sub_bitch.push({tx:57, ty:17, gaction:"walkS", dir:"d", forceinclude:1});
sub_bitch.push({tx:57, ty:20, gaction:"standN", gstate:"jack"});
sub_les.push({tx:56, ty:17, gaction:"walkS", dir:"d", forceinclude:1});
sub_les.push({tx:56, ty:21, gaction:"walkE", dir:"r"});
sub_les.push({tx:59, ty:21, gaction:"walkN", dir:"u"});
sub_les.push({tx:59, ty:20, gaction:"standN"});
tempstate1 = sub_fat.push({dir:"lr", spd:3, gstate:"gym", forceinclude:0}) - 1;
tempstate2 = sub_jock.push({dir:"lr", spd:3, gstate:"gym", forceinclude:0}) - 1;
tempstate4 = sub_extra1.push({dir:"lr", spd:2, gstate:"gym"}) - 1;
tempstate3 = sub_pretty.push({dir:"lr", spd:2, gstate:"gym"}) - 1;
sub_fat.push({tx:91, gaction:"walkN", dir:"u"});
sub_jock.push({tx:91, gaction:"walkN", dir:"u"});
sub_extra1.push({tx:91, gaction:"walkN", dir:"u"});
sub_pretty.push({tx:91, gaction:"walkN", dir:"u"});
sub_fat.push({tx:87, ty:7});
sub_jock.push({tx:87, ty:7});
sub_extra1.push({tx:87, ty:7});
sub_pretty.push({tx:87, ty:7});
tempstate5 = sub_extra2.push({dir:"ud", gstate:"gym"}) - 1;
sub_extra2.push({ty:21, gaction:"standW"});
world_text[49] = [{sprite:0, propname:"gstate", propval:"gym", canright:1, canleft:1, canup:1, candown:1, func:"advancestates", funcpass:"sub_fat,sub_jock,sub_pretty,sub_extra1,sub_extra2", func2pass:(((((((tempstate1 + ",") + tempstate2) + ",") + tempstate3) + ",") + tempstate4) + ",") + tempstate5}, "gym::yell::Why aren't you jumping your jacks!", "les::default::Bro, period... remember? I'm all crampy and stuff.", "gym::lost::Eh, ok.", "gym::yell::That's enough laps!", "gym::default::Joggers cool down and get changed."];
world_text[50] = {func:"locks", funcpass:"A,64,6,3,-1,A,72,8,0,A,72,9,0,A,53,12,1,A,53,13,1", func2:"advancestates", func2pass:"sub_slut,sub_bitch,sub_les", canleft:0, canright:0, canup:0, candown:0};
sub_slut.push({statejump:1, l:0, tx:55, ty:17, gaction:"standS", gstate:"gym", spd:2});
sub_les.push({statejump:1, l:0, tx:55, ty:18, gaction:"standE", gstate:"gym", spd:2});
sub_bitch.push({statejump:1, l:0, tx:55, ty:19, gaction:"standE", gstate:"gym", spd:2});
sub_slut.push({tx:55, ty:17, gaction:"walkN", dir:"u", forceinclude:0});
sub_les.push({tx:55, ty:18, gaction:"walkN", dir:"u", forceinclude:0});
sub_bitch.push({tx:55, ty:19, gaction:"walkN", dir:"u", forceinclude:0});
sub_slut.push({tx:54, ty:11, gaction:"walkE", dir:"r"});
sub_les.push({tx:54, ty:11, gaction:"walkE", dir:"r"});
sub_bitch.push({tx:54, ty:11, gaction:"walkE", dir:"r"});
sub_slut.push({tx:71, ty:11, gaction:"walkN", dir:"u"});
sub_slut.push({tx:71, ty:9, gaction:"standE", pa:51});
sub_slut.push({});
sub_les.push({tx:59, ty:11, gaction:"walkN", dir:"u"});
sub_les.push({tx:59, ty:8, gaction:"walkE", dir:"r"});
sub_les.push({tx:64, ty:8, gaction:"standN"});
sub_bitch.push({tx:59, ty:11, gaction:"walkN", dir:"u"});
sub_bitch.push({tx:59, ty:7, gaction:"walkE", dir:"r"});
sub_bitch.push({tx:63, ty:7, gaction:"standE"});
world_text[51] = [{func:"advancestates", funcpass:"sub_bitch,sub_les,sub_pc", canleft:1, canright:1, canup:1, candown:1}, "bitch::cunt::Hey slut, we got something you might like.", "pc::mad::I'm not a-", "bitch::cunt::We picked the lock on the door to the boy's room when we were in here earlier.", "pc::shock::You what?!", "slut::smirk::Quick, they're starting to strip."];
sub_les.push({tx:64, ty:8, gaction:"standE"});
sub_bitch.push({tx:63, ty:7, gaction:"walkE", dir:"r", spd:4});
sub_bitch.push({tx:71, ty:7, gaction:"standS"});
sub_pc.push({});
sub_pc.push({pa:52, pxmin:71, pxmax:71, pymin:8, pymax:8});
world_text[52] = [{func:"advancestates", funcpass:"sub_bitch,sub_les,sub_slut", canleft:0, canright:0, canup:0, candown:0}, "bitch::douche::Our Slutness decided to join us.", "slut::smirk::Can you see?", "pc::blush::Y-yeah.", "slut::smirk::Which one do you like?", "bitch::cunt::Oh god, Michael's ass is perfect.", "pc::blush::Y-yeah.", "slut::smirk::Good choice.", "bitch::douche::Totally out of your league though, blondie.", "slut::smirk::Yeah, you're going to need more EXP before taking on that monster.", "gym::default::What is this door doing open?", "slut::shock::Oh shit!"];
sub_bitch.push({tx:71, ty:7, gaction:"walkW", dir:"l"});
sub_bitch.push({tx:59, ty:7, gaction:"walkS", dir:"d"});
sub_bitch.push({tx:59, ty:11, gaction:"walkW", dir:"l"});
sub_bitch.push({tx:54, ty:11, gaction:"walkS", dir:"d"});
sub_bitch.push({tx:55, ty:17, pa:54});
sub_bitch.push({});
sub_les.push({tx:64, ty:8, gaction:"walkW", dir:"l", spd:4});
sub_les.push({tx:59, ty:8, gaction:"walkS", dir:"d"});
sub_les.push({tx:59, ty:11, gaction:"walkW", dir:"l"});
sub_les.push({tx:54, ty:11, gaction:"walkS", dir:"d"});
sub_les.push({tx:55, ty:17, pa:53});
sub_les.push({});
sub_slut.push({tx:71, ty:9, gaction:"walkS", dir:"d", spd:4});
sub_slut.push({tx:71, ty:11, gaction:"walkW", dir:"l"});
sub_slut.push({tx:53, ty:11, gaction:"walkS", dir:"d"});
sub_slut.push({tx:55, ty:17});
world_text[53] = {func:"refpush", funcpass:"sub_teech", func2:"advancestates", func2pass:"sub_teech"};
sub_teech.push({statejump:1, l:0, tx:72, ty:8, gaction:"standW"});
sub_teech.push({});
world_text[54] = [{cut:"transition", audio:"bell", func:"change_clocks", funcpass:"2,11"}, "gym::default::Honestly Ann... What do you think you're doing?", "pc::shame::I uh, n-nothing.", "gym::dispoint::I'll take you to the Counsellor."];
sub_pc.push({});
sub_pc.push({statejump:1, l:0, tx:37, ty:10, gaction:"standN", gstate:"", spd:2});
sub_teech.push({statejump:1, l:0, tx:39, ty:8, gchar:"counsellor", gstate:"", gaction:"standW", spd:1, ignoreblocking:1});
sub_teech.push({tx:39, ty:8, gaction:"walkW", dir:"l"});
sub_teech.push({tx:37, ty:8, gaction:"walkN", dir:"u"});
sub_teech.push({tx:37, ty:7, gaction:"standS", pa:55});
world_text[55] = [0, "counsellor::smile::Hello Ann, I'm Andrew.", "pc::shame::Hi.", "counsellor::smile::So, explain why you're here.", "pc::shame::Because I- I got in trouble.", "counsellor::laugh::Obviously, but doing what?", "pc::shame::...", "counsellor::smile::Look, you're not being punished. I'm your Counsellor, my job is to help you. So tell me what's up.", "pc::shame::I peeped on the boys changing.", "counsellor::default::I see.", "pc::shock::It wasn't just me, they picked the lock!", "counsellor::default::But you knew what you were doing. What made you join them? Did they force you?", "pc::shame::Uh, no. I don't know.", "counsellor::default::You wanted to see those boys bodies.", "pc::blush::No.", "counsellor::smile::It's perfectly normal at your age to have strong sexual urges.", "counsellor::default::Urges that lead you into poorly thought out situations.", "counsellor::default::Do you have a boyfriend Ann?", "pc::default::No.", "counsellor::smile::But there's a boy you like isn't there?", "pc::blush::Yeah.", "counsellor::default::It must be frustrating to have these pent up feelings you can't convey.", "pc::shifty::I guess.", "counsellor::smile::I want to help you release these pent up feelings. Would you like that?", "pc::think::Yes."];
sub_teech.push({tx:37, ty:7, gaction:"walkS", dir:"d"});
sub_teech.push({tx:37, ty:9, gaction:"standS", pa:56});
world_text[56] = [{cut:"blowjob2"}, "counsellor::default::So when you were peeping on the boys changing, what is it that you wanted to see?", "pc::lipbite::...", "counsellor::default::Did you want to see their penises?", "counsellor::default::It's perfectly normal.", "pc::shame::Yes...", "counsellor::default::Yes?", "pc::shifty::I wanted to see.", "counsellor::default::But wouldn't seeing make it even more frustrating?", "pc::stupid::Huh?", "counsellor::default::After seeing the object of your desire what immediately follows is the desire to experience it.", "pc::shock::...", "counsellor::laugh::Am I wrong?", "pc::blush::You're not wrong."];
sub_teech.push({tx:37, ty:9, gaction:"walkS", dir:"u"});
sub_teech.push({tx:37, ty:8, gaction:"standS", pa:57});
world_text[57] = [0, "counsellor::smile::Ah, I made a mess. I'll get you a tissue."];
sub_teech.push({tx:37, ty:8, gaction:"walkE", dir:"r"});
sub_teech.push({tx:38, ty:8, gaction:"walkN", dir:"u"});
sub_teech.push({tx:38, ty:6, gaction:"standN", pa:58});
world_text[58] = [0, "counsellor::default::So, you know what it feels like now. How do you feel?", "pc::cummy::Good, I guess."];
sub_teech.push({tx:38, ty:6, gaction:"walkS", dir:"d"});
sub_teech.push({tx:38, ty:8, gaction:"walkW", dir:"l"});
sub_teech.push({tx:37, ty:8, gaction:"walkS", dir:"d"});
sub_teech.push({tx:37, ty:9, gaction:"standS", pa:59});
world_text[59] = [{canleft:1, canright:1, canup:1, candown:1}, "counsellor::default::Here, let me wipe it off for you.", "counsellor::default::If you ever feel frustrated definitely visit me so we can talk.", "counsellor::smile::Ok, all cleaned up. School's over so head on home."];
sub_teech.push({tx:37, ty:9, gaction:"walkW", dir:"l"});
sub_teech.push({tx:36, ty:9, gaction:"walkN", dir:"u"});
sub_teech.push({tx:36, ty:6, gaction:"standN", touchx:60});
world_text[60] = [0, "counsellor::laugh::You want to smell it some more? Ha ha."];
sub_slut.push({statejump:1, l:0, tx:61, ty:47, gaction:"standW", spd:1, gstate:""});
sub_bitch.push({statejump:1, l:0, tx:60, ty:48, gaction:"standN", spd:2, gstate:""});
sub_les.push({statejump:1, l:0, tx:60, ty:46, gaction:"standS", spd:2, gstate:""});
sub_slut.push({touchx:61, touchskip:1});
sub_bitch.push({touchx:62, touchskip:1});
sub_les.push({touchx:63, touchskip:1});
substate1 = sub_slut.push({}) - 1;
substate2 = sub_bitch.push({}) - 1;
substate3 = sub_les.push({}) - 1;
world_text[61] = [{func:"advancestates", funcpass:"sub_slut,sub_bitch,sub_les", func2pass:(((((((((("if," + substate1) + ",") + substate2) + ",") + substate3) + ",") + (substate1 + 1)) + ",") + (substate2 + 1)) + ",") + (substate3 + 1)}, "slut::smirk::Have fun?"];
world_text[62] = [{func:"advancestates", funcpass:"sub_slut,sub_bitch,sub_les", func2pass:(((((((((("if," + substate1) + ",") + substate2) + ",") + substate3) + ",") + (substate1 + 1)) + ",") + (substate2 + 1)) + ",") + (substate3 + 1)}, "bitch::cunt::Welcome to the Counsellor Club."];
world_text[63] = [{func:"advancestates", funcpass:"sub_slut,sub_bitch,sub_les", func2pass:(((((((((("if," + substate1) + ",") + substate2) + ",") + substate3) + ",") + (substate1 + 1)) + ",") + (substate2 + 1)) + ",") + (substate3 + 1)}, "les::default::Want a cigarette?"];
sub_bitch.push({tx:60, ty:48, gaction:"walkS", dir:"d"});
sub_bitch.push({tx:60, ty:53, gaction:"standE", forceinclude:1});
sub_slut.push({tx:61, ty:47, gaction:"walkE", dir:"r"});
sub_slut.push({tx:63, ty:47, gaction:"walkS", dir:"d"});
sub_slut.push({tx:63, ty:53, gaction:"standN"});
sub_les.push({tx:60, ty:46, gaction:"walkE", dir:"r"});
sub_les.push({tx:61, ty:46, gaction:"walkS", dir:"d"});
sub_les.push({tx:61, ty:53, gaction:"standN"});
sub_pc.push({pa:65, pxmin:60, pxmax:64, pymin:51, pymax:51});
world_text[65] = [0, "slut::default::Let's head home together.", "slut::truesmile::We're friends now."];
sub_pc.push({pa:66, pxmin:60, pxmax:64, pymin:53, pymax:53});
world_text[66] = {canleft:0, canright:0, canup:0, candown:0, cut:"transition"};
sub_pc.push({});
sub_pc.push({statejump:1, l:0, tx:15, ty:7, gstate:"bed", gaction:"standS"});
sub_bitch.push({tx:60, ty:53, gaction:"standE", dir:"u"});
sub_bitch.push({tx:60, ty:50, gaction:"standE", pa:67});
world_text[67] = [{cut:"schlick"}, "pc::default::(I shouldn't be frustrated anymore right?)", "pc::sigh::(But I couldn't focus on my homework at all.)", "pc::think::(All I can think of is Michael.)", "pc::lipbiteshut::(Michael and his stupid perfect butt.)"];
world_state = {state:0, hour:1, minute:4, stopdoor:0};
tlradius = {r:0, l:0, u:0, d:0};
tilep = {w:32, hw:16, h:32, hh:16, zoom:100};
tilearea = {xMin:0, xMax:0, yMin:0, yMax:0};
gamep_spd = [8, 6, 5, 3, 2];
inputs = new Array();
inputs.push({tag:"left", desc:"Move", kcode:74, kcode2:65});
inputs.push({tag:"right", desc:"Move", kcode:76, kcode2:68});
inputs.push({tag:"up", desc:"Move", kcode:73, kcode2:87});
inputs.push({tag:"down", desc:"Move", kcode:75, kcode2:83});
inputs.push({tag:"space", desc:"Action", kcode:32});
inputs.push({tag:"f", desc:"Fullscreen", kcode:70});
inputs.push({tag:"leftclick", desc:"Leftclick", kcode:1});
inputs.push({tag:"middleclick", desc:"Middleclick", kcode:4});
inputs.push({tag:"playtest", desc:"Shift", kcode:16});
inputs.push({tag:"test", desc:"T", kcode:84});
clicker = new Object();
clicker.onMouseWheel = function (delta) {
clicks.spinner = ((delta > 0) ? 1 : -1);
};
Mouse.addListener(clicker);
clicks = {canright:1, canleft:1, canup:1, candown:1};
var i = 0;
while (i < 9) {
var sub = inputs[i];
clicks[sub.tag] = 0;
i++;
}
keyboard_type = 1;
_root.attachMovie("empty", "bgaudio", _root.getNextHighestDepth());
bgaud = new Sound(_root.bgaudio);
fadep = {snd:"", ease:0, timers:-1, timere:-1, vols:-1, vole:-1};
designp = {camx:0, camy:0, l:0};
timer = 0;
designing(0);
finished = 1;
Instance of Symbol 974 MovieClip in Frame 17
on (press) {
_root.designinit();
}
Instance of Symbol 974 MovieClip in Frame 17
on (press) {
_root.exportworld();
}
Frame 25
_root._quality = "HIGH";
this.nextFrame();
Instance of Symbol 1039 MovieClip in Frame 25
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
getURL ("http://twitter.com/onehandgames/", "_blank");
}
Instance of Symbol 1042 MovieClip in Frame 25
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
getURL ("http://onehandgames.tumblr.com", "_blank");
}
Frame 26
this.stop();
_root.mc.gotoAndStop(finished);
Frame 27
this.prevFrame();
Frame 31
this.nextFrame();
Frame 32
this.stop();
Frame 33
this.prevFrame();
Frame 40
this.nextFrame();
Frame 41
this.stop();
Frame 42
this.prevFrame();
Symbol 34 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 102
stop();
Symbol 833 MovieClip [loadaudio] Frame 1
stop();
Symbol 864 MovieClip Frame 1
stop();
Symbol 864 MovieClip Frame 2
_root.snd_play("door");
Symbol 876 MovieClip Frame 1
stop();
Symbol 899 MovieClip Frame 1
stop();
Symbol 899 MovieClip Frame 2
_root.snd_play("stallopen");
Symbol 899 MovieClip Frame 17
if (_root.world_state.stopdoor) {
stop();
}
Symbol 899 MovieClip Frame 33
_root.snd_play("stallclose");
Symbol 930 MovieClip Frame 1
stop();
this.gotoAndStop(random(this._totalframes) + 1);
Symbol 939 MovieClip Frame 1
stop();
this.gotoAndStop(random(this._totalframes) + 1);
Symbol 968 MovieClip [tiles] Frame 1
stop();
Symbol 968 MovieClip [tiles] Frame 7
this.hour.gotoAndStop(_root.world_state.hour);
this.minute.gotoAndStop(_root.world_state.minute);
Symbol 968 MovieClip [tiles] Frame 21
this.mc.gotoAndStop(random(this.mc._totalframes - 1) + 2);
Symbol 974 MovieClip Frame 1
this.stop();
Symbol 1019 MovieClip Frame 1
this.gotoAndStop(_root.keyboard_type);
Instance of Symbol 1031 MovieClip in Symbol 1036 MovieClip Frame 1
on (rollOver) {
if (_parent._currentframe == 1) {
_parent.gotoAndStop(2);
} else {
_parent.gotoAndStop(4);
}
}
on (rollOut) {
if (_parent._currentframe == 2) {
_parent.gotoAndStop(1);
} else if (_parent._currentframe == 4) {
_parent.gotoAndStop(3);
}
}
on (press) {
_root.gameinit(1);
}
Symbol 1036 MovieClip Frame 2
this.mc.gotoAndStop(1);
Instance of Symbol 1031 MovieClip in Symbol 1036 MovieClip Frame 3
on (rollOver) {
_parent.gotoAndStop(5);
}
on (rollOut) {
if (_parent._currentframe == 5) {
_parent.gotoAndStop(3);
}
}
on (press) {
_root.frameon("cutscenes");
}
Symbol 1036 MovieClip Frame 4
this.mc.gotoAndStop(1);
Symbol 1036 MovieClip Frame 5
this.mc.gotoAndStop(1);
Symbol 1039 MovieClip Frame 1
stop();
Symbol 1042 MovieClip Frame 1
stop();
Symbol 1044 MovieClip Frame 1
this.gotoAndStop(_root.keyboard_type);
Instance of Symbol 1031 MovieClip in Symbol 1044 MovieClip Frame 1
on (press) {
_root.switch_keyboard("qwerty");
_parent.gotoAndStop(1);
_root.anim.mc.gotoAndStop(1);
}
Instance of Symbol 1031 MovieClip in Symbol 1044 MovieClip Frame 1
on (press) {
_root.switch_keyboard("azerty");
_parent.gotoAndStop(2);
_root.anim.mc.gotoAndStop(2);
}
Instance of Symbol 1031 MovieClip in Symbol 1044 MovieClip Frame 1
on (press) {
_root.switch_keyboard("dvorak");
_parent.gotoAndStop(3);
_root.anim.mc.gotoAndStop(3);
}
Instance of Symbol 1031 MovieClip in Symbol 1044 MovieClip Frame 1
on (press) {
_root.switch_keyboard("fallback");
_parent.gotoAndStop(4);
_root.anim.mc.gotoAndStop(4);
}
Symbol 1071 MovieClip Frame 1
stop();
Symbol 1091 MovieClip Frame 1
_root.snd_play("bj1");
Symbol 1091 MovieClip Frame 958
stop();
Symbol 1163 MovieClip Frame 1
_root.snd_play("footsie");
Symbol 1163 MovieClip Frame 2230
stop();
Symbol 1217 MovieClip Frame 1
_root.snd_play("bj2");
Symbol 1217 MovieClip Frame 2398
stop();
Symbol 1269 MovieClip Frame 1
_root.snd_play("schlick");
Symbol 1269 MovieClip Frame 2882
stop();
Symbol 1270 MovieClip Frame 1
stop();
Instance of Symbol 1071 MovieClip in Symbol 1270 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_parent.gotoAndStop("four");
}
Instance of Symbol 1071 MovieClip in Symbol 1270 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_parent.gotoAndStop("three");
}
Instance of Symbol 1071 MovieClip in Symbol 1270 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_parent.gotoAndStop("two");
}
Instance of Symbol 1071 MovieClip "mc1" in Symbol 1270 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_parent.gotoAndStop("one");
}
Instance of Symbol 974 MovieClip in Symbol 1270 MovieClip Frame 1
on (press) {
_root.frameon("menu");
}
Instance of Symbol 974 MovieClip in Symbol 1270 MovieClip Frame 14
on (press) {
_root.snd_stop("bj1");
_root.snd_stop("bj2");
_root.snd_stop("footsie");
_root.snd_stop("schlick");
_parent.gotoAndStop(1);
}
Symbol 1271 MovieClip Frame 1
stop();
Symbol 1358 MovieClip Frame 45
_root.snd_play("bj1");
Symbol 1358 MovieClip Frame 1002
stop();
Symbol 1361 MovieClip Frame 1
_root.snd_play("schlick");
Symbol 1361 MovieClip Frame 2881
stop();
_root.finishgame();
Symbol 1362 MovieClip Frame 95
_root.change_world("state,1");
Symbol 1362 MovieClip Frame 211
stop();
Instance of Symbol 974 MovieClip in Symbol 1363 MovieClip Frame 13
on (press) {
_root.frameon("designer");
}