Section 1
//ActiveItem (elements.ActiveItem)
package elements {
import flash.display.*;
public class ActiveItem extends Item {
public var rock:MovieClip;
public function ActiveItem(_arg1:Number=0, _arg2:Number=0):void{
super(_arg1, _arg2);
}
}
}//package elements
Section 2
//BookItem (elements.BookItem)
package elements {
public class BookItem extends Item {
public function BookItem(_arg1:Number=0, _arg2:Number=0):void{
super(_arg1, _arg2);
}
override public function remove():void{
super.remove();
}
override public function set rotation(_arg1:Number):void{
super.rotation = _arg1;
}
}
}//package elements
Section 3
//DoorItem (elements.DoorItem)
package elements {
import game.*;
public class DoorItem extends Item {
public function DoorItem(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0):void{
addFrameScript(5, frame6, 62, frame63);
super(_arg1, _arg2);
}
function frame6(){
stop();
}
override public function remove():void{
this.gotoAndPlay("open");
Model.getInstance().clearState(false, true);
}
public function setRotating():void{
BroadCaster.getInstance().run("doorRemoved", "");
}
function frame63(){
if (loaderInfo != null){
setRotating();
parent.removeChild(this);
};
}
override public function set rotation(_arg1:Number):void{
super.rotation = _arg1;
}
}
}//package elements
Section 4
//ExitItem (elements.ExitItem)
package elements {
public class ExitItem extends Item {
public function ExitItem(_arg1:Number=0, _arg2:Number=0):void{
super(_arg1, _arg2);
stop();
}
override public function remove():void{
super.remove();
}
}
}//package elements
Section 5
//HalfWall (elements.HalfWall)
package elements {
public class HalfWall extends Item {
private var _y:Number;
private var _x:Number;
public function HalfWall(_arg1:Number=0, _arg2:Number=0):void{
_x = _arg1;
_y = _arg2;
super(_arg1, _arg2, 25, 12);
}
public function resetPosition(_arg1:Number, _arg2:Number):void{
this.x = (this.tx = (this.xPosition = _arg1));
this.y = (this.ty = (this.yPosition = _arg2));
}
override public function set rotation(_arg1:Number):void{
var _local2:uint;
_local2 = Math.round((((_arg1 + 360) % 360) / 90));
super.rotation = _arg1;
switch (_local2){
case 0:
resetPosition(_x, (_y + 6.5));
itemWidth = 25;
itemHeight = 12;
break;
case 1:
resetPosition((_x - 6.5), _y);
itemWidth = 12;
itemHeight = 25;
break;
case 2:
resetPosition(_x, (_y - 6.5));
itemWidth = 25;
itemHeight = 12;
break;
case 3:
resetPosition((_x + 6.5), _y);
itemWidth = 12;
itemHeight = 25;
break;
};
}
}
}//package elements
Section 6
//HeadItem (elements.HeadItem)
package elements {
import game.*;
import flash.display.*;
public class HeadItem extends Item {
private var __height:Number;// = 2
private var model:Model;
private var rotate:Number;
private var offset:Number;// = 10
public var _man:MovieClip;
private var __width:Number;// = 7
public function HeadItem(_arg1:Number=0, _arg2:Number=0):void{
offset = 10;
__height = 2;
__width = 7;
super(_arg1, (_arg2 - offset), __width, __height);
model = Model.getInstance();
}
public function setSize0():void{
itemHeight = (itemWidth = 2);
this.x = (this.tx = (this.xPosition = group.items[0].tx));
this.y = (this.ty = (this.yPosition = group.items[0].ty));
}
public function resetPosition(_arg1:Number, _arg2:Number):void{
if (group.items.length > 1){
switch (Math.round((rotate / 90))){
case 0:
this.x = (this.tx = (this.xPosition = _arg1));
this.y = (this.ty = (this.yPosition = (_arg2 - offset)));
break;
case 1:
this.x = (this.tx = (this.xPosition = (_arg1 - offset)));
this.y = (this.ty = (this.yPosition = _arg2));
break;
case 2:
this.x = (this.tx = (this.xPosition = _arg1));
this.y = (this.ty = (this.yPosition = (_arg2 + offset)));
break;
case 3:
this.x = (this.tx = (this.xPosition = (_arg1 + offset)));
this.y = (this.ty = (this.yPosition = _arg2));
break;
};
};
}
override public function set rotation(_arg1:Number):void{
super.rotation = -(_arg1);
rotate = _arg1;
resetPosition(group.items[0].tx, group.items[0].ty);
if ((Math.round((_arg1 / 90)) % 2) == 0){
itemHeight = __height;
itemWidth = __width;
} else {
itemHeight = __width;
itemWidth = __height;
};
}
}
}//package elements
Section 7
//Item (elements.Item)
package elements {
import game.*;
import flash.display.*;
public class Item extends MovieClip {
private var xHitObj;
public var itemHeight:Number;
public var minJ:int;
public var minI:int;
private var yHitObj;
private var ySpeed:Number;
public var maxJ:int;
public var group;
public var maxI:int;
public var itemWidth:Number;
public var ty:Number;
public var tx:Number;
protected var skipTable:Array;
private var xSpeed:Number;
public var xPosition:Number;
public var yPosition:Number;
private var pairs:Array;
public function Item(_arg1:Number=0, _arg2:Number=0, _arg3:Number=25, _arg4:Number=25):void{
this.x = _arg1;
this.y = _arg2;
tx = (xPosition = _arg1);
ty = (yPosition = _arg2);
itemHeight = _arg4;
itemWidth = _arg3;
}
private function getPairs():void{
var _local1:int;
var _local2:int;
_local1 = (minI - 1);
while (_local1 <= (maxI + 1)) {
_local2 = (minJ - 1);
while (_local2 <= (maxJ + 1)) {
if ((((((((_local1 >= 0)) && ((_local1 < 18)))) && ((_local2 >= 0)))) && ((_local2 < 18)))){
if (group.allStaticItems[_local1][_local2] != null){
pairs.push(group.allStaticItems[_local1][_local2]);
};
if (group.allActiveItems[_local1][_local2] != null){
pairs.push(group.allActiveItems[_local1][_local2]);
};
};
_local2++;
};
_local1++;
};
}
public function moveTo():void{
this.x = (tx = xPosition);
this.y = (ty = yPosition);
}
public function checkPosition(_arg1:Number, _arg2:Number):void{
var _local3:Array;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:String;
var _local8:Number;
var _local9:Number;
_local3 = new Array();
for each (_local4 in pairs) {
for each (_local5 in _local4) {
_local6 = _local5.group;
if (_local6 != group){
_local7 = _local5.group._type;
if ((((((_local3.indexOf(_local5) >= 0)) || ((((group._type == "man")) && ((((((((((((_local7 == "wind")) || ((_local7 == "spike")))) || ((_local7 == "book")))) || ((_local7 == "key")))) || ((_local7 == "exit")))) || ((((_local7 == "specialDoor")) && (_local6.opened))))))))) || ((((_local7 == "man")) && ((((((((((((group._type == "wind")) || ((group._type == "spike")))) || ((group._type == "book")))) || ((group._type == "key")))) || ((group._type == "exit")))) || ((((group._type == "specialDoor")) && (group.opened))))))))){
} else {
_local3.push(_local5);
_local8 = (0.5 * (itemWidth + _local5.itemWidth));
_local9 = (0.5 * (itemHeight + _local5.itemHeight));
if ((((Math.abs((_arg1 - _local5.tx)) < _local8)) && ((Math.abs((_arg2 - _local5.ty)) < _local9)))){
if (((((_local6.frozen) || (_local6.checked))) || (Model.isSleep))){
if ((((Math.abs((_local5.tx - tx)) >= _local8)) && ((Math.abs((_local5.ty - ty)) >= _local9)))){
skipTable.push(_local5);
continue;
};
if (Math.abs((_local5.tx - tx)) >= _local8){
xHitObj = _local5;
xPosition = (_local5.tx - (_local8 * ((_local5.tx - tx) / Math.abs((_local5.tx - tx)))));
checkPosition(xPosition, yPosition);
break;
};
if (Math.abs((_local5.ty - ty)) >= _local9){
yHitObj = _local5;
yPosition = (_local5.ty - (_local9 * ((_local5.ty - ty) / Math.abs((_local5.ty - ty)))));
checkPosition(xPosition, yPosition);
break;
};
} else {
_local6.hitTest();
group.checked = false;
group.hitTest();
break;
};
};
};
};
};
};
}
public function checkHit():Object{
var _local1:Object;
pairs = new Array();
getPairs();
xSpeed = group.xspeedArr[group.counter].s;
ySpeed = group.yspeedArr[group.counter].s;
xPosition = (tx + xSpeed);
yPosition = (ty + ySpeed);
skipTable = new Array();
checkPosition(xPosition, yPosition);
checkSkiped();
_local1 = {obj:this, x:(xPosition - tx), y:(yPosition - ty), xHit:xHitObj, yHit:yHitObj};
return (_local1);
}
protected function checkSkiped():void{
var _local1:*;
var _local2:Number;
var _local3:Number;
var _local4:*;
var _local5:*;
for each (_local1 in skipTable) {
_local2 = (0.5 * (itemWidth + _local1.itemWidth));
_local3 = (0.5 * (itemHeight + _local1.itemHeight));
if ((((Math.abs((xPosition - _local1.tx)) < _local2)) && ((Math.abs((yPosition - _local1.ty)) < _local3)))){
_local4 = Math.atan2((_local1.ty - yPosition), (_local1.tx - xPosition));
_local5 = Math.atan2(ySpeed, xSpeed);
if (Math.abs(Math.sin(_local4)) <= Math.abs(Math.sin(_local5))){
xHitObj = _local1;
xPosition = (_local1.tx - (_local2 * ((_local1.tx - tx) / Math.abs((_local1.tx - tx)))));
} else {
yHitObj = _local1;
yPosition = (_local1.ty - (_local3 * ((_local1.ty - ty) / Math.abs((_local1.ty - ty)))));
};
};
};
}
public function remove():void{
if (loaderInfo != null){
parent.removeChild(this);
};
}
public function move(_arg1:Number, _arg2:Number):void{
xPosition = (tx + _arg1);
yPosition = (ty + _arg2);
moveTo();
}
}
}//package elements
Section 8
//KeyItem (elements.KeyItem)
package elements {
public class KeyItem extends Item {
public function KeyItem(_arg1:Number=0, _arg2:Number=0):void{
super(_arg1, _arg2);
}
override public function remove():void{
super.remove();
}
override public function set rotation(_arg1:Number):void{
super.rotation = _arg1;
}
}
}//package elements
Section 9
//ManItem (elements.ManItem)
package elements {
import game.*;
import flash.display.*;
public class ManItem extends Item {
private var model:Model;
private var shadows:Array;
public var _man:MovieClip;
public var man_n:MovieClip;
private var _width:Number;// = 6
public var man_p:MovieClip;
private var _man_p:MovieClip;
private var _man_n:MovieClip;
public function ManItem(_arg1:Number=0, _arg2:Number=0):void{
var _local3:Number;
_width = 6;
shadows = new Array();
_local3 = 20;
super(_arg1, _arg2, _width, _local3);
model = Model.getInstance();
_man_n = (getChildByName("man_n") as MovieClip);
_man_p = (getChildByName("man_p") as MovieClip);
setWindForece();
}
public function setSize0():void{
itemHeight = (itemWidth = 2);
}
override public function moveTo():void{
var _local1:*;
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:Number;
var _local11:Number;
var _local12:*;
var _local13:Number;
var _local14:Number;
var _local15:*;
var _local16:Number;
var _local17:Number;
var _local18:*;
var _local19:Number;
var _local20:Number;
var _local21:Object;
var _local22:*;
var _local23:Number;
var _local24:Number;
for each (_local1 in model.currentRoom.books) {
_local2 = _local1.items[0];
_local3 = (0.5 * (itemWidth + _local2.itemWidth));
_local4 = (0.5 * (itemHeight + _local2.itemHeight));
if ((((Math.abs((xPosition - _local2.tx)) < (_local3 - 10))) && ((Math.abs((yPosition - _local2.ty)) < (_local4 - 10))))){
_local1.removeAllItems();
};
};
if ((((Model.state == "normal")) && (!(Model.isGameOver)))){
for each (_local5 in model.currentRoom.keys) {
_local9 = _local5.items[0];
_local10 = (0.5 * (itemWidth + _local9.itemWidth));
_local11 = (0.5 * (itemHeight + _local9.itemHeight));
if ((((Math.abs((xPosition - _local9.tx)) < (_local10 - 10))) && ((Math.abs((yPosition - _local9.ty)) < (_local11 - 10))))){
_local5.removeAllItems();
};
};
for each (_local6 in model.currentRoom.exits) {
_local12 = _local6.items[0];
_local13 = (0.5 * (itemWidth + _local12.itemWidth));
_local14 = (0.5 * (itemHeight + _local12.itemHeight));
if ((((Math.abs((xPosition - _local12.tx)) < _local13)) && ((Math.abs((yPosition - _local12.ty)) < _local14)))){
BroadCaster.getInstance().run("onGameWin", ((String(_local6.exitSign) + ":") + group.dir));
return;
};
};
for each (_local7 in model.currentRoom.spikes) {
_local15 = _local7.items[0];
_local16 = (0.5 * (itemWidth + _local15.itemWidth));
_local17 = (0.5 * (itemHeight + _local15.itemHeight));
if ((((Math.abs((xPosition - _local15.tx)) <= _local16)) && ((Math.abs((yPosition - _local15.ty)) <= _local17)))){
group.setSize0();
Model.isGameOver = true;
BroadCaster.getInstance().run("onPlayerDied", "3");
break;
};
};
for each (_local8 in model.currentRoom.winds) {
_local18 = _local8.items[0];
_local19 = (0.5 * (itemWidth + _local18.itemWidth));
_local20 = (0.5 * (itemHeight + _local18.itemHeight));
if ((((Math.abs((xPosition - _local18.tx)) < (_local19 - 10))) && ((Math.abs((yPosition - _local18.ty)) < (_local20 - 10))))){
Model.hasP = true;
setWindForece();
_local8.removeAllItems();
break;
};
};
} else {
if (Model.state == "map"){
_local21 = "";
for each (_local22 in model.mapEntrances) {
if ((((Math.abs((xPosition - _local22.x)) <= ((itemWidth / 2) + 4))) && ((Math.abs((yPosition - _local22.y)) <= ((itemHeight / 2) + 4))))){
_local23 = Math.round(((_local22.point[1] * 50) - _local22.x));
_local24 = Math.round(((_local22.point[0] * 50) - _local22.y));
if (((!((model.currentRoomId == _local22.id))) && (!((model.currentRoomId == 0))))){
BroadCaster.getInstance().run("onEnterRoom", ((((String(_local22.id) + ":") + _local22.entranceId) + ":") + group.dir));
break;
};
if (model.currentRoomId != _local22.id){
switch (group.counter){
case 0:
if ((((((((((_local23 > 0)) && (Model.KEY_RIGHT))) || ((((_local23 < 0)) && (Model.KEY_LEFT))))) || ((((_local24 > 0)) && (Model.KEY_DOWN))))) || ((((_local24 < 0)) && (Model.KEY_UP))))){
BroadCaster.getInstance().run("onEnterRoom", ((((String(_local22.id) + ":") + _local22.entranceId) + ":") + group.dir));
};
break;
case 1:
if ((((((((((_local24 < 0)) && (Model.KEY_RIGHT))) || ((((_local24 > 0)) && (Model.KEY_LEFT))))) || ((((_local23 > 0)) && (Model.KEY_DOWN))))) || ((((_local23 < 0)) && (Model.KEY_UP))))){
BroadCaster.getInstance().run("onEnterRoom", ((((String(_local22.id) + ":") + _local22.entranceId) + ":") + group.dir));
};
break;
case 2:
if ((((((((((_local23 < 0)) && (Model.KEY_RIGHT))) || ((((_local23 > 0)) && (Model.KEY_LEFT))))) || ((((_local24 < 0)) && (Model.KEY_DOWN))))) || ((((_local24 > 0)) && (Model.KEY_UP))))){
BroadCaster.getInstance().run("onEnterRoom", ((((String(_local22.id) + ":") + _local22.entranceId) + ":") + group.dir));
};
break;
case 3:
if ((((((((((_local24 > 0)) && (Model.KEY_RIGHT))) || ((((_local24 < 0)) && (Model.KEY_LEFT))))) || ((((_local23 < 0)) && (Model.KEY_DOWN))))) || ((((_local23 > 0)) && (Model.KEY_UP))))){
BroadCaster.getInstance().run("onEnterRoom", ((((String(_local22.id) + ":") + _local22.entranceId) + ":") + group.dir));
};
break;
};
break;
} else {
switch (group.counter){
case 0:
if ((((((((((_local23 > 0)) && (Model.KEY_RIGHT))) || ((((_local23 < 0)) && (Model.KEY_LEFT))))) || ((((_local24 > 0)) && (Model.KEY_DOWN))))) || ((((_local24 < 0)) && (Model.KEY_UP))))){
BroadCaster.getInstance().run("onEnterRoom", ((((String(_local22.id) + ":") + _local22.entranceId) + ":") + group.dir));
};
break;
case 1:
if ((((((((((_local24 < 0)) && (Model.KEY_RIGHT))) || ((((_local24 > 0)) && (Model.KEY_LEFT))))) || ((((_local23 > 0)) && (Model.KEY_DOWN))))) || ((((_local23 < 0)) && (Model.KEY_UP))))){
BroadCaster.getInstance().run("onEnterRoom", ((((String(_local22.id) + ":") + _local22.entranceId) + ":") + group.dir));
};
break;
case 2:
if ((((((((((_local23 < 0)) && (Model.KEY_RIGHT))) || ((((_local23 > 0)) && (Model.KEY_LEFT))))) || ((((_local24 < 0)) && (Model.KEY_DOWN))))) || ((((_local24 > 0)) && (Model.KEY_UP))))){
BroadCaster.getInstance().run("onEnterRoom", ((((String(_local22.id) + ":") + _local22.entranceId) + ":") + group.dir));
};
break;
case 3:
if ((((((((((_local24 > 0)) && (Model.KEY_RIGHT))) || ((((_local24 < 0)) && (Model.KEY_LEFT))))) || ((((_local23 < 0)) && (Model.KEY_DOWN))))) || ((((_local23 > 0)) && (Model.KEY_UP))))){
BroadCaster.getInstance().run("onEnterRoom", ((((String(_local22.id) + ":") + _local22.entranceId) + ":") + group.dir));
};
break;
};
if (model.currentRoomId == _local22.id){
_local21 = _local22;
continue;
};
};
};
};
if (((!((_local21 == null))) && (!((_local21 == ""))))){
switch (_local21.dir){
case "L":
xPosition = (_local21.x - (itemWidth / 2));
break;
case "R":
xPosition = (_local21.x + (itemWidth / 2));
break;
case "B":
yPosition = (_local21.y + (itemHeight / 2));
break;
case "T":
yPosition = (_local21.y - (itemHeight / 2));
break;
};
} else {
if (_local21 == ""){
model.currentRoomId = 0;
};
};
group.items[0].resetPosition(xPosition, yPosition);
group.items[1].resetPosition(xPosition, yPosition);
};
};
super.moveTo();
}
public function setWindForece():void{
if (Model.hasP){
_man = _man_p;
_man_n.visible = false;
_man_p.visible = true;
} else {
_man = _man_n;
_man_p.visible = false;
_man_n.visible = true;
};
if (group != null){
group.doAction("stand");
};
}
public function resetPosition(_arg1:Number, _arg2:Number):void{
this.x = (this.tx = (this.xPosition = _arg1));
this.y = (this.ty = (this.yPosition = _arg2));
}
override public function set rotation(_arg1:Number):void{
tx = (xPosition = (this.x = (Math.round((tx / 25)) * 25)));
ty = (yPosition = (this.y = (Math.round((ty / 25)) * 25)));
super.rotation = -(_arg1);
if (Math.round(Math.sin(((Math.PI * _arg1) / 180))) == 0){
itemHeight = 20;
itemWidth = _width;
} else {
itemHeight = _width;
itemWidth = 20;
};
}
}
}//package elements
Section 10
//RectItem (elements.RectItem)
package elements {
public class RectItem extends Item {
public function RectItem(_arg1:Number=0, _arg2:Number=0):void{
super(_arg1, _arg2);
}
}
}//package elements
Section 11
//SpecialItem (elements.SpecialItem)
package elements {
import game.*;
public class SpecialItem extends Item {
public function SpecialItem(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0):void{
addFrameScript(4, frame5, 61, frame62, 62, frame63, 109, frame110);
super(_arg1, _arg2);
}
public function setRoomOpen(_arg1:Boolean):void{
group.opened = _arg1;
}
function frame5(){
stop();
}
function frame110(){
stop();
}
override public function remove():void{
this.gotoAndPlay("open");
Model.getInstance().clearState(false, true);
}
public function setRotating():void{
BroadCaster.getInstance().run("doorRemoved", "");
}
function frame62(){
setRoomOpen(true);
stop();
}
function frame63(){
setRoomOpen(false);
}
override public function set rotation(_arg1:Number):void{
super.rotation = _arg1;
}
}
}//package elements
Section 12
//SpikeItem (elements.SpikeItem)
package elements {
public class SpikeItem extends Item {
public function SpikeItem(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0):void{
super(_arg1, _arg2);
}
override public function remove():void{
super.remove();
}
override public function set rotation(_arg1:Number):void{
if (Math.round(Math.sin(((_arg1 * Math.PI) / 180))) == 0){
itemWidth = 21;
itemHeight = 5;
} else {
itemWidth = 5;
itemHeight = 21;
};
super.rotation = _arg1;
}
}
}//package elements
Section 13
//WindItem (elements.WindItem)
package elements {
public class WindItem extends Item {
public function WindItem(_arg1:Number=0, _arg2:Number=0):void{
super(_arg1, _arg2);
}
override public function remove():void{
super.remove();
}
override public function set rotation(_arg1:Number):void{
super.rotation = _arg1;
}
}
}//package elements
Section 14
//VirtualItem (elements.VirtualItem)
package elements {
public class VirtualItem extends Item {
public function VirtualItem(_arg1:Number=0, _arg2:Number=0):void{
super(_arg1, _arg2, 50, 50);
}
}
}//package elements
Section 15
//BroadCaster (game.BroadCaster)
package game {
import flash.events.*;
public class BroadCaster extends EventDispatcher {
public static var _instance:BroadCaster;
public function BroadCaster():void{
}
public function run(_arg1:String, _arg2:String):void{
this.dispatchEvent(new DataEvent(_arg1, false, false, _arg2));
}
public static function getInstance():BroadCaster{
if (_instance == null){
_instance = new (BroadCaster);
};
return (_instance);
}
}
}//package game
Section 16
//Button (game.Button)
package game {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class Button extends MovieClip {
private var toogle:Boolean;// = false
public var txt:TextField;
public function Button(){
toogle = false;
super();
this.mouseChildren = false;
this.buttonMode = true;
this.addEventListener(MouseEvent.MOUSE_OVER, onOver);
this.addEventListener(MouseEvent.MOUSE_UP, onUp);
this.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
this.addEventListener(MouseEvent.MOUSE_OUT, onOut);
}
private function onDown(_arg1:MouseEvent):void{
if (!toogle){
SoundManager.getInstance().playSound("btnDown", SoundManager.TYPE_BTN);
this.gotoAndPlay("down");
};
}
public function setToogle(_arg1:Boolean):void{
if (_arg1){
this.gotoAndPlay("down");
} else {
this.gotoAndPlay("up");
};
toogle = _arg1;
}
private function onOver(_arg1:MouseEvent):void{
if (!toogle){
this.gotoAndPlay("over");
};
}
private function onUp(_arg1:MouseEvent):void{
if (!toogle){
this.gotoAndPlay("up");
};
}
private function onOut(_arg1:MouseEvent):void{
if (!toogle){
this.gotoAndPlay("up");
};
}
}
}//package game
Section 17
//Cookie (game.Cookie)
package game {
import flash.events.*;
import flash.net.*;
public class Cookie {
private var cookie:SharedObject;
public static var _cookie:Cookie;
public function Cookie():void{
cookie = SharedObject.getLocal("_ne_n2nn_NEVER_SETTINGS", "/");
cookie.addEventListener(NetStatusEvent.NET_STATUS, handleError, false, 0, true);
}
private function handleError(_arg1:NetStatusEvent):void{
}
public function removeUserAt(_arg1:uint):void{
var _name:*;
var position = _arg1;
_name = cookie.data.users[(position - 1)];
try {
cookie.data[_name] = null;
} catch(e:Error) {
};
cookie.data.users[(position - 1)] = null;
cookie.flush();
}
public function saveData():void{
cookie.data[Model.userName] = Model.getInstance().currentData;
cookie.flush();
}
public function getUsers():Array{
var _local1:Array;
if (cookie.data.users == null){
_local1 = new Array();
cookie.data.users = _local1;
cookie.flush();
} else {
_local1 = cookie.data.users;
};
return (_local1);
}
public function saveValue(_arg1, _arg2:String):void{
if (cookie.data[Model.userName] == null){
cookie.data[Model.userName] = new Object();
};
cookie.data[Model.userName][_arg2] = _arg1;
cookie.flush();
}
public function getAllData():Object{
var _local1:Object;
_local1 = cookie.data;
return (((_local1 == null)) ? new Object() : _local1);
}
public function createUser(_arg1:String, _arg2:uint):void{
cookie.data.users[(_arg2 - 1)] = _arg1;
cookie.flush();
}
public function getValue(_arg1:String){
if (cookie.data[Model.userName] == null){
return (null);
};
return (cookie.data[Model.userName][_arg1]);
}
public static function getInstance():Cookie{
if (_cookie == null){
_cookie = new (Cookie);
};
return (_cookie);
}
}
}//package game
Section 18
//EndMovie (game.EndMovie)
package game {
import flash.events.*;
import flash.display.*;
public class EndMovie extends MovieClip {
public var skipBtn:skip_btn;
public var _logo:MovieClip;
public var __logo:MovieClip;
public var ___logo:MovieClip;
public function EndMovie():void{
addFrameScript(108, frame109, 161, frame162, 287, frame288, 1540, frame1541, 1559, frame1560, 1620, frame1621, 1646, frame1647, 1797, frame1798);
init();
}
private function init():void{
var _local1:MovieClip;
_local1 = (this.getChildByName("skipBtn") as MovieClip);
_local1.addEventListener(MouseEvent.CLICK, skipMc, false, 0, true);
}
function frame1621(){
___logo.gotoAndStop(Language.branding_nr);
}
function frame288(){
playRotate();
}
function frame162(){
playRotate();
}
function frame109(){
playBg();
}
private function skipMc(_arg1:MouseEvent):void{
_arg1.currentTarget.removeEventListener(MouseEvent.CLICK, skipMc);
remove();
}
function frame1647(){
turnOffBg();
}
public function remove():void{
if (loaderInfo != null){
turnOffBg();
stop();
this.dispatchEvent(new Event("onEndMovieDone"));
};
}
function frame1541(){
__logo.gotoAndStop(Language.branding_nr);
}
public function turnOffBg():void{
SoundManager.getInstance().turnOffBg();
}
public function playBg():void{
SoundManager.getInstance().playSound("geomBg", SoundManager.TYPE_BG);
}
public function playRotate():void{
SoundManager.getInstance().playSound("mapRotate", SoundManager.TYPE_ITEM);
}
function frame1798(){
stop();
remove();
}
function frame1560(){
_logo.gotoAndStop(Language.branding_nr);
}
}
}//package game
Section 19
//FielsField (game.FielsField)
package game {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
public class FielsField extends MovieClip {
public var f10:MovieClip;
public var f11:MovieClip;
public var f13:MovieClip;
public var f14:MovieClip;
private var scrollBar:Button;
public var f12:MovieClip;
public var BG:MovieClip;
public var sc:scrollbar;
public var txt:TextField;
public var files:Array;
public var currentOpened:MovieClip;
public var f6:MovieClip;
public var f7:MovieClip;
public var f4:MovieClip;
public var f8:MovieClip;
public var f1:MovieClip;
public var f3:MovieClip;
public var f5:MovieClip;
public var f9:MovieClip;
private var txtHeight:Number;// = 0
public var f2:MovieClip;
public var _txt:TextField;
public function FielsField():void{
txtHeight = 0;
super();
_txt = (getChildByName("txt") as TextField);
scrollBar = (getChildByName("sc") as Button);
scrollBar.addEventListener(MouseEvent.MOUSE_DOWN, dragBar, false, 0, true);
initFiles();
}
private function showFile(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:uint;
var _local4:*;
_local2 = (_arg1.currentTarget as MovieClip);
if (_local2.name != currentOpened.name){
currentOpened.gotoAndStop("full");
currentOpened = (_arg1.currentTarget as MovieClip);
_local3 = Number(currentOpened.name.split("f")[1]);
currentOpened.gotoAndStop("open");
for each (_local4 in files) {
if (Number(_local4) == _local3){
_txt.text = Model.getInstance().getMessage(_local3);
resetScrollBar();
};
};
};
}
private function dragBar(_arg1:MouseEvent):void{
scrollBar.startDrag(false, new Rectangle(623.5, 208, 0, 105.5));
}
public function saveBook():void{
var _local1:Array;
var _local2:*;
_local1 = new Array();
for each (_local2 in files) {
_local1.push(_local2);
};
Model.getInstance().currentData.ateBooks = _local1;
}
public function addNewFile(_arg1, _arg2:Boolean=false):void{
var _local3:MovieClip;
files.push(_arg1.data);
if (currentOpened != null){
currentOpened.gotoAndStop("full");
};
_local3 = (this.getChildByName(("f" + _arg1.data)) as MovieClip);
_local3.gotoAndStop("open");
currentOpened = _local3;
_txt.text = Model.getInstance().getMessage(int(_arg1.data));
resetScrollBar();
_local3.addEventListener(MouseEvent.CLICK, showFile, false, 0, true);
}
private function initFiles():void{
var _local1:Array;
var _local2:Array;
var _local3:*;
currentOpened = null;
files = new Array();
_local1 = Model.getInstance().currentData.ateBooks;
if (Model.cData == null){
_local2 = new Array();
} else {
_local2 = Model.cData.ateBooks;
};
if (_local1 == null){
if (_local2 != null){
_local1 = _local2;
} else {
_local1 = new Array();
};
} else {
if (((!((_local2 == null))) && ((_local2.length > _local1.length)))){
_local1 = _local2;
};
};
Model.books = files;
for each (_local3 in _local1) {
addNewFile({data:_local3}, true);
};
}
public function reset():void{
var i:int;
var cld:MovieClip;
_txt.text = "";
resetScrollBar();
i = 1;
while (i <= 14) {
cld = (this.getChildByName(("f" + i)) as MovieClip);
cld.gotoAndStop("empty");
try {
cld.removeEventListener(MouseEvent.CLICK, showFile);
} catch(e:Error) {
};
i = (i + 1);
};
initFiles();
}
private function resetScrollBar():void{
_txt.y = 201;
txtHeight = (_txt.textHeight + 25);
scrollBar.x = 623.5;
scrollBar.y = 208;
}
public function setTxt():void{
if (txtHeight < 115){
return;
};
_txt.y = (201 - (((txtHeight - 115) / 115) * (scrollBar.y - 208)));
}
public function _stopDrag():void{
scrollBar.stopDrag();
}
}
}//package game
Section 20
//FrameRate (game.FrameRate)
package game {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class FrameRate {
private var frameCount:int;
private var minFrameRate:int;// = 60
private var listenSpr:Sprite;
private var tStartTime:Number;
public function FrameRate(_arg1:Sprite):void{
minFrameRate = 60;
super();
if (_arg1 != null){
listenSpr = _arg1;
init();
};
}
private function timerHandle(_arg1:Event):void{
var _local2:int;
if ((getTimer() - tStartTime) >= (1000 / 2)){
if ((frameCount * 2) < (minFrameRate - 3)){
if (listenSpr.stage.frameRate <= 200){
listenSpr.stage.frameRate = (listenSpr.stage.frameRate + (minFrameRate - (2 * frameCount)));
};
} else {
if ((2 * frameCount) > (minFrameRate + 5)){
_local2 = ((listenSpr.stage.frameRate + minFrameRate) - (2 * frameCount));
if (_local2 < minFrameRate){
listenSpr.stage.frameRate = minFrameRate;
} else {
listenSpr.stage.frameRate = _local2;
};
};
};
tStartTime = getTimer();
frameCount = 0;
};
frameCount++;
}
private function init():void{
try {
listenSpr.removeEventListener(Event.ENTER_FRAME, timerHandle);
} catch(e:Error) {
};
listenSpr.stage.frameRate = minFrameRate;
frameCount = 0;
tStartTime = getTimer();
listenSpr.addEventListener(Event.ENTER_FRAME, timerHandle);
}
public function set cFrameRate(_arg1:int):void{
minFrameRate = _arg1;
init();
}
}
}//package game
Section 21
//GameWin (game.GameWin)
package game {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class GameWin extends MovieClip {
public var backBtn:btn_end;
public var score_this:MovieClip;
public var score_total:MovieClip;
private var cookie:Cookie;
private var thisScore:MovieClip;
private var totalScore:MovieClip;
private var btn_back:MovieClip;
public function GameWin():void{
cookie = Cookie.getInstance();
btn_back = (getChildByName("backBtn") as MovieClip);
btn_back.addEventListener(MouseEvent.CLICK, continueGame, false, 0, true);
totalScore = (getChildByName("score_total") as MovieClip);
thisScore = (getChildByName("score_this") as MovieClip);
setScore();
setThisScore();
}
private function continueGame(_arg1:MouseEvent):void{
this.dispatchEvent(new Event("onGameWinMovieDone"));
parent.removeChild(this);
}
private function setScore():void{
var _local1:Object;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:Number;
var _local10:*;
var _local11:Number;
var _local12:Number;
var _local13:Number;
score_total.nameTxt.text = "TOTAL";
_local1 = Model.getInstance().currentData;
_local2 = _local1.time;
_local2 = ((_local2 == null)) ? 0 : _local2;
_local3 = _local1.ran;
_local3 = ((_local3 == null)) ? 0 : _local3;
_local4 = _local1.jumped;
_local4 = ((_local4 == null)) ? 0 : _local4;
_local5 = _local1.rotated;
_local5 = ((_local5 == null)) ? 0 : _local5;
_local6 = _local1.died;
_local6 = ((_local6 == null)) ? 0 : _local6;
_local7 = _local1.finished;
_local7 = ((_local7 == null)) ? new Array() : _local7;
_local8 = _local1.cleared;
_local8 = ((_local8 == null)) ? 0 : _local8;
_local9 = 0;
for each (_local10 in _local7) {
_local9 = (_local9 + Model.getInstance().roomLevel[(int(_local10) - 1)]);
};
_local11 = Math.floor((_local2 / 3600000));
_local12 = (Math.floor((_local2 / 60000)) % 60);
_local13 = (Math.floor((_local2 / 1000)) % 60);
totalScore.timeTxt.text = ((((((_local11 > 9)) ? _local11 : (0 + String(_local11)) + " :") + ((_local12 > 9)) ? _local12 : (0 + String(_local12))) + " :") + ((_local13 > 9)) ? _local13 : (0 + String(_local13)));
totalScore.diedTxt.text = _local6;
totalScore.rotateTxt.text = _local5;
totalScore.jumpTxt.text = _local4;
totalScore.clearTxt.text = _local8;
totalScore.completeTxt.text = (Math.round(((_local9 / Model.getInstance().roomLevel[30]) * 100)) + "%");
totalScore.ranTxt.text = ((Math.round((_local3 * 10)) / 100) + " m");
}
private function setThisScore():void{
var _local1:Object;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:*;
var _local7:TextField;
_local1 = Model.ExitData;
_local2 = _local1.time;
_local3 = Math.floor((_local2 / 3600000));
_local4 = (Math.floor((_local2 / 60000)) % 60);
_local5 = (Math.floor((_local2 / 1000)) % 60);
for each (_local6 in _local1.newData) {
switch (_local6){
case "time":
_local7 = thisScore.timeTxt;
break;
case "die":
_local7 = thisScore.diedTxt;
break;
case "rotate":
_local7 = thisScore.rotateTxt;
break;
case "jump":
_local7 = thisScore.jumpTxt;
break;
case "run":
_local7 = thisScore.ranTxt;
break;
};
_local7.textColor = 0;
};
thisScore.endTxt.text = ("END " + _local1.id);
thisScore.timeTxt.text = ((((((_local3 > 9)) ? _local3 : (0 + String(_local3)) + " :") + ((_local4 > 9)) ? _local4 : (0 + String(_local4))) + " :") + ((_local5 > 9)) ? _local5 : (0 + String(_local5)));
thisScore.diedTxt.text = _local1.die;
thisScore.rotateTxt.text = _local1.rotate;
thisScore.jumpTxt.text = _local1.jump;
thisScore.ranTxt.text = ((Math.round((_local1.run * 10)) / 100) + " m");
}
}
}//package game
Section 22
//Language (game.Language)
package game {
public class Language {
public static var _languageBox:Array = new Array();
public static var _languageNum:uint = 0;
public static function set language(_arg1:Object):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
_local2 = new languageItem();
_local2.url1 = "http://www.gamesgames.com/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local2.url2 = "http://www.gamesgames.com/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local2.language_nr = 1;
_local2.branding_nr = 17;
_languageBox.push(_local2);
_local3 = new languageItem();
_local3.url1 = "http://www.game.com.cn/moregames/";
_local3.url2 = "http://www.game.com.cn/downloads/";
_local3.language_nr = 2;
_local3.branding_nr = 2;
_languageBox.push(_local3);
_local4 = new languageItem();
_local4.url1 = "http://www.spelletjes.nl/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local4.url2 = "http://www.spelletjes.nl/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local4.language_nr = 3;
_local4.branding_nr = 18;
_languageBox.push(_local4);
_local5 = new languageItem();
_local5.url1 = "http://www.jeux.fr/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local5.url2 = "http://www.jeux.fr/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local5.language_nr = 4;
_local5.branding_nr = 19;
_languageBox.push(_local5);
_local6 = new languageItem();
_local6.url1 = "http://www.jetztspielen.de/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local6.url2 = "http://www.jetztspielen.de/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local6.language_nr = 5;
_local6.branding_nr = 20;
_languageBox.push(_local6);
_local7 = new languageItem();
_local7.url1 = "http://www.gry.pl/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local7.url2 = "http://www.gry.pl/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local7.language_nr = 6;
_local7.branding_nr = 21;
_languageBox.push(_local7);
_local8 = new languageItem();
_local8.url1 = "http://www.spela.se/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local8.url2 = "http://www.spela.se/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local8.language_nr = 7;
_local8.branding_nr = 22;
_languageBox.push(_local8);
_local9 = new languageItem();
_local9.url1 = "http://www.gioco.it/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local9.url2 = "http://www.gioco.it/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local9.language_nr = 8;
_local9.branding_nr = 23;
_languageBox.push(_local9);
_local10 = new languageItem();
_local10.url1 = "http://www.juegos.com/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local10.url2 = "http://www.juegos.com/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local10.language_nr = 9;
_local10.branding_nr = 24;
_languageBox.push(_local10);
_local11 = new languageItem();
_local11.url1 = "http://www.ojogos.com.br/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local11.url2 = "http://www.ojogos.com.br/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local11.language_nr = 11;
_local11.branding_nr = 25;
_languageBox.push(_local11);
_local12 = new languageItem();
_local12.url1 = "http://www.games.co.id/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local12.url2 = "http://www.games.co.id/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local12.language_nr = 13;
_local12.branding_nr = 13;
_languageBox.push(_local12);
_local13 = new languageItem();
_local13.url1 = "http://www.ourgames.ru/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local13.url2 = "http://www.ourgames.ru/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local13.language_nr = 12;
_local13.branding_nr = 26;
_languageBox.push(_local13);
_local14 = new languageItem();
_local14.url1 = "http://www.games.co.uk/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local14.url2 = "http://www.games.co.uk/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local14.language_nr = 16;
_local14.branding_nr = 27;
_languageBox.push(_local14);
_local15 = new languageItem();
_local15.url1 = "http://www.game.co.in/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local15.url2 = "http://www.game.co.in/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local15.language_nr = 16;
_local15.branding_nr = 12;
_languageBox.push(_local15);
_local16 = new languageItem();
_local16.url1 = "http://www.oyunlar123.com/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local16.url2 = "http://www.oyunlar123.com/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local16.language_nr = 14;
_local16.branding_nr = 28;
_languageBox.push(_local16);
_local17 = new languageItem();
_local17.url1 = "http://www.game.com.my/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local17.url2 = "http://www.game.com.my/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local17.language_nr = 15;
_local17.branding_nr = 16;
_languageBox.push(_local17);
_local18 = new languageItem();
_local18.url1 = "http://www.ojogos.pt/moregames/?utm_source=brandedgames&utm_medium=never_end";
_local18.url2 = "http://www.ojogos.pt/freegames/?utm_source=brandedgames&utm_medium=never_end";
_local18.language_nr = 10;
_local18.branding_nr = 42;
_languageBox.push(_local18);
if ((((((_arg1 is Number)) || ((_arg1 is uint)))) || ((_arg1 is int)))){
_languageNum = (Number(_arg1) - 1);
};
}
public static function get url2():String{
return (_languageBox[_languageNum].url2);
}
public static function get branding_nr():String{
return (_languageBox[_languageNum].branding_nr);
}
public static function get url1():String{
return (_languageBox[_languageNum].url1);
}
public static function get language_nr():String{
return (_languageBox[_languageNum].language_nr);
}
}
}//package game
class languageItem {
public var url1:String;
public var url2:String;
public var branding_nr:int;
public var language_nr:int;
private function languageItem(){
}
}
Section 23
//Loading (game.Loading)
package game {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
public class Loading extends MovieClip {
public var _loadingTxt:TextField;
private var loadingBar:MovieClip;
private var b_logo:MovieClip;
public var _b_logo:MovieClip;
private var loadingTxt:TextField;
public var _loadingBar:MovieClip;
public function Loading():void{
loadingTxt = (this.getChildByName("_loadingTxt") as TextField);
loadingBar = (this.getChildByName("_loadingBar") as MovieClip);
b_logo = (getChildByName("_b_logo") as MovieClip);
b_logo.buttonMode = true;
b_logo.addEventListener(MouseEvent.CLICK, jumpURL, false, 0, true);
this.addEventListener(Event.ENTER_FRAME, checkLoading, false, 0, true);
}
private function checkLoading(_arg1:Event):void{
var _local2:Number;
_local2 = Math.floor(((loaderInfo.bytesLoaded / loaderInfo.bytesTotal) * 100));
this.loadingBar.scaleX = (_local2 / 100);
this.loadingTxt.text = (_local2 + " %");
if (loaderInfo.bytesLoaded >= loaderInfo.bytesTotal){
this.removeEventListener(Event.ENTER_FRAME, checkLoading);
this.dispatchEvent(new Event("onLoadDone"));
};
}
private function jumpURL(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(Language.url1), "_blank");
}
}
}//package game
Section 24
//Main (game.Main)
package game {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Main extends MovieClip {
private var frameSpr:Sprite;
public var endMovie:EndMovie;
private var cld;
private var sdManager:SoundManager;
private var frameRater:FrameRate;
private var model:Model;
private var currentRoomId:uint;
private var loading:MovieClip;
private var currentExit:Object;
public var toolBar:ToolBar;
private var broadCaster:BroadCaster;
private var cookie:Cookie;
private var nextRoom:int;
public var splash:MovieClip;
public var mMenu:MainMenu;
public var settingField;
private var _frameRate:Number;// = 30
private var selectList:UserMenu;
private var currentData:Object;
private var manDir:String;// = "right"
private var roomContainer:MovieClip;
public function Main():void{
_frameRate = 30;
manDir = "right";
super();
frameSpr = new Sprite();
addChild(frameSpr);
frameRater = new FrameRate(frameSpr);
stop();
stage.tabChildren = false;
stage.showDefaultContextMenu = false;
stage.scaleMode = "noScale";
Language.language = 1;
loading = new Loading();
loading.addEventListener("onLoadDone", init, false, 0, true);
addChild(loading);
}
private function activeRoom(_arg1:Event):void{
Model.state = "normal";
Model.isSleep = false;
model.currentRoom = cld;
currentRoomId = nextRoom;
model.currentRoomId = currentRoomId;
}
private function movePlayer(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 37:
Model._KEY_LEFT = true;
break;
case 38:
Model._KEY_UP = true;
break;
case 39:
Model._KEY_RIGHT = true;
break;
case 40:
Model._KEY_DOWN = true;
break;
};
}
private function init(_arg1:Event):void{
removeChild(loading);
loading.removeEventListener("onLoadDone", init);
loading = null;
this.gotoAndStop(3);
this.gotoAndStop(1);
sdManager = SoundManager.getInstance();
sdManager.loadSounds();
cookie = Cookie.getInstance();
addEventListener(Event.ENTER_FRAME, motion);
model = Model.getInstance();
broadCaster = BroadCaster.getInstance();
broadCaster.addEventListener("onSplashDone", setToolBar, false, 0, true);
broadCaster.addEventListener("onGameWin", removeRoom, false, 0, true);
broadCaster.addEventListener("onRoomRemoved", showMap, false, 0, true);
broadCaster.addEventListener("onMapRemoved", showLevel, false, 0, true);
broadCaster.addEventListener("onMapReady", activeMap, false, 0, true);
broadCaster.addEventListener("onRoomReady", activeRoom, false, 0, true);
broadCaster.addEventListener("onEnterRoom", enterNextlevel, false, 0, true);
broadCaster.addEventListener("onGameOver", onGameOver, false, 0, true);
broadCaster.addEventListener("onEnterGame", enterGame, false, 0, true);
broadCaster.addEventListener("onQuitGame", initGame, false, 0, true);
broadCaster.addEventListener("doorRemoved", scaleBack, false, 0, true);
broadCaster.addEventListener("onEnterNewRoom", setCurrentRoom, false, 0, true);
broadCaster.addEventListener("onFindFile", addNewFile, false, 0, true);
broadCaster.addEventListener("onPlayerDied", onPlayerDied, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_MOVE, dragTT);
stage.addEventListener(MouseEvent.MOUSE_UP, stopddd);
stage.addEventListener(KeyboardEvent.KEY_UP, changeRotation);
stage.addEventListener(KeyboardEvent.KEY_DOWN, movePlayer);
initGame();
}
private function saveValue(_arg1:String, _arg2:Number):void{
var _local3:*;
_local3 = currentData[_arg1];
_local3 = ((_local3 == null)) ? 0 : _local3;
_local3 = (_local3 + _arg2);
currentData[_arg1] = _local3;
}
private function showMap(_arg1:Event):void{
Model.state = "";
cld.alpha = 0.1;
cld.setPlayer(manDir);
cld.resetPlayerPosition(currentExit.x, currentExit.y);
cld.showMap();
}
private function setCurrentRoom(_arg1:DataEvent):void{
toolBar.maps.setCurrentRoom(_arg1);
}
private function initGame(_arg1:Event=null):void{
var e = _arg1;
try {
Model.state = "";
model.currentRoom.remove();
model.clearState();
removeChild(toolBar);
removeChild(roomContainer);
roomContainer = null;
toolBar = null;
} catch(e:Error) {
};
sdManager.clearAllSounds();
selectList = new UserMenu();
addChild(selectList);
stage.focus = stage;
}
private function removeData():void{
var _local1:*;
var _local2:Array;
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Object;
var _local7:Object;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:int;
var _local14:int;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Object;
var _local21:Object;
var _local22:Array;
_local1 = currentData.cleared;
_local1 = ((_local1 == null)) ? 0 : _local1;
_local1++;
currentData.cleared = _local1;
_local2 = new Array();
_local3 = {time:0, die:0, run:0, rotate:0, jump:0};
_local4 = currentData.data1;
_local5 = currentData.data2;
_local6 = currentData.data3;
_local7 = currentData.data4;
_local2.push(((_local4 == null)) ? _local3 : _local4);
_local2.push(((_local5 == null)) ? _local3 : _local5);
_local2.push(((_local6 == null)) ? _local3 : _local6);
_local2.push(((_local7 == null)) ? _local3 : _local7);
_local8 = currentData.time;
_local9 = currentData.died;
_local10 = currentData.ran;
_local11 = currentData.rotated;
_local12 = currentData.jumped;
_local9 = (isNaN(_local9)) ? 0 : _local9;
_local13 = 0;
while (_local13 < _local2.length) {
if (_local13 == (-(nextRoom) - 1)){
} else {
_local8 = (_local8 - _local2[_local13].time);
_local9 = (_local9 - _local2[_local13].die);
_local10 = (_local10 - _local2[_local13].run);
_local11 = (_local11 - _local2[_local13].rotate);
_local12 = (_local12 - _local2[_local13].jump);
};
_local13++;
};
_local14 = (-(nextRoom) - 1);
_local15 = (_local8 - _local2[_local14].time);
_local16 = (_local9 - _local2[_local14].die);
_local17 = (_local10 - _local2[_local14].run);
_local18 = (_local11 - _local2[_local14].rotate);
_local19 = (_local12 - _local2[_local14].jump);
_local20 = currentData[("minData" + -(nextRoom))];
_local21 = new Object();
_local22 = new Array();
_local21.newData = _local22;
getMinData(_local20, _local21, _local15, "time");
getMinData(_local20, _local21, _local16, "die");
getMinData(_local20, _local21, _local17, "run");
getMinData(_local20, _local21, _local18, "rotate");
getMinData(_local20, _local21, _local19, "jump");
_local21.time = (((!((_local20 == null))) && ((_local20.time < _local15)))) ? _local20.time : _local15;
_local21.die = (((!((_local20 == null))) && ((_local20.die < _local16)))) ? _local20.die : _local16;
_local21.run = (((!((_local20 == null))) && ((_local20.run < _local17)))) ? _local20.run : _local17;
_local21.rotate = (((!((_local20 == null))) && ((_local20.rotate < _local18)))) ? _local20.rotate : _local18;
_local21.jump = (((!((_local20 == null))) && ((_local20.jump < _local19)))) ? _local20.jump : _local19;
_local21.id = -(nextRoom);
Model.ExitData = _local21;
currentData[("data" + -(nextRoom))] = {time:_local8, die:_local9, run:_local10, rotate:_local11, jump:_local12};
currentData[("minData" + -(nextRoom))] = Model.ExitData;
cookie.saveData();
cookie.saveValue(null, "currentRoom");
Model.cData = null;
}
private function scaleBack(_arg1:Event):void{
model.currentRoom.scaleBack();
}
private function changeRotation(_arg1:KeyboardEvent):void{
if (((((!((model.currentRoom == null))) && (!(Model.disableKeyBoard)))) && (!(Model.isGameOver)))){
switch (_arg1.keyCode){
case 88:
if ((((Model.state == "normal")) && (Model.isStatic))){
Model.rotated++;
model.clearState(false);
this.toolBar.maps.setRotation(90);
model.currentRoom.setRotation(90);
};
break;
case 90:
if ((((Model.state == "normal")) && (Model.isStatic))){
Model.rotated++;
model.clearState(false);
model.currentRoom.setRotation(-90);
this.toolBar.maps.setRotation(-90);
};
break;
};
};
switch (_arg1.keyCode){
case 37:
Model._KEY_LEFT = false;
break;
case 38:
Model._KEY_UP = false;
break;
case 39:
Model._KEY_RIGHT = false;
break;
case 40:
Model._KEY_DOWN = false;
break;
};
}
private function showLevel(_arg1:Event):void{
}
private function enterNextlevel(_arg1:DataEvent):void{
var _local2:Array;
var _local3:uint;
var _local4:*;
var _local5:Object;
var _local6:Point;
Model.state = "";
_local2 = _arg1.data.split(":");
nextRoom = Number(_local2[0]);
_local3 = Number(_local2[1]);
if (nextRoom >= 0){
model.currentRoom.removeMap();
_local4 = model.currentRoom.getBorder();
_local5 = model.getRoomLocation(nextRoom);
cld = new Room(nextRoom, _local3);
cld.setPlayer(manDir);
Model.cData.roomId = nextRoom;
Model.cData.entranceId = _local3;
Model.cData.rotation = Model.rotation;
Model.cData.ateBooks = toolBar.files.files;
cookie.saveValue(Model.cData, "currentRoom");
broadCaster.run("onEnterNewRoom", String(nextRoom));
roomContainer.addChild(cld);
_local6 = model.currentRoom.container.localToGlobal(new Point((_local5.x * 50), (_local5.y * 50)));
cld.x = _local6.x;
cld.y = _local6.y;
cld.scaleX = (cld.scaleY = (2 / 9));
model.clearState();
cld.showRoom();
} else {
onGameWin();
};
}
private function removeRoom(_arg1:DataEvent):void{
var _local2:Object;
var _local3:Array;
var _local4:*;
var _local5:Point;
saveData();
_local2 = model.getRoomLocation(currentRoomId);
_local3 = _arg1.data.split(":");
manDir = _local3[1];
currentExit = model.getExit(currentRoomId, _local3[0]);
cld = new Room(0);
cld.alpha = 0;
roomContainer.addChild(cld);
_local4 = cld.getBorder();
_local5 = cld.container.localToGlobal(new Point((_local2.x * 50), (_local2.y * 50)));
model.currentRoom.removeRoom(_local5.x, _local5.y);
model.clearState();
}
private function activeMap(_arg1:Event):void{
Model.state = "map";
model.currentRoom = cld;
}
private function setToolBar(_arg1:Event=null):void{
frameRater.cFrameRate = 60;
removeChild(splash);
splash = null;
toolBar = new ToolBar();
settingField = toolBar.settting;
sdManager.playSound("mainBg", SoundManager.TYPE_BG);
roomContainer = new MovieClip();
addChild(roomContainer);
addChild(toolBar);
startGame();
}
private function addNewFile(_arg1:DataEvent):void{
toolBar.files.addNewFile(_arg1);
}
private function stopddd(_arg1:MouseEvent):void{
var e = _arg1;
try {
toolBar.files._stopDrag();
} catch(e:Error) {
};
}
private function showScore(_arg1:Event):void{
var _local2:MovieClip;
endMovie.removeEventListener("onEndMovieDone", showScore);
removeChild(endMovie);
endMovie = null;
_local2 = new GameWin();
addChild(_local2);
_local2.addEventListener("onGameWinMovieDone", initGame, false, 0, true);
}
private function onPlayerDied(_arg1:DataEvent):void{
Model.isGameOver = true;
Model.getInstance().clearState(false);
model.currentRoom.player.onPlayerDied();
}
private function dragTT(_arg1:MouseEvent):void{
var e = _arg1;
try {
toolBar.files.setTxt();
} catch(e:Error) {
};
}
private function motion(_arg1:Event):void{
var e = _arg1;
try {
settingField.update();
} catch(e:Error) {
};
if (((!((model.currentRoom == null))) && (!(Model.disableKeyBoard)))){
Model.isStatic = true;
model.currentRoom.update();
if (Model.isGameOver){
Model.isSleep = false;
} else {
if (Model.isStatic){
Model.isSleep = true;
};
};
};
}
private function onGameWin():void{
removeData();
Model.state = "";
model.currentRoom.remove();
model.clearState();
removeChild(toolBar);
removeChild(roomContainer);
roomContainer = null;
toolBar = null;
sdManager.clearAllSounds();
endMovie = new EndMovie();
endMovie.x = 320;
endMovie.y = 240;
frameRater.cFrameRate = 30;
addChild(endMovie);
endMovie.addEventListener("onEndMovieDone", showScore, false, 0, true);
}
private function saveData():void{
var _local1:Room;
_local1 = model.currentRoom;
saveValue("jumped", Model.jumped);
saveValue("rotated", Model.rotated);
saveValue("died", Model.died);
saveValue("ran", Model.ran);
toolBar.files.saveBook();
currentData.hasP = Model.hasP;
currentData[("room" + currentRoomId)] = {keys:_local1._keys, doors:_local1._doors};
toolBar.maps.saveHiddenMap();
toolBar.maps.setPrevRoom(String(currentRoomId));
saveTime();
cookie.saveData();
Model.resetData();
}
private function startGame(_arg1:Event=null):void{
var _local2:int;
var _local3:Room;
stage.focus = stage;
Model.isGameOver = false;
if (Model.cData == null){
currentRoomId = 1;
_local2 = -2;
Model.rotation = 0;
Model.cData = {roomId:currentRoomId, entranceId:_local2, rotation:Model.rotation};
} else {
currentRoomId = Model.cData.roomId;
_local2 = Model.cData.entranceId;
Model.rotation = Model.cData.rotation;
};
model.currentRoomId = currentRoomId;
Model.state = "normal";
toolBar.reset();
_local3 = new Room(currentRoomId, _local2);
_local3.setPlayer(manDir);
broadCaster.run("onEnterNewRoom", String(currentRoomId));
roomContainer.addChild(_local3);
model.currentRoom = _local3;
}
private function onGameOver(_arg1:DataEvent):void{
Model.died++;
Model.disableKeyBoard = false;
Model.state = "";
model.currentRoom.remove();
model.clearState();
startGame();
}
private function getMinData(_arg1:Object, _arg2:Object, _arg3, _arg4:String):void{
if ((((_arg1 == null)) || ((_arg3 < _arg1[_arg4])))){
_arg2[_arg4] = _arg3;
_arg2.newData.push(_arg4);
} else {
_arg2[_arg4] = _arg1[_arg4];
};
}
private function enterGame(_arg1:Event):void{
currentData = model.getCurrentData();
Model.cData = cookie.getValue("currentRoom");
selectList = null;
splash = new SplashMovie();
frameRater.cFrameRate = 30;
addChild(splash);
sdManager.playSound("splash", SoundManager.TYPE_BG);
Model.resetData();
stage.focus = stage;
}
private function saveTime():void{
toolBar.settting.saveTime();
}
}
}//package game
Section 25
//MainMenu (game.MainMenu)
package game {
import flash.display.*;
public class MainMenu extends MovieClip {
public function MainMenu():void{
}
}
}//package game
Section 26
//MapField (game.MapField)
package game {
import flash.events.*;
import flash.display.*;
public class MapField extends MovieClip {
private var hiddedRoomStateMc:MovieClip;
private var model:Model;
private var rotateCounter;// = 60
private var broadCaster:BroadCaster;
public var map:MovieClip;
private var cookie:Cookie;
public var _map;
private var finishedRooms:Array;
private var currentPosition:Object;
private var rotateOffset;// = 0
public function MapField():void{
rotateOffset = 0;
rotateCounter = 60;
super();
cookie = Cookie.getInstance();
_map = this.getChildByName("map");
model = Model.getInstance();
hiddedRoomStateMc = (_map.getChildByName("room25") as MovieClip);
initRoom();
}
public function setRotation(_arg1:Number):void{
rotateOffset = _arg1;
rotateCounter = 0;
this.addEventListener(Event.ENTER_FRAME, changeRotation);
}
public function initRoom():void{
var _local1:*;
var _local2:MovieClip;
finishedRooms = Model.getInstance().currentData.finished;
if (finishedRooms == null){
finishedRooms = new Array();
};
for each (_local1 in finishedRooms) {
_local2 = (this._map.getChildByName(("room" + _local1)) as MovieClip);
_local2.gotoAndStop("finished");
};
}
public function setCurrentRoom(_arg1:DataEvent):void{
var _local2:MovieClip;
_local2 = (this._map.getChildByName(("room" + _arg1.data)) as MovieClip);
_local2.gotoAndStop("current");
}
public function setPrevRoom(_arg1:String):void{
var _local2:MovieClip;
var _local3:Array;
var _local4:*;
_local2 = (this._map.getChildByName(("room" + _arg1)) as MovieClip);
if (finishedRooms.indexOf(_arg1) < 0){
finishedRooms.push(_arg1);
_local3 = new Array();
for each (_local4 in finishedRooms) {
_local3.push(_local4);
};
model.currentData.finished = finishedRooms;
};
_local2.gotoAndStop("finished");
}
private function changeRotation(_arg1:Event=null):void{
var e = _arg1;
rotateCounter++;
_map.rotation = (_map.rotation + (rotateOffset / 60));
if (rotateCounter >= 60){
_map.rotation = Model.rotation;
checkPosition();
try {
removeEventListener(Event.ENTER_FRAME, changeRotation);
} catch(e:Error) {
};
};
}
public function checkPosition():void{
var _local1:uint;
_local1 = Math.round((Model.rotation / 90));
while (currentPosition != currentPosition.nPoint[_local1]) {
currentPosition = currentPosition.nPoint[_local1];
};
Model.hiddedRoomLocation = currentPosition;
Model.getInstance().editActiveRoom(currentPosition.point);
hiddedRoomStateMc.x = currentPosition.position[0];
hiddedRoomStateMc.y = currentPosition.position[1];
}
public function saveHiddenMap():void{
Model.getInstance().currentData.hiddenRoomPosition = [currentPosition.point[0], currentPosition.point[1]];
}
public function reset():void{
var _local1:Array;
var _local2:*;
_map.rotation = Model.rotation;
_local1 = Model.getInstance().currentData.hiddenRoomPosition;
if (_local1 == null){
currentPosition = model.hiddenRoomSets[8];
checkPosition();
} else {
for each (_local2 in model.hiddenRoomSets) {
if ((((_local2.point[0] == _local1[0])) && ((_local2.point[1] == _local1[1])))){
currentPosition = _local2;
checkPosition();
};
};
};
}
public function setHiddenRoom():void{
}
}
}//package game
Section 27
//Model (game.Model)
package game {
public class Model {
public var mapEntrances:Array;
public var currentLevel:uint;// = 0
public var hiddenRoomSets:Array;
public var mapData:Object;
public var callBacks:Array;
public var currentRoomId:uint;
public var currentData:Object;
private var messages:Array;
private var cRoom:Array;
public var roomLevel:Array;
public var allData:Object;
public var levels:Array;
public var currentRoom:Room;
public var rooms:Array;
private var cMan:Array;
public static const MAX_MOVE_SPEED:Number = 2;
public static const MAX_DROP_SPEED:Number = 25;
public static const MOVING_A:Number = 0.3;
public static const a:Number = 0.5;
public static var _KEY_DOWN:Boolean = false;
public static var userName:String = "PLYAER1";
public static var ExitData:Object;
public static var _disableKeyBoard:Boolean = false;
public static var state:String = "normal";
public static var ran:Number = 0;
public static var gridWidth:Number;
public static var books:Array;
public static var cData:Object;
public static var isGameOver:Boolean = false;
public static var isStatic:Boolean;
public static var _KEY_UP:Boolean = false;
public static var isSleep:Boolean = false;
public static var gravity:Object = {x:0, y:a};
public static var jumped:int = 0;
public static var died:int = 0;
public static var _KEY_LEFT:Boolean = false;
public static var rotated:int = 0;
public static var hiddedRoomLocation:Object;
public static var _instance:Model;
public static var hasP:Boolean;
public static var _KEY_RIGHT:Boolean = false;
public static var rotation:Number = 0;
public function Model():void{
currentLevel = 0;
super();
mapEntrances = new Array();
rooms = new Array();
levels = new Array();
callBacks = new Array();
roomLevel = new Array();
createMainMap();
setMessage();
addEntrances();
createLevels();
createHiddenRoom();
getAllData();
}
public function getCurrentData():Object{
if (allData[userName] == null){
allData[userName] = new Object();
};
currentData = allData[userName];
return (currentData);
}
private function get2DArray(_arg1:Array, _arg2:Array, _arg3:Array=null):Array{
var _local4:Array;
var _local5:int;
var _local6:int;
if (_arg3 == null){
_arg3 = new Array();
};
_local4 = new Array();
_local5 = _arg1[0];
while (_local5 <= _arg2[0]) {
_local6 = _arg1[1];
while (_local6 <= _arg2[1]) {
_local4.push([_local5, _local6]);
_local6++;
};
_local5++;
};
return (_local4.concat(_arg3));
}
public function createLevels():void{
createRoom(9, 9);
addGroup(get2DArray([0, 1], [0, 3]));
addGroup(get2DArray([0, 5], [0, 7]));
addGroup(get2DArray([8, 0], [8, 8]));
addGroup(get2DArray([0, 0], [7, 0]));
addGroup(get2DArray([0, 8], [7, 8]));
addGroup([[4, 2], [6, 3], [7, 3], [3, 4]]);
addGroup(get2DArray([2, 3], [2, 7]));
addGroup(get2DArray([5, 2], [5, 5]));
addGroup(get2DArray([4, 6], [6, 6]));
addGroup([[1, 7]], "key", false);
addGroup([[7, 6]], "door", true, 90);
addGroup([[7, 4]], "key", false);
addGroup([[5, 1]], "door", true);
addGroup([[7, 2]], "key", false);
addGroup([[0, 4]], "door", true);
addGroup([[4, 5]], "book", false, 1);
addGroup([[-1, 4]], "exit", true, "T0");
setManPosition([[1, 4]]);
addGroup([[4, 4]], "man", false);
createRoom(18, 9);
addGroup([[0, 12]]);
addGroup(get2DArray([0, 0], [0, 10]));
addGroup(get2DArray([0, 14], [0, 17]));
addGroup(get2DArray([8, 0], [8, 17]));
addGroup(get2DArray([1, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup(get2DArray([1, 17], [7, 17]));
addGroup([[5, 6], [7, 4], [2, 2], [6, 2], [5, 8], [6, 4], [6, 10], [2, 8], [3, 4], [3, 8], [3, 9], [4, 3], [4, 4], [4, 6]]);
addGroup(get2DArray([1, 10], [3, 10]));
addGroup([[0, 11]], "spike", true, 180);
addGroup([[0, 11]], "halfWall", true, 180);
addGroup([[1, 6]], "spike", true, 270);
addGroup([[1, 6]], "halfWall", true, 270);
addGroup([[2, 6]], "spike", true, 270);
addGroup([[2, 6]], "halfWall", true, 270);
addGroup([[3, 6]], "spike", true, 270);
addGroup([[3, 6]], "halfWall", true, 270);
addGroup([[5, 4]], "spike", true, 270);
addGroup([[5, 4]], "halfWall", true, 270);
addGroup([[6, 8]], "spike", true, 270);
addGroup([[6, 8]], "halfWall", true, 270);
addGroup([[7, 8]], "spike", true, 270);
addGroup([[7, 8]], "halfWall", true, 270);
addGroup([[4, 10]], "spike", true, 270);
addGroup([[4, 10]], "halfWall", true, 270);
addGroup([[5, 10]], "spike", true, 270);
addGroup([[5, 10]], "halfWall", true, 270);
addGroup([[3, 14], [4, 13], [4, 14], [4, 15], [5, 12], [5, 13], [5, 14], [5, 15], [6, 12], [6, 13], [3, 13], [4, 12], [3, 15], [4, 16], [6, 15], [5, 16], [6, 14], [7, 15]], "piston", false);
addGroup([[2, 12]], "key", false);
addGroup([[1, 8]], "door", true, 90);
addGroup([[2, 9]], "key", false);
addGroup([[0, 13]], "door", true);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[-1, 13]], "exit", true, "T1");
setManPosition([[4, 1], [1, 13]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup([[0, 7], [0, 8], [1, 8], [7, 8], [8, 5], [8, 7], [8, 8]]);
addGroup(get2DArray([0, 0], [0, 4]));
addGroup(get2DArray([8, 0], [8, 3]));
addGroup(get2DArray([1, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup([[6, 1], [1, 4], [4, 4], [5, 4], [6, 6], [2, 2], [6, 2]]);
addGroup([[8, 6]], "spike", true, 0);
addGroup([[8, 6]], "halfWall", true, 0);
addGroup([[3, 2]], "spike", true, 270);
addGroup([[3, 2]], "halfWall", true, 270);
addGroup([[5, 2]], "spike", true, 270);
addGroup([[5, 2]], "halfWall", true, 270);
addGroup([[2, 6]], "spike", true, 90);
addGroup([[2, 6]], "halfWall", true, 90);
addGroup([[3, 6]], "spike", true, 90);
addGroup([[3, 6]], "halfWall", true, 90);
addGroup([[4, 6]], "spike", true, 90);
addGroup([[4, 6]], "halfWall", true, 90);
addGroup([[5, 6]], "spike", true, 90);
addGroup([[5, 6]], "halfWall", true, 90);
addGroup([[0, 5]], "spike", true, 180);
addGroup([[0, 5]], "halfWall", true, 180);
addGroup([[0, 6]], "spike", true, 180);
addGroup([[0, 6]], "halfWall", true, 180);
addGroup([[5, 3]], "spike", true, 180);
addGroup([[5, 3]], "halfWall", true, 180);
addGroup([[5, 5]], "spike", true, 180);
addGroup([[5, 5]], "halfWall", true, 180);
addGroup([[2, 4]], "spike", true, 270);
addGroup([[2, 4]], "halfWall", true, 270);
addGroup([[2, 8]], "spike", true, 270);
addGroup([[2, 8]], "halfWall", true, 270);
addGroup([[3, 8]], "spike", true, 270);
addGroup([[3, 8]], "halfWall", true, 270);
addGroup([[4, 8]], "spike", true, 270);
addGroup([[4, 8]], "halfWall", true, 270);
addGroup([[5, 8]], "spike", true, 270);
addGroup([[5, 8]], "halfWall", true, 270);
addGroup([[6, 8]], "spike", true, 270);
addGroup([[6, 8]], "halfWall", true, 270);
addGroup([[5, 1]], "key", false);
addGroup([[7, 2]], "door", true, 90);
addGroup([[7, 1]], "key", false);
addGroup([[4, 0]], "door", true, 90);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[9, 4]], "exit", true, "B1");
setManPosition([[4, 1], [7, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 18);
addGroup([[13, 9], [15, 9], [1, 17], [3, 17], [5, 17]]);
addGroup(get2DArray([0, 0], [0, 17]));
addGroup(get2DArray([8, 0], [8, 3]));
addGroup(get2DArray([8, 5], [8, 9]));
addGroup(get2DArray([17, 9], [17, 17]));
addGroup(get2DArray([1, 0], [7, 0]));
addGroup(get2DArray([9, 9], [11, 9]));
addGroup(get2DArray([7, 17], [12, 17]));
addGroup(get2DArray([14, 17], [16, 17]));
addGroup([[4, 8], [7, 1], [7, 7], [3, 1], [3, 3], [3, 6], [7, 8], [9, 10], [13, 10], [8, 13], [9, 13], [2, 15], [6, 15], [7, 15], [8, 15], [9, 15], [7, 16]]);
addGroup(get2DArray([1, 7], [4, 7]));
addGroup(get2DArray([1, 4], [3, 4]));
addGroup(get2DArray([5, 2], [5, 5]));
addGroup([[1, 15]], "spike", true, 270);
addGroup([[1, 15]], "halfWall", true, 270);
addGroup([[2, 17]], "spike", true, 270);
addGroup([[2, 17]], "halfWall", true, 270);
addGroup([[6, 17]], "spike", true, 270);
addGroup([[6, 17]], "halfWall", true, 270);
addGroup([[12, 9]], "spike", true, 90);
addGroup([[12, 9]], "halfWall", true, 90);
addGroup([[14, 9]], "spike", true, 90);
addGroup([[14, 9]], "halfWall", true, 90);
addGroup([[16, 9]], "spike", true, 90);
addGroup([[16, 9]], "halfWall", true, 90);
addGroup([[5, 8]], "spike", true, 180);
addGroup([[5, 8]], "halfWall", true, 180);
addGroup([[9, 14], [10, 14], [11, 14], [12, 14], [13, 14], [15, 14], [15, 12], [11, 12], [13, 12], [9, 12], [7, 12], [7, 10], [14, 14], [15, 13], [15, 11], [14, 12], [12, 12], [11, 11], [10, 12], [7, 9], [7, 11], [7, 13], [8, 10], [8, 12]], "piston", false);
addGroup([[4, 2], [4, 3], [4, 4], [4, 5]], "piston", false);
addGroup([[8, 11]], "key", false);
addGroup([[9, 16]], "door", true);
addGroup([[8, 16]], "key", false);
addGroup([[8, 14]], "door", true);
addGroup([[6, 16]], "key", false);
addGroup([[4, 17]], "door", true, 90);
addGroup([[2, 3]], "key", false);
addGroup([[3, 5]], "door", true);
addGroup([[1, 5]], "key", false);
addGroup([[8, 4]], "door", true);
addGroup([[1, 3]], "book", false, 3);
addGroup([[9, 4]], "exit", true, "B0");
addGroup([[4, 18]], "exit", true, "R1");
addGroup([[13, 18]], "exit", true, "R2");
setManPosition([[7, 4], [4, 16], [13, 16]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 18);
addGroup([[12, 0], [14, 0], [17, 0], [17, 1], [17, 4]]);
addGroup(get2DArray([0, 0], [0, 15]));
addGroup(get2DArray([17, 6], [17, 12]));
addGroup(get2DArray([17, 14], [17, 17]));
addGroup(get2DArray([1, 0], [3, 0]));
addGroup(get2DArray([5, 0], [9, 0]));
addGroup(get2DArray([0, 17], [16, 17]));
addGroup([[8, 12], [4, 14], [4, 15], [9, 2], [9, 5], [9, 6], [10, 6], [14, 6], [15, 6], [5, 3], [1, 6], [6, 1]]);
addGroup([[11, 4], [13, 3], [14, 5], [15, 2], [16, 4], [12, 9], [13, 11], [14, 14], [2, 15], [1, 11], [12, 15]]);
addGroup(get2DArray([6, 3], [6, 8]));
addGroup(get2DArray([2, 8], [5, 8]));
addGroup(get2DArray([14, 9], [16, 9]));
addGroup(get2DArray([11, 9], [11, 16]));
addGroup(get2DArray([3, 11], [8, 11]));
addGroup(get2DArray([12, 12], [14, 12]));
addGroup(get2DArray([6, 13], [8, 13]));
addGroup(get2DArray([1, 13], [4, 13]));
addGroup(get2DArray([4, 15], [8, 15]));
addGroup(get2DArray([14, 15], [16, 15]));
addGroup([[17, 2]], "spike", true, 0);
addGroup([[17, 2]], "halfWall", true, 0);
addGroup([[17, 3]], "spike", true, 0);
addGroup([[17, 3]], "halfWall", true, 0);
addGroup([[17, 5]], "spike", true, 0);
addGroup([[17, 5]], "halfWall", true, 0);
addGroup([[2, 16]], "spike", true, 0);
addGroup([[2, 16]], "halfWall", true, 0);
addGroup([[10, 0]], "spike", true, 90);
addGroup([[10, 0]], "halfWall", true, 90);
addGroup([[11, 0]], "spike", true, 90);
addGroup([[11, 0]], "halfWall", true, 90);
addGroup([[15, 0]], "spike", true, 90);
addGroup([[15, 0]], "halfWall", true, 90);
addGroup([[16, 0]], "spike", true, 90);
addGroup([[16, 0]], "halfWall", true, 90);
addGroup([[9, 3]], "spike", true, 180);
addGroup([[9, 3]], "halfWall", true, 180);
addGroup([[9, 4]], "spike", true, 180);
addGroup([[9, 4]], "halfWall", true, 180);
addGroup([[0, 16]], "spike", true, 180);
addGroup([[0, 16]], "halfWall", true, 180);
addGroup([[11, 6]], "spike", true, 270);
addGroup([[11, 6]], "halfWall", true, 270);
addGroup([[12, 6]], "spike", true, 270);
addGroup([[12, 6]], "halfWall", true, 270);
addGroup([[13, 6]], "spike", true, 270);
addGroup([[13, 6]], "halfWall", true, 270);
addGroup([[7, 3], [7, 4], [7, 5], [7, 6], [7, 7], [7, 8], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8]], "piston", false);
addGroup([[3, 9], [4, 9], [5, 9], [6, 9], [7, 9], [8, 9], [3, 10], [4, 10], [5, 10], [6, 10], [7, 10], [8, 10]], "piston", false);
addGroup([[9, 7], [10, 7], [11, 7], [12, 7], [13, 7], [14, 7], [9, 8], [10, 8], [11, 8], [12, 8], [13, 8], [14, 8]], "piston", false);
addGroup([[9, 9], [9, 14], [10, 9], [10, 10], [10, 13], [10, 14], [9, 10], [9, 13], [10, 11], [10, 12]], "piston", false);
addGroup([[1, 1], [1, 2], [1, 3], [1, 4], [2, 2], [2, 3], [2, 4], [3, 3], [3, 4], [2, 1], [3, 2]], "piston", false);
addGroup([[16, 16]], "key", false);
addGroup([[9, 1]], "door", true);
addGroup([[10, 5]], "key", false);
addGroup([[4, 0]], "door", true, 90);
addGroup([[9, 12]], "key", false);
addGroup([[17, 13]], "door", true);
addGroup([[1, 16]], "book", false, 14);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[13, -1]], "exit", true, "L1");
addGroup([[18, 13]], "exit", true, "B2");
setManPosition([[4, 1], [13, 1], [16, 13]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 9);
addGroup(get2DArray([0, 0], [0, 17]));
addGroup(get2DArray([8, 0], [8, 17]));
addGroup(get2DArray([1, 17], [3, 17]));
addGroup(get2DArray([5, 17], [7, 17]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup([[1, 13], [2, 0], [3, 0], [4, 3], [7, 2], [7, 12], [6, 10], [7, 5], [7, 10], [3, 14], [4, 14], [7, 14], [7, 15], [2, 16], [7, 16], [6, 16]]);
addGroup(get2DArray([2, 8], [2, 14]));
addGroup(get2DArray([2, 2], [4, 2]));
addGroup([[1, 0]], "spike", true, 90);
addGroup([[1, 0]], "halfWall", true, 90);
addGroup([[5, 2]], "spike", true, 90);
addGroup([[5, 2]], "halfWall", true, 90);
addGroup([[6, 2]], "spike", true, 90);
addGroup([[6, 2]], "halfWall", true, 90);
addGroup([[7, 3]], "spike", true, 0);
addGroup([[7, 3]], "halfWall", true, 0);
addGroup([[7, 6]], "spike", true, 0);
addGroup([[7, 6]], "halfWall", true, 0);
addGroup([[7, 7]], "spike", true, 0);
addGroup([[7, 7]], "halfWall", true, 0);
addGroup([[7, 8]], "spike", true, 0);
addGroup([[7, 8]], "halfWall", true, 0);
addGroup([[7, 9]], "spike", true, 0);
addGroup([[7, 9]], "halfWall", true, 0);
addGroup([[7, 13]], "spike", true, 0);
addGroup([[7, 13]], "halfWall", true, 0);
addGroup([[1, 1], [1, 3], [1, 4], [2, 3], [3, 3], [1, 2]], "piston", false);
addGroup([[1, 7], [1, 8], [1, 9], [1, 10], [2, 7]], "piston", false);
addGroup([[7, 1]], "key", false);
addGroup([[2, 15]], "door", true);
addGroup([[1, 14]], "key", false);
addGroup([[4, 0]], "door", true, 90);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[4, 18]], "exit", true, "R1");
setManPosition([[5, 1], [4, 16]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup(get2DArray([0, 0], [0, 3]));
addGroup(get2DArray([0, 5], [0, 8]));
addGroup(get2DArray([8, 0], [8, 8]));
addGroup(get2DArray([1, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup(get2DArray([1, 8], [7, 8]));
addGroup([[1, 2], [1, 6], [3, 2], [4, 2], [6, 2], [7, 2], [4, 4], [6, 4], [7, 4], [6, 5], [5, 7], [6, 7]]);
addGroup(get2DArray([3, 4], [3, 6]));
addGroup([[4, 3], [5, 3], [6, 3]], "piston", false);
addGroup([[5, 4], [5, 5], [5, 6]], "piston", false);
addGroup([[7, 1]], "key", false);
addGroup([[3, 3]], "door", true);
addGroup([[7, 7]], "key", false);
addGroup([[5, 2]], "door", true, 90);
addGroup([[7, 3]], "key", false);
addGroup([[4, 0]], "door", true, 90);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[-1, 4]], "exit", true, "T1");
setManPosition([[4, 1], [1, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 9);
addGroup(get2DArray([0, 0], [0, 3]));
addGroup(get2DArray([0, 5], [0, 17]));
addGroup(get2DArray([8, 0], [8, 3]));
addGroup(get2DArray([8, 5], [8, 17]));
addGroup(get2DArray([1, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup(get2DArray([1, 17], [7, 17]));
addGroup([[1, 6], [5, 15], [2, 16], [7, 12], [4, 10], [4, 11], [6, 6], [6, 7], [1, 13], [2, 13], [2, 14], [3, 14], [2, 1], [2, 2], [6, 1], [6, 2]]);
addGroup(get2DArray([3, 2], [3, 8]));
addGroup(get2DArray([5, 2], [5, 4]));
addGroup([[2, 8]], "spike", true, 0);
addGroup([[2, 8]], "halfWall", true, 0);
addGroup([[4, 8]], "spike", true, 180);
addGroup([[4, 8]], "halfWall", true, 180);
addGroup([[1, 12]], "spike", true, 270);
addGroup([[1, 12]], "halfWall", true, 270);
addGroup([[4, 0]], "spike", true, 90);
addGroup([[4, 0]], "halfWall", true, 90);
addGroup([[7, 7]], "spike", true, 90);
addGroup([[7, 7]], "halfWall", true, 90);
addGroup([[1, 15], [2, 15]], "piston", false);
addGroup([[6, 9], [1, 9], [2, 9], [3, 9], [4, 9], [5, 9], [6, 10], [1, 10]], "piston", false);
addGroup([[1, 14]], "key", false);
addGroup([[4, 3]], "door", true, 90);
addGroup([[5, 1]], "key", false);
addGroup([[8, 4]], "door", true);
addGroup([[-1, 4]], "exit", true, "T0");
addGroup([[9, 4]], "exit", true, "B1");
setManPosition([[1, 4], [7, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 18);
addGroup([[3, 17], [17, 3], [0, 3], [5, 0], [17, 6], [17, 7], [17, 15], [14, 17], [15, 17], [6, 0], [8, 0], [9, 0], [14, 0], [15, 0], [11, 0], [12, 0], [0, 0], [0, 6], [0, 7], [0, 11], [0, 12], [0, 14], [0, 15], [0, 17], [6, 17], [10, 17], [17, 0], [17, 12], [11, 17], [17, 17], [2, 0], [3, 0]]);
addGroup([[13, 4], [6, 2], [4, 11], [4, 14], [15, 4], [2, 4], [4, 4], [6, 4], [11, 3], [11, 4], [4, 12], [4, 15], [1, 15], [3, 15], [16, 12], [2, 1], [2, 3], [2, 9], [4, 5], [5, 12], [8, 7], [8, 15], [10, 3], [10, 10], [12, 13], [13, 5], [15, 9], [15, 1], [15, 3]]);
addGroup([[0, 1]], "spike", true, 180);
addGroup([[0, 1]], "halfWall", true, 180);
addGroup([[0, 2]], "spike", true, 180);
addGroup([[0, 2]], "halfWall", true, 180);
addGroup([[0, 4]], "spike", true, 180);
addGroup([[0, 4]], "halfWall", true, 180);
addGroup([[0, 5]], "spike", true, 180);
addGroup([[0, 5]], "halfWall", true, 180);
addGroup([[0, 8]], "spike", true, 180);
addGroup([[0, 8]], "halfWall", true, 180);
addGroup([[0, 9]], "spike", true, 180);
addGroup([[0, 9]], "halfWall", true, 180);
addGroup([[0, 10]], "spike", true, 180);
addGroup([[0, 10]], "halfWall", true, 180);
addGroup([[0, 16]], "spike", true, 180);
addGroup([[0, 16]], "halfWall", true, 180);
addGroup([[4, 13]], "spike", true, 180);
addGroup([[4, 13]], "halfWall", true, 180);
addGroup([[6, 1]], "spike", true, 180);
addGroup([[6, 1]], "halfWall", true, 180);
addGroup([[6, 3]], "spike", true, 180);
addGroup([[6, 3]], "halfWall", true, 180);
addGroup([[11, 1]], "spike", true, 0);
addGroup([[11, 1]], "halfWall", true, 0);
addGroup([[11, 2]], "spike", true, 0);
addGroup([[11, 2]], "halfWall", true, 0);
addGroup([[17, 1]], "spike", true, 0);
addGroup([[17, 1]], "halfWall", true, 0);
addGroup([[17, 2]], "spike", true, 0);
addGroup([[17, 2]], "halfWall", true, 0);
addGroup([[17, 4]], "spike", true, 0);
addGroup([[17, 4]], "halfWall", true, 0);
addGroup([[17, 5]], "spike", true, 0);
addGroup([[17, 5]], "halfWall", true, 0);
addGroup([[17, 8]], "spike", true, 0);
addGroup([[17, 8]], "halfWall", true, 0);
addGroup([[17, 9]], "spike", true, 0);
addGroup([[17, 9]], "halfWall", true, 0);
addGroup([[17, 10]], "spike", true, 0);
addGroup([[17, 10]], "halfWall", true, 0);
addGroup([[17, 11]], "spike", true, 0);
addGroup([[17, 11]], "halfWall", true, 0);
addGroup([[17, 13]], "spike", true, 0);
addGroup([[17, 13]], "halfWall", true, 0);
addGroup([[17, 14]], "spike", true, 0);
addGroup([[17, 14]], "halfWall", true, 0);
addGroup([[17, 16]], "spike", true, 0);
addGroup([[17, 16]], "halfWall", true, 0);
addGroup([[1, 0]], "spike", true, 90);
addGroup([[1, 0]], "halfWall", true, 90);
addGroup([[7, 0]], "spike", true, 90);
addGroup([[7, 0]], "halfWall", true, 90);
addGroup([[10, 0]], "spike", true, 90);
addGroup([[10, 0]], "halfWall", true, 90);
addGroup([[16, 0]], "spike", true, 90);
addGroup([[16, 0]], "halfWall", true, 90);
addGroup([[3, 4]], "spike", true, 90);
addGroup([[3, 4]], "halfWall", true, 90);
addGroup([[5, 4]], "spike", true, 90);
addGroup([[5, 4]], "halfWall", true, 90);
addGroup([[12, 4]], "spike", true, 90);
addGroup([[12, 4]], "halfWall", true, 90);
addGroup([[14, 4]], "spike", true, 90);
addGroup([[14, 4]], "halfWall", true, 90);
addGroup([[1, 11]], "spike", true, 270);
addGroup([[1, 11]], "halfWall", true, 270);
addGroup([[2, 11]], "spike", true, 270);
addGroup([[2, 11]], "halfWall", true, 270);
addGroup([[3, 11]], "spike", true, 270);
addGroup([[3, 11]], "halfWall", true, 270);
addGroup([[1, 17]], "spike", true, 270);
addGroup([[1, 17]], "halfWall", true, 270);
addGroup([[2, 17]], "spike", true, 270);
addGroup([[2, 17]], "halfWall", true, 270);
addGroup([[4, 17]], "spike", true, 270);
addGroup([[4, 17]], "halfWall", true, 270);
addGroup([[5, 17]], "spike", true, 270);
addGroup([[5, 17]], "halfWall", true, 270);
addGroup([[7, 17]], "spike", true, 270);
addGroup([[7, 17]], "halfWall", true, 270);
addGroup([[8, 17]], "spike", true, 270);
addGroup([[8, 17]], "halfWall", true, 270);
addGroup([[9, 17]], "spike", true, 270);
addGroup([[9, 17]], "halfWall", true, 270);
addGroup([[12, 17]], "spike", true, 270);
addGroup([[12, 17]], "halfWall", true, 270);
addGroup([[13, 17]], "spike", true, 270);
addGroup([[13, 17]], "halfWall", true, 270);
addGroup([[16, 17]], "spike", true, 270);
addGroup([[16, 17]], "halfWall", true, 270);
addGroup([[7, 8], [6, 8], [8, 8], [7, 7], [7, 9]], "piston", false);
addGroup([[5, 3]], "key", false);
addGroup([[13, 0]], "door", true, 90);
addGroup([[12, 3]], "key", false);
addGroup([[4, 0]], "door", true, 90);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[13, -1]], "exit", true, "L1");
addGroup([[-1, 13]], "exit", true, "T2");
setManPosition([[5, 1], [13, 1], [1, 13]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup(get2DArray([0, 0], [0, 8]));
addGroup(get2DArray([8, 0], [8, 3]));
addGroup(get2DArray([8, 5], [8, 8]));
addGroup(get2DArray([1, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup(get2DArray([1, 8], [3, 8]));
addGroup(get2DArray([5, 8], [7, 8]));
addGroup([[1, 2]]);
addGroup([[1, 5], [2, 5], [3, 5], [4, 5], [1, 6]], "piston", false);
addGroup([[3, 1], [3, 2], [3, 3], [3, 4], [2, 1]], "piston", false);
addGroup([[7, 3], [4, 3], [5, 3], [6, 3], [7, 2]], "piston", false);
addGroup([[5, 7], [5, 4], [5, 5], [5, 6], [6, 7]], "piston", false);
addGroup([[2, 2]], "key", false);
addGroup([[8, 4]], "door", true);
addGroup([[4, 4]], "key", false);
addGroup([[4, 0]], "door", true, 90);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[4, 9]], "exit", true, "R1");
addGroup([[9, 4]], "exit", true, "B2");
setManPosition([[4, 1], [4, 7], [7, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 18);
addGroup([[7, 9], [11, 17], [12, 17]]);
addGroup(get2DArray([0, 9], [0, 12]));
addGroup(get2DArray([0, 14], [0, 17]));
addGroup(get2DArray([9, 0], [9, 8]));
addGroup(get2DArray([17, 0], [17, 12]));
addGroup(get2DArray([17, 14], [17, 17]));
addGroup(get2DArray([1, 9], [3, 9]));
addGroup(get2DArray([9, 0], [16, 0]));
addGroup(get2DArray([3, 17], [4, 17]));
addGroup(get2DArray([14, 17], [16, 17]));
addGroup([[1, 14], [3, 11], [11, 4], [16, 11], [16, 15], [2, 14], [5, 13], [13, 13], [3, 15], [7, 15], [14, 15], [14, 16], [9, 13], [11, 10], [12, 7]]);
addGroup(get2DArray([10, 11], [14, 11]));
addGroup(get2DArray([13, 2], [13, 7]));
addGroup(get2DArray([11, 6], [11, 8]));
addGroup([[7, 10]], "spike", true, 0);
addGroup([[7, 10]], "halfWall", true, 0);
addGroup([[7, 11]], "spike", true, 0);
addGroup([[7, 11]], "halfWall", true, 0);
addGroup([[7, 12]], "spike", true, 0);
addGroup([[7, 12]], "halfWall", true, 0);
addGroup([[11, 9]], "spike", true, 0);
addGroup([[11, 9]], "halfWall", true, 0);
addGroup([[11, 12]], "spike", true, 0);
addGroup([[11, 12]], "halfWall", true, 0);
addGroup([[11, 13]], "spike", true, 0);
addGroup([[11, 13]], "halfWall", true, 0);
addGroup([[11, 14]], "spike", true, 0);
addGroup([[11, 14]], "halfWall", true, 0);
addGroup([[11, 15]], "spike", true, 0);
addGroup([[11, 15]], "halfWall", true, 0);
addGroup([[11, 16]], "spike", true, 0);
addGroup([[11, 16]], "halfWall", true, 0);
addGroup([[4, 9]], "spike", true, 90);
addGroup([[4, 9]], "halfWall", true, 90);
addGroup([[5, 9]], "spike", true, 90);
addGroup([[5, 9]], "halfWall", true, 90);
addGroup([[6, 9]], "spike", true, 90);
addGroup([[6, 9]], "halfWall", true, 90);
addGroup([[8, 9]], "spike", true, 90);
addGroup([[8, 9]], "halfWall", true, 90);
addGroup([[9, 9]], "spike", true, 90);
addGroup([[9, 9]], "halfWall", true, 90);
addGroup([[3, 10]], "spike", true, 180);
addGroup([[3, 10]], "halfWall", true, 180);
addGroup([[3, 14]], "spike", true, 180);
addGroup([[3, 14]], "halfWall", true, 180);
addGroup([[1, 17]], "spike", true, 270);
addGroup([[1, 17]], "halfWall", true, 270);
addGroup([[2, 17]], "spike", true, 270);
addGroup([[2, 17]], "halfWall", true, 270);
addGroup([[5, 17]], "spike", true, 270);
addGroup([[5, 17]], "halfWall", true, 270);
addGroup([[6, 17]], "spike", true, 270);
addGroup([[6, 17]], "halfWall", true, 270);
addGroup([[7, 17]], "spike", true, 270);
addGroup([[7, 17]], "halfWall", true, 270);
addGroup([[8, 17]], "spike", true, 270);
addGroup([[8, 17]], "halfWall", true, 270);
addGroup([[9, 17]], "spike", true, 270);
addGroup([[9, 17]], "halfWall", true, 270);
addGroup([[10, 17]], "spike", true, 270);
addGroup([[10, 17]], "halfWall", true, 270);
addGroup([[10, 1], [11, 1], [12, 1]], "piston", false);
addGroup([[10, 2], [11, 2], [12, 2]], "piston", false);
addGroup([[10, 3], [11, 3], [12, 3]], "piston", false);
addGroup([[13, 14], [15, 14], [15, 12], [14, 14], [15, 13]], "piston", false);
addGroup([[2, 15]], "key", false);
addGroup([[10, 8]], "door", true, 90);
addGroup([[12, 6]], "key", false);
addGroup([[13, 1]], "door", true);
addGroup([[-1, 13]], "exit", true, "T0");
addGroup([[18, 13]], "exit", true, "B1");
addGroup([[13, 18]], "exit", true, "R2");
setManPosition([[1, 13], [16, 13], [13, 16]]);
addGroup([[14, 14]], "man", false);
createRoom(9, 9);
addGroup([[0, 0], [0, 2], [0, 3], [0, 5], [8, 8], [2, 0], [3, 0], [5, 0], [6, 0]]);
addGroup(get2DArray([8, 0], [8, 6]));
addGroup(get2DArray([0, 8], [2, 8]));
addGroup(get2DArray([4, 8], [6, 8]));
addGroup([[2, 7]]);
addGroup([[8, 7]], "spike", true, 0);
addGroup([[8, 7]], "halfWall", true, 0);
addGroup([[1, 0]], "spike", true, 90);
addGroup([[1, 0]], "halfWall", true, 90);
addGroup([[7, 0]], "spike", true, 90);
addGroup([[7, 0]], "halfWall", true, 90);
addGroup([[0, 1]], "spike", true, 180);
addGroup([[0, 1]], "halfWall", true, 180);
addGroup([[0, 6]], "spike", true, 180);
addGroup([[0, 6]], "halfWall", true, 180);
addGroup([[0, 7]], "spike", true, 180);
addGroup([[0, 7]], "halfWall", true, 180);
addGroup([[3, 8]], "spike", true, 270);
addGroup([[3, 8]], "halfWall", true, 270);
addGroup([[7, 8]], "spike", true, 270);
addGroup([[7, 8]], "halfWall", true, 270);
addGroup([[2, 2], [1, 2], [3, 2], [2, 1], [2, 3]], "piston", false);
addGroup([[3, 6], [3, 5], [3, 7], [4, 6], [2, 6]], "piston", false);
addGroup([[6, 4], [6, 3], [6, 5], [5, 4], [7, 4]], "piston", false);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[-1, 4]], "exit", true, "T1");
setManPosition([[4, 1], [1, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 18);
addGroup([[17, 6]]);
addGroup(get2DArray([0, 9], [0, 12]));
addGroup(get2DArray([0, 14], [0, 17]));
addGroup(get2DArray([9, 0], [9, 9]));
addGroup(get2DArray([17, 0], [17, 2]));
addGroup(get2DArray([17, 10], [17, 12]));
addGroup(get2DArray([17, 14], [17, 17]));
addGroup(get2DArray([1, 9], [8, 9]));
addGroup(get2DArray([9, 0], [12, 0]));
addGroup(get2DArray([14, 0], [16, 0]));
addGroup(get2DArray([1, 17], [16, 17]));
addGroup([[13, 12], [1, 14], [2, 14], [3, 10], [3, 11], [2, 13], [3, 13], [7, 12], [9, 12], [9, 13], [11, 12], [10, 7], [10, 8], [12, 3], [12, 6], [12, 7]]);
addGroup([[16, 2], [14, 4], [15, 4], [15, 6], [16, 6], [14, 8], [11, 1], [14, 1], [14, 12], [15, 10], [16, 10], [16, 12], [16, 15]]);
addGroup(get2DArray([11, 3], [14, 3]));
addGroup([[14, 14]], "spike", true, 0);
addGroup([[14, 14]], "halfWall", true, 0);
addGroup([[14, 15]], "spike", true, 0);
addGroup([[14, 15]], "halfWall", true, 0);
addGroup([[14, 16]], "spike", true, 0);
addGroup([[14, 16]], "halfWall", true, 0);
addGroup([[17, 3]], "spike", true, 0);
addGroup([[17, 3]], "halfWall", true, 0);
addGroup([[17, 4]], "spike", true, 0);
addGroup([[17, 4]], "halfWall", true, 0);
addGroup([[17, 5]], "spike", true, 0);
addGroup([[17, 5]], "halfWall", true, 0);
addGroup([[17, 7]], "spike", true, 0);
addGroup([[17, 7]], "halfWall", true, 0);
addGroup([[17, 8]], "spike", true, 0);
addGroup([[17, 8]], "halfWall", true, 0);
addGroup([[17, 9]], "spike", true, 0);
addGroup([[17, 9]], "halfWall", true, 0);
addGroup([[5, 12]], "spike", true, 90);
addGroup([[5, 12]], "halfWall", true, 90);
addGroup([[7, 13]], "spike", true, 90);
addGroup([[7, 13]], "halfWall", true, 90);
addGroup([[9, 14]], "spike", true, 90);
addGroup([[9, 14]], "halfWall", true, 90);
addGroup([[11, 13]], "spike", true, 90);
addGroup([[11, 13]], "halfWall", true, 90);
addGroup([[4, 15]], "spike", true, 180);
addGroup([[4, 15]], "halfWall", true, 180);
addGroup([[4, 16]], "spike", true, 180);
addGroup([[4, 16]], "halfWall", true, 180);
addGroup([[11, 6], [11, 4], [13, 4], [13, 5], [13, 6], [13, 7], [13, 9], [12, 9], [11, 5], [12, 4], [13, 8]], "piston", false);
addGroup([[11, 8], [12, 8], [11, 9], [10, 9]], "piston", false);
addGroup([[4, 10], [6, 10], [8, 10], [10, 10], [12, 10], [13, 10], [4, 11], [6, 11], [6, 12], [8, 11], [8, 12], [8, 13], [10, 11], [10, 12], [10, 13], [12, 11], [12, 12], [5, 10], [7, 10], [9, 10], [11, 10]], "piston", false);
addGroup([[13, 11]], "key", false);
addGroup([[11, 2]], "door", true);
addGroup([[10, 1]], "key", false);
addGroup([[11, 7]], "door", true, 90);
addGroup([[13, -1]], "exit", true, "L0");
addGroup([[-1, 13]], "exit", true, "T1");
addGroup([[18, 13]], "exit", true, "B2");
setManPosition([[13, 1], [1, 12], [16, 13]]);
addGroup([[14, 14]], "man", false);
createRoom(9, 9);
addGroup(get2DArray([0, 0], [0, 3]));
addGroup(get2DArray([0, 5], [0, 8]));
addGroup(get2DArray([8, 0], [8, 8]));
addGroup(get2DArray([1, 0], [7, 0]));
addGroup(get2DArray([1, 8], [3, 8]));
addGroup(get2DArray([5, 8], [7, 8]));
addGroup([[2, 2], [4, 5], [6, 3], [6, 4], [6, 6], [6, 7]]);
addGroup(get2DArray([2, 4], [4, 4]));
addGroup(get2DArray([2, 5], [2, 7]));
addGroup(get2DArray([4, 2], [6, 2]));
addGroup([[1, 3]], "key", false);
addGroup([[1, 2]], "door", true, 90);
addGroup([[1, 1]], "key", false);
addGroup([[2, 1]], "door", true);
addGroup([[3, 1]], "key", false);
addGroup([[5, 1]], "door", true);
addGroup([[6, 1]], "key", false);
addGroup([[1, 6]], "door", true, 90);
addGroup([[7, 2]], "key", false);
addGroup([[3, 2]], "door", true, 90);
addGroup([[1, 7]], "key", false);
addGroup([[7, 3]], "door", true, 90);
addGroup([[7, 4]], "key", false);
addGroup([[7, 6]], "door", true, 90);
addGroup([[7, 7]], "key", false);
addGroup([[6, 5]], "door", true);
addGroup([[3, 5]], "key", false);
addGroup([[5, 4]], "door", true, 90);
addGroup([[5, 3]], "key", false);
addGroup([[4, 3]], "door", true);
addGroup([[3, 3]], "key", false);
addGroup([[2, 3]], "door", true);
addGroup([[-1, 4]], "exit", true, "T0");
addGroup([[4, 9]], "exit", true, "R1");
setManPosition([[1, 4], [4, 7]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 18);
addGroup([[17, 5], [0, 7], [0, 8], [0, 11], [0, 12], [1, 0], [9, 0], [11, 0], [12, 0]]);
addGroup(get2DArray([0, 0], [0, 2]));
addGroup(get2DArray([0, 14], [0, 17]));
addGroup(get2DArray([17, 0], [17, 2]));
addGroup(get2DArray([17, 9], [17, 17]));
addGroup(get2DArray([14, 0], [16, 0]));
addGroup(get2DArray([1, 17], [16, 17]));
addGroup([[8, 8]]);
addGroup([[11, 1], [2, 8], [15, 1], [11, 2], [15, 7], [16, 9], [14, 12], [13, 13], [12, 14], [11, 16], [14, 11], [16, 11], [2, 2], [2, 4]]);
addGroup([[5, 0], [5, 14], [5, 16], [14, 5], [14, 7], [14, 9], [3, 2], [1, 11], [2, 11], [1, 15], [7, 15], [16, 1], [16, 5], [5, 2], [9, 2]]);
addGroup(get2DArray([11, 3], [15, 3]));
addGroup(get2DArray([10, 14], [10, 16]));
addGroup(get2DArray([3, 13], [3, 15]));
addGroup([[2, 6]], "spike", true, 0);
addGroup([[2, 6]], "halfWall", true, 0);
addGroup([[2, 7]], "spike", true, 0);
addGroup([[2, 7]], "halfWall", true, 0);
addGroup([[17, 3]], "spike", true, 0);
addGroup([[17, 3]], "halfWall", true, 0);
addGroup([[17, 4]], "spike", true, 0);
addGroup([[17, 4]], "halfWall", true, 0);
addGroup([[17, 6]], "spike", true, 0);
addGroup([[17, 6]], "halfWall", true, 0);
addGroup([[17, 7]], "spike", true, 0);
addGroup([[17, 7]], "halfWall", true, 0);
addGroup([[17, 8]], "spike", true, 0);
addGroup([[17, 8]], "halfWall", true, 0);
addGroup([[14, 4]], "spike", true, 0);
addGroup([[14, 4]], "halfWall", true, 0);
addGroup([[14, 6]], "spike", true, 180);
addGroup([[14, 6]], "halfWall", true, 180);
addGroup([[14, 8]], "spike", true, 180);
addGroup([[14, 8]], "halfWall", true, 180);
addGroup([[2, 3]], "spike", true, 180);
addGroup([[2, 3]], "halfWall", true, 180);
addGroup([[0, 3]], "spike", true, 180);
addGroup([[0, 3]], "halfWall", true, 180);
addGroup([[0, 4]], "spike", true, 180);
addGroup([[0, 4]], "halfWall", true, 180);
addGroup([[0, 5]], "spike", true, 180);
addGroup([[0, 5]], "halfWall", true, 180);
addGroup([[0, 6]], "spike", true, 180);
addGroup([[0, 6]], "halfWall", true, 180);
addGroup([[0, 9]], "spike", true, 180);
addGroup([[0, 9]], "halfWall", true, 180);
addGroup([[0, 10]], "spike", true, 180);
addGroup([[0, 10]], "halfWall", true, 180);
addGroup([[2, 0]], "spike", true, 90);
addGroup([[2, 0]], "halfWall", true, 90);
addGroup([[3, 0]], "spike", true, 90);
addGroup([[3, 0]], "halfWall", true, 90);
addGroup([[4, 0]], "spike", true, 90);
addGroup([[4, 0]], "halfWall", true, 90);
addGroup([[6, 0]], "spike", true, 90);
addGroup([[6, 0]], "halfWall", true, 90);
addGroup([[7, 0]], "spike", true, 90);
addGroup([[7, 0]], "halfWall", true, 90);
addGroup([[8, 0]], "spike", true, 90);
addGroup([[8, 0]], "halfWall", true, 90);
addGroup([[10, 0]], "spike", true, 90);
addGroup([[10, 0]], "halfWall", true, 90);
addGroup([[6, 2]], "spike", true, 90);
addGroup([[6, 2]], "halfWall", true, 90);
addGroup([[7, 2]], "spike", true, 90);
addGroup([[7, 2]], "halfWall", true, 90);
addGroup([[8, 2]], "spike", true, 90);
addGroup([[8, 2]], "halfWall", true, 90);
addGroup([[9, 3]], "spike", true, 90);
addGroup([[9, 3]], "halfWall", true, 90);
addGroup([[10, 3]], "spike", true, 90);
addGroup([[10, 3]], "halfWall", true, 90);
addGroup([[3, 4]], "spike", true, 180);
addGroup([[3, 4]], "halfWall", true, 180);
addGroup([[3, 5]], "spike", true, 180);
addGroup([[3, 5]], "halfWall", true, 180);
addGroup([[3, 6]], "spike", true, 180);
addGroup([[3, 6]], "halfWall", true, 180);
addGroup([[3, 8]], "spike", true, 180);
addGroup([[3, 8]], "halfWall", true, 180);
addGroup([[3, 9]], "spike", true, 180);
addGroup([[3, 9]], "halfWall", true, 180);
addGroup([[3, 10]], "spike", true, 180);
addGroup([[3, 10]], "halfWall", true, 180);
addGroup([[3, 11]], "spike", true, 180);
addGroup([[3, 11]], "halfWall", true, 180);
addGroup([[3, 12]], "spike", true, 180);
addGroup([[3, 12]], "halfWall", true, 180);
addGroup([[11, 4]], "spike", true, 0);
addGroup([[11, 4]], "halfWall", true, 0);
addGroup([[11, 5]], "spike", true, 90);
addGroup([[11, 5]], "halfWall", true, 90);
addGroup([[12, 5]], "spike", true, 90);
addGroup([[12, 5]], "halfWall", true, 90);
addGroup([[15, 11]], "spike", true, 270);
addGroup([[15, 11]], "halfWall", true, 270);
addGroup([[4, 13]], "spike", true, 270);
addGroup([[4, 13]], "halfWall", true, 270);
addGroup([[5, 13]], "spike", true, 270);
addGroup([[5, 13]], "halfWall", true, 270);
addGroup([[6, 14]], "spike", true, 270);
addGroup([[6, 14]], "halfWall", true, 270);
addGroup([[7, 14]], "spike", true, 270);
addGroup([[7, 14]], "halfWall", true, 270);
addGroup([[8, 14]], "spike", true, 270);
addGroup([[8, 14]], "halfWall", true, 270);
addGroup([[12, 13]], "spike", true, 270);
addGroup([[12, 13]], "halfWall", true, 270);
addGroup([[13, 7]], "spike", true, 0);
addGroup([[13, 7]], "halfWall", true, 0);
addGroup([[13, 12]], "spike", true, 0);
addGroup([[13, 12]], "halfWall", true, 0);
addGroup([[7, 7], [9, 7], [9, 6], [10, 8], [12, 8], [12, 10], [13, 10], [12, 12], [8, 9], [7, 8], [12, 9], [12, 11], [9, 10], [10, 12], [11, 12], [10, 13], [8, 10], [9, 11], [8, 7], [11, 8], [10, 7], [10, 10], [7, 9], [9, 12]], "piston", false);
addGroup([[14, 15], [14, 16], [15, 15], [15, 16], [16, 15], [16, 16]], "piston", false);
addGroup([[12, 4]], "key", false);
addGroup([[4, 2]], "door", true, 90);
addGroup([[2, 10]], "key", false);
addGroup([[11, 14]], "door", true, 90);
addGroup([[16, 12]], "book", false, 6);
addGroup([[13, -1]], "exit", true, "L0");
addGroup([[-1, 13]], "exit", true, "T1");
setManPosition([[13, 1], [1, 13]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 18);
addGroup(get2DArray([0, 0], [0, 15]));
addGroup(get2DArray([17, 0], [17, 17]));
addGroup(get2DArray([1, 0], [12, 0]));
addGroup(get2DArray([14, 0], [16, 0]));
addGroup(get2DArray([0, 17], [3, 17]));
addGroup(get2DArray([5, 17], [16, 17]));
addGroup([[1, 4], [1, 5], [1, 9]]);
addGroup([[2, 2], [2, 4], [2, 7], [2, 11], [2, 13], [2, 15]]);
addGroup([[3, 2], [3, 6], [3, 7], [3, 8], [3, 10], [3, 11], [3, 15], [3, 16]]);
addGroup([[4, 2], [4, 3], [4, 4], [4, 5], [4, 6], [4, 8], [4, 11], [4, 12], [4, 13]]);
addGroup([[5, 2], [5, 4], [5, 8], [5, 9], [5, 11], [5, 13], [5, 14], [5, 15], [5, 16]]);
addGroup([[6, 4], [6, 6], [6, 11], [6, 15]]);
addGroup([[7, 1], [7, 2], [7, 4], [7, 6], [7, 7], [7, 8], [7, 9], [7, 10], [7, 11], [7, 13], [7, 15]]);
addGroup([[8, 2], [8, 4], [8, 8], [8, 13]]);
addGroup([[9, 4], [9, 5], [9, 6], [9, 8], [9, 10], [9, 11], [9, 12], [9, 13], [9, 14], [9, 16]]);
addGroup([[10, 2], [10, 4], [10, 6], [10, 10], [10, 12]]);
addGroup([[11, 6], [11, 8], [11, 10], [11, 14], [11, 15]]);
addGroup([[12, 1], [12, 2], [12, 3], [12, 4], [12, 8], [12, 12], [12, 13], [12, 14]]);
addGroup([[13, 4], [13, 5], [13, 6], [13, 7], [13, 8], [13, 10], [13, 11], [13, 12], [13, 16]]);
addGroup([[14, 1], [14, 2], [14, 4], [14, 8], [14, 9], [14, 10], [14, 12], [14, 14]]);
addGroup([[15, 4], [15, 6], [15, 8], [15, 12], [15, 13], [15, 14], [15, 15]]);
addGroup([[16, 2], [16, 6], [16, 10]]);
addGroup([[0, 16]], "spike", true, 180);
addGroup([[0, 16]], "halfWall", true, 180);
addGroup([[1, 13]], "spike", true, 90);
addGroup([[1, 13]], "halfWall", true, 90);
addGroup([[7, 3]], "spike", true, 0);
addGroup([[7, 3]], "halfWall", true, 0);
addGroup([[10, 3]], "spike", true, 0);
addGroup([[10, 3]], "halfWall", true, 0);
addGroup([[11, 9]], "spike", true, 180);
addGroup([[11, 9]], "halfWall", true, 180);
addGroup([[13, 9]], "key", false);
addGroup([[13, 2]], "door", true, 90);
addGroup([[8, 3]], "key", false);
addGroup([[1, 2]], "door", true, 90);
addGroup([[5, 3]], "key", false);
addGroup([[13, 0]], "door", true, 90);
addGroup([[2, 16]], "wind", false);
addGroup([[1, 16]], "book", false, 7);
addGroup([[13, -1]], "exit", true, "L0");
addGroup([[4, 18]], "exit", true, "R1");
setManPosition([[13, 1], [4, 16]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup(get2DArray([0, 0], [0, 8]));
addGroup(get2DArray([8, 0], [8, 8]));
addGroup(get2DArray([1, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup(get2DArray([1, 8], [3, 8]));
addGroup(get2DArray([5, 8], [7, 8]));
addGroup([[7, 2], [1, 7], [7, 6], [2, 2]]);
addGroup(get2DArray([5, 4], [7, 4]));
addGroup([[1, 2]], "spike", true, 90);
addGroup([[1, 2]], "halfWall", true, 90);
addGroup([[6, 3], [5, 3], [4, 3], [3, 3]], "piston", false);
addGroup([[3, 4], [2, 4], [1, 4]], "piston", false);
addGroup([[4, 5], [3, 5], [2, 5], [1, 5]], "piston", false);
addGroup([[2, 6], [1, 6]], "piston", false);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[4, 9]], "exit", true, "R1");
setManPosition([[4, 1], [4, 7]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 18);
addGroup(get2DArray([0, 0], [0, 3]));
addGroup(get2DArray([0, 5], [0, 17]));
addGroup(get2DArray([17, 0], [17, 3]));
addGroup(get2DArray([17, 5], [17, 17]));
addGroup(get2DArray([1, 0], [16, 0]));
addGroup(get2DArray([1, 17], [3, 17]));
addGroup(get2DArray([5, 17], [16, 17]));
addGroup([[1, 12], [2, 15], [6, 16], [5, 12], [3, 13], [12, 16], [11, 1], [11, 2], [12, 2], [12, 4], [13, 4], [15, 2]]);
addGroup([[1, 2], [1, 6], [3, 6], [3, 7], [5, 3], [5, 5], [12, 12], [14, 10], [13, 14], [14, 16], [16, 13]]);
addGroup(get2DArray([6, 1], [6, 3]));
addGroup(get2DArray([6, 5], [6, 8]));
addGroup(get2DArray([1, 8], [5, 8]));
addGroup(get2DArray([1, 11], [3, 11]));
addGroup(get2DArray([5, 11], [8, 11]));
addGroup(get2DArray([8, 12], [8, 16]));
addGroup(get2DArray([11, 9], [11, 12]));
addGroup(get2DArray([11, 14], [11, 16]));
addGroup(get2DArray([12, 9], [16, 9]));
addGroup(get2DArray([9, 1], [9, 6]));
addGroup(get2DArray([10, 6], [12, 6]));
addGroup(get2DArray([14, 6], [16, 6]));
addGroup(get2DArray([14, 2], [14, 5]));
addGroup(get2DArray([3, 1], [3, 4]));
addGroup(get2DArray([2, 14], [6, 14]));
addGroup(get2DArray([14, 12], [14, 14]));
addGroup([[7, 3], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8], [7, 4]], "piston", false);
addGroup([[14, 7], [9, 8], [10, 8], [11, 8], [13, 8], [13, 7], [14, 8], [12, 8]], "piston", false);
addGroup([[3, 9], [4, 9], [5, 9], [6, 9], [7, 9], [8, 9], [3, 10], [4, 10]], "piston", false);
addGroup([[9, 9], [9, 10], [9, 11], [9, 14], [10, 14], [9, 13], [10, 13], [9, 12]], "piston", false);
addGroup([[15, 11], [15, 12], [15, 13], [15, 14], [15, 15]], "piston", false);
addGroup([[16, 12]], "key", false);
addGroup([[0, 4]], "door", true);
addGroup([[16, 14]], "key", false);
addGroup([[5, 4]], "door", true);
addGroup([[5, 2]], "key", false);
addGroup([[17, 4]], "door", true);
addGroup([[-1, 4]], "exit", true, "T0");
addGroup([[4, 18]], "exit", true, "R1");
addGroup([[18, 4]], "exit", true, "B2");
setManPosition([[1, 4], [4, 16], [16, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup(get2DArray([0, 2], [0, 8]));
addGroup(get2DArray([8, 0], [8, 3]));
addGroup(get2DArray([8, 5], [8, 8]));
addGroup(get2DArray([0, 0], [7, 0]));
addGroup(get2DArray([1, 8], [7, 8]));
addGroup([[2, 2], [3, 2], [3, 3], [4, 5], [7, 6]]);
addGroup(get2DArray([2, 6], [4, 6]));
addGroup(get2DArray([5, 2], [7, 2]));
addGroup(get2DArray([5, 3], [5, 5]));
addGroup([[0, 1]], "spike", true, 180);
addGroup([[0, 1]], "halfWall", true, 180);
addGroup([[3, 1]], "spike", true, 180);
addGroup([[3, 1]], "halfWall", true, 180);
addGroup([[2, 4], [2, 5], [3, 4], [3, 5]], "piston", false);
addGroup([[5, 1]], "key", false);
addGroup([[1, 2]], "door", true, 90);
addGroup([[2, 1]], "book", false, 12);
addGroup([[9, 4]], "exit", true, "B0");
setManPosition([[7, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 9);
addGroup(get2DArray([0, 0], [0, 12]));
addGroup(get2DArray([0, 14], [0, 17]));
addGroup(get2DArray([8, 0], [8, 17]));
addGroup(get2DArray([1, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup(get2DArray([1, 17], [3, 17]));
addGroup(get2DArray([5, 17], [7, 17]));
addGroup([[7, 7], [1, 7], [2, 1], [4, 2], [6, 1], [1, 9], [2, 9], [4, 12], [4, 13], [7, 11]]);
addGroup([[5, 16], [3, 13], [3, 14], [2, 14], [2, 16]]);
addGroup(get2DArray([2, 3], [7, 3]));
addGroup(get2DArray([1, 5], [2, 5]));
addGroup(get2DArray([4, 5], [7, 5]));
addGroup(get2DArray([3, 7], [5, 7]));
addGroup(get2DArray([5, 9], [7, 9]));
addGroup(get2DArray([1, 11], [5, 11]));
addGroup(get2DArray([6, 13], [6, 16]));
addGroup([[5, 4], [6, 4], [7, 4]], "piston", false);
addGroup([[2, 6], [3, 6], [4, 6], [5, 6]], "piston", false);
addGroup([[4, 8], [5, 8], [6, 8], [7, 8]], "piston", false);
addGroup([[5, 10], [6, 10], [7, 10]], "piston", false);
addGroup([[6, 6], [6, 7]], "piston", false);
addGroup([[3, 12]], "key", false);
addGroup([[4, 17]], "door", true, 90);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[-1, 13]], "exit", true, "T1");
addGroup([[4, 18]], "exit", true, "R2");
setManPosition([[4, 1], [1, 14], [4, 16]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 18);
addGroup([[14, 8]]);
addGroup(get2DArray([0, 0], [0, 8]));
addGroup(get2DArray([17, 0], [17, 3]));
addGroup(get2DArray([17, 5], [17, 8]));
addGroup(get2DArray([1, 0], [12, 0]));
addGroup(get2DArray([14, 0], [16, 0]));
addGroup(get2DArray([1, 8], [12, 8]));
addGroup([[12, 1], [12, 3], [12, 7], [7, 3], [9, 3], [3, 3], [3, 5], [4, 5], [14, 3], [14, 4], [15, 1], [15, 3], [14, 6]]);
addGroup(get2DArray([12, 5], [16, 5]));
addGroup(get2DArray([7, 5], [9, 5]));
addGroup(get2DArray([5, 3], [5, 5]));
addGroup([[7, 4]], "spike", true, 180);
addGroup([[7, 4]], "halfWall", true, 180);
addGroup([[9, 4]], "spike", true, 0);
addGroup([[9, 4]], "halfWall", true, 0);
addGroup([[17, 4]], "spike", true, 0);
addGroup([[17, 4]], "halfWall", true, 0);
addGroup([[15, 8]], "spike", true, 270);
addGroup([[15, 8]], "halfWall", true, 270);
addGroup([[16, 8]], "spike", true, 270);
addGroup([[16, 8]], "halfWall", true, 270);
addGroup([[1, 2], [2, 2], [1, 3], [1, 4], [1, 5], [1, 7], [1, 6], [2, 7], [3, 7], [4, 7], [6, 7], [5, 7], [7, 7], [8, 7], [10, 7], [9, 7], [10, 6], [10, 2], [10, 4], [10, 3], [10, 5], [11, 4], [9, 2], [8, 2], [7, 2], [6, 2], [5, 2], [4, 2], [6, 6]], "piston", false);
addGroup([[16, 6]], "key", false);
addGroup([[12, 2]], "door", true);
addGroup([[15, 4]], "key", false);
addGroup([[8, 3]], "door", true, 90);
addGroup([[8, 4]], "key", false);
addGroup([[13, 8]], "door", true, 90);
addGroup([[13, -1]], "exit", true, "L0");
addGroup([[13, 9]], "exit", true, "R1");
setManPosition([[13, 1], [14, 7]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 9);
addGroup(get2DArray([0, 0], [0, 12]));
addGroup(get2DArray([0, 14], [0, 17]));
addGroup(get2DArray([8, 0], [8, 3]));
addGroup(get2DArray([8, 5], [8, 17]));
addGroup(get2DArray([1, 0], [7, 0]));
addGroup(get2DArray([1, 17], [7, 17]));
addGroup([[3, 5], [2, 15], [2, 16], [3, 15], [5, 15], [6, 15], [6, 16], [5, 13], [6, 13], [6, 12], [7, 12]]);
addGroup([[2, 7], [2, 9], [2, 10], [1, 9], [1, 10], [2, 8]], "piston", false);
addGroup([[3, 7], [3, 8], [3, 9], [3, 10], [4, 7]], "piston", false);
addGroup([[1, 5], [1, 6], [2, 6], [3, 6], [2, 5]], "piston", false);
addGroup([[1, 11], [1, 12], [2, 11], [4, 11], [4, 10], [4, 8], [5, 8], [7, 8], [7, 7], [3, 11], [4, 9], [6, 8]], "piston", false);
addGroup([[7, 16]], "key", false);
addGroup([[8, 4]], "door", true);
addGroup([[7, 1]], "key", true);
addGroup([[4, 15]], "door", true, 90);
addGroup([[5, 16]], "book", false, 13);
addGroup([[9, 4]], "exit", true, "B0");
addGroup([[-1, 13]], "exit", true, "T1");
setManPosition([[7, 4], [1, 13]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup(get2DArray([0, 0], [0, 3]));
addGroup(get2DArray([0, 5], [0, 8]));
addGroup(get2DArray([8, 0], [8, 3]));
addGroup(get2DArray([8, 5], [8, 8]));
addGroup(get2DArray([1, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup(get2DArray([1, 8], [6, 8]));
addGroup([[5, 2]], "spike", true, 90);
addGroup([[5, 2]], "halfWall", true, 90);
addGroup([[5, 3]], "spike", true, 270);
addGroup([[5, 3]], "halfWall", true, 270);
addGroup([[7, 8]], "spike", true, 270);
addGroup([[7, 8]], "halfWall", true, 270);
addGroup([[2, 1], [2, 2], [5, 1], [5, 4], [3, 4], [3, 5], [7, 5]]);
addGroup(get2DArray([6, 4], [6, 6]));
addGroup(get2DArray([1, 6], [3, 6]));
addGroup([[7, 6]], "key", false);
addGroup([[1, 2]], "door", true, 90);
addGroup([[1, 1]], "key", false);
addGroup([[3, 7]], "door", true);
addGroup([[1, 7]], "key", false);
addGroup([[4, 0]], "door", true, 90);
addGroup([[8, 4]], "specialDoor", true);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[-1, 4]], "exit", true, "T1");
addGroup([[9, 4]], "exit", true, "B2");
setManPosition([[4, 1], [1, 4], [7, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup(get2DArray([0, 0], [0, 8]));
addGroup(get2DArray([8, 0], [8, 8]));
addGroup(get2DArray([1, 0], [7, 0]));
addGroup(get2DArray([1, 8], [3, 8]));
addGroup(get2DArray([5, 8], [7, 8]));
addGroup([[5, 7], [3, 1]]);
addGroup([[2, 2], [2, 3], [2, 4], [2, 6], [4, 6], [4, 4], [4, 2], [6, 2], [6, 4], [6, 5], [6, 6], [2, 5], [3, 6], [4, 5], [4, 3], [5, 2], [6, 3]], "piston", false);
addGroup([[7, 1]], "book", false, 9);
addGroup([[4, 9]], "exit", true, "R0");
setManPosition([[4, 7]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup([[0, 0], [0, 2], [0, 3], [0, 5], [0, 8], [8, 8], [8, 0]]);
addGroup(get2DArray([8, 3], [8, 5]));
addGroup(get2DArray([3, 0], [5, 0]));
addGroup(get2DArray([3, 8], [5, 8]));
addGroup([[4, 4]]);
addGroup([[0, 1]], "spike", true, 180);
addGroup([[0, 1]], "halfWall", true, 180);
addGroup([[0, 6]], "spike", true, 180);
addGroup([[0, 6]], "halfWall", true, 180);
addGroup([[0, 7]], "spike", true, 180);
addGroup([[0, 7]], "halfWall", true, 180);
addGroup([[1, 8]], "spike", true, 270);
addGroup([[1, 8]], "halfWall", true, 270);
addGroup([[2, 8]], "spike", true, 270);
addGroup([[2, 8]], "halfWall", true, 270);
addGroup([[6, 8]], "spike", true, 270);
addGroup([[6, 8]], "halfWall", true, 270);
addGroup([[7, 8]], "spike", true, 270);
addGroup([[7, 8]], "halfWall", true, 270);
addGroup([[8, 1]], "spike", true, 0);
addGroup([[8, 1]], "halfWall", true, 0);
addGroup([[8, 2]], "spike", true, 0);
addGroup([[8, 2]], "halfWall", true, 0);
addGroup([[8, 6]], "spike", true, 0);
addGroup([[8, 6]], "halfWall", true, 0);
addGroup([[8, 7]], "spike", true, 0);
addGroup([[8, 7]], "halfWall", true, 0);
addGroup([[1, 0]], "spike", true, 90);
addGroup([[1, 0]], "halfWall", true, 90);
addGroup([[2, 0]], "spike", true, 90);
addGroup([[2, 0]], "halfWall", true, 90);
addGroup([[6, 0]], "spike", true, 90);
addGroup([[6, 0]], "halfWall", true, 90);
addGroup([[7, 0]], "spike", true, 90);
addGroup([[7, 0]], "halfWall", true, 90);
addGroup([[1, 3], [2, 3], [3, 3], [5, 3], [5, 4], [5, 5], [5, 7], [4, 7], [3, 7], [1, 7], [1, 6], [1, 5], [2, 7], [5, 6], [4, 3]], "piston", false);
addGroup([[0, 4]], "specialDoor");
addGroup([[-1, 4]], "exit", true, "T0");
setManPosition([[1, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup(get2DArray([8, 0], [8, 3]));
addGroup(get2DArray([8, 5], [8, 8]));
addGroup(get2DArray([0, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup(get2DArray([0, 1], [0, 8]));
addGroup(get2DArray([1, 8], [6, 8]));
addGroup([[5, 2]], "spike", true, 90);
addGroup([[5, 2]], "halfWall", true, 90);
addGroup([[1, 6]], "spike", true, 270);
addGroup([[1, 6]], "halfWall", true, 270);
addGroup([[5, 3]], "spike", true, 270);
addGroup([[5, 3]], "halfWall", true, 270);
addGroup([[7, 8]], "spike", true, 270);
addGroup([[7, 8]], "halfWall", true, 270);
addGroup([[2, 1], [2, 2], [5, 1], [5, 4], [2, 6], [7, 5]]);
addGroup(get2DArray([6, 4], [6, 6]));
addGroup(get2DArray([3, 4], [3, 6]));
addGroup([[7, 6]], "key", false);
addGroup([[1, 2]], "door", true, 90);
addGroup([[1, 1]], "key", false);
addGroup([[3, 7]], "door", true);
addGroup([[1, 7]], "key", false);
addGroup([[4, 0]], "door", true, 90);
addGroup([[8, 4]], "specialDoor", true);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[9, 4]], "exit", true, "B1");
setManPosition([[4, 1], [7, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup(get2DArray([0, 0], [0, 8]));
addGroup(get2DArray([8, 0], [8, 8]));
addGroup(get2DArray([2, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup(get2DArray([1, 8], [3, 8]));
addGroup(get2DArray([5, 8], [7, 8]));
addGroup([[2, 2], [2, 4], [2, 6], [6, 1], [6, 3], [6, 5], [6, 7]]);
addGroup([[1, 0]], "spike", true, 90);
addGroup([[1, 0]], "halfWall", true, 90);
addGroup([[3, 2], [4, 2], [5, 2]], "piston", false);
addGroup([[3, 3], [4, 3], [5, 3]], "piston", false);
addGroup([[3, 4], [4, 4], [5, 4]], "piston", false);
addGroup([[3, 5], [4, 5], [5, 5]], "piston", false);
addGroup([[3, 6], [4, 6], [5, 6]], "piston", false);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[4, 9]], "exit", true, "R1");
setManPosition([[4, 1], [4, 7]]);
addGroup([[5, 5]], "man", false);
createRoom(18, 18);
addGroup(get2DArray([0, 9], [0, 17]));
addGroup(get2DArray([9, 0], [9, 9]));
addGroup(get2DArray([17, 0], [17, 3]));
addGroup(get2DArray([17, 5], [17, 17]));
addGroup(get2DArray([1, 9], [3, 9]));
addGroup(get2DArray([5, 9], [8, 9]));
addGroup(get2DArray([9, 0], [16, 0]));
addGroup(get2DArray([1, 17], [3, 17]));
addGroup(get2DArray([5, 17], [16, 17]));
addGroup([[11, 3], [11, 4], [2, 13], [4, 14], [11, 1], [15, 2], [15, 6], [13, 15], [15, 13], [15, 15], [11, 6], [11, 11], [15, 5], [16, 5], [7, 16], [7, 10], [2, 10], [3, 16], [1, 15]]);
addGroup(get2DArray([3, 12], [3, 14]));
addGroup(get2DArray([14, 2], [14, 5]));
addGroup(get2DArray([5, 10], [5, 13]));
addGroup([[7, 11]], "spike", true, 0);
addGroup([[7, 11]], "halfWall", true, 0);
addGroup([[7, 15]], "spike", true, 0);
addGroup([[7, 15]], "halfWall", true, 0);
addGroup([[15, 8]], "spike", true, 0);
addGroup([[15, 8]], "halfWall", true, 0);
addGroup([[15, 9]], "spike", true, 0);
addGroup([[15, 9]], "halfWall", true, 0);
addGroup([[15, 10]], "spike", true, 0);
addGroup([[15, 10]], "halfWall", true, 0);
addGroup([[15, 11]], "spike", true, 0);
addGroup([[15, 11]], "halfWall", true, 0);
addGroup([[15, 12]], "spike", true, 0);
addGroup([[15, 12]], "halfWall", true, 0);
addGroup([[15, 14]], "spike", true, 0);
addGroup([[15, 14]], "halfWall", true, 0);
addGroup([[5, 14]], "spike", true, 180);
addGroup([[5, 14]], "halfWall", true, 180);
addGroup([[11, 7]], "spike", true, 180);
addGroup([[11, 7]], "halfWall", true, 180);
addGroup([[11, 8]], "spike", true, 180);
addGroup([[11, 8]], "halfWall", true, 180);
addGroup([[11, 9]], "spike", true, 180);
addGroup([[11, 9]], "halfWall", true, 180);
addGroup([[11, 10]], "spike", true, 180);
addGroup([[11, 10]], "halfWall", true, 180);
addGroup([[8, 11]], "spike", true, 90);
addGroup([[8, 11]], "halfWall", true, 90);
addGroup([[9, 11]], "spike", true, 90);
addGroup([[9, 11]], "halfWall", true, 90);
addGroup([[10, 11]], "spike", true, 90);
addGroup([[10, 11]], "halfWall", true, 90);
addGroup([[12, 4]], "spike", true, 90);
addGroup([[12, 4]], "halfWall", true, 90);
addGroup([[13, 4]], "spike", true, 90);
addGroup([[13, 4]], "halfWall", true, 90);
addGroup([[8, 15]], "spike", true, 270);
addGroup([[8, 15]], "halfWall", true, 270);
addGroup([[9, 15]], "spike", true, 270);
addGroup([[9, 15]], "halfWall", true, 270);
addGroup([[10, 15]], "spike", true, 270);
addGroup([[10, 15]], "halfWall", true, 270);
addGroup([[11, 15]], "spike", true, 270);
addGroup([[11, 15]], "halfWall", true, 270);
addGroup([[12, 15]], "spike", true, 270);
addGroup([[12, 15]], "halfWall", true, 270);
addGroup([[14, 15]], "spike", true, 270);
addGroup([[14, 15]], "halfWall", true, 270);
addGroup([[13, 6], [13, 7], [13, 5], [12, 6], [14, 6]], "piston", false);
addGroup([[8, 16]], "key", false);
addGroup([[17, 4]], "door", true);
addGroup([[8, 10]], "key", false);
addGroup([[11, 2]], "door", true);
addGroup([[4, 8]], "exit", true, "L0");
addGroup([[4, 18]], "exit", true, "R1");
addGroup([[18, 4]], "exit", true, "B2");
setManPosition([[3, 10], [4, 16], [16, 4]]);
addGroup([[14, 14]], "man", false);
createRoom(9, 18);
addGroup([[17, 0], [8, 0], [13, 0], [17, 2], [17, 3], [17, 5], [17, 6], [17, 8], [0, 5], [0, 6], [0, 8], [6, 8]]);
addGroup(get2DArray([0, 1], [0, 3]));
addGroup(get2DArray([0, 0], [3, 0]));
addGroup([[2, 2], [3, 3], [3, 5], [5, 5], [5, 6], [6, 3], [7, 5], [7, 6], [9, 2], [9, 3], [13, 5], [13, 6], [14, 2], [14, 3], [14, 5], [14, 6], [16, 6], [7, 2], [12, 2], [12, 3]]);
addGroup([[14, 4]], "spike", true, 0);
addGroup([[14, 4]], "halfWall", true, 0);
addGroup([[17, 1]], "spike", true, 0);
addGroup([[17, 1]], "halfWall", true, 0);
addGroup([[17, 7]], "spike", true, 0);
addGroup([[17, 7]], "halfWall", true, 0);
addGroup([[0, 7]], "spike", true, 180);
addGroup([[0, 7]], "halfWall", true, 180);
addGroup([[3, 4]], "spike", true, 180);
addGroup([[3, 4]], "halfWall", true, 180);
addGroup([[4, 0]], "spike", true, 90);
addGroup([[4, 0]], "halfWall", true, 90);
addGroup([[5, 0]], "spike", true, 90);
addGroup([[5, 0]], "halfWall", true, 90);
addGroup([[6, 0]], "spike", true, 90);
addGroup([[6, 0]], "halfWall", true, 90);
addGroup([[7, 0]], "spike", true, 90);
addGroup([[7, 0]], "halfWall", true, 90);
addGroup([[9, 0]], "spike", true, 90);
addGroup([[9, 0]], "halfWall", true, 90);
addGroup([[10, 0]], "spike", true, 90);
addGroup([[10, 0]], "halfWall", true, 90);
addGroup([[11, 0]], "spike", true, 90);
addGroup([[11, 0]], "halfWall", true, 90);
addGroup([[12, 0]], "spike", true, 90);
addGroup([[12, 0]], "halfWall", true, 90);
addGroup([[14, 0]], "spike", true, 90);
addGroup([[14, 0]], "halfWall", true, 90);
addGroup([[15, 0]], "spike", true, 90);
addGroup([[15, 0]], "halfWall", true, 90);
addGroup([[16, 0]], "spike", true, 90);
addGroup([[16, 0]], "halfWall", true, 90);
addGroup([[4, 3]], "spike", true, 90);
addGroup([[4, 3]], "halfWall", true, 90);
addGroup([[5, 3]], "spike", true, 90);
addGroup([[5, 3]], "halfWall", true, 90);
addGroup([[10, 3]], "spike", true, 90);
addGroup([[10, 3]], "halfWall", true, 90);
addGroup([[11, 3]], "spike", true, 90);
addGroup([[11, 3]], "halfWall", true, 90);
addGroup([[1, 6]], "spike", true, 90);
addGroup([[1, 6]], "halfWall", true, 90);
addGroup([[2, 6]], "spike", true, 90);
addGroup([[2, 6]], "halfWall", true, 90);
addGroup([[3, 6]], "spike", true, 90);
addGroup([[3, 6]], "halfWall", true, 90);
addGroup([[4, 6]], "spike", true, 90);
addGroup([[4, 6]], "halfWall", true, 90);
addGroup([[8, 6]], "spike", true, 90);
addGroup([[8, 6]], "halfWall", true, 90);
addGroup([[9, 6]], "spike", true, 90);
addGroup([[9, 6]], "halfWall", true, 90);
addGroup([[10, 6]], "spike", true, 90);
addGroup([[10, 6]], "halfWall", true, 90);
addGroup([[11, 6]], "spike", true, 90);
addGroup([[11, 6]], "halfWall", true, 90);
addGroup([[12, 6]], "spike", true, 90);
addGroup([[12, 6]], "halfWall", true, 90);
addGroup([[3, 2]], "spike", true, 270);
addGroup([[3, 2]], "halfWall", true, 270);
addGroup([[4, 2]], "spike", true, 270);
addGroup([[4, 2]], "halfWall", true, 270);
addGroup([[5, 2]], "spike", true, 270);
addGroup([[5, 2]], "halfWall", true, 270);
addGroup([[6, 2]], "spike", true, 270);
addGroup([[6, 2]], "halfWall", true, 270);
addGroup([[10, 2]], "spike", true, 270);
addGroup([[10, 2]], "halfWall", true, 270);
addGroup([[11, 2]], "spike", true, 270);
addGroup([[11, 2]], "halfWall", true, 270);
addGroup([[15, 2]], "spike", true, 270);
addGroup([[15, 2]], "halfWall", true, 270);
addGroup([[16, 2]], "spike", true, 270);
addGroup([[16, 2]], "halfWall", true, 270);
addGroup([[4, 5]], "spike", true, 270);
addGroup([[4, 5]], "halfWall", true, 270);
addGroup([[8, 5]], "spike", true, 270);
addGroup([[8, 5]], "halfWall", true, 270);
addGroup([[9, 5]], "spike", true, 270);
addGroup([[9, 5]], "halfWall", true, 270);
addGroup([[10, 5]], "spike", true, 270);
addGroup([[10, 5]], "halfWall", true, 270);
addGroup([[11, 5]], "spike", true, 270);
addGroup([[11, 5]], "halfWall", true, 270);
addGroup([[12, 5]], "spike", true, 270);
addGroup([[12, 5]], "halfWall", true, 270);
addGroup([[1, 8]], "spike", true, 270);
addGroup([[1, 8]], "halfWall", true, 270);
addGroup([[2, 8]], "spike", true, 270);
addGroup([[2, 8]], "halfWall", true, 270);
addGroup([[3, 8]], "spike", true, 270);
addGroup([[3, 8]], "halfWall", true, 270);
addGroup([[4, 8]], "spike", true, 270);
addGroup([[4, 8]], "halfWall", true, 270);
addGroup([[5, 8]], "spike", true, 270);
addGroup([[5, 8]], "halfWall", true, 270);
addGroup([[7, 8]], "spike", true, 270);
addGroup([[7, 8]], "halfWall", true, 270);
addGroup([[8, 8]], "spike", true, 270);
addGroup([[8, 8]], "halfWall", true, 270);
addGroup([[9, 8]], "spike", true, 270);
addGroup([[9, 8]], "halfWall", true, 270);
addGroup([[10, 8]], "spike", true, 270);
addGroup([[10, 8]], "halfWall", true, 270);
addGroup([[11, 8]], "spike", true, 270);
addGroup([[11, 8]], "halfWall", true, 270);
addGroup([[12, 8]], "spike", true, 270);
addGroup([[12, 8]], "halfWall", true, 270);
addGroup([[13, 8]], "spike", true, 270);
addGroup([[13, 8]], "halfWall", true, 270);
addGroup([[14, 8]], "spike", true, 270);
addGroup([[14, 8]], "halfWall", true, 270);
addGroup([[15, 8]], "spike", true, 270);
addGroup([[15, 8]], "halfWall", true, 270);
addGroup([[16, 8]], "spike", true, 270);
addGroup([[16, 8]], "halfWall", true, 270);
addGroup([[-1, 4]], "exit", true, "T0");
addGroup([[18, 4]], "exit", true, "B1");
setManPosition([[1, 4], [16, 4]]);
addGroup([[5, 5]], "man", false);
createRoom(9, 9);
addGroup(get2DArray([0, 0], [0, 3]));
addGroup(get2DArray([0, 5], [0, 8]));
addGroup(get2DArray([8, 0], [8, 8]));
addGroup(get2DArray([1, 0], [3, 0]));
addGroup(get2DArray([5, 0], [7, 0]));
addGroup(get2DArray([1, 8], [7, 8]));
addGroup([[3, 3], [3, 7], [6, 6], [6, 7]]);
addGroup(get2DArray([1, 2], [5, 2]));
addGroup(get2DArray([6, 2], [6, 4]));
addGroup([[3, 4], [3, 5], [3, 6], [4, 4], [4, 5], [4, 6]], "piston", false);
addGroup([[1, 1]], "key", false);
addGroup([[4, 0]], "door", true, 90);
addGroup([[7, 7]], "book", false, 10);
addGroup([[4, -1]], "exit", true, "L0");
addGroup([[-1, 4]], "exit", true, "T1");
setManPosition([[4, 1], [1, 4]]);
addGroup([[5, 5]], "man", false);
}
public function getExit(_arg1:uint, _arg2:String):Object{
var _local3:Array;
var _local4:String;
var _local5:uint;
var _local6:*;
_local3 = _arg2.split("");
_local4 = _local3[0];
_local5 = Number(_local3[1]);
for each (_local6 in mapEntrances) {
if ((((((_local6.id == _arg1)) && ((_local5 == _local6.entranceId)))) && ((_local4 == _local6.dir)))){
return (_local6);
};
};
return ({});
}
public function createRoom(_arg1:Number, _arg2:Number, _arg3:Number=25, _arg4:String="level"):void{
cRoom = new Array();
cMan = new Array();
levels.push({data:cRoom, xGrid:_arg1, yGrid:_arg2, gridWidth:_arg3, type:_arg4, manPositions:cMan});
}
public function getRoomData():Object{
return (levels[currentLevel]);
}
public function getData(_arg1:uint):Object{
return (levels[_arg1]);
}
public function editActiveRoom(_arg1:Array):void{
var _local2:int;
_local2 = 0;
while (_local2 < mapEntrances.length) {
if (mapEntrances[_local2].id == 25){
mapEntrances.splice(_local2, 1);
addEntrance(_arg1, ["T"], 25, 0);
break;
};
_local2++;
};
levels[0].data[25].points = [_arg1];
}
public function getRoomLocation(_arg1:uint):Object{
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:*;
_local2 = levels[0].data[_arg1].points;
_local3 = _local2[0][1];
_local4 = _local2[0][1];
_local5 = _local2[0][0];
_local6 = _local2[0][0];
for each (_local7 in _local2) {
_local3 = ((_local3 < _local7[1])) ? _local3 : _local7[1];
_local5 = ((_local5 < _local7[0])) ? _local5 : _local7[0];
_local4 = ((_local4 > _local7[1])) ? _local4 : _local7[1];
_local6 = ((_local6 > _local7[0])) ? _local6 : _local7[0];
};
return ({x:((_local3 + _local4) / 2), y:((_local5 + _local6) / 2)});
}
private function getAllData():void{
allData = Cookie.getInstance().getAllData();
}
private function createHiddenRoom():void{
var _local1:Object;
var _local2:Object;
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Object;
var _local7:Object;
var _local8:Object;
var _local9:Object;
_local1 = new Object();
_local2 = new Object();
_local3 = new Object();
_local4 = new Object();
_local5 = new Object();
_local6 = new Object();
_local7 = new Object();
_local8 = new Object();
_local9 = new Object();
hiddenRoomSets = [_local1, _local2, _local3, _local4, _local5, _local6, _local7, _local8, _local9];
_local1.point = [2, 4];
_local1.position = [-23.4, -40];
_local1.nPoint = [_local1, _local1, _local1, _local2];
_local2.point = [2, 3];
_local2.position = [-39.6, -40];
_local2.nPoint = [_local3, _local1, _local2, _local2];
_local3.point = [3, 3];
_local3.position = [-39.6, -24];
_local3.nPoint = [_local3, _local3, _local2, _local4];
_local4.point = [3, 2];
_local4.position = [-55.4, -24];
_local4.nPoint = [_local6, _local3, _local4, _local4];
_local5.point = [5, 2];
_local5.position = [-55.4, 8];
_local5.nPoint = [_local6, _local9, _local4, _local5];
_local6.point = [6, 2];
_local6.position = [-55.4, 23.7];
_local6.nPoint = [_local6, _local8, _local4, _local6];
_local7.point = [5, 3];
_local7.position = [-39.6, 8];
_local7.nPoint = [_local8, _local9, _local7, _local5];
_local8.point = [6, 3];
_local8.position = [-39.6, 23.7];
_local8.nPoint = [_local8, _local8, _local7, _local6];
_local9.point = [5, 4];
_local9.position = [-23.4, 8];
_local9.nPoint = [_local9, _local9, _local9, _local5];
}
public function clearState(_arg1:Boolean=true, _arg2:Boolean=false):void{
if (_arg1){
currentRoom = null;
} else {
currentRoom.player.doAction("stand");
currentRoom.player.stopMoving();
};
if (!_arg2){
isSleep = false;
};
}
public function setMessage():void{
messages = new Array();
messages.push(["Hmm, I can move by pressing left and right. And I can jump by pressing up. Z and X seem to rotate the entire world. But how do I know all this?", "我可以按左和右跑动,按上进行跳跃,而且可以用Z和X来旋转整个场地。但我如何从这里脱出呢?", "Hmm, ik kan bewegen door op links en rechts te drukken. En ik kan springen door op naar boven te drukken. Z en X draaien de hele wereld rond. Maar waarom weet ik dit allemaal?", "Hmm, je peux me déplacer en appuyant à gauche et à droite. Je peux sauter en appuyant sur la flèche du haut. Z et X semblent faire tourner le monde entier. Mais comment est-ce que je sais tout ça ?", "Hmm, ich kann mich bewegen, indem ich die Pfeiltasten nach links und rechts drücke und springen, indem ich die Pfeiltaste nach oben drücke. Mit Z und X kann ich diese ganze Welt hier drehen. Aber warum weiß ich das alles bloß?", "Hmm, poruszam się dzięki strzałkom w lewo i w prawo. A skaczę, naciskając strzałkę w górę. Z i X wydaje się obracać cały świat. Ale skąd ja to wszystko wiem?", "Hm, jag kan förflytta mig genom att trycka vänster och höger. Och jag kan hoppa genom att trycka upp. Z och X verkar rotera hela världen. Hur vet jag detta?", "Mmm, posso muovermi premendo i tasti freccia Su, Destra e Sinistra. I tasti Z e X sembra servano a far ruotare l'intero mondo. Ma come mai mi è dato sapere tutto questo?", "Hum, me puedo mover pulsando izquierda y derecha. También puedo saltar pulsando arriba. Las teclas Z y X hacen que el mundo entero dé vueltas. ¿Pero cómo sé yo todo esto?", "Hmm, para andar, uso as setas direita e esquerda. Para pular, a seta para cima. Parece que Z e X fazem o mundo girar. Mas como é que sei de tudo isso?", "Hmm, Saya bisa bergerak dengan menekan tombol panah kiri dan kanan. Dan saya bisa melompat dengan menekan tombol panah atas. Tombol Z dan X kelihatannya untuk memutar seluruh dunia. Tapi mengapa saya mengetahui semua ini?", "Хм, я могу двигаться, нажимая клавиши \"влево\" и \"вправо\". А если нажать клавишу \"вверх\", я могу прыгать. Клавиши Z и X, похоже, заставляют весь мир поворачиваться. Но откуда я все это знаю?", "Hmm, I can move by pressing left and right and can jump by pressing up. Z and X seem to rotate the entire world; but how do I know all this?", "Hmm, I can move by pressing left and right and can jump by pressing up. Z and X seem to rotate the entire world; but how do I know all this?", "Hmm, sola ve sağa basarak hareket edebilirim. Yukarı basarak da zıplayabilirim. Sanırım Z ve X bütün dünyayı döndürüyor. Fakat bütün bunları neden biliyorum?", "Hmm, saya boleh bergerak dengan menekan ke kiri dan kanan. Z dan X boleh memutar seluruh dunia. Tetapi mengapa saya mengetahui semua ini?", "Humm, eu posso mover-me pressionando a seta da esquerda e a da direita. E posso saltar pressionando a seta de cima. Z e X servem para fazer girar o mundo. Mas como sei eu tudo isto? "]);
messages.push(["By running and jumping at ledges, I can climb onto them. This will help me avoid those nasty spikes. But will it help me find the exit from this place?", "用跑和跳我能爬上高墙,而且可以帮助我避开可恶的钉板,但这些能帮我找到出口吗?", "Door te rennen en te springen kan ik op dingen klimmen. Dan kan ik tenminste die nare stekels ontwijken. Maar zal het mij ook uit dit doolhof helpen?", "En courant et sautant sur les rebords, on peut y monter. Je pourrai ainsi éviter ces pointes acérées. Mais est-ce que cela va m'aider à sortir de cet endroit ?", "Wenn ich laufe und auf Vorsprünge springe, kann ich nach oben klettern. So kann ich diesen schlimmen Stacheln ausweichen. Aber wird mir das auch helfen, von hier zu entkommen?", "Podbiegając i wskakując na krawędzie mogę się na nie wspiąć. To pomoże ominąć mi te okropne włócznie. Ale czy umożliwi mi znalezienie wyjścia z tego miejsca?", "Genom att springa och hoppa kan jag klättra upp på saker. På så sätt kan jag undvika spetsarna. Men hjälper det mig att hitta utgången?", "Se prendo la rincorsa e salto sulle sporgenze riuscirò ad arrampicarmi. In questo modo potrò evitare quei maledetti spuntoni. Ma servirà a farmi trovare una via d'uscita da questo posto?", "Corriendo y saltando por las cornisas, puedo escalar. Así conseguiré esquivar esas asquerosas serpientes. Pero con eso, ¿seré capaz de salir de este lugar?", "Correndo e pulando nas saliências, consigo subir nelas. Isso me ajudará a evitar os pregos perigosos. Mas será que me ajuda a encontrar a saída?", "Dengan berlari dan melompati birai, Saya bisa memanjat ke atas benda-benda. Ini akan membantu saya untuk menghindari paku besar yang kotor. Tapi akankah saya terbantu untuk menemukan jalan keluar dari tempat ini?", "Запрыгивая с разбегу на выступы, я могу взбираться на возвышения. Это поможет мне избежать этих жутких шипов. Но поможет ли мне это найти выход отсюда?", "I can climb onto ledges by running and jumping at them. This will help me avoid those nasty spikes. But will it help me find the way out of this place?", "I can climb onto ledges by running and jumping at them. This will help me avoid those nasty spikes. But will it help me find the way out of this place?", "Koşarak ve çıkıntıların üzerinden zıplayarak tırmanabilirim. Bu sayede çivilerden uzak durabilirim. Ama bütün bunlar buradan çıkmama yardımcı olacak mı?", "Dengan berlari dan melompat pada belebas, saya boleh memanjat pada benda. Ini membantu saya mengelak daripada pepaku berbahaya. Tetapi adakah ia akan membantu saya keluar daripada tempat ini?", "Correndo e saltando sobre as elevações, eu consigo subi-las. Isto ajudar-me-à a evitar os obstáculos. Mas será suficiente para me ajudar a sair deste sítio?"]);
messages.push(["Do not enter the room beyond! I was almost immediately trapped! I have attached a key to the wall which might help you escape.", "别到前面房间去了!我差点在那里丧命!但我在那里墙上挂着把钥匙可能对你的逃脱有帮助。", "Ga niet naar de volgende kamer! Ik was bijna meteen opgesloten! Ik heb een sleutel aan de muur gehangen om je verder te helpen.", "N'entrez surtout pas dans la pièce suivante ! J'ai presque immédiatement été enfermé ! J'ai attaché au mur une clé qui pourrait vous aider à vous échapper.", "Geh nicht in diesen Raum! Ich saß sofort in der Falle! Ich habe einen Schlüssel an die Wand gehängt, der dir bei deiner Flucht helfen wird.", "Nie wchodź do następnego pokoju! Ja prawie natychmiast zostałem uwięziony! Przyczepiłem klucz do ściany, być może to pomoże ci uciec.", "Gå inte in i rummet bortom! Jag blev omedelbart fången! Jag har hängt en nyckel på väggen. Den kanske kan hjälpa dig att fly.", "Non entrate nella stanza accanto! Per poco non rimanevo in trappola! Ho appeso una chiave al muro che potrebbe servire in caso di fuga.", "No entres a la siguiente habitación. ¡Casi quedo atrapado al instante! He colocado una llave en la pared que te ayudará a escapar.", "Não entre na próxima sala! Fiquei preso quase imediatamente! Prendi uma chave à parede para ajudá-lo a escapar.", "Jangan memasuki bagian luar ruangan! Saya hampir terjebak! Saya telah meletakkan sebuah kunci di dinding yang akan membantu saya melarikan diri.", "Не заходите в следующую комнату! Я практически сразу же оказался в ловушке! Я прикрепил к стене ключ - возможно, он поможет вам выбраться из ловушки…", "Do not enter the room beyond! I was nearly trapped then! I have placed a key on the wall which might help you escape.", "Do not enter the room beyond! I was nearly trapped then! I have placed a key on the wall which might help you escape.", "Bu odaya sakın girmeyin! Ben neredeyse tuzağa düşüyordum! Duvara bir anahtar astım, o kaçmanıza yardımcı olabilir.", "Jangan masuk ke bilik di sebelah sana! Saya hampir terperangkap! Saya telah meletakkan kunci pada dinding yang mungkin membantu anda melepaskan diri.", "Não entre no quarto que se segue. Fui quase logo apanhado! Deixei uma chave na parede que talvez lhe possa ser útil para escapar."]);
messages.push(["By running and then jumping, I can reach farther. And if I'm careful, I can stand pretty close to spikes as well. ", "先跑起来然后跳能够跳得更远。并且如果足够小心的话我能紧贴着钉板站立而不受伤。", "Door te rennen en te springen kan ik verder springen. En als ik voorzichtig ben kan ik heel dicht bij die stekels komen.", "Si je prends de l'élan avant de sauter, je peux aller plus loin. Et, si je fais attention, je peux même être assez proche des pointes.", "Wenn ich laufe und springe, komme ich viel weiter. Und wenn ich vorsichtig bin, kann ich mich auch relativ nah an die Stachel stellen.", "Biorąc rozbieg i wykonując skok mogę dotrzeć dalej. A jeśli będę ostrożny, mogę także stanąć całkiem blisko włóczni.", "Genom att springa och hoppa kan jag nå längre. Och om jag är försiktig kan jag stå ganska nära spetsarna.", "Se prendo la rincorsa e salto posso spingermi più lontano. Se sto attento, inoltre, posso anche sostare in prossimità degli spuntoni.", "Corriendo y luego saltando puedo ir más lejos. Y sé que debo tener cuidado porque puedo estar muy cerca de las serpientes.", "Correndo e pulando, posso chegar mais longe. E, se tomar cuidado, também posso me aproximar bastante dos pregos.", "Dengan berlari dan kemudian melompat, Saya bisa mencapai lebih jauh. Dan jika saya berhati-hati, maka saya juga akan bisa berdiri dekat dengan paku.", "Если разбежаться и прыгнуть, можно запрыгнуть подальше. Кроме того, если соблюдать осторожность, можно подходить довольно близко к шипам.", "I can get further by running and then jumping. If I'm careful I can stand pretty close to the spikes too.", "I can get further by running and then jumping. If I'm careful I can stand pretty close to the spikes too.", "Koşup zıplayarak daha uzağa erişebilirim. Ayrıca dikkatli olursam çivilere oldukça yakın durabilirim.", "Dengan berlari dan kemudian melompat, saya boleh pergi lebih jauh. Dan jika saya berhati-hati, saya juga boleh berdiri agak dekat dengan pepaku.", "Correndo e depois saltando, posso chegar mais longe. E, se tiver cuidado, posso aproximar-me bastante dos obstáculos."]);
messages.push(["I hate this world! Rooms, traps, doors, keys… What lunatic designed this? If I ever escape, he'll be sorry!", "我憎恨这个地方!房间啊、机关啊、门啊、钥匙啊……哪个疯子设计了这一切?我逃出去后一定会宰了他!", "Ik haat dit doolhof! Kamers, vallen, deuren… welke idioot heeft dit ontworpen? Als ik hier ooit uit kom dan zwaait er wat!", "Je déteste ce monde ! Chambres, pièges, portes, clés… Quel est l'abruti qui l'a imaginé ? Si jamais je m'en sors, il me le paiera !", "Ich hasse diese Welt! Räume, Fallen, Türen, Schlüssel… Welcher Verrückte hat sich das bloß ausgedacht? Wenn ich jemals von hier entkomme, wird er das bereuen!", "Nienawidzę tego świata! Pokoje, pułapki, drzwi, klucze... Jaki szaleniec to zaprojektował? Jeśli kiedykolwiek uda mi się uciec, pożałuje!", "Jag hatar den här världen! Rum, fällor, dörrar, nycklar ... Vilken dåre har skapat det här? Han ska allt få!", "Odio questo mondo! Stanze, trappole, porte, chiavi… Quale mente malata ha partorito tutto ciò? Se mai riuscirò a scappare, farà i conti con me!", "¡Odio este mundo! Habitaciones, trampas, puertas, llaves… ¿A qué lunático se le ha podido ocurrir esto? Si me escapo, haré que se arrepienta por todo lo que ha hecho.", "Detesto este mundo! Salas, alçapões, portas, chaves… Que lunático criou isto? Se eu não escapar, ele vai se arrepender!", "Saya membenci dunia ini! Ruangan, jebakan, pintu, kunci… Orang gila mana yang mendesain ini? Jika saya pernah melarikan diri, maka dia akan merasa bersalah!", "Ненавижу этот мир! Комнаты, ловушки, двери, ключи… Что за безумец создал все это? Если мне удастся выбраться отсюда, он пожалеет об этом!", "I hate this world! Rooms, traps, doors, keys… What lunatic designed this? He'll be sorry if I ever escape from here!", "I hate this world! Rooms, traps, doors, keys… What lunatic designed this? He'll be sorry if I ever escape from here!", "Bu dünyadan nefret ediyorum! Odalar, tuzaklar, kapılar, anahtarlar... Hangi kaçık tasarlamış bunu? Buradan çıkmayı başarabilirsem buna pişman olacak!", "Saya benci dunia ini! Bilik, perangkap, pintu, kunci...Orang gila mana yang merekanya?Jika saya dapat melepaskan diri, dia akan menyesal!", "Eu odeio este mundo! Salas, armadilhas, portas, chaves... Quem foi o lunático que criou isto? Se conseguir escapar, está tramado!"]);
messages.push(["I’m tired. I can't go on. How much further is it to the real end?", "真正的出口到底还有多远?我太累了,我想我再也出不去了。", "Ik ben zo moe. Ik kan echt niet meer verder. Hoe ver is het nog voordat ik bij het echte einde kom?", "Je n'en peux plus. Je n'arrive plus à avancer. Jusqu'où faudra-t-il aller pour trouver la vraie sortie ?", "Ich bin müde. Ich kann nicht mehr. Wie weit ist es denn noch bis zum Ausgang?", "Jestem zmęczony. Nie mogę iść dalej. Jak daleko jeszcze do końca?", "Jag är trött. Jag orkar inte fortsätta. Hur långt är det kvar till slutet?", "Sono stanco. Non ce la faccio più. Quanto dista ancora la vera fine?", "Estoy cansado. No puedo seguir. ¿Cuánto queda para el verdadero final?", "Estou cansado. Não consigo prosseguir. Será que a saída ainda está muito longe?", "Saya lelah. Saya tidak bisa lanjut lagi. Berapa jauh lagi untuk menuju ke akhir yang nyata?", "Я устал и не в силах продолжать путь. Сколько же еще осталось блуждать до настоящего конца лабиринта?", "I’m tired. I can't go on. How much further is it to the real end?", "I’m tired. I can't go on. How much further is it to the real end?", "Çok yoruldum. Devam edemeyeceğim. Gerçek çıkışa ulaşmama daha ne kadar kaldı?", "Saya letih. Saya tidak dapat meneruskannya. Berapa jauh lagi ke penghujung sebenar?", "Estou cansado. Não consigo avançar mais. Será que ainda falta muito até à verdadeira saída?"]);
messages.push(["I can't go on anymore. If you find this, please take my red mantle. It's the most precious thing I own!", "我放弃了。如果有人来到这里,请把我最心爱的红披风带走吧……", "Ik kan niet meer verder. Aan wie dit vindt: neem mijn mantel. Het is zeer waardevol!", "Je suis à bout de forces. Si vous trouvez cela, prenez donc mon manteau rouge. C'est ce que je possède de plus précieux !", "Ich kann nicht mehr weiter. Wer das hier findet, soll bitte meinen roten Mantel an sich nehmen. Er ist das Kostbarste, was ich habe!", "Już nie mogę iść dalej. Jeśli to znajdziesz, zabierz proszę mój czerwony płaszcz. To najceniejsza rzecz, jaką posiadam!", "Jag orkar inte längre. Om du läser det här - ta min röda mantel. Det är min käraste ägodel!", "Non ce la faccio ad andare avanti. Se trovate questo, prendete il mio mantello rosso. È la cosa più preziosa che ho!", "No puedo continuar. Si encuentras esto, coge mi manto rojo. ¡Es lo más preciado que tengo!", "Não consigo continuar. Se encontrar este bilhete, fique com a minha capa vermelha. É o que tenho de mais precioso!", "Saya tidak bisa lanjut lagi. Jika anda menemukan ini, tolong ambil mantel merah saya. Itu merupakan benda paling berharga yang saya miliki!", "Я не в силах идти дальше. Если вы нашли эту записку, можете взять мой красный плащ - это самое ценное из того, что у меня есть!", "I can't go on any more. If you find this, please take my red mantle. It is the most precious thing I own!", "I can't go on any more. If you find this, please take my red mantle. It is the most precious thing I own!", "Artık devam edemeyeceğim. Bu notu bulursanız, kırmızı pelerinimi alın. O benim en değerli varlığım!", "Saya tidak dapat meneruskannya lagi. Jika anda menjumpai nota ini, sila ambil mantel merah saya. Ia merupakan harta paling bernilai saya miliki!", "Não consigo avançar mais. Se ler isto, leve a minha manta vermelha. É a coisa mais preciosa que tenho!"]);
messages.push(["I'm starting to see things from the corner of my eyes.Shadows, cakes, exits… they're all just a lie!", "出口、阳光、蛋糕,为什么我眼前出现了这些东西……这他妈的都是幻觉!", "Ik begin dingen te zien die er niet zijn. Schaduwen, taarten, uitgangen… allemaal leugens!", "Je commence à voir des choses qui n'existent pas. Des ombres, des gâteaux, des issues... rien que des mensonges !", "Ich beginne schon, Dinge aus dem Augenwinkel zu sehen. Schatten, Kuchen, Ausgänge… aber nichts davon ist real!", "Zaczynam widzieć różne rzeczy kątem oka. Cienie, ciastka, wyjścia... to wszystko tylko przywidzenia! ", "Jag börjar se saker i ögonvrån. Skuggor, tårtor, utgångar ... det är bara en illusion!", "Comincio a vedere strane cose con la coda dell'occhio. Ombre, cibo, uscite... Ma è tutto una menzogna!", "Estoy empezando a ver cosas por el rabillo del ojo. Sombras, tartas, salidas… ¡Es todo mentira!", "Estou começando a ver coisas de soslaio. Sombras, bolos, saídas… é tudo mentira!", "Saya mulai melihat benda-benda dari sudut mata saya. Bayangan, kue, jalan keluar… mereka semua hanyalah suatu kebohongan!", "Краем глаза я начинаю замечать странные вещи… Тени, пироги, выходы… все это просто миражи!", "I'm starting to see things out of the corner of my eye. Shadows, cakes, exits… they're all just a lie!", "I'm starting to see things out of the corner of my eye. Shadows, cakes, exits… they're all just a lie!", "Bir şeyler görmeye başladım. Gölgeler, kekler, çıkışlar… hepsi bir hayal gibi!", "Saya mula melihat benda dari sudut mata saya. Bayang-bayang, kek, jalan keluar... semuanya bohong belaka!", "Estou a começar a ver coisas pelo canto dos olhos. Sombras, bolos, saídas... É tudo mentira!"]);
messages.push(["I can hear a strange sound coming from the next room. It's like a huge thing is blocking the door. Perhaps, if I rotate enough and move the thing out of the way, the door will open.", "我听见隔壁房间传来的奇怪响声,像是有什么巨大的东西。是不是我旋转到合适的位置那里的秘门就会开启呢?", "Ik kan een geluid horen in de volgende kamer. Het klinkt alsof een groot iets de deur blokkeert. Misschien als ik deze kamer goed draai kan ik het ding in de andere kamer uit de weg krijgen.", "J'entends un drôle de bruit de la pièce d'à côté. On dirait un énorme obstacle qui bloque la porte. Si je tourne assez et si j'enlève l'obstacle de la porte, j'arriverai peut-être à sortir.", "Ich höre ein seltsames Geräusch aus dem nächsten Raum kommen. Mir scheint, als blockiere ein großes Ding die Tür. Vielleicht bewegt es sich ja, wenn ich diese Welt genug drehe. Vielleicht öffnet sich die Tür dann ja.", "Słyszę dziwny dźwięk dochodzący z sąsiedniego pokoju. Zupełnie jakby coś wielkiego blokowało drzwi. Może jeśli dostatecznie obrócę pokój i usunę tę rzecz z drogi, drzwi się otworzą.", "Jag hör underliga ljud från nästa rum. Något stort verkar blockera dörren. Om jag roterar rummet kanske saken flyttar sig och dörren öppnas.", "Sento uno strano suono provenire dalla stanza accanto. Qualcosa di gigantesco blocca la porta. Forse se ruotassi a sufficienza riuscirei a spostare questa cosa consentendo l'apertura della porta.", "Oigo un extraño sonido proveniente de la habitación de al lado. Es como si una cosa enorme estuviese bloqueando la puerta. Quizás, si rotase lo suficiente y me quitase de delante, la puerta se abriría.", "Estou ouvindo um ruído estranho na sala ao lado. Parece que algo grande está bloqueando a porta. Talvez, se eu girar o bastante e tirar essa coisa do caminho, a porta se abra.", "Saya bisa mendengar suara aneh yang datang dari ruangan sebelah. Itu semacam benda besar yang menutupi pintu tersebut. Kemungkinan jika saya memutar dan memindahkan benda keluar, maka pintu akan terbuka.", "Из соседней комнаты доносится странный звук. Похоже, дверь завалена каким-то громоздким предметом. Возможно, если повернуть комнату и сдвинуть предмет в сторону, дверь откроется... ", "I can hear a strange sound coming from the next room. It's like a huge thing is blocking the door. Perhaps if I rotate enough and move the thing out of the way, the door will open.", "I can hear a strange sound coming from the next room. It's like a huge thing is blocking the door. Perhaps if I rotate enough and move the thing out of the way, the door will open.", "Diğer odadan tuhaf sesler geliyor. Sanki kapının arkasında devasa bir şey var. Yeterince döndürürsem o şeyi oradan kaldırıp kapıyı açabilirim.", "Saya boleh mendengar bunyi pelik yang datang dari bilik sebelah. Ia seperti benda yang besar sedang menghalang pintu. Jika saya putar dan memindahkan benda tersebut daripada laluan, pintu akan terbuka.", "Estou a ouvir um barulho estranho vindo da sala ao lado. É como se um grande obstáculo estivesse a bloquear a porta. Talvez se o conseguir mover o suficiente a porta abrirá."]);
messages.push(["This path must lead to the real exit! Finally, I feared this insane maze would never end!", "这条路很可能就是真正的出口!但我害怕这个世界就是永无止境的……", "Ik ben bijna bij de echte uitgang! Eindelijk, ik was al bang dat dit dolle doolhof nooit zou eindigen!", "Ce chemin doit mener vers la vraie sortie ! Ça y est, j'ai bien cru que ce labyrinthe infernal n'en finirait jamais !", "Dieser Weg muss zum Ausgang führen\" Endlich! Ich dachte schon, ich finde nie einen Weg aus diesem verrückten Labyrinth heraus!", "Ta ścieżka musi prowadzić do prawdziwego wyjścia! Nareszcie... Bałem się, że ten szalony labirynt nigdy się nie skończy!", "Den här vägen måste leda till den riktiga utgången. Jag var rädd att det aldrig skulle ta slut!", "Questo sentiero deve condurre alla vera uscita! Finalmente. Temevo che questo folle labirinto non avrebbe avuto mai fine!", "¡Este camino seguro que lleva a la salida real!¡Por fin! Creía que este laberinto de locos nunca terminaría.", "Este caminho deve levar à saída verdadeira! Finalmente! Pensei que este labirinto louco não teria fim!", "Jalur ini seharusnya menuju ke jalan keluar yang sesungguhnya! Akhirnya, Saya ketakutan kalau jalan liku-liku ini tidak akan pernah berakhir!", "Этот путь, должно быть, ведет к настоящему выходу! Наконец-то! Я уж боялся, что этот безумный лабиринт никогда не закончится!", "This path must lead to the real exit! At last! I was afraid this insane maze would never end!", "This path must lead to the real exit! At last! I was afraid this insane maze would never end!", "Bu yol gerçek çıkışa gidiyor olmalı! Sonunda, bu çılgın labirentin hiç bitmeyeceğinden korkuyordum!", "Laluan ini mesti menuju ke jalan keluar sebenar! Akhirnya, saya berasa takut jika pagar sesat gila ini tidak akan tamat!", "Este caminho deve conduzir até à verdadeira saída! Finalmente. Já pensava que este estranho labirinto não tinha fim!"]);
messages.push(["SECRET\n Page 4\n\nDRAGON", "SECRET\n Page 4\n\nDRAGON", "GEHEIM\n Pagina 4\n\nDRAGON", "SECRET\n Page 4\n\nDRAGON", "GEHEIM\n Seite 4\n\nDRAGON", "TAJNE\n Strona 4\n\nDRAGON", "HEMLIGT\n Sidan 4\n\nDRAGON", "RISERVATO\n Pagina 4\n\nDRAGON", "SECRETO\n Página 4\n\nDRAGON", "SEGREDO\n Página 4\n\nDRAGON", "RAHASIA\n Halaman 4\n\nDRAGON", "СЕКРЕТ\n Страница 4\n\nDRAGON", "SECRET\n Page 4\n\nDRAGON", "SECRET\n Page 4\n\nDRAGON", "ÇOK GİZLİ\n Sayfa 4\n\nDRAGON", "RAHSIA\n Halaman 4\n\nDRAGON", "SEGREDO\n Página 4\n\nDRAGON"]);
messages.push(["SECRET\n Page 3\n\n2008", "SECRET\n Page 3\n\n2008", "GEHEIM\n Pagina 3\n\n2008", "SECRET\n Page 3\n\n2008", "GEHEIM\n Seite 3\n\n2008", "TAJNE\n Strona 3\n\n2008", "HEMLIGT\n Sidan 3\n\n2008", "RISERVATO\n Pagina 3\n\n2008", "SECRETO\n Página 3\n\n2008", "SEGREDO\n Página 3\n\n2008", "RAHASIA\n Halaman 3\n\n2008", "СЕКРЕТ\n Страница 3\n\n2008", "SECRET\n Page 3\n\n2008", "SECRET\n Page 3\n\n2008", "ÇOK GİZLİ\n Sayfa 3\n\n2008", "RAHSIA\n Halaman 3\n\n2008", "SEGREDO\n Página 3\n\n2008"]);
messages.push(["SECRET\n Page 2\n\nPROJECT J", "SECRET\n Page 2\n\nPROJECT J", "GEHEIM\n Pagina 2\n\nPROJECT J", "SECRET\n Page 2\n\nPROJECT J", "GEHEIM\n Seite 2\n\nPROJECT J", "TAJNE\n Strona 2\n\nPROJECT J", "HEMLIGT\n Sidan 2\n\nPROJECT J", "RISERVATO\n Pagina 2\n\nPROJECT J", "SECRETO\n Página 2\n\nPROJECT J", "SEGREDO\n Página 2\n\nPROJECT J", "RAHASIA\n Halaman 2\n\nPROJECT J", "СЕКРЕТ\n Страница 2\n\nPROJECT J", "SECRET\n Page 2\n\nPROJECT J", "SECRET\n Page 2\n\nPROJECT J", "ÇOK GİZLİ\n Sayfa 2\n\nPROJECT J", "RAHSIA\n Halaman 2\n\nPROJECT J", "SEGREDO\n Página 2\n\nPROJECT J"]);
messages.push(["SECRET\n Page 1\n\n1994", "SECRET\n Page 1\n\n1994", "GEHEIM\n Pagina 1\n\n1994", "SECRET\n Page 1\n\n1994", "GEHEIM\n Seite 1\n\n1994", "TAJNE\n Strona 1\n\n1994", "HEMLIGT\n Sidan 1\n\n1994", "RISERVATO\n Pagina 1\n\n1994", "SECRETO\n Página 1\n\n1994", "SEGREDO\n Página 1\n\n1994", "RAHASIA\n Halaman 1\n\n1994", "СЕКРЕТ\n Страница 1\n\n1994", "SECRET\n Page 1\n\n1994", "SECRET\n Page 1\n\n1994", "ÇOK GİZLİ\n Sayfa 1\n\n1994", "RAHSIA\n Halaman 1\n\n1994", "SEGREDO\n Página 1\n\n1994"]);
}
public function createMainMap():void{
roomLevel = [1, 2, 1, 3, 4, 2, 1, 2, 4, 1, 3, 1, 3, 1, 4, 4, 1, 4, 1, 2, 2, 2, 1, 1, 1, 1, 1, 3, 2, 1, 60];
createRoom(11, 11, 50, "map");
addGroup([[1, 1]], "man", false);
addGroup([[5, 5]], "virtual");
addGroup([[4, 6], [4, 7]], "virtual");
addGroup([[3, 7]], "virtual");
addGroup([[2, 5], [2, 6], [3, 6]], "virtual");
addGroup([[1, 8], [1, 9], [2, 8], [2, 9]], "virtual");
addGroup([[1, 6], [1, 7]], "virtual");
addGroup([[3, 9]], "virtual");
addGroup([[4, 8], [4, 9]], "virtual");
addGroup([[5, 7], [5, 8], [6, 7], [6, 8]], "virtual");
addGroup([[6, 6]], "virtual");
addGroup([[7, 6], [8, 5], [8, 6]], "virtual");
addGroup([[8, 7]], "virtual");
addGroup([[7, 8], [6, 9], [7, 9]], "virtual");
addGroup([[9, 6]], "virtual");
addGroup([[8, 8], [8, 9], [9, 8], [9, 9]], "virtual");
addGroup([[6, 4], [6, 5], [7, 4], [7, 5]], "virtual");
addGroup([[7, 3]], "virtual");
addGroup([[7, 1], [7, 2], [8, 1], [8, 2]], "virtual");
addGroup([[6, 1]], "virtual");
addGroup([[9, 2], [9, 3]], "virtual");
addGroup([[8, 4], [9, 4]], "virtual");
addGroup([[3, 4], [3, 5]], "virtual");
addGroup([[4, 4]], "virtual");
addGroup([[4, 3]], "virtual");
addGroup([[5, 4]], "virtual", true, "hohohohoho");
addGroup([[1, 4]], "virtual");
addGroup([[1, 3]], "virtual");
addGroup([[1, 2], [2, 1], [2, 2]], "virtual");
addGroup([[3, 1], [4, 1]], "virtual");
addGroup([[5, 1]], "virtual");
addGroup(get2DArray([0, 0], [10, 0]), "virtual");
addGroup(get2DArray([0, 1], [0, 10]), "virtual");
addGroup(get2DArray([1, 10], [10, 10]), "virtual");
addGroup(get2DArray([10, 1], [10, 9]), "virtual");
addGroup([[4, 5]], "book", false, 2);
addGroup([[2, 7]], "book", false, 4);
addGroup([[5, 6]], "book", false, 5);
addGroup([[8, 3]], "book", false, 8);
addGroup([[1, 1]], "book", false, 11);
}
public function getMessage(_arg1:int):String{
return (messages[(_arg1 - 1)][Language._languageNum]);
}
private function setManPosition(_arg1:Array):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.length) {
cMan.push(_arg1[_local2]);
_local2++;
};
}
private function addEntrances():void{
addEntrance([0, 5], ["B"], -1);
addEntrance([5, 0], ["R"], -4);
addEntrance([10, 5], ["T"], -3);
addEntrance([5, 10], ["L"], -2);
addEntrance([5, 5], ["T"], 1, 0);
addEntrance([4, 6], ["L"], 2, 0);
addEntrance([4, 7], ["T"], 2, 1);
addEntrance([3, 7], ["L"], 3, 0);
addEntrance([3, 7], ["B"], 3, 1);
addEntrance([2, 5], ["B"], 4, 0);
addEntrance([2, 6], ["R"], 4, 1);
addEntrance([3, 6], ["R"], 4, 2);
addEntrance([1, 8], ["L"], 5, 0);
addEntrance([2, 8], ["L"], 5, 1);
addEntrance([2, 9], ["B"], 5, 2);
addEntrance([1, 6], ["L"], 6, 0);
addEntrance([1, 7], ["R"], 6, 1);
addEntrance([3, 9], ["L"], 7, 0);
addEntrance([3, 9], ["T"], 7, 1);
addEntrance([4, 8], ["T"], 8, 0);
addEntrance([4, 8], ["B"], 8, 1);
addEntrance([5, 7], ["L"], 9, 0);
addEntrance([6, 7], ["L"], 9, 1);
addEntrance([5, 8], ["T"], 9, 2);
addEntrance([6, 6], ["L"], 10, 0);
addEntrance([6, 6], ["R"], 10, 1);
addEntrance([6, 6], ["B"], 10, 2);
addEntrance([7, 6], ["T"], 11, 0);
addEntrance([8, 6], ["B"], 11, 1);
addEntrance([8, 6], ["R"], 11, 2);
addEntrance([8, 7], ["L"], 12, 0);
addEntrance([8, 7], ["T"], 12, 1);
addEntrance([7, 8], ["L"], 13, 0);
addEntrance([6, 9], ["T"], 13, 1);
addEntrance([7, 9], ["B"], 13, 2);
addEntrance([9, 6], ["T"], 14, 0);
addEntrance([9, 6], ["R"], 14, 1);
addEntrance([9, 8], ["L"], 15, 0);
addEntrance([8, 9], ["T"], 15, 1);
addEntrance([7, 4], ["L"], 16, 0);
addEntrance([6, 5], ["R"], 16, 1);
addEntrance([7, 3], ["L"], 17, 0);
addEntrance([7, 3], ["R"], 17, 1);
addEntrance([7, 1], ["T"], 18, 0);
addEntrance([7, 2], ["R"], 18, 1);
addEntrance([8, 1], ["B"], 18, 2);
addEntrance([6, 1], ["B"], 19, 0);
addEntrance([9, 2], ["L"], 20, 0);
addEntrance([9, 3], ["T"], 20, 1);
addEntrance([9, 3], ["R"], 20, 2);
addEntrance([9, 4], ["L"], 21, 0);
addEntrance([9, 4], ["R"], 21, 1);
addEntrance([3, 4], ["B"], 22, 0);
addEntrance([3, 5], ["T"], 22, 1);
addEntrance([4, 4], ["L"], 23, 0);
addEntrance([4, 4], ["T"], 23, 1);
addEntrance([4, 4], ["B"], 23, 2);
addEntrance([4, 3], ["R"], 24, 0);
addEntrance([5, 4], ["T"], 25, 0);
addEntrance([1, 4], ["L"], 26, 0);
addEntrance([1, 4], ["B"], 26, 1);
addEntrance([1, 3], ["L"], 27, 0);
addEntrance([1, 3], ["R"], 27, 1);
addEntrance([1, 2], ["L"], 28, 0);
addEntrance([1, 2], ["R"], 28, 1);
addEntrance([2, 1], ["B"], 28, 2);
addEntrance([3, 1], ["T"], 29, 0);
addEntrance([4, 1], ["B"], 29, 1);
addEntrance([5, 1], ["L"], 30, 0);
addEntrance([5, 1], ["T"], 30, 1);
}
private function addGroup(_arg1:Array, _arg2:String="wall", _arg3:Boolean=true, _arg4=null):void{
cRoom.push({points:_arg1, type:_arg2, isStatic:_arg3, extra:_arg4});
}
private function addEntrance(_arg1:Array, _arg2:Array, _arg3:int, _arg4:uint=0):void{
var _local5:*;
for each (_local5 in _arg2) {
switch (_local5){
case "L":
mapEntrances.push({point:_arg1, x:((_arg1[1] * 50) - 25), y:(_arg1[0] * 50), id:_arg3, entranceId:_arg4, dir:"L"});
break;
case "R":
mapEntrances.push({point:_arg1, x:((_arg1[1] * 50) + 25), y:(_arg1[0] * 50), id:_arg3, entranceId:_arg4, dir:"R"});
break;
case "T":
mapEntrances.push({point:_arg1, x:(_arg1[1] * 50), y:((_arg1[0] * 50) - 25), id:_arg3, entranceId:_arg4, dir:"T"});
break;
case "B":
mapEntrances.push({point:_arg1, x:(_arg1[1] * 50), y:((_arg1[0] * 50) + 25), id:_arg3, entranceId:_arg4, dir:"B"});
break;
};
};
}
public static function get KEY_RIGHT():Boolean{
if (((_disableKeyBoard) || (isGameOver))){
return (false);
};
return (_KEY_RIGHT);
}
public static function get KEY_LEFT():Boolean{
if (((_disableKeyBoard) || (isGameOver))){
return (false);
};
return (_KEY_LEFT);
}
public static function getInstance():Model{
if (_instance == null){
_instance = new (Model);
};
return (_instance);
}
public static function resetData():void{
jumped = 0;
ran = 0;
died = 0;
rotated = 0;
}
public static function get KEY_UP():Boolean{
if (((_disableKeyBoard) || (isGameOver))){
return (false);
};
return (_KEY_UP);
}
public static function set disableKeyBoard(_arg1:Boolean):void{
_disableKeyBoard = _arg1;
}
public static function get KEY_DOWN():Boolean{
if (((_disableKeyBoard) || (isGameOver))){
return (false);
};
return (_KEY_DOWN);
}
public static function get disableKeyBoard():Boolean{
return (_disableKeyBoard);
}
}
}//package game
Section 28
//Room (game.Room)
package game {
import flash.events.*;
import flash.display.*;
import groups.*;
import elements.*;
import flash.utils.*;
import flash.geom.*;
public class Room extends MovieClip {
private var yBorder:Number;// = 240
private var sdManager:SoundManager;
private var _type:String;
private var rotateCounter:uint;// = 60
private var gridWidth:Number;
private var tY:Number;
private var tkeys:Array;
private var tX:Number;
private var entranceId:int;// = -1
private var doors:Array;
public var container:MovieClip;
private var tdoors:Array;
private var hiddedRoom:MovieClip;
private var manPosition:Array;
public var topContainer:MovieClip;
public var itemContainer:MovieClip;
public var books:Array;
private var xBorder:Number;// = 237
private var doorToRemove;
public var _keys:Array;
public var player:ManGroup;
public var exits:Array;
public var spikes:Array;
private var broadCaster:BroadCaster;
private var rotate:Number;
private var allGroup:Array;
public var winds:Array;
public var allStaticItems:Array;
public var screenShot:Bitmap;
private var cRoomId:uint;
public var _doors:Array;
public var hiddenRoom:Group;
private var roomWidth:Number;
public var _books:Array;
private var rotateOffset:Number;// = 0
private var roomHeight:Number;
public var roomContainer:MovieClip;
public var SpecialDoor:SpecialGroup;
public var keys:Array;
public var allActiveItems:Array;
public function Room(_arg1:uint, _arg2:int=-1):void{
var _local3:Object;
var _local4:Model;
var _local5:Object;
var _local6:*;
var _local7:int;
var _local8:*;
var _local9:MovieClip;
var _local10:Array;
var _local11:Array;
var _local12:int;
var _local13:*;
var _local14:Boolean;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:Boolean;
var _local20:*;
rotateOffset = 0;
rotateCounter = 60;
xBorder = 237;
yBorder = 240;
entranceId = -1;
super();
entranceId = _arg2;
_arg2 = ((((_arg2 < 0)) && ((_arg2 >= -1)))) ? 0 : _arg2;
_local3 = Model.getInstance().getData(_arg1);
broadCaster = BroadCaster.getInstance();
sdManager = SoundManager.getInstance();
gridWidth = _local3.gridWidth;
Model.gridWidth = gridWidth;
_type = _local3.type;
cRoomId = _arg1;
roomContainer = new MovieClip();
addChild(roomContainer);
itemContainer = new MovieClip();
addChild(itemContainer);
container = new MovieClip();
roomContainer.addChild(container);
topContainer = new MovieClip();
addChild(topContainer);
if (_type == "map"){
_local8 = getDefinitionByName("Map");
_local9 = new (_local8);
container.addChild(_local9);
hiddedRoom = (_local9.getChildByName("hiddenRoom") as MovieClip);
_local9.x = (_local9.y = (gridWidth / 2));
} else {
if (_arg2 < 0){
manPosition = null;
} else {
manPosition = ((_local3.manPositions[_arg2] == null)) ? [1, 1] : _local3.manPositions[_arg2];
};
};
_local4 = Model.getInstance();
_local5 = _local4.currentData[("room" + _arg1)];
_books = Model.books;
_local6 = _local4.currentData.hasP;
_local6 = ((_local6 == null)) ? false : _local6;
Model.hasP = _local6;
_books = ((_books == null)) ? new Array() : _books;
if (_local5 != null){
_doors = _local5.doors;
_keys = _local5.keys;
};
tkeys = new Array();
tdoors = new Array();
allGroup = new Array();
keys = new Array();
doors = new Array();
winds = new Array();
spikes = new Array();
books = new Array();
exits = new Array();
allActiveItems = new Array();
allStaticItems = new Array();
_local7 = 0;
while (_local7 < 18) {
_local10 = new Array();
_local11 = new Array();
_local12 = 0;
while (_local12 < 18) {
_local10.push(new Array());
_local11.push(new Array());
_local12++;
};
allActiveItems.push(_local10);
allStaticItems.push(_local11);
_local7++;
};
roomWidth = (_local3.xGrid * gridWidth);
roomHeight = (_local3.yGrid * gridWidth);
this.x = xBorder;
this.y = yBorder;
roomContainer.x = (-(roomWidth) / 2);
container.x = (gridWidth / 2);
itemContainer.x = (topContainer.x = ((-(roomWidth) / 2) + (gridWidth / 2)));
roomContainer.y = (-(roomHeight) / 2);
container.y = (gridWidth / 2);
itemContainer.y = (topContainer.y = ((-(roomHeight) / 2) + (gridWidth / 2)));
if (_local5 == null){
for each (_local13 in _local3.data) {
if (!((Model.hasP) && ((_local13.type == "wind")))){
if (_local13.type == "book"){
_local14 = false;
for each (_local15 in _books) {
if (_local15 == _local13.extra){
_local14 = true;
break;
};
};
//unresolved if
} else {
addGroup(_local13.points, _local13.type, _local13.isStatic, _local13.extra);
};
};
};
} else {
for each (_local16 in _local3.data) {
if ((((_local16.type == "door")) || ((_local16.type == "key")))){
continue;
} else {
if (!((Model.hasP) && ((_local16.type == "wind")))){
if (_local16.type == "book"){
_local19 = false;
for each (_local20 in _books) {
if (_local20 == _local16.extra){
_local19 = true;
break;
};
};
//unresolved if
} else {
addGroup(_local16.points, _local16.type, _local16.isStatic, _local16.extra);
};
};
};
};
for each (_local17 in _keys) {
addGroup(_local17.points, "key", _local17.isStatic);
};
for each (_local18 in _doors) {
addGroup(_local18.points, "door", _local18.isStatic, _local18.rotation);
};
};
_doors = tdoors;
_keys = tkeys;
rotateRoom();
initASpeed(Model.rotation);
}
public function setRotation(_arg1:Number):void{
var _local2:BitmapData;
if (_type != "map"){
Model.disableKeyBoard = true;
rotateOffset = _arg1;
rotateCounter = 0;
Model.rotation = (((this.rotation + _arg1) + 360) % 360);
_local2 = new BitmapData(480, 480, true, 0);
_local2.draw(roomContainer);
screenShot = new Bitmap(_local2);
screenShot.x = roomContainer.x;
screenShot.y = roomContainer.y;
addChild(screenShot);
roomContainer.visible = false;
sdManager.playSound("mapRotate", SoundManager.TYPE_ITEM);
this.addEventListener(Event.ENTER_FRAME, changeRotation);
setAspeed(_arg1);
};
}
private function alphaToMax(_arg1:Event):void{
this.alpha = (this.alpha + 0.02);
if (this.alpha >= 1){
removeEventListener(Event.ENTER_FRAME, alphaToMax);
initASpeed(Model.rotation);
broadCaster.run("onMapReady", "");
};
}
public function removeMap():void{
this.addEventListener(Event.ENTER_FRAME, alphaToMin);
}
public function removeDoor(_arg1):void{
var _local2:int;
var _local3:*;
var _local4:int;
var _local5:*;
var _local6:Number;
_local2 = 0;
while (_local2 < doors.length) {
if (doors[_local2] == _arg1){
doors.splice(_local2, 1);
tdoors.splice(_local2, 1);
break;
};
_local2++;
};
for each (_local3 in allStaticItems) {
for each (_local5 in _local3) {
_local6 = _local5.indexOf(_arg1.items[0]);
if (_local6 >= 0){
_local5.splice(_local6, 1);
};
};
};
_local4 = 0;
while (_local4 < allGroup.length) {
if (allGroup[_local4] == _arg1){
allGroup.splice(_local4, 1);
};
_local4++;
};
}
public function resetPlayerPosition(_arg1:Number, _arg2:Number):void{
player.resetPosition(_arg1, _arg2);
}
private function scaleBackToTarget(_arg1:Event):void{
this.scaleX = (this.scaleX - 0.1);
this.scaleY = (this.scaleY - 0.1);
this.x = (this.x + (tX / 50));
this.y = (this.y + (tY / 50));
if (this.scaleX <= 1){
this.scaleX = 1;
this.scaleY = 1;
this.x = xBorder;
this.y = yBorder;
removeEventListener(Event.ENTER_FRAME, scaleBackToTarget);
Model.isSleep = false;
Model.disableKeyBoard = false;
};
}
public function addGroup(_arg1:Array, _arg2:String, _arg3:Boolean, _arg4=null):void{
var g:*;
var itemClass:*;
var _container:MovieClip;
var e:*;
var head:HeadItem;
var item:*;
var sideCounter:uint;
var besideTable:Object;
var cld:MovieClip;
var k:*;
var points = _arg1;
var type = _arg2;
var isStatic = _arg3;
var txt = _arg4;
_container = container;
switch (type){
case "wall":
itemClass = RectItem;
g = new Group(type, isStatic);
break;
case "piston":
itemClass = ActiveItem;
g = new PistonGroup(type, isStatic);
break;
case "key":
_container = itemContainer;
itemClass = KeyItem;
g = new KeyGroup(type, isStatic);
tkeys.push({points:points, isStatic:isStatic});
keys.push(g);
break;
case "book":
_container = itemContainer;
itemClass = BookItem;
g = new BookGroup(type, isStatic);
g.text = txt;
books.push(g);
break;
case "door":
itemClass = DoorItem;
_container = topContainer;
txt = ((txt == null)) ? 0 : txt;
g = new DoorGroup(type, isStatic, txt);
tdoors.push({points:points, isStatic:isStatic, rotation:txt});
doors.push(g);
break;
case "spike":
itemClass = SpikeItem;
txt = ((txt == null)) ? 0 : txt;
g = new SpikeGroup(type, isStatic, txt);
spikes.push(g);
break;
case "halfWall":
itemClass = HalfWall;
txt = ((txt == null)) ? 0 : txt;
g = new SpikeGroup(type, isStatic, txt);
break;
case "virtual":
itemClass = VirtualItem;
g = new Group(type, isStatic);
if (txt != null){
hiddenRoom = g;
};
break;
case "exit":
_container = itemContainer;
itemClass = ExitItem;
g = new ExitGroup(type, isStatic, txt);
exits.push(g);
break;
case "specialDoor":
_container = topContainer;
itemClass = SpecialItem;
g = new SpecialGroup(type, isStatic, txt);
SpecialDoor = g;
break;
case "wind":
_container = topContainer;
itemClass = WindItem;
g = new WindGroup(type, isStatic);
winds.push(g);
break;
case "man":
itemClass = ManItem;
_container = topContainer;
g = new ManGroup(type, isStatic);
head = new HeadItem((points[0][1] * gridWidth), (points[0][0] * gridWidth));
container.addChild(head);
g.addItem(head);
player = g;
break;
default:
itemClass = RectItem;
g = new Group(type, isStatic);
break;
};
for each (e in points) {
item = new itemClass((e[1] * gridWidth), (e[0] * gridWidth));
if (type == "piston"){
sideCounter = 0;
besideTable = new Object();
cld = (item.getChildByName("rock") as MovieClip);
for each (k in points) {
if ((((k[0] == e[0])) && ((k[1] == (e[1] + 1))))){
besideTable["R"] = true;
sideCounter = (sideCounter + 1);
} else {
if ((((k[0] == (e[0] + 1))) && ((k[1] == e[1])))){
besideTable["B"] = true;
sideCounter = (sideCounter + 1);
} else {
if ((((k[0] == e[0])) && ((k[1] == (e[1] - 1))))){
besideTable["L"] = true;
sideCounter = (sideCounter + 1);
} else {
if ((((k[0] == (e[0] - 1))) && ((k[1] == e[1])))){
besideTable["T"] = true;
sideCounter = (sideCounter + 1);
};
};
};
};
};
switch (sideCounter){
case 0:
cld.gotoAndStop(5);
break;
case 1:
cld.gotoAndStop(4);
if (besideTable["L"] == true){
cld.rotation = -90;
} else {
if (besideTable["R"] == true){
cld.rotation = 90;
} else {
if (besideTable["B"] == true){
cld.rotation = 180;
} else {
if (besideTable["T"] == true){
cld.rotation = 0;
};
};
};
};
break;
case 2:
if ((((besideTable["L"] == true)) && ((besideTable["R"] == true)))){
cld.gotoAndStop(3);
cld.rotation = 90;
} else {
if ((((besideTable["B"] == true)) && ((besideTable["T"] == true)))){
cld.gotoAndStop(3);
} else {
if ((((besideTable["L"] == true)) && (besideTable["B"]))){
cld.gotoAndStop(2);
cld.rotation = 90;
} else {
if ((((besideTable["L"] == true)) && (besideTable["T"]))){
cld.gotoAndStop(2);
cld.rotation = 180;
} else {
if ((((besideTable["R"] == true)) && (besideTable["B"]))){
cld.gotoAndStop(2);
} else {
if ((((besideTable["R"] == true)) && (besideTable["T"]))){
cld.gotoAndStop(2);
cld.rotation = -90;
};
};
};
};
};
};
break;
case 3:
cld.gotoAndStop(1);
if (besideTable["L"] != true){
cld.rotation = -90;
} else {
if (besideTable["R"] != true){
cld.rotation = 90;
} else {
if (besideTable["B"] != true){
cld.rotation = 180;
} else {
if (besideTable["T"] != true){
cld.rotation = 0;
};
};
};
};
break;
case 4:
cld.gotoAndStop(6);
break;
};
};
_container.addChild(item);
if (isStatic){
try {
allStaticItems[e[0]][e[1]].push(item);
} catch(E:Error) {
};
};
g.allActiveItems = allActiveItems;
g.allStaticItems = allStaticItems;
g.addItem(item);
};
allGroup.push(g);
}
public function remove():void{
if (loaderInfo != null){
parent.removeChild(this);
};
}
private function scaleToMin(_arg1:Event):void{
this.scaleX = (this.scaleX - ((7 / 9) / 50));
this.scaleY = (this.scaleY - ((7 / 9) / 50));
this.x = (this.x - (tX / 50));
this.y = (this.y - (tY / 50));
if (this.scaleX <= (2 / 9)){
setTimeout(parent.removeChild, 1000, this);
removeEventListener(Event.ENTER_FRAME, scaleToMin);
broadCaster.run("onRoomRemoved", "");
};
}
public function removeWind(_arg1):void{
var _local2:int;
var _local3:int;
_local2 = 0;
while (_local2 < winds.length) {
if (winds[_local2] == _arg1){
broadCaster.run("onFindWind", "");
sdManager.playSound("getItem", SoundManager.TYPE_ITEM);
winds.splice(_local2, 1);
break;
};
_local2++;
};
_local3 = 0;
while (_local3 < allGroup.length) {
if (allGroup[_local3] == _arg1){
allGroup.splice(_local3, 1);
};
_local3++;
};
Model.hasP = true;
}
public function update():void{
var _local1:int;
var _local2:*;
var _local3:int;
if (Model.isSleep){
player.updateSpeed();
player.hitTest();
return;
};
_local1 = 0;
while (_local1 < 18) {
_local3 = 0;
while (_local3 < 18) {
allActiveItems[_local1][_local3] = new Array();
_local3++;
};
_local1++;
};
for each (_local2 in allGroup) {
_local2.updateSpeed();
};
hitTest();
}
private function hitTest():void{
var e:*;
for each (e in allGroup) {
try {
e.hitTest();
} catch(e:Error) {
};
};
}
private function rotateRoom():void{
player.rotation = Model.rotation;
this.rotation = Model.rotation;
if (_type == "map"){
hiddedRoom.y = ((Model.hiddedRoomLocation.point[0] * 50) - 25);
hiddedRoom.x = ((Model.hiddedRoomLocation.point[1] * 50) - 24);
} else {
if ((((((cRoomId == 23)) || ((cRoomId == 25)))) && ((Model.hiddedRoomLocation == Model.getInstance().hiddenRoomSets[8])))){
SpecialDoor.open();
} else {
if ((((((cRoomId == 26)) || ((cRoomId == 25)))) && ((Model.hiddedRoomLocation == Model.getInstance().hiddenRoomSets[0])))){
SpecialDoor.open();
} else {
if (SpecialDoor != null){
SpecialDoor.close();
};
};
};
};
}
private function alphaToMin(_arg1:Event):void{
this.alpha = (this.alpha - 0.02);
if (this.alpha <= 0){
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, alphaToMin);
broadCaster.run("onMapRemoved", "");
};
}
public function showMap():void{
this.addEventListener(Event.ENTER_FRAME, alphaToMax);
}
public function getBorder():Object{
return ({x:(xBorder + container.x), y:(yBorder + container.y)});
}
public function removeKey(_arg1):void{
var _local2:int;
var _local3:*;
var _local4:int;
var _local5:*;
var _local6:Number;
_local2 = 0;
while (_local2 < keys.length) {
if (keys[_local2] == _arg1){
Model.disableKeyBoard = true;
keys.splice(_local2, 1);
tkeys.splice(_local2, 1);
doorToRemove = doors[_local2];
scaleTo();
break;
};
_local2++;
};
for each (_local3 in allStaticItems) {
for each (_local5 in _local3) {
_local6 = _local5.indexOf(_arg1.items[0]);
if (_local6 >= 0){
_local5.splice(_local6, 1);
};
};
};
_local4 = 0;
while (_local4 < allGroup.length) {
if (allGroup[_local4] == _arg1){
allGroup.splice(_local4, 1);
};
_local4++;
};
}
private function changeRotation(_arg1:Event=null):void{
var e = _arg1;
rotateCounter++;
this.rotation = (this.rotation + (rotateOffset / 61));
if (rotateCounter >= 61){
roomContainer.visible = true;
removeChild(screenShot);
screenShot.bitmapData.dispose();
screenShot = null;
rotateRoom();
Model.disableKeyBoard = false;
try {
removeEventListener(Event.ENTER_FRAME, changeRotation);
} catch(e:Error) {
};
};
}
public function scaleBack():void{
sdManager.playSound("scaleMin", SoundManager.TYPE_ITEM);
this.addEventListener(Event.ENTER_FRAME, scaleBackToTarget, false, 0, true);
}
private function scaleToTarget(_arg1:Event):void{
this.scaleX = (this.scaleX + 0.1);
this.scaleY = (this.scaleY + 0.1);
this.x = (this.x - (tX / 50));
this.y = (this.y - (tY / 50));
if (this.scaleX >= 5){
sdManager.playSound("doorOpen", SoundManager.TYPE_ITEM);
removeEventListener(Event.ENTER_FRAME, scaleToTarget);
doorToRemove.removeAllItems();
doorToRemove = null;
};
}
public function showRoom():void{
tX = (this.x - xBorder);
tY = (this.y - yBorder);
sdManager.playSound("scaleMax", SoundManager.TYPE_ITEM);
this.addEventListener(Event.ENTER_FRAME, scaleToMax);
}
private function scaleTo():void{
var _local1:Point;
_local1 = doorToRemove.items[0].localToGlobal(new Point(0, 0));
tX = ((_local1.x - xBorder) * 5);
tY = ((_local1.y - yBorder) * 5);
sdManager.playSound("scaleMax", SoundManager.TYPE_ITEM);
this.addEventListener(Event.ENTER_FRAME, scaleToTarget, false, 0, true);
}
public function removeRoom(_arg1:Number, _arg2:Number):void{
tX = (xBorder - _arg1);
tY = (yBorder - _arg2);
sdManager.playSound("scaleMin", SoundManager.TYPE_ITEM);
this.addEventListener(Event.ENTER_FRAME, scaleToMin);
}
public function setAspeed(_arg1:Number):void{
var _local2:*;
for each (_local2 in allGroup) {
_local2.resetASpeed(_arg1);
};
}
private function initASpeed(_arg1:Number):void{
var _local2:*;
for each (_local2 in allGroup) {
_local2.setASpeed(_arg1);
};
}
public function removeBook(_arg1):void{
var _local2:int;
var _local3:int;
_local2 = 0;
while (_local2 < books.length) {
if (books[_local2] == _arg1){
broadCaster.run("onFindFile", books[_local2].text);
sdManager.playSound("getItem", SoundManager.TYPE_ITEM);
books.splice(_local2, 1);
Model.isSleep = false;
break;
};
_local2++;
};
_local3 = 0;
while (_local3 < allGroup.length) {
if (allGroup[_local3] == _arg1){
allGroup.splice(_local3, 1);
};
_local3++;
};
}
private function scaleToMax(_arg1:Event):void{
this.scaleX = (this.scaleX + ((7 / 9) / 50));
this.scaleY = (this.scaleY + ((7 / 9) / 50));
this.x = (this.x - (tX / 50));
this.y = (this.y - (tY / 50));
if (this.scaleX >= 1){
this.scaleX = (this.scaleY = 1);
this.x = xBorder;
this.y = yBorder;
removeEventListener(Event.ENTER_FRAME, scaleToMax);
initASpeed(Model.rotation);
broadCaster.run("onRoomReady", "");
};
}
public function setPlayer(_arg1:String):void{
if ((((entranceId >= 0)) && (!((cRoomId == 1))))){
exits[entranceId].setEnter();
};
player.InitPlayer(_arg1);
if (((!((_type == "map"))) && (!((manPosition == null))))){
player.resetPosition((manPosition[1] * gridWidth), (manPosition[0] * gridWidth));
};
}
}
}//package game
Section 29
//SettingField (game.SettingField)
package game {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
public class SettingField extends MovieClip {
private var TotalTime:Number;
private var onTxt:Array;
private var alertMc:MovieClip;
public var quaBtn:btnquality;
private var timeTxt:TextField;
private var btn_qua:MovieClip;
private var btn_quit:MovieClip;
private var cookie:Cookie;
public var txt:TextField;
private var highTxt:Array;
private var b_logo:MovieClip;
private var startTime:Number;
public var _b_logo:MovieClip;
public var s_alert:MovieClip;
private var btn_more:MovieClip;
private var soundMgr:SoundManager;
private var offTxt:Array;
private var btn_on:MovieClip;
public var quitBtn:btnquit;
private var _btn_quit:MovieClip;
private var mediumTxt:Array;
public var moreBtn:btnmoreGame;
public var gameTime:Number;
private var btn_back:MovieClip;
public var onBtn:btn_sound;
public function SettingField():void{
onTxt = ["ON", "开", "AAN", "ACTIVÉ", "AN", "WŁĄCZ", "PÅ", "ON", "SÍ", "LIGADO", "HIDUPKAN", "ВКЛЮЧИТЬ", "ON", "ON", "AÇIK", "HIDUPKAN", "LIGADO"];
offTxt = ["OFF", "关", "UIT", "DÉSACTIVÉ", "AUS", "WYŁĄCZ", "AV", "OFF", "NO", "DESLIGADO", "MATIKAN", "ВЫКЛЮЧИТЬ", "OFF", "OFF", "KAPALI", "MATIKAN", "DESLIGADO"];
highTxt = ["HIGH", "高", "HIGH", "HAUTE", "HOCH", "WYSOKA", "HÖG", "ALTA", "ALTA", "ALTA", "TINGGI", "ВЫСОКОЕ", "HIGH", "HIGH", "YÜKSEK", "TINGGI", "ÓPTIMA"];
mediumTxt = ["NORMAL", "普通", "NORMAL", "NORMALE", "NORMAL", "ŚREDNIA", "NORMAL", "NORMALE", "NORMAL", "NORMAL", "NORMAL", "СРЕДНЕЕ", "NORMAL", "NORMAL", "NORMAL", "MEDIUM", "NORMAL"];
cookie = Cookie.getInstance();
soundMgr = SoundManager.getInstance();
TotalTime = ((cookie.getValue("time") == null)) ? 0 : cookie.getValue("time");
startTime = getTimer();
alertMc = (getChildByName("s_alert") as MovieClip);
alertMc.visible = false;
this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
private function init(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, init);
btn_back = (alertMc.getChildByName("backBtn") as MovieClip);
_btn_quit = (alertMc.getChildByName("quitBtn") as MovieClip);
btn_on = (getChildByName("onBtn") as MovieClip);
btn_qua = (getChildByName("quaBtn") as MovieClip);
btn_quit = (getChildByName("quitBtn") as MovieClip);
btn_more = (getChildByName("moreBtn") as MovieClip);
timeTxt = (getChildByName("txt") as TextField);
btn_back.addEventListener(MouseEvent.CLICK, removeAlert, false, 0, true);
_btn_quit.addEventListener(MouseEvent.CLICK, quitGame, false, 0, true);
btn_qua.addEventListener(MouseEvent.CLICK, turnQuality, false, 0, true);
btn_on.addEventListener(MouseEvent.CLICK, turnSound, false, 0, true);
btn_quit.addEventListener(MouseEvent.CLICK, showAlert, false, 0, true);
btn_more.addEventListener(MouseEvent.CLICK, jumpURL, false, 0, true);
b_logo = (getChildByName("_b_logo") as MovieClip);
b_logo.buttonMode = true;
b_logo.addEventListener(MouseEvent.CLICK, jumpURL, false, 0, true);
if (cookie.getValue("soundOn") == false){
SoundManager.getInstance().turnSound(false);
btn_on.txt.text = offTxt[Language._languageNum];
} else {
SoundManager.getInstance().turnSound(true);
btn_on.txt.text = onTxt[Language._languageNum];
};
setQuality(((cookie.getValue("quality") == null)) ? 2 : cookie.getValue("quality"));
}
private function setQuality(_arg1:uint):void{
cookie.saveValue(_arg1, "quality");
switch (_arg1){
case 0:
stage.quality = StageQuality.MEDIUM;
btn_qua.txt.text = mediumTxt[Language._languageNum];
break;
case 1:
stage.quality = StageQuality.HIGH;
btn_qua.txt.text = highTxt[Language._languageNum];
break;
case 2:
stage.quality = StageQuality.MEDIUM;
btn_qua.txt.text = mediumTxt[Language._languageNum];
break;
case 3:
stage.quality = StageQuality.HIGH;
btn_qua.txt.text = highTxt[Language._languageNum];
break;
};
}
private function removeAlert(_arg1:MouseEvent):void{
Model.getInstance().currentRoom.visible = true;
alertMc.visible = false;
Model.disableKeyBoard = false;
}
private function showAlert(_arg1:MouseEvent):void{
if (((((!(Model.disableKeyBoard)) && (!(Model.isGameOver)))) && (!((Model.getInstance().currentRoom == null))))){
Model.getInstance().currentRoom.visible = false;
alertMc.visible = true;
Model.disableKeyBoard = true;
};
}
private function jumpURL(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(Language.url1), "_blank");
}
private function turnSound(_arg1:MouseEvent=null):void{
if (soundMgr.soundOn == true){
soundMgr.turnSound(false);
btn_on.txt.text = offTxt[Language._languageNum];
} else {
soundMgr.turnSound(true);
btn_on.txt.text = onTxt[Language._languageNum];
};
}
public function update():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
gameTime = ((getTimer() - startTime) + TotalTime);
_local1 = Math.floor((gameTime / 3600000));
_local2 = (Math.floor((gameTime / 60000)) % 60);
_local3 = (Math.floor((gameTime / 1000)) % 60);
timeTxt.text = ((((((_local1 > 9)) ? _local1 : (0 + String(_local1)) + " :") + ((_local2 > 9)) ? _local2 : (0 + String(_local2))) + " :") + ((_local3 > 9)) ? _local3 : (0 + String(_local3)));
}
private function turnQuality(_arg1:MouseEvent):void{
setQuality(((cookie.getValue("quality") + 1) % 4));
}
private function quitGame(_arg1:MouseEvent):void{
Model.disableKeyBoard = false;
BroadCaster.getInstance().run("onQuitGame", "");
}
public function saveTime():void{
Model.getInstance().currentData.time = gameTime;
}
}
}//package game
Section 30
//SoundManager (game.SoundManager)
package game {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class SoundManager {
private const MAX_VOLUME:Number = 0.75;
private var voiceTimer:int;
private var bgStartTime:Number;// = -1
private var maxSound:Number;// = 0.75
private var nBgVolume:Number;
public var soundOn:Boolean;
private var nextBg:SoundChannel;
private var currentSign:String;
private var pBgVolume:Number;
private var currentBgVolume:Number;// = -1
private var nextPlay:Boolean;// = false
public var playTable:Object;
public var soundTable:Object;
public static const TYPE_BG:String = "c";
public static const TYPE_MAN:String = "a";
public static const TYPE_BTN:String = "b";
public static const TYPE_ITEM:String = "d";
public static var _instance:SoundManager;
public function SoundManager():void{
maxSound = 0.75;
bgStartTime = -1;
currentBgVolume = -1;
nextPlay = false;
super();
soundTable = new Object();
playTable = new Object();
soundOn = ((Cookie.getInstance().getValue("soundOn") == null)) ? true : Cookie.getInstance().getValue("soundOn");
}
private function voiceDown():void{
pBgVolume = (pBgVolume - 0.025);
nBgVolume = (nBgVolume + 0.025);
if (pBgVolume <= 0){
nextBg.soundTransform = new SoundTransform(maxSound);
playTable[TYPE_BG].soundTransform = new SoundTransform(0);
playTable[TYPE_BG].removeEventListener(Event.SOUND_COMPLETE, onBgComplete);
playTable[TYPE_BG] = nextBg;
playTable[TYPE_BG].addEventListener(Event.SOUND_COMPLETE, onBgComplete, false, 0, true);
nextBg = null;
if (currentSign == "geomBg"){
voiceTimer = setTimeout(bgVoiceDown, 70000, "mainBg");
};
return;
};
nextBg.soundTransform = new SoundTransform(nBgVolume);
playTable[TYPE_BG].soundTransform = new SoundTransform(pBgVolume);
voiceTimer = setTimeout(voiceDown, 100);
}
private function onManSdComplete(_arg1:Event):void{
playSound("manRun", TYPE_MAN, true);
}
public function stopManSound():void{
if (playTable[TYPE_MAN]){
playTable[TYPE_MAN].stop();
try {
playTable[TYPE_MAN].removeEventListener(Event.SOUND_COMPLETE, onManSdComplete);
} catch(e:Error) {
};
playTable[TYPE_MAN] = null;
};
}
private function bgVolumeDown():void{
try {
pBgVolume = (pBgVolume - 0.025);
if (pBgVolume <= 0){
clearAllSounds();
return;
};
currentBgVolume = pBgVolume;
playTable[TYPE_BG].soundTransform = new SoundTransform(pBgVolume);
voiceTimer = setTimeout(bgVolumeDown, 100);
} catch(e:Error) {
clearAllSounds();
};
}
public function loadSound(_arg1:String, _arg2):void{
var _local3:Sound;
_local3 = new (_arg2);
soundTable[_arg1] = _local3;
}
public function loadSounds():void{
loadSound("mainBg", MainBg);
loadSound("geomBg", GeometryBg);
loadSound("getItem", GetItem);
loadSound("pistonFall", PistonFall);
loadSound("doorOpen", DoorOpen);
loadSound("manClimb", ManClimb);
loadSound("manRun", ManRun);
loadSound("manFall", ManFall);
loadSound("manDie", ManDie);
loadSound("manJump", ManJump);
loadSound("mapRotate", MapRotate);
loadSound("splash", Splash);
loadSound("scaleMax", ScaleMax);
loadSound("scaleMin", ScaleMin);
loadSound("btnDown", MenuDown);
}
public function turnSound(_arg1:Boolean):void{
soundOn = _arg1;
Cookie.getInstance().saveValue(_arg1, "soundOn");
if (_arg1){
maxSound = MAX_VOLUME;
} else {
maxSound = 0;
};
if (playTable[TYPE_MAN]){
playTable[TYPE_MAN].soundTransform = new SoundTransform(maxSound);
};
if (playTable[TYPE_BTN]){
playTable[TYPE_BTN].soundTransform = new SoundTransform(maxSound);
};
if (playTable[TYPE_BG]){
playTable[TYPE_BG].soundTransform = new SoundTransform(maxSound);
};
if (playTable[TYPE_ITEM]){
playTable[TYPE_ITEM].soundTransform = new SoundTransform(maxSound);
};
}
public function turnOffBg():void{
try {
clearTimeout(voiceTimer);
} catch(e:Error) {
};
pBgVolume = ((currentBgVolume < 0)) ? maxSound : currentBgVolume;
voiceTimer = setTimeout(bgVolumeDown, 100);
}
private function onBgComplete(_arg1:Event):void{
if (bgStartTime < 0){
bgStartTime = getTimer();
};
_arg1.currentTarget.removeEventListener(Event.SOUND_COMPLETE, onBgComplete);
playTable[TYPE_BG] = null;
if ((((Math.random() > 0.8)) && (((getTimer() - bgStartTime) > 80000)))){
nextPlay = true;
playSound("mainBg", TYPE_BG);
bgStartTime = (getTimer() + 60000);
} else {
playSound("mainBg", TYPE_BG);
};
}
private function bgVoiceDown(_arg1:String):void{
nextPlay = false;
currentSign = _arg1;
pBgVolume = maxSound;
nBgVolume = 0;
nextBg = soundTable[_arg1].play();
nextBg.soundTransform = new SoundTransform(maxSound);
voiceTimer = setTimeout(voiceDown, 100);
}
public function clearAllSounds():void{
bgStartTime = -1;
currentBgVolume = -1;
if (playTable[TYPE_MAN]){
playTable[TYPE_MAN].stop();
try {
playTable[TYPE_MAN].removeEventListener(Event.SOUND_COMPLETE, onManSdComplete);
} catch(e:Error) {
};
};
try {
clearTimeout(voiceTimer);
} catch(e:Error) {
};
if (nextBg){
nextBg.stop();
nextBg = null;
};
if (playTable[TYPE_BTN]){
playTable[TYPE_BTN].stop();
};
if (playTable[TYPE_BG]){
playTable[TYPE_BG].stop();
playTable[TYPE_BG].removeEventListener(Event.SOUND_COMPLETE, onBgComplete);
};
if (playTable[TYPE_ITEM]){
playTable[TYPE_ITEM].stop();
};
playTable = new Object();
}
public function playSound(_arg1:String, _arg2:String="b", _arg3:Boolean=false):void{
var sign = _arg1;
var type = _arg2;
var _repeat = _arg3;
if (soundTable[sign] == null){
return;
};
switch (type){
case TYPE_MAN:
if (playTable[TYPE_MAN]){
playTable[TYPE_MAN].stop();
try {
playTable[TYPE_MAN].removeEventListener(Event.SOUND_COMPLETE, onManSdComplete);
} catch(e:Error) {
};
};
playTable[TYPE_MAN] = soundTable[sign].play();
playTable[TYPE_MAN].soundTransform = new SoundTransform(maxSound);
if (_repeat){
playTable[TYPE_MAN].addEventListener(Event.SOUND_COMPLETE, onManSdComplete, false, 0, true);
};
break;
case TYPE_BTN:
playTable[TYPE_BTN] = soundTable[sign].play();
playTable[TYPE_BTN].soundTransform = new SoundTransform(maxSound);
break;
case TYPE_BG:
if (playTable[TYPE_BG]){
playTable[TYPE_BG].stop();
playTable[TYPE_BG].removeEventListener(Event.SOUND_COMPLETE, onBgComplete);
};
playTable[TYPE_BG] = soundTable[sign].play();
playTable[TYPE_BG].soundTransform = new SoundTransform(maxSound);
if (nextPlay){
bgVoiceDown("geomBg");
};
playTable[TYPE_BG].addEventListener(Event.SOUND_COMPLETE, onBgComplete, false, 0, true);
break;
case TYPE_ITEM:
playTable[TYPE_ITEM] = soundTable[sign].play();
playTable[TYPE_ITEM].soundTransform = new SoundTransform(maxSound);
break;
};
}
public static function getInstance():SoundManager{
if (_instance == null){
_instance = new (SoundManager);
};
return (_instance);
}
}
}//package game
Section 31
//SplashMovie (game.SplashMovie)
package game {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class SplashMovie extends MovieClip {
private var firstPlay:Boolean;// = false
public var warningWords:MovieClip;
public var skipBtn:skip_btn;
private var tm:uint;// = 0
public var skipButton:MovieClip;
public var __LOGO:MovieClip;
public var LOGO:MovieClip;
public var warning:MovieClip;
public var LOGO1:MovieClip;
public function SplashMovie():void{
firstPlay = false;
tm = 0;
super();
addFrameScript(509, frame510, 565, frame566, 603, frame604);
this.x = 320;
this.y = 240;
warningWords = (this.getChildByName("warning") as MovieClip);
skipButton = (this.getChildByName("skipBtn") as MovieClip);
warningWords.visible = false;
this.addEventListener(Event.ENTER_FRAME, checkMovie, false, 0, true);
skipButton.addEventListener(MouseEvent.CLICK, skipMovie, false, 0, true);
}
private function checkMovie(_arg1:Event):void{
if (this.currentFrame >= this.totalFrames){
if (firstPlay){
firstPlay = false;
};
this.removeEventListener(Event.ENTER_FRAME, checkMovie);
BroadCaster.getInstance().run("onSplashDone", "");
stop();
};
}
function frame604(){
LOGO1.gotoAndStop(Language.branding_nr);
}
function frame566(){
LOGO.gotoAndStop(Language.branding_nr);
}
private function removeWarning():void{
try {
clearTimeout(tm);
} catch(Err:Error) {
};
warningWords.visible = false;
}
function frame510(){
__LOGO.gotoAndStop(Language.branding_nr);
}
public function skipMovie(_arg1:MouseEvent=null):void{
this.removeEventListener(Event.ENTER_FRAME, checkMovie);
BroadCaster.getInstance().run("onSplashDone", "");
stop();
}
}
}//package game
Section 32
//ToolBar (game.ToolBar)
package game {
import flash.display.*;
public class ToolBar extends MovieClip {
public var ssset:SettingField;
public var filessss:FielsField;
public var settting:SettingField;
public var files:FielsField;
public var maps:MapField;
public var miniMap:MapField;
public function ToolBar():void{
files = (getChildByName("filessss") as FielsField);
maps = (getChildByName("miniMap") as MapField);
settting = (getChildByName("ssset") as SettingField);
}
public function reset():void{
maps.reset();
files.reset();
}
}
}//package game
Section 33
//UserMenu (game.UserMenu)
package game {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
public class UserMenu extends MovieClip {
private var selectedUser:int;// = -1
private var users:Array;
private var yesBtn:MovieClip;
private var sureBtn:MovieClip;
private var model:Model;
public var alert2:MovieClip;
public var alert:MovieClip;
private var profileDialog:MovieClip;
private var cookie:Cookie;
private var b_logo:MovieClip;
private var confirmDialog:MovieClip;
private var confirmBtn:MovieClip;
public var _b_logo:MovieClip;
private var cancelBtn:MovieClip;
public var profile:MovieClip;
public var list:MovieClip;
private var nameDialog:MovieClip;
private var user_2:MovieClip;
private var nameString:String;// = ""
private var deleteBtn:MovieClip;
private var user_1:MovieClip;
private var user_3:MovieClip;
private var createBtn:MovieClip;
private var alertDialog:MovieClip;
private var listMc:MovieClip;
private var noBtn:MovieClip;
private var okBtn:MovieClip;
public var typeName:MovieClip;
public function UserMenu():void{
selectedUser = -1;
nameString = "";
super();
cookie = Cookie.getInstance();
model = Model.getInstance();
b_logo = (getChildByName("_b_logo") as MovieClip);
listMc = (getChildByName("list") as MovieClip);
nameDialog = (getChildByName("typeName") as MovieClip);
alertDialog = (getChildByName("alert") as MovieClip);
confirmDialog = (getChildByName("alert2") as MovieClip);
profileDialog = (getChildByName("profile") as MovieClip);
deleteBtn = (listMc.getChildByName("btn_delete") as MovieClip);
confirmBtn = (listMc.getChildByName("btn_confirm") as MovieClip);
createBtn = (listMc.getChildByName("btn_create") as MovieClip);
okBtn = (nameDialog.getChildByName("okBtn") as MovieClip);
sureBtn = (confirmDialog.getChildByName("okBtn") as MovieClip);
cancelBtn = (nameDialog.getChildByName("cancelBtn") as MovieClip);
noBtn = (alertDialog.getChildByName("noBtn") as MovieClip);
yesBtn = (alertDialog.getChildByName("yesBtn") as MovieClip);
user_1 = (listMc.getChildByName("user1") as MovieClip);
user_2 = (listMc.getChildByName("user2") as MovieClip);
user_3 = (listMc.getChildByName("user3") as MovieClip);
profileDialog.totalMsg.visible = false;
nameDialog.txt.addEventListener(Event.CHANGE, checkText, false, 0, true);
profileDialog.B_T.addEventListener(MouseEvent.CLICK, profileUser, false, 0, true);
profileDialog.B_1.addEventListener(MouseEvent.CLICK, showEnd, false, 0, true);
profileDialog.B_2.addEventListener(MouseEvent.CLICK, showEnd, false, 0, true);
profileDialog.B_3.addEventListener(MouseEvent.CLICK, showEnd, false, 0, true);
profileDialog.B_4.addEventListener(MouseEvent.CLICK, showEnd, false, 0, true);
sureBtn.addEventListener(MouseEvent.CLICK, hideConfim, false, 0, true);
deleteBtn.addEventListener(MouseEvent.CLICK, deleteUser, false, 0, true);
confirmBtn.addEventListener(MouseEvent.CLICK, confirmUser, false, 0, true);
createBtn.addEventListener(MouseEvent.CLICK, createUser, false, 0, true);
cancelBtn.addEventListener(MouseEvent.CLICK, hideDialog, false, 0, true);
okBtn.addEventListener(MouseEvent.CLICK, submitName, false, 0, true);
noBtn.addEventListener(MouseEvent.CLICK, hideDialog, false, 0, true);
yesBtn.addEventListener(MouseEvent.CLICK, removeUser, false, 0, true);
user_1.addEventListener(MouseEvent.CLICK, onSelectUser, false, 0, true);
user_2.addEventListener(MouseEvent.CLICK, onSelectUser, false, 0, true);
user_3.addEventListener(MouseEvent.CLICK, onSelectUser, false, 0, true);
b_logo.buttonMode = true;
b_logo.addEventListener(MouseEvent.CLICK, jumpURL, false, 0, true);
initNameField();
}
private function showEnd(_arg1:MouseEvent):void{
var _local2:Object;
profileDialog.B_T.setToogle(false);
profileDialog.B_1.setToogle(false);
profileDialog.B_2.setToogle(false);
profileDialog.B_3.setToogle(false);
profileDialog.B_4.setToogle(false);
profileDialog.totalMsg.visible = false;
_arg1.currentTarget.setToogle(true);
_local2 = model.getCurrentData()[("minData" + _arg1.currentTarget.name.split("_")[1])];
_local2 = ((_local2 == null)) ? {time:0, die:0, run:0, rotate:0, jump:0} : _local2;
setProfilePage(_local2.time, _local2.run, _local2.die, _local2.rotate, _local2.jump);
}
private function setSelect(_arg1:int):void{
var _local2:TextField;
var _local3:MovieClip;
_local2 = (listMc.getChildByName(("txt" + _arg1)) as TextField);
user_1.setToogle(false);
user_2.setToogle(false);
user_3.setToogle(false);
_local3 = ((_arg1 == 1)) ? user_1 : ((_arg1 == 2)) ? user_2 : user_3;
_local3.setToogle(true);
selectedUser = _arg1;
alertDialog.visible = false;
nameDialog.visible = false;
confirmDialog.visible = false;
if (_local2.text != ""){
deleteBtn.visible = true;
confirmBtn.visible = true;
createBtn.visible = false;
} else {
deleteBtn.visible = false;
confirmBtn.visible = false;
createBtn.visible = true;
};
profileUser();
}
private function initNameField():void{
var _local1:int;
var _local2:*;
users = cookie.getUsers();
_local1 = 0;
while (_local1 < 3) {
_local2 = (listMc.getChildByName(("txt" + (_local1 + 1))) as TextField);
if (users[_local1] != null){
_local2.text = users[_local1];
if (Model.userName == users[_local1]){
setSelect((_local1 + 1));
};
} else {
_local2.text = "";
};
_local1++;
};
if (selectedUser < 0){
setSelect(1);
};
}
private function profileUser(_arg1:MouseEvent=null):void{
var _local2:TextField;
var _local3:Object;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:Number;
var _local12:*;
var _local13:Number;
var _local14:Number;
var _local15:Number;
_local2 = (listMc.getChildByName(("txt" + selectedUser)) as TextField);
profileDialog.B_T.setToogle(true);
profileDialog.B_1.setToogle(false);
profileDialog.B_2.setToogle(false);
profileDialog.B_3.setToogle(false);
profileDialog.B_4.setToogle(false);
Model.userName = _local2.text;
_local3 = model.getCurrentData();
_local4 = _local3.time;
_local4 = ((_local4 == null)) ? 0 : _local4;
_local5 = _local3.ran;
_local5 = ((_local5 == null)) ? 0 : _local5;
_local6 = _local3.jumped;
_local6 = ((_local6 == null)) ? 0 : _local6;
_local7 = _local3.rotated;
_local7 = ((_local7 == null)) ? 0 : _local7;
_local8 = _local3.died;
_local8 = ((_local8 == null)) ? 0 : _local8;
_local9 = _local3.finished;
_local9 = ((_local9 == null)) ? new Array() : _local9;
_local10 = _local3.cleared;
_local10 = ((_local10 == null)) ? 0 : _local10;
_local11 = 0;
for each (_local12 in _local9) {
_local11 = (_local11 + model.roomLevel[(int(_local12) - 1)]);
};
profileDialog.totalMsg.visible = true;
_local13 = Math.floor((_local4 / 3600000));
_local14 = (Math.floor((_local4 / 60000)) % 60);
_local15 = (Math.floor((_local4 / 1000)) % 60);
profileDialog.totalMsg.timeTxt.text = ((((((_local13 > 9)) ? _local13 : (0 + String(_local13)) + " :") + ((_local14 > 9)) ? _local14 : (0 + String(_local14))) + " :") + ((_local15 > 9)) ? _local15 : (0 + String(_local15)));
profileDialog.totalMsg.diedTxt.text = _local8;
profileDialog.totalMsg.rotateTxt.text = _local7;
profileDialog.totalMsg.jumpTxt.text = _local6;
profileDialog.totalMsg.clearTxt.text = _local10;
profileDialog.totalMsg.completeTxt.text = (Math.round(((_local11 / model.roomLevel[30]) * 100)) + "%");
profileDialog.totalMsg.ranTxt.text = ((Math.round((_local5 * 10)) / 100) + " m");
}
private function deleteUser(_arg1:MouseEvent):void{
alertDialog.visible = true;
}
private function onSelectUser(_arg1:MouseEvent):void{
setSelect(Number(_arg1.currentTarget.name.split("user")[1]));
}
private function setProfilePage(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local6 = Math.floor((_arg1 / 3600000));
_local7 = (Math.floor((_arg1 / 60000)) % 60);
_local8 = (Math.floor((_arg1 / 1000)) % 60);
profileDialog.timeTxt.text = ((((((_local6 > 9)) ? _local6 : (0 + String(_local6)) + " :") + ((_local7 > 9)) ? _local7 : (0 + String(_local7))) + " :") + ((_local8 > 9)) ? _local8 : (0 + String(_local8)));
profileDialog.diedTxt.text = _arg3;
profileDialog.rotateTxt.text = _arg4;
profileDialog.jumpTxt.text = _arg5;
profileDialog.ranTxt.text = ((Math.round((_arg2 * 10)) / 100) + " m");
}
private function hideConfim(_arg1:MouseEvent):void{
confirmDialog.visible = false;
nameDialog.visible = true;
}
private function hideDialog(_arg1:MouseEvent=null):void{
alertDialog.visible = false;
nameDialog.visible = false;
}
private function checkText(_arg1:Event):void{
if (nameDialog.txt.text.length <= 8){
nameString = nameDialog.txt.text;
} else {
nameDialog.txt.text = nameString;
};
}
private function jumpURL(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(Language.url1), "_blank");
}
private function removeUser(_arg1:MouseEvent):void{
var _local2:TextField;
_local2 = (listMc.getChildByName(("txt" + selectedUser)) as TextField);
_local2.text = "";
cookie.removeUserAt(selectedUser);
deleteBtn.visible = false;
confirmBtn.visible = false;
setSelect(selectedUser);
}
private function confirmUser(_arg1:MouseEvent=null):void{
var _local2:TextField;
_local2 = (listMc.getChildByName(("txt" + selectedUser)) as TextField);
BroadCaster.getInstance().run("onEnterGame", "");
parent.removeChild(this);
}
private function submitName(_arg1:MouseEvent=null):void{
var _local2:TextField;
var _local3:String;
var _local4:TextField;
_local2 = (nameDialog.getChildByName("txt") as TextField);
_local3 = _local2.text;
if (_local3 == ""){
return;
};
if (cookie.getUsers().indexOf(_local3) >= 0){
confirmDialog.visible = true;
nameDialog.visible = false;
} else {
cookie.createUser(_local3, selectedUser);
_local4 = (listMc.getChildByName(("txt" + selectedUser)) as TextField);
_local4.text = _local3;
setSelect(selectedUser);
};
}
private function createUser(_arg1:MouseEvent=null):void{
var _local2:TextField;
nameDialog.visible = true;
_local2 = (nameDialog.getChildByName("txt") as TextField);
stage.focus = _local2;
_local2.text = "";
}
}
}//package game
Section 34
//BookGroup (groups.BookGroup)
package groups {
import game.*;
public class BookGroup extends Group {
private var _text:String;// = ""
public function BookGroup(_arg1:String, _arg2:Boolean):void{
_text = "";
super(_arg1, _arg2);
}
override public function removeAllItems():void{
super.removeAllItems();
Model.getInstance().currentRoom.removeBook(this);
}
public function set text(_arg1:String):void{
_text = _arg1;
}
public function get text():String{
return (_text);
}
override public function set rotation(_arg1:Number):void{
this.items[0].rotation = _arg1;
}
}
}//package groups
Section 35
//DoorGroup (groups.DoorGroup)
package groups {
import game.*;
public class DoorGroup extends Group {
public function DoorGroup(_arg1:String, _arg2:Boolean, _arg3:Number=0):void{
super(_arg1, _arg2);
this.itemRotation = _arg3;
}
override public function removeAllItems():void{
Model.getInstance().currentRoom.removeDoor(this);
super.removeAllItems();
}
override public function set rotation(_arg1:Number):void{
this.items[0].rotation = _arg1;
}
}
}//package groups
Section 36
//ExitGroup (groups.ExitGroup)
package groups {
public class ExitGroup extends Group {
public var exitSign:String;
public function ExitGroup(_arg1:String, _arg2:Boolean, _arg3:String):void{
super(_arg1, _arg2);
switch (_arg3.split("")[0]){
case "T":
itemRotation = 0;
break;
case "B":
itemRotation = 180;
break;
case "L":
itemRotation = -90;
break;
case "R":
itemRotation = 90;
break;
};
exitSign = _arg3;
}
public function setEnter():void{
items[0].gotoAndStop(2);
}
}
}//package groups
Section 37
//Group (groups.Group)
package groups {
import game.*;
public class Group {
private var Y2:Object;
public var allStaticItems:Array;
public var xspeedArr:Array;
public var yspeedArr:Array;
public var _type:String;
public var frozen:Boolean;
public var hitted:Array;
public var checked:Boolean;// = false
protected var itemRotation:Number;// = 0
protected var yHitObj:Object;
public var items:Array;
private var X1:Object;
protected var yHit:Object;
private var X3:Object;
private var X4:Object;
private var X2:Object;
public var allActiveItems:Array;
private var Y3:Object;
private var Y4:Object;
public var counter:Number;// = 0
private var Y1:Object;
public function Group(_arg1:String, _arg2:Boolean):void{
itemRotation = 0;
X1 = {a:Model.gravity.x, s:0, t:1, m:Model.MAX_MOVE_SPEED, ps:0};
X2 = {a:Model.gravity.y, s:0, t:1, m:Model.MAX_DROP_SPEED, ps:0};
X3 = {a:-(Model.gravity.x), s:0, t:-1, m:Model.MAX_MOVE_SPEED, ps:0};
X4 = {a:-(Model.gravity.y), s:0, t:-1, m:Model.MAX_DROP_SPEED, ps:0};
Y1 = {a:Model.gravity.y, s:0, t:1, m:Model.MAX_DROP_SPEED, ps:0};
Y2 = {a:-(Model.gravity.x), s:0, t:-1, m:Model.MAX_MOVE_SPEED, ps:0};
Y3 = {a:-(Model.gravity.y), s:0, t:-1, m:Model.MAX_DROP_SPEED, ps:0};
Y4 = {a:Model.gravity.x, s:0, t:1, m:Model.MAX_MOVE_SPEED, ps:0};
checked = false;
counter = 0;
super();
_type = _arg1;
xspeedArr = [X1, X2, X3, X4];
yspeedArr = [Y1, Y2, Y3, Y4];
frozen = _arg2;
resetASpeed(0);
items = new Array();
}
public function set rotation(_arg1:Number):void{
}
public function resetASpeed(_arg1:Number):void{
if (!frozen){
if (_arg1 > 0){
counter++;
} else {
if (_arg1 < 0){
counter--;
};
};
counter = ((counter + 4) % 4);
xspeedArr[counter].s = 0;
yspeedArr[counter].s = 0;
};
}
private function getMin(_arg1:Array):Object{
var _local2:Object;
var _local3:*;
if (_arg1.length < 1){
return ({hit:"none", x:xspeedArr[counter].s, y:yspeedArr[counter].s});
};
_local2 = {x:_arg1[0].x, y:_arg1[0].y};
for each (_local3 in _arg1) {
if ((_local2.x * _local2.x) >= (_local3.x * _local3.x)){
if ((counter % 2) != 0){
yHitObj = _local3.obj;
yHit = _local3.xHit;
};
_local2.x = _local3.x;
};
if ((_local2.y * _local2.y) >= (_local3.y * _local3.y)){
if ((counter % 2) == 0){
yHitObj = _local3.obj;
yHit = _local3.yHit;
};
_local2.y = _local3.y;
};
};
return (_local2);
}
private function addSpeed(_arg1):void{
if (Math.abs((_arg1.s + _arg1.a)) <= _arg1.m){
_arg1.pps = _arg1.ps;
_arg1.ps = _arg1.s;
_arg1.s = (_arg1.s + _arg1.a);
} else {
_arg1.pps = _arg1.ps;
_arg1.ps = _arg1.s;
_arg1.s = ((_arg1.s / Math.abs(_arg1.s)) * _arg1.m);
};
}
public function removeAllItems():void{
var _local1:int;
_local1 = 0;
while (_local1 < items.length) {
items[_local1].remove();
_local1++;
};
}
public function hitTest():void{
var _local1:Array;
var _local2:int;
var _local3:*;
var _local4:*;
var _local5:Object;
if (((!(frozen)) && (!(checked)))){
hitted = new Array();
checked = true;
_local1 = new Array();
_local2 = (items.length - 1);
while (_local2 >= 0) {
_local5 = items[_local2].checkHit();
_local1.push(_local5);
if (((!((_local5.xHit == null))) && (!(((counter % 2) == 0))))){
hitted.push({hit:_local5.xHit, att:_local5.obj});
} else {
if (((!((_local5.yHit == null))) && (((counter % 2) == 0)))){
hitted.push({hit:_local5.yHit, att:_local5.obj});
};
};
_local2--;
};
_local3 = getMin(_local1);
if (Math.abs(_local3.x) < Math.abs(xspeedArr[counter].s)){
xspeedArr[counter].s = 0;
};
if (Math.abs(_local3.y) < Math.abs(yspeedArr[counter].s)){
yspeedArr[counter].s = 0;
};
if (((!((xspeedArr[counter].s == 0))) || (!((yspeedArr[counter].s == 0))))){
Model.isStatic = false;
};
for each (_local4 in items) {
_local4.move(_local3.x, _local3.y);
};
};
}
public function addItem(_arg1):void{
_arg1.group = this;
items.unshift(_arg1);
_arg1.rotation = itemRotation;
}
public function setASpeed(_arg1:Number):void{
counter = (Math.round((_arg1 / 90)) % 4);
xspeedArr[counter].s = 0;
yspeedArr[counter].s = 0;
}
public function stopMoving():void{
xspeedArr[counter].s = 0;
yspeedArr[counter].s = 0;
}
public function updateSpeed():void{
var e:*;
var __i:int;
var __j:int;
var item0Index:int;
var item1Index:int;
var i:int;
var j:int;
var grid:Number;
var maxX:int;
var minX:int;
var maxY:int;
var minY:int;
var _i:int;
var _j:int;
if (!frozen){
if (((Model.isSleep) && ((_type == "man")))){
__i = 0;
while (__i < 18) {
__j = 0;
while (__j < 18) {
item0Index = allActiveItems[__i][__j].indexOf(items[0]);
if (item0Index >= 0){
allActiveItems[__i][__j].splice(item0Index, 1);
};
item1Index = allActiveItems[__i][__j].indexOf(items[1]);
if (item1Index >= 0){
allActiveItems[__i][__j].splice(item1Index, 1);
};
__j = (__j + 1);
};
__i = (__i + 1);
};
};
for each (e in items) {
i = Math.round((e.tx / Model.gridWidth));
j = Math.round((e.ty / Model.gridWidth));
if ((((((((((i >= 0)) && ((i < 18)))) && ((j >= 0)))) && ((j < 18)))) && ((allActiveItems[i][j].indexOf(e) < 0)))){
grid = Model.gridWidth;
maxX = Math.round(((e.tx + (e.itemWidth / 2)) / grid));
minX = Math.round(((e.tx - (e.itemWidth / 2)) / grid));
maxY = Math.round(((e.ty + (e.itemHeight / 2)) / grid));
minY = Math.round(((e.ty - (e.itemHeight / 2)) / grid));
e.maxI = maxY;
e.maxJ = maxX;
e.minI = minY;
e.minJ = minX;
_i = minX;
while (_i <= maxX) {
_j = minY;
while (_j <= maxY) {
try {
allActiveItems[_j][_i].push(e);
} catch(e:Error) {
};
_j = (_j + 1);
};
_i = (_i + 1);
};
};
};
yHitObj = null;
yHit = null;
checked = false;
addSpeed(xspeedArr[counter]);
addSpeed(yspeedArr[counter]);
};
}
}
}//package groups
Section 38
//KeyGroup (groups.KeyGroup)
package groups {
import game.*;
public class KeyGroup extends Group {
public function KeyGroup(_arg1:String, _arg2:Boolean):void{
super(_arg1, _arg2);
}
override public function removeAllItems():void{
super.removeAllItems();
Model.getInstance().currentRoom.removeKey(this);
}
override public function addItem(_arg1):void{
if (frozen){
_arg1.gotoAndStop(2);
} else {
_arg1.gotoAndStop(1);
};
super.addItem(_arg1);
}
override public function set rotation(_arg1:Number):void{
this.items[0].rotation = _arg1;
}
}
}//package groups
Section 39
//ManGroup (groups.ManGroup)
package groups {
import game.*;
import flash.utils.*;
public class ManGroup extends Group {
public var status:String;
private var climbTimber:int;
public var dir:String;// = "right"
private var standTimer:Number;// = 0
private var init:Boolean;// = false
private var up:Boolean;// = false
private var sdManager:SoundManager;
private var xClimb:Number;
private var yClimb:Number;
public var xSpeed:Object;
public var ySpeed:Object;
private var drop:Boolean;// = false
private var thinkTimer:Number;// = 0
private var pDir:String;// = ""
public function ManGroup(_arg1:String, _arg2:Boolean):void{
drop = false;
up = false;
thinkTimer = 0;
standTimer = 0;
dir = "right";
pDir = "";
init = false;
super(_arg1, _arg2);
sdManager = SoundManager.getInstance();
}
override public function set rotation(_arg1:Number):void{
this.items[0].rotation = _arg1;
this.items[1].rotation = _arg1;
}
public function setSize0():void{
items[0].setSize0();
items[1].setSize0();
}
override public function resetASpeed(_arg1:Number):void{
super.resetASpeed(_arg1);
init = true;
}
public function resetPosition(_arg1:Number, _arg2:Number):void{
this.items[0].resetPosition(_arg1, _arg2);
this.items[1].resetPosition(_arg1, _arg2);
}
public function doAction(_arg1:String):void{
var sign:String;
var _man:*;
var _sign = _arg1;
if ((((((status == _sign)) && ((pDir == dir)))) || ((status == "die")))){
return;
};
sign = _sign;
if ((((((((((((status == "land")) || ((status == "climb")))) || ((status == "standUp")))) && (!((_sign == "break"))))) && (!((_sign == "die"))))) && (!((_sign == "climbDone"))))){
return;
};
if ((((((status == "think")) && ((_sign == "stand")))) && (!((_sign == "die"))))){
return;
};
if ((((((status == "think")) && (!((_sign == "down"))))) && (!((_sign == "die"))))){
sign = "standUp";
};
if (_sign == "break"){
sign = "stand";
};
if (_sign == "climbDone"){
sign = "stand";
Model.disableKeyBoard = false;
placePlayer();
};
if ((((status == "die")) && (!((_sign == "die"))))){
return;
};
_man = this.items[0]._man;
if (status == "stand"){
try {
clearTimeout(thinkTimer);
} catch(e:Error) {
};
};
sdManager.stopManSound();
status = sign;
pDir = dir;
switch (sign){
case "run":
_man.gotoAndPlay((dir + "Run"));
sdManager.playSound("manRun", SoundManager.TYPE_MAN, true);
break;
case "stand":
_man.gotoAndPlay((dir + "Stand"));
thinkTimer = setTimeout(doAction, 5000, "think");
break;
case "standUp":
_man.gotoAndPlay((dir + "StandUp"));
setTimeout(doAction, 500, "break");
break;
case "think":
_man.gotoAndPlay((dir + "Think"));
break;
case "up":
sdManager.playSound("manJump", SoundManager.TYPE_MAN);
_man.gotoAndPlay((dir + "Up"));
break;
case "down":
_man.gotoAndPlay((dir + "Down"));
break;
case "land":
sdManager.playSound("manFall", SoundManager.TYPE_MAN);
_man.gotoAndPlay((dir + "Land"));
setTimeout(doAction, 400, "break");
break;
case "climb":
Model.disableKeyBoard = true;
sdManager.playSound("manClimb", SoundManager.TYPE_MAN);
if ((counter % 2) == 0){
if ((xSpeed.t * xClimb) > 0){
dir = "right";
} else {
dir = "left";
};
} else {
if ((xSpeed.t * yClimb) > 0){
dir = "right";
} else {
dir = "left";
};
};
_man.gotoAndPlay((dir + "Climb"));
climbTimber = setTimeout(doAction, 1200, "climbDone");
break;
case "die":
_man.gotoAndPlay((dir + "Die"));
sdManager.playSound("manDie", SoundManager.TYPE_MAN);
setTimeout(showGameOver, 2000);
try {
clearTimeout(climbTimber);
} catch(e:Error) {
};
break;
};
}
private function showGameOver():void{
BroadCaster.getInstance().run("onGameOver", "");
}
public function onPlayerDied():void{
doAction("die");
}
private function placePlayer():void{
items[0].move(xClimb, yClimb);
items[1].move(xClimb, yClimb);
}
public function InitPlayer(_arg1:String):void{
dir = _arg1;
doAction("run");
}
override public function addItem(_arg1):void{
_arg1.group = this;
items.unshift(_arg1);
}
override public function updateSpeed():void{
var _local1:*;
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
xSpeed = (((counter % 2) == 0)) ? xspeedArr[counter] : yspeedArr[counter];
ySpeed = (((counter % 2) == 0)) ? yspeedArr[counter] : xspeedArr[counter];
if ((xSpeed.s * xSpeed.t) > 0){
dir = "right";
} else {
if ((xSpeed.s * xSpeed.t) < 0){
dir = "left";
};
};
if ((((ySpeed.s == 0)) && (((ySpeed.ps * ySpeed.t) > 0)))){
if (yHitObj == items[1]){
_local1 = items[0];
_local2 = items[1];
if ((counter % 2) == 0){
_local5 = ((yHit.tx - _local1.tx) / Math.abs((yHit.tx - _local1.tx)));
_local4 = (((_local2.ty - _local1.ty) / Math.abs((_local2.ty - _local1.ty))) * 20);
_local3 = (_local5 * 7);
if (((((_local3 * xSpeed.t) > 0)) && (Model.KEY_RIGHT))){
xClimb = _local3;
yClimb = _local4;
doAction("climb");
} else {
if (Model.KEY_LEFT){
xClimb = _local3;
yClimb = _local4;
doAction("climb");
} else {
_local1.move(-(_local5), 0);
_local2.move(-(_local5), 0);
};
};
} else {
_local5 = ((yHit.ty - _local1.ty) / Math.abs((yHit.ty - _local1.ty)));
_local4 = (_local5 * 7);
_local3 = (((_local2.tx - _local1.tx) / Math.abs((_local2.tx - _local1.tx))) * 20);
if (((((_local4 * xSpeed.t) > 0)) && (Model.KEY_RIGHT))){
xClimb = _local3;
yClimb = _local4;
doAction("climb");
} else {
if (Model.KEY_LEFT){
xClimb = _local3;
yClimb = _local4;
doAction("climb");
} else {
_local1.move(0, -(_local5));
_local2.move(0, -(_local5));
};
};
};
} else {
xSpeed.a = 0;
xSpeed.s = 0;
if (Math.abs(ySpeed.ps) >= 1){
doAction("land");
};
};
} else {
if ((((((ySpeed.s == 0)) && ((ySpeed.ps == 0)))) && (!(init)))){
Model.ran = (Model.ran + Math.abs(xSpeed.s));
if ((((((((xSpeed.s == 0)) && ((xSpeed.ps == 0)))) && (!(Model.KEY_LEFT)))) && (!(Model.KEY_RIGHT)))){
doAction("stand");
};
if (((Model.KEY_RIGHT) && (Model.KEY_LEFT))){
xSpeed.a = 0;
} else {
if (Model.KEY_LEFT){
doAction("run");
if (((((((!((status == "standUp"))) && (!((status == "think"))))) && (!((status == "land"))))) && (!((status == "climb"))))){
xSpeed.a = (-(xSpeed.t) * 0.5);
};
} else {
if (Model.KEY_RIGHT){
doAction("run");
if (((((((!((status == "standUp"))) && (!((status == "think"))))) && (!((status == "land"))))) && (!((status == "climb"))))){
xSpeed.a = (xSpeed.t * 0.5);
};
} else {
if (xSpeed.s != 0){
xSpeed.a = ((-(xSpeed.s) / Math.abs(xSpeed.s)) * 0.5);
if (Math.abs((Math.round((xSpeed.s * 2)) / 2)) <= 0.5){
xSpeed.a = 0;
xSpeed.s = 0;
};
};
};
};
};
if (Model.KEY_UP){
doAction("up");
if (((((((!((status == "standUp"))) && (!((status == "think"))))) && (!((status == "land"))))) && (!((status == "climb"))))){
ySpeed.s = (-(ySpeed.t) * 6);
Model.jumped++;
};
};
if (Model.KEY_DOWN){
};
} else {
if (((Model.KEY_RIGHT) && (Model.KEY_LEFT))){
xSpeed.a = 0;
} else {
if (Model.KEY_LEFT){
xSpeed.a = ((-(xSpeed.t) * 0.5) * 0.8);
} else {
if (Model.KEY_RIGHT){
xSpeed.a = ((xSpeed.t * 0.5) * 0.8);
} else {
xSpeed.a = 0;
};
};
};
if (((((ySpeed.s * ySpeed.a) < 0)) && (!(up)))){
doAction("up");
} else {
if (((((((ySpeed.s * ySpeed.a) > 0)) && (!(drop)))) && ((Math.abs(ySpeed.s) > 0.5)))){
doAction("down");
};
};
};
};
init = false;
super.updateSpeed();
}
}
}//package groups
Section 40
//PistonGroup (groups.PistonGroup)
package groups {
import game.*;
public class PistonGroup extends Group {
var model:Model;
public function PistonGroup(_arg1:String, _arg2:Boolean):void{
model = Model.getInstance();
super(_arg1, _arg2);
}
public function getYSpeed():Object{
return ((((counter % 2) == 0)) ? yspeedArr[counter] : xspeedArr[counter]);
}
override public function hitTest():void{
var _local1:*;
var _local2:Object;
var _local3:Boolean;
var _local4:*;
var _local5:*;
super.hitTest();
_local1 = model.currentRoom.player;
if (((((((((((!(Model.isGameOver)) && ((yHit == _local1.items[1])))) && ((_local1.ySpeed.s == 0)))) && ((_local1.ySpeed.ps == 0)))) && ((Math.abs((yHit.tx - yHitObj.tx)) < 14)))) && ((Math.abs((yHit.ty - yHitObj.ty)) < 14)))){
_local1.setSize0();
BroadCaster.getInstance().run("onPlayerDied", "hit");
};
_local2 = getYSpeed();
_local3 = false;
if ((((_local2.s == 0)) && ((Math.abs(_local2.ps) > 4)))){
for each (_local4 in hitted) {
if ((((((_local4.hit.group._type == "key")) || ((_local4.hit.group._type == "book")))) || ((_local4.hit.group._type == "man")))){
} else {
if (((((((((((counter % 2) == 0)) && ((Math.abs((_local4.hit.ty - _local4.att.ty)) < 26)))) && ((((_local4.hit.ty - _local4.att.ty) * _local2.ps) > 0)))) && ((Math.abs((_local4.hit.tx - _local4.att.tx)) < 1)))) || (((((((!(((counter % 2) == 0))) && ((Math.abs((_local4.hit.tx - _local4.att.tx)) < 26)))) && ((((_local4.hit.tx - _local4.att.tx) * _local2.ps) > 0)))) && ((Math.abs((_local4.hit.ty - _local4.att.ty)) < 1)))))){
_local3 = true;
_local5 = new Dust();
_local5.rotation = (((Math.atan2((_local4.att.ty - _local4.hit.ty), (_local4.att.tx - _local4.hit.tx)) * 180) / Math.PI) + 90);
_local5.x = ((_local4.hit.tx + _local4.att.tx) / 2);
_local5.y = ((_local4.hit.ty + _local4.att.ty) / 2);
model.currentRoom.topContainer.addChild(_local5);
};
};
};
};
if (_local3){
SoundManager.getInstance().playSound("pistonFall", SoundManager.TYPE_ITEM);
};
}
}
}//package groups
Section 41
//SpecialGroup (groups.SpecialGroup)
package groups {
public class SpecialGroup extends Group {
public var opened:Boolean;// = false
public function SpecialGroup(_arg1:String, _arg2:Boolean, _arg3:Number=0):void{
opened = false;
super(_arg1, _arg2);
this.itemRotation = _arg3;
}
public function open():void{
if (!opened){
this.items[0].gotoAndPlay("open");
};
}
override public function set rotation(_arg1:Number):void{
this.items[0].rotation = _arg1;
}
public function close():void{
if (opened){
this.items[0].gotoAndPlay("close");
};
}
}
}//package groups
Section 42
//SpikeGroup (groups.SpikeGroup)
package groups {
public class SpikeGroup extends Group {
public function SpikeGroup(_arg1:String, _arg2:Boolean, _arg3:Number):void{
super(_arg1, _arg2);
this.itemRotation = _arg3;
}
override public function set rotation(_arg1:Number):void{
this.items[0].rotation = _arg1;
}
}
}//package groups
Section 43
//WindGroup (groups.WindGroup)
package groups {
import game.*;
public class WindGroup extends Group {
public function WindGroup(_arg1:String, _arg2:Boolean):void{
super(_arg1, _arg2);
}
override public function removeAllItems():void{
super.removeAllItems();
Model.getInstance().currentRoom.removeWind(this);
}
}
}//package groups
Section 44
//_blood_1_26 (NE_fla._blood_1_26)
package NE_fla {
import flash.display.*;
public dynamic class _blood_1_26 extends MovieClip {
public function _blood_1_26(){
addFrameScript(26, frame27);
}
function frame27(){
stop();
}
}
}//package NE_fla
Section 45
//_blood_3_27 (NE_fla._blood_3_27)
package NE_fla {
import flash.display.*;
public dynamic class _blood_3_27 extends MovieClip {
public function _blood_3_27(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package NE_fla
Section 46
//alert2_179 (NE_fla.alert2_179)
package NE_fla {
import flash.display.*;
public dynamic class alert2_179 extends MovieClip {
public var okBtn:OKBtn;
}
}//package NE_fla
Section 47
//alertMc_173 (NE_fla.alertMc_173)
package NE_fla {
import flash.display.*;
public dynamic class alertMc_173 extends MovieClip {
public var yesBtn:bt_y;
public var noBtn:bt_no;
}
}//package NE_fla
Section 48
//branding_aligned_right_162 (NE_fla.branding_aligned_right_162)
package NE_fla {
import game.*;
import flash.display.*;
public dynamic class branding_aligned_right_162 extends MovieClip {
public var hitarea_url1:SimpleButton;
public function branding_aligned_right_162(){
addFrameScript(1, frame2);
}
function frame2(){
gotoAndStop(Language.branding_nr);
}
}
}//package NE_fla
Section 49
//climb_24 (NE_fla.climb_24)
package NE_fla {
import flash.display.*;
public dynamic class climb_24 extends MovieClip {
public function climb_24(){
addFrameScript(73, frame74);
}
function frame74(){
stop();
}
}
}//package NE_fla
Section 50
//climb_p_39 (NE_fla.climb_p_39)
package NE_fla {
import flash.display.*;
public dynamic class climb_p_39 extends MovieClip {
public function climb_p_39(){
addFrameScript(106, frame107);
}
function frame107(){
stop();
}
}
}//package NE_fla
Section 51
//die_25 (NE_fla.die_25)
package NE_fla {
import flash.display.*;
public dynamic class die_25 extends MovieClip {
public function die_25(){
addFrameScript(81, frame82);
}
function frame82(){
stop();
}
}
}//package NE_fla
Section 52
//die_p_40 (NE_fla.die_p_40)
package NE_fla {
import flash.display.*;
public dynamic class die_p_40 extends MovieClip {
public function die_p_40(){
addFrameScript(81, frame82);
}
function frame82(){
stop();
}
}
}//package NE_fla
Section 53
//fileBg_48 (NE_fla.fileBg_48)
package NE_fla {
import flash.display.*;
public dynamic class fileBg_48 extends MovieClip {
public function fileBg_48(){
addFrameScript(3, frame4, 8, frame9);
}
function frame4(){
stop();
}
function frame9(){
stop();
}
}
}//package NE_fla
Section 54
//fileHandle_49 (NE_fla.fileHandle_49)
package NE_fla {
import flash.display.*;
public dynamic class fileHandle_49 extends MovieClip {
public function fileHandle_49(){
addFrameScript(0, frame1, 4, frame5, 5, frame6, 9, frame10, 10, frame11, 15, frame16);
}
function frame10(){
stop();
}
function frame6(){
stop();
}
function frame16(){
stop();
}
function frame1(){
stop();
}
function frame5(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 55
//jump_20 (NE_fla.jump_20)
package NE_fla {
import flash.display.*;
public dynamic class jump_20 extends MovieClip {
public function jump_20(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 56
//land_23 (NE_fla.land_23)
package NE_fla {
import flash.display.*;
public dynamic class land_23 extends MovieClip {
public function land_23(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package NE_fla
Section 57
//land_p_38 (NE_fla.land_p_38)
package NE_fla {
import flash.display.*;
public dynamic class land_p_38 extends MovieClip {
public function land_p_38(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package NE_fla
Section 58
//list_168 (NE_fla.list_168)
package NE_fla {
import flash.display.*;
import flash.text.*;
public dynamic class list_168 extends MovieClip {
public var btn_create:btn_Create;
public var txt1:TextField;
public var txt2:TextField;
public var txt3:TextField;
public var user1:userLine;
public var user2:userLine;
public var user3:userLine;
public var btn_confirm:btn_Confirm;
public var btn_delete:btn_Delete;
}
}//package NE_fla
Section 59
//logo_s_56 (NE_fla.logo_s_56)
package NE_fla {
import game.*;
import flash.display.*;
public dynamic class logo_s_56 extends MovieClip {
public var hitarea_url1:SimpleButton;
public function logo_s_56(){
addFrameScript(1, frame2);
}
function frame2(){
gotoAndStop(Language.branding_nr);
}
}
}//package NE_fla
Section 60
//luo_34 (NE_fla.luo_34)
package NE_fla {
import flash.display.*;
public dynamic class luo_34 extends MovieClip {
public function luo_34(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package NE_fla
Section 61
//manitem_16 (NE_fla.manitem_16)
package NE_fla {
import flash.display.*;
public dynamic class manitem_16 extends MovieClip {
public var jump:MovieClip;
public var run:MovieClip;
public function manitem_16(){
addFrameScript(8, frame9, 18, frame19, 24, frame25, 30, frame31, 37, frame38, 44, frame45, 50, frame51, 58, frame59, 65, frame66, 74, frame75, 87, frame88, 101, frame102, 109, frame110, 117, frame118, 126, frame127, 136, frame137, 144, frame145, 153, frame154);
}
function frame75(){
stop();
}
function frame154(){
stop();
}
function frame88(){
stop();
}
function frame102(){
stop();
}
function frame19(){
stop();
}
function frame25(){
stop();
}
function frame9(){
stop();
}
function frame110(){
stop();
}
function frame38(){
stop();
}
function frame127(){
stop();
}
function frame31(){
stop();
}
function frame45(){
gotoAndPlay("up");
}
function frame51(){
stop();
}
function frame137(){
stop();
}
function frame59(){
stop();
}
function frame145(){
stop();
}
function frame66(){
stop();
}
function frame118(){
stop();
}
}
}//package NE_fla
Section 62
//manItem2_29 (NE_fla.manItem2_29)
package NE_fla {
import flash.display.*;
public dynamic class manItem2_29 extends MovieClip {
public var run:MovieClip;
public function manItem2_29(){
addFrameScript(8, frame9, 18, frame19, 24, frame25, 30, frame31, 37, frame38, 44, frame45, 50, frame51, 58, frame59, 65, frame66, 74, frame75, 87, frame88, 101, frame102, 109, frame110, 117, frame118, 126, frame127, 136, frame137, 144, frame145, 153, frame154);
}
function frame75(){
stop();
}
function frame154(){
stop();
}
function frame88(){
stop();
}
function frame102(){
stop();
}
function frame19(){
stop();
}
function frame25(){
stop();
}
function frame9(){
stop();
}
function frame110(){
stop();
}
function frame38(){
stop();
}
function frame127(){
stop();
}
function frame31(){
stop();
}
function frame45(){
gotoAndPlay("up");
}
function frame51(){
stop();
}
function frame137(){
stop();
}
function frame59(){
stop();
}
function frame145(){
stop();
}
function frame66(){
stop();
}
function frame118(){
stop();
}
}
}//package NE_fla
Section 63
//mapMc_108 (NE_fla.mapMc_108)
package NE_fla {
import flash.display.*;
public dynamic class mapMc_108 extends MovieClip {
public var room11:MovieClip;
public var room12:MovieClip;
public var room14:MovieClip;
public var room15:MovieClip;
public var room19:MovieClip;
public var room13:MovieClip;
public var room17:MovieClip;
public var room22:MovieClip;
public var room24:MovieClip;
public var room26:MovieClip;
public var room23:MovieClip;
public var room21:MovieClip;
public var room25:MovieClip;
public var room29:MovieClip;
public var room30:MovieClip;
public var room27:MovieClip;
public var room28:MovieClip;
public var room10:MovieClip;
public var room20:MovieClip;
public var room16:MovieClip;
public var room18:MovieClip;
public var room2:MovieClip;
public var room4:MovieClip;
public var room1:MovieClip;
public var room5:MovieClip;
public var room6:MovieClip;
public var room8:MovieClip;
public var room9:MovieClip;
public var room7:MovieClip;
public var room3:MovieClip;
}
}//package NE_fla
Section 64
//profilePage_165 (NE_fla.profilePage_165)
package NE_fla {
import flash.display.*;
import flash.text.*;
public dynamic class profilePage_165 extends MovieClip {
public var diedTxt:TextField;
public var rotateTxt:TextField;
public var timeTxt:TextField;
public var jumpTxt:TextField;
public var B_2:bttt;
public var B_3:bttt;
public var B_4:bttt;
public var B_1:bttt;
public var B_T:bttt;
public var totalMsg:MovieClip;
public var ranTxt:TextField;
}
}//package NE_fla
Section 65
//quitAlert_104 (NE_fla.quitAlert_104)
package NE_fla {
import flash.display.*;
public dynamic class quitAlert_104 extends MovieClip {
public var backBtn:bt_b;
public var quitBtn:bt_q;
}
}//package NE_fla
Section 66
//r_total_166 (NE_fla.r_total_166)
package NE_fla {
import flash.display.*;
import flash.text.*;
public dynamic class r_total_166 extends MovieClip {
public var diedTxt:TextField;
public var clearTxt:TextField;
public var rotateTxt:TextField;
public var timeTxt:TextField;
public var jumpTxt:TextField;
public var completeTxt:TextField;
public var ranTxt:TextField;
public var nameTxt:TextField;
}
}//package NE_fla
Section 67
//rock_3 (NE_fla.rock_3)
package NE_fla {
import flash.display.*;
public dynamic class rock_3 extends MovieClip {
public function rock_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NE_fla
Section 68
//s1_109 (NE_fla.s1_109)
package NE_fla {
import flash.display.*;
public dynamic class s1_109 extends MovieClip {
public function s1_109(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 69
//s10_118 (NE_fla.s10_118)
package NE_fla {
import flash.display.*;
public dynamic class s10_118 extends MovieClip {
public function s10_118(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 70
//s11_119 (NE_fla.s11_119)
package NE_fla {
import flash.display.*;
public dynamic class s11_119 extends MovieClip {
public function s11_119(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 71
//s12_120 (NE_fla.s12_120)
package NE_fla {
import flash.display.*;
public dynamic class s12_120 extends MovieClip {
public function s12_120(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 72
//s13_121 (NE_fla.s13_121)
package NE_fla {
import flash.display.*;
public dynamic class s13_121 extends MovieClip {
public function s13_121(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 73
//s14_122 (NE_fla.s14_122)
package NE_fla {
import flash.display.*;
public dynamic class s14_122 extends MovieClip {
public function s14_122(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 74
//s15_123 (NE_fla.s15_123)
package NE_fla {
import flash.display.*;
public dynamic class s15_123 extends MovieClip {
public function s15_123(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 75
//s16_124 (NE_fla.s16_124)
package NE_fla {
import flash.display.*;
public dynamic class s16_124 extends MovieClip {
public function s16_124(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 76
//s17_125 (NE_fla.s17_125)
package NE_fla {
import flash.display.*;
public dynamic class s17_125 extends MovieClip {
public function s17_125(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 77
//s2_110 (NE_fla.s2_110)
package NE_fla {
import flash.display.*;
public dynamic class s2_110 extends MovieClip {
public function s2_110(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 78
//s3_111 (NE_fla.s3_111)
package NE_fla {
import flash.display.*;
public dynamic class s3_111 extends MovieClip {
public function s3_111(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 79
//s4_112 (NE_fla.s4_112)
package NE_fla {
import flash.display.*;
public dynamic class s4_112 extends MovieClip {
public function s4_112(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 80
//s5_113 (NE_fla.s5_113)
package NE_fla {
import flash.display.*;
public dynamic class s5_113 extends MovieClip {
public function s5_113(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 81
//s6_114 (NE_fla.s6_114)
package NE_fla {
import flash.display.*;
public dynamic class s6_114 extends MovieClip {
public function s6_114(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 82
//s7_115 (NE_fla.s7_115)
package NE_fla {
import flash.display.*;
public dynamic class s7_115 extends MovieClip {
public function s7_115(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 83
//s8_116 (NE_fla.s8_116)
package NE_fla {
import flash.display.*;
public dynamic class s8_116 extends MovieClip {
public function s8_116(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 84
//s9_117 (NE_fla.s9_117)
package NE_fla {
import flash.display.*;
public dynamic class s9_117 extends MovieClip {
public function s9_117(){
addFrameScript(2, frame3, 6, frame7, 10, frame11);
}
function frame3(){
stop();
}
function frame7(){
stop();
}
function frame11(){
stop();
}
}
}//package NE_fla
Section 85
//stand_up_22 (NE_fla.stand_up_22)
package NE_fla {
import flash.display.*;
public dynamic class stand_up_22 extends MovieClip {
public function stand_up_22(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package NE_fla
Section 86
//stand_up_p_37 (NE_fla.stand_up_p_37)
package NE_fla {
import flash.display.*;
public dynamic class stand_up_p_37 extends MovieClip {
public function stand_up_p_37(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package NE_fla
Section 87
//Symbol1_183 (NE_fla.Symbol1_183)
package NE_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol1_183 extends MovieClip {
public var diedTxt:TextField;
public var rotateTxt:TextField;
public var timeTxt:TextField;
public var jumpTxt:TextField;
public var endTxt:TextField;
public var ranTxt:TextField;
}
}//package NE_fla
Section 88
//think_18 (NE_fla.think_18)
package NE_fla {
import flash.display.*;
public dynamic class think_18 extends MovieClip {
public function think_18(){
addFrameScript(335, frame336);
}
function frame336(){
gotoAndPlay("smoke");
}
}
}//package NE_fla
Section 89
//think_p_31 (NE_fla.think_p_31)
package NE_fla {
import flash.display.*;
public dynamic class think_p_31 extends MovieClip {
public function think_p_31(){
addFrameScript(335, frame336);
}
function frame336(){
gotoAndPlay("smoke");
}
}
}//package NE_fla
Section 90
//typename_176 (NE_fla.typename_176)
package NE_fla {
import flash.display.*;
import flash.text.*;
public dynamic class typename_176 extends MovieClip {
public var txt:TextField;
public var cancelBtn:bt_c;
public var okBtn:bt_s;
}
}//package NE_fla
Section 91
//bt_b (bt_b)
package {
import game.*;
public dynamic class bt_b extends Button {
public function bt_b(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 92
//bt_c (bt_c)
package {
import game.*;
public dynamic class bt_c extends Button {
public function bt_c(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 93
//bt_no (bt_no)
package {
import game.*;
public dynamic class bt_no extends Button {
public function bt_no(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 94
//bt_q (bt_q)
package {
import game.*;
public dynamic class bt_q extends Button {
public function bt_q(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 95
//bt_s (bt_s)
package {
import game.*;
public dynamic class bt_s extends Button {
public function bt_s(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 96
//bt_y (bt_y)
package {
import game.*;
public dynamic class bt_y extends Button {
public function bt_y(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 97
//btn_Confirm (btn_Confirm)
package {
import game.*;
public dynamic class btn_Confirm extends Button {
public function btn_Confirm(){
addFrameScript(4, frame5, 10, frame11, 17, frame18);
}
function frame18(){
stop();
}
function frame5(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 98
//btn_Create (btn_Create)
package {
import game.*;
public dynamic class btn_Create extends Button {
public function btn_Create(){
addFrameScript(4, frame5, 10, frame11, 17, frame18);
}
function frame18(){
stop();
}
function frame5(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 99
//btn_Delete (btn_Delete)
package {
import game.*;
public dynamic class btn_Delete extends Button {
public function btn_Delete(){
addFrameScript(4, frame5, 10, frame11, 17, frame18);
}
function frame18(){
stop();
}
function frame5(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 100
//btn_end (btn_end)
package {
import game.*;
public dynamic class btn_end extends Button {
public function btn_end(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 101
//btn_sound (btn_sound)
package {
import game.*;
public dynamic class btn_sound extends Button {
public function btn_sound(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 102
//btnmoreGame (btnmoreGame)
package {
import game.*;
public dynamic class btnmoreGame extends Button {
public function btnmoreGame(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 103
//btnquality (btnquality)
package {
import game.*;
public dynamic class btnquality extends Button {
public function btnquality(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 104
//btnquit (btnquit)
package {
import game.*;
public dynamic class btnquit extends Button {
public function btnquit(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 105
//bttt (bttt)
package {
import game.*;
public dynamic class bttt extends Button {
public function bttt(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 106
//DoorOpen (DoorOpen)
package {
import flash.media.*;
public dynamic class DoorOpen extends Sound {
}
}//package
Section 107
//Dust (Dust)
package {
import flash.display.*;
public dynamic class Dust extends MovieClip {
public function Dust(){
addFrameScript(46, frame47);
}
function frame47(){
if (loaderInfo != null){
parent.removeChild(this);
};
}
}
}//package
Section 108
//GeometryBg (GeometryBg)
package {
import flash.media.*;
public dynamic class GeometryBg extends Sound {
}
}//package
Section 109
//GetItem (GetItem)
package {
import flash.media.*;
public dynamic class GetItem extends Sound {
}
}//package
Section 110
//MainBg (MainBg)
package {
import flash.media.*;
public dynamic class MainBg extends Sound {
}
}//package
Section 111
//ManClimb (ManClimb)
package {
import flash.media.*;
public dynamic class ManClimb extends Sound {
}
}//package
Section 112
//ManDie (ManDie)
package {
import flash.media.*;
public dynamic class ManDie extends Sound {
}
}//package
Section 113
//ManFall (ManFall)
package {
import flash.media.*;
public dynamic class ManFall extends Sound {
}
}//package
Section 114
//ManJump (ManJump)
package {
import flash.media.*;
public dynamic class ManJump extends Sound {
}
}//package
Section 115
//ManRun (ManRun)
package {
import flash.media.*;
public dynamic class ManRun extends Sound {
}
}//package
Section 116
//Map (Map)
package {
import flash.display.*;
public dynamic class Map extends MovieClip {
public var hiddenRoom:MovieClip;
}
}//package
Section 117
//MapRotate (MapRotate)
package {
import flash.media.*;
public dynamic class MapRotate extends Sound {
}
}//package
Section 118
//MenuDown (MenuDown)
package {
import flash.media.*;
public dynamic class MenuDown extends Sound {
}
}//package
Section 119
//OKBtn (OKBtn)
package {
import game.*;
public dynamic class OKBtn extends Button {
public function OKBtn(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 120
//PistonFall (PistonFall)
package {
import flash.media.*;
public dynamic class PistonFall extends Sound {
}
}//package
Section 121
//ScaleMax (ScaleMax)
package {
import flash.media.*;
public dynamic class ScaleMax extends Sound {
}
}//package
Section 122
//ScaleMin (ScaleMin)
package {
import flash.media.*;
public dynamic class ScaleMin extends Sound {
}
}//package
Section 123
//scrollbar (scrollbar)
package {
import game.*;
public dynamic class scrollbar extends Button {
public function scrollbar(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 124
//skip_btn (skip_btn)
package {
import game.*;
public dynamic class skip_btn extends Button {
public function skip_btn(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 125
//Splash (Splash)
package {
import flash.media.*;
public dynamic class Splash extends Sound {
}
}//package
Section 126
//userLine (userLine)
package {
import game.*;
public dynamic class userLine extends Button {
public function userLine(){
addFrameScript(4, frame5, 10, frame11, 17, frame18);
}
function frame18(){
stop();
}
function frame5(){
stop();
}
function frame11(){
stop();
}
}
}//package