Section 1
//NewgroundsAPIAsset_API_Conencted_4 (APIConnector_fla.NewgroundsAPIAsset_API_Conencted_4)
package APIConnector_fla {
import flash.display.*;
import com.newgrounds.components.*;
public dynamic class NewgroundsAPIAsset_API_Conencted_4 extends MovieClip {
public function NewgroundsAPIAsset_API_Conencted_4(){
addFrameScript(36, this.frame37);
}
function frame37(){
APIConnector(parent).clear();
}
}
}//package APIConnector_fla
Section 2
//NewgroundsAPIAsset_ConnectingAPI_2 (APIConnector_fla.NewgroundsAPIAsset_ConnectingAPI_2)
package APIConnector_fla {
import flash.display.*;
public dynamic class NewgroundsAPIAsset_ConnectingAPI_2 extends MovieClip {
public function NewgroundsAPIAsset_ConnectingAPI_2(){
addFrameScript(9, this.frame10);
}
function frame10(){
stop();
}
}
}//package APIConnector_fla
Section 3
//NewgroundsAPIAsset_Connection_Error_7 (APIConnector_fla.NewgroundsAPIAsset_Connection_Error_7)
package APIConnector_fla {
import flash.display.*;
import com.newgrounds.components.*;
public dynamic class NewgroundsAPIAsset_Connection_Error_7 extends MovieClip {
public function NewgroundsAPIAsset_Connection_Error_7(){
addFrameScript(9, this.frame10, 20, this.frame21);
}
function frame10(){
stop();
}
function frame21(){
APIConnector(parent).clear();
}
}
}//package APIConnector_fla
Section 4
//NewgroundsAPIAsset_Load_Indicator_3 (APIConnector_fla.NewgroundsAPIAsset_Load_Indicator_3)
package APIConnector_fla {
import flash.events.*;
import flash.display.*;
public dynamic class NewgroundsAPIAsset_Load_Indicator_3 extends MovieClip {
public function NewgroundsAPIAsset_Load_Indicator_3(){
addFrameScript(0, this.frame1);
}
public function onEnterFrame(_arg1:Event):void{
if (((visible) && (stage))){
rotation = (rotation + 30);
} else {
removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
};
}
function frame1(){
addEventListener(Event.ENTER_FRAME, this.onEnterFrame);
}
}
}//package APIConnector_fla
Section 5
//NewgroundsAPIAsset_Login_Warning_5 (APIConnector_fla.NewgroundsAPIAsset_Login_Warning_5)
package APIConnector_fla {
import flash.display.*;
import com.newgrounds.components.*;
public dynamic class NewgroundsAPIAsset_Login_Warning_5 extends MovieClip {
public function NewgroundsAPIAsset_Login_Warning_5(){
addFrameScript(9, this.frame10, 20, this.frame21);
}
function frame10(){
stop();
}
function frame21(){
APIConnector(parent).clear();
}
}
}//package APIConnector_fla
Section 6
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import flash.utils.*;
import com.adobe.utils.*;
public class MD5 {
public static var digest:ByteArray;
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int;
_local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
public static function hashBinary(_arg1:ByteArray):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
_local2 = 1732584193;
_local3 = -271733879;
_local4 = -1732584194;
_local5 = 271733878;
_local10 = createBlocks(_arg1);
_local11 = _local10.length;
_local12 = 0;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
digest = new ByteArray();
digest.writeInt(_local2);
digest.writeInt(_local3);
digest.writeInt(_local4);
digest.writeInt(_local5);
digest.position = 0;
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hashBytes(_arg1:ByteArray):String{
return (hashBinary(_arg1));
}
}
}//package com.adobe.crypto
Section 7
//PNGEncoder (com.adobe.images.PNGEncoder)
package com.adobe.images {
import flash.display.*;
import flash.utils.*;
public class PNGEncoder {
private static var crcTable:Array;
private static var crcTableComputed:Boolean = false;
public function encode(_arg1:BitmapData):ByteArray{
var _local2:ByteArray;
var _local3:ByteArray;
var _local4:ByteArray;
var _local5:int;
var _local6:uint;
var _local7:int;
_local2 = new ByteArray();
_local2.writeUnsignedInt(2303741511);
_local2.writeUnsignedInt(218765834);
_local3 = new ByteArray();
_local3.writeInt(_arg1.width);
_local3.writeInt(_arg1.height);
_local3.writeUnsignedInt(134610944);
_local3.writeByte(0);
writeChunk(_local2, 1229472850, _local3);
_local4 = new ByteArray();
_local5 = 0;
while (_local5 < _arg1.height) {
_local4.writeByte(0);
if (!_arg1.transparent){
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | 0xFF)));
_local7++;
};
} else {
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel32(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | (_local6 >>> 24))));
_local7++;
};
};
_local5++;
};
_local4.compress();
writeChunk(_local2, 1229209940, _local4);
writeChunk(_local2, 1229278788, null);
return (_local2);
}
private static function writeChunk(_arg1:ByteArray, _arg2:uint, _arg3:ByteArray):void{
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:int;
var _local8:uint;
var _local9:uint;
var _local10:uint;
if (!crcTableComputed){
crcTableComputed = true;
crcTable = [];
_local9 = 0;
while (_local9 < 0x0100) {
_local8 = _local9;
_local10 = 0;
while (_local10 < 8) {
if ((_local8 & 1)){
_local8 = uint((uint(3988292384) ^ uint((_local8 >>> 1))));
} else {
_local8 = uint((_local8 >>> 1));
};
_local10++;
};
crcTable[_local9] = _local8;
_local9++;
};
};
_local4 = 0;
if (_arg3 != null){
_local4 = _arg3.length;
};
_arg1.writeUnsignedInt(_local4);
_local5 = _arg1.position;
_arg1.writeUnsignedInt(_arg2);
if (_arg3 != null){
_arg1.writeBytes(_arg3);
};
_local6 = _arg1.position;
_arg1.position = _local5;
_local8 = 4294967295;
_local7 = 0;
while (_local7 < (_local6 - _local5)) {
_local8 = uint((crcTable[((_local8 ^ _arg1.readUnsignedByte()) & uint(0xFF))] ^ uint((_local8 >>> 8))));
_local7++;
};
_local8 = uint((_local8 ^ uint(4294967295)));
_arg1.position = _local6;
_arg1.writeUnsignedInt(_local8);
}
}
}//package com.adobe.images
Section 8
//JSON (com.adobe.serialization.json.JSON)
package com.adobe.serialization.json {
public class JSON {
public static function decode(_arg1:String){
var _local2:JSONDecoder;
_local2 = new JSONDecoder(_arg1);
return (_local2.getValue());
}
public static function encode(_arg1:Object):String{
var _local2:JSONEncoder;
_local2 = new JSONEncoder(_arg1);
return (_local2.getString());
}
}
}//package com.adobe.serialization.json
Section 9
//JSONDecoder (com.adobe.serialization.json.JSONDecoder)
package com.adobe.serialization.json {
public class JSONDecoder {
private var value;
private var tokenizer:JSONTokenizer;
private var token:JSONToken;
public function JSONDecoder(_arg1:String){
tokenizer = new JSONTokenizer(_arg1);
nextToken();
value = parseValue();
}
private function nextToken():JSONToken{
return ((token = tokenizer.getNextToken()));
}
private function parseObject():Object{
var _local1:Object;
var _local2:String;
_local1 = new Object();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
while (true) {
if (token.type == JSONTokenType.STRING){
_local2 = String(token.value);
nextToken();
if (token.type == JSONTokenType.COLON){
nextToken();
_local1[_local2] = parseValue();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
if (token.type == JSONTokenType.COMMA){
nextToken();
} else {
tokenizer.parseError(("Expecting } or , but found " + token.value));
};
} else {
tokenizer.parseError(("Expecting : but found " + token.value));
};
} else {
tokenizer.parseError(("Expecting string but found " + token.value));
};
};
return (null);
}
private function parseArray():Array{
var _local1:Array;
_local1 = new Array();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
while (true) {
_local1.push(parseValue());
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
if (token.type == JSONTokenType.COMMA){
nextToken();
} else {
tokenizer.parseError(("Expecting ] or , but found " + token.value));
};
};
return (null);
}
public function getValue(){
return (value);
}
private function parseValue():Object{
if (token == null){
tokenizer.parseError("Unexpected end of input");
};
switch (token.type){
case JSONTokenType.LEFT_BRACE:
return (parseObject());
case JSONTokenType.LEFT_BRACKET:
return (parseArray());
case JSONTokenType.STRING:
case JSONTokenType.NUMBER:
case JSONTokenType.TRUE:
case JSONTokenType.FALSE:
case JSONTokenType.NULL:
return (token.value);
default:
tokenizer.parseError(("Unexpected " + token.value));
};
return (null);
}
}
}//package com.adobe.serialization.json
Section 10
//JSONEncoder (com.adobe.serialization.json.JSONEncoder)
package com.adobe.serialization.json {
import flash.utils.*;
public class JSONEncoder {
private var jsonString:String;
public function JSONEncoder(_arg1){
jsonString = convertToString(_arg1);
}
private function arrayToString(_arg1:Array):String{
var _local2:String;
var _local3:int;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + convertToString(_arg1[_local3]));
_local3++;
};
return ((("[" + _local2) + "]"));
}
private function convertToString(_arg1):String{
if ((_arg1 is String)){
return (escapeString((_arg1 as String)));
};
if ((_arg1 is Number)){
return ((isFinite((_arg1 as Number))) ? _arg1.toString() : "null");
} else {
if ((_arg1 is Boolean)){
return ((_arg1) ? "true" : "false");
} else {
if ((_arg1 is Array)){
return (arrayToString((_arg1 as Array)));
};
if ((((_arg1 is Object)) && (!((_arg1 == null))))){
return (objectToString(_arg1));
};
};
};
return ("null");
}
private function escapeString(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:Number;
var _local5:int;
var _local6:String;
var _local7:String;
_local2 = "";
_local4 = _arg1.length;
_local5 = 0;
while (_local5 < _local4) {
_local3 = _arg1.charAt(_local5);
switch (_local3){
case "\"":
_local2 = (_local2 + "\\\"");
break;
case "\\":
_local2 = (_local2 + "\\\\");
break;
case "\b":
_local2 = (_local2 + "\\b");
break;
case "\f":
_local2 = (_local2 + "\\f");
break;
case "\n":
_local2 = (_local2 + "\\n");
break;
case "\r":
_local2 = (_local2 + "\\r");
break;
case "\t":
_local2 = (_local2 + "\\t");
break;
default:
if (_local3 < " "){
_local6 = _local3.charCodeAt(0).toString(16);
_local7 = ((_local6.length == 2)) ? "00" : "000";
_local2 = (_local2 + (("\\u" + _local7) + _local6));
} else {
_local2 = (_local2 + _local3);
};
};
_local5++;
};
return ((("\"" + _local2) + "\""));
}
private function objectToString(_arg1:Object):String{
var s:String;
var classInfo:XML;
var value:Object;
var key:String;
var v:XML;
var o = _arg1;
s = "";
classInfo = describeType(o);
if (classInfo.@name.toString() == "Object"){
for (key in o) {
value = o[key];
if ((value is Function)){
} else {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((escapeString(key) + ":") + convertToString(value)));
};
};
} else {
for each (v in classInfo..*.(((name() == "variable")) || ((name() == "accessor")))) {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((escapeString(v.@name.toString()) + ":") + convertToString(o[v.@name])));
};
};
return ((("{" + s) + "}"));
}
public function getString():String{
return (jsonString);
}
}
}//package com.adobe.serialization.json
Section 11
//JSONParseError (com.adobe.serialization.json.JSONParseError)
package com.adobe.serialization.json {
public class JSONParseError extends Error {
private var _text:String;
private var _location:int;
public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){
super(_arg1);
name = "JSONParseError";
_location = _arg2;
_text = _arg3;
}
public function get text():String{
return (_text);
}
public function get location():int{
return (_location);
}
}
}//package com.adobe.serialization.json
Section 12
//JSONToken (com.adobe.serialization.json.JSONToken)
package com.adobe.serialization.json {
public class JSONToken {
private var _value:Object;
private var _type:int;
public function JSONToken(_arg1:int=-1, _arg2:Object=null){
_type = _arg1;
_value = _arg2;
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
public function get value():Object{
return (_value);
}
public function set type(_arg1:int):void{
_type = _arg1;
}
public function get type():int{
return (_type);
}
}
}//package com.adobe.serialization.json
Section 13
//JSONTokenizer (com.adobe.serialization.json.JSONTokenizer)
package com.adobe.serialization.json {
public class JSONTokenizer {
private var loc:int;
private var ch:String;
private var obj:Object;
private var jsonString:String;
public function JSONTokenizer(_arg1:String){
jsonString = _arg1;
loc = 0;
nextChar();
}
private function skipComments():void{
if (ch == "/"){
nextChar();
switch (ch){
case "/":
do {
nextChar();
} while (((!((ch == "\n"))) && (!((ch == "")))));
nextChar();
break;
case "*":
nextChar();
while (true) {
if (ch == "*"){
nextChar();
if (ch == "/"){
nextChar();
break;
};
} else {
nextChar();
};
if (ch == ""){
parseError("Multi-line comment not closed");
};
};
break;
default:
parseError((("Unexpected " + ch) + " encountered (expecting '/' or '*' )"));
};
};
}
private function isDigit(_arg1:String):Boolean{
return ((((_arg1 >= "0")) && ((_arg1 <= "9"))));
}
private function readNumber():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:Number;
_local1 = new JSONToken();
_local1.type = JSONTokenType.NUMBER;
_local2 = "";
if (ch == "-"){
_local2 = (_local2 + "-");
nextChar();
};
if (!isDigit(ch)){
parseError("Expecting a digit");
};
if (ch == "0"){
_local2 = (_local2 + ch);
nextChar();
if (isDigit(ch)){
parseError("A digit cannot immediately follow 0");
};
} else {
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
if (ch == "."){
_local2 = (_local2 + ".");
nextChar();
if (!isDigit(ch)){
parseError("Expecting a digit");
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
if ((((ch == "e")) || ((ch == "E")))){
_local2 = (_local2 + "e");
nextChar();
if ((((ch == "+")) || ((ch == "-")))){
_local2 = (_local2 + ch);
nextChar();
};
if (!isDigit(ch)){
parseError("Scientific notation number needs exponent value");
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
_local3 = Number(_local2);
if (((isFinite(_local3)) && (!(isNaN(_local3))))){
_local1.value = _local3;
return (_local1);
};
parseError((("Number " + _local3) + " is not valid!"));
return (null);
}
private function nextChar():String{
return ((ch = jsonString.charAt(loc++)));
}
public function getNextToken():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:String;
var _local4:String;
_local1 = new JSONToken();
skipIgnored();
switch (ch){
case "{":
_local1.type = JSONTokenType.LEFT_BRACE;
_local1.value = "{";
nextChar();
break;
case "}":
_local1.type = JSONTokenType.RIGHT_BRACE;
_local1.value = "}";
nextChar();
break;
case "[":
_local1.type = JSONTokenType.LEFT_BRACKET;
_local1.value = "[";
nextChar();
break;
case "]":
_local1.type = JSONTokenType.RIGHT_BRACKET;
_local1.value = "]";
nextChar();
break;
case ",":
_local1.type = JSONTokenType.COMMA;
_local1.value = ",";
nextChar();
break;
case ":":
_local1.type = JSONTokenType.COLON;
_local1.value = ":";
nextChar();
break;
case "t":
_local2 = ((("t" + nextChar()) + nextChar()) + nextChar());
if (_local2 == "true"){
_local1.type = JSONTokenType.TRUE;
_local1.value = true;
nextChar();
} else {
parseError(("Expecting 'true' but found " + _local2));
};
break;
case "f":
_local3 = (((("f" + nextChar()) + nextChar()) + nextChar()) + nextChar());
if (_local3 == "false"){
_local1.type = JSONTokenType.FALSE;
_local1.value = false;
nextChar();
} else {
parseError(("Expecting 'false' but found " + _local3));
};
break;
case "n":
_local4 = ((("n" + nextChar()) + nextChar()) + nextChar());
if (_local4 == "null"){
_local1.type = JSONTokenType.NULL;
_local1.value = null;
nextChar();
} else {
parseError(("Expecting 'null' but found " + _local4));
};
break;
case "\"":
_local1 = readString();
break;
default:
if (((isDigit(ch)) || ((ch == "-")))){
_local1 = readNumber();
} else {
if (ch == ""){
return (null);
};
parseError((("Unexpected " + ch) + " encountered"));
};
};
return (_local1);
}
private function skipWhite():void{
while (isWhiteSpace(ch)) {
nextChar();
};
}
private function isWhiteSpace(_arg1:String):Boolean{
return ((((((((_arg1 == " ")) || ((_arg1 == "\t")))) || ((_arg1 == "\n")))) || ((_arg1 == "\r"))));
}
public function parseError(_arg1:String):void{
throw (new JSONParseError(_arg1, loc, jsonString));
}
private function skipIgnored():void{
var _local1:int;
do {
_local1 = loc;
skipWhite();
skipComments();
} while (_local1 != loc);
}
private function isHexDigit(_arg1:String):Boolean{
var _local2:String;
_local2 = _arg1.toUpperCase();
return (((isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F"))))));
}
private function readString():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:String;
var _local4:int;
_local1 = new JSONToken();
_local1.type = JSONTokenType.STRING;
_local2 = "";
nextChar();
while (((!((ch == "\""))) && (!((ch == ""))))) {
if (ch == "\\"){
nextChar();
switch (ch){
case "\"":
_local2 = (_local2 + "\"");
break;
case "/":
_local2 = (_local2 + "/");
break;
case "\\":
_local2 = (_local2 + "\\");
break;
case "b":
_local2 = (_local2 + "\b");
break;
case "f":
_local2 = (_local2 + "\f");
break;
case "n":
_local2 = (_local2 + "\n");
break;
case "r":
_local2 = (_local2 + "\r");
break;
case "t":
_local2 = (_local2 + "\t");
break;
case "u":
_local3 = "";
_local4 = 0;
while (_local4 < 4) {
if (!isHexDigit(nextChar())){
parseError((" Excepted a hex digit, but found: " + ch));
};
_local3 = (_local3 + ch);
_local4++;
};
_local2 = (_local2 + String.fromCharCode(parseInt(_local3, 16)));
break;
default:
_local2 = (_local2 + ("\\" + ch));
};
} else {
_local2 = (_local2 + ch);
};
nextChar();
};
if (ch == ""){
parseError("Unterminated string literal");
};
nextChar();
_local1.value = _local2;
return (_local1);
}
}
}//package com.adobe.serialization.json
Section 14
//JSONTokenType (com.adobe.serialization.json.JSONTokenType)
package com.adobe.serialization.json {
public class JSONTokenType {
public static const NUMBER:int = 11;
public static const FALSE:int = 8;
public static const RIGHT_BRACKET:int = 4;
public static const NULL:int = 9;
public static const TRUE:int = 7;
public static const RIGHT_BRACE:int = 2;
public static const UNKNOWN:int = -1;
public static const COMMA:int = 0;
public static const LEFT_BRACKET:int = 3;
public static const STRING:int = 10;
public static const LEFT_BRACE:int = 1;
public static const COLON:int = 6;
}
}//package com.adobe.serialization.json
Section 15
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 16
//APIConnector (com.newgrounds.components.APIConnector)
package com.newgrounds.components {
import flash.events.*;
import com.newgrounds.*;
import flash.display.*;
import flash.utils.*;
public class APIConnector extends MovieClip {
public var errorDialog:MovieClip;
public var background:MovieClip;
public var viewLatestButton:SimpleButton;
public var closeButton:SimpleButton;
public var viewAuthorizedButton:SimpleButton;
private var _initialized:Boolean;
private var _movieId:String;
private var _encryptionKey:String;
private var _movieVersion:String;
private var _showConnectingPopup:Boolean;// = true
private var _useErrorPopup:Boolean;// = true
private var _medalPopup:MedalPopup;
private var _popDelay:Timer;
public function APIConnector(){
this._popDelay = new Timer(3000, 1);
super();
addFrameScript(0, this.frame1, 6, this.frame7, 7, this.frame8);
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
this.useErrorPopup = true;
this.useMedalPopup = true;
this._popDelay.addEventListener(TimerEvent.TIMER, this.errorTimerHandler);
addEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
if (stage){
addEventListener(Event.RENDER, this.renderHandler);
stage.invalidate();
} else {
this.clear();
};
}
public function get movieId():String{
return (this._movieId);
}
public function set movieId(_arg1:String):void{
this._movieId = _arg1;
}
public function get encryptionKey():String{
return (this._encryptionKey);
}
public function set encryptionKey(_arg1:String):void{
this._encryptionKey = _arg1;
}
public function get movieVersion():String{
return (this._movieVersion);
}
public function set movieVersion(_arg1:String):void{
this._movieVersion = _arg1;
}
public function get debugMode():Boolean{
return (API.debugMode);
}
public function set debugMode(_arg1:Boolean):void{
API.debugMode = true;
}
public function get useFakeSession():Boolean{
return (API.getFakeSession());
}
public function set useFakeSession(_arg1:Boolean):void{
API.setFakeSession(true);
}
public function get useMedalPopup():Boolean{
return (!((this._medalPopup == null)));
}
public function set useMedalPopup(_arg1:Boolean):void{
if (((_arg1) && (!(this._medalPopup)))){
this._medalPopup = new MedalPopup();
addChild(this._medalPopup);
} else {
if (((!(_arg1)) && (this._medalPopup))){
removeChild(this._medalPopup);
this._medalPopup = null;
};
};
}
public function get useErrorPopup():Boolean{
return (this._useErrorPopup);
}
public function set useErrorPopup(_arg1:Boolean):void{
this._useErrorPopup = _arg1;
API.addEventListener(APIEvent.API_CONNECTED, this.movieConnectedHandler);
if (this._useErrorPopup){
API.addEventListener(APIEvent.NEW_VERSION_AVAILABLE, this.newVersionAvailableHandler);
API.addEventListener(APIEvent.HOST_BLOCKED, this.hostBlockedHandler);
} else {
API.removeEventListener(APIEvent.NEW_VERSION_AVAILABLE, this.newVersionAvailableHandler);
API.removeEventListener(APIEvent.HOST_BLOCKED, this.hostBlockedHandler);
};
}
public function get showConnectingPopup():Boolean{
return (this._showConnectingPopup);
}
public function set showConnectingPopup(_arg1:Boolean):void{
this._showConnectingPopup = _arg1;
if (((!(_arg1)) && ((((currentLabel == "connecting")) || ((currentLabel == "connected")))))){
this.clear();
};
}
public function clear():void{
gotoAndStop("idle");
}
public function connect():void{
API.setVersion(this._movieVersion);
API.connect(root.loaderInfo, this._movieId, this._encryptionKey);
visible = true;
if (this.showConnectingPopup){
gotoAndStop("connecting");
};
}
private function renderHandler(_arg1:Event):void{
removeEventListener(Event.RENDER, this.renderHandler);
this.clear();
this.connect();
}
private function movieConnectedHandler(_arg1:APIEvent):void{
if (_arg1.success){
if (((((((API.isPublishedHost()) && (API.hostIsCompatible()))) && (!(API.hasUserSession())))) && (!(API.debugMode)))){
gotoAndStop("no_login");
this._popDelay.start();
visible = true;
} else {
if (this.showConnectingPopup){
gotoAndStop("connected");
};
};
} else {
gotoAndStop("no_connect");
this._popDelay.start();
visible = true;
};
}
private function newVersionAvailableHandler(_arg1:APIEvent):void{
gotoAndStop("new_version");
visible = true;
this.centerOnStage();
}
private function hostBlockedHandler(_arg1:APIEvent):void{
gotoAndStop("bad_host");
visible = true;
this.centerOnStage();
}
private function closeButtonClickHandler(_arg1:Event):void{
this.clear();
}
private function officialVersionClickHandler(_arg1:Event):void{
API.loadOfficialURL();
}
private function enterFrameHandler(_arg1:Event):void{
this.forceAlwaysOnTop();
}
private function initButtons():void{
if (this.viewLatestButton){
this.viewLatestButton.addEventListener(MouseEvent.CLICK, this.officialVersionClickHandler);
};
if (this.viewAuthorizedButton){
this.viewAuthorizedButton.addEventListener(MouseEvent.CLICK, this.officialVersionClickHandler);
};
if (this.closeButton){
this.closeButton.addEventListener(MouseEvent.CLICK, this.closeButtonClickHandler);
};
}
private function forceAlwaysOnTop():void{
var myIndex:uint;
var topIndex:uint;
if (((parent) && (visible))){
try {
myIndex = parent.getChildIndex(this);
topIndex = (parent.numChildren - 1);
if (myIndex != topIndex){
parent.setChildIndex(this, topIndex);
};
} catch(e:Error) {
};
};
}
private function centerOnStage():void{
if (stage){
x = (stage.stageWidth / 2);
y = (stage.stageHeight / 2);
};
}
private function errorTimerHandler(_arg1:TimerEvent):void{
if (this.errorDialog){
this.errorDialog.gotoAndPlay("closeme");
} else {
this.clear();
};
}
function frame1(){
stop();
}
function frame7(){
this.initButtons();
}
function frame8(){
this.initButtons();
}
}
}//package com.newgrounds.components
Section 17
//FlashAd (com.newgrounds.components.FlashAd)
package com.newgrounds.components {
import flash.events.*;
import com.newgrounds.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class FlashAd extends Sprite {
public var background:MovieClip;
private var _showBackground:Boolean;
private var _adURLLoader:URLLoader;
private var _adRect:Sprite;
private var _mask:Shape;
private var _ad:Loader;
private static const DEBUG_AD_URL:String = "http://www.ngads.com/adtest.php";
private static const REMOVED_FROM_STAGE:String = "removedFromStage";
private static var _adResetTime:uint = 0;
private static var _adURL:URLRequest;
public function FlashAd(_arg1:Boolean=true){
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
Security.allowDomain("server.cpmstar.com");
this._adRect = new Sprite();
this._adRect.graphics.beginFill(0);
this._adRect.graphics.moveTo(0, 0);
this._adRect.graphics.lineTo(300, 0);
this._adRect.graphics.lineTo(300, 250);
this._adRect.graphics.lineTo(0, 250);
this._adRect.graphics.lineTo(0, 0);
this._adRect.graphics.endFill();
this._mask = new Shape();
this._mask.graphics.beginFill(0);
this._mask.graphics.moveTo(0, 0);
this._mask.graphics.lineTo(300, 0);
this._mask.graphics.lineTo(300, 250);
this._mask.graphics.lineTo(0, 250);
this._mask.graphics.lineTo(0, 0);
this._mask.graphics.endFill();
addChild(this._adRect);
this._adRect.addChild(this._mask);
this._adRect.visible = false;
x = Math.round(x);
y = Math.round(y);
scaleX = 1;
scaleY = 1;
if (this.background){
if (this.background.ngLinkButton){
this.background.ngLinkButton.addEventListener(MouseEvent.CLICK, this.linkClickHandler);
};
if (this.background.loadingClip){
this.background.loadingClip.visible = false;
};
};
if (API.isFlashVersion(9, 0, 28)){
addEventListener(REMOVED_FROM_STAGE, this.onRemovedFromStage);
};
if (API.adsApproved){
this.loadAdFeed(API.adFeedURL);
} else {
API.addEventListener(APIEvent.ADS_APPROVED, this.onAdsApproved, false, 0, true);
};
this.showBackground = _arg1;
}
public function get showBackground():Boolean{
return (this._showBackground);
}
public function set showBackground(_arg1:Boolean):void{
this._showBackground = _arg1;
if (this.background){
this.background.visible = _arg1;
this._adRect.mask = (_arg1) ? this.background.adMask : null;
};
}
public function removeAd():void{
removeEventListener(REMOVED_FROM_STAGE, this.onRemovedFromStage);
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
if (this._adURLLoader){
try {
this._adURLLoader.close();
} catch(e:Error) {
};
};
if (this._adRect){
this._adRect.visible = false;
};
if (this._ad){
trace("[NewgroundsAPI] :: Ad removed");
try {
this._ad.close();
} catch(e:Error) {
};
try {
Object(this._ad).unloadAndStop(true);
} catch(e:Error) {
_ad.unload();
};
if (this._ad.parent){
this._ad.parent.removeChild(this._ad);
};
};
this._ad = null;
}
private function onAdsApproved(_arg1:APIEvent):void{
API.removeEventListener(APIEvent.ADS_APPROVED, this.onAdsApproved, false);
if (_arg1.success){
this.loadAdFeed(API.adFeedURL);
} else {
trace("[NewgroundsAPI] :: No ad feed URL supplied to Newgrounds API ad!");
};
}
private function loadAdFeed(_arg1:String):void{
var adFeedURL = _arg1;
this._adURLLoader = new URLLoader();
this._adURLLoader.addEventListener(Event.COMPLETE, this.onAdFeedLoaded);
this._adURLLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onAdError);
this._adURLLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onAdError);
if (!adFeedURL){
trace("[Newgrounds API] :: Invalid feed URL!");
return;
};
if (this.hasAdElapsed){
if (adFeedURL.indexOf("?") > -1){
_adURL = new URLRequest(((adFeedURL + "&random=") + Math.random()));
} else {
_adURL = new URLRequest(((adFeedURL + "?random=") + Math.random()));
};
};
try {
this._adURLLoader.load(_adURL);
} catch(e:Error) {
onAdError(null);
};
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = true;
};
}
private function loadAd(_arg1:String):void{
var url = _arg1;
if (this._ad){
this.removeAd();
};
this._ad = new Loader();
this._ad.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onAdLoaded);
this._ad.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onAdError);
try {
Object(this._ad.contentLoaderInfo).uncaughtErrorEvents.addEventListener("uncaughtError", function (_arg1:Event):void{
});
} catch(error:Error) {
};
this._ad.load(new URLRequest(url), new LoaderContext(false, new ApplicationDomain(null)));
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = true;
};
}
private function onAdFeedLoaded(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
if (((_local2.data) && (!((_local2.data == ""))))){
this.loadAd((_local2.data as String));
} else {
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, false, new APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")));
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
};
}
private function onAdFeedError(_arg1:Event):void{
trace("[NewgroundsAPI] :: Unable to load ad feed!");
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
}
private function onAdError(_arg1:Event):void{
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, false, new APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")));
this.removeAd();
}
private function onAdLoaded(_arg1:Event):void{
this._adRect.addChild(this._ad);
this._ad.mask = this._mask;
this._adRect.visible = true;
if (this.background){
if (this._showBackground){
this._adRect.mask = this.background.adMask;
};
if (this.background.loadingClip){
this.background.loadingClip.visible = false;
};
};
trace("[NewgroundsAPI] :: Ad loaded!");
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, true));
}
private function onRemovedFromStage(_arg1:Event):void{
this.removeAd();
}
private function get hasAdElapsed():Boolean{
if (getTimer() >= _adResetTime){
_adResetTime = (getTimer() + ((1000 * 60) * 5));
return (true);
};
return (false);
}
private function linkClickHandler(_arg1:MouseEvent):void{
API.loadNewgrounds();
}
}
}//package com.newgrounds.components
Section 18
//MedalPopup (com.newgrounds.components.MedalPopup)
package com.newgrounds.components {
import flash.events.*;
import com.newgrounds.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class MedalPopup extends MovieClip {
public var medalNameText:TextField;
public var medalValueText:TextField;
public var medalContainer:Sprite;
private var _initialized:Boolean;
private var _medal:Medal;
private var _medalIcon:Bitmap;
private var _medalQueue:Array;
private var _popDelay:Timer;
public function MedalPopup(){
this._medalQueue = [];
this._popDelay = new Timer(3000, 1);
super();
addFrameScript(0, this.frame1, 9, this.frame10, 18, this.frame19);
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
visible = false;
addEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
stop();
API.addEventListener(APIEvent.MEDAL_UNLOCKED, this.onMedalUnlocked, false, 0, true);
this._popDelay.addEventListener(TimerEvent.TIMER, this.timerHandler);
}
public function get popupTime():Number{
return ((this._popDelay.delay / 1000));
}
public function set popupTime(_arg1:Number):void{
if (isNaN(_arg1)){
_arg1 = 3;
};
this._popDelay.delay = (_arg1 * 1000);
}
private function enterFrameHandler(_arg1:Event):void{
var myIndex:uint;
var topIndex:uint;
var event = _arg1;
if (((this._medalQueue.length) && (!(visible)))){
this._medal = this._medalQueue.pop();
this._popDelay.start();
gotoAndPlay("medal_show");
visible = true;
};
if (((visible) && (parent))){
try {
myIndex = parent.getChildIndex(this);
topIndex = (parent.numChildren - 1);
if (myIndex != topIndex){
parent.setChildIndex(this, topIndex);
};
} catch(error:Error) {
};
};
}
private function onMedalUnlocked(_arg1:APIEvent):void{
if (((((_arg1.success) && (_arg1.data))) && ((_arg1.data.medal is Medal)))){
this._medalQueue.push(Medal(_arg1.data.medal));
};
}
private function showMedalInfo():void{
if (!this._medal){
return;
};
if (this.medalContainer){
this._medalIcon = this._medal.createIconBitmap();
this.medalContainer.addChild(this._medalIcon);
};
if (this.medalNameText){
this.medalNameText.text = this._medal.name;
};
if (this.medalValueText){
this.medalValueText.text = (this._medal.value.toString() + "pts");
};
this._popDelay.start();
stop();
}
private function timerHandler(_arg1:TimerEvent):void{
if (((this._medalIcon) && (this._medalIcon.parent))){
this._medalIcon.parent.removeChild(this._medalIcon);
this._medalIcon = null;
};
gotoAndPlay("medal_hide");
this._popDelay.stop();
}
function frame1(){
stop();
}
function frame10(){
this.showMedalInfo();
stop();
}
function frame19(){
stop();
visible = false;
}
}
}//package com.newgrounds.components
Section 19
//API (com.newgrounds.API)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import com.newgrounds.components.*;
import flash.utils.*;
import com.adobe.serialization.json.*;
import flash.net.*;
import com.adobe.images.*;
import com.adobe.crypto.*;
import flash.system.*;
public class API {
public static const VERSION:String = "2.4.18";
private static const GATEWAY_URL:String = "http://www.ngads.com/gateway_v2.php";
private static const AD_TERMS_URL:String = "http://www.newgrounds.com/wiki/flashads/terms/";
private static const COMMANDS_WIKI_URL:String = "http://www.newgrounds.com/wiki/flashapi/commands/";
private static var do_echo:Boolean = false;
private static var _debug:Boolean = true;
private static var _connected:Boolean = false;
private static var _isMetadataLoaded:Boolean = false;
private static var _preloadComplete:Boolean = false;
private static var _adsApproved:Boolean = false;
private static var _saveGroupId:uint;
private static var _saveFileId:uint;
private static var _trackerId:uint;
private static var _movieId:String;
private static var _encryptionKey:String;
private static var _url:String;
private static var _host:String;
private static var connected:Boolean;
private static var version:String;
private static var ad_url:String;
private static var _fakeSession:Boolean = false;
private static var publisher_id:uint;
private static var session_id:String;
private static var user_email:String;
private static var user_name:String;
private static var user_id:uint;
private static var userpage_format:String;
private static var _medals:Array;
private static var timeoutTimer:Timer = new Timer(8000, 1);
private static var _userpageFormat:String;
private static var _scoreboards:Array = new Array();
private static var _bridge:Bridge;
private static var save_file:SaveFile;
private static var _imageFilePath:String;
private static var _saveFilePath:String;
private static var _saveGroups:Array = [];
private static var root:DisplayObject;
private static var _eventDispatcher:EventDispatcher = new EventDispatcher();
private static var score_page_counts:Object = new Object();
private static var compression_radix:String = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
private static var compressor:BaseN = new BaseN(compression_radix);
public static var errors:Dictionary = APIError.init_codes();
private static var sharedObjects:Dictionary = new Dictionary();
private static var _preloadAssets:Array = [];
public static var periods:Object = getPeriodAliases();
private static var period_aliases:Object = {t:{name:"Today", alias:"TODAY"}, p:{name:"Yesterday", alias:"YESTERDAY"}, w:{name:"This Week", alias:"THIS_WEEK"}, m:{name:"This Month", alias:"THIS_MONTH"}, y:{name:"This Year", alias:"THIS_YEAR"}, a:{name:"All-Time", alias:"ALL_TIME"}};
private static var secureCommand:String;
public static function get adFeedURL():String{
return (ad_url);
}
public static function get preloadComplete():Boolean{
return (_preloadComplete);
}
private static function assertConnected():Boolean{
if (!_connected){
return (false);
};
return (true);
}
public static function setVersion(_arg1:String):void{
if (((_arg1) && (!((_arg1 == ""))))){
version = _arg1;
};
}
public static function setUserEmail(_arg1:String):void{
user_email = _arg1;
}
public static function setFakeSession(_arg1:Boolean):void{
_fakeSession = _arg1;
}
public static function getFakeSession():Boolean{
return (_fakeSession);
}
public static function get debugMode():Boolean{
return (_debug);
}
public static function set debugMode(_arg1:Boolean):void{
_debug = _arg1;
}
public static function getTrackerID():uint{
return (_trackerId);
}
public static function getUserID():uint{
return (user_id);
}
public static function getUserName():String{
return (user_name);
}
public static function isConnected():Boolean{
return (_connected);
}
public static function getID():uint{
return (_trackerId);
}
public static function getOfficialURL():String{
var _local1:String = ((((((GATEWAY_URL + "?tracker_id=") + _movieId) + "&command_id=") + getCommandID("loadOfficalVersion")) + "&seed=") + Math.random());
if (debugMode){
_local1 = (_local1 + "&debug=1");
};
return (_local1);
}
public static function get adsApproved():Boolean{
return (_adsApproved);
}
public static function hasUserSession():Boolean{
return (((((!((session_id == null))) && (!((session_id == ""))))) && (!((publisher_id == 0)))));
}
public static function isNewgrounds():Boolean{
return ((((publisher_id == 1)) || (((_host) && ((_host.toLowerCase().indexOf("ungrounded.net") > -1))))));
}
public static function hostIsCompatible():Boolean{
return (!((publisher_id == 0)));
}
public static function hasUserEmail():Boolean{
return (((!((user_email == null))) && (!((user_email == "")))));
}
public static function connectionTimeOut(_arg1:Event=null):void{
dispatchEvent(new APIEvent(APIEvent.API_CONNECTED, false, new APIError("CONNECTION_FAILED", "Connection to NewgroundsAPI gateway timed out.")));
}
public static function connect(_arg1:LoaderInfo, _arg2:String, _arg3:String=null):void{
var loaderInfo = _arg1;
var m_id = _arg2;
var encrypt_key = _arg3;
if (!loaderInfo){
fatalError("Null loaderInfo paremeter passed in to connectMovie!", "");
return;
};
try {
if (loaderInfo.loader){
loaderInfo = loaderInfo.loader.loaderInfo;
};
} catch(error:Error) {
};
_url = loaderInfo.url;
_host = _url;
if ((((_host.indexOf("http://") > -1)) || ((_host.indexOf("https://") > -1)))){
_host = _host.split("/")[2].toLowerCase();
} else {
_host = "localhost";
};
var flashVars:Object = loaderInfo.parameters;
if (isPublishedHost()){
debugMode = false;
};
if (((!(debugMode)) && (flashVars))){
if (flashVars.NewgroundsAPI_UserName){
user_name = flashVars.NewgroundsAPI_UserName;
};
if (flashVars.NewgroundsAPI_UserID){
user_id = flashVars.NewgroundsAPI_UserID;
};
if (flashVars.NewgroundsAPI_PublisherID){
publisher_id = flashVars.NewgroundsAPI_PublisherID;
} else {
publisher_id = 0;
};
if (flashVars.NewgroundsAPI_UserpageFormat){
_userpageFormat = flashVars.NewgroundsAPI_UserpageFormat;
};
if (flashVars.NewgroundsAPI_SessionID){
session_id = flashVars.NewgroundsAPI_SessionID;
};
if (flashVars.NewgroundsAPI_SaveGroupID){
_saveGroupId = flashVars.NewgroundsAPI_SaveGroupID;
};
if (flashVars.NewgroundsAPI_SaveFileID){
_saveFileId = flashVars.NewgroundsAPI_SaveFileID;
};
if (flashVars.NewgroundsAPI_SandboxID){
_bridge = new Bridge(flashVars.NewgroundsAPI_SandboxID);
};
} else {
publisher_id = 1;
if (_fakeSession){
session_id = "D3bu64p1U53R";
user_id = 10;
user_name = "API-Debugger";
};
};
if (connected){
fatalError("NewgroundsAPI.connect() - connection already in progress", "connect");
return;
};
timeoutTimer.start();
if (!m_id){
fatalError("NewgroundsAPI.connectMovie() - missing required movieId parameter", "connectMovie");
};
_movieId = String(m_id);
_trackerId = uint(_movieId.substring(0, _movieId.indexOf(":")));
_encryptionKey = encrypt_key;
connected = true;
sendCommand("connectMovie", {host:getHost(), movie_version:version});
}
private static function getHost():String{
return (_host);
}
public static function isPublishedHost():Boolean{
return (((!((getHost() == "localhost"))) && ((getHost().indexOf("file://") == -1))));
}
public static function loadUserPage(_arg1:uint=0, _arg2:String=null):Boolean{
var _local3:String;
if ((((_arg1 == 0)) && ((_arg2 == null)))){
if (hasUserSession()){
_arg1 = user_id;
_arg2 = user_name;
} else {
return (false);
};
};
if (publisher_id == 1){
_local3 = (("http://" + _arg2.toLowerCase()) + ".newgrounds.com");
navigateToURL(new URLRequest(_local3), "_blank");
return (true);
};
if (userpage_format){
_local3 = userpage_format;
_local3 = _local3.split(":user_id:").join(_arg1.toString());
_local3 = _local3.split(":user_name:").join(escape(_arg2));
navigateToURL(new URLRequest(_local3), "_blank");
return (true);
};
return (false);
}
public static function loadNewgrounds():void{
sendCommand("loadNewgrounds", {host:getHost()}, true);
}
public static function loadOfficialURL():void{
navigateToURL(new URLRequest(getOfficialURL()));
}
public static function loadMySite():void{
sendCommand("loadMySite", {host:getHost()}, true);
}
public static function loadCustomLink(_arg1:String):void{
sendCommand("loadCustomLink", {host:getHost(), link:_arg1}, true);
}
public static function logCustomEvent(_arg1:String):void{
sendCommand("logCustomEvent", {host:getHost(), event:_arg1});
}
public static function getScoreBoard(_arg1:String):ScoreBoard{
var _local2:ScoreBoard;
for each (_local2 in _scoreboards) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
public static function getScoreBoardById(_arg1:uint):ScoreBoard{
var _local2:ScoreBoard;
for each (_local2 in _scoreboards) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
public static function postScore(_arg1:String, _arg2:uint, _arg3:String=""):void{
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("postScore")}, new APIError("MISSING_PARAM", "missing required parameter(s)"));
return;
};
if (_arg3 == null){
_arg3 = "";
};
sendSecureCommand("postScore", {user_name:user_name, board:_arg1, value:_arg2, publisher_id:publisher_id, tag:_arg3});
}
public static function loadScores(_arg1:String, _arg2:String=null, _arg3:String=null):void{
var _local4 = "loadScores";
var _local5:ScoreBoard = getScoreBoard(_arg1);
if (((!(_local5)) || (!(_local5.id)))){
sendError({command_id:getCommandID(_local4)}, new APIError("MISSING_PARAM", "missing required ScoreBoard instance"));
return;
};
var _local6:Object = {};
_local6.publisher_id = publisher_id;
if (_arg2){
_local6.period = _arg2;
} else {
_local6.period = _local5.period;
};
_local6.board = _local5.id;
_local6.num_results = _local5.num_results;
_local6.page = _local5.page;
if (((!(_arg3)) || ((_arg3 == "")))){
_local6.tag = _local5.tag;
} else {
_local6.tag = _arg3;
};
sendCommand(_local4, _local6);
}
public static function loadScoresInRange(_arg1:String, _arg2:String="All-Time", _arg3:uint=1, _arg4:uint=10):void{
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("postScore")}, new APIError("MISSING_PARAM", "missing required parameter(s)"));
return;
};
var _local5:ScoreBoard = getScoreBoard(_arg1);
if (_local5){
_local5.loadScoresInRange(_arg2, _arg3, _arg4);
} else {
sendWarning((("loadScoresInRange: Scoreboard " + _arg1) + " could not be found."));
};
}
private static function populateMedals(_arg1:Array):void{
var _local2:uint;
var _local3:Object;
if (_medals === null){
_medals = new Array();
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = _arg1[_local2];
_medals.push(Medal.createFromObject(_local3));
_local2++;
};
};
sendMessage("Medals loaded!");
}
private static function populateSaveGroups(_arg1:Array):void{
var _local3:SaveGroup;
_saveGroups = [];
var _local2:uint;
while (_local2 < _arg1.length) {
_local3 = SaveGroup.createFromObject(_arg1[_local2]);
_saveGroups.push(_local3);
_local2++;
};
}
private static function populateScoreBoards(_arg1:Array):void{
_scoreboards = [];
var _local2:uint;
while (_local2 < _arg1.length) {
_scoreboards.push(new ScoreBoard(_arg1[_local2].id, _arg1[_local2].name, ""));
_local2++;
};
}
public static function getMedals():Array{
return (_medals);
}
public static function getMedalById(_arg1:uint):Medal{
var _local2:Medal;
for each (_local2 in _medals) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
public static function getMedal(_arg1:String):Medal{
var _local2:Medal;
for each (_local2 in _medals) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
public static function unlockMedal(_arg1:String):void{
var _local3:Object;
var _local4:Object;
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("unlockMedal")}, new APIError("MISSING_PARAM", "missing required medal name"));
return;
};
var _local2:Medal = getMedal(_arg1);
if (!_local2){
sendMessage(("No medal with name: " + _arg1));
return;
};
if (((hasUserSession()) || (debugMode))){
sendMessage((("Attempting to unlock '" + _local2.name) + "'"));
if (_local2.unlocked){
sendWarning((("Medal '" + _local2.name) + "' is already unlocked!"));
return;
};
_local3 = new Object();
_local3.medal_id = _local2.id;
sendSecureCommand("unlockMedal", _local3);
} else {
sendMessage(("Locally unlocking " + _local2.name));
if (_local2.unlocked){
sendWarning((("Medal '" + _local2.name) + "' is already unlocked!"));
return;
};
_local2.unlocked = true;
_local4 = loadLocal("medals_unlocked");
if (!_local4){
_local4 = new Object();
};
_local4[_local2.id.toString()] = true;
saveLocal("medals_unlocked", _local4);
callListener(APIEvent.UNLOCK_MEDAL, true, {medal:_local2});
};
}
public static function loadMedals():void{
if (_medals){
dispatchEvent(new APIEvent(APIEvent.MEDALS_LOADED, true, {medals:getMedals()}));
return;
};
var _local1:Object = new Object();
if (hasUserSession()){
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
};
sendCommand("getMedals", _local1);
}
public static function saveLocal(_arg1:String, _arg2:Object, _arg3:uint=0):void{
var sharedObj:SharedObject;
var save_id = _arg1;
var save_data = _arg2;
var size_allocation = _arg3;
try {
if (!sharedObjects[save_id]){
sharedObjects[save_id] = SharedObject.getLocal(((("ng_ap_secure_" + _trackerId) + "_") + save_id));
};
sharedObj = sharedObjects[save_id];
sharedObj.data[save_id] = encodeData(save_data);
sharedObj.flush();
} catch(e:Error) {
sendWarning(("saveLocal ERROR: " + e));
};
}
public static function loadLocal(_arg1:String):Object{
var sharedObj:SharedObject;
var save_id = _arg1;
try {
if (!sharedObjects[save_id]){
sharedObjects[save_id] = SharedObject.getLocal(((("ng_ap_secure_" + _trackerId) + "_") + save_id));
};
sharedObj = sharedObjects[save_id];
if (((((sharedObj) && (sharedObj.data))) && (sharedObj.data[save_id]))){
return (decodeData(sharedObj.data[save_id]));
} else {
return (null);
};
} catch(e:Error) {
sendWarning(("loadLocal ERROR: " + e));
};
return (null);
}
public static function encodeData(_arg1:Object):String{
return (compressHex(RC4.encrypt(JSON.encode(_arg1), _encryptionKey)));
}
public static function decodeData(_arg1:String){
return (JSON.decode(RC4.decrypt(uncompressHex(_arg1), _encryptionKey)));
}
private static function compressHex(_arg1:String):String{
var _local2:uint = (_arg1.length % 6);
var _local3 = "";
var _local4:uint;
while (_local4 < _arg1.length) {
_local3 = (_local3 + compressor.encode(uint(("0x" + _arg1.substr(_local4, 6))), 4));
_local4 = (_local4 + 6);
};
return ((_local2.toString() + _local3));
}
private static function uncompressHex(_arg1:String):String{
var _local4:uint;
var _local6:String;
var _local7:uint;
var _local8:String;
var _local2:uint = uint(_arg1.charAt(0));
var _local3 = "";
var _local5:uint = 1;
while (_local5 < _arg1.length) {
_local6 = _arg1.substr(_local5, 4);
_local7 = uint(compressor.decode(_local6));
_local8 = _local7.toString(16);
if ((_local5 + 4) < _arg1.length){
_local4 = 6;
} else {
_local4 = _local2;
};
while (_local8.length < _local4) {
_local8 = ("0" + _local8);
};
_local3 = (_local3 + _local8);
_local5 = (_local5 + 4);
};
return (_local3);
}
public static function getSaveGroupById(_arg1:uint):SaveGroup{
if (((!(_saveGroups)) || ((_saveGroups.length < 1)))){
sendWarning("No save groups found");
return (null);
};
var _local2:uint;
while (_local2 < _saveGroups.length) {
if (_saveGroups[_local2].id == _arg1){
return (_saveGroups[_local2]);
};
_local2++;
};
return (null);
}
public static function getSaveGroup(_arg1:String):SaveGroup{
if (((!(_saveGroups)) || ((_saveGroups.length < 1)))){
sendWarning("No save groups found");
return (null);
};
var _local2:uint;
while (_local2 < _saveGroups.length) {
if (_saveGroups[_local2].name == _arg1){
return (_saveGroups[_local2]);
};
_local2++;
};
return (null);
}
public static function getCurrentSaveFile(){
return (save_file);
}
public static function setCurrentSaveFile(_arg1:SaveFile){
save_file = _arg1;
}
public static function newSaveQuery(_arg1:String):SaveGroupQuery{
var _local2:SaveGroup = getSaveGroup(_arg1);
if (_local2){
return (_local2.newQuery());
};
return (null);
}
public static function executeSaveQuery(_arg1:SaveGroupQuery):void{
sendCommand("lookupSaveFiles", {publisher_id:publisher_id, group_id:_arg1.groupId, query:JSON.encode(_arg1.toObject())}, false, null, _arg1);
}
public static function lookupSaveFiles(_arg1:SaveGroup):void{
var _local2:SaveGroupQuery = _arg1.getQuery(false);
sendCommand("lookupSaveFiles", {publisher_id:publisher_id, group_id:_arg1.id, query:_local2.toObject()}, false, null, _local2);
}
public static function checkFilePrivledges(_arg1:SaveFile):void{
sendCommand("checkFilePrivs", {group:_arg1.groupId, filename:_arg1.name, user_id:(user_id) ? user_id : 0, publisher_id:publisher_id});
}
public static function newSaveFile(_arg1:String):SaveFile{
var _local2:SaveGroup = getSaveGroup(_arg1);
if (_local2){
return (new SaveFile(_local2));
};
sendError({command_id:"newSaveFile"}, new APIError("INVALID_SAVE_GROUP", (("'" + _local2) + "' is not a valid save group.")));
return (null);
}
public static function saveFile(_arg1:SaveFile, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Object = _arg1.toObject();
_local4.user_name = user_name;
if (_arg1.id){
_local4.save_id = _arg1.id;
};
_local4.overwrite = (_arg2) ? 1 : 0;
if (_arg3){
_local4.draft = 1;
};
var _local5:ByteArray = new ByteArray();
if ((_arg1.contents is ByteArray)){
_local5.writeByte(0);
_local5.writeBytes(_arg1.contents);
} else {
_local5.writeByte(1);
_local5.writeObject(_arg1.contents);
};
_local5.compress();
var _local6:Object = new Object();
_local6.file = _local5;
if (_arg1.thumbnail){
_local6.thumbnail = PNGEncoder.encode(_arg1.thumbnail);
};
save_file = _arg1;
sendSecureCommand("saveFile", _local4, null, _local6, _arg1);
}
public static function rateSaveFile(_arg1:SaveFile, _arg2:SaveRating, _arg3:Number):void{
sendSecureCommand("rateSaveFile", {group:_arg1.groupId, save_id:_arg1.id, rating_id:_arg2.id, vote:_arg3, user_id:user_id}, null, null, _arg1);
}
public static function loadSaveFile(_arg1:Number, _arg2:Boolean=true){
var _local3:Object = {publisher_id:publisher_id, save_id:_arg1, get_contents:_arg2};
save_file = null;
sendCommand("loadSaveFile", _local3);
}
public static function loadFilesByDate(_arg1:String, _arg2:Boolean=true, _arg3:String=null, _arg4=null):void{
var _local7:*;
var _local5:SaveGroup = getSaveGroup(_arg1);
if (!_local5){
_local7 = new APIError("QUERY_INCOMPLETE", "The query could not be preformed, check the spelling of your save group name.");
sendError({command_id:"loadFilesByDate"}, _local7);
return;
};
var _local6:SaveGroupQuery = _local5.newQuery();
if (_arg3){
_local6.addKeyCondition(_arg3, "=", _arg4);
};
_local6.sortOn(SaveGroupQuery.CREATED_ON, _arg2);
_local6.execute();
}
public static function loadFilesByViews(_arg1:String, _arg2:Boolean=true, _arg3:String=null, _arg4=null):void{
var _local7:*;
var _local5:SaveGroup = getSaveGroup(_arg1);
if (!_local5){
_local7 = new APIError("QUERY_INCOMPLETE", "The query could not be preformed, check the spelling of your save group name.");
sendError({command_id:"loadFilesByViews"}, _local7);
return;
};
var _local6:SaveGroupQuery = _local5.newQuery();
if (_arg3){
_local6.addKeyCondition(_arg3, "=", _arg4);
};
_local6.sortOn(SaveGroupQuery.TOTAL_VIEWS, _arg2);
_local6.execute();
}
public static function loadFilesByRating(_arg1:String, _arg2:String, _arg3:Boolean=true, _arg4:String=null, _arg5=null):void{
var _local8:*;
var _local6:SaveGroup = getSaveGroup(_arg1);
if (!_local6){
_local8 = new APIError("QUERY_INCOMPLETE", "The query could not be preformed, check the spelling of your save group name.");
sendError({command_id:"loadFilesByDate"}, _local8);
return;
};
var _local7:SaveGroupQuery = _local6.newQuery();
if (_arg4){
_local7.addKeyCondition(_arg4, "=", _arg5);
};
_local7.sortOnRating(_arg2, _arg3);
_local7.execute();
}
public static function onRemoteAuthentication(_arg1:String){
var _local2:Object = JSON.decode(RC4.decrypt(_arg1, _encryptionKey));
user_id = _local2.NewgroundsAPI_UserID;
user_name = _local2.NewgroundsAPI_UserName;
session_id = _local2.NewgroundsAPI_SessionID;
publisher_id = _local2.NewgroundsAPI_PublisherID;
}
private static function doEvent(_arg1:Object):void{
var _local2:String;
var _local3:Object;
var _local4:String;
var _local5:Boolean;
var _local6:ScoreBoard;
var _local7:Array;
var _local8:*;
var _local9:String;
var _local10:Medal;
var _local11:SaveGroup;
var _local12:Object;
var _local13:Object;
var _local14:Object;
var _local15:SaveFile;
var _local16:uint;
var _local17:Object;
var _local18:uint;
var _local19:APIError;
var _local20:Object;
switch (getCommandName(_arg1.command_id)){
case "connectMovie":
timeoutTimer.stop();
if (_arg1.success){
sendMessage("You have successfully connected to the Newgrounds API Gateway");
sendMessage((("Movie identified as \"" + _arg1.movie_name) + "\""));
callListener(APIEvent.API_CONNECTED, _arg1.success, {title:_arg1.movie_name});
} else {
callListener(APIEvent.API_CONNECTED, _arg1.success, {});
return;
};
_local5 = false;
if (_arg1.ad_status === -1){
_local2 = "This movie was not approved to run Flash Ads.";
sendWarning(_local2);
sendWarning((("visit " + AD_TERMS_URL) + " to view our approval guidelines"));
if (!_arg1.ad_url){
callListener(APIEvent.ADS_APPROVED, false, new APIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
} else {
if (_arg1.ad_status === 0){
_local2 = "Flash Ads are currently awaiting approval.";
sendNotice(_local2);
if (!_arg1.ad_url){
callListener(APIEvent.ADS_APPROVED, false, new APIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
};
};
if (_arg1.ad_url){
ad_url = unescape(_arg1.ad_url);
if (!_local5){
sendMessage("This movie has been approved to run Flash Ads!");
};
_adsApproved = true;
callListener(APIEvent.ADS_APPROVED, true);
};
if (_arg1.deny_host){
_local2 = (getHost() + " does not have permission to run this movie!");
sendWarning(_local2);
sendWarning(("\tUpdate your API configuration to unblock " + getHost()));
callListener(APIEvent.HOST_BLOCKED, true, {real_url:unescape(_arg1.movie_url), url:getOfficialURL()});
};
if (_arg1.movie_version){
sendWarning("According to your API Configuration, this version is out of date.");
if (version){
sendWarning(("\tThe this movie is version " + version));
};
sendWarning(("\tThe most current version is " + _arg1.movie_version));
callListener(APIEvent.NEW_VERSION_AVAILABLE, true, {version:_arg1.movie_version, real_url:unescape(_arg1.movie_url), url:getOfficialURL()});
};
if (_arg1.request_portal_url){
sendCommand("setPortalID", {portal_url:_url});
};
sendCommand("preloadSettings", {publisher_id:publisher_id, user_id:user_id});
break;
case "preloadSettings":
if (_arg1.medals){
populateMedals(_arg1.medals);
if (((!(hasUserSession())) && (!(debugMode)))){
echo("Checking for SharedObject Medals...");
_local8 = loadLocal("medals_unlocked");
if (_local8){
for (_local9 in _local8) {
if (_local8[_local9]){
_local10 = getMedalById(uint(_local9));
echo(("Now unlocking " + _local10.name));
_local10.unlocked = true;
};
};
};
};
};
if (_arg1.save_groups){
populateSaveGroups(_arg1.save_groups);
};
if (_arg1.save_file_path){
_saveFilePath = (_arg1.save_file_path + "/");
};
if (_arg1.image_file_path){
_imageFilePath = (_arg1.image_file_path + "/");
};
if (_arg1.score_boards){
populateScoreBoards(_arg1.score_boards);
};
sendMessage("Metadata loaded!");
callListener(APIEvent.METADATA_LOADED, _arg1.success);
if (((_saveFileId) && (_saveGroupId))){
_local11 = getSaveGroupById(_saveGroupId);
if (_local11){
callListener(APIEvent.FILE_REQUESTED, true, {save_id:_saveFileId, group:_local11});
};
};
_preloadComplete = true;
break;
case "logCustomEvent":
if (_arg1.success){
sendMessage((("Event '" + _arg1.event) + "' was logged."));
};
callListener(APIEvent.EVENT_LOGGED, _arg1.success, {event:_arg1.event});
break;
case "postScore":
if (_arg1.success){
_local4 = "User";
if (user_email){
_local4 = user_email;
} else {
if (user_name){
_local4 = user_name;
};
};
_local6 = getScoreBoardById(_arg1.board);
if (_local6){
sendMessage((((((_local4 + " posted ") + _arg1.value) + " to '") + _local6.name) + "'"));
};
if (_arg1.best_scores){
_local12 = {today:_arg1.best_scores.D, yesterday:_arg1.best_scores.P, week:_arg1.best_scores.W, year:_arg1.best_scores.Y, all_time:_arg1.best_scores.A};
} else {
_local12 = {};
};
if (_arg1.best_ranks){
_local13 = {today:_arg1.best_ranks.D, yesterday:_arg1.best_ranks.P, week:_arg1.best_ranks.W, year:_arg1.best_ranks.Y, all_time:_arg1.best_ranks.A};
} else {
_local13 = {};
};
if (_arg1.num_scores){
_local14 = {today:_arg1.num_scores.D, yesterday:_arg1.num_scores.P, week:_arg1.num_scores.W, year:_arg1.num_scores.Y, all_time:_arg1.num_scores.A};
} else {
_local14 = {};
};
_local3 = {score:_arg1.score, value:_arg1.value, username:_local4, best_scores:_local12, best_ranks:_local13, num_scores:_local14};
};
callListener(APIEvent.SCORE_POSTED, _arg1.success, _local3);
break;
case "loadScores":
_local3 = new Object();
_local6 = getScoreBoardById(_arg1.board);
if (_local6){
_local6.setScores(_arg1.scores, _arg1.period, _arg1.page, _arg1.num_results, _arg1.num_scores);
};
callListener(APIEvent.SCORES_LOADED, _arg1.success, {board:_local6});
break;
case "unlockMedal":
if (_medals){
_local10 = getMedal(_arg1.medal_name);
if (_local10.unlocked){
return;
};
_local10.unlocked = true;
callListener(APIEvent.MEDAL_UNLOCKED, _arg1.success, {medal_id:_local10.id, medal:_local10});
};
break;
case "getMedals":
if (_arg1.success){
populateMedals(_arg1.medals);
};
callListener(APIEvent.MEDALS_LOADED, _arg1.success, _local3);
break;
case "loadSaveFile":
if (_arg1.success){
_local11 = getSaveGroupById(_arg1.group_id);
_local15 = new SaveFile(_local11);
_local15.id = _arg1.file.save_id;
_local15.name = _arg1.file.filename;
_local15.fileUrl = (_saveFilePath + _arg1.file.file);
_local15.thumbnailUrl = (_imageFilePath + _arg1.file.thumb);
_local15.authorName = _arg1.file.user_name;
_local15.authorId = _arg1.file.user_id;
_local15.setStatus(_arg1.file.status);
_local15.description = _arg1.file.description;
_local15.setFileSize(_arg1.file.file_size);
if (((_arg1.file.keys) && (_arg1.file.keys.length))){
_local16 = 0;
while (_local16 < _arg1.file.keys.length) {
_local15.setKey(_arg1.file.keys[_local16].id, _arg1.file.keys[_local16].value);
_local16++;
};
};
if (((_arg1.file.ratings) && (_arg1.file.ratings.length))){
_local16 = 0;
while (_local16 < _arg1.file.ratings.length) {
_local15.setRating(_arg1.file.ratings[_local16].id, _arg1.file.ratings[_local16].votes, _arg1.file.ratings[_local16].score);
_local16++;
};
};
if (_arg1.get_contents){
_local15.loadContents();
};
};
save_file = _local15;
callListener(APIEvent.FILE_INITIALIZED, _arg1.success, {save_id:_local15.id, file:_local15});
break;
case "lookupSaveFiles":
_local7 = [];
if (((_arg1.success) && (_arg1.files))){
_local16 = 0;
while (_local16 < _arg1.files.length) {
_local17 = _arg1.files[_local16];
_local15 = new SaveFile(getSaveGroupById(_arg1.group_id));
_local15.name = _local17.filename;
_local15.id = _local17.save_id;
_local15.description = _local17.description;
_local15.thumbnailUrl = (_imageFilePath + _local17.thumb);
_local15.fileUrl = (_saveFilePath + _local17.file);
_local15.authorName = _local17.user_name;
_local15.authorId = _local17.user_id;
_local15.setStatus(_local17.status);
_local15.setFileSize(_local17.file_size);
if (((_local17.keys) && (_local17.keys.length))){
_local18 = 0;
while (_local18 < _local17.keys.length) {
_local15.setKey(_local17.keys[_local18].id, _local17.keys[_local18].value);
_local18++;
};
};
if (((_local17.ratings) && (_local17.ratings.length))){
_local18 = 0;
while (_local18 < _local17.ratings.length) {
_local15.setRating(_local17.ratings[_local18].id, _local17.ratings[_local18].votes, _local17.ratings[_local18].score);
_local18++;
};
};
_local7.push(_local15);
_local16++;
};
};
_arg1.owner.setResults(_local7);
_arg1.owner.dispatchEvent(new APIEvent(APIEvent.QUERY_COMPLETE, _arg1.success, {query:_arg1.owner}));
callListener(APIEvent.QUERY_COMPLETE, _arg1.success, {query:_arg1.owner});
break;
case "rateSaveFile":
_local15 = _arg1.owner;
_arg1.success = ((_arg1.success) && (!(_arg1.already_voted)));
if (_arg1.success){
_local15.setRating(_arg1.rating_id, _arg1.votes, _arg1.score);
};
_arg1.file = _local15;
if (_arg1.already_voted){
_local19 = new APIError("PERMISSION_DENIED", "You have already voted on this item today");
_local15.dispatchEvent(new APIEvent(APIEvent.VOTE_COMPLETE, _arg1.success, {error:_local19, file:_local15, save_id:_local15.id}));
callListener(APIEvent.VOTE_COMPLETE, _arg1.success, _arg1);
} else {
_local20 = _local15.getRating(_arg1.rating_id);
_local15.dispatchEvent(new APIEvent(APIEvent.VOTE_COMPLETE, _arg1.success, {rating:_local20, file:_local15, save_id:_local15.id}));
API.callListener(APIEvent.VOTE_COMPLETE, _arg1.success, {rating:_local20, file:_local15, save_id:_local15.id});
};
break;
case "saveFile":
_local3 = {};
if (_arg1.success){
_local3 = {save_id:_arg1.save_id, filename:_arg1.filename, file_url:_arg1.file_url, thumbnail:_arg1.thumbnail, icon:_arg1.icon};
SaveFile(_arg1.owner).fileSaved(_local3);
};
_arg1.owner.dispatchEvent(new APIEvent(APIEvent.FILE_SAVED, _arg1.success, {save_id:save_file.id, file:save_file}));
callListener(APIEvent.FILE_SAVED, _arg1.success, {save_id:save_file.id, file:save_file});
save_file = null;
break;
case "checkFilePrivs":
_local3 = {filename:_arg1.filename, folder:_arg1.folder, can_read:_arg1.can_read, can_write:_arg1.can_write};
callListener(APIEvent.FILE_PRIVS_LOADED, _arg1.success, _local3);
break;
};
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:uint=0, _arg5:Boolean=false):void{
_eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function hasEventListener(_arg1:String):Boolean{
return (_eventDispatcher.hasEventListener(_arg1));
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
private static function dispatchEvent(_arg1:Event):void{
_eventDispatcher.dispatchEvent(_arg1);
echo(("Fired Event: " + _arg1.type));
}
static function callListener(_arg1:String, _arg2:Boolean=true, _arg3=undefined):void{
dispatchEvent(new APIEvent(_arg1, _arg2, _arg3));
if (_bridge){
_bridge.sendEvent(_arg1, {success:_arg2, data:_arg3});
};
}
private static function getCommandName(_arg1:String):String{
return (_arg1);
}
private static function getCommandID(_arg1:String):String{
return (_arg1);
}
private static function getPeriodAliases():Object{
var _local2:String;
var _local1:Object = new Object();
for (_local2 in period_aliases) {
_local1[period_aliases[_local2].alias] = _local2;
};
return (_local1);
}
public static function getPeriodName(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].name);
};
};
return (null);
}
public static function getPeriodAlias(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].alias);
};
};
return (null);
}
private static function sendError(_arg1:Object, _arg2:APIError):void{
var _local3:String = ((((("[NewgroundsAPI ERROR] :: " + getCommandName(_arg1.command_id)) + "() - ") + _arg2.name) + ":\n\t\t\t\t") + _arg2.message);
trace(_local3);
if (_bridge){
_bridge.sendEvent("trace", {data:_local3});
};
}
private static function sendWarning(_arg1:String, _arg2:String=null):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI WARNING] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(_arg1);
if (_bridge){
_bridge.sendEvent("trace", {data:_arg1});
};
}
private static function sendNotice(_arg1:String, _arg2:String=null):void{
var _local3:String;
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(_arg1);
if (_bridge){
_bridge.sendEvent("trace", {data:_arg1});
};
}
private static function fatalError(_arg1:String, _arg2:String):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n\tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(("***ERROR*** class=API\n\n" + _arg1));
}
public static function openLoginPage(){
if (hasUserSession()){
return;
};
}
public static function sendSecureCommand(_arg1:String, _arg2:Object, _arg3:Object=null, _arg4:Object=null, _arg5=null):void{
if (((((!(debugMode)) && (!(hasUserSession())))) && (!(hasUserEmail())))){
sendError({command_id:getCommandID(_arg1)}, new APIError("IDENTIFICATION_REQUIRED", (("You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail(\"name@domain.com\"); ) to use " + _arg1) + "().")));
return;
};
if (!_arg1){
fatalError("Missing command", "sendSecureCommand");
};
if (!_arg2){
fatalError("Missing secure_params", "sendSecureCommand");
};
if (!_arg3){
_arg3 = new Object();
};
var _local6 = "";
var _local7:uint;
while (_local7 < 16) {
_local6 = (_local6 + compression_radix.charAt(Math.floor((Math.random() * compression_radix.length))));
_local7++;
};
if (((debugMode) && (!(session_id)))){
_arg2.session_id = "";
} else {
_arg2.session_id = session_id;
};
_arg2.as_version = 3;
_arg2.user_email = user_email;
_arg2.publisher_id = publisher_id;
_arg2.seed = _local6;
_arg2.command_id = getCommandID(_arg1);
var _local8:String = MD5.hash(_local6);
var _local9:String = RC4.encrypt(JSON.encode(_arg2), _encryptionKey);
var _local10:String = (_local8 + _local9);
_arg3.secure = compressHex(_local10);
secureCommand = _arg1;
sendCommand("securePacket", _arg3, false, _arg4, _arg5);
}
public static function stopPendingCommands():void{
SmartURLLoader.closeAll();
}
private static function onCommandComplete(_arg1:Event):void{
var response:Object;
var error:APIError;
var e = _arg1;
var loader:SmartURLLoader = SmartURLLoader(e.target);
echo((("INPUT: \n" + loader.response) + "\n"));
var i:uint;
while (i < _preloadAssets.length) {
if (_preloadAssets[i] == loader){
_preloadAssets.splice(i, 1);
break;
};
i = (i + 1);
};
try {
response = JSON.decode(loader.response);
} catch(error:Error) {
};
if (!response){
response = {command_id:loader._command, success:false};
};
response.owner = loader.owner;
if (((!(response)) || (!(response.success)))){
if (response.command_id == "connectMovie"){
connected = false;
};
error = new APIError(response.error_code, response.error_msg);
sendError(response, error);
if (response.command_id){
doEvent(response);
};
} else {
doEvent(response);
};
}
private static function onCommandError(_arg1:Event):void{
var _local2:Object = {success:false};
var _local3:SmartURLLoader = SmartURLLoader(_arg1.target);
_local2.owner = _local3.owner;
var _local4:uint;
while (_local4 < _preloadAssets.length) {
if (_preloadAssets[_local4] == _local3){
_preloadAssets.splice(_local4, 1);
break;
};
_local4++;
};
if (_local3._command){
_local2.command_id = _local3._command;
if (_local2.command_id == "connectMovie"){
connected = false;
};
doEvent(_local2);
};
}
private static function sendCommand(_arg1:String, _arg2:Object, _arg3:Boolean=false, _arg4:Object=null, _arg5=null):void{
var _local7:String;
var _local8:String;
var _local9:String;
if (((!(connected)) && (!((_arg1 == "connectMovie"))))){
_local7 = (("NewgroundsAPI." + _arg1) + "() - NewgroundsAPI.connectMovie() must be called before this command can be called\n");
fatalError(_local7, "connectMovie");
};
var _local6:SmartURLLoader = new SmartURLLoader();
_local6.addVariable("command_id", getCommandID(_arg1));
_local6.addVariable("tracker_id", _movieId);
if (debugMode){
_local6.addVariable("debug", 1);
};
if (_arg2){
for (_local8 in _arg2) {
_local6.addVariable(_local8, _arg2[_local8]);
};
};
if (_arg4){
for (_local9 in _arg4) {
_local6.addFile(_local9, _arg4[_local9], _local9);
};
};
if (_arg3){
_local6.method = URLRequestMethod.GET;
} else {
_local6.method = URLRequestMethod.POST;
};
_local6.preventCache = true;
if (_arg3){
_local6.openBrowser = true;
_local6.method = URLRequestMethod.GET;
} else {
_local6.addEventListener(Event.COMPLETE, onCommandComplete);
_local6.addEventListener(IOErrorEvent.IO_ERROR, onCommandError);
_local6.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onCommandError);
_local6.method = URLRequestMethod.POST;
};
if (_arg2.secure){
_local6._command = secureCommand;
} else {
_local6._command = getCommandID(_arg1);
};
_local6.owner = _arg5;
_local6.load(GATEWAY_URL);
}
public static function isFlashVersion(_arg1:uint, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0):Boolean{
var _local6:Array = Capabilities.version.split(" ")[1].split(",");
var _local7:Array = arguments;
var _local8:uint;
while (_local8 < _local7.length) {
_local6[_local8] = uint(_local6[_local8]);
_local8++;
};
_local8 = 0;
while (_local8 < _local7.length) {
if (_local6[_local8] > _local7[_local8]){
return (true);
};
if (_local6[_local8] < _local7[_local8]){
return (false);
};
_local8++;
};
return (true);
}
public static function createAd():FlashAd{
sendMessage("You may see a security sandbox violation. This is normal!");
return (new FlashAd());
}
public static function sendMessage(_arg1:String, _arg2:Boolean=false):void{
var _local3:String = ("[NewgroundsAPI] :: " + _arg1);
trace(_local3);
if (_bridge){
_bridge.sendEvent("trace", {data:_local3});
};
}
private static function echo(_arg1:String):void{
if (do_echo){
trace(_arg1);
};
}
}
}//package com.newgrounds
Section 20
//APIError (com.newgrounds.APIError)
package com.newgrounds {
import flash.utils.*;
public class APIError {
public var code:Number;// = 0
public var message:String;
public var name:String;
public var alias:String;
public static const aliases:Array = new Array("UNKNOWN_ERROR", "INVALID_API_ID", "MISSING_PARAM", "INVALID_STAT_ID", "INVALID_COMMAND_ID", "FLASH_ADS_NOT_APPROVED", "PERMISSION_DENIED", "IDENTIFICATION_REQUIRED", "INVALID_EMAIL_ADDRESS", "BANNED_USER", "SESSION_EXPIRED", "INVALID_SCORE", "INVALID_MEDAL", "INVALID_FOLDER", "FILE_NOT_FOUND", "SITE_ID_REQUIRED", "UPLOAD_IN_PROGRESS", "USER_CANCELLED", "CONFIRM_REQUEST", "CONNECTION_FAILED");
private static const always_caps:Array = new Array("API", "URL", "ID");
public static const error_codes:Object = init_codes();
public static const error_names:Object = init_names();
public function APIError(_arg1, _arg2:String){
if ((_arg1 is String)){
_arg1 = error_codes[_arg1];
} else {
if (!(_arg1 is uint)){
_arg1 = 0;
};
};
this.code = _arg1;
this.message = _arg2;
this.name = error_names[_arg1];
this.alias = aliases[_arg1];
}
public function isError():Boolean{
return (true);
}
public static function init_codes():Dictionary{
var _local1:Dictionary = new Dictionary();
var _local2:uint;
while (_local2 < aliases.length) {
_local1[aliases[_local2]] = _local2;
_local2++;
};
return (_local1);
}
private static function init_names():Array{
var _local3:Array;
var _local4:uint;
var _local5:String;
var _local1:Array = new Array();
var _local2:uint;
while (_local2 < aliases.length) {
_local3 = aliases[_local2].toLowerCase().split("_");
_local4 = 0;
while (_local4 < _local3.length) {
_local3[_local4] = (_local3[_local4].substr(0, 1).toUpperCase() + _local3[_local4].substr(1, _local3[_local4].length));
for each (_local5 in always_caps) {
if (_local3[_local4].toUpperCase() == _local5){
_local3[_local4] = _local3[_local4].toUpperCase();
};
};
_local4++;
};
_local1[_local2] = _local3.join(" ");
_local2++;
};
return (_local1);
}
}
}//package com.newgrounds
Section 21
//APIEvent (com.newgrounds.APIEvent)
package com.newgrounds {
import flash.events.*;
public class APIEvent extends Event {
private var _data;
private var _success:Boolean;
private var _target;
private var _error:APIError;
public static const API_CONNECTED:String = "movieConnected";
public static const ADS_APPROVED:String = "adsApproved";
public static const AD_ATTACHED:String = "adAttached";
public static const HOST_BLOCKED:String = "hostBlocked";
public static const NEW_VERSION_AVAILABLE:String = "newVersionAvailable";
public static const EVENT_LOGGED:String = "eventLogged";
public static const SCORE_POSTED:String = "scorePosted";
public static const SCORES_LOADED:String = "scoresLoaded";
public static const UNLOCK_MEDAL:String = "unlockMedal";
public static const MEDAL_UNLOCKED:String = "medalUnlocked";
public static const MEDALS_LOADED:String = "medalsLoaded";
public static const METADATA_LOADED:String = "metadataLoaded";
public static const FILE_PRIVS_LOADED:String = "filePrivsLoaded";
public static const FILE_SAVED:String = "fileSaved";
public static const FILE_LOADED:String = "fileLoaded";
public static const FILE_INITIALIZED:String = "fileInitialized";
public static const FILE_REQUESTED:String = "fileRequested";
public static const QUERY_COMPLETE:String = "queryComplete";
public static const VOTE_COMPLETE:String = "voteComplete";
public function APIEvent(_arg1:String, _arg2:Boolean=true, _arg3=undefined){
super(_arg1);
this._data = _arg3;
this._success = _arg2;
}
public function get success():Boolean{
return (this._success);
}
public function get data(){
return (this._data);
}
}
}//package com.newgrounds
Section 22
//BaseN (com.newgrounds.BaseN)
package com.newgrounds {
import flash.utils.*;
public class BaseN {
private var _hashIndex:String;
private var _hashVal:Dictionary;
private var _base:Number;
public function BaseN(_arg1:String=null){
if (_arg1){
this._hashIndex = _arg1;
} else {
this._hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
};
this._base = this._hashIndex.length;
this._hashVal = new Dictionary();
var _local2:uint;
while (_local2 < this._base) {
this._hashVal[this._hashIndex.charAt(_local2)] = _local2;
_local2++;
};
}
public function encode(_arg1:Number, _arg2:uint=1):String{
var _local3:String = _arg1.toString();
var _local4 = "";
if (_local3.charAt(0) == "-"){
_local4 = "-";
_local3 = _local3.substring(1);
};
var _local5:Array = _local3.split(".", 2);
_local4 = (_local4 + this.baseNEncoder(_local5[0], _arg2));
if (_local5.length > 1){
_local4 = (_local4 + ("." + this.baseNEncoder(_local5[1])));
};
return (_local4);
}
public function decode(_arg1:String):Number{
var _local2 = "";
if (_arg1.charAt(0) == "-"){
_local2 = "-";
_arg1 = _arg1.substring(1);
};
var _local3:Array = _arg1.split(".", 2);
_local2 = (_local2 + this.baseNDecoder(_local3[0]));
if (_local3.length > 1){
_local2 = (_local2 + ".");
_local2 = (_local2 + this.baseNDecoder(_local3[1]));
};
return (Number(_local2));
}
private function baseNEncoder(_arg1:uint, _arg2:uint=1):String{
var _local3 = "";
var _local4:uint = _arg1;
while (_local4 != 0) {
_local3 = (this._hashIndex.charAt((_local4 % this._base)) + _local3);
_local4 = (_local4 / this._base);
};
if (_arg2){
while (_local3.length < _arg2) {
_local3 = (this._hashIndex.charAt(0) + _local3);
};
};
return (_local3);
}
private function baseNDecoder(_arg1:String):uint{
var _local2:uint;
var _local3:uint;
while (_local3 < _arg1.length) {
_local2 = (_local2 * this._base);
_local2 = (_local2 + this._hashVal[_arg1.charAt(_local3)]);
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 23
//Bridge (com.newgrounds.Bridge)
package com.newgrounds {
import flash.events.*;
import flash.net.*;
public class Bridge {
private var _inConnection:LocalConnection;
private var _outConnection:LocalConnection;
private var _widgetId:String;
public function Bridge(_arg1:String){
this._widgetId = _arg1;
this._inConnection = new LocalConnection();
this._outConnection = new LocalConnection();
this._inConnection.client = this;
this._inConnection.connect(("rec_" + this._widgetId));
this._outConnection.addEventListener(StatusEvent.STATUS, this.onStatus);
}
public function sendCommand(_arg1:String, _arg2:Object):void{
if (this._outConnection){
this._outConnection.send(this._widgetId, "sendCommand", _arg1, this.scrubParameters(_arg2));
};
}
public function sendEvent(_arg1:String, _arg2:Object):void{
if (this._outConnection){
this._outConnection.send(this._widgetId, "sendEvent", _arg1, this.scrubParameters(_arg2));
};
}
public function receiveEvent(_arg1:String, _arg2:Object):void{
API.callListener(_arg1, _arg2.success, _arg2.data);
}
public function scrubParameters(_arg1:Object):Object{
var _local3:String;
var _local2:Object = new Object();
for (_local3 in _arg1) {
if ((((((((((_arg1[_local3] is String)) || ((_arg1[_local3] is Number)))) || ((_arg1[_local3] is uint)))) || ((_arg1[_local3] is int)))) || ((_arg1[_local3] is Boolean)))){
_local2[_local3] = _arg1[_local3];
};
};
return (_local2);
}
private function onStatus(_arg1:Event):void{
}
}
}//package com.newgrounds
Section 24
//Medal (com.newgrounds.Medal)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class Medal {
private var _id:uint;
private var _name:String;
private var _value:uint;
private var _difficultyId:uint;
private var _unlocked:Boolean;// = false
private var _iconUrl:URLRequest;
private var _iconLoader:Loader;
private var _icon:BitmapData;
private static const DEFAULT_ICON:BitmapData = new BitmapData(50, 50, false, 0);
private static const DIFFICULT_NAMES:Array = [null, "Easy", "Moderate", "Challenging", "Difficult", "Brutal"];
public function Medal(_arg1:uint, _arg2:String, _arg3:uint, _arg4:uint, _arg5:Boolean, _arg6:String){
var id = _arg1;
var name = _arg2;
var value = _arg3;
var difficulty = _arg4;
var unlocked = _arg5;
var iconUrl = _arg6;
this._icon = DEFAULT_ICON;
super();
this._id = id;
this._name = name;
this._value = value;
this._difficultyId = difficulty;
this._unlocked = unlocked;
if (iconUrl){
this._iconUrl = new URLRequest(iconUrl);
this._iconLoader = new Loader();
this._iconLoader.contentLoaderInfo.addEventListener(Event.INIT, this.onIconLoaderInit);
this._iconLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onIconLoaderError);
this._iconLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onIconLoaderError);
this._iconLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onIconLoaderComplete);
try {
this._iconLoader.load(this._iconUrl, new LoaderContext(true));
} catch(e:Error) {
onIconLoaderError(null);
};
};
}
public function get difficulty():String{
return (DIFFICULT_NAMES[this._difficultyId]);
}
public function get difficultyId():uint{
return (this._difficultyId);
}
public function get icon():BitmapData{
return (this._icon);
}
public function get id():uint{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get unlocked():Boolean{
return (this._unlocked);
}
public function isUnlocked():Boolean{
return (this._unlocked);
}
public function set unlocked(_arg1:Boolean):void{
this._unlocked = _arg1;
}
public function get value():uint{
return (this._value);
}
public function get bytesLoaded():uint{
return ((this._iconLoader) ? this._iconLoader.contentLoaderInfo.bytesLoaded : 0);
}
public function get bytesTotal():uint{
return ((this._iconLoader) ? this._iconLoader.contentLoaderInfo.bytesTotal : 0);
}
public function getID():uint{
return (this._id);
}
public function getName():String{
return (this._name);
}
public function getValue():uint{
return (this._value);
}
public function getDifficulty():String{
return (DIFFICULT_NAMES[this._difficultyId]);
}
private function onIconLoaderInit(_arg1:Event):void{
}
private function onIconLoaderError(_arg1:IOErrorEvent):void{
trace((((("[NewgroundsAPI WARNING] :: Failed to load medal icon for " + this.name) + " (") + this._iconUrl.url.split("/").pop()) + ")"));
this._iconLoader.unload();
this._iconLoader = null;
}
private function onIconLoaderComplete(_arg1:Event):void{
var _local2:Bitmap = (this._iconLoader.content as Bitmap);
this._icon = _local2.bitmapData;
this._iconLoader.unload();
this._iconLoader = null;
}
public function unlock():void{
if (!this._unlocked){
API.unlockMedal(this._name);
};
}
public function createIconBitmap():Bitmap{
return (new Bitmap(this.icon));
}
public function toString():String{
return (this._name);
}
public static function createFromObject(_arg1:Object):Medal{
return (new Medal(_arg1.medal_id, _arg1.medal_name, _arg1.medal_value, _arg1.medal_difficulty, _arg1.medal_unlocked, _arg1.medal_icon));
}
}
}//package com.newgrounds
Section 25
//RC4 (com.newgrounds.RC4)
package com.newgrounds {
public class RC4 {
private static var sbox:Array = new Array(0xFF);
private static var mykey:Array = new Array(0xFF);
public static function encrypt(_arg1:String, _arg2:String):String{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToHex(_local5));
}
public static function encryptbin(_arg1:String, _arg2:String):Array{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (_local5);
}
public static function decrypt(_arg1:String, _arg2:String):String{
var _local3:Array = hexToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToStr(_local5));
}
private static function initialize(_arg1:Array):void{
var _local3:uint;
var _local2:uint;
var _local4:uint = _arg1.length;
var _local5:uint;
while (_local5 <= 0xFF) {
mykey[_local5] = _arg1[(_local5 % _local4)];
sbox[_local5] = _local5;
_local5++;
};
_local5 = 0;
while (_local5 <= 0xFF) {
_local2 = (((_local2 + sbox[_local5]) + mykey[_local5]) % 0x0100);
_local3 = sbox[_local5];
sbox[_local5] = sbox[_local2];
sbox[_local2] = _local3;
_local5++;
};
}
private static function calculate(_arg1:Array, _arg2:Array):Array{
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local10:uint;
initialize(_arg2);
var _local3:uint;
var _local4:uint;
var _local5:Array = new Array();
var _local9:uint;
while (_local9 < _arg1.length) {
_local3 = ((_local3 + 1) % 0x0100);
_local4 = ((_local4 + sbox[_local3]) % 0x0100);
_local7 = sbox[_local3];
sbox[_local3] = sbox[_local4];
sbox[_local4] = _local7;
_local10 = ((sbox[_local3] + sbox[_local4]) % 0x0100);
_local6 = sbox[_local10];
_local8 = (_arg1[_local9] ^ _local6);
_local5.push(_local8);
_local9++;
};
return (_local5);
}
private static function charsToHex(_arg1:Array):String{
var _local2:String = new String("");
var _local3:Array = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local4:uint;
while (_local4 < _arg1.length) {
_local2 = (_local2 + (_local3[(_arg1[_local4] >> 4)] + _local3[(_arg1[_local4] & 15)]));
_local4++;
};
return (_local2);
}
private static function hexToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:uint = ((_arg1.substr(0, 2))=="0x") ? 2 : 0;
while (_local3 < _arg1.length) {
_local2.push(parseInt(_arg1.substr(_local3, 2), 16));
_local3 = (_local3 + 2);
};
return (_local2);
}
private static function charsToStr(_arg1:Array):String{
var _local2:String = new String("");
var _local3:uint;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
private static function strToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:uint;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 26
//SaveFile (com.newgrounds.SaveFile)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
public class SaveFile extends EventDispatcher {
private var _filename:String;
private var _id:uint;
private var _description:String;
private var _contents;
private var _loader:SmartURLLoader;
private var _group:SaveGroup;
private var _keys:Dictionary;
private var _ratings:Dictionary;
private var _fileUrl:String;
private var _thumbnail:BitmapData;
private var _thumbnailUrl:String;
private var _authorId:uint;
private var _authorName:String;
private var _contentSize:uint;
private var _locked:Boolean;
private var _status:uint;
private var duplicate_id:uint;
private var _draft:Boolean;
public static const STATUS_PRIVATE = 1;
public static const STATUS_SHARED = 2;
public static const STATUS_UNAPPROVED = 3;
public static const STATUS_APPROVED = 4;
public function SaveFile(_arg1:SaveGroup){
this._keys = new Dictionary();
this._ratings = new Dictionary();
this._group = _arg1;
this._description = "";
}
public function get name():String{
return (this._filename);
}
public function set name(_arg1:String):void{
this._filename = _arg1;
}
public function get id():uint{
return (this._id);
}
public function set id(_arg1:uint):void{
this._id = _arg1;
}
public function get description():String{
return (this._description);
}
public function set description(_arg1:String):void{
this._description = _arg1;
}
public function get contents(){
return (this._contents);
}
public function set contents(_arg1):void{
this._contents = _arg1;
this._contentSize = 0;
}
public function get thumbnailUrl():String{
return (this._thumbnailUrl);
}
public function set thumbnailUrl(_arg1:String):void{
this._thumbnailUrl = _arg1;
}
public function get fileUrl():String{
return (this._fileUrl);
}
public function set fileUrl(_arg1:String):void{
this._fileUrl = _arg1;
}
public function get thumbnail():BitmapData{
return (this._thumbnail);
}
public function set thumbnail(_arg1:BitmapData):void{
if (this._thumbnail){
this._thumbnail.dispose();
};
this._thumbnail = _arg1.clone();
}
public function loadThumbnail():Loader{
var _local1:Loader = new Loader();
if (this._thumbnailUrl){
_local1.load(new URLRequest(this._thumbnailUrl));
};
return (_local1);
}
public function get bytesLoaded():uint{
return ((this._loader) ? this._loader.bytesLoaded : this._contentSize);
}
public function get bytesTotal():uint{
return (this._contentSize);
}
public function get status():uint{
return (this._status);
}
function setStatus(_arg1:uint):void{
this._status = _arg1;
}
public function get groupId():uint{
return (this._group.id);
}
public function get groupName():String{
return (this._group.name);
}
public function get groupType():uint{
return (this._group.type);
}
public function get authorName():String{
return (this._authorName);
}
public function set authorName(_arg1:String):void{
this._authorName = _arg1;
}
public function get authorId():uint{
return (this._authorId);
}
public function set authorId(_arg1:uint):void{
this._authorId = _arg1;
}
public function get draft():Boolean{
return (this._draft);
}
public function set draft(_arg1:Boolean):void{
this._draft = _arg1;
}
public function get locked():Boolean{
return (this._locked);
}
public function get shared():Boolean{
return ((this._status == STATUS_SHARED));
}
public function get isPrivate():Boolean{
return ((this._status == STATUS_PRIVATE));
}
public function get isPublic():Boolean{
if (this.isPrivate){
return (false);
};
if (((this._group.isType("SYSTEM")) || (this._group.isType("PRIVATE")))){
return (false);
};
if (this._group.isType("PUBLIC")){
return (true);
};
if (this.approved){
return (true);
};
return (false);
}
public function get approved():Boolean{
return ((this._status > STATUS_UNAPPROVED));
}
public function get keys():Dictionary{
return (this._keys);
}
public function get ratings():Dictionary{
return (this._ratings);
}
function setPermissions(_arg1:uint, _arg2:Boolean){
_arg2 = this._locked;
this._status = _arg1;
}
function setFileSize(_arg1:uint):void{
this._contentSize = _arg1;
}
public function isLocked():Boolean{
return (this._locked);
}
public function getDescription():String{
return (this._description);
}
public function getShared():Boolean{
return (this._draft);
}
public function getDuplicateID():uint{
return (this.duplicate_id);
}
public function getKeys():Dictionary{
return (this._keys);
}
public function getRatings():Dictionary{
return (this._ratings);
}
public function setKey(_arg1, _arg2):void{
var _local3:SaveKey;
if ((_arg1 is String)){
_local3 = this._group.getKeyName(_arg1);
} else {
_local3 = this._group.getKeyID(_arg1);
};
if (_local3){
switch (_local3.type){
case SaveKey.TYPE_BOOLEAN:
this._keys[_local3] = {id:_local3.id, value:Boolean(int(_arg2))};
break;
case SaveKey.TYPE_FLOAT:
this._keys[_local3] = {id:_local3.id, value:Number(_arg2)};
break;
case SaveKey.TYPE_INTEGER:
this._keys[_local3] = {id:_local3.id, value:int(_arg2)};
break;
case SaveKey.TYPE_STRING:
default:
this._keys[_local3] = {id:_local3.id, value:_arg2.toString()};
break;
};
};
}
public function getKey(_arg1){
var _local2:SaveKey;
if ((_arg1 is String)){
_local2 = this._group.getKeyName(_arg1);
} else {
_local2 = this._group.getKeyID(_arg1);
};
if (_local2){
return (this._keys[_local2]);
};
return (null);
}
public function setRating(_arg1, _arg2:Number, _arg3:Number):void{
var _local4:SaveRating;
if ((_arg1 is String)){
_local4 = this._group.getRatingName(_arg1);
} else {
_local4 = this._group.getRatingID(_arg1);
};
if (_local4){
this._ratings[_local4] = {id:_local4.id, name:_local4.name, votes:_arg2, score:_arg3};
};
}
public function getRating(_arg1):Object{
var _local2:SaveRating;
if ((_arg1 is String)){
_local2 = this._group.getRatingName(_arg1);
} else {
_local2 = this._group.getRatingID(_arg1);
};
if (_local2){
return (this._ratings[_local2]);
};
return (null);
}
public function sendRating(_arg1:String, _arg2:Number):void{
var _local3:SaveRating = this._group.getRatingName(_arg1);
if (!_local3){
trace((("[NewgroundsAPISaveFile] " + _arg1) + " is not a recognized save file"));
return;
};
if ((((_arg2 < _local3.minValue)) || ((_arg2 > _local3.maxValue)))){
trace(((("[NewgroundsAPISaveFile] Vote must be between " + _local3.minValue) + " and ") + _local3.maxValue));
return;
};
_local3.voted = true;
API.rateSaveFile(this, _local3, _arg2);
}
override public function toString():String{
var _local2:Object;
var _local3:Object;
var _local1 = (((((("Save File " + this._filename) + " ID: ") + this._id) + "\n ") + this._description) + "\n");
for each (_local2 in this._keys) {
_local1 = (_local1 + ((((" " + this._group.getKeyID(_local2.id).name) + ": ") + _local2.val) + "\n"));
};
for each (_local3 in this._ratings) {
_local1 = (_local1 + ((((((" " + this._group.getRatingID(_local3.id).name) + "\n Score: ") + _local3.score) + " Votes: ") + _local3.votes) + "\n"));
};
return (_local1);
}
public function toObject():Object{
var _local2:Object;
var _local1:Object = {group:this.groupId, filename:this.name, description:this.description, shared:true};
_local1.keys = [];
for each (_local2 in this._keys) {
_local1.keys.push({id:_local2.id, value:_local2.val});
};
return (_local1);
}
public function save(_arg1:Boolean=false, _arg2:Boolean=false):void{
API.saveFile(this, _arg1, _arg2);
}
public function loadContents():void{
if (this._fileUrl){
this._loader = new SmartURLLoader();
this._loader.responseFormat = URLLoaderDataFormat.BINARY;
this._loader.addEventListener(Event.COMPLETE, this.onContentsLoaded);
this._loader.addEventListener(IOErrorEvent.IO_ERROR, this.onContentsError);
this._loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onContentsError);
this._loader.load(this._fileUrl);
};
}
private function onContentsError(_arg1:Event):void{
this._loader = null;
dispatchEvent(new APIEvent(APIEvent.FILE_LOADED, false));
API.callListener(APIEvent.FILE_LOADED, false);
}
private function onContentsLoaded(_arg1:Event):void{
var _local2:ByteArray = _arg1.target.response;
this._contentSize = _local2.length;
_local2.uncompress();
var _local3:uint = _local2.readUnsignedByte();
if (_local3 == 0){
this._contents = new ByteArray();
this._contents.writeBytes(_local2, 1);
} else {
this._contents = _local2.readObject();
};
this._loader = null;
dispatchEvent(new APIEvent(APIEvent.FILE_LOADED, true, {file:this}));
API.callListener(APIEvent.FILE_LOADED, true, {file:this});
}
public function loadAuthorPage(){
API.loadUserPage(this._authorId, this._authorName);
}
function fileSaved(_arg1:Object):void{
this._id = _arg1.save_id;
this._thumbnailUrl = _arg1.thumbnail;
this._fileUrl = _arg1.file_url;
}
}
}//package com.newgrounds
Section 27
//SaveGroup (com.newgrounds.SaveGroup)
package com.newgrounds {
public class SaveGroup {
private var _name:String;
private var _id:uint;
private var _type:uint;
private var _keys:Array;
private var _ratings:Array;
private var _files:Array;
private var _query:SaveGroupQuery;
public static const TYPE_SYSTEM:uint = 0;
public static const TYPE_PRIVATE:uint = 1;
public static const TYPE_PUBLIC:uint = 2;
public static const TYPE_MODERATED:uint = 3;
public static const KEY_TYPES:Array = [null, "float", "integer", "string", "boolean"];
public static const TYPES:Object = {SYSTEM:0, PRIVATE:1, PUBLIC:2, MODERATED:3};
public function SaveGroup(_arg1:uint, _arg2:String, _arg3:uint){
this._name = _arg2;
this._id = _arg1;
this._type = _arg3;
this._ratings = [];
this._keys = [];
this._files = [];
this._query = new SaveGroupQuery(this);
}
public function get name():String{
return (this._name);
}
public function get id():uint{
return (this._id);
}
public function get type():uint{
return (this._type);
}
public function get keys():Array{
return (this._keys);
}
public function get ratings():Array{
return (this._ratings);
}
public function get group_id():uint{
return (this._id);
}
public function get group_name():String{
return (this._name);
}
public function addRating(_arg1:SaveRating):void{
this._ratings.push(_arg1);
}
function getRating(_arg1):SaveRating{
var _local2:uint;
while (_local2 < this._ratings.length) {
if ((((((((_arg1 is uint)) || ((_arg1 is int)))) || ((_arg1 is Number)))) && ((this._ratings[_local2].rating_id == _arg1)))){
return (this._ratings[_local2]);
};
if (this._ratings[_local2].name == _arg1){
return (this._ratings[_local2]);
};
_local2++;
};
return (null);
}
public function getRatingID(_arg1:uint):SaveRating{
var _local2:uint;
while (_local2 < this._ratings.length) {
if (this._ratings[_local2].id == _arg1){
return (this._ratings[_local2]);
};
_local2++;
};
return (null);
}
public function getRatingName(_arg1:String):SaveRating{
var _local2:uint;
while (_local2 < this._ratings.length) {
if (this._ratings[_local2].name == _arg1){
return (this._ratings[_local2]);
};
_local2++;
};
return (null);
}
public function addKey(_arg1:SaveKey):void{
this._keys.push(_arg1);
}
public function getKey(_arg1):SaveKey{
var _local2:uint;
while (_local2 < this._keys.length) {
if ((((((((_arg1 is Number)) || ((_arg1 is uint)))) || ((_arg1 is int)))) && ((this._keys[_local2].key_id == _arg1)))){
return (this._keys[_local2]);
};
if (this._keys[_local2].key_name == _arg1){
return (this._keys[_local2]);
};
_local2++;
};
return (null);
}
public function getKeyID(_arg1:uint):SaveKey{
var _local2:uint;
while (_local2 < this._keys.length) {
if (this._keys[_local2].id == _arg1){
return (this._keys[_local2]);
};
_local2++;
};
return (null);
}
public function getKeyType(_arg1:String, _arg2:Boolean=false){
var _local3:SaveKey = this.getKey(_arg1);
if (_local3){
return ((_arg2) ? KEY_TYPES[_local3.key_type] : _local3.key_type);
};
return (null);
}
public function getKeyName(_arg1:String):SaveKey{
var _local2:uint;
while (_local2 < this._keys.length) {
if (this._keys[_local2].name == _arg1){
return (this._keys[_local2]);
};
_local2++;
};
return (null);
}
public function isType(_arg1:String):Boolean{
return ((TYPES[this._type] == _arg1));
}
public function getID():uint{
return (this._id);
}
public function getName():String{
return (this._name);
}
public function getQuery(_arg1:Boolean=false){
return ((_arg1) ? this._query.toObject() : this._query);
}
public function newQuery():SaveGroupQuery{
return (new SaveGroupQuery(this));
}
public function newFile():SaveFile{
return (new SaveFile(this));
}
public function toString():String{
return ((((((("SaveGroup { name: " + this._name) + ", id: ") + this._id) + ", keys: ") + this._keys) + "}"));
}
public static function createFromObject(_arg1:Object):SaveGroup{
var _local4:Object;
var _local5:Object;
var _local2:SaveGroup = new SaveGroup(_arg1.group_id, _arg1.group_name, _arg1.group_type);
var _local3:uint;
while (_local3 < _arg1.keys.length) {
_local4 = _arg1.keys[_local3];
_local2.addKey(new SaveKey(_local4.id, _local4.name, _local4.type));
_local3++;
};
_local3 = 0;
while (_local3 < _arg1.ratings.length) {
_local5 = _arg1.ratings[_local3];
_local2.addRating(new SaveRating(_local5.id, _local5.name, _local5.float, _local5.min, _local5.max));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 28
//SaveGroupQuery (com.newgrounds.SaveGroupQuery)
package com.newgrounds {
import flash.events.*;
public class SaveGroupQuery extends EventDispatcher {
private var _group:SaveGroup;
private var _groupBy:Array;
private var _lookupKeys:Array;
private var _lookupRatings:Array;
private var _fileConditions:Array;
private var _keyConditions:Array;
private var _ratingConditions:Array;
private var _sortConditions:Array;
private var _page:uint;
private var _resultsPerPage:uint;
private var _randomizeResults:Boolean;
private var _results:Array;
public static const TABLE_FILES:uint = 1;
public static const TABLE_KEYS:uint = 2;
public static const TABLE_RATINGS:uint = 3;
public static const FILE_ID:uint = 0;
public static const AUTHOR_ID:uint = 1;
public static const AUTHOR_NAME:uint = 2;
public static const FILE_NAME:uint = 3;
public static const CREATED_ON:uint = 4;
public static const UPDATED_ON:uint = 5;
public static const TOTAL_VIEWS:uint = 6;
public static const FILE_STATUS:uint = 7;
public static const SCORE:String = "score";
public static const TOTAL_VOTES:String = "votes";
public function SaveGroupQuery(_arg1:SaveGroup){
this._results = [];
super();
this._group = _arg1;
this.reset();
}
public function clearCache():void{
this._results = [];
}
public function get group():SaveGroup{
return (this._group);
}
public function get groupId():uint{
return (this._group.id);
}
public function get resultsPerPage():uint{
return (this._resultsPerPage);
}
public function set resultsPerPage(_arg1:uint):void{
this._resultsPerPage = _arg1;
}
public function get page():uint{
return (this._page);
}
public function set page(_arg1:uint):void{
this._page = _arg1;
}
public function get randomized():Boolean{
return (this._randomizeResults);
}
public function set randomized(_arg1:Boolean):void{
this._randomizeResults = _arg1;
}
public function get results():Array{
return (this._results);
}
public function reset():void{
this._fileConditions = [];
this._keyConditions = [];
this._ratingConditions = [];
this._sortConditions = [];
this._groupBy = [];
this._lookupKeys = [];
this._lookupRatings = [];
this._randomizeResults = false;
this._resultsPerPage = 20;
this._page = 1;
this.clearCache();
}
function getGroup():SaveGroup{
return (this._group);
}
function getGroupID():uint{
return (this._group.getID());
}
public function includeKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyName(_arg1);
if (_local2){
this._lookupKeys.push(_local2.id);
};
}
public function isRandomized():Boolean{
return (this._randomizeResults);
}
public function includeRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingName(_arg1);
if (_local2){
this._lookupRatings.push(_local2.id);
};
}
public function excludeKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyName(_arg1);
var _local3:uint;
while (_local3 < this._lookupKeys.length) {
if (this._lookupKeys[_local3] == _local2.id){
this._lookupKeys.splice(_local3, 1);
return;
};
_local3++;
};
}
public function excludeRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingName(_arg1);
var _local3:uint;
while (_local3 < this._lookupRatings.length) {
if (this._lookupRatings[_local3] == _local2.id){
this._lookupRatings.splice(_local3, 1);
return;
};
_local3++;
};
}
public function groupBy(_arg1:uint):void{
this._groupBy.push({table:TABLE_FILES, field:_arg1});
}
public function groupByRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingName(_arg1);
if (!_local2){
return;
};
this._groupBy.push({table:TABLE_RATINGS, field:_local2.id});
}
public function groupByKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyName(_arg1);
if (!_local2){
return;
};
this._groupBy.push({table:TABLE_KEYS, field:_local2.id});
}
public function addFileCondition(_arg1:uint, _arg2:String, _arg3):void{
this._fileConditions.push({field:_arg1, operator:_arg2, value:_arg3});
}
public function addKeyCondition(_arg1:String, _arg2:String, _arg3):void{
var _local4:SaveKey = this._group.getKeyName(_arg1);
if (!_local4){
return;
};
if (!this.checkValue(_arg3, _local4.type)){
return;
};
this._keyConditions.push({key_id:_local4.id, operator:_arg2, value:_arg3});
}
public function addRatingCondition(_arg1:String, _arg2:String, _arg3, _arg4:String="score"):void{
var _local5:SaveRating = this._group.getRatingName(_arg1);
if (!_local5){
return;
};
this._ratingConditions.push({rating_id:_local5.id, operator:_arg2, value:_arg3, column:_arg4});
}
private function addSortCondition(_arg1:uint, _arg2:uint, _arg3:Boolean=false, _arg4=null):void{
var _local5:Object = {table:_arg1, field:_arg2, desc:_arg3};
if (_arg4){
_local5.extra = _arg4;
};
this._sortConditions.push(_local5);
}
public function sortOn(_arg1:uint, _arg2:Boolean=false):void{
this.addSortCondition(TABLE_FILES, _arg1, _arg2);
}
public function sortOnKey(_arg1:String, _arg2:Boolean=false):void{
this.addSortCondition(TABLE_KEYS, this._group.getKeyName(_arg1).id, _arg2);
}
public function sortOnRating(_arg1:String, _arg2:Boolean=false, _arg3:String="score"):void{
this.addSortCondition(TABLE_RATINGS, this._group.getRatingName(_arg1).id, _arg2, _arg3);
}
public function sortOnRatingScore(_arg1:String, _arg2:Boolean){
this.sortOnRating(_arg1, _arg2, SCORE);
}
public function sortOnRatingVotes(_arg1:String, _arg2:Boolean){
this.sortOnRating(_arg1, _arg2, TOTAL_VOTES);
}
public function setResultsPerPage(_arg1:uint){
this._resultsPerPage = _arg1;
this.clearCache();
}
public function setPage(_arg1:Number){
this._page = _arg1;
this.clearCache();
}
public function setRandomize(_arg1:Boolean):void{
this._randomizeResults = _arg1;
}
public function execute():void{
API.executeSaveQuery(this);
}
private function checkValue(_arg1, _arg2:uint):Boolean{
return (true);
}
function setResults(_arg1:Array):void{
this._results = _arg1;
}
override public function toString():String{
return ("");
}
public function toObject():Object{
var _local1:Object = {page:this._page, num_results:this._resultsPerPage};
if (this.isRandomized()){
_local1.randomize = 1;
};
if (((this._fileConditions) && ((this._fileConditions.length > 0)))){
_local1.file_conditions = this._fileConditions;
};
if (((this._keyConditions) && ((this._keyConditions.length > 0)))){
_local1.key_conditions = this._keyConditions;
};
if (((this._ratingConditions) && ((this._ratingConditions.length > 0)))){
_local1.rating_conditions = this._ratingConditions;
};
if (((this._sortConditions) && ((this._sortConditions.length > 0)))){
_local1.sort_conditions = this._sortConditions;
};
if (((this._lookupKeys) && ((this._lookupKeys.length > 0)))){
_local1.lookup_keys = this._lookupKeys;
};
if (((this._lookupRatings) && ((this._lookupRatings.length > 0)))){
_local1.lookup_ratings = this._lookupRatings;
};
if (((this._groupBy) && ((this._groupBy.length > 0)))){
_local1.group_by = this._groupBy;
};
return (_local1);
}
}
}//package com.newgrounds
Section 29
//SaveKey (com.newgrounds.SaveKey)
package com.newgrounds {
public class SaveKey {
private var _id:uint;
private var _name:String;
private var _type:uint;
public static const TYPE_FLOAT:uint = 1;
public static const TYPE_INTEGER:uint = 2;
public static const TYPE_STRING:uint = 3;
public static const TYPE_BOOLEAN:uint = 4;
public function SaveKey(_arg1:uint, _arg2:String, _arg3:uint){
this._id = _arg1;
this._name = _arg2;
this._type = _arg3;
}
public function get id():uint{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get type():uint{
return (this._type);
}
public function get key_id():uint{
return (this._id);
}
public function get key_name():String{
return (this._name);
}
public function get key_type():uint{
return (this._type);
}
public function isValueValid(_arg1):Boolean{
if (this._type == TYPE_INTEGER){
return ((((_arg1 is int)) || ((_arg1 is uint))));
};
if (this._type == TYPE_FLOAT){
return ((((((_arg1 is int)) || ((_arg1 is uint)))) || ((_arg1 is Number))));
};
if (this._type == TYPE_STRING){
return ((_arg1 is String));
};
if (this._type == TYPE_BOOLEAN){
return ((((((((_arg1 is Boolean)) || ((_arg1 === 0)))) || ((_arg1 === 1)))) || ((_arg1 == ""))));
};
return (false);
}
public function toString():String{
return (this._name);
}
}
}//package com.newgrounds
Section 30
//SaveRating (com.newgrounds.SaveRating)
package com.newgrounds {
public class SaveRating {
private var _id:uint;
private var _name:String;
private var _minValue:Number;
private var _maxValue:Number;
private var _isFloat:Boolean;
private var _voted:Boolean;
public function SaveRating(_arg1:uint, _arg2:String, _arg3:Boolean, _arg4:Number=-INF, _arg5:Number=INF){
this._id = _arg1;
this._name = _arg2;
this._isFloat = _arg3;
this._minValue = _arg4;
this._maxValue = _arg5;
}
public function get rating_id():uint{
return (this._id);
}
public function get rating_name():String{
return (this._name);
}
public function get id():uint{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get minValue():Number{
return (this._minValue);
}
public function get maxValue():Number{
return (this._maxValue);
}
public function get isFloat():Boolean{
return (this._isFloat);
}
public function get voted():Boolean{
return (this._voted);
}
public function set voted(_arg1:Boolean):void{
this._voted = _arg1;
}
public function toString():String{
return (this._name);
}
}
}//package com.newgrounds
Section 31
//Score (com.newgrounds.Score)
package com.newgrounds {
public class Score {
private var _board:ScoreBoard;
private var _position:uint;
private var _username:String;
private var _value:String;
private var _numeric_value:uint;
private var _tag:String;
public function Score(_arg1:ScoreBoard, _arg2:Number, _arg3:String, _arg4:String, _arg5:uint, _arg6:String){
this._board = _arg1;
this._position = _arg2;
this._username = _arg3;
this._value = _arg4;
this._numeric_value = _arg5;
this._tag = _arg6;
}
public function get board():ScoreBoard{
return (this._board);
}
public function get position():uint{
return (this._position);
}
public function get username():String{
return (this._username);
}
public function get value():String{
return (this._value);
}
public function get numeric_value():uint{
return (this._numeric_value);
}
public function get tag():String{
return (this._tag);
}
}
}//package com.newgrounds
Section 32
//ScoreBoard (com.newgrounds.ScoreBoard)
package com.newgrounds {
import flash.events.*;
public class ScoreBoard extends EventDispatcher {
private var _name:String;
private var _id:uint;
private var _scores:Array;
private var _period:String;// = "Today"
private var _num_results:uint;// = 10
private var _numScores:uint;
private var _desiredNumResults:uint;
private var _startRank:uint;
private var _endRank:uint;
private var _page:uint;// = 1
private var _tag:String;
public function ScoreBoard(_arg1:uint, _arg2:String, _arg3:String){
this._name = _arg2;
this._id = _arg1;
this._scores = [];
this._tag = _arg3;
}
public function exists():Boolean{
return ((this._id > 0));
}
public function get id():Number{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get period():String{
return (this._period);
}
public function get page():uint{
return (this._page);
}
public function get num_results():uint{
return (this._num_results);
}
public function get scores():Array{
return (this._scores);
}
public function get tag():String{
return (this._tag);
}
public function get num_scores():uint{
return (this._numScores);
}
public function postScore(_arg1:uint, _arg2:String=null):void{
if (_arg2){
this._tag = _arg2;
};
API.postScore(this._name, _arg1);
}
public function loadScores(_arg1:String="Today", _arg2:uint=1, _arg3:uint=10):void{
this._period = _arg1;
if (((!(this._period)) || ((this._period == "")))){
this._period = ScoreBoardPeriod.TODAY;
};
this._page = _arg2;
this._num_results = _arg3;
this._desiredNumResults = 0;
API.loadScores(this.name);
}
public function loadScoresInRange(_arg1:String="Today", _arg2:uint=1, _arg3:uint=10):void{
if (_arg2 == 0){
_arg2 = 1;
};
if (_arg3 < _arg2){
_arg3 = _arg2;
};
this._period = _arg1;
if (((!(this._period)) || ((this._period == "")))){
this._period = ScoreBoardPeriod.TODAY;
};
this._desiredNumResults = ((_arg3 - _arg2) + 1);
this._num_results = this._desiredNumResults;
while (int(((_arg2 - 1) / this._num_results)) != int(((_arg3 - 1) / this._num_results))) {
this._num_results++;
};
this._page = ((_arg2 - 1) / this._num_results);
this._startRank = _arg2;
this._endRank = _arg3;
this._page++;
API.loadScores(this.name);
}
function setScores(_arg1:Array, _arg2:String, _arg3:Number, _arg4:Number, _arg5:uint):void{
var _local7:uint;
this._period = _arg2;
this._page = _arg3;
this._num_results = _arg4;
this._numScores = _arg5;
this._scores = [];
var _local6:uint;
while (_local6 < _arg1.length) {
_local7 = (((this._num_results * (this._page - 1)) + 1) + _local6);
if (((!(this._desiredNumResults)) || ((((_local7 >= this._startRank)) && ((_local7 <= this._endRank)))))){
this._scores.push(new Score(this, _local7, _arg1[_local6].username, _arg1[_local6].value, _arg1[_local6].numeric_value, _arg1[_local6].tag));
};
_local6++;
};
this._num_results = this._scores.length;
}
}
}//package com.newgrounds
Section 33
//ScoreBoardPeriod (com.newgrounds.ScoreBoardPeriod)
package com.newgrounds {
public class ScoreBoardPeriod {
public static const TODAY:String = "Today";
public static const WEEK:String = "This Week";
public static const MONTH:String = "This Month";
public static const YEAR:String = "This Year";
public static const ALL_TIME:String = "All-Time";
}
}//package com.newgrounds
Section 34
//SmartURLLoader (com.newgrounds.SmartURLLoader)
package com.newgrounds {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.errors.*;
public class SmartURLLoader extends EventDispatcher {
private var _variables:Dictionary;
private var _files:Dictionary;
private var _hasVariables:Boolean;
private var _method:String;// = "GET"
private var _urlRequest:URLRequest;
private var _urlLoader:URLLoader;
private var _dataFormat:String;// = "text"
private var _openBrowser:Boolean;// = false
private var _preventCache:Boolean;// = false
var _command:String;
public var owner;
private static const CRLF:String = "
";
private static var _loaders:Dictionary = new Dictionary();
public function SmartURLLoader(){
this._urlRequest = new URLRequest();
this._variables = new Dictionary();
}
public function get responseFormat():String{
return (this._dataFormat);
}
public function set responseFormat(_arg1:String):void{
this._dataFormat = _arg1;
}
public function get response(){
return (this._urlLoader.data);
}
public function get hasFiles():Boolean{
return (Boolean(this._files));
}
public function get method():String{
return (this._method);
}
public function set method(_arg1:String):void{
if (((this.hasFiles) && ((_arg1 == URLRequestMethod.GET)))){
throw (new IllegalOperationError("GET cannot be used to upload files."));
};
this._method = _arg1;
}
public function get openBrowser():Boolean{
return (this._openBrowser);
}
public function set openBrowser(_arg1:Boolean):void{
this._openBrowser = _arg1;
}
public function get preventCache():Boolean{
return (this._preventCache);
}
public function set preventCache(_arg1:Boolean):void{
this._preventCache = _arg1;
}
public function get bytesLoaded():uint{
return ((this._urlLoader) ? this._urlLoader.bytesLoaded : 0);
}
public function get bytesTotal():uint{
return ((this._urlLoader) ? this._urlLoader.bytesTotal : 0);
}
public function addVariable(_arg1:String, _arg2=""):void{
this._variables[_arg1] = _arg2;
if (_arg2){
this._hasVariables = true;
};
}
public function addFile(_arg1:String, _arg2:ByteArray, _arg3:String, _arg4:String="application/octet-stream"):void{
this.method = URLRequestMethod.POST;
if (!this._files){
this._files = new Dictionary();
};
this._files[_arg1] = new File(_arg1, _arg2, _arg3, _arg4);
}
public function clearVariables():void{
this._variables = new Dictionary();
}
public function clearFiles():void{
this._files = null;
}
public function load(_arg1:String):void{
var urlVariables:URLVariables;
var key:String;
var boundary:String;
var i:uint;
var event:SecurityErrorEvent;
var url = _arg1;
this._urlRequest.url = url;
if (this._preventCache){
url = (url + ("?seed=" + Math.random()));
if (this._hasVariables){
url = (url + "&");
};
};
this._urlRequest.method = this._method;
if ((((this._urlRequest.method == URLRequestMethod.GET)) || (!(this.hasFiles)))){
this._urlRequest.contentType = "application/x-www-form-urlencoded";
if (this._hasVariables){
urlVariables = new URLVariables();
for (key in this._variables) {
urlVariables[key] = this._variables[key];
};
this._urlRequest.data = urlVariables;
};
} else {
boundary = "";
i = 0;
while (i < 32) {
boundary = (boundary + String.fromCharCode(uint((97 + (Math.random() * 25)))));
i = (i + 1);
};
this._urlRequest.contentType = (("multipart/form-data; boundary=\"" + boundary) + "\"");
this._urlRequest.data = this.buildMultipartData(boundary);
};
if (this.openBrowser){
navigateToURL(this._urlRequest, "_blank");
} else {
this._urlLoader = new URLLoader();
this._urlLoader.dataFormat = this._dataFormat;
this._urlLoader.addEventListener(Event.COMPLETE, this.onComplete);
this._urlLoader.addEventListener(ProgressEvent.PROGRESS, this.onProgress);
this._urlLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onIOError);
this._urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, this.onHTTPStatus);
this._urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSecurityError);
_loaders[this._urlLoader] = this;
try {
this._urlLoader.load(this._urlRequest);
} catch(error:Error) {
event = new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR, false, false, error.message);
onSecurityError(event);
};
};
}
public function close():void{
try {
this._urlLoader.close();
} catch(e:Error) {
};
}
public function dispose():void{
this.close();
this._files = null;
this._variables = null;
if (this._urlLoader){
this._urlLoader.removeEventListener(Event.COMPLETE, this.onComplete);
this._urlLoader.removeEventListener(ProgressEvent.PROGRESS, this.onProgress);
this._urlLoader.removeEventListener(IOErrorEvent.IO_ERROR, this.onIOError);
this._urlLoader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, this.onHTTPStatus);
this._urlLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSecurityError);
this._urlLoader = null;
};
this._urlRequest = null;
delete _loaders[this];
}
private function buildMultipartData(_arg1:String):ByteArray{
var _local3:String;
var _local4:File;
var _local2:ByteArray = new ByteArray();
_local2.endian = Endian.BIG_ENDIAN;
_arg1 = ("--" + _arg1);
for (_local3 in this._variables) {
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(((("Content-Disposition: form-data; name=\"" + _local3) + "\"") + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes((this._variables[_local3] + CRLF));
};
if (this.hasFiles){
for each (_local4 in this._files) {
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(("Content-Disposition: form-data; name=\"Filename\"" + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes((_local4.fileName + CRLF));
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(((((("Content-Disposition: form-data; name=\"" + _local4.dataField) + "\"; filename=\"") + _local4.fileName) + "\"") + CRLF));
_local2.writeUTFBytes((("Content-Type: " + _local4.contentType) + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeBytes(_local4.data);
_local2.writeUTFBytes(CRLF);
};
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(("Content-Disposition: form-data; name=\"Upload\"" + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes(("Submit Query" + CRLF));
};
_local2.writeUTFBytes((_arg1 + "--"));
_local2.position = 0;
_local2.position = 0;
return (_local2);
}
private function onComplete(_arg1:Event):void{
dispatchEvent(_arg1);
this.dispose();
}
private function onProgress(_arg1:ProgressEvent):void{
dispatchEvent(_arg1);
}
private function onIOError(_arg1:IOErrorEvent):void{
dispatchEvent(_arg1);
this.dispose();
}
private function onSecurityError(_arg1:SecurityErrorEvent):void{
dispatchEvent(_arg1);
this.dispose();
}
private function onHTTPStatus(_arg1:HTTPStatusEvent):void{
dispatchEvent(_arg1);
}
public static function closeAll():void{
var _local1:SmartURLLoader;
for each (_local1 in _loaders) {
if (_local1){
_local1.dispose();
};
};
_loaders = new Dictionary();
}
}
}//package com.newgrounds
import flash.utils.*;
class File {
private var fileName:String;
private var data:ByteArray;
private var dataField:String;
private var contentType:String;
private function File(_arg1:String, _arg2:ByteArray, _arg3:String="Filedata", _arg4:String="application/octet-stream"){
this.fileName = _arg1;
this.data = _arg2;
this.dataField = _arg3;
this.contentType = _arg4;
}
}
Section 35
//BlockHeadsRetroClass (com.uninvitedguests.BlockHeadsRetroClass)
package com.uninvitedguests {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.filters.*;
import flash.system.*;
public class BlockHeadsRetroClass {
private var pGeneratorDelay:int;
public var pScore:int;// = 0
private var pTopScoreBroken:Boolean;// = false
public var gGame_Status:String;// = "Frontend"
public var pGamePhase:String;
public var pGameplayMusic_Snd:BlockHeadsRetroMainSnd;
public var pSoundChannel1:SoundChannel;
public var pTotalScore:int;// = 0
public var pGameMode:String;
public var pTitleMusic_Snd:BlockHeadsRetroTitleSnd;
public var arrowDown:Boolean;// = false
private var pKeyboardDelay:int;
public var gGameObj;
public var pFrontend_Status:String;// = "preBoardSetup"
public var pWoodBreak_Snd:BlockHeadsRetroWoodBreakSnd;
public var ChatSwitch_Down;
public var MainObj;
public var Anykey_Down;
private var pGameTime:int;
private var pPowerUpDelay:int;
public var SpaceBar_Down:Boolean;// = false
private var pObjectControllerDelay:int;
public var pPowerUp_Snd:BlockHeadsRetroPowerUpSnd;
public var gameStartTime:int;
public var lastTime:int;
public var arrowUp:Boolean;// = false
public var GameLogicState:String;// = "Title"
public var D_KeyDown;
public var pWoodCrack_Snd:BlockHeadsRetroWoodCrackSnd;
public var A_KeyDown;
public var arrowRight:Boolean;// = false
public var S_KeyDown;
public var W_KeyDown:Boolean;// = false
public var pChatChannel1:SoundChannel;
private var pGameObjectList:Array;
private var pSiteLock;
public var EnterKeydown;
public var Attack_KeyDown:Boolean;// = false
public var arrowLeft:Boolean;// = false
public var pStartTime:int;
public var pSteelHit_Snd:BlockHeadsRetroSteelHitSnd;
private var pInputLocked:Boolean;// = false
private var GameMap:MovieClip;
private var BlockHead:MovieClip;
private var pDelay:int;
public function BlockHeadsRetroClass(_arg1:Object, _arg2:int){
var _local3:*;
gGame_Status = "Frontend";
pFrontend_Status = "preBoardSetup";
Attack_KeyDown = false;
arrowLeft = false;
arrowDown = false;
arrowRight = false;
arrowUp = false;
W_KeyDown = false;
SpaceBar_Down = false;
pScore = 0;
pTotalScore = 0;
pInputLocked = false;
pTopScoreBroken = false;
pGameObjectList = [];
GameLogicState = "Title";
pTitleMusic_Snd = new BlockHeadsRetroTitleSnd();
pGameplayMusic_Snd = new BlockHeadsRetroMainSnd();
pPowerUp_Snd = new BlockHeadsRetroPowerUpSnd();
pSteelHit_Snd = new BlockHeadsRetroSteelHitSnd();
pWoodBreak_Snd = new BlockHeadsRetroWoodBreakSnd();
pWoodCrack_Snd = new BlockHeadsRetroWoodCrackSnd();
super();
gGameObj = _arg1;
MainObj = gGameObj.MainObj;
pTotalScore = _arg2;
MainObj.addEventListener(Event.ENTER_FRAME, GameUpdate);
MainObj.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
MainObj.stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
MainObj.arcadebhr.top_score_title_screen.text = ("Top Score " + pTotalScore);
MainObj.arcadebhr.title_logo.visible = true;
MainObj.arcadebhr.spacebar_text.visible = true;
MainObj.arcadebhr.top_score_title_screen.visible = true;
MainObj.arcadebhr.copyright.visible = true;
MainObj.arcadebhr.title_blockhead.visible = true;
MainObj.arcadebhr.timeup.visible = false;
MainObj.arcadebhr.top_score.visible = false;
MainObj.arcadebhr.time.visible = false;
MainObj.arcadebhr.score.visible = false;
MainObj.arcadebhr.tutorial.visible = false;
pChatChannel1 = pTitleMusic_Snd.play(0, int.MAX_VALUE);
_local3 = new SoundTransform();
_local3.volume = 0.5;
pChatChannel1.soundTransform = _local3;
pStartTime = getTimer();
}
public function UpdateScore(){
if (pScore < 0){
pScore = 0;
};
MainObj.arcadebhr.score.text = ("Score " + pScore);
if (pScore > pTotalScore){
pTopScoreBroken = true;
} else {
pTopScoreBroken = false;
};
}
public function keyUpFunction(_arg1:KeyboardEvent){
if ((_arg1.keyCode == 37)){
arrowLeft = false;
} else {
if ((_arg1.keyCode == 39)){
arrowRight = false;
} else {
if ((_arg1.keyCode == 38)){
arrowUp = false;
} else {
if ((_arg1.keyCode == 40)){
arrowDown = false;
} else {
if (_arg1.keyCode == 32){
SpaceBar_Down = false;
} else {
if (_arg1.keyCode == 13){
EnterKeydown = false;
};
};
};
};
};
};
if (_arg1.keyCode > 0){
Anykey_Down = false;
};
}
public function StartGame(){
var _local1:*;
MainObj.arcadebhr.title_logo.visible = false;
MainObj.arcadebhr.spacebar_text.visible = false;
MainObj.arcadebhr.top_score_title_screen.visible = false;
MainObj.arcadebhr.copyright.visible = false;
MainObj.arcadebhr.title_blockhead.visible = false;
MainObj.arcadebhr.top_score.visible = true;
MainObj.arcadebhr.time.visible = true;
MainObj.arcadebhr.score.visible = true;
MainObj.arcadebhr.tutorial.visible = true;
MainObj.arcadebhr.tutorial.text = "";
MainObj.arcadebhr.blockhead.visible = true;
MainObj.arcadebhr.blockhead.x = 320;
MainObj.arcadebhr.blockhead.y = 440;
MainObj.arcadebhr.blockhead.head.gotoAndStop(1);
MainObj.arcadebhr.blockhead.gotoAndStop(1);
GameMap = MainObj.arcadebhr;
BlockHead = MainObj.arcadebhr.blockhead;
MainObj.arcadebhr.top_score.text = ("Top Score " + pTotalScore);
pChatChannel1.stop();
pChatChannel1 = pGameplayMusic_Snd.play(0, int.MAX_VALUE);
_local1 = new SoundTransform();
_local1.volume = 0.5;
pChatChannel1.soundTransform = _local1;
pGameTime = getTimer();
pGamePhase = "PH-0B";
GameLogicState = "Gameplay";
}
public function UpdateTime(){
var _local1:int;
var _local2:int;
_local1 = (getTimer() - pGameTime);
_local2 = Math.floor((120 - (_local1 / 1000)));
MainObj.arcadebhr.time.text = ("Time " + _local2);
if (_local2 == 0){
MainObj.arcadebhr.timeup.visible = true;
MainObj.arcadebhr.setChildIndex(MainObj.arcadebhr.timeup, (MainObj.arcadebhr.numChildren - 1));
pDelay = getTimer();
if (pTopScoreBroken == true){
gGameObj.pMiniGameTopScore = pScore;
MainObj.arcadebhr.tutorial.text = "you beat the top score";
MainObj.arcadebhr.setChildIndex(MainObj.arcadebhr.timeup, (MainObj.arcadebhr.numChildren - 1));
MainObj.arcadebhr.setChildIndex(MainObj.arcadebhr.tutorial, (MainObj.arcadebhr.numChildren - 1));
MainObj.arcadebhr.tutorial.visible = true;
};
GameLogicState = "TimeUp";
};
}
public function GameLogic(){
var _local1:int;
var _local2:*;
var _local3:*;
var _local4:MovieClip;
switch (GameLogicState){
case "Title":
if (SpaceBar_Down == true){
StartGame();
};
break;
case "Gameplay":
CheckGamePhases();
CharacterController();
GameObjectGenerator();
GameObjectsController();
UpdateScore();
UpdateTime();
break;
case "TimeUp":
_local1 = (getTimer() - pDelay);
if (_local1 > 3000){
GameLogicState = "CleanUp";
};
break;
case "CleanUp":
pChatChannel1.stop();
MainObj.arcadebhr.blockhead.visible = false;
MainObj.arcadebhr.blockhead.x = -320;
_local2 = 0;
while (_local2 < pGameObjectList.length) {
_local3 = pGameObjectList[_local2];
_local4 = _local3["MC"];
_local4.parent.removeChild(_local4);
pGameObjectList.splice(_local2, 1);
_local2--;
_local2++;
};
MainObj.removeEventListener(Event.ENTER_FRAME, GameUpdate);
MainObj.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
MainObj.stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
gGameObj.pFrontend_Status = "FadeOutMiniGame";
break;
};
}
public function GameUpdate(_arg1:Event){
GameLogic();
}
private function Translate_Increment(_arg1:Number, _arg2:Number, _arg3:Number):Number{
var _local4:Number;
var _local5:Number;
_local4 = (_arg1 * _arg3);
_local5 = ((_local4 / 1000) * MainObj.gTimeinterval);
if (_local5 > _arg2){
_local5 = _arg2;
};
if (_local5 < -(_arg2)){
_local5 = -(_arg2);
};
return (_local5);
}
public function CharacterController(){
var _local1:int;
_local1 = (getTimer() - pKeyboardDelay);
if (pInputLocked == false){
if (_local1 > 100){
if (arrowRight){
if (BlockHead.x < 550){
BlockHead.x = (BlockHead.x + 115);
};
pKeyboardDelay = getTimer();
};
if (arrowLeft){
if (BlockHead.x > 90){
BlockHead.x = (BlockHead.x - 115);
};
pKeyboardDelay = getTimer();
};
};
};
}
public function keyDownFunction(_arg1:KeyboardEvent){
if ((_arg1.keyCode == 37)){
arrowLeft = true;
} else {
if (_arg1.keyCode == 39){
arrowRight = true;
} else {
if (_arg1.keyCode == 38){
arrowUp = true;
} else {
if (_arg1.keyCode == 40){
arrowDown = true;
} else {
if (_arg1.keyCode == 32){
SpaceBar_Down = true;
} else {
if (_arg1.keyCode == 13){
EnterKeydown = true;
};
};
};
};
};
};
if (_arg1.keyCode > 0){
Anykey_Down = true;
};
}
public function GameObjectsController(){
var _local1:int;
var _local2:*;
var _local3:*;
var _local4:MovieClip;
var _local5:*;
var _local6:*;
var _local7:Boolean;
var _local8:*;
var _local9:*;
_local1 = (getTimer() - pObjectControllerDelay);
if (_local1 > 250){
_local2 = 0;
while (_local2 < pGameObjectList.length) {
_local3 = pGameObjectList[_local2];
_local4 = _local3["MC"];
_local5 = _local3["Name"];
_local6 = _local3["Status"];
_local7 = false;
switch (_local6){
case "Active":
switch (_local5){
case "H1-Up":
_local8 = _local4.hitTestObject(BlockHead);
if (_local8 == true){
if (BlockHead.head.currentFrame < 5){
BlockHead.head.gotoAndStop((BlockHead.head.currentFrame + 1));
};
pSoundChannel1 = pPowerUp_Snd.play();
_local9 = new SoundTransform();
_local9.volume = 0.5;
pSoundChannel1.soundTransform = _local9;
_local7 = true;
} else {
_local4.y = (_local4.y + Translate_Increment(40, 100, 30));
};
break;
case "W1":
case "W2":
_local8 = _local4.hitTestObject(BlockHead);
if (_local8 == true){
if (BlockHead.head.currentFrame >= _local4.currentFrame){
_local4.gotoAndPlay(50);
_local3["Status"] = "Explode";
pScore = (pScore + 200);
pSoundChannel1 = pWoodBreak_Snd.play();
_local9 = new SoundTransform();
_local9.volume = 1;
pSoundChannel1.soundTransform = _local9;
} else {
_local4.gotoAndPlay(100);
_local3["Status"] = "Bounce";
pScore = (pScore + 50);
pSoundChannel1 = pWoodCrack_Snd.play();
_local9 = new SoundTransform();
_local9.volume = 0.3;
pSoundChannel1.soundTransform = _local9;
};
} else {
_local4.y = (_local4.y + Translate_Increment(40, 100, 30));
};
break;
case "W3":
case "W4":
case "W5":
_local8 = _local4.hitTestObject(BlockHead);
if (_local8 == true){
if (BlockHead.head.currentFrame >= _local4.currentFrame){
_local4.gotoAndPlay(70);
_local3["Status"] = "Explode";
pScore = (pScore + 500);
pSoundChannel1 = pWoodBreak_Snd.play();
_local9 = new SoundTransform();
_local9.volume = 1;
pSoundChannel1.soundTransform = _local9;
} else {
switch (_local5){
case "W3":
_local4.gotoAndPlay(110);
BlockHead.gotoAndStop(1);
pScore = (pScore + 75);
break;
case "W4":
_local4.gotoAndPlay(120);
BlockHead.gotoAndStop(1);
pScore = (pScore + 100);
break;
case "W5":
_local4.gotoAndPlay(130);
BlockHead.gotoAndStop(1);
pScore = (pScore + 125);
break;
};
_local3["Status"] = "Bounce";
pSoundChannel1 = pWoodCrack_Snd.play();
_local9 = new SoundTransform();
_local9.volume = 0.3;
pSoundChannel1.soundTransform = _local9;
};
} else {
_local4.y = (_local4.y + Translate_Increment(40, 100, 30));
};
break;
case "S1":
case "S2":
case "S3":
case "S4":
case "S5":
_local8 = _local4.hitTestObject(BlockHead);
if (_local8 == true){
if (BlockHead.head.currentFrame > 1){
BlockHead.head.gotoAndStop((BlockHead.head.currentFrame - 1));
};
switch (_local5){
case "S1":
_local4.gotoAndPlay(100);
BlockHead.gotoAndStop(2);
pScore = (pScore - 100);
break;
case "S2":
_local4.gotoAndPlay(110);
BlockHead.gotoAndStop(2);
pScore = (pScore - 200);
break;
case "S3":
_local4.gotoAndPlay(120);
BlockHead.gotoAndStop(3);
pScore = (pScore - 300);
break;
case "S4":
_local4.gotoAndPlay(130);
BlockHead.gotoAndStop(4);
pScore = (pScore - 400);
break;
case "S5":
_local4.gotoAndPlay(140);
BlockHead.gotoAndStop(4);
pScore = (pScore - 500);
break;
};
pSoundChannel1 = pSteelHit_Snd.play();
_local9 = new SoundTransform();
_local9.volume = 0.5;
pSoundChannel1.soundTransform = _local9;
pInputLocked = true;
_local3["Status"] = "Bounce";
} else {
_local4.y = (_local4.y + Translate_Increment(40, 100, 30));
};
break;
};
if (_local4.y > 420){
_local7 = true;
};
break;
};
if (_local7 == true){
_local4.parent.removeChild(_local4);
pGameObjectList.splice(_local2, 1);
_local2--;
};
_local2++;
};
pObjectControllerDelay = getTimer();
};
_local2 = 0;
while (_local2 < pGameObjectList.length) {
_local3 = pGameObjectList[_local2];
_local4 = _local3["MC"];
_local5 = _local3["Name"];
_local6 = _local3["Status"];
_local7 = false;
switch (_local6){
case "Explode":
switch (_local5){
case "W2":
case "W1":
if (_local4.currentFrame == 60){
_local7 = true;
};
break;
case "W5":
case "W4":
case "W3":
if (_local4.currentFrame == 80){
_local7 = true;
};
break;
};
break;
case "Bounce":
switch (_local5){
case "S1":
if (_local4.currentFrame == 106){
_local7 = true;
BlockHead.gotoAndStop(1);
pInputLocked = false;
};
break;
case "S2":
if (_local4.currentFrame == 116){
_local7 = true;
BlockHead.gotoAndStop(1);
pInputLocked = false;
};
break;
case "S3":
if (_local4.currentFrame == 126){
_local7 = true;
BlockHead.gotoAndStop(1);
pInputLocked = false;
};
break;
case "S4":
if (_local4.currentFrame == 136){
_local7 = true;
BlockHead.gotoAndStop(1);
pInputLocked = false;
};
break;
case "S5":
if (_local4.currentFrame == 146){
_local7 = true;
BlockHead.gotoAndStop(1);
pInputLocked = false;
};
break;
};
switch (_local5){
case "W2":
if (_local4.currentFrame == 106){
_local7 = true;
BlockHead.gotoAndStop(1);
pInputLocked = false;
};
break;
case "W3":
if (_local4.currentFrame == 116){
_local7 = true;
BlockHead.gotoAndStop(1);
pInputLocked = false;
};
break;
case "W4":
if (_local4.currentFrame == 126){
_local7 = true;
BlockHead.gotoAndStop(1);
pInputLocked = false;
};
break;
case "W5":
if (_local4.currentFrame == 136){
_local7 = true;
BlockHead.gotoAndStop(1);
pInputLocked = false;
};
break;
};
break;
};
if (_local7 == true){
_local4.parent.removeChild(_local4);
pGameObjectList.splice(_local2, 1);
_local2--;
};
_local2++;
};
}
public function GameObjectGenerator(){
var _local1:int;
var _local2:Array;
var _local3:Array;
var _local4:String;
var _local5:Number;
var _local6:MovieClip;
var _local7:int;
var _local8:int;
var _local9:*;
var _local10:*;
var _local11:Object;
switch (pGamePhase){
case "PH-0":
_local1 = 2000;
break;
case "PH-0B":
case "PH-0C":
case "PH-0D":
case "PH-0E":
_local1 = 2000;
break;
case "PH-2":
case "PH-1":
_local1 = 750;
break;
};
_local7 = (getTimer() - pGeneratorDelay);
if (_local7 > _local1){
switch (pGamePhase){
case "PH-0":
_local2 = ["W1", "W2"];
break;
case "PH-0B":
_local2 = ["W1", "W2"];
break;
case "PH-0C":
_local2 = ["W1", "W2"];
break;
case "PH-0D":
_local2 = ["S1", "S2"];
break;
case "PH-0E":
_local2 = ["W1", "W2", "S1", "S2"];
break;
case "PH-1":
_local2 = ["W1", "W2", "W3", "W4", "W5"];
break;
case "PH-2":
_local2 = ["W1", "W2", "W3", "W4", "W5", "S1", "S2", "S3", "S4", "S5"];
break;
};
_local8 = (getTimer() - pPowerUpDelay);
if (_local8 > 10000){
_local2 = ["H1-Up"];
pPowerUpDelay = getTimer();
};
_local9 = Math.floor((Math.random() * _local2.length));
_local4 = _local2[_local9];
switch (_local4){
case "W1":
_local3 = [90, 205, 320, 435, 550];
_local6 = new BlockHeadsRetroWoodCrateMC();
_local6.gotoAndStop(1);
break;
case "W2":
_local3 = [90, 205, 320, 435, 550];
_local6 = new BlockHeadsRetroWoodCrateMC();
_local6.gotoAndStop(2);
break;
case "W3":
_local3 = [90, 205, 320, 435, 550];
_local6 = new BlockHeadsRetroWoodCrateMC();
_local6.gotoAndStop(3);
break;
case "W4":
_local3 = [120, 220, 320, 420, 520];
_local6 = new BlockHeadsRetroWoodCrateMC();
_local6.gotoAndStop(4);
break;
case "W5":
_local3 = [140, 320, 320, 435, 500];
_local6 = new BlockHeadsRetroWoodCrateMC();
_local6.gotoAndStop(5);
break;
case "H1-Up":
_local3 = [90, 205, 320, 435, 550];
_local6 = new BlockHeadsRetroHeadPowerup();
_local6.gotoAndStop(1);
break;
case "S1":
_local3 = [90, 205, 320, 435, 550];
_local6 = new BlockHeadsRetroStealCrateMC();
_local6.gotoAndStop(1);
break;
case "S2":
_local3 = [90, 205, 320, 435, 550];
_local6 = new BlockHeadsRetroStealCrateMC();
_local6.gotoAndStop(2);
break;
case "S3":
_local3 = [90, 205, 320, 435, 550];
_local6 = new BlockHeadsRetroStealCrateMC();
_local6.gotoAndStop(3);
break;
case "S4":
_local3 = [120, 220, 320, 420, 520];
_local6 = new BlockHeadsRetroStealCrateMC();
_local6.gotoAndStop(4);
break;
case "S5":
_local3 = [140, 320, 320, 435, 500];
_local6 = new BlockHeadsRetroStealCrateMC();
_local6.gotoAndStop(5);
break;
};
_local10 = Math.floor((Math.random() * _local3.length));
_local5 = _local3[_local10];
_local6.x = _local5;
_local6.y = 50;
GameMap.addChild(_local6);
_local11 = {};
_local11["MC"] = _local6;
_local11["Name"] = _local4;
_local11["Status"] = "Active";
pGameObjectList.push(_local11);
pGeneratorDelay = getTimer();
};
}
private function CheckGamePhases(){
var _local1:int;
switch (pGamePhase){
case "PH-0B":
_local1 = (getTimer() - pGameTime);
if (_local1 > 3000){
MainObj.arcadebhr.tutorial.text = "Hit The Wood Boxes";
pGamePhase = "PH-0C";
};
break;
case "PH-0C":
_local1 = (getTimer() - pGameTime);
if (_local1 > 10000){
MainObj.arcadebhr.tutorial.text = ("Get PowerUP to Destroy\n" + "Bigger Boxes");
pGamePhase = "PH-0D";
};
break;
case "PH-0D":
_local1 = (getTimer() - pGameTime);
if (_local1 > 15000){
MainObj.arcadebhr.tutorial.text = "Avoid Steel crates";
pGamePhase = "PH-0E";
};
break;
case "PH-0E":
_local1 = (getTimer() - pGameTime);
if (_local1 > 20000){
MainObj.arcadebhr.tutorial.text = "";
MainObj.arcadebhr.tutorial.visible = false;
pGamePhase = "PH-1";
};
break;
case "PH-1":
_local1 = (getTimer() - pGameTime);
if (_local1 > 30000){
pGamePhase = "PH-2";
};
break;
case "PH-2":
break;
};
}
}
}//package com.uninvitedguests
Section 36
//CharacterClass (com.uninvitedguests.CharacterClass)
package com.uninvitedguests {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
public class CharacterClass {
public var pLastAction:String;
public var pShadow_MC:CharShadowMovieClip;
public var pCharacter_MC;
private var lastTime:int;
public var pWorldX:Number;
public var pWorldY:Number;
public var pWorldZ:Number;
public var pY_Incre;
public var pX_Destin;
public var pRunAway_Obj:Object;
public var gamemap;
public var pNPCType:String;
public var pWaypoints_Queuing:Boolean;// = true
public var pMode:String;
public var pWaypoint_Delay:int;
public var pSpeed:Number;
public var pNewWaypoint:Boolean;
public var pTheme:String;
public var gGameObj;
public var pWaypoint_State;// = 1
public var pCharacterName:String;
public var pStartX:Number;
public var pStartY:Number;
public var pStartZ:Number;
public var pObject_Type;// = "Character"
public var pAction:String;
public var pIdentity:String;
public var Player_Action:String;// = "swr"
public var pX_Incre;
public var pZ_Destin:Number;
public var MainObj;
public var pWaypoints_List:Array;
public var pZ_Incre:Number;
public var pTimeLimit;// = 100
public var pWaypoint_Pointer;// = 0
public var pWaypoint_Speed:Number;
public var pY_Destin;
public function CharacterClass(){
pObject_Type = "Character";
Player_Action = "swr";
pWaypoint_Pointer = 0;
pWaypoint_State = 1;
pWaypoints_List = new Array();
pWaypoints_Queuing = true;
pTimeLimit = 100;
pShadow_MC = new CharShadowMovieClip();
super();
}
public function RunAway(){
var _local1:int;
var _local2:int;
_local2 = pSpeed;
if (pRunAway_Obj == null){
pRunAway_Obj = gGameObj.heroClassRef;
};
if (pWorldX > pRunAway_Obj.pWorldX){
_local1 = (pWorldX - pRunAway_Obj.pWorldX);
if (_local1 > 50){
WorldTranslate(_local2, 0, 0, true);
pAction = "swr";
};
};
if (pWorldX < pRunAway_Obj.pWorldX){
_local1 = (pRunAway_Obj.pWorldX - pWorldX);
if (_local1 > 50){
WorldTranslate(-(_local2), 0, 0, true);
pAction = "swl";
};
};
if (pWorldZ > pRunAway_Obj.pWorldZ){
_local1 = (pWorldZ - pRunAway_Obj.pWorldZ);
if (_local1 > 50){
WorldTranslate(0, 0, _local2, true);
pAction = "wf";
};
};
if (pWorldZ < pRunAway_Obj.pWorldZ){
_local1 = (pRunAway_Obj.pWorldZ - pWorldZ);
if (_local1 > 50){
WorldTranslate(0, 0, -(_local2), true);
pAction = "wb";
};
};
}
public function FadeOut(){
var _local1:Number;
var _local2:Number;
_local1 = pCharacter_MC.alpha;
_local2 = 0.025;
if (_local1 > 0){
_local1 = (_local1 - gGameObj.Translate_Increment(_local2, 50, 30));
};
if (_local1 < 0){
_local1 = 0;
};
pCharacter_MC.alpha = _local1;
if (_local1 > 0.4){
_local1 = 0.4;
};
pShadow_MC.alpha = _local1;
}
public function NPC_Collision(_arg1:Point){
var _local2:*;
var _local3:*;
var _local4:Point;
var _local5:Point;
var _local6:Point;
var _local7:Point;
var _local8:Number;
_local2 = 0;
while (_local2 < gGameObj.pNPC_Registry_List.length) {
_local3 = gGameObj.pNPC_Registry_List[_local2];
if (_local3 != this){
_local4 = new Point(_local3.pCharacter_MC.x, _local3.pCharacter_MC.y);
_local5 = new Point(_local3.pCharacter_MC.x, _local3.pCharacter_MC.y);
_local6 = gamemap.localToGlobal(_local5);
_local7 = new Point(_local6.x, (_local6.y + 40));
_local8 = Point.distance(_local7, _arg1);
if (_local8 < 20){
};
};
_local2++;
};
}
public function initShadowMovieClipAttributes(){
gamemap = gGameObj.MainObj.gamemap;
pShadow_MC.name = "shadow";
pShadow_MC.alpha = 1;
pShadow_MC.gotoAndStop(1);
pShadow_MC.x = 0;
pShadow_MC.y = 40;
pCharacter_MC.addChild(pShadow_MC);
}
public function WorldTranslate(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean){
var _local5:Boolean;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:Point;
var _local10:Point;
var _local11:Point;
var _local12:Point;
var _local13:*;
var _local14:Boolean;
var _local15:Number;
var _local16:Number;
var _local17:Number;
_local5 = true;
_local6 = gGameObj.Translate_Increment(_arg1, 20, 30);
_local7 = gGameObj.Translate_Increment(_arg2, 20, 30);
_local8 = gGameObj.Translate_Increment(_arg3, 20, 30);
_local9 = new Point(pCharacter_MC.x, pCharacter_MC.y);
_local10 = gamemap.localToGlobal(_local9);
_local11 = new Point(_local10.x, (_local10.y + 0));
_local12 = new Point(_local11.x, _local11.y);
_local13 = gGameObj.pActiveCollisionMap;
_local14 = false;
if (_arg4 == true){
if (_local6 > 0){
_local12 = new Point(((_local11.x + 25) + _local6), (_local11.y + 25));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local6 = 0;
};
_local12 = new Point(((_local11.x + 25) + _local6), (_local11.y + 25));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local6 = 0;
};
_local12 = new Point(((_local11.x + 25) + _local6), (_local11.y + 25));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local6 = 0;
};
if (_local14 == true){
_local6 = 0;
};
};
if (_local6 < 0){
_local12 = new Point(((_local11.x - 25) - _local6), (_local11.y + 25));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local6 = 0;
};
_local12 = new Point(((_local11.x - 25) - _local6), (_local11.y + 25));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local6 = 0;
};
_local12 = new Point(((_local11.x - 25) - _local6), (_local11.y + 25));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local6 = 0;
};
if (_local14 == true){
_local6 = 0;
};
};
if (_local8 > 0){
_local12 = new Point(_local11.x, (_local11.y + 50));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local14 == true){
_local8 = 0;
};
_local12 = new Point((_local11.x - 5), (_local11.y + 50));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local14 == true){
_local8 = 0;
};
_local12 = new Point((_local11.x + 5), (_local11.y + 50));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local14 == true){
_local8 = 0;
};
};
if (_local8 < 0){
_local12 = new Point(_local11.x, ((_local11.y + 25) + _local8));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local14 == true){
_local8 = 0;
};
_local12 = new Point((_local11.x - 5), ((_local11.y + 25) + _local8));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local14 == true){
_local8 = 0;
};
_local12 = new Point((_local11.x + 5), ((_local11.y + 25) + _local8));
_local14 = NPC_Collision(_local12);
if (_local13.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local14 == true){
_local8 = 0;
};
};
};
if ((((((_local6 == 0)) && ((_local7 == 0)))) && ((_local8 == 0)))){
_local5 = false;
};
_local15 = (pWorldX + _local6);
_local16 = (pWorldY + _local7);
_local17 = (pWorldZ + _local8);
SetWorldPosition(_local15, _local16, _local17);
return (_local5);
}
public function SetWorldPosition(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Number;
switch (gGameObj.pActiveLevel){
case "Map1":
if (_arg3 > 1475){
_arg3 = 1475;
};
if (_arg3 < 70){
_arg3 = 70;
};
if (_arg1 > 4745){
_arg1 = 4745;
};
if (_arg1 < 50){
_arg1 = 50;
};
break;
case "Map2":
if (_arg3 > 1875){
_arg3 = 1875;
};
if (_arg3 < 70){
_arg3 = 70;
};
if (_arg1 > 4745){
_arg1 = 4745;
};
if (_arg1 < 50){
_arg1 = 50;
};
break;
};
pWorldX = _arg1;
pWorldY = _arg2;
pWorldZ = _arg3;
pCharacter_MC.x = _arg1;
pCharacter_MC.y = _arg3;
_local4 = 25;
pCharacter_MC.y = ((pCharacter_MC.y - _local4) - _arg2);
}
public function Animate(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:Boolean;
var _local6:*;
var _local7:int;
_local1 = 0;
if (pSpeed < 4){
_local1 = 0;
};
if ((((pSpeed >= 5)) && ((pSpeed < 6)))){
_local1 = 5;
};
if ((((pSpeed >= 6)) && ((pSpeed < 7)))){
_local1 = 10;
};
if ((((pSpeed >= 7)) && ((pSpeed < 8)))){
_local1 = 15;
};
if ((((pSpeed >= 8)) && ((pSpeed < 9)))){
_local1 = 20;
};
if ((((pSpeed >= 9)) && ((pSpeed < 10)))){
_local1 = 25;
};
if (pSpeed >= 10){
_local1 = 30;
};
if (lastTime == 0){
lastTime = getTimer();
};
_local2 = (getTimer() - lastTime);
if (_local2 > (pTimeLimit - _local1)){
_local5 = true;
_local6 = false;
_local7 = 0;
switch (pAction){
case "swr":
_local3 = 11;
_local4 = 18;
pTimeLimit = 75;
_local5 = true;
break;
case "swl":
_local3 = 20;
_local4 = 27;
pTimeLimit = 75;
_local5 = true;
break;
case "wf":
_local3 = 2;
_local4 = 9;
pTimeLimit = 100;
_local5 = true;
break;
case "wb":
_local3 = 47;
_local4 = 54;
pTimeLimit = 100;
_local5 = true;
break;
case "dlf":
_local3 = 29;
_local4 = 36;
pTimeLimit = 100;
_local5 = true;
break;
case "drf":
_local3 = 38;
_local4 = 45;
pTimeLimit = 100;
_local5 = true;
break;
case "dlb":
_local3 = 56;
_local4 = 63;
pTimeLimit = 100;
_local5 = true;
break;
case "drb":
_local3 = 65;
_local4 = 72;
pTimeLimit = 100;
_local5 = true;
break;
case "pnchl":
_local3 = 97;
_local4 = 104;
pTimeLimit = 100;
_local5 = false;
break;
case "pnchr":
_local3 = 81;
_local4 = 88;
pTimeLimit = 100;
_local5 = false;
break;
case "pnchb":
_local3 = 89;
_local4 = 96;
pTimeLimit = 100;
_local5 = false;
break;
case "pnchf":
_local3 = 73;
_local4 = 80;
pTimeLimit = 100;
_local5 = false;
break;
case "pnchedf":
_local3 = 73;
_local4 = 78;
pTimeLimit = 45;
_local5 = false;
break;
case "ssr":
_local3 = 10;
_local4 = 10;
pTimeLimit = 100;
break;
case "ssl":
_local3 = 19;
_local4 = 19;
pTimeLimit = 100;
break;
case "sf":
_local3 = 1;
_local4 = 1;
pTimeLimit = 100;
break;
case "sb":
_local3 = 46;
_local4 = 46;
pTimeLimit = 100;
break;
case "brnt":
_local3 = 17;
_local4 = 27;
pTimeLimit = 100;
_local5 = false;
break;
case "invis":
_local3 = 105;
_local4 = 105;
pTimeLimit = 100;
break;
};
if (pCharacter_MC.currentFrame >= _local4){
if (_local5 == true){
if (_local6 == true){
_local2 = (getTimer() - lastTime);
if (_local2 > _local7){
pCharacter_MC.gotoAndStop(_local3);
lastTime = getTimer();
};
} else {
pCharacter_MC.gotoAndStop(_local3);
lastTime = getTimer();
};
} else {
if (pAction != pLastAction){
pCharacter_MC.gotoAndStop(_local3);
lastTime = getTimer();
} else {
pCharacter_MC.gotoAndStop(_local4);
};
};
} else {
if (pCharacter_MC.currentFrame < _local3){
pCharacter_MC.gotoAndStop(_local3);
lastTime = getTimer();
} else {
pCharacter_MC.gotoAndStop((pCharacter_MC.currentFrame + 1));
lastTime = getTimer();
};
};
pLastAction = pAction;
};
}
public function Chase(){
var _local1:int;
var _local2:int;
var _local3:Boolean;
var _local4:Boolean;
_local2 = pSpeed;
_local3 = false;
_local4 = false;
if (pWorldX > gGameObj.heroClassRef.pWorldX){
_local1 = (pWorldX - gGameObj.heroClassRef.pWorldX);
if (_local1 > 50){
_local3 = WorldTranslate(-((_local2 + (_local2 * 0.25))), 0, 0, true);
if (_local3 == true){
_local4 = true;
};
pAction = "swl";
};
};
if (pWorldX < gGameObj.heroClassRef.pWorldX){
_local1 = (gGameObj.heroClassRef.pWorldX - pWorldX);
if (_local1 > 50){
_local3 = WorldTranslate((_local2 + (_local2 * 0.25)), 0, 0, true);
if (_local3 == true){
_local4 = true;
};
pAction = "swr";
};
};
if (pWorldZ > gGameObj.heroClassRef.pWorldZ){
_local1 = (pWorldZ - gGameObj.heroClassRef.pWorldZ);
if (_local1 > 50){
_local3 = WorldTranslate(0, 0, -(_local2), true);
if (_local3 == true){
_local4 = true;
};
pAction = "wb";
};
};
if (pWorldZ < gGameObj.heroClassRef.pWorldZ){
_local1 = (gGameObj.heroClassRef.pWorldZ - pWorldZ);
if (_local1 > 50){
_local3 = WorldTranslate(0, 0, _local2, true);
if (_local3 == true){
_local4 = true;
};
pAction = "wf";
};
};
if (_local4 == false){
switch (pAction){
case "swr":
pAction = "ssr";
break;
case "swl":
pAction = "ssl";
break;
case "wf":
pAction = "sf";
break;
case "wb":
pAction = "sb";
break;
};
};
}
public function WayPoints(){
var _local1:Boolean;
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:int;
var _local11:Number;
switch (pWaypoint_State){
case 1:
if (pWaypoints_Queuing == true){
if (pWaypoints_List.length > 0){
pWaypoints_Queuing = false;
} else {
return;
};
};
if (pWaypoints_List.length > 0){
pWaypoint_Pointer = 0;
_local2 = pWaypoints_List[pWaypoint_Pointer];
pX_Destin = _local2.x;
pY_Destin = _local2.y;
pZ_Destin = _local2.z;
pWaypoint_Speed = _local2.spd;
pWaypoint_State = 2;
} else {
return;
};
break;
case 2:
_local1 = true;
_local2 = pWaypoints_List[pWaypoint_Pointer];
_local3 = pX_Destin;
_local4 = pY_Destin;
_local5 = pZ_Destin;
_local6 = pWaypoint_Speed;
_local7 = pWorldX;
if (_local7 != _local3){
_local1 = false;
if (_local7 < _local3){
_local7 = (_local7 + gGameObj.Translate_Increment(_local6, 50, 30));
if (_local7 > _local3){
_local7 = _local3;
};
};
if (_local7 > _local3){
_local7 = (_local7 - gGameObj.Translate_Increment(_local6, 50, 30));
if (_local7 < _local3){
_local7 = _local3;
};
};
};
_local8 = pWorldY;
if (_local8 != _local4){
_local1 = false;
if (_local8 < _local4){
_local8 = (_local8 + gGameObj.Translate_Increment(_local6, 50, 30));
if (_local8 > _local4){
_local8 = _local4;
};
};
if (_local8 > _local4){
_local8 = (_local8 - gGameObj.Translate_Increment(_local6, 50, 30));
if (_local8 < _local4){
_local8 = _local4;
};
};
};
_local9 = pWorldZ;
if (_local9 != _local5){
_local1 = false;
if (_local9 < _local5){
_local9 = (_local9 + gGameObj.Translate_Increment(_local6, 50, 30));
if (_local9 > _local5){
_local9 = _local5;
};
};
if (_local9 > _local5){
_local9 = (_local9 - gGameObj.Translate_Increment(_local6, 50, 30));
if (_local9 < _local5){
_local9 = _local5;
};
};
};
SetWorldPosition(_local7, _local8, _local9);
if (_local1 == false){
if (_local9 < _local5){
pAction = "wf";
};
if (_local9 > _local5){
pAction = "wb";
};
if (_local7 < _local3){
pAction = "swr";
};
if (_local7 > _local3){
pAction = "swl";
};
if ((((_local7 > _local3)) && ((_local9 < _local5)))){
pAction = "drf";
};
if ((((_local7 < _local3)) && ((_local9 < _local5)))){
pAction = "dlf";
};
if ((((_local7 > _local3)) && ((_local9 > _local5)))){
pAction = "dlb";
};
if ((((_local7 < _local3)) && ((_local9 > _local5)))){
pAction = "drb";
};
return;
};
if (_local1 == true){
pWaypoint_Delay = getTimer();
pWaypoint_State = 3;
};
case 3:
_local2 = pWaypoints_List[pWaypoint_Pointer];
_local10 = 0;
_local11 = ((getTimer() - pWaypoint_Delay) * 0.001);
pWaypoints_List.splice(0, 1);
if (pWaypoints_List.length == 0){
switch (pAction){
case "swr":
pAction = "ssr";
break;
case "swl":
pAction = "ssl";
break;
case "wf":
pAction = "sf";
break;
case "wb":
pAction = "sb";
break;
case "drf":
pAction = "sf";
break;
case "dlf":
pAction = "sf";
break;
case "dlb":
pAction = "sb";
break;
case "drb":
pAction = "sb";
break;
};
pWaypoints_Queuing = true;
};
pWaypoint_State = 1;
break;
};
}
public function WayPoints2(){
var _local1:Boolean;
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
var _local8:Number;
var _local9:*;
var _local10:Number;
var _local11:Number;
var _local12:*;
var _local13:Array;
var _local14:Array;
var _local15:Number;
if (pWaypoints_Queuing == true){
if (pWaypoints_List.length > 0){
pWaypoints_Queuing = false;
} else {
return;
};
};
if (pWaypoints_List.length > 0){
if (pWaypoints_List.length < 10){
pWaypoint_Pointer = 0;
_local2 = pWaypoints_List[pWaypoint_Pointer];
pX_Destin = _local2.x;
pY_Destin = _local2.y;
pZ_Destin = _local2.z;
pWaypoint_Speed = _local2.spd;
pNewWaypoint = _local2.newwaypoint;
if (pNewWaypoint == true){
_local2.startx = pWorldX;
_local2.starty = pWorldY;
_local2.startz = pWorldZ;
_local13 = [pWorldX, pWorldY, pWorldZ];
_local14 = [pX_Destin, pY_Destin, pZ_Destin];
_local15 = gGameObj.DistanceTo(_local13, _local14);
pWaypoint_Speed = 10;
pX_Incre = ((pX_Destin - pWorldX) / pWaypoint_Speed);
pZ_Incre = ((pZ_Destin - pWorldZ) / pWaypoint_Speed);
pX_Incre = gGameObj.Translate_Increment(pX_Incre, 50, 30);
pZ_Incre = gGameObj.Translate_Increment(pZ_Incre, 50, 30);
pNewWaypoint = false;
};
pWaypoint_State = 2;
} else {
pWaypoint_Pointer = 0;
_local2 = pWaypoints_List[pWaypoint_Pointer];
SetWorldPosition(_local2.x, _local2.y, _local2.z);
pWaypoints_List.splice(0, 1);
return;
};
} else {
return;
};
_local1 = true;
_local2 = pWaypoints_List[pWaypoint_Pointer];
_local3 = pX_Destin;
_local4 = pY_Destin;
_local5 = pZ_Destin;
_local6 = pWaypoint_Speed;
_local7 = pNewWaypoint;
_local8 = (pWorldX + pX_Incre);
if ((((_local2.startx < _local3)) && ((_local8 > _local3)))){
_local8 = _local3;
};
if ((((_local2.startx > _local3)) && ((_local8 < _local3)))){
_local8 = _local3;
};
_local9 = Math.abs((_local8 - _local3));
if (_local9 > 1){
_local1 = false;
};
_local10 = pWorldY;
_local11 = (pWorldZ + pZ_Incre);
if ((((_local2.startz < _local5)) && ((_local11 > _local5)))){
_local11 = _local5;
};
if ((((_local2.startz > _local5)) && ((_local11 < _local5)))){
_local11 = _local5;
};
_local12 = Math.abs((_local11 - _local5));
if (_local12 > 1){
_local1 = false;
};
SetWorldPosition(_local8, _local10, _local11);
if (_local1 == false){
if ((_local11 + 2) < _local5){
pAction = "wf";
};
if ((_local11 - 2) > _local5){
pAction = "wb";
};
if ((_local8 + 2) < _local3){
pAction = "swr";
};
if ((_local8 - 2) > _local3){
pAction = "swl";
};
if (((((_local8 - 2) > _local3)) && (((_local11 + 6) < _local5)))){
pAction = "dlf";
};
if (((((_local8 + 2) < _local3)) && (((_local11 + 6) < _local5)))){
pAction = "drf";
};
if (((((_local8 - 2) > _local3)) && (((_local11 - 6) > _local5)))){
pAction = "dlb";
};
if (((((_local8 + 2) < _local3)) && (((_local11 - 6) > _local5)))){
pAction = "drb";
};
return;
};
_local2 = pWaypoints_List[pWaypoint_Pointer];
pWaypoints_List.splice(0, 1);
if (pWaypoints_List.length == 0){
pX_Incre = 0;
pY_Incre = 0;
pZ_Incre = 0;
switch (pAction){
case "swr":
pAction = "ssr";
break;
case "swl":
pAction = "ssl";
break;
case "wf":
pAction = "sf";
break;
case "wb":
pAction = "sb";
break;
case "drf":
pAction = "sf";
break;
case "dlf":
pAction = "sf";
break;
case "dlb":
pAction = "sb";
break;
case "drb":
pAction = "sb";
break;
};
pWaypoints_Queuing = true;
};
}
public function FadeIn(){
var _local1:Number;
var _local2:Number;
_local1 = pCharacter_MC.alpha;
_local2 = 0.025;
if (_local1 < 1){
_local1 = (_local1 + gGameObj.Translate_Increment(_local2, 50, 30));
};
if (_local1 > 1){
_local1 = 1;
};
pCharacter_MC.alpha = _local1;
if (_local1 > 0.4){
_local1 = 0.4;
};
pShadow_MC.alpha = _local1;
}
}
}//package com.uninvitedguests
Section 37
//ClientCharacter (com.uninvitedguests.ClientCharacter)
package com.uninvitedguests {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
public class ClientCharacter extends CharacterClass {
public var pState:String;// = "1"
public var pDeathDir:String;
public var pDeathState:String;
public var pPing:int;// = 0
public var pIcon:Boolean;
public var pNameTagObj:Object;
public var pSentFlagRequest:Boolean;// = false
public var pHoldingFlag:Boolean;// = false
public var pHoldingFlagColor:String;
public var pLifeTime:int;
public var pRearPos:Point;
private var lastTime:int;
public var pInvincible_Time:int;
public var pID;
public var gSFS;
public var pPlayerIconMC:MovieClip;
public var pInvincible:Boolean;// = false
public var pItemDelay:int;
public var pType:String;
public var pChatBubbleObj:Object;
private var pStartTime:int;
public var pHUDRadarDot:MovieClip;
public var pDeathDelay:int;
public function ClientCharacter(_arg1:Object, _arg2:Object){
pState = "1";
pSentFlagRequest = false;
pHoldingFlag = false;
pInvincible = false;
pRearPos = new Point(0, 0);
pPing = 0;
super();
gGameObj = _arg1;
MainObj = gGameObj.MainObj;
gSFS = gGameObj.gSFS;
gGameObj.pDisplay_Registry_List.push(this);
gGameObj.pCharacter_Registry_List.push(this);
gamemap = MainObj.gamemap;
pWorldX = _arg2.X;
pWorldY = _arg2.Y;
pWorldZ = _arg2.Z;
pSpeed = _arg2.spd;
pMode = _arg2.mode;
pTheme = _arg2.theme;
pType = _arg2.type;
pCharacterName = _arg2.name;
pIcon = _arg2.icon;
pID = _arg2.id;
if (_arg2.action == null){
pAction = "sf";
} else {
pAction = _arg2.action;
};
pStartX = pWorldX;
pStartY = pWorldY;
pStartZ = pWorldZ;
CreateClientCharacter();
centerMap();
MainObj.addEventListener(Event.ENTER_FRAME, GameUpdate);
}
public function CheckStatus(){
switch (pType){
case "Human":
centerMap();
SetRearPosition();
CheckTeleports();
break;
case "Client":
WayPoints2();
break;
};
}
public function CheckModes(){
switch (pMode){
case "Follow":
break;
};
}
public function SetRearPosition(){
switch (pAction){
case "swr":
case "ssr":
case "drf":
case "drb":
pRearPos.x = (pWorldX - 50);
pRearPos.y = (pWorldZ - 0);
break;
case "swl":
case "ssl":
case "dlf":
case "dlb":
pRearPos.x = (pWorldX + 50);
pRearPos.y = (pWorldZ - 0);
break;
case "wf":
case "sf":
pRearPos.x = pWorldX;
pRearPos.y = (pWorldZ - 50);
break;
case "wb":
case "sb":
pRearPos.x = pWorldX;
pRearPos.y = (pWorldZ + 50);
break;
};
}
public function Death(){
switch (pDeathState){
case "1":
gGameObj.pLock_UserInput = true;
pDeathState = "2";
break;
case "2":
pAction = "brnt";
pState = "3";
break;
case "3":
if (pCharacter_MC.currentFrame == 13){
pState = "destroy";
};
break;
};
}
public function GameUpdate(_arg1:Event){
switch (gGameObj.gGame_Status){
case "GameMap":
Animate();
CheckStatus();
break;
case "CleanUp":
Destroy();
break;
};
}
public function initClientCharacterMovieClipAttributes(){
gamemap = gGameObj.MainObj.gamemap;
pCharacter_MC.gotoAndStop(1);
pCharacter_MC.alpha = 1;
gamemap.addChild(pCharacter_MC);
}
public function centerMap(){
gamemap.x = (-(pCharacter_MC.x) + 320);
gamemap.y = (-(pCharacter_MC.y) + 240);
switch (gGameObj.pActiveLevel){
case "Hallway":
if (gamemap.x < -371){
gamemap.x = -371;
};
if (gamemap.x > -6){
gamemap.x = -6;
};
if (gamemap.y < -286){
gamemap.y = -286;
};
if (gamemap.y > -110){
gamemap.y = -110;
};
break;
case "Room1":
if (gamemap.x < -360){
gamemap.x = -360;
};
if (gamemap.x > -13){
gamemap.x = -13;
};
if (gamemap.y < -270){
gamemap.y = -270;
};
if (gamemap.y > -10){
gamemap.y = -10;
};
break;
case "HallwayRoom1":
if (gamemap.x < -375){
gamemap.x = -375;
};
if (gamemap.x > -5){
gamemap.x = -5;
};
if (gamemap.y < -155){
gamemap.y = -155;
};
if (gamemap.y > -60){
gamemap.y = -60;
};
break;
case "GuestRoom1":
case "GuestRoom2":
case "GuestRoom3":
if (gamemap.x < -230){
gamemap.x = -230;
};
if (gamemap.x > -155){
gamemap.x = -155;
};
if (gamemap.y < -130){
gamemap.y = -130;
};
if (gamemap.y > -80){
gamemap.y = -80;
};
break;
case "MasterBedroom":
if (gamemap.x < -375){
gamemap.x = -375;
};
if (gamemap.x > -15){
gamemap.x = -15;
};
if (gamemap.y < -215){
gamemap.y = -215;
};
if (gamemap.y > -25){
gamemap.y = -25;
};
break;
case "MasterBath":
if (gamemap.x < -230){
gamemap.x = -230;
};
if (gamemap.x > -155){
gamemap.x = -155;
};
if (gamemap.y < -130){
gamemap.y = -130;
};
if (gamemap.y > -80){
gamemap.y = -80;
};
break;
case "HallwayRoom2":
if (gamemap.x < -370){
gamemap.x = -370;
};
if (gamemap.x > -10){
gamemap.x = -10;
};
if (gamemap.y < -218){
gamemap.y = -218;
};
if (gamemap.y > -65){
gamemap.y = -65;
};
break;
case "GameRoom":
if (gamemap.x < -230){
gamemap.x = -230;
};
if (gamemap.x > -155){
gamemap.x = -155;
};
if (gamemap.y < -130){
gamemap.y = -130;
};
if (gamemap.y > -80){
gamemap.y = -80;
};
break;
case "HalfBath":
if (gamemap.x < -235){
gamemap.x = -235;
};
if (gamemap.x > -195){
gamemap.x = -195;
};
if (gamemap.y < -150){
gamemap.y = -150;
};
if (gamemap.y > -112){
gamemap.y = -112;
};
break;
case "Kitchen":
if (gamemap.x < -360){
gamemap.x = -360;
};
if (gamemap.x > -13){
gamemap.x = -13;
};
if (gamemap.y < -270){
gamemap.y = -270;
};
if (gamemap.y > -10){
gamemap.y = -10;
};
break;
};
gGameObj.pActiveCollisionMap.x = gamemap.x;
gGameObj.pActiveCollisionMap.y = gamemap.y;
}
public function CheckTeleports(){
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = 0;
while (_local1 < gGameObj.pActiveTeleportList.length) {
_local2 = gGameObj.pActiveTeleportList[_local1];
_local3 = _local2.hitTestObject(pShadow_MC);
if (_local3 == true){
gGameObj.pLastLevelList.push(gGameObj.pActiveLevel);
if (gGameObj.pLastLevelList.length > 4){
gGameObj.pLastLevelList.splice(0, 1);
};
switch (gGameObj.pActiveLevel){
case "Hallway":
switch (_local2.name){
case "hallway_teleport01":
gGameObj.pNextLevel = "Room1";
gGameObj.pActiveTeleportPos = [521, 0, 582];
gGameObj.pActiveTeleportAction = "sb";
break;
};
break;
case "Room1":
switch (_local2.name){
case "room1_teleport01":
gGameObj.pNextLevel = "Hallway";
gGameObj.pActiveTeleportPos = [622, 0, 387];
gGameObj.pActiveTeleportAction = "sf";
break;
case "room1_teleport02":
gGameObj.pNextLevel = "HallwayRoom1";
gGameObj.pActiveTeleportPos = [262, 0, 384];
gGameObj.pActiveTeleportAction = "ssr";
break;
case "room1_teleport03":
gGameObj.pNextLevel = "HallwayRoom2";
gGameObj.pActiveTeleportPos = [848, 0, 408];
gGameObj.pActiveTeleportAction = "ssl";
break;
case "room1_teleport04":
gGameObj.pNextLevel = "Kitchen";
gGameObj.pActiveTeleportPos = [521, 0, 587];
gGameObj.pActiveTeleportAction = "sb";
break;
};
break;
case "HallwayRoom1":
switch (_local2.name){
case "hallwayroom1_teleport01":
gGameObj.pNextLevel = "Room1";
gGameObj.pActiveTeleportPos = [802, 0, 387];
gGameObj.pActiveTeleportAction = "ssl";
break;
case "hallwayroom1_teleport02":
gGameObj.pNextLevel = "GuestRoom1";
gGameObj.pActiveTeleportPos = [626, 0, 493];
gGameObj.pActiveTeleportAction = "sb";
break;
case "hallwayroom1_teleport03":
gGameObj.pNextLevel = "GuestRoom2";
gGameObj.pActiveTeleportPos = [383, 0, 493];
gGameObj.pActiveTeleportAction = "sb";
break;
case "hallwayroom1_teleport04":
gGameObj.pNextLevel = "MasterBedroom";
gGameObj.pActiveTeleportPos = [310, 0, 543];
gGameObj.pActiveTeleportAction = "ssr";
break;
};
break;
case "GuestRoom1":
switch (_local2.name){
case "guestroom1_teleport01":
gGameObj.pNextLevel = "HallwayRoom1";
gGameObj.pActiveTeleportPos = [317, 0, 351];
gGameObj.pActiveTeleportAction = "sf";
break;
};
break;
case "GuestRoom2":
switch (_local2.name){
case "guestroom2_teleport01":
gGameObj.pNextLevel = "HallwayRoom1";
gGameObj.pActiveTeleportPos = [703, 0, 351];
gGameObj.pActiveTeleportAction = "sf";
break;
};
break;
case "GuestRoom3":
switch (_local2.name){
case "guestroom3_teleport01":
gGameObj.pNextLevel = "HallwayRoom2";
gGameObj.pActiveTeleportPos = [306, 0, 254];
gGameObj.pActiveTeleportAction = "sf";
break;
};
break;
case "MasterBedroom":
switch (_local2.name){
case "masterbedroom_teleport01":
gGameObj.pNextLevel = "HallwayRoom1";
gGameObj.pActiveTeleportPos = [801, 0, 383];
gGameObj.pActiveTeleportAction = "ssl";
break;
case "masterbedroom_teleport02":
gGameObj.pNextLevel = "MasterBath";
gGameObj.pActiveTeleportPos = [358, 0, 383];
gGameObj.pActiveTeleportAction = "ssr";
break;
};
break;
case "MasterBath":
switch (_local2.name){
case "masterbath_teleport01":
gGameObj.pNextLevel = "MasterBedroom";
gGameObj.pActiveTeleportPos = [754, 0, 543];
gGameObj.pActiveTeleportAction = "ssl";
break;
};
break;
case "HallwayRoom2":
switch (_local2.name){
case "hallwayroom2_teleport01":
gGameObj.pNextLevel = "Room1";
gGameObj.pActiveTeleportPos = [223, 0, 381];
gGameObj.pActiveTeleportAction = "ssr";
break;
case "hallwayroom2_teleport02":
gGameObj.pNextLevel = "GuestRoom3";
gGameObj.pActiveTeleportPos = [521, 0, 493];
gGameObj.pActiveTeleportAction = "sb";
break;
case "hallwayroom2_teleport03":
gGameObj.pNextLevel = "HalfBath";
gGameObj.pActiveTeleportPos = [620, 0, 460];
gGameObj.pActiveTeleportAction = "ssl";
break;
case "hallwayroom2_teleport04":
gGameObj.pNextLevel = "GameRoom";
gGameObj.pActiveTeleportPos = [665, 0, 325];
gGameObj.pActiveTeleportAction = "ssl";
break;
};
break;
case "GameRoom":
switch (_local2.name){
case "gameroom_teleport01":
gGameObj.pNextLevel = "HallwayRoom2";
gGameObj.pActiveTeleportPos = [150, 0, 585];
gGameObj.pActiveTeleportAction = "ssr";
break;
};
break;
case "HalfBath":
switch (_local2.name){
case "halfbath_teleport01":
gGameObj.pNextLevel = "HallwayRoom2";
gGameObj.pActiveTeleportPos = [230, 0, 280];
gGameObj.pActiveTeleportAction = "ssr";
break;
};
break;
case "Kitchen":
switch (_local2.name){
case "kitchen_teleport01":
gGameObj.pNextLevel = "Room1";
gGameObj.pActiveTeleportPos = [621, 0, 241];
gGameObj.pActiveTeleportAction = "sf";
break;
};
break;
};
gGameObj.pFrontend_Status = "FadeOut";
gGameObj.gGame_Status = "Frontend";
};
_local1++;
};
}
public function Destroy(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
pCharacter_MC.removeChild(pShadow_MC);
pShadow_MC = null;
gamemap.removeChild(pCharacter_MC);
pCharacter_MC = null;
if (pHUDRadarDot != null){
pHUDRadarDot.parent.removeChild(pHUDRadarDot);
pHUDRadarDot = null;
};
if (pNameTagObj != null){
pNameTagObj.DestroyNameTag();
pNameTagObj = null;
};
_local1 = 0;
while (_local1 < gGameObj.pNPC_Registry_List.length) {
_local2 = gGameObj.pNPC_Registry_List[_local1];
if (_local2 == this){
gGameObj.pNPC_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
_local1 = 0;
while (_local1 < gGameObj.pCharacter_Registry_List.length) {
_local3 = gGameObj.pCharacter_Registry_List[_local1];
if (_local3 == this){
gGameObj.pCharacter_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
_local1 = 0;
while (_local1 < gGameObj.pDisplay_Registry_List.length) {
_local4 = gGameObj.pDisplay_Registry_List[_local1];
if (_local4 == this){
gGameObj.pDisplay_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
MainObj.removeEventListener(Event.ENTER_FRAME, GameUpdate);
}
public function CreateClientCharacter(){
var _local1:MovieClip;
switch (pTheme){
case "Toby":
_local1 = new MainCharacterMC();
break;
};
pCharacter_MC = _local1;
initClientCharacterMovieClipAttributes();
initShadowMovieClipAttributes();
SetWorldPosition(pWorldX, pWorldY, pWorldZ);
}
}
}//package com.uninvitedguests
Section 38
//GameObjClass (com.uninvitedguests.GameObjClass)
package com.uninvitedguests {
import flash.events.*;
import com.newgrounds.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import mochi.as3.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.filters.*;
import flash.system.*;
import flash.external.*;
public class GameObjClass {
public var pFrameRate_Delay:int;
public var pOptionsNPCObj;
public var pDisplay_Registry_List:Array;
public var gamemap;
public var pAchievementDelay:int;// = 0
public var pRoomObject_RegistryList:Object;
public var pCompleteState:String;// = "0"
public var pMiniGameNPCScoreBeaten:Boolean;// = false
public var arrowDown:Boolean;// = false
public var pFrontend_Status:String;// = "preBoardSetup"
public var ChatSwitch_Down;
public var pMouseDown:Boolean;// = false
public var MainObj;
public var pVeronicasHelpDelay:int;// = 0
public var pAutoLogin:Boolean;// = true
public var Anykey_Down;
public var pEventPhaseDelay:int;
public var SpaceBar_Down:Boolean;// = false
public var pACMDelay:int;
public var UIChatBubbleList:Array;
public var arrowUp:Boolean;// = false
public var pAchievementActive:Boolean;// = false
public var pSearchMCObjList:Object;
public var pShowVeronicasPatience:Boolean;// = true
public var ShiftBarDown:Boolean;// = false
public var V_KeyDown;
public var pTimeUpState:String;// = "1"
public var RoomTheme3MusicSnd_Snd:RoomTheme3MusicSnd;
public var pAchievementObjList:Object;
public var UIChatBubbleDelay:int;
public var Attack_KeyDown:Boolean;// = false
public var pCleanUpState:String;// = "1"
public var pOptionsEntityXML:XML;
public var UIChatBubbleParagraphPointer:int;
public var pACMMeterOn:Boolean;// = false
public var pVeronicasPatienceMax:int;// = 300
public var pVeronicasHelpPointer:int;// = 0
public var UIChatBubbleDelay2:int;
public var collisionmap;
public var pStoryEntitiesXML;
public var pVeronicasHelpActivePuzzle:int;// = 1
public var pSearchIconPosQueue:Point;
public var pLock_UserInput:Boolean;// = false
public var pActiveTeleportList;
public var pInventoryState:String;
public var pEventPhaseAction:String;// = ""
public var pMouseActions:Object;
public var theMovieClip;
public var pActiveLaserWallLeftGroup;
public var pGotoNextPhaseAfterChat:Boolean;// = false
public var pGameMode:String;
public var pActiveCharacterClassRef;
public var pInventoryItemID:int;
public var pFrameRate:int;
public var pSearchIconDelay:int;
public var pEventSystemUnlockOptionsMenu:Boolean;// = false
public var pTutorialValueList:Object;
public var pOptionsNPCPoint:Point;
public var pEventPhasePointer:int;
public var pVeronicasPatienceIncrease;// = true
public var UIChatBubbleTextPointer:int;
public var pActiveLaserWallDownGroup;
public var A_KeyDown;
public var pInventoryList:Array;
public var pActiveLevel:String;// = "Hallway"
public var pSearchGridState:String;// = ""
public var pRetrievedStoryEntitiesXML:Boolean;// = false
private var pSiteLock;
public var EnterKeydown;
public var pProgressSavedTextDelay:int;// = 0
public var pReportPosition_Delay:int;
public var pFrameRateCount:int;
public var pActiveTimeRemaining:int;
public var TabDown:Boolean;
public var pActiveTeleportPos;
public var pLastLevelList:Array;
public var pNextLevel;// = ""
public var pSearchIconPos:Point;
public var pUninvitedGuestsCount:int;// = 0
public var pContinueGame:Boolean;// = false
public var pMessageStatusBoxDelay:int;
public var pLastX:Number;
public var pLastY:Number;
public var pShowUGMActive:Boolean;// = false
public var pRoomTextList:Array;
public var pRetrievedStoryEventsXML:Boolean;// = false
public var pOptionsMenuState:String;
public var pFemaleChatter1_Snd:FemaleChatter1Snd;
public var pVeronicasPatience:Number;// = 300
public var RoomTheme2MusicSnd_Snd:RoomTheme2MusicSnd;
public var pInventoryDelay:int;
public var gGame_Status:String;// = "Frontend"
public var pMyPlayerID:int;
public var pMySpawnPoint:Array;
public var pLoaderInitialized:Boolean;// = false
public var pCharacter_Registry_List:Array;
public var pMessageStatusBoxActive:Boolean;// = false
public var pShowACMActive:Boolean;// = false
public var pOptionsEntityID;
public var pOptionsMenuActionsList:Array;
public var EndingMusicSnd_Snd:EndingMusicSnd;
public var pActiveTeleportAction:String;// = ""
public var TitleScreenMusicSnd_Snd:TitleScreenMusicSnd;
public var pClient_Registry_List:Object;
public var gameStartTime:int;
public var ChaseMusicSnd_Snd:ChaseMusicSnd;
public var D_KeyDown;
public var pMyColor:String;
public var pApartmentCleanCount:int;// = 0
public var lastTime:int;
public var gSFS;
public var pDestinationX:Number;
public var pDestinationY:Number;
public var pGameSavePresent:Boolean;// = false
public var pEventID:int;
public var pUGMDelay:int;
public var pActiveLaserWallAllGroup;
public var pLockInput:Boolean;// = true
public var pMiniGameTopScore:int;// = 9999
public var pEntity_RegistryList:Object;
public var pRunningMateClassRef;
public var RoomTheme4MusicSnd_Snd:RoomTheme4MusicSnd;
public var pAchievementObjValues:Object;
public var degrees:int;
public var pNormalChatter1_Snd:NormalChatter1Snd;
public var pOnlineMode:Boolean;// = false
public var pSoundChannel1:SoundChannel;
public var pMyUsername:String;
public var pActiveSpectatorMode:Boolean;// = false
public var pUGMMeterOn:Boolean;// = false
public var pLockInput_TimeoutState:String;
public var pSleepToNextPhase:Boolean;// = false
public var pMaleChatter1_Snd:MaleChatter1Snd;
public var pHintOn:Boolean;// = false
public var pStoryEventsXML:XML;
public var pSearchGridArray:Array;
public var pNewgroundsMedalsActive:Boolean;// = true
public var pActiveLaserWallUpGroup;
public var pActiveLaserWallRightGroup;
public var pVeronicasHelpState:String;// = "1"
public var pInventoryPage:int;
public var pActiveCollisionMap;
public var pPatienceMeterOn:Boolean;// = false
public var RoomTheme1MusicSnd_Snd:RoomTheme1MusicSnd;
public var pMyAction:String;
public var arrowRight:Boolean;// = false
public var S_KeyDown;
public var pChatChannel1:SoundChannel;
public var W_KeyDown:Boolean;// = false
public var pPhaseSleepTime:int;
public var arrowLeft:Boolean;// = false
public var pKeyErrorCorrectionValueList:Object;
public var UIChatBubbleState:String;// = "1"
public var pVeronicasHelpPuzzleList:Array;
public var pStartTime:int;
public var pActiveGameRankings;// = null
public var pEventActive:Boolean;// = false
public var pLockInput_Timeout:int;
public var pEndGameRedirect:String;// = "NewRound"
public var pMovieClipSaveList:Object;
public var pNPC_Registry_List:Array;
public var pInventorySlotPointer:int;
public var pGenericNPCSaveList:Array;
public var pOptionsMenuLocked:Boolean;// = false
public var pOptionsStateXML:XML;
public var pProgressSavedTextActive:Boolean;// = false
public var pLastLevel:String;// = ""
public function GameObjClass(_arg1:Object){
gGame_Status = "Frontend";
pFrontend_Status = "preBoardSetup";
Attack_KeyDown = false;
arrowLeft = false;
arrowDown = false;
arrowRight = false;
arrowUp = false;
W_KeyDown = false;
ShiftBarDown = false;
SpaceBar_Down = false;
pMouseDown = false;
pMouseActions = {};
pLockInput = true;
pLock_UserInput = false;
pDisplay_Registry_List = new Array();
pCharacter_Registry_List = new Array();
pClient_Registry_List = {};
pNPC_Registry_List = new Array();
pEntity_RegistryList = {};
pRoomObject_RegistryList = {};
pOnlineMode = false;
pActiveLevel = "Hallway";
pActiveGameRankings = null;
pNextLevel = "";
pActiveTeleportList = [];
pActiveTeleportPos = [];
pActiveTeleportAction = "";
pLastLevel = "";
pLastLevelList = [];
pActiveSpectatorMode = false;
pRoomTextList = [];
pEndGameRedirect = "NewRound";
pCompleteState = "0";
pTimeUpState = "1";
pCleanUpState = "1";
pNormalChatter1_Snd = new NormalChatter1Snd();
pMaleChatter1_Snd = new MaleChatter1Snd();
pFemaleChatter1_Snd = new FemaleChatter1Snd();
EndingMusicSnd_Snd = new EndingMusicSnd();
ChaseMusicSnd_Snd = new ChaseMusicSnd();
TitleScreenMusicSnd_Snd = new TitleScreenMusicSnd();
RoomTheme1MusicSnd_Snd = new RoomTheme1MusicSnd();
RoomTheme2MusicSnd_Snd = new RoomTheme2MusicSnd();
RoomTheme3MusicSnd_Snd = new RoomTheme3MusicSnd();
RoomTheme4MusicSnd_Snd = new RoomTheme4MusicSnd();
pLoaderInitialized = false;
pAutoLogin = true;
pRetrievedStoryEntitiesXML = false;
pOptionsMenuLocked = false;
UIChatBubbleState = "1";
UIChatBubbleList = [];
pPatienceMeterOn = false;
pShowVeronicasPatience = true;
pVeronicasPatience = 300;
pVeronicasPatienceMax = 300;
pVeronicasPatienceIncrease = true;
pUGMMeterOn = false;
pShowUGMActive = false;
pUninvitedGuestsCount = 0;
pACMMeterOn = false;
pShowACMActive = false;
pApartmentCleanCount = 0;
pHintOn = false;
pMessageStatusBoxActive = false;
pAchievementDelay = 0;
pAchievementActive = false;
pProgressSavedTextDelay = 0;
pProgressSavedTextActive = false;
pSearchGridState = "";
pSearchMCObjList = {};
pEventPhaseAction = "";
pEventActive = false;
pRetrievedStoryEventsXML = false;
pGotoNextPhaseAfterChat = false;
pSleepToNextPhase = false;
pEventSystemUnlockOptionsMenu = false;
pInventoryList = [];
pVeronicasHelpState = "1";
pVeronicasHelpPuzzleList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
pVeronicasHelpActivePuzzle = 1;
pVeronicasHelpPointer = 0;
pVeronicasHelpDelay = 0;
pTutorialValueList = {};
pMovieClipSaveList = {};
pKeyErrorCorrectionValueList = {};
pMiniGameTopScore = 9999;
pMiniGameNPCScoreBeaten = false;
pNewgroundsMedalsActive = true;
pGameSavePresent = false;
pContinueGame = false;
pGenericNPCSaveList = [];
pAchievementObjList = {};
pAchievementObjValues = {};
super();
MainObj = _arg1;
MainObj.addEventListener(Event.ENTER_FRAME, GameUpdate);
MainObj.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
MainObj.stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
pStartTime = getTimer();
pSiteLock = true;
MainObj.gotoAndStop("loader");
MainObj.addEventListener(Event.ENTER_FRAME, loading);
MochiServices.connect("29a936b081c39dd5", MainObj, onConnectError);
if (pNewgroundsMedalsActive == true){
API.addEventListener(APIEvent.MEDAL_UNLOCKED, onMedalUnlocked);
};
}
protected function sortDisplayList():void{
var _local1:int;
var _local2:Array;
var _local3:*;
var _local4:Object;
var _local5:Object;
var _local6:int;
var _local7:MovieClip;
_local1 = 0;
_local2 = [];
_local3 = 0;
while (_local3 < pDisplay_Registry_List.length) {
_local4 = pDisplay_Registry_List[_local3];
_local5 = {};
_local5["Z"] = _local4.pWorldZ;
_local5["Obj"] = _local4;
_local2.push(_local5);
_local3++;
};
_local2.sortOn("Z", Array.NUMERIC);
_local3 = 0;
while (_local3 < _local2.length) {
_local5 = _local2[_local3];
_local4 = _local5["Obj"];
switch (_local4.pObject_Type){
case "Character":
_local7 = _local4.pCharacter_MC;
break;
case "Object":
_local7 = _local4.pObject_MC;
break;
};
_local6 = gamemap.getChildIndex(_local7);
if (_local6 != (_local3 + 1)){
gamemap.setChildIndex(_local7, (_local3 + 1));
};
_local3++;
};
}
function InitializeStoryEntitiesXML(_arg1:Event){
var _local2:URLLoader;
var _local3:XML;
_local2 = URLLoader(_arg1.target);
_local3 = new XML(_local2.data);
pStoryEntitiesXML = _local3;
pRetrievedStoryEntitiesXML = true;
}
public function GetEntityNameFromID(_arg1:int){
var _local2:Object;
var _local3:*;
var _local4:*;
_local2 = {};
_local2["ID"] = _arg1;
_local3 = 0;
while (_local3 < pStoryEntitiesXML.StoryEntity.length()) {
_local4 = pStoryEntitiesXML.StoryEntity[_local3];
if (_local4.ID == _arg1){
_local2["Name"] = String(_local4.Name);
return (_local2["Name"]);
};
_local3++;
};
}
public function MessageStatusBox(){
var _local1:int;
var _local2:*;
if (pMessageStatusBoxActive == true){
_local1 = (getTimer() - pMessageStatusBoxDelay);
if (_local1 > 3000){
_local2 = MainObj.message_status_box.alpha;
_local2 = (_local2 - Translate_Increment(0.05, 50, 30));
if (_local2 <= 0){
_local2 = 0;
};
MainObj.message_status_box.alpha = _local2;
MainObj.message_status_box.text.alpha = _local2;
MainObj.message_status_box.text.visible = false;
if (_local2 == 0){
MainObj.message_status_box.visible = false;
pMessageStatusBoxActive = false;
};
};
} else {
MainObj.message_status_box.visible = false;
};
}
public function CreateInitialNPCs(){
var _local1:*;
var _local2:Array;
var _local3:*;
var _local4:String;
var _local5:*;
var _local6:Object;
var _local7:NPC;
var _local8:Array;
_local1 = 0;
while (_local1 < pStoryEntitiesXML.StoryEntity.length()) {
_local3 = pStoryEntitiesXML.StoryEntity[_local1];
if ((((_local3.Type == "NPC")) && ((_local3.NPCType == "Puzzle")))){
_local4 = new String(_local3.State[0].Position);
_local5 = _local4.split(",");
_local6 = new Object();
_local6.id = _local3.ID;
_local6.X = _local5[0];
_local6.Y = _local5[1];
_local6.Z = _local5[2];
_local6.spd = 10;
_local6.mode = "Idle";
_local6.type = _local3.NPCType;
_local6.subtype = _local3.NPCSubType;
_local6.action = _local3.State[0].NPCAnimation;
_local6.room = _local3.State[0].Room;
_local7 = new NPC(this, _local6);
pEntity_RegistryList[("eid" + _local3.ID)] = {};
pEntity_RegistryList[("eid" + _local3.ID)]["ID"] = Number(_local3.ID);
pEntity_RegistryList[("eid" + _local3.ID)]["Index"] = _local1;
pEntity_RegistryList[("eid" + _local3.ID)]["Type"] = String(_local3.Type);
pEntity_RegistryList[("eid" + _local3.ID)]["CurrentState"] = "1";
};
_local1++;
};
_local2 = [];
_local2.push([3, 500, 0, 450, "Generic04", "dncdr", "Room1"]);
_local2.push([2, 600, 0, 450, "Generic01", "dncdl", "Room1"]);
_local2.push([2, 750, 0, 300, "Generic02", "dncdr", "Room1"]);
_local2.push([3, 275, 0, 250, "Generic03", "drnkdr", "Room1"]);
_local2.push([2, 335, 0, 250, "Generic02", "drnkf", "Room1"]);
_local2.push([2, 215, 0, 530, "Generic02", "drnkdl", "Room1"]);
_local2.push([3, 430, 0, 348, "Generic04", "stf", "HallwayRoom1"]);
_local2.push([2, 320, 0, 440, "Generic02", "ssr", "HallwayRoom1"]);
_local2.push([2, 600, 0, 348, "Generic01", "stf", "HallwayRoom1"]);
_local2.push([2, 230, 0, 285, "Generic01", "ssl", "HallwayRoom2"]);
_local2.push([2, 260, 0, 285, "Generic02", "ssl", "HallwayRoom2"]);
_local2.push([3, 290, 0, 285, "Generic03", "ssl", "HallwayRoom2"]);
_local2.push([2, 630, 0, 349, "Generic02", "drnkdr", "HallwayRoom2"]);
_local2.push([2, 180, 0, 580, "Generic01", "sf", "HallwayRoom2"]);
_local2.push([3, 220, 0, 580, "Generic04", "sdl", "HallwayRoom2"]);
_local2.push([2, 680, 0, 360, "Generic01", "sb", "HallwayRoom2"]);
_local2.push([2, 320, 0, 560, "Generic02", "drnkf", "Kitchen"]);
_local2.push([3, 380, 0, 560, "Generic04", "drnkdl", "Kitchen"]);
_local2.push([3, 260, 0, 560, "Generic03", "drnkdr", "Kitchen"]);
_local2.push([3, 270, 0, 335, "Generic03", "ssr", "Kitchen"]);
_local2.push([2, 750, 0, 265, "Generic01", "dncdr", "Kitchen"]);
_local2.push([3, 800, 0, 280, "Generic04", "stsl", "Kitchen"]);
_local2.push([2, 580, 0, 420, "Generic01", "drnkdr", "GuestRoom1"]);
_local2.push([2, 640, 0, 420, "Generic02", "ssl", "GuestRoom1"]);
_local2.push([3, 640, 0, 520, "Generic04", "drnkdl", "GuestRoom2"]);
_local2.push([3, 510, 0, 520, "Generic03", "drnkdr", "GuestRoom2"]);
_local2.push([2, 530, 0, 355, "Generic01", "sf", "GameRoom"]);
_local2.push([2, 610, 0, 450, "Generic02", "ssl", "GameRoom"]);
_local2.push([2, 530, 0, 260, "Generic01", "sb", "MasterBedroom"]);
_local2.push([2, 430, 0, 250, "Generic02", "ssr", "MasterBedroom"]);
_local1 = 0;
while (_local1 < _local2.length) {
_local8 = _local2[_local1];
_local6 = new Object();
_local6.id = _local8[0];
_local6.X = _local8[1];
_local6.Y = _local8[2];
_local6.Z = _local8[3];
_local6.spd = 10;
_local6.mode = "Idle";
_local6.type = "Generic";
_local6.subtype = _local8[4];
_local6.action = _local8[5];
_local6.room = _local8[6];
_local7 = new NPC(this, _local6);
pEntity_RegistryList[("eid" + _local6.id)] = {};
pEntity_RegistryList[("eid" + _local6.id)]["ID"] = _local6.id;
pEntity_RegistryList[("eid" + _local6.id)]["Type"] = "NPC";
pEntity_RegistryList[("eid" + _local6.id)]["CurrentState"] = "1";
pEntity_RegistryList[("eid" + _local6.id)]["Index"] = (_local6.id - 1);
_local1++;
};
}
public function InitalizeMessageStatusBox(_arg1:String, _arg2:int){
var _local3:NewItem1Snd;
var _local4:SoundChannel;
var _local5:*;
var _local6:NewItem2Snd;
MainObj.message_status_box.text.text = _arg1;
MainObj.message_status_box.gotoAndStop(_arg2);
switch (_arg2){
case 1:
case 3:
_local3 = new NewItem1Snd();
_local4 = _local3.play(0, 0);
_local5 = new SoundTransform();
_local5.volume = 0.5;
_local4.soundTransform = _local5;
break;
case 2:
_local6 = new NewItem2Snd();
_local4 = _local6.play(0, 0);
_local5 = new SoundTransform();
_local5.volume = 0.5;
_local4.soundTransform = _local5;
break;
};
MainObj.message_status_box.alpha = 1;
MainObj.message_status_box.text.alpha = 1;
MainObj.message_status_box.text.visible = true;
MainObj.message_status_box.visible = true;
pMessageStatusBoxDelay = getTimer();
pMessageStatusBoxActive = true;
MainObj.setChildIndex(MainObj.message_status_box, (MainObj.numChildren - 1));
}
public function VeronicasPatience(){
var _local1:Number;
var _local2:int;
var _local3:Number;
var _local4:*;
var _local5:MovieClip;
if (pPatienceMeterOn == true){
if (pShowVeronicasPatience == true){
MainObj.veronica_patience_header.visible = true;
MainObj.veronica_heart1.visible = false;
MainObj.veronica_heart2.visible = false;
MainObj.veronica_heart3.visible = false;
MainObj.veronica_heart4.visible = false;
MainObj.veronica_heart5.visible = false;
MainObj.veronica_heart6.visible = false;
_local1 = (pVeronicasPatience / 100);
_local2 = _local1;
_local3 = (1 - ((_local2 + 1) - _local1));
_local4 = 0;
while (_local4 < _local2) {
_local5 = MainObj.getChildByName(("veronica_heart" + (_local4 + 1)));
if (_local5 != null){
_local5.visible = true;
};
_local4++;
};
if (_local3 > 0){
_local5 = MainObj.getChildByName(("veronica_heart" + (_local2 + 1)));
if (_local5 != null){
_local5.visible = true;
_local5.alpha = _local3;
};
};
} else {
MainObj.veronica_patience_header.visible = false;
MainObj.veronica_heart1.visible = false;
MainObj.veronica_heart2.visible = false;
MainObj.veronica_heart3.visible = false;
MainObj.veronica_heart4.visible = false;
MainObj.veronica_heart5.visible = false;
MainObj.veronica_heart6.visible = false;
};
if (pVeronicasPatienceIncrease == true){
if (pVeronicasPatience < pVeronicasPatienceMax){
pVeronicasPatience = (pVeronicasPatience + Translate_Increment(0.05, 50, 30));
if (pVeronicasPatience >= 100){
MainObj.veronica_heart1.alpha = 1;
};
if (pVeronicasPatience >= 200){
MainObj.veronica_heart2.alpha = 1;
};
if (pVeronicasPatience >= 300){
MainObj.veronica_heart3.alpha = 1;
};
if (pVeronicasPatience >= 400){
MainObj.veronica_heart4.alpha = 1;
};
if (pVeronicasPatience >= 500){
MainObj.veronica_heart5.alpha = 1;
};
if (pVeronicasPatience >= 600){
MainObj.veronica_heart6.alpha = 1;
};
if (pVeronicasPatience > pVeronicasPatienceMax){
pVeronicasPatience = pVeronicasPatienceMax;
};
} else {
MainObj.veronica_heart1.alpha = 1;
MainObj.veronica_heart2.alpha = 1;
MainObj.veronica_heart3.alpha = 1;
MainObj.veronica_heart4.alpha = 1;
MainObj.veronica_heart5.alpha = 1;
MainObj.veronica_heart6.alpha = 1;
};
};
} else {
MainObj.veronica_patience_header.visible = false;
MainObj.veronica_heart1.visible = false;
MainObj.veronica_heart2.visible = false;
MainObj.veronica_heart3.visible = false;
MainObj.veronica_heart4.visible = false;
MainObj.veronica_heart5.visible = false;
MainObj.veronica_heart6.visible = false;
};
}
public function ClearGameAchievements(){
var _local1:SharedObject;
_local1 = SharedObject.getLocal("UninvitedGuestsAchievements");
_local1.clear();
pAchievementObjList = {};
pAchievementObjValues = {};
}
public function ProgressSavedText(){
var _local1:int;
var _local2:*;
if (pProgressSavedTextActive == true){
_local1 = (getTimer() - pProgressSavedTextDelay);
if (_local1 > 4000){
_local2 = MainObj.progress_saved.alpha;
_local2 = (_local2 - Translate_Increment(0.05, 50, 30));
if (_local2 <= 0){
_local2 = 0;
};
MainObj.progress_saved.alpha = _local2;
if (_local2 == 0){
MainObj.progress_saved.visible = false;
pProgressSavedTextActive = false;
};
};
} else {
MainObj.progress_saved.visible = false;
};
}
public function InitiateSearchGrid(_arg1:Array){
pLock_UserInput = true;
pSearchGridArray = _arg1;
pVeronicasPatienceIncrease = false;
pSearchGridState = "1";
}
public function GenerateSearchArray(_arg1:int, _arg2:int, _arg3:Array){
var _local4:Array;
var _local5:*;
var _local6:Array;
var _local7:*;
var _local8:Array;
var _local9:*;
var _local10:Object;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:Array;
_local4 = [];
_local5 = 0;
while (_local5 < _arg1) {
_local8 = [];
_local9 = 0;
while (_local9 < _arg2) {
_local10 = {};
_local10["Status"] = "Unknown";
_local10["Item"] = "None";
_local8.push(_local10);
_local9++;
};
_local4.push(_local8);
_local5++;
};
_local6 = [];
_local7 = 0;
while (_local7 < (_arg1 * _arg2)) {
_local6.push(_local7);
_local7++;
};
_local7 = 0;
while (_local7 < _arg3.length) {
_local11 = _arg3[_local7];
_local12 = (Math.random() * (_local6.length - 1));
_local13 = _local6[_local12];
_local14 = 0;
_local5 = 0;
while (_local5 < _local4.length) {
_local15 = _local4[_local5];
_local9 = 0;
while (_local9 < _local15.length) {
if (_local14 == _local13){
_local4[_local5][_local9]["Item"] = _local11;
};
_local14++;
_local9++;
};
_local5++;
};
_local6.splice(_local12, 1);
_local7++;
};
return (_local4);
}
public function ShowMyUnlockedAchievements(){
var _local1:*;
var _local2:*;
_local1 = 1;
while (_local1 < 23) {
_local2 = MainObj.achievement_list.getChildAt(_local1);
_local2.gotoAndStop(1);
_local1++;
};
if (pAchievementObjList["FirstStrike"] == true){
MainObj.achievement_list.box1.gotoAndStop(2);
};
if (pAchievementObjList["ItsGameTime"] == true){
MainObj.achievement_list.box2.gotoAndStop(2);
};
if (pAchievementObjList["NerveofaPerv"] == true){
MainObj.achievement_list.box3.gotoAndStop(2);
};
if (pAchievementObjList["SocialDeNetworking"] == true){
MainObj.achievement_list.box4.gotoAndStop(2);
};
if (pAchievementObjList["ToCatchaPredator"] == true){
MainObj.achievement_list.box5.gotoAndStop(2);
};
if (pAchievementObjList["NoRighttoPrivacy"] == true){
MainObj.achievement_list.box6.gotoAndStop(2);
};
if (pAchievementObjList["KitchenNightmares"] == true){
MainObj.achievement_list.box7.gotoAndStop(2);
};
if (pAchievementObjList["HighMaintenance"] == true){
MainObj.achievement_list.box8.gotoAndStop(2);
};
if (pAchievementObjList["TopGun"] == true){
MainObj.achievement_list.box9.gotoAndStop(2);
};
if (pAchievementObjList["ArcadeGrandMaster"] == true){
MainObj.achievement_list.box10.gotoAndStop(2);
};
if (pAchievementObjList["BurgerDebtRepaid"] == true){
MainObj.achievement_list.box11.gotoAndStop(2);
};
if (pAchievementObjList["FistofFury"] == true){
MainObj.achievement_list.box12.gotoAndStop(2);
};
if (pAchievementObjList["BossOfToss"] == true){
MainObj.achievement_list.box13.gotoAndStop(2);
};
if (pAchievementObjList["MamaICanClean"] == true){
MainObj.achievement_list.box14.gotoAndStop(2);
};
if (pAchievementObjList["SmallWasteManagement"] == true){
MainObj.achievement_list.box15.gotoAndStop(2);
};
if (pAchievementObjList["MrClean"] == true){
MainObj.achievement_list.box16.gotoAndStop(2);
};
if (pAchievementObjList["NeatFreak"] == true){
MainObj.achievement_list.box17.gotoAndStop(2);
};
if (pAchievementObjList["OCDCleaningKing"] == true){
MainObj.achievement_list.box18.gotoAndStop(2);
};
if (pAchievementObjList["FinalFrontier"] == true){
MainObj.achievement_list.box19.gotoAndStop(2);
};
if (pAchievementObjList["DusttoDawn"] == true){
MainObj.achievement_list.box20.gotoAndStop(2);
};
if (pAchievementObjList["PartysOver"] == true){
MainObj.achievement_list.box21.gotoAndStop(2);
};
if (pAchievementObjList["LadiesMan"] == true){
MainObj.achievement_list.box22.gotoAndStop(2);
MainObj.achievement_list.ladiesman.text = "(Made it to Final Scene without Punching a Girl)";
};
}
public function InitOptionsMenuButtons(){
MainObj.options_menu_bg.options_menu_key_lookat.gotoAndStop(1);
MainObj.options_menu_bg.options_menu_key_lookat.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_lookat.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_lookat.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_search.gotoAndStop(1);
MainObj.options_menu_bg.options_menu_key_search.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_search.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_search.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_use.gotoAndStop(1);
MainObj.options_menu_bg.options_menu_key_use.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_use.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_use.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_useitem.gotoAndStop(1);
MainObj.options_menu_bg.options_menu_key_useitem.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_useitem.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_useitem.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_punch.gotoAndStop(1);
MainObj.options_menu_bg.options_menu_key_punch.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_punch.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_punch.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_toss.gotoAndStop(1);
MainObj.options_menu_bg.options_menu_key_toss.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_toss.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_toss.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_talk.gotoAndStop(1);
MainObj.options_menu_bg.options_menu_key_talk.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_talk.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.options_menu_bg.options_menu_key_talk.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
}
public function OptionsMenu(){
var _local1:Number;
var _local2:XMLList;
var _local3:Number;
var _local4:*;
var _local5:Number;
var _local6:Point;
var _local7:Point;
var _local8:Number;
var _local9:Boolean;
var _local10:int;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:MovieClip;
var _local16:Point;
var _local17:*;
var _local18:String;
var _local19:String;
var _local20:XML;
var _local21:Number;
var _local22:String;
var _local23:Array;
var _local24:String;
var _local25:Boolean;
var _local26:int;
var _local27:int;
var _local28:*;
var _local29:String;
var _local30:String;
var _local31:Point;
var _local32:Array;
var _local33:Boolean;
var _local34:*;
var _local35:*;
var _local36:int;
switch (pOptionsMenuState){
case "1":
if (pOptionsMenuLocked == false){
_local11 = 0;
while (_local11 < pNPC_Registry_List.length) {
_local12 = pNPC_Registry_List[_local11];
if (_local12 != this){
if ((((_local12.pRoom == pActiveLevel)) && ((_local12.pMode == "Active")))){
_local6 = new Point(_local12.pCharacter_MC.x, _local12.pCharacter_MC.y);
_local7 = new Point(pActiveCharacterClassRef.pCharacter_MC.x, pActiveCharacterClassRef.pCharacter_MC.y);
pOptionsEntityID = _local12.pEntityID;
pOptionsNPCPoint = _local6;
pOptionsNPCObj = _local12;
_local8 = Point.distance(_local6, _local7);
if (_local8 < 75){
pOptionsMenuState = "2";
return (true);
};
};
};
_local11++;
};
for (_local11 in pRoomObject_RegistryList[pActiveLevel]) {
_local13 = pRoomObject_RegistryList[pActiveLevel][_local11]["MovieClipName"];
_local14 = pRoomObject_RegistryList[pActiveLevel][_local11]["EntityID"];
_local15 = MainObj.gamemap.getChildByName(_local13);
if (_local15 != null){
_local16 = new Point(_local15.x, _local15.y);
_local7 = new Point(pActiveCharacterClassRef.pCharacter_MC.x, pActiveCharacterClassRef.pCharacter_MC.y);
pOptionsEntityID = _local14;
pOptionsNPCPoint = _local16;
_local8 = Point.distance(_local16, _local7);
if (_local8 < 50){
pOptionsMenuState = "2";
return (true);
};
};
};
};
break;
case "2":
_local1 = new Number(pOptionsEntityID);
_local2 = pStoryEntitiesXML.StoryEntity;
_local3 = new Number(pEntity_RegistryList[("eid" + _local1)]["CurrentState"]);
MainObj.options_menu_bg.options_menu_key_punch.visible = false;
MainObj.options_menu_bg.options_menu_key_toss.visible = false;
MainObj.options_menu_bg.options_menu_key_talk.visible = false;
MainObj.options_menu_bg.options_menu_key_useitem.visible = false;
MainObj.options_menu_bg.options_menu_key_lookat.visible = false;
MainObj.options_menu_bg.options_menu_key_search.visible = false;
MainObj.options_menu_bg.options_menu_key_use.visible = false;
MainObj.options_menu_bg.options_menu_key_punch.alpha = 0.25;
MainObj.options_menu_bg.options_menu_key_toss.alpha = 0.25;
MainObj.options_menu_bg.options_menu_key_talk.alpha = 0.25;
MainObj.options_menu_bg.options_menu_key_useitem.alpha = 0.25;
MainObj.options_menu_bg.options_menu_key_lookat.alpha = 0.25;
MainObj.options_menu_bg.options_menu_key_search.alpha = 0.25;
MainObj.options_menu_bg.options_menu_key_use.alpha = 0.25;
_local11 = 0;
while (_local11 < pStoryEntitiesXML.StoryEntity.length()) {
_local17 = pStoryEntitiesXML.StoryEntity[_local11];
_local1 = new Number(_local17.ID);
if (_local1 == pOptionsEntityID){
pOptionsEntityXML = _local17;
MainObj.options_menu_bg.options_entity_name.text = _local17.Name;
_local18 = new String(_local17.Type);
switch (_local18){
case "NPC":
_local19 = _local17.NPCSubType;
switch (_local19){
case "Puzzle01":
case "Puzzle02":
case "Puzzle03":
case "Puzzle04":
case "Puzzle05":
case "Puzzle06":
case "Puzzle07":
case "Puzzle08":
case "Puzzle09":
case "Puzzle10":
case "Puzzle11":
case "Puzzle12":
case "Puzzle13":
case "Puzzle14":
case "Puzzle15":
case "Puzzle16":
case "Puzzle17a":
case "Puzzle17b":
case "Puzzle17c":
MainObj.object_highlighter.visible = true;
MainObj.object_highlighter.gotoAndStop(1);
break;
case "Generic01":
case "Generic02":
case "Generic03":
case "Generic04":
MainObj.object_highlighter.visible = true;
MainObj.object_highlighter.gotoAndStop(2);
break;
};
MainObj.options_menu_bg.options_menu_key_punch.visible = true;
MainObj.options_menu_bg.options_menu_key_toss.visible = true;
MainObj.options_menu_bg.options_menu_key_talk.visible = true;
MainObj.options_menu_bg.options_menu_key_useitem.visible = true;
break;
case "StaticObject":
MainObj.options_menu_bg.options_menu_key_lookat.visible = true;
MainObj.options_menu_bg.options_menu_key_search.visible = true;
MainObj.options_menu_bg.options_menu_key_use.visible = true;
MainObj.options_menu_bg.options_menu_key_useitem.visible = true;
MainObj.object_highlighter.visible = true;
MainObj.object_highlighter.gotoAndStop(3);
break;
};
gamemap.addChild(MainObj.object_highlighter);
MainObj.object_highlighter.x = pOptionsNPCPoint.x;
MainObj.object_highlighter.y = pOptionsNPCPoint.y;
_local11 = 0;
while (_local11 < _local17.State.length()) {
_local20 = new XML(_local17.State[_local11]);
_local21 = new Number(_local20.StateID);
if (_local21 == _local3){
pOptionsStateXML = _local20;
_local22 = _local17.State[_local11].AvailableActions;
_local23 = _local22.split(",");
_local11 = 0;
while (_local11 < _local23.length) {
_local24 = _local23[_local11];
switch (_local24){
case "PUNCH":
MainObj.options_menu_bg.options_menu_key_punch.visible = true;
MainObj.options_menu_bg.options_menu_key_punch.alpha = 1;
break;
case "TOSS":
MainObj.options_menu_bg.options_menu_key_toss.visible = true;
MainObj.options_menu_bg.options_menu_key_toss.alpha = 1;
break;
case "TALK":
MainObj.options_menu_bg.options_menu_key_talk.visible = true;
MainObj.options_menu_bg.options_menu_key_talk.alpha = 1;
break;
case "USE ITEM":
MainObj.options_menu_bg.options_menu_key_useitem.visible = true;
MainObj.options_menu_bg.options_menu_key_useitem.alpha = 1;
break;
case "LOOK AT":
MainObj.options_menu_bg.options_menu_key_lookat.visible = true;
MainObj.options_menu_bg.options_menu_key_lookat.alpha = 1;
break;
case "SEARCH":
MainObj.options_menu_bg.options_menu_key_search.visible = true;
MainObj.options_menu_bg.options_menu_key_search.alpha = 1;
break;
case "USE":
MainObj.options_menu_bg.options_menu_key_use.visible = true;
MainObj.options_menu_bg.options_menu_key_use.alpha = 1;
break;
};
_local11++;
};
pOptionsMenuActionsList = _local23;
pOptionsMenuState = "3";
return;
};
_local11++;
};
};
_local11++;
};
pOptionsMenuState = "3";
break;
case "3":
_local4 = MainObj.sociotown_logo.alpha;
_local4 = (_local4 - Translate_Increment(0.1, 50, 30));
if (_local4 < 0){
_local4 = 0;
};
MainObj.sociotown_logo.alpha = _local4;
MainObj.options_menu_bg.visible = true;
_local5 = MainObj.options_menu_bg.y;
_local5 = (_local5 - Translate_Increment(8, 50, 30));
if (_local5 < 411){
_local5 = 411;
};
MainObj.options_menu_bg.y = _local5;
if (_local5 == 411){
pOptionsMenuState = "4";
};
break;
case "4":
pVeronicasPatienceIncrease = false;
_local11 = 0;
while (_local11 < pOptionsMenuActionsList.length) {
_local24 = pOptionsMenuActionsList[_local11];
switch (_local24){
case "PUNCH":
if (pMouseActions["PUNCH"]){
pLock_UserInput = true;
pOptionsNPCObj.Punched();
pOptionsMenuLocked = true;
MainObj.object_highlighter.visible = false;
pOptionsMenuState = "5";
delete pMouseActions["PUNCH"];
};
break;
case "TOSS":
if (pMouseActions["TOSS"]){
pOptionsNPCObj.Tossed();
pOptionsMenuLocked = true;
MainObj.object_highlighter.visible = false;
pOptionsMenuState = "5";
delete pMouseActions["TOSS"];
};
break;
case "TALK":
if (pMouseActions["TALK"]){
_local25 = true;
if (pOptionsStateXML.Actions.TALK.Event.length() > 0){
_local26 = pOptionsStateXML.Actions.TALK.Event;
InitiateEvent(_local26);
_local25 = false;
};
if (_local25 == true){
_local27 = pOptionsStateXML.Actions.TALK.TEXT.length();
_local28 = Math.floor((Math.random() * _local27));
_local29 = pOptionsStateXML.Actions.TALK.TEXT[_local28];
_local30 = pOptionsEntityXML.Name;
InitiateUIChatBubble(_local30, _local29, pOptionsNPCPoint, "None", false, true);
};
pLock_UserInput = true;
pOptionsMenuLocked = true;
pOptionsMenuState = "5";
delete pMouseActions["TALK"];
};
break;
case "LOOK AT":
if (pMouseActions["LOOKAT"]){
_local27 = pOptionsStateXML.Actions.LOOKAT.INFO.length();
_local28 = Math.floor((Math.random() * _local27));
_local29 = pOptionsStateXML.Actions.LOOKAT.INFO[_local28];
_local30 = "Toby";
_local31 = new Point(pActiveCharacterClassRef.pCharacter_MC.x, pActiveCharacterClassRef.pCharacter_MC.y);
InitiateUIChatBubble(_local30, _local29, _local31, "None", false, true);
delete pMouseActions["LOOKAT"];
pOptionsMenuLocked = true;
pOptionsMenuState = "5";
};
break;
case "SEARCH":
if (pMouseActions["SEARCH"]){
if (pVeronicasPatience >= 100){
_local32 = pRoomObject_RegistryList[pActiveLevel][("eid" + pOptionsEntityID)]["SearchArray"];
InitiateSearchGrid(_local32);
pOptionsMenuLocked = true;
pOptionsMenuState = "5";
} else {
_local30 = "Veronica";
_local29 = "I told you already! Come back to this later!";
_local31 = new Point(pRunningMateClassRef.pCharacter_MC.x, pRunningMateClassRef.pCharacter_MC.y);
InitiateUIChatBubble(_local30, _local29, _local31, "None", false, true);
pOptionsMenuLocked = true;
pOptionsMenuState = "5";
};
delete pMouseActions["SEARCH"];
};
break;
case "USE":
if (pMouseActions["USE"]){
_local33 = true;
if (pOptionsStateXML.Actions.USE.TEXT.length() > 0){
_local29 = pOptionsStateXML.Actions.USE.TEXT;
_local30 = "Toby";
_local31 = new Point(pActiveCharacterClassRef.pCharacter_MC.x, pActiveCharacterClassRef.pCharacter_MC.y);
InitiateUIChatBubble(_local30, _local29, _local31, "Male1", false, true);
_local33 = false;
};
if (_local33 == true){
_local26 = pOptionsStateXML.Actions.USE.EventID;
InitiateEvent(_local26);
};
pOptionsMenuLocked = true;
pOptionsMenuState = "5";
delete pMouseActions["USE"];
};
break;
case "USE ITEM":
if (pMouseActions["USEITEM"]){
ShowInventory();
pOptionsMenuState = "WaitforUsedItem";
delete pMouseActions["USEITEM"];
};
break;
};
_local11++;
};
_local6 = pOptionsNPCPoint;
_local7 = new Point(pActiveCharacterClassRef.pCharacter_MC.x, pActiveCharacterClassRef.pCharacter_MC.y);
_local8 = Point.distance(_local6, _local7);
if (_local8 > 75){
MainObj.object_highlighter.visible = false;
pOptionsMenuState = "5";
return (true);
};
break;
case "UseItem":
_local9 = false;
_local10 = pOptionsStateXML.Actions.USEITEM.Entity.length();
_local34 = 0;
while (_local34 < _local10) {
_local35 = pOptionsStateXML.Actions.USEITEM.Entity[_local34];
_local1 = _local35.ID;
if (_local1 == pInventoryItemID){
if (_local35.Text.length() > 0){
_local9 = true;
_local29 = _local35.Text;
_local30 = "Toby";
_local31 = new Point(pActiveCharacterClassRef.pCharacter_MC.x, pActiveCharacterClassRef.pCharacter_MC.y);
InitiateUIChatBubble(_local30, _local29, _local31, "Male1", false, true);
pOptionsMenuLocked = true;
pOptionsMenuState = "5";
break;
};
if (_local35.Event.length() > 0){
_local9 = true;
_local36 = _local35.Event;
InitiateEvent(_local36);
pOptionsMenuLocked = true;
pOptionsMenuState = "5";
break;
};
};
_local34++;
};
if (_local9 == false){
_local29 = "Nope, that's not gonna work.";
_local30 = "Toby";
_local31 = new Point(pActiveCharacterClassRef.pCharacter_MC.x, pActiveCharacterClassRef.pCharacter_MC.y);
InitiateUIChatBubble(_local30, _local29, _local31, "None", false, true);
pOptionsMenuLocked = true;
pOptionsMenuState = "5";
};
break;
case "5":
_local4 = MainObj.sociotown_logo.alpha;
_local4 = (_local4 + Translate_Increment(0.1, 50, 30));
if (_local4 < 0){
_local4 = 0;
};
MainObj.sociotown_logo.alpha = _local4;
MainObj.options_menu_bg.visible = true;
_local5 = MainObj.options_menu_bg.y;
_local5 = (_local5 + Translate_Increment(8, 50, 30));
if (_local5 > 490){
_local5 = 490;
};
MainObj.options_menu_bg.y = _local5;
if (_local5 == 490){
pVeronicasPatienceIncrease = true;
if ((((pSearchGridState == "")) && ((pEventPhaseAction == "")))){
pLock_UserInput = false;
};
MainObj.options_menu_bg.visible = false;
pOptionsMenuState = "1";
};
break;
};
}
public function InitiateUIChatBubble(_arg1:String, _arg2:String, _arg3:Point, _arg4:String, _arg5:Boolean, _arg6:Boolean){
var _local7:Object;
_local7 = {};
_local7["EntityName"] = _arg1;
_local7["Text"] = _arg2;
_local7["HighlightPoint"] = _arg3;
_local7["VoiceType"] = _arg4;
_local7["AutoClose"] = _arg5;
_local7["UnlockOptionsMenu"] = _arg6;
UIChatBubbleList.push(_local7);
}
private function sitelock(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = MainObj.stage.loaderInfo;
_local3 = true;
_local4 = _local2.url.split("://");
_local5 = _local4[1].split("/");
for (_local6 in _arg1) {
if (_arg1[_local6] == _local5[0]){
_local3 = false;
};
};
if (_local3){
};
return (_local3);
}
public function AdjustApartmentMeter(_arg1:int){
pApartmentCleanCount = (pApartmentCleanCount + _arg1);
MainObj.apartment_header.text.text = (Math.floor((100 * (pApartmentCleanCount / 47))) + "% Clean");
CheckingAchievements("Cleaning");
if (pVeronicasPatience < pVeronicasPatienceMax){
pVeronicasPatience = (pVeronicasPatience + 100);
if (pVeronicasPatience > pVeronicasPatienceMax){
pVeronicasPatience = pVeronicasPatienceMax;
};
};
switch (pApartmentCleanCount){
case 2:
pVeronicasPatienceMax = (pVeronicasPatienceMax + 100);
pVeronicasPatience = pVeronicasPatienceMax;
InitalizeMessageStatusBox("Veronica's Patience Improved", 3);
break;
case 15:
pVeronicasPatienceMax = (pVeronicasPatienceMax + 100);
pVeronicasPatience = pVeronicasPatienceMax;
InitalizeMessageStatusBox("Veronica's Patience Improved", 3);
break;
case 35:
pVeronicasPatienceMax = (pVeronicasPatienceMax + 100);
pVeronicasPatience = pVeronicasPatienceMax;
InitalizeMessageStatusBox("Veronica's Patience Improved", 3);
break;
};
}
public function SimpleInterpolation(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local6 = (_arg2 - _arg1);
if (_local6 == 0){
_local7 = 1;
} else {
_local7 = Math.min(Math.max(((_arg3 - _arg1) / _local6), 0), 1);
};
_local8 = (_arg4 + ((_arg5 - _arg4) * _local7));
return (_local8);
}
public function SearchGrid(){
var _local1:MovieClip;
var _local2:int;
var _local3:int;
var _local4:MovieClip;
var _local5:*;
var _local6:MovieClip;
var _local7:Boolean;
var _local8:Number;
var _local9:int;
var _local10:Number;
var _local11:MovieClip;
var _local12:*;
var _local13:int;
var _local14:MovieClip;
var _local15:Number;
var _local16:int;
var _local17:String;
var _local18:*;
var _local19:*;
var _local20:Array;
var _local21:*;
var _local22:String;
var _local23:Point;
var _local24:*;
var _local25:String;
var _local26:*;
var _local27:String;
var _local28:String;
var _local29:String;
var _local30:Array;
var _local31:int;
var _local32:String;
var _local33:*;
var _local34:*;
var _local35:String;
var _local36:String;
var _local37:String;
switch (pSearchGridState){
case "1":
_local1 = new MovieClip();
_local1.name = "SearchGridGroup";
_local2 = 0;
_local3 = 0;
_local19 = 0;
while (_local19 < pSearchGridArray.length) {
_local20 = pSearchGridArray[_local19];
_local21 = 0;
while (_local21 < _local20.length) {
_local22 = _local20[_local21]["Status"];
_local4 = new SearchGridBox();
_local4.name = "SearchGridBox";
switch (_local22){
case "Unknown":
_local4.gotoAndStop(1);
break;
case "NothingHere":
_local4.gotoAndStop(30);
break;
case "ItemFound":
_local4.gotoAndStop(90);
break;
};
_local4.x = _local2;
_local4.y = _local3;
_local23 = new Point(_local21, _local19);
_local20[_local21]["MC"] = _local4;
pSearchMCObjList[((_local4.name + _local4.x) + _local4.y)] = _local23;
_local1.addChild(_local4);
_local4.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
_local4.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
_local2 = (_local2 + 65);
_local21++;
};
_local2 = 0;
_local3 = (_local3 + 65);
_local19++;
};
_local4 = new SearchGridBoxExit();
_local4.x = ((_local1.width / 2) - 27);
_local4.y = _local3;
_local4.name = "SearchGridExit";
_local1.addChild(_local4);
_local4.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
_local4.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.addChild(_local1);
_local5 = (((640 - _local1.width) / 2) + 25);
_local1.x = _local5;
_local1.y = 120;
pShowVeronicasPatience = false;
_local6 = new VeronicaPatienceMC();
_local6.x = 240;
_local6.y = 410;
_local6.name = "patienceHader";
MainObj.addChild(_local6);
_local7 = false;
_local8 = ((pVeronicasPatience + 1) / 100);
_local9 = Math.floor(_local8);
_local10 = (_local8 - _local9);
if (_local10 >= 0.5){
_local7 = true;
_local9++;
};
_local2 = 140;
_local3 = 440;
_local24 = 0;
while (_local24 < _local9) {
_local4 = new VeronicaHeartMC();
_local4.x = _local2;
_local4.y = _local3;
_local4.name = ("Vheart" + (_local24 + 1));
MainObj.addChild(_local4);
if (((((_local24 + 1) == _local9)) && (_local7))){
_local4.alpha = 0.5;
};
_local2 = (_local2 + 50);
_local24++;
};
_local11 = new SearchGridSearchIcon();
_local11.x = 50;
_local11.y = 50;
_local11.gotoAndStop(0);
_local1.addChild(_local11);
_local11.name = "search_icon";
_local11.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
_local11.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
pSearchIconPos = new Point(0, 0);
pSearchGridState = "2";
break;
case "2":
pVeronicasPatienceIncrease = false;
_local12 = MainObj.getChildByName("SearchGridGroup");
_local11 = _local12.getChildByName("search_icon");
if (pSearchIconPos == null){
_local18 = _local12.getChildByName("SearchGridExit");
_local11.x = _local18.x;
_local11.y = _local18.y;
} else {
_local11.x = (pSearchIconPos.x * 65);
_local11.y = (pSearchIconPos.y * 65);
};
_local13 = (getTimer() - pSearchIconDelay);
if (_local13 > 250){
if (pSearchIconPos != null){
if ((((((EnterKeydown == true)) || ((SpaceBar_Down == true)))) || (pMouseActions["SEARCHGRIDBOX"]))){
_local22 = pSearchGridArray[pSearchIconPos.y][pSearchIconPos.x]["Status"];
switch (_local22){
case "Unknown":
_local25 = pSearchGridArray[pSearchIconPos.y][pSearchIconPos.x]["Item"];
_local26 = pSearchGridArray[pSearchIconPos.y][pSearchIconPos.x]["MC"];
if (_local25 != "None"){
pSearchGridArray[pSearchIconPos.y][pSearchIconPos.x]["Status"] = "ItemFound";
_local26.gotoAndPlay(60);
} else {
pSearchGridArray[pSearchIconPos.y][pSearchIconPos.x]["Status"] = "NothingHere";
_local26.gotoAndPlay(1);
};
if (pAchievementObjValues["SearchSpaceOpened"] == undefined){
pAchievementObjValues["SearchSpaceOpened"] = 0;
};
var _local38 = pAchievementObjValues;
var _local39 = "SearchSpaceOpened";
var _local40 = (_local38[_local39] + 1);
_local38[_local39] = _local40;
delete pMouseActions["SEARCHGRIDBOX"];
_local11.gotoAndPlay(1);
pSearchIconDelay = getTimer();
pSearchIconPosQueue = pSearchIconPos;
pSearchGridState = "3";
break;
};
};
} else {
if (arrowRight == true){
pSearchIconPos = new Point();
pSearchIconPos.x = (pSearchGridArray[0].length - 1);
pSearchIconPos.y = (pSearchGridArray.length - 1);
pSearchIconDelay = getTimer();
};
if (arrowLeft == true){
pSearchIconPos = new Point();
pSearchIconPos.x = 0;
pSearchIconPos.y = (pSearchGridArray.length - 1);
pSearchIconDelay = getTimer();
};
if (arrowUp == true){
pSearchIconPos = new Point();
pSearchIconPos.x = 0;
pSearchIconPos.y = (pSearchGridArray.length - 1);
pSearchIconDelay = getTimer();
};
if (arrowDown == true){
pSearchIconPos = new Point();
pSearchIconPos.x = 0;
pSearchIconPos.y = 0;
pSearchIconDelay = getTimer();
};
if ((((((EnterKeydown == true)) || ((SpaceBar_Down == true)))) || (pMouseActions["SEARCHGRIDEXIT"]))){
delete pMouseActions["SEARCHGRIDEXIT"];
pSearchGridState = "exit";
};
};
};
break;
case "3":
_local12 = MainObj.getChildByName("SearchGridGroup");
_local11 = _local12.getChildByName("search_icon");
_local7 = false;
_local8 = ((pVeronicasPatience + 1) / 100);
_local9 = Math.floor(_local8);
_local10 = (_local8 - _local9);
if (_local10 >= 0.5){
_local7 = true;
_local9++;
};
_local14 = MainObj.getChildByName(("Vheart" + _local9));
_local15 = _local14.alpha;
_local15 = (_local15 - Translate_Increment(0.015, 50, 30));
if (_local15 < 0){
_local15 = 0;
};
_local14.alpha = _local15;
if (_local11.currentFrame == 30){
if (_local7){
_local14.alpha = 0.5;
};
_local26 = pSearchGridArray[pSearchIconPos.y][pSearchIconPos.x]["MC"];
pSearchGridArray[pSearchIconPos.y][pSearchIconPos.x]["MC"].gotoAndStop(_local26.currentFrame);
_local11.gotoAndStop(1);
_local22 = pSearchGridArray[pSearchIconPos.y][pSearchIconPos.x]["Status"];
pSearchGridState = "2";
if (_local22 == "ItemFound"){
pSearchGridState = "ItemFound1";
_local14.alpha = 1;
pVeronicasPatience = (pVeronicasPatience + 100);
if (pVeronicasPatience > pVeronicasPatienceMax){
pVeronicasPatience = (pVeronicasPatienceMax - 1);
};
_local7 = false;
_local8 = ((pVeronicasPatience + 1) / 100);
_local9 = Math.floor(_local8);
_local10 = (_local8 - _local9);
if (_local10 >= 0.01){
_local7 = true;
_local9++;
};
_local24 = 0;
while (_local24 < _local9) {
_local4 = MainObj.getChildByName(("Vheart" + (_local24 + 1)));
if (_local4 != null){
_local4.parent.removeChild(_local4);
};
_local24++;
};
_local7 = false;
_local8 = ((pVeronicasPatience + 1) / 100);
_local9 = Math.floor(_local8);
_local10 = (_local8 - _local9);
if (_local10 >= 0.5){
_local7 = true;
_local9++;
};
_local2 = 140;
_local3 = 440;
_local24 = 0;
while (_local24 < _local9) {
_local4 = new VeronicaHeartMC();
_local4.x = _local2;
_local4.y = _local3;
_local4.name = ("Vheart" + (_local24 + 1));
MainObj.addChild(_local4);
if (((((_local24 + 1) == _local9)) && (_local7))){
_local4.alpha = 0.5;
};
_local2 = (_local2 + 50);
_local24++;
};
} else {
pSearchIconPos = pSearchIconPosQueue;
delete pMouseActions["SEARCHGRIDBOX"];
if (pVeronicasPatience >= 49){
_local7 = false;
_local8 = ((pVeronicasPatience + 1) / 100);
_local9 = Math.floor(_local8);
_local10 = (_local8 - _local9);
if (_local10 >= 0.01){
_local7 = true;
_local9++;
};
_local24 = 0;
while (_local24 < _local9) {
_local4 = MainObj.getChildByName(("Vheart" + (_local24 + 1)));
if (_local4 != null){
_local4.parent.removeChild(_local4);
};
_local24++;
};
pVeronicasPatience = (pVeronicasPatience - 50);
_local7 = false;
_local8 = ((pVeronicasPatience + 1) / 100);
_local9 = Math.floor(_local8);
_local10 = (_local8 - _local9);
if (_local10 >= 0.5){
_local7 = true;
_local9++;
};
_local2 = 140;
_local3 = 440;
_local24 = 0;
while (_local24 < _local9) {
_local4 = new VeronicaHeartMC();
_local4.x = _local2;
_local4.y = _local3;
_local4.name = ("Vheart" + (_local24 + 1));
MainObj.addChild(_local4);
if (((((_local24 + 1) == _local9)) && (_local7))){
_local4.alpha = 0.5;
};
_local2 = (_local2 + 50);
_local24++;
};
if (pVeronicasPatience < 49){
_local17 = "Veronica";
_local27 = "Okay enough searching already! Just get rid of these people from your apartment!!!";
_local28 = "Ugh, enough already! Just look for it later!!!";
_local29 = "This is taking too long! Come back to this later!";
_local30 = [_local27, _local28, _local29];
_local31 = (Math.random() * _local30.length);
_local32 = _local30[_local31];
InitiateUIChatBubble(_local17, _local32, null, "Female1", false, false);
pSearchGridState = "PatienceGone";
};
};
};
};
break;
case "ItemFound1":
_local16 = pSearchGridArray[pSearchIconPos.y][pSearchIconPos.x]["Item"];
_local24 = 0;
while (_local24 < pStoryEntitiesXML.StoryEntity.length()) {
_local33 = pStoryEntitiesXML.StoryEntity[_local24];
_local34 = pStoryEntitiesXML.StoryEntity[_local24];
if (_local33.ID == _local16){
_local35 = _local33.Name;
_local35.toUpperCase();
};
_local24++;
};
AddToInventory(_local16);
switch (_local16){
case 504:
CheckingAchievements("ToCatchaPredator");
case 528:
case 529:
case 530:
case 531:
case 532:
case 533:
_local36 = GetEntityNameFromID(_local16);
InitalizeMessageStatusBox(("Acquired " + _local36), 2);
_local37 = (("I found a " + _local35) + "...");
break;
default:
_local36 = GetEntityNameFromID(_local16);
InitalizeMessageStatusBox(("Acquired " + _local36), 1);
_local37 = (("I found a " + _local35) + "!");
break;
};
_local17 = "Toby";
InitiateUIChatBubble(_local17, _local37, null, "Male1", true, false);
pSearchGridState = "ItemFound2";
break;
case "ItemFound2":
if (UIChatBubbleState == "1"){
pSearchIconPos = pSearchIconPosQueue;
delete pMouseActions["SEARCHGRIDBOX"];
pSearchGridState = "2";
};
break;
case "PatienceGone":
if (UIChatBubbleState == "1"){
pSearchIconPos = pSearchIconPosQueue;
delete pMouseActions["SEARCHGRIDBOX"];
pSearchGridState = "exit";
};
break;
case "exit":
CheckingAchievements("SearchProgress");
_local12 = MainObj.getChildByName("SearchGridGroup");
_local18 = _local12.getChildByName("SearchGridExit");
_local11 = _local12.getChildByName("search_icon");
_local19 = 0;
while (_local19 < pSearchGridArray.length) {
_local20 = pSearchGridArray[_local19];
_local21 = 0;
while (_local21 < _local20.length) {
_local4 = _local20[_local21]["MC"];
_local4.parent.removeChild(_local4);
_local4.removeEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
_local4.removeEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
_local21++;
};
_local19++;
};
_local18.parent.removeChild(_local18);
_local18.removeEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
_local18.removeEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
_local6 = MainObj.getChildByName("patienceHader");
_local6.parent.removeChild(_local6);
_local7 = false;
_local8 = ((pVeronicasPatience + 1) / 100);
_local9 = Math.floor(_local8);
_local10 = (_local8 - _local9);
if (_local10 >= 0.01){
_local7 = true;
_local9++;
};
_local24 = 0;
while (_local24 < _local9) {
_local4 = MainObj.getChildByName(("Vheart" + (_local24 + 1)));
if (_local4 != null){
_local4.parent.removeChild(_local4);
};
_local24++;
};
_local12.parent.removeChild(_local12);
pShowVeronicasPatience = true;
pLock_UserInput = false;
pSearchGridArray = null;
pVeronicasPatienceIncrease = true;
pOptionsMenuLocked = false;
pSearchGridState = "";
break;
};
}
function loading(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:int;
pLoaderInitialized = true;
_local2 = MainObj.stage.loaderInfo.bytesTotal;
_local3 = MainObj.stage.loaderInfo.bytesLoaded;
_local4 = (_local3 / _local2);
MainObj.loader_bar.width = (360 * _local4);
MainObj.loader_bar.alpha = 0.6;
_local5 = (getTimer() - pStartTime);
if (_local2 == _local3){
pFrontend_Status = "preTitleScreen-1";
MainObj.gotoAndStop("TitleScreen");
MainObj.removeEventListener(Event.ENTER_FRAME, loading);
};
}
public function Inventory(){
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:*;
var _local7:int;
var _local8:TextField;
var _local9:*;
var _local10:int;
var _local11:String;
var _local12:int;
switch (pInventoryState){
case "1":
MainObj.inventory.visible = true;
pInventoryState = "2";
break;
case "2":
_local1 = ((pInventoryPage * 7) - 6);
_local2 = (pInventoryPage * 7);
_local3 = 0;
_local4 = 0;
_local6 = 1;
while (_local6 <= 7) {
_local7 = _local6;
_local8 = MainObj.inventory.getChildByName(("slot_" + _local7));
_local8.text = "Empty Slot";
_local6++;
};
_local9 = 0;
while (_local9 < pInventoryList.length) {
_local3 = (_local9 + 1);
if ((((_local3 >= _local1)) && ((_local3 <= _local2)))){
_local4++;
_local10 = pInventoryList[_local9]["ID"];
_local11 = pInventoryList[_local9]["Name"];
_local8 = MainObj.inventory.getChildByName(("slot_" + _local4));
_local8.text = _local11;
};
_local9++;
};
if (pInventoryList.length > 7){
MainObj.inventory.more.visible = true;
pInventorySlotPointer = 8;
} else {
MainObj.inventory.more.visible = false;
pInventorySlotPointer = 1;
};
delete pMouseActions["INVENTORYSLOT"];
pInventoryState = "3";
break;
case "3":
pLock_UserInput = true;
MainObj.inventory.more.textColor = 0xFFFFFF;
MainObj.inventory.close.textColor = 0xFFFFFF;
_local6 = 1;
while (_local6 <= 7) {
_local7 = _local6;
_local8 = MainObj.inventory.getChildByName(("slot_" + _local7));
if (_local7 == pInventorySlotPointer){
_local8.textColor = 0xFF0000;
} else {
_local8.textColor = 0xFFFFFF;
};
_local6++;
};
switch (pInventorySlotPointer){
case 8:
MainObj.inventory.more.textColor = 0xFF0000;
break;
case 9:
MainObj.inventory.close.textColor = 0xFF0000;
break;
};
_local5 = (getTimer() - pInventoryDelay);
if (_local5 > 250){
if (arrowUp == true){
pInventorySlotPointer = (pInventorySlotPointer - 1);
if ((((pInventoryList.length <= 7)) && ((pInventorySlotPointer == 8)))){
pInventorySlotPointer = 7;
};
pInventoryDelay = getTimer();
};
if (arrowDown == true){
pInventorySlotPointer++;
if ((((pInventoryList.length <= 7)) && ((pInventorySlotPointer == 8)))){
pInventorySlotPointer = 9;
};
pInventoryDelay = getTimer();
};
if (pInventorySlotPointer == 0){
pInventorySlotPointer = 9;
};
if (pInventorySlotPointer == 10){
pInventorySlotPointer = 1;
};
if ((((((EnterKeydown == true)) || ((SpaceBar_Down == true)))) || (pMouseActions["INVENTORYSLOT"]))){
switch (pInventorySlotPointer){
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
_local1 = ((pInventoryPage * 7) - 6);
_local2 = (pInventoryPage * 7);
_local9 = 0;
while (_local9 < pInventoryList.length) {
_local3 = (_local9 + 1);
if ((((_local3 >= _local1)) && ((_local3 <= _local2)))){
_local4++;
_local10 = pInventoryList[_local9]["ID"];
_local11 = pInventoryList[_local9]["Name"];
if (_local4 == pInventorySlotPointer){
pInventoryItemID = _local10;
break;
};
};
_local9++;
};
pOptionsMenuState = "UseItem";
pInventoryState = "4";
break;
case 8:
pInventoryPage++;
_local12 = Math.ceil((pInventoryList.length / 7));
if (pInventoryPage > _local12){
pInventoryPage = 1;
};
pInventoryState = "2";
break;
case 9:
pOptionsMenuState = "5";
pInventoryState = "4";
break;
};
delete pMouseActions["INVENTORYSLOT"];
pInventoryDelay = getTimer();
};
};
break;
case "4":
MainObj.inventory.visible = false;
pLock_UserInput = false;
pInventoryState = "";
break;
};
}
public function LoadGenericNPCsFromSaveFile(){
var _local1:*;
var _local2:Array;
var _local3:Object;
var _local4:NPC;
_local1 = 0;
while (_local1 < pGenericNPCSaveList.length) {
_local2 = pGenericNPCSaveList[_local1];
_local3 = new Object();
_local3.id = _local2[0];
_local3.X = _local2[1];
_local3.Y = _local2[2];
_local3.Z = _local2[3];
_local3.spd = 10;
_local3.mode = "Idle";
_local3.type = "Generic";
_local3.subtype = _local2[4];
_local3.action = _local2[5];
_local3.room = _local2[6];
_local4 = new NPC(this, _local3);
_local1++;
};
}
public function EventSystem(){
var _local1:*;
var _local2:*;
var _local3:int;
var _local4:XML;
var _local5:String;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:Boolean;
var _local10:String;
var _local11:Boolean;
var _local12:*;
var _local13:String;
var _local14:Number;
var _local15:*;
var _local16:*;
var _local17:MovieClip;
var _local18:Object;
var _local19:String;
var _local20:String;
var _local21:int;
var _local22:int;
var _local23:String;
var _local24:Boolean;
var _local25:Number;
var _local26:int;
var _local27:*;
var _local28:String;
var _local29:String;
var _local30:Boolean;
var _local31:Number;
var _local32:*;
var _local33:String;
var _local34:PowPunchSnd;
var _local35:SoundChannel;
var _local36:*;
var _local37:NatureSoundsSnd;
var _local38:CameraClickSnd;
var _local39:NeedleScratchSnd;
var _local40:FlameOnSnd;
var _local41:FlameOffSnd;
var _local42:EatingSnd;
var _local43:LockOpenSnd;
var _local44:Fart1Snd;
var _local45:Fart2Snd;
var _local46:CleanTrashSnd;
var _local47:CleanDishesSnd;
var _local48:CleanDustingSnd;
var _local49:CleanSpraySnd;
var _local50:int;
var _local51:String;
var _local52:Number;
var _local53:*;
var _local54:Number;
var _local55:*;
var _local56:XML;
var _local57:Number;
var _local58:*;
var _local59:String;
var _local60:*;
var _local61:Array;
var _local62:Number;
var _local63:Number;
var _local64:Number;
var _local65:String;
var _local66:String;
var _local67:String;
var _local68:int;
var _local69:String;
var _local70:String;
var _local71:String;
var _local72:int;
var _local73:int;
var _local74:String;
var _local75:Boolean;
var _local76:int;
var _local77:String;
var _local78:int;
if (pEventActive == true){
switch (pEventPhaseAction){
case "Execute":
_local1 = 0;
while (_local1 < pStoryEventsXML.Event.length()) {
_local2 = pStoryEventsXML.Event[_local1];
_local3 = _local2.ID;
if (_local3 == pEventID){
if ((pEventPhasePointer + 1) <= _local2.Phase.length()){
_local4 = _local2.Phase[pEventPhasePointer];
if (_local4.Chat.length() > 0){
_local5 = _local4.Chat.Name;
_local6 = _local4.Chat.Text;
_local7 = _local4.Chat.VoiceType;
_local8 = _local4.Chat.AutoClose;
_local10 = _local4.Chat.UnlockOptionsMenu;
_local12 = null;
if (_local8 == "true"){
_local9 = true;
} else {
_local9 = false;
};
if (_local10 == "true"){
_local11 = true;
} else {
_local11 = false;
};
if (_local4.Chat.Highlight.length() > 0){
_local13 = _local4.Chat.Highlight;
switch (_local13){
case "Toby":
_local12 = new Point(pActiveCharacterClassRef.pCharacter_MC.x, pActiveCharacterClassRef.pCharacter_MC.y);
break;
case "Veronica":
_local12 = new Point(pRunningMateClassRef.pCharacter_MC.x, pRunningMateClassRef.pCharacter_MC.y);
break;
};
};
if (_local4.Chat.HighlightNPC.length() > 0){
_local14 = _local4.Chat.HighlightNPC;
_local15 = 0;
while (_local15 < pNPC_Registry_List.length) {
_local16 = pNPC_Registry_List[_local15];
if (_local16.pEntityID == _local14){
_local12 = new Point(_local16.pCharacter_MC.x, _local16.pCharacter_MC.y);
break;
};
_local15++;
};
switch (_local13){
case "Toby":
_local12 = new Point(pActiveCharacterClassRef.pCharacter_MC.x, pActiveCharacterClassRef.pCharacter_MC.y);
break;
case "Veronica":
_local12 = new Point(pRunningMateClassRef.pCharacter_MC.x, pRunningMateClassRef.pCharacter_MC.y);
break;
};
};
InitiateUIChatBubble(_local5, _local6, _local12, _local7, _local9, _local11);
};
if (_local4.MovieClip.length() > 0){
_local18 = {};
_local19 = _local4.MovieClip.Parent;
_local18["Parent"] = _local19;
_local20 = _local4.MovieClip.Name;
_local18["Name"] = _local20;
switch (_local19){
case "Main":
_local17 = MainObj.getChildByName(_local20);
break;
case "Gamemap":
_local17 = MainObj.gamemap.getChildByName(_local20);
break;
case "MasterBath":
_local17 = MainObj.gamemap.masterbath_bg.getChildByName(_local20);
break;
case "KitchenCollis":
_local17 = MainObj.kitchen_collis_map.getChildByName(_local20);
break;
};
if (_local4.MovieClip.PosX.length() > 0){
_local21 = _local4.MovieClip.PosX;
_local17.x = _local21;
_local18["Posx"] = _local21;
};
if (_local4.MovieClip.PosY.length() > 0){
_local22 = _local4.MovieClip.PosY;
_local17.y = _local22;
_local18["PosY"] = _local22;
};
if (_local4.MovieClip.Visible.length() > 0){
_local23 = _local4.MovieClip.Visible;
if (_local23 == "true"){
_local24 = true;
} else {
_local24 = false;
};
_local17.visible = _local24;
_local18["Visible"] = _local24;
};
if (_local4.MovieClip.Alpha.length() > 0){
_local25 = _local4.MovieClip.Alpha;
_local17.alpha = _local25;
_local18["Alpha"] = _local25;
};
if (_local4.MovieClip.GotoAndStop.length() > 0){
_local26 = _local4.MovieClip.GotoAndStop;
_local17.gotoAndStop(_local26);
_local18["the_frame"] = _local26;
};
if (_local4.MovieClip.GotoAndPlay.length() > 0){
_local26 = _local4.MovieClip.GotoAndPlay;
_local17.gotoAndPlay(_local26);
_local18["the_frame"] = _local26;
};
pMovieClipSaveList[_local20] = _local18;
};
if (_local4.MainCharacter.length() > 0){
_local20 = _local4.MainCharacter.Name;
switch (_local20){
case "Toby":
_local27 = pActiveCharacterClassRef;
break;
case "Veronica":
_local27 = pRunningMateClassRef;
break;
};
if (_local4.MainCharacter.PosX.length() > 0){
_local21 = _local4.MainCharacter.PosX;
_local27.pWorldX = _local21;
_local27.SetWorldPosition(_local27.pWorldX, _local27.pWorldY, _local27.pWorldZ);
};
if (_local4.MainCharacter.PosY.length() > 0){
_local22 = _local4.MainCharacter.PosY;
_local27.pWorldZ = _local22;
_local27.SetWorldPosition(_local27.pWorldX, _local27.pWorldY, _local27.pWorldZ);
};
if (_local4.MainCharacter.Action.length() > 0){
_local28 = _local4.MainCharacter.Action;
_local27.pAction = _local28;
_local27.Animate();
};
if (_local4.MainCharacter.Visible.length() > 0){
_local24 = Boolean(Number(_local4.MainCharacter.Visible));
_local27.pCharacter_MC.visible = _local24;
};
if (_local4.MainCharacter.Lock.length() > 0){
_local29 = _local4.MainCharacter.Lock;
if (_local29 == "1"){
_local30 = true;
} else {
_local30 = false;
};
switch (_local20){
case "Toby":
pLock_UserInput = _local30;
break;
case "Veronica":
_local27.pLock = _local30;
_local27.pMode = "Wait";
if (_local30 == false){
_local27.pMode = "Follow";
};
break;
};
};
};
if (_local4.PunchNPC.length() > 0){
_local31 = _local4.PunchNPC;
_local15 = 0;
while (_local15 < pNPC_Registry_List.length) {
_local16 = pNPC_Registry_List[_local15];
if ((((_local16.pEntityID == _local31)) && ((_local16.pRoom == pActiveLevel)))){
_local16.Punched();
break;
};
_local15++;
};
};
if (_local4.PunchVeronica.length() > 0){
pRunningMateClassRef.Punched();
};
if (_local4.PlaySound.length() > 0){
_local32 = 0;
while (_local32 < _local4.PlaySound.length()) {
_local33 = _local4.PlaySound[_local32];
switch (_local33){
case "PowPunch":
_local34 = new PowPunchSnd();
_local35 = _local34.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 0.5;
_local35.soundTransform = _local36;
break;
case "NatureSounds":
pSoundChannel1.stop();
_local37 = new NatureSoundsSnd();
_local35 = _local37.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "CameraClick":
_local38 = new CameraClickSnd();
_local35 = _local38.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "EndingMusic":
pSoundChannel1.stop();
pSoundChannel1 = EndingMusicSnd_Snd.play(0, int.MAX_VALUE);
_local36 = new SoundTransform();
_local36.volume = 1;
pSoundChannel1.soundTransform = _local36;
break;
case "NeedleScratch":
pSoundChannel1.stop();
_local39 = new NeedleScratchSnd();
pSoundChannel1 = _local39.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
pSoundChannel1.soundTransform = _local36;
break;
case "ChaseMusic":
pSoundChannel1 = ChaseMusicSnd_Snd.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
pSoundChannel1.soundTransform = _local36;
break;
case "StopBGMusic":
pSoundChannel1.stop();
break;
case "PlayBGMusic":
break;
case "FlameOn":
_local40 = new FlameOnSnd();
_local35 = _local40.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "FlameOff":
_local41 = new FlameOffSnd();
_local35 = _local41.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "Eating":
_local42 = new EatingSnd();
_local35 = _local42.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "LockOpen":
_local43 = new LockOpenSnd();
_local35 = _local43.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "Fart1":
_local44 = new Fart1Snd();
_local35 = _local44.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "Fart2":
_local45 = new Fart2Snd();
_local35 = _local45.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "CleanTrash":
_local46 = new CleanTrashSnd();
_local35 = _local46.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "CleanDishes":
_local47 = new CleanDishesSnd();
_local35 = _local47.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "CleanDusting":
_local48 = new CleanDustingSnd();
_local35 = _local48.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
case "CleanSpray":
_local49 = new CleanSpraySnd();
_local35 = _local49.play(0, 0);
_local36 = new SoundTransform();
_local36.volume = 1;
_local35.soundTransform = _local36;
break;
};
_local32++;
};
};
if (_local4.ChangeEntityState.length() > 0){
_local50 = _local4.ChangeEntityState.EntityID;
_local51 = _local4.ChangeEntityState.ChangeStateTo;
_local52 = new Number(_local51);
pEntity_RegistryList[("eid" + _local50)]["CurrentState"] = _local51;
_local32 = 0;
while (_local32 < pStoryEntitiesXML.StoryEntity.length()) {
_local53 = pStoryEntitiesXML.StoryEntity[_local32];
_local54 = new Number(_local53.ID);
if (_local54 == _local50){
_local55 = 0;
while (_local55 < _local53.State.length()) {
_local56 = new XML(_local53.State[_local55]);
_local57 = new Number(_local56.StateID);
if (_local57 == _local52){
_local58 = _local56.Room;
_local59 = _local56.Position;
_local60 = _local56.NPCAnimation;
_local61 = _local59.split(",");
_local62 = _local61[0];
_local63 = _local61[1];
_local64 = _local61[2];
_local15 = 0;
while (_local15 < pNPC_Registry_List.length) {
_local16 = pNPC_Registry_List[_local15];
if (_local16.pEntityID == _local50){
_local16.pRoom = _local58;
_local16.pAction = _local60;
_local16.SetWorldPosition(_local62, _local63, _local64);
_local16.NPCAnimate();
break;
};
_local15++;
};
};
_local55++;
};
};
_local32++;
};
};
if (_local4.GotoNewRoom.length() > 0){
MainObj.object_highlighter.visible = false;
_local65 = _local4.GotoNewRoom.NextRoom;
pNextLevel = _local65;
_local66 = _local4.GotoNewRoom.TeleportPos;
pActiveTeleportPos = _local66.split(",");
_local67 = _local4.GotoNewRoom.Action;
pActiveTeleportAction = _local67;
pFrontend_Status = "FadeOut";
gGame_Status = "Frontend";
};
if (_local4.AddInventoryItem.length() > 0){
_local68 = _local4.AddInventoryItem;
AddToInventory(_local68);
_local69 = GetEntityNameFromID(_local68);
InitalizeMessageStatusBox(("Acquired " + _local69), 1);
};
if (_local4.CustomCode.length() > 0){
_local70 = _local4.CustomCode;
switch (_local70){
case "PlayBlockHeadsRetro":
MochiEvents.trackEvent("Played BlockHeads Retro.");
pFrontend_Status = "FadeOutToMiniGame";
gGame_Status = "Frontend";
break;
case "EndGame":
MochiEvents.trackEvent("Beat the Game.");
pFrontend_Status = "FadeOutToCredits";
gGame_Status = "Frontend";
break;
};
};
if (_local4.CheckAchievement.length() > 0){
_local71 = _local4.CheckAchievement;
switch (_local71){
case "ItsGameTime":
CheckingAchievements("ItsGameTime");
break;
case "TopGun":
CheckingAchievements("TopGun");
break;
case "NoRighttoPrivacy":
CheckingAchievements("NoRighttoPrivacy");
break;
case "KitchenNightmares":
CheckingAchievements("KitchenNightmares");
break;
case "FinalFrontier":
CheckingAchievements("FinalFrontier");
break;
case "NerveofaPerv":
CheckingAchievements("NerveofaPerv");
break;
case "ToCatchaPredator":
CheckingAchievements("ToCatchaPredator");
break;
case "BurgerDebtRepaid":
CheckingAchievements("BurgerDebtRepaid");
break;
case "PartysOver":
CheckingAchievements("PartysOver");
break;
case "LadiesMan":
CheckingAchievements("LadiesMan");
break;
};
};
if (_local4.SolvedPuzzle.length() > 0){
_local72 = _local4.SolvedPuzzle;
_local32 = 0;
while (_local32 < pVeronicasHelpPuzzleList.length) {
_local73 = pVeronicasHelpPuzzleList[_local32];
if (_local72 == _local73){
switch (_local72){
case 1:
MochiEvents.trackEvent("Completed Puzzle #1 Zack on Laptop.");
break;
case 2:
MochiEvents.trackEvent("Completed Puzzle #2 Phil and Janice.");
break;
case 3:
MochiEvents.trackEvent("Completed Puzzle #3 Edwierd ");
break;
case 4:
MochiEvents.trackEvent("Completed Puzzle #4 Help Stacy");
break;
case 5:
MochiEvents.trackEvent("Completed Puzzle #5 (Help Shaggy)");
break;
case 6:
MochiEvents.trackEvent("Completed Puzzle #6 (Pool Table guys)");
break;
case 7:
MochiEvents.trackEvent("Completed Puzzle #7 (BlockHeads Retro)");
break;
case 8:
MochiEvents.trackEvent("Completed Puzzle #8 (Using Camera)");
break;
case 9:
MochiEvents.trackEvent("Completed Puzzle #9 (Burger Despot)");
break;
case 10:
MochiEvents.trackEvent("Completed Puzzle #10 (Cindy)");
break;
case 11:
MochiEvents.trackEvent("Completed Puzzle #11 (Toilet Paper)");
break;
};
pVeronicasHelpPointer = 0;
pVeronicasHelpPuzzleList.splice(_local32, 1);
break;
};
_local32++;
};
};
if (_local4.MaxPatience.length() > 0){
pVeronicasPatience = pVeronicasPatienceMax;
};
if (_local4.PatienceMeterOn.length() > 0){
_local74 = _local4.PatienceMeterOn;
if (_local74 == "true"){
_local75 = true;
} else {
_local75 = false;
};
pPatienceMeterOn = _local75;
};
if (_local4.UGMMeterOn.length() > 0){
_local74 = _local4.UGMMeterOn;
if (_local74 == "true"){
_local75 = true;
} else {
_local75 = false;
};
pUGMMeterOn = _local75;
};
if (_local4.ACMMeterOn.length() > 0){
_local74 = _local4.ACMMeterOn;
if (_local74 == "true"){
_local75 = true;
} else {
_local75 = false;
};
pACMMeterOn = _local75;
};
if (_local4.RemoveInventoryItem.length() > 0){
_local68 = _local4.RemoveInventoryItem;
RemoveToInventory(_local68);
};
if (_local4.ShowApartmentMeter.length() > 0){
ShowApartmentMeter();
};
if (_local4.AdjustApartmentMeter.length() > 0){
_local76 = _local4.AdjustApartmentMeter;
AdjustApartmentMeter(_local76);
};
if (_local4.GotoNextPhaseAfterChat.length() > 0){
pGotoNextPhaseAfterChat = true;
};
if (_local4.LockMovement.length() > 0){
pLock_UserInput = true;
};
if (_local4.LockOptionsMenu.length() > 0){
pOptionsMenuLocked = true;
};
if (_local4.UnlockOptionsMenu.length() > 0){
pEventSystemUnlockOptionsMenu = true;
};
if (_local4.SleepToNextPhase.length() > 0){
pPhaseSleepTime = _local4.SleepToNextPhase;
pSleepToNextPhase = true;
};
if (_local4.SaveGame.length() > 0){
_local77 = _local4.SaveGame;
CreateGameSave();
};
pEventPhaseDelay = getTimer();
pEventPhaseAction = "Wait";
} else {
if (pEventSystemUnlockOptionsMenu == true){
pOptionsMenuLocked = false;
pEventSystemUnlockOptionsMenu = false;
};
pLock_UserInput = false;
pGotoNextPhaseAfterChat = false;
pEventActive = false;
pEventPhaseAction = "";
};
};
_local1++;
};
break;
case "Wait":
if (pGotoNextPhaseAfterChat == true){
if (UIChatBubbleState == "1"){
pGotoNextPhaseAfterChat = false;
pEventPhasePointer++;
pEventPhaseAction = "Execute";
};
};
if (pSleepToNextPhase == true){
_local78 = (getTimer() - pEventPhaseDelay);
if (_local78 > pPhaseSleepTime){
pSleepToNextPhase = false;
pPhaseSleepTime = null;
pEventPhasePointer++;
pEventPhaseAction = "Execute";
};
};
break;
};
};
}
public function LoadGameAchievements(){
var _local1:SharedObject;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = SharedObject.getLocal("UninvitedGuestsAchievements");
if (_local1.size > 0){
pAchievementObjList = _local1.data.pAchievementObjList;
for (_local2 in _local1.data) {
_local3 = _local1.data[_local2];
for (_local4 in _local3) {
};
};
//unresolved jump
};
}
function DistanceTo(_arg1:Array, _arg2:Array){
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
_local3 = _arg1[0];
_local4 = _arg1[1];
_local5 = _arg1[2];
_local6 = _arg2[0];
_local7 = _arg2[1];
_local8 = _arg2[2];
_local9 = (_local3 - _local6);
_local10 = (_local4 - _local7);
_local11 = (_local5 - _local8);
_local12 = Math.sqrt((((_local9 * _local9) + (_local10 * _local10)) + (_local11 * _local11)));
return (_local12);
}
function Translate_Increment(_arg1:Number, _arg2:Number, _arg3:Number):Number{
var _local4:Number;
var _local5:Number;
_local4 = (_arg1 * _arg3);
_local5 = ((_local4 / 1000) * MainObj.gTimeinterval);
if (_local5 > _arg2){
_local5 = _arg2;
};
if (_local5 < -(_arg2)){
_local5 = -(_arg2);
};
return (_local5);
}
public function CreateGenericNPCSaveList(){
var _local1:Array;
var _local2:*;
var _local3:*;
var _local4:Array;
_local1 = [];
_local2 = 0;
while (_local2 < pNPC_Registry_List.length) {
_local3 = pNPC_Registry_List[_local2];
if (_local3.pNPCType == "Generic"){
_local4 = [_local3.pEntityID, _local3.pWorldX, _local3.pWorldY, _local3.pWorldZ, _local3.pNPCSubtype, _local3.pAction, _local3.pRoom];
_local1.push(_local4);
};
_local2++;
};
return (_local1);
}
function GetEventsXML(){
var _local1:StoryEventsXML;
_local1 = new StoryEventsXML();
pStoryEventsXML = _local1.TheStoryEventsXML();
pRetrievedStoryEventsXML = true;
}
public function CreateGameSave(){
var _local1:SharedObject;
_local1 = SharedObject.getLocal("UninvitedGuestsSave");
_local1.data.pMiniGameTopScore = pMiniGameTopScore;
_local1.data.pMiniGameNPCScoreBeaten = pMiniGameNPCScoreBeaten;
_local1.data.pTutorialValueList = pTutorialValueList;
_local1.data.pVeronicasHelpActivePuzzle = pVeronicasHelpActivePuzzle;
_local1.data.pVeronicasHelpPointer = pVeronicasHelpPointer;
_local1.data.pVeronicasHelpState = pVeronicasHelpState;
_local1.data.pVeronicasHelpPuzzleList = pVeronicasHelpPuzzleList;
_local1.data.pInventoryList = pInventoryList;
_local1.data.pApartmentCleanCount = pApartmentCleanCount;
_local1.data.pVeronicasPatience = pVeronicasPatience;
_local1.data.pVeronicasPatienceMax = pVeronicasPatienceMax;
_local1.data.pNextLevel = pNextLevel;
_local1.data.pLastLevel = pLastLevel;
_local1.data.pLastLevelList = pLastLevelList;
_local1.data.pRoomTextList = pRoomTextList;
_local1.data.pActiveLevel = pActiveLevel;
_local1.data.pEntity_RegistryList = pEntity_RegistryList;
_local1.data.pRoomObject_RegistryList = pRoomObject_RegistryList;
_local1.data.pMovieClipSaveList = pMovieClipSaveList;
_local1.data.pUninvitedGuestsCount = pUninvitedGuestsCount;
_local1.data.pAchievementObjValues = pAchievementObjValues;
pGenericNPCSaveList = CreateGenericNPCSaveList();
_local1.data.pGenericNPCSaveList = pGenericNPCSaveList;
_local1.flush();
ShowProgressSavedText();
}
public function AdjustUninvitedGuestsMeter(_arg1:int){
pUninvitedGuestsCount = (pUninvitedGuestsCount + _arg1);
MainObj.uninvited_guests_header.text.text = (pUninvitedGuestsCount + "");
}
public function ClearGameSave(){
var _local1:SharedObject;
_local1 = SharedObject.getLocal("UninvitedGuestsSave");
_local1.clear();
}
public function RemoveToInventory(_arg1:int){
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < pInventoryList.length) {
_local3 = pInventoryList[_local2];
if (_local3["ID"] == _arg1){
pInventoryList.splice(_local2, 1);
break;
};
_local2++;
};
}
public function AddToInventory(_arg1:int){
var _local2:Object;
var _local3:*;
var _local4:*;
_local2 = {};
_local2["ID"] = _arg1;
_local3 = 0;
while (_local3 < pStoryEntitiesXML.StoryEntity.length()) {
_local4 = pStoryEntitiesXML.StoryEntity[_local3];
if (_local4.ID == _arg1){
_local2["Name"] = String(_local4.Name);
break;
};
_local3++;
};
pInventoryList.push(_local2);
}
public function pointAt(_arg1:Object, _arg2:Object){
var _local3:*;
var _local4:*;
var _local5:Number;
var _local6:*;
_local3 = (_arg2.x - _arg1.x);
_local4 = (_arg2.y - _arg1.y);
_local6 = ((Math.atan2(_local4, _local3) * 180) / Math.PI);
_arg1.rotation = _local6;
}
public function InitializeRoomObjects(){
var _local1:Array;
var _local2:*;
var _local3:Boolean;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:XML;
var _local8:Number;
var _local9:String;
var _local10:int;
var _local11:int;
var _local12:Array;
var _local13:Array;
var _local14:*;
_local1 = ["Kitchen", "HalfBath", "GameRoom", "HallwayRoom2", "MasterBath", "MasterBedroom", "GuestRoom3", "GuestRoom2", "GuestRoom1", "HallwayRoom1", "Room1", "Hallway"];
_local2 = 0;
while (_local2 < _local1.length) {
pRoomObject_RegistryList[_local1[_local2]] = {};
_local2++;
};
_local3 = true;
_local2 = 0;
while (_local2 < pStoryEntitiesXML.StoryEntity.length()) {
_local4 = pStoryEntitiesXML.StoryEntity[_local2];
_local5 = pStoryEntitiesXML.StoryEntity[_local2];
if (_local4.Type == "StaticObject"){
pEntity_RegistryList[("eid" + _local4.ID)] = {};
pEntity_RegistryList[("eid" + _local4.ID)]["CurrentState"] = "1";
pEntity_RegistryList[("eid" + _local4.ID)]["Type"] = String(_local4.Type);
pEntity_RegistryList[("eid" + _local4.ID)]["ID"] = Number(_local4.ID);
pEntity_RegistryList[("eid" + _local4.ID)]["Index"] = _local2;
_local3 = true;
_local6 = 0;
while (_local6 < _local5.State.length()) {
_local7 = new XML(_local5.State[_local6]);
_local8 = new Number(_local7.StateID);
_local9 = _local7.Room;
if (pRoomObject_RegistryList[_local9] == undefined){
pRoomObject_RegistryList[_local9] = {};
};
if (pRoomObject_RegistryList[_local9][("eid" + _local4.ID)] == undefined){
pRoomObject_RegistryList[_local9][("eid" + _local4.ID)] = {};
};
pRoomObject_RegistryList[_local9][("eid" + _local4.ID)]["MovieClipName"] = String(_local7.MovieClipName);
pRoomObject_RegistryList[_local9][("eid" + _local4.ID)]["EntityID"] = Number(_local4.ID);
if (_local7.Actions.SEARCH.length() > 0){
_local10 = _local7.Actions.SEARCH.ARRAYROW;
_local11 = _local7.Actions.SEARCH.ARRAYCOL;
if (_local3 == true){
if (pAchievementObjValues["SearchSpaceCount"] == undefined){
pAchievementObjValues["SearchSpaceCount"] = 0;
};
pAchievementObjValues["SearchSpaceCount"] = (pAchievementObjValues["SearchSpaceCount"] + (_local10 * _local11));
_local3 = false;
};
_local12 = [];
if (_local7.Actions.SEARCH.ARRAYITEM.length() > 0){
_local14 = 0;
while (_local14 < _local7.Actions.SEARCH.ARRAYITEM.length()) {
_local12.push(_local7.Actions.SEARCH.ARRAYITEM[_local14]);
_local14++;
};
};
_local13 = GenerateSearchArray(_local10, _local11, _local12);
pRoomObject_RegistryList[_local9][("eid" + _local4.ID)]["SearchArray"] = _local13;
};
_local6++;
};
};
_local2++;
};
}
public function ConvertStagePositionToWorldPosition(_arg1:Number, _arg2:Number){
var _local3:MovieClip;
var _local4:Point;
var _local5:Point;
_local3 = new MovieClip();
MainObj.gamemap.addChild(_local3);
_local4 = new Point(_arg1, _arg2);
_local5 = gamemap.globalToLocal(_local4);
return (_local5);
}
public function LoadMovieClipSaveList(){
var _local1:*;
var _local2:*;
var _local3:MovieClip;
var _local4:String;
var _local5:String;
var _local6:int;
var _local7:int;
var _local8:String;
var _local9:Boolean;
var _local10:Number;
var _local11:int;
for (_local1 in pMovieClipSaveList) {
_local2 = pMovieClipSaveList[_local1];
_local4 = _local2["Parent"];
_local5 = _local2["Name"];
switch (_local4){
case "Main":
_local3 = MainObj.getChildByName(_local5);
break;
case "Gamemap":
_local3 = MainObj.gamemap.getChildByName(_local5);
break;
case "MasterBath":
_local3 = MainObj.gamemap.masterbath_bg.getChildByName(_local5);
break;
case "KitchenCollis":
_local3 = MainObj.kitchen_collis_map.getChildByName(_local5);
break;
};
if (_local2["Posx"] != undefined){
_local6 = _local2["Posx"];
_local3.x = _local6;
};
if (_local2["PosY"] != undefined){
_local7 = _local2["PosY"];
_local3.y = _local7;
};
if (_local2["Visible"] != undefined){
_local8 = _local2["Visible"];
if (_local8 == "true"){
_local9 = true;
} else {
_local9 = false;
};
_local3.visible = _local9;
};
if (_local2["Alpha"] != undefined){
_local10 = _local2["Alpha"];
_local3.alpha = _local10;
};
if (_local2["the_frame"] != undefined){
_local11 = _local2["the_frame"];
_local3.gotoAndStop(_local11);
};
};
}
public function Frontend(){
var _local1:*;
var _local2:SharedObject;
var _local3:Object;
var _local4:ClientCharacter;
var _local5:RunningMate;
var _local6:*;
var _local7:Number;
var _local8:Number;
var _local9:Boolean;
var _local10:BlockHeadsRetroClass;
var _local11:*;
var _local12:*;
var _local13:String;
switch (pFrontend_Status){
case "preTitleScreen-1":
MainObj.stage.focus = MainObj.stage;
pStartTime = getTimer();
pFrontend_Status = "preTitleScreen-1-1";
break;
case "preTitleScreen-1-1":
pSoundChannel1 = TitleScreenMusicSnd_Snd.play(0, int.MAX_VALUE);
_local1 = new SoundTransform();
_local1.volume = 0.5;
pSoundChannel1.soundTransform = _local1;
pFrontend_Status = "preTitleScreen-1-2";
break;
case "preTitleScreen-1-2":
MainObj.newgame_button.visible = false;
MainObj.continue_button.visible = false;
MainObj.achievement_button.visible = false;
MainObj.achievement_list.visible = false;
pFrontend_Status = "preTitleScreen-1-3";
break;
case "preTitleScreen-1-3":
MainObj.play_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.free_mmo_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.newgame_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.continue_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.achievement_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.achievement_list.achievement_back_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.achievement_list.clear_achievements.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
_local2 = SharedObject.getLocal("UninvitedGuestsSave");
if (_local2.size > 0){
MainObj.continue_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.clear_save_data.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
pGameSavePresent = true;
};
LoadGameAchievements();
pFrontend_Status = "preTitleScreen-1-4";
break;
case "preBoardSetup-1":
MainObj.gotoAndStop("gameboard");
pFrontend_Status = "preBoardSetup-2";
break;
case "preBoardSetup-2":
MainObj.arcadebhr.visible = false;
MainObj.EndingCredits.visible = false;
MainObj.sociotown_ending_logo.visible = false;
MainObj.sociotown_ending_logo.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.message_status_box.visible = false;
MainObj.achievement_icon.visible = false;
MainObj.progress_saved.visible = false;
MainObj.uninvited_guests_header.visible = false;
MainObj.apartment_header.visible = false;
MainObj.gamemap.hallway_bg.visible = false;
MainObj.gamemap.room1_bg.visible = false;
MainObj.gamemap.hallwayroom1_bg.visible = false;
MainObj.gamemap.hallwayroom2_bg.visible = false;
MainObj.gamemap.guestroom1_bg.visible = false;
MainObj.gamemap.guestroom2_bg.visible = false;
MainObj.gamemap.guestroom3_bg.visible = false;
MainObj.gamemap.masterbedroom_bg.visible = false;
MainObj.gamemap.masterbath_bg.visible = false;
MainObj.gamemap.gameroom_bg.visible = false;
MainObj.gamemap.halfbath_bg.visible = false;
MainObj.gamemap.kitchen_bg.visible = false;
switch (pActiveLevel){
case "Hallway":
MainObj.gamemap.hallway_bg.visible = true;
pActiveCollisionMap = MainObj.hallway_collis_map;
MainObj.gamemap.setChildIndex(MainObj.gamemap.hallway_bg, 0);
pActiveTeleportList = [MainObj.gamemap.hallway_teleport01];
break;
case "Room1":
MainObj.gamemap.room1_bg.visible = true;
pActiveCollisionMap = MainObj.room1_collis_map;
MainObj.gamemap.setChildIndex(MainObj.gamemap.hallway_bg, 0);
pActiveTeleportPos = [521, 0, 582];
pActiveTeleportList = [MainObj.gamemap.room1_teleport01, MainObj.gamemap.room1_teleport02, MainObj.gamemap.room1_teleport03, MainObj.gamemap.room1_teleport04];
pActiveTeleportAction = "sb";
break;
};
MainObj.ui_chat_bubble.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.ui_chat_bubble.ui_chat_bubble_text.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.ui_chat_bubble.ui_chat_skip_text.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.hint_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.hint_button.useHandCursor = true;
MainObj.hint_button.visible = false;
MainObj.hint_button.buttonMode = true;
MainObj.hint_button.gotoAndStop(1);
MainObj.sociotown_logo.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
pDisplay_Registry_List = [];
pCharacter_Registry_List = [];
pNPC_Registry_List = [];
pClient_Registry_List = {};
GetStoryEntitiesXML();
GetEventsXML();
MainObj.inventory.visible = false;
MainObj.options_menu_bg.visible = false;
MainObj.options_menu_bg.y = 490;
pOptionsMenuState = "1";
InitOptionsMenuButtons();
InitInventoryButtons();
MochiEvents.startPlay();
pStartTime = getTimer();
pFrontend_Status = "preBoardSetup-3a";
break;
case "preBoardSetup-3a":
if ((((pRetrievedStoryEntitiesXML == true)) && ((pRetrievedStoryEventsXML == true)))){
pFrontend_Status = "preBoardSetup-3";
};
break;
case "preBoardSetup-3":
_local3 = new Object();
_local3.X = 280;
_local3.Y = 0;
_local3.Z = 375;
_local3.spd = 10;
_local3.action = "sf";
_local3.mode = "stand";
_local3.theme = "Toby";
_local3.type = "Human";
_local4 = new ClientCharacter(this, _local3);
_local4.pLifeTime = getTimer();
pActiveCharacterClassRef = _local4;
_local3 = new Object();
_local3.X = 280;
_local3.Y = 0;
_local3.Z = 325;
_local3.spd = 10;
_local3.action = "sf";
_local3.mode = "Follow";
_local3.type = "Veronica";
_local5 = new RunningMate(this, _local3);
pRunningMateClassRef = _local5;
if (pContinueGame == true){
pUGMMeterOn = true;
pPatienceMeterOn = true;
pACMMeterOn = true;
MainObj.veronica_heart1.visible = false;
MainObj.veronica_heart2.visible = false;
MainObj.veronica_heart3.visible = false;
MainObj.veronica_heart4.visible = false;
MainObj.veronica_heart5.visible = false;
MainObj.veronica_heart6.visible = false;
MainObj.uninvited_guests_header.text.text = (pUninvitedGuestsCount + "");
MainObj.apartment_header.text.text = (Math.floor((100 * (pApartmentCleanCount / 47))) + "% Clean");
pActiveCharacterClassRef.pAction = "sb";
pActiveCharacterClassRef.SetWorldPosition(pActiveTeleportPos[0], pActiveTeleportPos[1], pActiveTeleportPos[2]);
pActiveCharacterClassRef.centerMap();
pActiveCharacterClassRef.SetRearPosition();
pActiveCharacterClassRef.Animate();
pRunningMateClassRef.pWaypoints_List = [];
pRunningMateClassRef.pAction = "sb";
pRunningMateClassRef.SetWorldPosition(pActiveCharacterClassRef.pRearPos.x, pActiveTeleportPos[1], pActiveCharacterClassRef.pRearPos.y);
pRunningMateClassRef.Animate();
LoadPuzzleNPCsFromSaveFile();
LoadGenericNPCsFromSaveFile();
LoadMovieClipSaveList();
pFrontend_Status = "ChangeRoom1";
} else {
CreateInitialNPCs();
InitializeRoomObjects();
InitiateEvent(100100);
pFrontend_Status = "preBoardSetup-5";
};
break;
case "preBoardSetup-4":
pFrontend_Status = "preBoardSetup-5";
break;
case "preBoardSetup-5":
MainObj.veronica_patience_header.visible = false;
MainObj.veronica_heart1.visible = false;
MainObj.veronica_heart2.visible = false;
MainObj.veronica_heart3.visible = false;
MainObj.veronica_heart4.visible = false;
MainObj.veronica_heart5.visible = false;
MainObj.veronica_heart6.visible = false;
gamemap = MainObj.gamemap;
sortDisplayList();
pFrontend_Status = "FadeInRoom";
MainObj.stage.focus = MainObj.stage;
break;
case "FadeInRoom":
_local6 = MainObj.black_screen;
_local6.x = 0;
_local7 = _local6.alpha;
_local7 = (_local7 - Translate_Increment(0.05, 50, 30));
if (_local7 < 0){
_local7 = 0;
};
_local6.alpha = _local7;
if (_local7 == 0){
_local6.x = 800;
pFrontend_Status = "GameMap";
gGame_Status = "GameMap";
};
break;
case "FadeOut":
_local1 = pSoundChannel1.soundTransform;
_local8 = _local1.volume;
_local8 = (_local8 - Translate_Increment(0.025, 50, 30));
if (_local8 <= 0){
_local8 = 0;
};
_local1.volume = _local8;
pSoundChannel1.soundTransform = _local1;
_local6 = MainObj.black_screen;
_local7 = _local6.alpha;
_local6.x = 0;
_local7 = (_local7 + Translate_Increment(0.05, 50, 30));
if (_local7 > 1){
_local7 = 1;
};
_local6.alpha = _local7;
if (_local7 == 1){
pSoundChannel1.stop();
pFrontend_Status = "ChangeRoom";
};
break;
case "ChangeRoom":
pActiveLevel = pNextLevel;
_local11 = 0;
while (_local11 < MainObj.gamemap.numChildren) {
_local12 = MainObj.gamemap.getChildAt(_local11);
_local11++;
};
pFrontend_Status = "ChangeRoom1";
break;
case "ChangeRoom1":
pSoundChannel1.stop();
gamemap = MainObj.gamemap;
MainObj.gamemap.hallway_bg.visible = false;
MainObj.gamemap.room1_bg.visible = false;
MainObj.gamemap.hallwayroom1_bg.visible = false;
MainObj.gamemap.hallwayroom2_bg.visible = false;
MainObj.gamemap.guestroom1_bg.visible = false;
MainObj.gamemap.guestroom2_bg.visible = false;
MainObj.gamemap.guestroom3_bg.visible = false;
MainObj.gamemap.masterbedroom_bg.visible = false;
MainObj.gamemap.masterbath_bg.visible = false;
MainObj.gamemap.gameroom_bg.visible = false;
MainObj.gamemap.halfbath_bg.visible = false;
MainObj.gamemap.kitchen_bg.visible = false;
switch (pActiveLevel){
case "Hallway":
MainObj.gamemap.hallway_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.hallway_bg, 0);
pActiveCollisionMap = MainObj.hallway_collis_map;
pActiveTeleportList = [MainObj.gamemap.hallway_teleport01];
pSoundChannel1 = TitleScreenMusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "Room1":
MainObj.gamemap.room1_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.room1_bg, 0);
pActiveCollisionMap = MainObj.room1_collis_map;
pActiveTeleportList = [MainObj.gamemap.room1_teleport01, MainObj.gamemap.room1_teleport02, MainObj.gamemap.room1_teleport03, MainObj.gamemap.room1_teleport04];
pSoundChannel1 = RoomTheme1MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "HallwayRoom1":
MainObj.gamemap.hallwayroom1_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.hallwayroom1_bg, 0);
pActiveCollisionMap = MainObj.hallwayroom1_collis_map;
pActiveTeleportList = [MainObj.gamemap.hallwayroom1_teleport01, MainObj.gamemap.hallwayroom1_teleport02, MainObj.gamemap.hallwayroom1_teleport03, MainObj.gamemap.hallwayroom1_teleport04];
pSoundChannel1 = RoomTheme4MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "GuestRoom1":
MainObj.gamemap.guestroom1_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.guestroom1_bg, 0);
pActiveCollisionMap = MainObj.guestroom1_collis_map;
pActiveTeleportList = [MainObj.gamemap.guestroom1_teleport01];
pSoundChannel1 = RoomTheme2MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "GuestRoom2":
MainObj.gamemap.guestroom2_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.guestroom2_bg, 0);
pActiveCollisionMap = MainObj.guestroom2_collis_map;
pActiveTeleportList = [MainObj.gamemap.guestroom2_teleport01];
pSoundChannel1 = RoomTheme2MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "GuestRoom3":
MainObj.gamemap.guestroom3_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.guestroom3_bg, 0);
pActiveCollisionMap = MainObj.guestroom3_collis_map;
pActiveTeleportList = [MainObj.gamemap.guestroom3_teleport01];
pSoundChannel1 = RoomTheme2MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "MasterBedroom":
MainObj.gamemap.masterbedroom_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.masterbedroom_bg, 0);
pActiveCollisionMap = MainObj.masterbedroom_collis_map;
pActiveTeleportList = [MainObj.gamemap.masterbedroom_teleport01, MainObj.gamemap.masterbedroom_teleport02];
pSoundChannel1 = RoomTheme2MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "MasterBath":
MainObj.gamemap.masterbath_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.masterbath_bg, 0);
pActiveCollisionMap = MainObj.masterbath_collis_map;
pActiveTeleportList = [MainObj.gamemap.masterbath_teleport01];
pSoundChannel1 = RoomTheme3MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "HallwayRoom2":
MainObj.gamemap.hallwayroom2_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.hallwayroom2_bg, 0);
pActiveCollisionMap = MainObj.hallwayroom2_collis_map;
pActiveTeleportList = [MainObj.gamemap.hallwayroom2_teleport01, MainObj.gamemap.hallwayroom2_teleport02, MainObj.gamemap.hallwayroom2_teleport03, MainObj.gamemap.hallwayroom2_teleport04];
pSoundChannel1 = RoomTheme4MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "GameRoom":
MainObj.gamemap.gameroom_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.gameroom_bg, 0);
pActiveCollisionMap = MainObj.gameroom_collis_map;
pActiveTeleportList = [MainObj.gamemap.gameroom_teleport01];
pSoundChannel1 = RoomTheme3MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "HalfBath":
MainObj.gamemap.halfbath_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.halfbath_bg, 0);
pActiveCollisionMap = MainObj.halfbath_collis_map;
pActiveTeleportList = [MainObj.gamemap.halfbath_teleport01];
pSoundChannel1 = RoomTheme3MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
case "Kitchen":
MainObj.gamemap.kitchen_bg.visible = true;
gamemap.setChildIndex(MainObj.gamemap.kitchen_bg, 0);
pActiveCollisionMap = MainObj.kitchen_collis_map;
pActiveTeleportList = [MainObj.gamemap.kitchen_teleport01];
pSoundChannel1 = RoomTheme3MusicSnd_Snd.play(0, int.MAX_VALUE);
break;
};
MainObj.hint_button.visible = true;
_local1 = new SoundTransform();
_local1.volume = 0.5;
pSoundChannel1.soundTransform = _local1;
if (pEventID == 300000){
pSoundChannel1.stop();
MainObj.hint_button.visible = false;
};
pActiveCharacterClassRef.pAction = pActiveTeleportAction;
pActiveCharacterClassRef.SetWorldPosition(pActiveTeleportPos[0], pActiveTeleportPos[1], pActiveTeleportPos[2]);
pActiveCharacterClassRef.centerMap();
pActiveCharacterClassRef.SetRearPosition();
pActiveCharacterClassRef.Animate();
pRunningMateClassRef.pWaypoints_List = [];
pRunningMateClassRef.pAction = pActiveTeleportAction;
pRunningMateClassRef.SetWorldPosition(pActiveCharacterClassRef.pRearPos.x, pActiveTeleportPos[1], pActiveCharacterClassRef.pRearPos.y);
pRunningMateClassRef.Animate();
_local9 = true;
_local11 = 0;
while (_local11 < pLastLevelList.length) {
_local13 = pLastLevelList[_local11];
if (_local13 == pActiveLevel){
_local9 = false;
};
_local11++;
};
if (_local9 == true){
if (pVeronicasPatience < pVeronicasPatienceMax){
pVeronicasPatience = (pVeronicasPatience + 100);
if (pVeronicasPatience > pVeronicasPatienceMax){
pVeronicasPatience = pVeronicasPatienceMax;
};
};
};
ShowUninvitedGuestsMeter();
ShowApartmentMeter();
pFrontend_Status = "FadeInRoom";
break;
case "FadeOutToMiniGame":
_local1 = pSoundChannel1.soundTransform;
_local8 = _local1.volume;
_local8 = (_local8 - Translate_Increment(0.025, 50, 30));
if (_local8 <= 0){
_local8 = 0;
};
_local1.volume = _local8;
pSoundChannel1.soundTransform = _local1;
_local6 = MainObj.black_screen;
_local7 = _local6.alpha;
_local6.x = 0;
_local7 = (_local7 + Translate_Increment(0.05, 50, 30));
if (_local7 > 1){
_local7 = 1;
};
_local6.alpha = _local7;
if (_local7 == 1){
pSoundChannel1.stop();
pFrontend_Status = "InitMiniGame";
};
break;
case "InitMiniGame":
_local10 = new BlockHeadsRetroClass(this, pMiniGameTopScore);
MainObj.black_screen.x = 800;
MainObj.black_screen.alpha = 0;
MainObj.arcadebhr.visible = true;
pFrontend_Status = "MiniGame";
break;
case "FadeOutMiniGame":
_local6 = MainObj.black_screen;
_local7 = _local6.alpha;
_local6.x = 0;
_local7 = (_local7 + Translate_Increment(0.05, 50, 30));
if (_local7 > 1){
_local7 = 1;
};
_local6.alpha = _local7;
if (_local7 == 1){
MainObj.arcadebhr.visible = false;
if ((((pMiniGameNPCScoreBeaten == false)) && ((pMiniGameTopScore > 9999)))){
InitiateEvent(200803);
pMiniGameNPCScoreBeaten = true;
};
if ((((pMiniGameNPCScoreBeaten == false)) && ((pMiniGameTopScore == 9999)))){
InitiateEvent(200802);
};
CheckingAchievements("ArcadeGrandMaster");
pSoundChannel1 = RoomTheme3MusicSnd_Snd.play(0, int.MAX_VALUE);
_local1 = new SoundTransform();
_local1.volume = 0.5;
pSoundChannel1.soundTransform = _local1;
pFrontend_Status = "FadeInRoom";
};
break;
case "FadeOutToCredits":
_local6 = MainObj.black_screen;
_local7 = _local6.alpha;
_local6.x = 0;
_local7 = (_local7 + Translate_Increment(0.05, 50, 30));
if (_local7 > 1){
_local7 = 1;
};
_local6.alpha = _local7;
if (_local7 == 1){
pFrontend_Status = "InitCredits";
};
break;
case "InitCredits":
MainObj.EndingCredits.visible = true;
pSoundChannel1 = EndingMusicSnd_Snd.play(0, 0);
_local1 = new SoundTransform();
_local1.volume = 1;
pSoundChannel1.soundTransform = _local1;
pFrontend_Status = "FadeInCredits";
break;
case "FadeInCredits":
_local6 = MainObj.black_screen;
_local6.x = 0;
_local7 = _local6.alpha;
_local7 = (_local7 - Translate_Increment(0.05, 50, 30));
if (_local7 < 0){
_local7 = 0;
};
_local6.alpha = _local7;
if (_local7 == 0){
_local6.x = 800;
pFrontend_Status = "Credits";
};
break;
case "Credits":
if (MainObj.EndingCredits.credits_text.y > -1015){
MainObj.EndingCredits.credits_text.y = (MainObj.EndingCredits.credits_text.y - Translate_Increment(1, 50, 30));
} else {
MainObj.sociotown_ending_logo.visible = true;
};
break;
};
}
public function LoadPuzzleNPCsFromSaveFile(){
var _local1:*;
var _local2:*;
var _local3:int;
var _local4:*;
var _local5:Number;
var _local6:String;
var _local7:*;
var _local8:Object;
var _local9:NPC;
for (_local1 in pEntity_RegistryList) {
_local2 = pEntity_RegistryList[_local1];
if (_local2["Type"] == "NPC"){
_local3 = Number(_local2["Index"]);
_local4 = pStoryEntitiesXML.StoryEntity[_local3];
_local5 = new Number(_local2["CurrentState"]);
_local6 = new String(_local4.State[(_local5 - 1)].Position);
_local7 = _local6.split(",");
_local8 = new Object();
_local8.id = _local4.ID;
_local8.X = _local7[0];
_local8.Y = _local7[1];
_local8.Z = _local7[2];
_local8.spd = 10;
_local8.mode = "Idle";
_local8.type = _local4.NPCType;
_local8.subtype = _local4.NPCSubType;
_local8.action = _local4.State[(_local5 - 1)].NPCAnimation;
_local8.room = _local4.State[(_local5 - 1)].Room;
_local9 = new NPC(this, _local8);
};
};
}
public function LockInput_Timeout(){
var _local1:int;
switch (pLockInput_TimeoutState){
case "1":
_local1 = (getTimer() - pLockInput_Timeout);
if (_local1 > 3000){
pLockInput_TimeoutState = null;
pLockInput = false;
};
break;
};
}
public function CheckingAchievements(_arg1:String){
var _local2:*;
switch (_arg1){
case "TossOuts":
if (pAchievementObjList["FirstStrike"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("First Strike");
};
ShowAchievement("First Strike", 1);
pAchievementObjList["FirstStrike"] = true;
};
if (pAchievementObjList["BossOfToss"] == undefined){
if (pAchievementObjValues["TossCount"] == undefined){
pAchievementObjValues["TossCount"] = 0;
};
var _local3 = pAchievementObjValues;
var _local4 = "TossCount";
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
if (pAchievementObjValues["TossCount"] == 20){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Boss of Toss");
};
ShowAchievement("Boss of Toss", 2);
pAchievementObjList["TossCount"] = true;
};
};
if (pAchievementObjList["SocialDeNetworking"] == undefined){
if (pAchievementObjValues["LastTossOutNPCType"] == "Puzzle01"){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Social De-Networking");
};
ShowAchievement("Social De-Networking", 1);
pAchievementObjList["SocialDeNetworking"] = true;
};
};
if (pAchievementObjList["HighMaintenance"] == undefined){
if (pAchievementObjValues["LastTossOutNPCType"] == "Puzzle14"){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("High Maintenance");
};
ShowAchievement("High Maintenance", 2);
pAchievementObjList["HighMaintenance"] = true;
};
};
break;
case "PunchOuts":
if (pAchievementObjList["FirstStrike"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("First Strike");
};
ShowAchievement("First Strike", 1);
pAchievementObjList["FirstStrike"] = true;
};
if (pAchievementObjList["FistofFury"] == undefined){
if (pAchievementObjValues["FistofFuryCount"] == undefined){
pAchievementObjValues["FistofFuryCount"] = 0;
};
_local3 = pAchievementObjValues;
_local4 = "FistofFuryCount";
_local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
if (pAchievementObjValues["FistofFuryCount"] == 20){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Fist of Fury");
};
ShowAchievement("Fist of Fury", 2);
pAchievementObjList["FistofFury"] = true;
};
};
if (pAchievementObjList["SocialDeNetworking"] == undefined){
if (pAchievementObjValues["LastPunchOutNPCType"] == "Puzzle01"){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Social De-Networking");
};
ShowAchievement("Social De-Networking", 1);
pAchievementObjList["SocialDeNetworking"] = true;
};
};
if (pAchievementObjList["HighMaintenance"] == undefined){
if (pAchievementObjValues["LastPunchOutNPCType"] == "Puzzle14"){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("High Maintenance");
};
ShowAchievement("High Maintenance", 2);
pAchievementObjList["HighMaintenance"] = true;
};
};
if (pAchievementObjList["LadiesMan"] == undefined){
switch (pAchievementObjValues["LastPunchOutNPCType"]){
case "Generic03":
case "Generic04":
case "Puzzle03":
case "Puzzle05":
case "Puzzle07":
case "Puzzle14":
pAchievementObjValues["PunchedGirl"] = true;
break;
};
};
break;
case "Cleaning":
if (pAchievementObjList["MamaICanClean"] == undefined){
_local2 = Math.floor((100 * (pApartmentCleanCount / 47)));
if (_local2 >= 2){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Mama, I can Clean!");
};
ShowAchievement("Mama, I can Clean!", 1);
pAchievementObjList["MamaICanClean"] = true;
};
};
if (pAchievementObjList["SmallWasteManagement"] == undefined){
_local2 = Math.floor((100 * (pApartmentCleanCount / 47)));
if (_local2 >= 25){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Small Waste Management");
};
ShowAchievement("Small Waste Management", 1);
pAchievementObjList["SmallWasteManagement"] = true;
};
};
if (pAchievementObjList["MrClean"] == undefined){
_local2 = Math.floor((100 * (pApartmentCleanCount / 47)));
if (_local2 >= 50){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Mr. Clean");
};
ShowAchievement("Mr. Clean", 2);
pAchievementObjList["MrClean"] = true;
};
};
if (pAchievementObjList["NeatFreak"] == undefined){
_local2 = Math.floor((100 * (pApartmentCleanCount / 47)));
if (_local2 >= 75){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Neat Freak");
};
ShowAchievement("Neat Freak", 2);
pAchievementObjList["NeatFreak"] = true;
};
};
if (pAchievementObjList["OCDCleaningKing"] == undefined){
_local2 = Math.floor((100 * (pApartmentCleanCount / 47)));
if (_local2 >= 100){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("OCD Cleaning King");
};
ShowAchievement("OCD Cleaning King", 3);
pAchievementObjList["OCDCleaningKing"] = true;
};
};
break;
case "SearchProgress":
if (pAchievementObjList["DusttoDawn"] == undefined){
if (pAchievementObjValues["SearchSpaceOpened"] >= (pAchievementObjValues["SearchSpaceCount"] - 4)){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Dust to Dawn");
};
ShowAchievement("Dust to Dawn", 1);
pAchievementObjList["DusttoDawn"] = true;
};
};
break;
case "ItsGameTime":
if (pAchievementObjList["ItsGameTime"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("It's Game Time");
};
ShowAchievement("It's Game Time", 2);
pAchievementObjList["ItsGameTime"] = true;
};
break;
case "NoRighttoPrivacy":
if (pAchievementObjList["NoRighttoPrivacy"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("No Right to Privacy");
};
ShowAchievement("No Right to Privacy", 2);
pAchievementObjList["NoRighttoPrivacy"] = true;
};
break;
case "KitchenNightmares":
if (pAchievementObjList["KitchenNightmares"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Kitchen Nightmares");
};
ShowAchievement("Kitchen Nightmares", 2);
pAchievementObjList["KitchenNightmares"] = true;
};
break;
case "FinalFrontier":
if (pAchievementObjList["FinalFrontier"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Final Frontier");
};
ShowAchievement("Final Frontier", 3);
pAchievementObjList["FinalFrontier"] = true;
};
break;
case "TopGun":
if (pAchievementObjList["TopGun"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Top Gun");
};
ShowAchievement("Top Gun", 1);
pAchievementObjList["TopGun"] = true;
};
break;
case "ArcadeGrandMaster":
if (pAchievementObjList["ArcadeGrandMaster"] == undefined){
if (pMiniGameTopScore > 20000){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Arcade Grand Master");
};
ShowAchievement("Arcade Grand Master", 3);
pAchievementObjList["ArcadeGrandMaster"] = true;
};
};
break;
case "NerveofaPerv":
if (pAchievementObjList["NerveofaPerv"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Nerve of a Perv");
};
ShowAchievement("Nerve of a Perv", 2);
pAchievementObjList["NerveofaPerv"] = true;
};
break;
case "ToCatchaPredator":
if (pAchievementObjList["NerveofaPerv"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("To Catch a Predator");
};
ShowAchievement("To Catch a Predator", 2);
pAchievementObjList["ToCatchaPredator"] = true;
};
break;
case "BurgerDebtRepaid":
if (pAchievementObjList["BurgerDebtRepaid"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Burger Debt Repaid");
};
ShowAchievement("Burger Debt Repaid", 2);
pAchievementObjList["BurgerDebtRepaid"] = true;
};
break;
case "PartysOver":
if (pAchievementObjList["PartysOver"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Party's Over");
};
ShowAchievement("Party's Over", 3);
pAchievementObjList["PartysOver"] = true;
};
break;
case "LadiesMan":
if (pAchievementObjList["LadiesMan"] == undefined){
if (pAchievementObjValues["PunchedGirl"] == undefined){
if (pNewgroundsMedalsActive == true){
API.unlockMedal("Ladies Man");
};
ShowAchievement("Ladies Man", 3);
pAchievementObjList["LadiesMan"] = true;
};
};
break;
};
}
public function ShowUninvitedGuestsMeter(){
if (pUGMMeterOn == true){
MainObj.uninvited_guests_header.alpha = 1;
MainObj.uninvited_guests_header.text.alpha = 1;
MainObj.uninvited_guests_header.text.visible = true;
MainObj.uninvited_guests_header.visible = true;
pUGMDelay = getTimer();
pShowUGMActive = true;
};
}
public function GeneralButtonBehavior(_arg1:MouseEvent){
var _local2:*;
var _local3:Number;
switch (_arg1.type){
case "mouseOver":
_local2 = _arg1.currentTarget;
switch (_local2.name){
case "view_rankings":
case "view_picture":
case "connect_button":
break;
case "pick_room_button":
break;
case "options_menu_key_lookat":
_local3 = MainObj.options_menu_bg.options_menu_key_lookat.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_lookat.gotoAndStop(2);
};
break;
case "options_menu_key_search":
_local3 = MainObj.options_menu_bg.options_menu_key_search.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_search.gotoAndStop(2);
};
break;
case "options_menu_key_use":
_local3 = MainObj.options_menu_bg.options_menu_key_use.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_use.gotoAndStop(2);
};
break;
case "options_menu_key_useitem":
_local3 = MainObj.options_menu_bg.options_menu_key_useitem.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_useitem.gotoAndStop(2);
};
break;
case "options_menu_key_punch":
_local3 = MainObj.options_menu_bg.options_menu_key_punch.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_punch.gotoAndStop(2);
};
break;
case "options_menu_key_toss":
_local3 = MainObj.options_menu_bg.options_menu_key_toss.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_toss.gotoAndStop(2);
};
break;
case "options_menu_key_talk":
_local3 = MainObj.options_menu_bg.options_menu_key_talk.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_talk.gotoAndStop(2);
};
break;
case "SearchGridBox":
if (pSearchGridState == "2"){
_local2 = _arg1.currentTarget;
pSearchIconPos = pSearchMCObjList[((_local2.name + _local2.x) + _local2.y)];
} else {
pSearchIconPosQueue = pSearchMCObjList[((_local2.name + _local2.x) + _local2.y)];
};
break;
case "SearchGridExit":
if (pSearchGridState == "2"){
pSearchIconPos = null;
} else {
pSearchIconPosQueue = pSearchMCObjList[((_local2.name + _local2.x) + _local2.y)];
};
break;
case "slot_1":
if ((((pInventoryState == "2")) || ((pInventoryState == "3")))){
pInventorySlotPointer = 1;
};
break;
case "slot_2":
if ((((pInventoryState == "2")) || ((pInventoryState == "3")))){
pInventorySlotPointer = 2;
};
break;
case "slot_3":
if ((((pInventoryState == "2")) || ((pInventoryState == "3")))){
pInventorySlotPointer = 3;
};
break;
case "slot_4":
if ((((pInventoryState == "2")) || ((pInventoryState == "3")))){
pInventorySlotPointer = 4;
};
break;
case "slot_5":
if ((((pInventoryState == "2")) || ((pInventoryState == "3")))){
pInventorySlotPointer = 5;
};
break;
case "slot_6":
if ((((pInventoryState == "2")) || ((pInventoryState == "3")))){
pInventorySlotPointer = 6;
};
break;
case "slot_7":
if ((((pInventoryState == "2")) || ((pInventoryState == "3")))){
pInventorySlotPointer = 7;
};
break;
case "more":
if ((((pInventoryState == "2")) || ((pInventoryState == "3")))){
pInventorySlotPointer = 8;
};
break;
case "close":
if ((((pInventoryState == "2")) || ((pInventoryState == "3")))){
pInventorySlotPointer = 9;
};
break;
};
break;
case "mouseOut":
_local2 = _arg1.currentTarget;
switch (_local2.name){
case "connect_button":
case "view_rankings":
case "view_picture":
break;
case "pick_room_button":
break;
case "options_menu_key_lookat":
_local3 = MainObj.options_menu_bg.options_menu_key_lookat.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_lookat.gotoAndStop(1);
};
break;
case "options_menu_key_search":
_local3 = MainObj.options_menu_bg.options_menu_key_search.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_search.gotoAndStop(1);
};
break;
case "options_menu_key_use":
_local3 = MainObj.options_menu_bg.options_menu_key_use.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_use.gotoAndStop(1);
};
break;
case "options_menu_key_useitem":
_local3 = MainObj.options_menu_bg.options_menu_key_useitem.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_useitem.gotoAndStop(1);
};
break;
case "options_menu_key_punch":
_local3 = MainObj.options_menu_bg.options_menu_key_punch.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_punch.gotoAndStop(1);
};
break;
case "options_menu_key_toss":
_local3 = MainObj.options_menu_bg.options_menu_key_toss.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_toss.gotoAndStop(1);
};
break;
case "options_menu_key_talk":
_local3 = MainObj.options_menu_bg.options_menu_key_talk.alpha;
if (_local3 == 1){
MainObj.options_menu_bg.options_menu_key_talk.gotoAndStop(1);
};
break;
};
break;
case "click":
_local2 = _arg1.currentTarget;
switch (_local2.name){
case "play_button":
MainObj.play_button.visible = false;
MainObj.free_mmo_button.visible = false;
MainObj.credit_text.visible = false;
MainObj.newgame_button.visible = true;
MainObj.continue_button.visible = true;
MainObj.achievement_button.visible = true;
MainObj.newgame_button.alpha = 1;
MainObj.achievement_button.alpha = 1;
MainObj.add_game.alpha = 1;
MainObj.add_game.visible = true;
if (pGameSavePresent == true){
MainObj.continue_button.alpha = 1;
MainObj.continue_button.useHandCursor = true;
MainObj.clear_save_data.alpha = 1;
MainObj.clear_save_data.useHandCursor = true;
} else {
MainObj.continue_button.alpha = 0.4;
MainObj.continue_button.useHandCursor = false;
};
break;
case "newgame_button":
pFrontend_Status = "preBoardSetup-1";
break;
case "continue_button":
LoadGameSave();
pContinueGame = true;
pFrontend_Status = "preBoardSetup-1";
break;
case "free_mmo_button":
MochiEvents.trackEvent("Clicked FREE SOCIAL MMO link.");
if (ExternalInterface.available){
ExternalInterface.call("window.open", "http://www.sociotown.com/ugflash.html", "win");
};
break;
case "sociotown_ending_logo":
case "sociotown_logo":
MochiEvents.trackEvent("Clicked SocioTown Logo link");
if (ExternalInterface.available){
ExternalInterface.call("window.open", "http://www.sociotown.com/ugflash.html", "win");
};
break;
case "add_game":
MochiEvents.trackEvent("Clicked Add Game link");
if (ExternalInterface.available){
ExternalInterface.call("window.open", "http://www.sociotown.com/games/uninvited/download/", "win");
};
break;
case "achievement_back_button":
MainObj.newgame_button.visible = true;
MainObj.continue_button.visible = true;
MainObj.achievement_button.visible = true;
MainObj.clear_save_data.visible = true;
MainObj.add_game.alpha = 1;
MainObj.add_game.visible = true;
MainObj.achievement_list.visible = false;
MainObj.achievement_list.alpha = 0;
break;
case "achievement_button":
MainObj.newgame_button.visible = false;
MainObj.continue_button.visible = false;
MainObj.achievement_button.visible = false;
MainObj.clear_save_data.visible = false;
MainObj.add_game.visible = false;
MainObj.achievement_list.visible = true;
MainObj.achievement_list.alpha = 1;
ShowMyUnlockedAchievements();
pFrontend_Status = "achievement_list";
break;
case "clear_achievements":
ClearGameAchievements();
ShowMyUnlockedAchievements();
break;
case "clear_save_data":
ClearGameSave();
MainObj.continue_button.alpha = 0.4;
MainObj.continue_button.useHandCursor = false;
MainObj.clear_save_data.alpha = 0.4;
MainObj.clear_save_data.useHandCursor = true;
MainObj.continue_button.removeEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.clear_save_data.removeEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
break;
case "options_menu_key_lookat":
_local3 = MainObj.options_menu_bg.options_menu_key_lookat.alpha;
if (_local3 == 1){
pMouseActions["LOOKAT"] = true;
MainObj.options_menu_bg.options_menu_key_lookat.gotoAndStop(1);
};
break;
case "options_menu_key_search":
_local3 = MainObj.options_menu_bg.options_menu_key_search.alpha;
if (_local3 == 1){
pMouseActions["SEARCH"] = true;
MainObj.options_menu_bg.options_menu_key_search.gotoAndStop(1);
};
break;
case "options_menu_key_use":
_local3 = MainObj.options_menu_bg.options_menu_key_use.alpha;
if (_local3 == 1){
pMouseActions["USE"] = true;
MainObj.options_menu_bg.options_menu_key_use.gotoAndStop(1);
};
break;
case "options_menu_key_useitem":
_local3 = MainObj.options_menu_bg.options_menu_key_useitem.alpha;
if (_local3 == 1){
pMouseActions["USEITEM"] = true;
MainObj.options_menu_bg.options_menu_key_useitem.gotoAndStop(1);
};
break;
case "options_menu_key_punch":
_local3 = MainObj.options_menu_bg.options_menu_key_punch.alpha;
if (_local3 == 1){
pMouseActions["PUNCH"] = true;
MainObj.options_menu_bg.options_menu_key_punch.gotoAndStop(1);
};
break;
case "options_menu_key_toss":
_local3 = MainObj.options_menu_bg.options_menu_key_toss.alpha;
if (_local3 == 1){
pMouseActions["TOSS"] = true;
MainObj.options_menu_bg.options_menu_key_toss.gotoAndStop(1);
};
break;
case "options_menu_key_talk":
_local3 = MainObj.options_menu_bg.options_menu_key_talk.alpha;
if (_local3 == 1){
pMouseActions["TALK"] = true;
MainObj.options_menu_bg.options_menu_key_talk.gotoAndStop(1);
};
break;
case "SearchGridBox":
case "search_icon":
if (pSearchGridState == "2"){
if (pSearchIconPos != null){
pMouseActions["SEARCHGRIDBOX"] = true;
} else {
pMouseActions["SEARCHGRIDEXIT"] = true;
};
};
break;
case "SearchGridExit":
if (pSearchGridState == "2"){
pMouseActions["SEARCHGRIDEXIT"] = true;
};
break;
case "slot_1":
case "slot_2":
case "slot_3":
case "slot_4":
case "slot_5":
case "slot_6":
case "slot_7":
case "more":
case "close":
if (pInventoryState == "3"){
pMouseActions["INVENTORYSLOT"] = true;
};
break;
case "ui_chat_bubble":
case "ui_chat_bubble_text":
case "ui_chat_skip_text":
if ((((UIChatBubbleState == "3")) || ((UIChatBubbleState == "4")))){
pMouseActions["CHATBUBBLE"] = true;
};
break;
case "hint_button":
if (pVeronicasHelpState == "1"){
pMouseActions["HINT"] = true;
};
break;
};
break;
};
}
public function TitleScaleGraphics(){
var _local1:*;
var _local2:Array;
var _local3:BlurFilter;
if (MainObj.currentFrame == 3){
_local1 = MainObj.title_bg.scaleX;
_local1 = (_local1 - Translate_Increment(0.0005, 50, 30));
if (_local1 <= 0.8){
_local1 = 0.8;
} else {
_local2 = MainObj.title_bg.filters;
_local3 = _local2[0];
_local3.blurX = (_local3.blurX + Translate_Increment(0.05, 50, 30));
_local3.blurY = (_local3.blurY + Translate_Increment(0.05, 50, 30));
MainObj.title_bg.filters = [_local3];
};
MainObj.title_bg.scaleX = _local1;
MainObj.title_bg.scaleY = _local1;
_local1 = MainObj.title_veronica.scaleX;
_local1 = (_local1 + Translate_Increment(0.001, 50, 30));
if (_local1 >= 1){
_local1 = 1;
} else {
MainObj.title_veronica.x = (MainObj.title_veronica.x + Translate_Increment(0.01, 50, 30));
};
MainObj.title_veronica.scaleX = _local1;
MainObj.title_veronica.scaleY = _local1;
_local1 = MainObj.title_toby.scaleX;
_local1 = (_local1 + Translate_Increment(0.001, 50, 30));
if (_local1 >= 1){
_local1 = 1;
} else {
MainObj.title_toby.x = (MainObj.title_toby.x - Translate_Increment(0.06, 50, 30));
};
MainObj.title_toby.scaleX = _local1;
MainObj.title_toby.scaleY = _local1;
};
}
private function UserInput(){
var _local1:Boolean;
var _local2:Number;
if (pLock_UserInput == false){
_local1 = false;
_local2 = 7;
if (((arrowRight) || (D_KeyDown))){
pActiveCharacterClassRef.WorldTranslate(_local2, 0, 0, true);
pActiveCharacterClassRef.pSpeed = _local2;
pActiveCharacterClassRef.pAction = "swr";
_local1 = true;
};
if (((arrowLeft) || (A_KeyDown))){
pActiveCharacterClassRef.WorldTranslate(-(_local2), 0, 0, true);
pActiveCharacterClassRef.pSpeed = _local2;
pActiveCharacterClassRef.pAction = "swl";
_local1 = true;
};
if (((arrowUp) || (W_KeyDown))){
pActiveCharacterClassRef.WorldTranslate(0, 0, -((_local2 * 0.83)), true);
pActiveCharacterClassRef.pSpeed = (_local2 * 0.83);
pActiveCharacterClassRef.pAction = "wb";
_local1 = true;
};
if (((arrowDown) || (S_KeyDown))){
pActiveCharacterClassRef.WorldTranslate(0, 0, (_local2 * 0.83), true);
pActiveCharacterClassRef.pSpeed = (_local2 * 0.83);
pActiveCharacterClassRef.pAction = "wf";
_local1 = true;
};
if (((((arrowDown) && (arrowLeft))) || (((A_KeyDown) && (S_KeyDown))))){
pActiveCharacterClassRef.pAction = "dlf";
};
if (((((arrowDown) && (arrowRight))) || (((D_KeyDown) && (S_KeyDown))))){
pActiveCharacterClassRef.pAction = "drf";
};
if (((((arrowUp) && (arrowLeft))) || (((W_KeyDown) && (A_KeyDown))))){
pActiveCharacterClassRef.pAction = "dlb";
};
if (((((arrowUp) && (arrowRight))) || (((W_KeyDown) && (D_KeyDown))))){
pActiveCharacterClassRef.pAction = "drb";
};
if (_local1 == false){
switch (pActiveCharacterClassRef.pAction){
case "swr":
pActiveCharacterClassRef.pAction = "ssr";
break;
case "swl":
pActiveCharacterClassRef.pAction = "ssl";
break;
case "wf":
pActiveCharacterClassRef.pAction = "sf";
break;
case "wb":
pActiveCharacterClassRef.pAction = "sb";
break;
case "drf":
pActiveCharacterClassRef.pAction = "sf";
break;
case "dlf":
pActiveCharacterClassRef.pAction = "sf";
break;
case "dlb":
pActiveCharacterClassRef.pAction = "sb";
break;
case "drb":
pActiveCharacterClassRef.pAction = "sb";
break;
case "brnt":
pActiveCharacterClassRef.pAction = "sf";
break;
};
};
pActiveCharacterClassRef.Animate();
};
}
public function keyDownFunction(_arg1:KeyboardEvent){
if ((_arg1.keyCode == 37)){
arrowLeft = true;
} else {
if (_arg1.keyCode == 39){
arrowRight = true;
} else {
if (_arg1.keyCode == 38){
arrowUp = true;
} else {
if (_arg1.keyCode == 40){
arrowDown = true;
} else {
if (_arg1.keyCode == 87){
W_KeyDown = true;
} else {
if (_arg1.keyCode == 65){
A_KeyDown = true;
} else {
if (_arg1.keyCode == 83){
S_KeyDown = true;
} else {
if (_arg1.keyCode == 68){
D_KeyDown = true;
} else {
if (_arg1.keyCode == 86){
V_KeyDown = true;
} else {
if (_arg1.keyCode == 32){
SpaceBar_Down = true;
} else {
if (_arg1.keyCode == 13){
EnterKeydown = true;
} else {
if (_arg1.keyCode == 9){
TabDown = true;
} else {
if (_arg1.keyCode == 16){
ShiftBarDown = true;
} else {
if (_arg1.keyCode == 84){
ChatSwitch_Down = true;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (_arg1.keyCode > 0){
Anykey_Down = true;
};
}
public function GetMouseRay(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:Point;
var _local7:Point;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
_local1 = MainObj.mouseX;
_local2 = MainObj.mouseY;
_local3 = pActiveCharacterClassRef.pCharacter_MC.x;
_local4 = pActiveCharacterClassRef.pWorldY;
_local5 = pActiveCharacterClassRef.pCharacter_MC.y;
_local6 = new Point(_local3, _local5);
_local7 = gamemap.localToGlobal(_local6);
_local8 = (_local1 - _local7.x);
_local9 = (_local2 - _local7.y);
_local10 = Math.atan2(_local9, _local8);
degrees = (_local10 / (Math.PI / 180));
_local11 = 200;
_local12 = (_local11 * Math.cos(_local10));
_local13 = (_local11 * Math.sin(_local10));
MainObj.reddot.x = _local12;
MainObj.reddot.y = _local13;
pActiveCharacterClassRef.pCharacter_MC.addChild(MainObj.reddot);
}
public function CleanUp(){
var _local1:int;
switch (pCleanUpState){
case "1":
break;
case "2":
break;
case "3":
_local1 = (getTimer() - pStartTime);
if (_local1 > 1000){
pCleanUpState = "4";
};
break;
case "4":
pCleanUpState = "1";
switch (pEndGameRedirect){
case "GameList":
break;
case "NewRound":
break;
};
break;
};
}
public function ShowInventory(){
pInventorySlotPointer = 1;
pInventoryPage = 1;
pInventoryState = "1";
}
public function onConnectError(_arg1:String):void{
}
public function VeronicasHelp(){
var _local1:int;
var _local2:Point;
var _local3:*;
var _local4:*;
var _local5:Number;
var _local6:String;
_local1 = (getTimer() - pVeronicasHelpDelay);
if (_local1 > 60000){
pVeronicasHelpPointer = 0;
};
MainObj.hint_button.gotoAndStop((pVeronicasHelpPointer + 1));
switch (pVeronicasHelpState){
case "1":
if ((((pLock_UserInput == false)) && ((pOptionsMenuLocked == false)))){
if ((((V_KeyDown == true)) || (pMouseActions["HINT"]))){
delete pMouseActions["HINT"];
pLock_UserInput = true;
pOptionsMenuLocked = true;
if (pVeronicasPatience >= 100){
pVeronicasHelpState = "2";
} else {
pVeronicasHelpState = "2b";
};
};
};
break;
case "2":
_local3 = 0;
while (_local3 < pStoryEntitiesXML.StoryEntity.length()) {
_local4 = pStoryEntitiesXML.StoryEntity[_local3];
_local5 = new Number(_local4.ID);
if (_local5 == 400){
pVeronicasHelpActivePuzzle = pVeronicasHelpPuzzleList[0];
_local6 = _local4.Puzzle[(pVeronicasHelpActivePuzzle - 1)].TEXT[pVeronicasHelpPointer];
pVeronicasPatienceIncrease = false;
pRunningMateClassRef.pMode = "Wait";
pRunningMateClassRef.pAction = pActiveCharacterClassRef.pAction;
pRunningMateClassRef.Animate();
_local2 = new Point(pRunningMateClassRef.pCharacter_MC.x, pRunningMateClassRef.pCharacter_MC.y);
InitiateUIChatBubble("Veronica", _local6, _local2, "Female1", true, true);
pVeronicasHelpPointer++;
if (pVeronicasHelpPointer >= _local4.Puzzle[(pVeronicasHelpActivePuzzle - 1)].TEXT.length()){
pVeronicasHelpPointer = 0;
};
pVeronicasPatience = (pVeronicasPatience - 100);
pVeronicasHelpDelay = getTimer();
pVeronicasHelpState = "3";
break;
};
_local3++;
};
break;
case "2b":
pVeronicasPatienceIncrease = false;
pRunningMateClassRef.pMode = "Wait";
pRunningMateClassRef.pAction = pActiveCharacterClassRef.pAction;
pRunningMateClassRef.Animate();
_local2 = new Point(pRunningMateClassRef.pCharacter_MC.x, pRunningMateClassRef.pCharacter_MC.y);
InitiateUIChatBubble("Veronica", "Toby, I have no patience to help you right now...", _local2, "Female1", true, true);
pVeronicasHelpState = "3";
break;
case "3":
if (UIChatBubbleState == "1"){
pVeronicasPatienceIncrease = true;
pRunningMateClassRef.pMode = "Follow";
pLock_UserInput = false;
pOptionsMenuLocked = false;
pVeronicasHelpState = "1";
};
break;
};
}
function InitializeEventXML(_arg1:Event){
var _local2:URLLoader;
var _local3:XML;
_local2 = URLLoader(_arg1.target);
_local3 = new XML(_local2.data);
pStoryEventsXML = _local3;
pRetrievedStoryEventsXML = true;
}
function open_SocioTownPage(_arg1:MouseEvent){
if (ExternalInterface.available){
ExternalInterface.call("window.open", "http://www.sociotown.com", "win");
};
}
public function ShowProgressSavedText(){
MainObj.progress_saved.visible = true;
MainObj.progress_saved.alpha = 1;
pProgressSavedTextActive = true;
pProgressSavedTextDelay = getTimer();
}
public function Achievement(){
var _local1:int;
var _local2:*;
var _local3:*;
if (pAchievementActive == true){
_local1 = (getTimer() - pAchievementDelay);
if (_local1 > 4000){
_local2 = MainObj.achievement_icon.scaleX;
_local2 = (_local2 - Translate_Increment(0.1, 50, 30));
if (_local2 <= 0.01){
_local2 = 0.01;
};
MainObj.achievement_icon.scaleX = _local2;
_local3 = MainObj.achievement_icon.alpha;
_local3 = (_local3 - Translate_Increment(0.05, 50, 30));
if (_local3 <= 0){
_local3 = 0;
};
MainObj.achievement_icon.alpha = _local3;
MainObj.achievement_icon.text.alpha = _local3;
MainObj.achievement_icon.text.visible = false;
if (_local3 == 0){
MainObj.achievement_icon.visible = false;
pAchievementActive = false;
};
} else {
_local2 = MainObj.achievement_icon.scaleX;
_local2 = (_local2 + Translate_Increment(0.1, 50, 30));
if (_local2 >= 1){
_local2 = 1;
};
MainObj.achievement_icon.scaleX = _local2;
};
} else {
MainObj.achievement_icon.visible = false;
};
}
public function KeyErrorCorrection(){
if (SpaceBar_Down == true){
if (pKeyErrorCorrectionValueList["SpaceKey"] == undefined){
pKeyErrorCorrectionValueList["SpaceKey"] = 0;
};
pKeyErrorCorrectionValueList["SpaceKey"] = (pKeyErrorCorrectionValueList["SpaceKey"] + Translate_Increment(1, 50, 30));
if (pKeyErrorCorrectionValueList["SpaceKey"] >= 100){
pKeyErrorCorrectionValueList["SpaceKey"] = 0;
SpaceBar_Down = false;
};
} else {
if (pKeyErrorCorrectionValueList["SpaceKey"] == undefined){
pKeyErrorCorrectionValueList["SpaceKey"] = 0;
};
pKeyErrorCorrectionValueList["SpaceKey"] = 0;
};
if (EnterKeydown == true){
if (pKeyErrorCorrectionValueList["EnterKey"] == undefined){
pKeyErrorCorrectionValueList["EnterKey"] = 0;
};
pKeyErrorCorrectionValueList["EnterKey"] = (pKeyErrorCorrectionValueList["EnterKey"] + Translate_Increment(1, 50, 30));
if (pKeyErrorCorrectionValueList["EnterKey"] >= 100){
pKeyErrorCorrectionValueList["EnterKey"] = 0;
EnterKeydown = false;
};
} else {
if (pKeyErrorCorrectionValueList["EnterKey"] == undefined){
pKeyErrorCorrectionValueList["EnterKey"] = 0;
};
pKeyErrorCorrectionValueList["EnterKey"] = 0;
};
}
public function InitiateEvent(_arg1:int){
pEventID = _arg1;
pEventActive = true;
pEventSystemUnlockOptionsMenu = false;
pEventPhaseAction = "Execute";
pEventPhasePointer = 0;
pEventPhaseDelay = getTimer();
}
function onMedalUnlocked(_arg1:APIEvent):void{
var _local2:Medal;
if (_arg1.success){
_local2 = _arg1.data.medal;
//unresolved jump
};
}
public function keyUpFunction(_arg1:KeyboardEvent){
if ((_arg1.keyCode == 37)){
arrowLeft = false;
} else {
if ((_arg1.keyCode == 39)){
arrowRight = false;
} else {
if ((_arg1.keyCode == 38)){
arrowUp = false;
} else {
if ((_arg1.keyCode == 40)){
arrowDown = false;
} else {
if (_arg1.keyCode == 87){
W_KeyDown = false;
} else {
if (_arg1.keyCode == 65){
A_KeyDown = false;
} else {
if (_arg1.keyCode == 83){
S_KeyDown = false;
} else {
if (_arg1.keyCode == 68){
D_KeyDown = false;
} else {
if (_arg1.keyCode == 86){
V_KeyDown = false;
} else {
if (_arg1.keyCode == 32){
SpaceBar_Down = false;
} else {
if (_arg1.keyCode == 13){
EnterKeydown = false;
} else {
if (_arg1.keyCode == 9){
TabDown = false;
} else {
if (_arg1.keyCode == 16){
ShiftBarDown = false;
} else {
if (_arg1.keyCode == 84){
ChatSwitch_Down = false;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (_arg1.keyCode > 0){
Anykey_Down = false;
};
}
public function Tutorial(){
var _local1:Point;
var _local2:Point;
var _local3:Number;
var _local4:int;
if (pTutorialValueList["Intro2"] == undefined){
_local1 = new Point(pActiveCharacterClassRef.pCharacter_MC.x, pActiveCharacterClassRef.pCharacter_MC.y);
_local2 = new Point(620, 310);
_local3 = Point.distance(_local2, _local1);
if (_local3 < 50){
pLock_UserInput = true;
pActiveCharacterClassRef.pAction = "sb";
pActiveCharacterClassRef.Animate();
InitiateEvent(100200);
pTutorialValueList["Intro2"] = true;
};
};
if (pTutorialValueList["Intro3"] == undefined){
if (pActiveLevel == "Room1"){
pLock_UserInput = true;
pActiveCharacterClassRef.pAction = "sb";
pActiveCharacterClassRef.Animate();
InitiateEvent(100300);
pTutorialValueList["Delay"] = getTimer();
pTutorialValueList["Intro3"] = true;
};
};
if ((((pTutorialValueList["Tutorial1"] == undefined)) && ((pTutorialValueList["Intro3"] == true)))){
_local4 = (getTimer() - pTutorialValueList["Delay"]);
if (_local4 > 30000){
if ((((pLock_UserInput == false)) && ((pOptionsMenuLocked == false)))){
switch (pActiveCharacterClassRef.pAction){
case "sf":
case "sb":
case "ssr":
case "ssl":
pActiveCharacterClassRef.pAction = "sf";
pLock_UserInput = true;
pOptionsMenuLocked = true;
InitiateEvent(100400);
pTutorialValueList["Delay"] = getTimer();
pTutorialValueList["Tutorial1"] = true;
break;
};
};
};
};
if ((((pTutorialValueList["Tutorial2"] == undefined)) && ((pTutorialValueList["Tutorial1"] == true)))){
_local4 = (getTimer() - pTutorialValueList["Delay"]);
if (_local4 > 60000){
if ((((pLock_UserInput == false)) && ((pOptionsMenuLocked == false)))){
switch (pActiveCharacterClassRef.pAction){
case "sf":
case "sb":
case "ssr":
case "ssl":
pActiveCharacterClassRef.pAction = "sf";
pLock_UserInput = true;
pOptionsMenuLocked = true;
InitiateEvent(100500);
pTutorialValueList["Delay"] = getTimer();
pTutorialValueList["Tutorial2"] = true;
break;
};
};
};
};
if ((((pTutorialValueList["Tutorial4"] == undefined)) && ((pTutorialValueList["Tutorial2"] == true)))){
_local4 = (getTimer() - pTutorialValueList["Delay"]);
if (_local4 > 120000){
if ((((pLock_UserInput == false)) && ((pOptionsMenuLocked == false)))){
switch (pActiveCharacterClassRef.pAction){
case "sf":
case "sb":
case "ssr":
case "ssl":
pActiveCharacterClassRef.pAction = "sf";
pLock_UserInput = true;
pOptionsMenuLocked = true;
InitiateEvent(100700);
pTutorialValueList["Delay"] = getTimer();
pTutorialValueList["Tutorial4"] = true;
break;
};
};
};
};
}
public function ApartmentMeter(){
var _local1:int;
var _local2:*;
if (pACMMeterOn == true){
if (pShowACMActive == true){
_local1 = (getTimer() - pACMDelay);
if (_local1 > 3000){
_local2 = MainObj.apartment_header.alpha;
_local2 = (_local2 - Translate_Increment(0.05, 50, 30));
if (_local2 <= 0){
_local2 = 0;
};
MainObj.apartment_header.alpha = _local2;
MainObj.apartment_header.text.alpha = _local2;
MainObj.apartment_header.text.visible = false;
if (_local2 == 0){
MainObj.uninvited_guests_header.visible = false;
pShowACMActive = false;
};
};
} else {
MainObj.apartment_header.visible = false;
};
} else {
MainObj.apartment_header.visible = false;
};
}
public function MouseInGame(_arg1:MouseEvent){
switch (_arg1.type){
case "mouseDown":
pMouseDown = true;
break;
case "mouseUp":
pMouseDown = false;
break;
};
}
public function GameUpdate(_arg1:Event){
MainObj.stage.focus = MainObj;
switch (gGame_Status){
case "Frontend":
Frontend();
TitleScaleGraphics();
break;
case "GameMap":
UserInput();
KeyErrorCorrection();
sortDisplayList();
OptionsMenu();
UIChatBubble();
VeronicasPatience();
VeronicasHelp();
SearchGrid();
EventSystem();
Inventory();
Tutorial();
UninvitedGuestsMeter();
ApartmentMeter();
MessageStatusBox();
ProgressSavedText();
Achievement();
MainObj.stage.focus = MainObj.stage;
break;
case "TimeUp":
break;
case "CleanUp":
CleanUp();
break;
};
}
public function UninvitedGuestsMeter(){
var _local1:int;
var _local2:*;
if (pUGMMeterOn == true){
if (pShowUGMActive == true){
_local1 = (getTimer() - pUGMDelay);
if (_local1 > 3000){
_local2 = MainObj.uninvited_guests_header.alpha;
_local2 = (_local2 - Translate_Increment(0.05, 50, 30));
if (_local2 <= 0){
_local2 = 0;
};
MainObj.uninvited_guests_header.alpha = _local2;
MainObj.uninvited_guests_header.text.alpha = _local2;
MainObj.uninvited_guests_header.text.visible = false;
if (_local2 == 0){
MainObj.uninvited_guests_header.visible = false;
pShowUGMActive = false;
};
};
} else {
MainObj.uninvited_guests_header.visible = false;
};
} else {
MainObj.uninvited_guests_header.visible = false;
};
}
public function LoadGameSave(){
var _local1:SharedObject;
_local1 = SharedObject.getLocal("UninvitedGuestsSave");
if (_local1.size > 0){
pMiniGameTopScore = _local1.data.pMiniGameTopScore;
pMiniGameNPCScoreBeaten = _local1.data.pMiniGameNPCScoreBeaten;
pTutorialValueList = _local1.data.pTutorialValueList;
pVeronicasHelpActivePuzzle = _local1.data.pVeronicasHelpActivePuzzle;
pVeronicasHelpPointer = _local1.data.pVeronicasHelpPointer;
pVeronicasHelpState = _local1.data.pVeronicasHelpState;
pVeronicasHelpPuzzleList = _local1.data.pVeronicasHelpPuzzleList;
pInventoryList = _local1.data.pInventoryList;
pApartmentCleanCount = _local1.data.pApartmentCleanCount;
pVeronicasPatience = _local1.data.pVeronicasPatience;
pVeronicasPatienceMax = _local1.data.pVeronicasPatienceMax;
pNextLevel = _local1.data.pNextLevel;
pLastLevel = _local1.data.pLastLevel;
pLastLevelList = _local1.data.pLastLevelList;
pRoomTextList = _local1.data.pRoomTextList;
pActiveLevel = "Room1";
pEntity_RegistryList = _local1.data.pEntity_RegistryList;
pRoomObject_RegistryList = _local1.data.pRoomObject_RegistryList;
pMovieClipSaveList = _local1.data.pMovieClipSaveList;
pAchievementObjValues = _local1.data.pAchievementObjValues;
pGenericNPCSaveList = _local1.data.pGenericNPCSaveList;
//unresolved jump
};
}
function GetStoryEntitiesXML(){
var _local1:StoryEntitiesXML;
_local1 = new StoryEntitiesXML();
pStoryEntitiesXML = _local1.TheStoryEntitiesXML();
pRetrievedStoryEntitiesXML = true;
}
public function UIChatBubble(){
var _local1:*;
var _local2:*;
var _local3:String;
var _local4:*;
var _local5:*;
var _local6:int;
var _local7:String;
var _local8:int;
var _local9:*;
var _local10:Boolean;
var _local11:*;
var _local12:*;
var _local13:Array;
var _local14:String;
var _local15:*;
switch (UIChatBubbleState){
case "1":
if (UIChatBubbleList.length > 0){
UIChatBubbleState = "2";
};
break;
case "2":
_local1 = UIChatBubbleList[0];
_local2 = _local1["EntityName"];
_local3 = _local1["Text"];
_local4 = _local1["HighlightPoint"];
MainObj.ui_chat_bubble.visible = true;
MainObj.ui_chat_bubble.ui_chat_bubble_text.text = (_local2 + ": ");
MainObj.ui_chat_bubble.x = 320;
MainObj.ui_chat_bubble.y = 50;
MainObj.ui_chat_bubble.scaleX = 0.1;
MainObj.ui_chat_bubble.scaleY = 0.1;
MainObj.ui_chat_bubble.gotoAndStop(1);
if (_local4 != null){
MainObj.object_highlighter.visible = true;
MainObj.object_highlighter.gotoAndStop(4);
gamemap.addChild(MainObj.object_highlighter);
MainObj.object_highlighter.x = _local4.x;
MainObj.object_highlighter.y = _local4.y;
};
MainObj.ui_chat_bubble.ui_chat_skip_text.visible = true;
MainObj.ui_chat_bubble.ui_chat_skip_text.text = "Click Mouse To Skip";
UIChatBubbleParagraphPointer = 0;
UIChatBubbleState = "2a";
break;
case "2a":
_local5 = MainObj.ui_chat_bubble.scaleX;
_local5 = (_local5 + Translate_Increment(0.15, 50, 30));
if (_local5 > 1){
_local5 = 1;
};
MainObj.ui_chat_bubble.scaleX = _local5;
MainObj.ui_chat_bubble.scaleY = _local5;
if (_local5 == 1){
_local1 = UIChatBubbleList[0];
_local11 = _local1["VoiceType"];
if (_local11 != "None"){
switch (_local11){
case "Male1":
pChatChannel1 = pMaleChatter1_Snd.play();
break;
case "Female1":
pChatChannel1 = pFemaleChatter1_Snd.play();
break;
case "Normal1":
pChatChannel1 = pNormalChatter1_Snd.play();
break;
};
_local12 = new SoundTransform();
_local12.volume = 1;
pChatChannel1.soundTransform = _local12;
};
UIChatBubbleDelay2 = getTimer();
UIChatBubbleState = "3";
};
break;
case "2b":
_local6 = (getTimer() - UIChatBubbleDelay);
if (_local6 > 1500){
_local1 = UIChatBubbleList[0];
_local11 = _local1["VoiceType"];
_local2 = _local1["EntityName"];
if (_local11 != "None"){
switch (_local11){
case "Male1":
pChatChannel1 = pMaleChatter1_Snd.play();
break;
case "Female1":
pChatChannel1 = pFemaleChatter1_Snd.play();
break;
case "Normal1":
pChatChannel1 = pNormalChatter1_Snd.play();
break;
};
_local12 = new SoundTransform();
_local12.volume = 1;
pChatChannel1.soundTransform = _local12;
};
UIChatBubbleTextPointer = 0;
MainObj.ui_chat_bubble.ui_chat_bubble_text.text = (_local2 + ": ");
UIChatBubbleDelay = getTimer();
UIChatBubbleDelay2 = getTimer();
UIChatBubbleState = "3";
};
break;
case "3":
_local6 = (getTimer() - UIChatBubbleDelay);
if (_local6 > 30){
_local1 = UIChatBubbleList[0];
_local3 = _local1["Text"];
_local11 = _local1["VoiceType"];
_local13 = _local3.split("^");
_local14 = _local13[UIChatBubbleParagraphPointer];
_local15 = _local14.charAt(UIChatBubbleTextPointer);
MainObj.ui_chat_bubble.ui_chat_bubble_text.text = (MainObj.ui_chat_bubble.ui_chat_bubble_text.text + _local15);
if (MainObj.ui_chat_bubble.ui_chat_bubble_text.length > 50){
MainObj.ui_chat_bubble.ui_chat_skip_text.visible = false;
};
if (UIChatBubbleTextPointer == _local14.length){
if (_local11 != "None"){
pChatChannel1.stop();
};
if (UIChatBubbleParagraphPointer == (_local13.length - 1)){
UIChatBubbleState = "4";
} else {
UIChatBubbleParagraphPointer++;
UIChatBubbleState = "2b";
};
};
UIChatBubbleTextPointer++;
UIChatBubbleDelay = getTimer();
};
_local8 = (getTimer() - UIChatBubbleDelay2);
if ((((_local8 > 250)) && ((((SpaceBar_Down == true)) || (pMouseActions["CHATBUBBLE"]))))){
_local1 = UIChatBubbleList[0];
_local2 = _local1["EntityName"];
_local3 = _local1["Text"];
_local13 = _local3.split("^");
_local14 = _local13[UIChatBubbleParagraphPointer];
MainObj.ui_chat_bubble.ui_chat_bubble_text.text = (_local2 + ": ");
MainObj.ui_chat_bubble.ui_chat_bubble_text.text = (MainObj.ui_chat_bubble.ui_chat_bubble_text.text + _local14);
if (UIChatBubbleParagraphPointer == (_local13.length - 1)){
MainObj.ui_chat_bubble.ui_chat_skip_text.visible = false;
UIChatBubbleState = "4";
} else {
UIChatBubbleParagraphPointer++;
UIChatBubbleState = "2b";
};
if (_local11 != "None"){
pChatChannel1.stop();
};
delete pMouseActions["CHATBUBBLE"];
UIChatBubbleDelay = getTimer();
UIChatBubbleDelay2 = getTimer();
};
break;
case "4":
_local1 = UIChatBubbleList[0];
_local9 = _local1["AutoClose"];
if (_local9 == true){
_local6 = (getTimer() - UIChatBubbleDelay);
if (_local6 > 3000){
UIChatBubbleState = "5";
UIChatBubbleDelay = getTimer();
};
} else {
_local8 = (getTimer() - UIChatBubbleDelay2);
MainObj.ui_chat_bubble.ui_chat_skip_text.visible = true;
MainObj.ui_chat_bubble.ui_chat_skip_text.text = "Click To Close";
if ((((_local8 > 250)) && ((((Anykey_Down == true)) || (pMouseActions["CHATBUBBLE"]))))){
delete pMouseActions["CHATBUBBLE"];
UIChatBubbleState = "5";
UIChatBubbleDelay = getTimer();
};
};
break;
case "5":
_local5 = MainObj.ui_chat_bubble.scaleX;
_local5 = (_local5 - Translate_Increment(0.15, 50, 30));
if (_local5 < 0.1){
_local5 = 0.1;
};
MainObj.ui_chat_bubble.scaleX = _local5;
MainObj.ui_chat_bubble.scaleY = _local5;
if (_local5 == 0.1){
MainObj.ui_chat_bubble.visible = false;
UIChatBubbleState = "6";
};
break;
case "6":
_local1 = UIChatBubbleList[0];
_local10 = _local1["UnlockOptionsMenu"];
MainObj.object_highlighter.visible = false;
if (_local10 == true){
pOptionsMenuLocked = false;
};
UIChatBubbleTextPointer = 0;
UIChatBubbleList.splice(0, 1);
UIChatBubbleState = "1";
break;
};
}
public function FrameRate(){
var _local1:int;
_local1 = (getTimer() - pFrameRate_Delay);
if (_local1 > 1000){
MainObj.fps_counter.text = ("FPS " + pFrameRateCount);
pFrameRate_Delay = getTimer();
pFrameRate = pFrameRateCount;
pFrameRateCount = 0;
} else {
pFrameRateCount++;
};
}
public function ShowAchievement(_arg1:String, _arg2:int){
var _local3:NewAchievementSnd;
var _local4:SoundChannel;
var _local5:*;
MainObj.achievement_icon.medal_icon.gotoAndStop(_arg2);
MainObj.achievement_icon.text.text = _arg1;
MainObj.achievement_icon.scaleX = 0.1;
MainObj.achievement_icon.alpha = 1;
MainObj.achievement_icon.text.alpha = 1;
MainObj.achievement_icon.text.visible = true;
MainObj.achievement_icon.visible = true;
pAchievementDelay = getTimer();
pAchievementActive = true;
_local3 = new NewAchievementSnd();
_local4 = _local3.play(0, 0);
_local5 = new SoundTransform();
_local5.volume = 1;
_local4.soundTransform = _local5;
SaveGameAchievements();
}
public function InitInventoryButtons(){
MainObj.inventory.slot_1.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.inventory.slot_2.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.inventory.slot_3.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.inventory.slot_4.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.inventory.slot_5.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.inventory.slot_6.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.inventory.slot_7.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.inventory.more.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.inventory.close.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.inventory.slot_1.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.inventory.slot_2.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.inventory.slot_3.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.inventory.slot_4.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.inventory.slot_5.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.inventory.slot_6.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.inventory.slot_7.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.inventory.more.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.inventory.close.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
}
public function ShowApartmentMeter(){
if (pACMMeterOn == true){
MainObj.apartment_header.alpha = 1;
MainObj.apartment_header.text.alpha = 1;
MainObj.apartment_header.text.visible = true;
MainObj.apartment_header.visible = true;
pACMDelay = getTimer();
pShowACMActive = true;
};
}
public function SaveGameAchievements(){
var _local1:SharedObject;
_local1 = SharedObject.getLocal("UninvitedGuestsAchievements");
_local1.data.pAchievementObjList = pAchievementObjList;
_local1.flush();
}
}
}//package com.uninvitedguests
Section 39
//NPC (com.uninvitedguests.NPC)
package com.uninvitedguests {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
public class NPC extends CharacterClass {
public var pSpawnName:String;
public var pRoom:String;
public var pTossedOutDelay:int;
public var pActivate:Boolean;// = false
public var pTossedOutDir:String;
private var lastTime:int;
public var pPunchedOutDir:String;
public var pTossedOutState:String;
public var pPunchedOutDelay:int;
public var pPunchedOutState:String;
public var pEntityID:int;
public var pNPCSubtype:String;
public function NPC(_arg1:Object, _arg2:Object){
pActivate = false;
super();
gGameObj = _arg1;
MainObj = gGameObj.MainObj;
gGameObj.pDisplay_Registry_List.push(this);
gGameObj.pCharacter_Registry_List.push(this);
gGameObj.pNPC_Registry_List.push(this);
gamemap = MainObj.gamemap;
pWorldX = _arg2.X;
pWorldY = _arg2.Y;
pWorldZ = _arg2.Z;
pNPCType = _arg2.type;
pNPCSubtype = _arg2.subtype;
pMode = _arg2.mode;
pAction = _arg2.action;
pRoom = _arg2.room;
pEntityID = _arg2.id;
CreateNPCCharacter();
gGameObj.AdjustUninvitedGuestsMeter(1);
MainObj.addEventListener(Event.ENTER_FRAME, GameUpdate);
}
public function CheckModes(){
switch (pMode){
case "Active":
NPCAnimate();
CheckRoom();
break;
case "PunchedOut":
PunchedOut();
NPCAnimate();
break;
case "TossedOut":
TossedOut();
NPCAnimate();
break;
case "Idle":
CheckRoom();
break;
};
}
public function Tossed(){
gGameObj.pLock_UserInput = true;
if (pNPCType == "Puzzle"){
delete gGameObj.pEntity_RegistryList[("eid" + pEntityID)];
};
pMode = "TossedOut";
pTossedOutState = "1";
}
public function Punched(){
gGameObj.pLock_UserInput = true;
if (pNPCType == "Puzzle"){
delete gGameObj.pEntity_RegistryList[("eid" + pEntityID)];
};
pMode = "PunchedOut";
pPunchedOutState = "1";
}
public function GameUpdate(_arg1:Event){
switch (gGameObj.gGame_Status){
case "Frontend":
CheckRoom();
break;
case "GameMap":
CheckModes();
break;
case "CleanUp":
break;
};
}
public function CreateNPCCharacter(){
var _local1:MovieClip;
switch (pNPCSubtype){
case "Generic01":
_local1 = new NPCGeneric01MC();
break;
case "Generic02":
_local1 = new NPCGeneric02MC();
break;
case "Generic03":
_local1 = new NPCGeneric03MC();
break;
case "Generic04":
_local1 = new NPCGeneric04MC();
break;
case "Puzzle01":
_local1 = new NPCPuzzle01MC();
break;
case "Puzzle02":
_local1 = new NPCPuzzle02MC();
break;
case "Puzzle03":
_local1 = new NPCPuzzle03MC();
break;
case "Puzzle04":
_local1 = new NPCPuzzle04MC();
break;
case "Puzzle05":
_local1 = new NPCPuzzle05MC();
break;
case "Puzzle06":
_local1 = new NPCPuzzle06MC();
break;
case "Puzzle07":
_local1 = new NPCPuzzle07MC();
break;
case "Puzzle08":
_local1 = new NPCPuzzle08MC();
break;
case "Puzzle09":
_local1 = new NPCPuzzle09MC();
break;
case "Puzzle10":
_local1 = new NPCPuzzle10MC();
break;
case "Puzzle11":
_local1 = new NPCPuzzle11MC();
break;
case "Puzzle12":
_local1 = new NPCPuzzle12MC();
break;
case "Puzzle13":
_local1 = new NPCPuzzle13MC();
break;
case "Puzzle14":
_local1 = new NPCPuzzle14MC();
break;
case "Puzzle15":
_local1 = new NPCPuzzle15MC();
break;
case "Puzzle16":
_local1 = new NPCPuzzle16MC();
break;
case "Puzzle17a":
_local1 = new NPCPuzzle17MC();
break;
case "Puzzle17b":
_local1 = new NPCPuzzle17MC();
break;
case "Puzzle17c":
_local1 = new NPCPuzzle17MC();
break;
};
pCharacter_MC = _local1;
pCharacter_MC.visible = false;
gamemap.addChild(pCharacter_MC);
pCharacter_MC.gotoAndStop(1);
lastTime = (getTimer() - 300000);
NPCAnimate();
initShadowMovieClipAttributes();
SetWorldPosition(pWorldX, pWorldY, pWorldZ);
}
override public function initShadowMovieClipAttributes(){
gamemap = gGameObj.MainObj.gamemap;
pShadow_MC.name = "shadow";
pShadow_MC.alpha = 1;
pShadow_MC.gotoAndStop(1);
pShadow_MC.x = 0;
pShadow_MC.y = 30;
pCharacter_MC.addChild(pShadow_MC);
}
public function TossedOut(){
var _local1:int;
var _local2:ZoomawaySnd;
var _local3:SoundChannel;
var _local4:*;
var _local5:*;
switch (pTossedOutState){
case "1":
pShadow_MC.alpha = 0;
pAction = "toss";
pWorldX = gGameObj.pActiveCharacterClassRef.pWorldX;
pWorldZ = (gGameObj.pActiveCharacterClassRef.pWorldZ + 10);
gGameObj.pActiveCharacterClassRef.pAction = "invis";
SetWorldPosition(pWorldX, pWorldY, pWorldZ);
pTossedOutDelay = getTimer();
pTossedOutState = "2";
break;
case "2":
_local1 = (getTimer() - pTossedOutDelay);
if (_local1 > 1000){
gGameObj.pOptionsMenuLocked = false;
gGameObj.pActiveCharacterClassRef.pAction = "sf";
pAction = "pnchedf";
_local2 = new ZoomawaySnd();
_local3 = _local2.play(0, 0);
_local4 = new SoundTransform();
_local4.volume = 0.5;
_local3.soundTransform = _local4;
pTossedOutState = "3";
pTossedOutDelay = getTimer();
};
break;
case "3":
WorldTranslate(0, -5, 0, false);
pCharacter_MC.scaleX = (pCharacter_MC.scaleX + gGameObj.Translate_Increment(0.2, 50, 30));
pCharacter_MC.scaleY = (pCharacter_MC.scaleY + gGameObj.Translate_Increment(0.2, 50, 30));
_local1 = (getTimer() - pTossedOutDelay);
if (_local1 > 350){
_local5 = pCharacter_MC.alpha;
_local5 = (_local5 - gGameObj.Translate_Increment(0.1, 50, 30));
if (_local5 <= 0.1){
_local5 = 0;
};
pCharacter_MC.alpha = _local5;
if (_local5 == 0){
gGameObj.pLock_UserInput = false;
gGameObj.ShowUninvitedGuestsMeter();
pTossedOutDelay = getTimer();
pTossedOutState = "5";
};
};
break;
case "5":
_local1 = (getTimer() - pTossedOutDelay);
if (_local1 > 1500){
gGameObj.pAchievementObjValues["LastTossOutNPCType"] = pNPCSubtype;
gGameObj.CheckingAchievements("TossOuts");
pTossedOutState = "6";
};
break;
case "6":
Destroy();
break;
};
}
public function Destroy(){
var _local1:*;
var _local2:*;
var _local3:*;
switch (pNPCSubtype){
case "Puzzle01":
case "Puzzle02":
case "Puzzle04":
case "Puzzle05":
case "Puzzle06":
case "Puzzle08":
case "Puzzle10":
case "Puzzle11":
case "Puzzle12":
case "Puzzle13":
case "Puzzle14":
gGameObj.pVeronicasPatience = gGameObj.pVeronicasPatienceMax;
gGameObj.CreateGameSave();
break;
};
gGameObj.AdjustUninvitedGuestsMeter(-1);
pCharacter_MC.removeChild(pShadow_MC);
pShadow_MC = null;
gamemap.removeChild(pCharacter_MC);
pCharacter_MC = null;
_local1 = 0;
while (_local1 < gGameObj.pNPC_Registry_List.length) {
_local2 = gGameObj.pNPC_Registry_List[_local1];
if (_local2 == this){
gGameObj.pNPC_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
_local1 = 0;
while (_local1 < gGameObj.pDisplay_Registry_List.length) {
_local3 = gGameObj.pDisplay_Registry_List[_local1];
if (_local3 == this){
gGameObj.pDisplay_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
MainObj.removeEventListener(Event.ENTER_FRAME, GameUpdate);
}
public function CheckRoom(){
if (gGameObj.pActiveLevel == pRoom){
if (pActivate == false){
pCharacter_MC.visible = true;
pMode = "Active";
pActivate = true;
};
};
if (gGameObj.pActiveLevel != pRoom){
if (pActivate == true){
if (((!((pMode == "PunchedOut"))) && (!((pMode == "TossedOut"))))){
pCharacter_MC.visible = false;
pMode = "Idle";
pActivate = false;
};
};
};
}
public function NPCAnimate(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:Boolean;
var _local6:*;
var _local7:int;
if (pCharacter_MC == null){
return;
};
_local1 = 0;
if (lastTime == 0){
lastTime = getTimer();
};
_local2 = (getTimer() - lastTime);
if (_local2 > (pTimeLimit - _local1)){
_local5 = true;
_local6 = false;
_local7 = 0;
switch (pAction){
case "drnkf":
_local3 = 13;
_local4 = 20;
pTimeLimit = 75;
_local5 = true;
_local6 = true;
_local7 = (2000 + (Math.random() * 3000));
break;
case "drnkdl":
_local3 = 21;
_local4 = 28;
pTimeLimit = 75;
_local5 = true;
_local6 = true;
_local7 = (2000 + (Math.random() * 3000));
break;
case "drnkdr":
_local3 = 29;
_local4 = 36;
pTimeLimit = 75;
_local5 = true;
_local6 = true;
_local7 = (2000 + (Math.random() * 3000));
break;
case "dncf":
_local3 = 37;
_local4 = 45;
pTimeLimit = 100;
_local5 = true;
break;
case "dncdl":
_local3 = 46;
_local4 = 54;
pTimeLimit = 100;
_local5 = true;
break;
case "dncdr":
_local3 = 55;
_local4 = 63;
pTimeLimit = 100;
_local5 = true;
break;
case "stf":
_local3 = 8;
_local4 = 8;
pTimeLimit = 100;
break;
case "stdl":
_local3 = 9;
_local4 = 9;
pTimeLimit = 100;
break;
case "stsl":
_local3 = 10;
_local4 = 10;
pTimeLimit = 100;
break;
case "stsr":
_local3 = 11;
_local4 = 11;
pTimeLimit = 100;
break;
case "stdr":
_local3 = 12;
_local4 = 12;
pTimeLimit = 100;
break;
case "pnchedr":
_local3 = 71;
_local4 = 75;
pTimeLimit = 45;
_local5 = false;
break;
case "pnchedl":
_local3 = 77;
_local4 = 81;
pTimeLimit = 45;
_local5 = false;
break;
case "pnchedb":
_local3 = 82;
_local4 = 87;
pTimeLimit = 45;
_local5 = false;
break;
case "pnchedf":
_local3 = 64;
_local4 = 69;
pTimeLimit = 45;
_local5 = false;
break;
case "toss":
_local3 = 88;
_local4 = 98;
pTimeLimit = 75;
_local5 = false;
break;
case "lift":
_local3 = 13;
_local4 = 22;
pTimeLimit = 125;
_local5 = true;
_local6 = true;
_local7 = (2000 + (Math.random() * 3000));
break;
case "sdl":
_local3 = 3;
_local4 = 3;
pTimeLimit = 100;
break;
case "sdr":
_local3 = 7;
_local4 = 7;
pTimeLimit = 100;
break;
case "ssr":
_local3 = 6;
_local4 = 6;
pTimeLimit = 100;
break;
case "ssl":
_local3 = 2;
_local4 = 2;
pTimeLimit = 100;
break;
case "sb":
_local3 = 5;
_local4 = 5;
pTimeLimit = 100;
break;
case "sf":
_local3 = 1;
_local4 = 1;
pTimeLimit = 100;
break;
case "invis":
_local3 = 73;
_local4 = 73;
pTimeLimit = 100;
break;
};
if (pCharacter_MC.currentFrame >= _local4){
if (_local5 == true){
if (_local6 == true){
_local2 = (getTimer() - lastTime);
if (_local2 > _local7){
pCharacter_MC.gotoAndStop(_local3);
lastTime = getTimer();
};
} else {
pCharacter_MC.gotoAndStop(_local3);
lastTime = getTimer();
};
} else {
if (pAction != pLastAction){
pCharacter_MC.gotoAndStop(_local3);
lastTime = getTimer();
} else {
pCharacter_MC.gotoAndStop(_local4);
};
};
} else {
if (pCharacter_MC.currentFrame < _local3){
pCharacter_MC.gotoAndStop(_local3);
lastTime = getTimer();
} else {
pCharacter_MC.gotoAndStop((pCharacter_MC.currentFrame + 1));
lastTime = getTimer();
};
};
pLastAction = pAction;
};
}
public function PunchedOut(){
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:PowPunchSnd;
var _local5:SoundChannel;
var _local6:*;
switch (pPunchedOutState){
case "1":
_local1 = gGameObj.pActiveCharacterClassRef.pAction;
switch (_local1){
case "wb":
case "sb":
pPunchedOutDir = "Back";
break;
case "wf":
case "sf":
pPunchedOutDir = "Front";
break;
case "swr":
case "ssr":
pPunchedOutDir = "Left";
break;
case "swl":
case "ssl":
pPunchedOutDir = "Right";
break;
default:
pPunchedOutDir = "Front";
break;
};
pShadow_MC.alpha = 0;
switch (pPunchedOutDir){
case "Front":
pAction = "sb";
pWorldX = gGameObj.pActiveCharacterClassRef.pWorldX;
pWorldZ = (gGameObj.pActiveCharacterClassRef.pWorldZ + 30);
gGameObj.pActiveCharacterClassRef.pAction = "pnchf";
break;
case "Back":
pAction = "sf";
pWorldX = gGameObj.pActiveCharacterClassRef.pWorldX;
pWorldZ = (gGameObj.pActiveCharacterClassRef.pWorldZ - 30);
gGameObj.pActiveCharacterClassRef.pAction = "pnchb";
break;
case "Right":
pAction = "ssr";
pWorldX = (gGameObj.pActiveCharacterClassRef.pWorldX - 25);
pWorldZ = (gGameObj.pActiveCharacterClassRef.pWorldZ + 10);
gGameObj.pActiveCharacterClassRef.pAction = "pnchl";
break;
case "Left":
pAction = "ssl";
pWorldX = (gGameObj.pActiveCharacterClassRef.pWorldX + 25);
pWorldZ = (gGameObj.pActiveCharacterClassRef.pWorldZ + 10);
gGameObj.pActiveCharacterClassRef.pAction = "pnchr";
break;
};
SetWorldPosition(pWorldX, pWorldY, pWorldZ);
pPunchedOutDelay = getTimer();
pPunchedOutState = "2";
break;
case "2":
_local2 = (getTimer() - pPunchedOutDelay);
if (_local2 > 500){
switch (pPunchedOutDir){
case "Front":
pAction = "pnchedf";
break;
case "Back":
pAction = "pnchedb";
break;
case "Right":
pAction = "pnchedl";
break;
case "Left":
pAction = "pnchedr";
break;
};
_local4 = new PowPunchSnd();
_local5 = _local4.play(0, 0);
_local6 = new SoundTransform();
_local6.volume = 0.5;
_local5.soundTransform = _local6;
pPunchedOutState = "3";
};
break;
case "3":
switch (pPunchedOutDir){
case "Front":
WorldTranslate(0, -5, 0, false);
pCharacter_MC.scaleX = (pCharacter_MC.scaleX + gGameObj.Translate_Increment(0.2, 50, 30));
pCharacter_MC.scaleY = (pCharacter_MC.scaleY + gGameObj.Translate_Increment(0.2, 50, 30));
break;
case "Back":
WorldTranslate(0, 20, 0, false);
break;
case "Right":
WorldTranslate(-20, 10, 0, false);
break;
case "Left":
WorldTranslate(20, 10, 0, false);
break;
};
_local2 = (getTimer() - pPunchedOutDelay);
if (_local2 > 800){
gGameObj.pOptionsMenuLocked = false;
switch (pPunchedOutDir){
case "Front":
gGameObj.pActiveCharacterClassRef.pAction = "sf";
break;
case "Back":
gGameObj.pActiveCharacterClassRef.pAction = "sb";
break;
case "Right":
gGameObj.pActiveCharacterClassRef.pAction = "ssl";
break;
case "Left":
gGameObj.pActiveCharacterClassRef.pAction = "ssr";
break;
};
pPunchedOutDelay = getTimer();
pPunchedOutState = "4";
};
break;
case "4":
switch (pPunchedOutDir){
case "Front":
WorldTranslate(0, -5, 0, false);
pCharacter_MC.scaleX = (pCharacter_MC.scaleX + gGameObj.Translate_Increment(0.2, 50, 30));
pCharacter_MC.scaleY = (pCharacter_MC.scaleY + gGameObj.Translate_Increment(0.2, 50, 30));
break;
case "Back":
WorldTranslate(0, 20, 0, false);
break;
case "Right":
WorldTranslate(-20, 10, 0, false);
break;
case "Left":
WorldTranslate(20, 10, 0, false);
break;
};
_local3 = pCharacter_MC.alpha;
_local3 = (_local3 - gGameObj.Translate_Increment(0.2, 50, 30));
if (_local3 <= 0.1){
_local3 = 0;
};
pCharacter_MC.alpha = _local3;
if (_local3 == 0){
gGameObj.pLock_UserInput = false;
gGameObj.pVeronicasPatience = (gGameObj.pVeronicasPatience + 100);
pPunchedOutDelay = getTimer();
if (gGameObj.pVeronicasPatience > gGameObj.pVeronicasPatienceMax){
gGameObj.pVeronicasPatience = (gGameObj.pVeronicasPatienceMax - 1);
};
gGameObj.ShowUninvitedGuestsMeter();
pPunchedOutState = "5";
};
break;
case "5":
_local2 = (getTimer() - pPunchedOutDelay);
if (_local2 > 1500){
gGameObj.pAchievementObjValues["LastPunchOutNPCType"] = pNPCSubtype;
gGameObj.CheckingAchievements("PunchOuts");
pPunchedOutState = "6";
};
break;
case "6":
Destroy();
break;
};
}
}
}//package com.uninvitedguests
Section 40
//RunningMate (com.uninvitedguests.RunningMate)
package com.uninvitedguests {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
public class RunningMate extends CharacterClass {
public var pState:String;// = "1"
public var pDeathDir:String;
public var pDeathState:String;
public var pDeathDelay:int;
var pCameraFlash_MC:MovieClip;
private var lastTime:int;
public var pPunchedOutDir:String;
var pCameraDir:String;
public var pPunchedOutDelay:int;
public var pLock:Boolean;// = false
public var pPunchedOutState:String;
public var pType:String;
private var pStartTime:int;
var pCameraState:String;// = "1"
public function RunningMate(_arg1:Object, _arg2:Object){
var _local3:MovieClip;
pState = "1";
pLock = false;
pCameraState = "1";
super();
gGameObj = _arg1;
MainObj = gGameObj.MainObj;
gGameObj.pDisplay_Registry_List.push(this);
gGameObj.pCharacter_Registry_List.push(this);
gGameObj.pRunningMateClassRef = this;
gamemap = MainObj.gamemap;
pWorldX = _arg2.X;
pWorldY = _arg2.Y;
pWorldZ = _arg2.Z;
pSpeed = _arg2.spd;
pMode = _arg2.mode;
pType = _arg2.type;
pStartX = pWorldX;
pStartY = pWorldY;
pStartZ = pWorldZ;
switch (pType){
case "Veronica":
_local3 = new VeronicaMC();
break;
};
pCharacter_MC = _local3;
pNPCType = "RunningMate";
initShadowMovieClipAttributes();
initRunningMateMovieClipAttributes();
SetWorldPosition(pWorldX, pWorldY, pWorldZ);
MainObj.addEventListener(Event.ENTER_FRAME, GameUpdate);
}
public function CheckForPlayer(_arg1:int){
var _local2:Array;
var _local3:Array;
var _local4:Number;
_local2 = [pWorldX, pWorldY, pWorldZ];
_local3 = [gGameObj.heroClassRef.pWorldX, gGameObj.heroClassRef.pWorldY, gGameObj.heroClassRef.pWorldZ];
_local4 = gGameObj.DistanceTo(_local2, _local3);
if (_local4 < _arg1){
return (true);
};
return (false);
}
public function CheckModes(){
switch (pMode){
case "Follow":
WayPoints2();
RunningMateLogic();
Animate();
break;
case "PunchedOut":
PunchedOut();
Animate();
break;
case "Wait":
Animate();
break;
};
}
public function Punched(){
pMode = "PunchedOut";
pPunchedOutState = "1";
}
public function initRunningMateMovieClipAttributes(){
gamemap = gGameObj.MainObj.gamemap;
pCharacter_MC.gotoAndStop(1);
pAction = "sf";
pCharacter_MC.alpha = 1;
gamemap.addChild(pCharacter_MC);
}
public function DestroyRunningMate(){
var _local1:*;
var _local2:*;
var _local3:*;
gGameObj.pViceLastPos = [pWorldX, pWorldY, pWorldZ];
gamemap.removeChild(pShadow_MC);
pShadow_MC = null;
gamemap.removeChild(pCharacter_MC);
pCharacter_MC = null;
if (pCameraFlash_MC != null){
gamemap.removeChild(pCameraFlash_MC);
pCameraFlash_MC = null;
};
_local1 = 0;
while (_local1 < gGameObj.pNPC_Registry_List.length) {
_local2 = gGameObj.pNPC_Registry_List[_local1];
if (_local2 == this){
gGameObj.pNPC_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
_local1 = 0;
while (_local1 < gGameObj.pDisplay_Registry_List.length) {
_local3 = gGameObj.pDisplay_Registry_List[_local1];
if (_local3 == this){
gGameObj.pDisplay_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
MainObj.removeEventListener(Event.ENTER_FRAME, GameUpdate);
}
public function RunningMateLogic(){
var _local1:Point;
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:*;
var _local7:int;
var _local8:Object;
if (pLock == false){
switch (pState){
case "1":
_local1 = gGameObj.pActiveCharacterClassRef.pRearPos;
_local2 = new Point(_local1.x, _local1.y);
_local3 = gamemap.localToGlobal(_local2);
_local4 = new Point(_local3.x, (_local3.y + 0));
_local5 = new Point(_local4.x, _local4.y);
_local6 = gGameObj.pActiveCollisionMap;
_local5 = new Point(_local4.x, _local4.y);
if (_local6.hitTestPoint(_local5.x, _local5.y, true)){
return;
};
_local7 = (getTimer() - pStartTime);
if (_local7 > 0){
if (pWaypoints_List.length > 0){
_local8 = pWaypoints_List[(pWaypoints_List.length - 1)];
pX_Destin = _local8.x;
pZ_Destin = _local8.z;
if (((!((Math.round(pX_Destin) == Math.round(pWorldX)))) || (!((Math.round(pZ_Destin) == Math.round(pWorldZ)))))){
pWaypoints_List = [{x:_local1.x, y:0, z:_local1.y, spd:2, newwaypoint:true}];
};
} else {
if (((!((Math.round(_local1.x) == Math.round(pWorldX)))) || (!((Math.round(_local1.y) == Math.round(pWorldZ)))))){
pWaypoints_List = [{x:_local1.x, y:0, z:_local1.y, spd:2, newwaypoint:true}];
};
};
pStartTime = getTimer();
};
break;
case "2":
break;
};
};
}
public function GameUpdate(_arg1:Event){
switch (gGameObj.gGame_Status){
case "GameMap":
CheckModes();
break;
case "CleanUp":
DestroyRunningMate();
break;
};
}
public function PunchedOut(){
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:PowPunchSnd;
var _local5:SoundChannel;
var _local6:*;
switch (pPunchedOutState){
case "1":
_local1 = gGameObj.pActiveCharacterClassRef.pAction;
switch (_local1){
case "sb":
pPunchedOutDir = "Back";
break;
case "sf":
pPunchedOutDir = "Front";
break;
case "ssr":
pPunchedOutDir = "Left";
break;
case "ssl":
pPunchedOutDir = "Right";
break;
};
pShadow_MC.alpha = 0;
switch (pPunchedOutDir){
case "Front":
pAction = "sb";
pWorldX = gGameObj.pActiveCharacterClassRef.pWorldX;
pWorldZ = (gGameObj.pActiveCharacterClassRef.pWorldZ + 30);
gGameObj.pActiveCharacterClassRef.pAction = "pnchf";
break;
case "Back":
pAction = "sf";
pWorldX = gGameObj.pActiveCharacterClassRef.pWorldX;
pWorldZ = (gGameObj.pActiveCharacterClassRef.pWorldZ - 30);
gGameObj.pActiveCharacterClassRef.pAction = "pnchb";
break;
case "Right":
pAction = "ssr";
pWorldX = (gGameObj.pActiveCharacterClassRef.pWorldX - 25);
pWorldZ = (gGameObj.pActiveCharacterClassRef.pWorldZ + 10);
gGameObj.pActiveCharacterClassRef.pAction = "pnchl";
break;
case "Left":
pAction = "ssl";
pWorldX = (gGameObj.pActiveCharacterClassRef.pWorldX + 25);
pWorldZ = (gGameObj.pActiveCharacterClassRef.pWorldZ + 10);
gGameObj.pActiveCharacterClassRef.pAction = "pnchr";
break;
};
SetWorldPosition(pWorldX, pWorldY, pWorldZ);
pPunchedOutDelay = getTimer();
pPunchedOutState = "2";
break;
case "2":
_local2 = (getTimer() - pPunchedOutDelay);
if (_local2 > 500){
switch (pPunchedOutDir){
case "Front":
pAction = "pnchedf";
break;
case "Back":
pAction = "pnchedb";
break;
case "Right":
pAction = "pnchedl";
break;
case "Left":
pAction = "pnchedr";
break;
};
_local4 = new PowPunchSnd();
_local5 = _local4.play(0, 0);
_local6 = new SoundTransform();
_local6.volume = 0.5;
_local5.soundTransform = _local6;
pPunchedOutState = "3";
};
break;
case "3":
switch (pPunchedOutDir){
case "Front":
WorldTranslate(0, -5, 0, false);
pCharacter_MC.scaleX = (pCharacter_MC.scaleX + gGameObj.Translate_Increment(0.2, 50, 30));
pCharacter_MC.scaleY = (pCharacter_MC.scaleY + gGameObj.Translate_Increment(0.2, 50, 30));
break;
case "Back":
WorldTranslate(0, 20, 0, false);
break;
case "Right":
WorldTranslate(-20, 10, 0, false);
break;
case "Left":
WorldTranslate(20, 10, 0, false);
break;
};
_local2 = (getTimer() - pPunchedOutDelay);
if (_local2 > 800){
switch (pPunchedOutDir){
case "Front":
gGameObj.pActiveCharacterClassRef.pAction = "sf";
break;
case "Back":
gGameObj.pActiveCharacterClassRef.pAction = "sb";
break;
case "Right":
gGameObj.pActiveCharacterClassRef.pAction = "ssl";
break;
case "Left":
gGameObj.pActiveCharacterClassRef.pAction = "ssr";
break;
};
pPunchedOutDelay = getTimer();
pPunchedOutState = "4";
};
break;
case "4":
switch (pPunchedOutDir){
case "Front":
WorldTranslate(0, -5, 0, false);
pCharacter_MC.scaleX = (pCharacter_MC.scaleX + gGameObj.Translate_Increment(0.2, 50, 30));
pCharacter_MC.scaleY = (pCharacter_MC.scaleY + gGameObj.Translate_Increment(0.2, 50, 30));
break;
case "Back":
WorldTranslate(0, 20, 0, false);
break;
case "Right":
WorldTranslate(-20, 10, 0, false);
break;
case "Left":
WorldTranslate(20, 10, 0, false);
break;
};
_local3 = pCharacter_MC.alpha;
_local3 = (_local3 - gGameObj.Translate_Increment(0.2, 50, 30));
if (_local3 <= 0.1){
_local3 = 0;
};
pCharacter_MC.alpha = _local3;
if (_local3 == 0){
pPunchedOutState = "5";
};
break;
case "5":
break;
};
}
}
}//package com.uninvitedguests
Section 41
//StoryEntitiesXML (com.uninvitedguests.StoryEntitiesXML)
package com.uninvitedguests {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
public class StoryEntitiesXML {
function TheStoryEntitiesXML(){
var _local1:String;
var _local2:XML;
_local1 = <![CDATA[
<StoryEntities>
<StoryEntity>
<ID>1</ID>
<Name>Couch</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Room1</Room>
<AvailableActions>LOOKAT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Just my couch. I might want to search under it.</INFO>
</LOOKAT>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>2</ID>
<Name>Random Party Guy</Name>
<Type>NPC</Type>
<NPCType>Generic</NPCType>
<NPCSubType>Generic01</NPCSubType>
<State>
<StateID>1</StateID>
<Room>HallwayRoom5</Room>
<Position>200,0,500</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Great party man! Can you get me a drink?</TEXT>
<TEXT>Wicked party!</TEXT>
<TEXT>I'm about to trash this place!</TEXT>
<TEXT>I need a ride home...</TEXT>
<TEXT>Can you introduce me to that girl with the pink hair?</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>3</ID>
<Name>Random Party Girl</Name>
<Type>NPC</Type>
<NPCType>Generic</NPCType>
<NPCSubType>Generic01</NPCSubType>
<State>
<StateID>1</StateID>
<Room>HallwayRoom5</Room>
<Position>200,0,500</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Great party! Can you get me a drink?</TEXT>
<TEXT>Awesome party!</TEXT>
<TEXT>I'm about to trash this place!</TEXT>
<TEXT>I need a ride home...</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>100</ID>
<Name>Zack</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle01</NPCSubType>
<State>
<StateID>1</StateID>
<Room>Room1</Room>
<Position>175,0,592</Position>
<NPCAnimation>stsl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Go away! I gotta live blog this party!^...I'm updating my Dwitter and FaceMe status...^...soon all my friends will be jealous of how hard I'm partying!^...if you touch me, I'll smash this laptop!</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>Room1</Room>
<Position>187,0,555</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>What happened to the Internet connection!?</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>101</ID>
<Name>Phil</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle02</NPCSubType>
<State>
<StateID>1</StateID>
<Room>Room1</Room>
<Position>840,0,520</Position>
<NPCAnimation>stsl</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>Hey, I would leave, but my keys are missing!^If you kick me out, I'll just come right back for my keys.^Talk to my girlfriend Janice...^...I think she knows where my keys are...</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Cary Key -->
<ID>502</ID>
<Event>200300</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>Room1</Room>
<Position>830,0,520</Position>
<NPCAnimation>ssl</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Just kick me out now...</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>102</ID>
<Name>Janice</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle03</NPCSubType>
<State>
<StateID>1</StateID>
<Room>HallwayRoom2</Room>
<Position>160,0,365</Position>
<NPCAnimation>stsr</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Go away! I hate my boyfriend!^I tossed his keys in the fireplace!</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>Room1</Room>
<Position>800,0,450</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>You can toss me out now.</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>103</ID>
<Name>Edweird</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle04</NPCSubType>
<State>
<StateID>1</StateID>
<Room>GuestRoom1</Room>
<Position>431,0,375</Position>
<NPCAnimation>sdl</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>I'm in a trance by this spider table!^I can't move... I won't move...^Bring me a creature of equal beauty...</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Cary Key -->
<ID>504</ID>
<Event>200401</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GuestRoom1</Room>
<Position>431,0,375</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>This spidey is beautiful...</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>GuestRoom1</Room>
<Position>431,0,375</Position>
<NPCAnimation>sb</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>104</ID>
<Name>Stacey</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle05</NPCSubType>
<State>
<StateID>1</StateID>
<Room>GuestRoom2</Room>
<Position>650,0,375</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>I got a very special letter from someone!^I came in here to read it in private...^...but those girls showed up and I quickly threw it in that cabinet.^I didn't know the cabinet had a lock!^Open up that cabinet and give me that letter!^If you get me my letter back, I'll give you your bathroom key back...^Deal?</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Personal Letter -->
<ID>506</ID>
<Event>200501</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GuestRoom2</Room>
<Position>650,0,375</Position>
<NPCAnimation>ssl</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>He broke up with me!</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>105</ID>
<Name>Shaggy</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle06</NPCSubType>
<State>
<StateID>1</StateID>
<Room>HallwayRoom1</Room>
<Position>385,0,445</Position>
<NPCAnimation>sdl</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>Whoa man, don't hit me yet! Can you find my Mix CD?^If you can find my Mix CD, I'll give you your game room key!^I'm pretty sure I left my Mix CD in the other hallway somewhere.</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Mix CD -->
<ID>508</ID>
<Event>200600</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>HallwayRoom1</Room>
<Position>385,0,445</Position>
<NPCAnimation>sdl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Go play my Mix CD!</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>HallwayRoom1</Room>
<Position>385,0,445</Position>
<NPCAnimation>sdl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<Event>200602</Event>
</TALK>
</Actions>
</State>
<State>
<StateID>4</StateID>
<Room>HallwayRoom1</Room>
<Position>385,0,445</Position>
<NPCAnimation>sdl</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Just get it over with and punch me out.</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>106</ID>
<Name>Patrice</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle07</NPCSubType>
<State>
<StateID>1</StateID>
<Room>Room1</Room>
<Position>785,0,315</Position>
<NPCAnimation>dncf</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>I run the most popular clothing store in town.^If you touch me, your girlfriend will be wearing rags!^I'm not going to stop dancing until the grooves stop!</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>Room1</Room>
<Position>785,0,315</Position>
<NPCAnimation>dncf</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>You have a Mix CD for me?^Well go ahead and play it!</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>Room1</Room>
<Position>785,0,315</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Please toss me out now!^I'm so humiliated!</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>107</ID>
<Name>Jake</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle08</NPCSubType>
<State>
<StateID>1</StateID>
<Room>GameRoom</Room>
<Position>405,0,430</Position>
<NPCAnimation>sdr</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>Buzz off!^If you touch me, I'll hit you with this stick.^I'm not going to stop playing...^...until you can find me something more interesting to play.</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Virtual Rality Gear -->
<ID>510</ID>
<Event>200702</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GameRoom</Room>
<Position>405,0,430</Position>
<NPCAnimation>stsl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>I'm not going to stop dancing until the grooves stop!</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>GameRoom</Room>
<Position>405,0,430</Position>
<NPCAnimation>dncf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Argg! I've run out of energy force!</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>108</ID>
<Name>Lance</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle09</NPCSubType>
<State>
<StateID>1</StateID>
<Room>GameRoom</Room>
<Position>625,0,525</Position>
<NPCAnimation>sdr</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<Event>200700</Event>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GameRoom</Room>
<Position>625,0,525</Position>
<NPCAnimation>sdr</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Go to the Kitchen and get your Virtual Realty gear...</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>GameRoom</Room>
<Position>625,0,525</Position>
<NPCAnimation>dncf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>My Vortex Skill Level is 98!</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>109</ID>
<Name>Nate</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle10</NPCSubType>
<State>
<StateID>1</StateID>
<Room>GameRoom</Room>
<Position>385,0,300</Position>
<NPCAnimation>ssl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Hee hee!^I am the supreme Arcade Game Master!^If you beat my Top Score, I'll give you your Guest Room key!^...but my Top Score is impossible to beat!</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GameRoom</Room>
<Position>385,0,300</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>I WILL BE BACK!</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>110</ID>
<Name>Walter</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle11</NPCSubType>
<State>
<StateID>1</StateID>
<Room>HalfBath</Room>
<Position>413,0,440</Position>
<NPCAnimation>stsl</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>Umm....EXCUSE ME!?^There is a reason why I had the door locked...^...I'm stuck here because you're out of toilet paper!^Get me some toilet paper so I can finish... ...my business.^Then I'll leave...</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Camera Phone -->
<ID>513</ID>
<Event>200902</Event>
</Entity>
<Entity> <!-- Toilet Paper -->
<ID>522</ID>
<Event>201201</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>HalfBath</Room>
<Position>413,0,440</Position>
<NPCAnimation>stsl</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>... .... ....^Honestly I don't care anymore....^Just get me some toilet paper, so I can get out of here...</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Toilet Paper -->
<ID>522</ID>
<Event>201201</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>HalfBath</Room>
<Position>440,0,440</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>... .... ....^Honestly I don't care anymore....^Just get me some toilet paper, so I can get out of here...</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>111</ID>
<Name>Theodore</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle12</NPCSubType>
<State>
<StateID>1</StateID>
<Room>Kitchen</Room>
<Position>620,0,300</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<Event>200900</Event>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>Kitchen</Room>
<Position>620,0,300</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>Go get me a picture of an embarrassing situation!^Remember you can use my camera phone.^Once you got the picture...^...give me my phone back and I'll check out what you got.^If it's good I'll pay you 50 SoBucks.</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Camera Phone -->
<ID>513</ID>
<Event>200901</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>Kitchen</Room>
<Position>620,0,300</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>Did you get anything good?^...give me my phone back and I'll check out what you got.^If it's good I'll pay you 50 SoBucks.</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Camera Phone -->
<ID>513</ID>
<Event>200903</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>4</StateID>
<Room>Kitchen</Room>
<Position>620,0,300</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Wait... wait...^...why don't you take some more pictures???^It's business, not personal!</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>112</ID>
<Name>Gilbert</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle13</NPCSubType>
<State>
<StateID>1</StateID>
<Room>Kitchen</Room>
<Position>420,0,320</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<Event>201000</Event>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>Kitchen</Room>
<Position>420,0,320</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>If you don't bring me 100 SoBucks, I'm going to call the cops.^Someone has to pay for this food!</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- 50 SoBucks -->
<ID>514</ID>
<Event>201001</Event>
</Entity>
<Entity> <!-- 20 SoBucks -->
<ID>515</ID>
<Event>201002</Event>
</Entity>
<Entity> <!-- 30 SoBucks -->
<ID>516</ID>
<Event>201003</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>Kitchen</Room>
<Position>420,0,320</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>You brought me 20 SoBucks so far...^I still need 80 more SoBucks.^Pay up!</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- 50 SoBucks -->
<ID>514</ID>
<Event>201004</Event>
</Entity>
<Entity> <!-- 30 SoBucks -->
<ID>516</ID>
<Event>201005</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>4</StateID>
<Room>Kitchen</Room>
<Position>420,0,320</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>You brought me 30 SoBucks so far...^I still need 70 more SoBucks.^Pay up!</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- 50 SoBucks -->
<ID>514</ID>
<Event>201006</Event>
</Entity>
<Entity> <!-- 20 SoBucks -->
<ID>515</ID>
<Event>201005</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>5</StateID>
<Room>Kitchen</Room>
<Position>420,0,320</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>You brought me 50 SoBucks so far...^I still need 50 more SoBucks.^Pay up!</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- 20 SoBucks -->
<ID>515</ID>
<Event>201004</Event>
</Entity>
<Entity> <!-- 30 SoBucks -->
<ID>516</ID>
<Event>201006</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>6</StateID>
<Room>Kitchen</Room>
<Position>420,0,320</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>You brought me 50 SoBucks so far...^I still need 50 more SoBucks.^Pay up!</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- 50 SoBucks -->
<ID>514</ID>
<Event>201007</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>7</StateID>
<Room>Kitchen</Room>
<Position>420,0,320</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>You brought me 70 SoBucks so far...^I still need 30 more SoBucks.^Pay up!</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- 30 SoBucks -->
<ID>516</ID>
<Event>201007</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>8</StateID>
<Room>Kitchen</Room>
<Position>420,0,320</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>You brought me 80 SoBucks so far...^I still need 20 more SoBucks.^Pay up!</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- 20 SoBucks -->
<ID>515</ID>
<Event>201007</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>9</StateID>
<Room>Kitchen</Room>
<Position>420,0,320</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Okay, looks like you're paid up now...</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>113</ID>
<Name>Cindy</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle14</NPCSubType>
<State>
<StateID>1</StateID>
<Room>GuestRoom3</Room>
<Position>475,0,425</Position>
<NPCAnimation>ssl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<Event>201100</Event>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GuestRoom3</Room>
<Position>475,0,425</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>Oh goodness, did you find the asprin yet?</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Asprin -->
<ID>517</ID>
<Event>201101</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>GuestRoom3</Room>
<Position>475,0,425</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>Oh goodnes, did you get the bottled water yet?</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Bottled Water -->
<ID>518</ID>
<Event>201102</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>4</StateID>
<Room>GuestRoom3</Room>
<Position>475,0,425</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>TALK,USE ITEM</AvailableActions>
<Actions>
<TALK>
<TEXT>Oh goodnes, did you get the candle yet?</TEXT>
</TALK>
<USEITEM>
<Entity> <!-- Candle -->
<ID>519</ID>
<Event>201103</Event>
</Entity>
<Entity> <!-- Lit Candle -->
<ID>520</ID>
<Event>201104</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>5</StateID>
<Room>GuestRoom3</Room>
<Position>475,0,425</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions>PUNCH,TOSS,TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>It's okay to toss me... ...the forest animals shall catch me!</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>10</StateID>
<Room>GuestRoom3</Room>
<Position>475,0,425</Position>
<NPCAnimation>ssl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>...</TEXT>
</TALK>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>114</ID>
<Name>Hugo the Giant</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle16</NPCSubType>
<State>
<StateID>1</StateID>
<Room>MasterBath</Room>
<Position>585,0,355</Position>
<NPCAnimation>sdl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<Event>201300</Event>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>MasterBath</Room>
<Position>565,0,425</Position>
<NPCAnimation>stsl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Hugo thirsty!^FILL UP DRINK ON TABLE!^Talk to me drink is filled.</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>MasterBath</Room>
<Position>565,0,425</Position>
<NPCAnimation>stsl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<Event>201302</Event>
</TALK>
</Actions>
</State>
<State>
<StateID>4</StateID>
<Room>MasterBath</Room>
<Position>475,0,425</Position>
<NPCAnimation>drnkdl</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
<State>
<StateID>5</StateID>
<Room>MasterBath</Room>
<Position>475,0,425</Position>
<NPCAnimation>sdr</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>115</ID>
<Name>Phoebe</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle17a</NPCSubType>
<State>
<StateID>1</StateID>
<Room>MasterBath</Room>
<Position>708,0,422</Position>
<NPCAnimation>stsl</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>You need to get out of Hugo's bathroom.</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>MasterBath</Room>
<Position>575,0,345</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>116</ID>
<Name>Sha Sha</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle17b</NPCSubType>
<State>
<StateID>1</StateID>
<Room>MasterBath</Room>
<Position>645,0,485</Position>
<NPCAnimation>stsr</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>You need to get out of Hugo's bathroom.</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>MasterBath</Room>
<Position>580,0,325</Position>
<NPCAnimation>ssl</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>117</ID>
<Name>Lexy</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle17c</NPCSubType>
<State>
<StateID>1</StateID>
<Room>MasterBath</Room>
<Position>680,0,467</Position>
<NPCAnimation>stdr</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>You need to get out of Hugo's bathroom.</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>MasterBath</Room>
<Position>630,0,345</Position>
<NPCAnimation>sdl</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>118</ID>
<Name>Burgerman</Name>
<Type>NPC</Type>
<NPCType>Puzzle</NPCType>
<NPCSubType>Puzzle15</NPCSubType>
<State>
<StateID>1</StateID>
<Room>MasterBedroom</Room>
<Position>610,0,475</Position>
<NPCAnimation>lift</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<Event>201303</Event>
</TALK>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>MasterBedroom</Room>
<Position>610,0,475</Position>
<NPCAnimation>sf</NPCAnimation>
</State>
<State>
<StateID>3</StateID>
<Room>MasterBedroom</Room>
<Position>610,0,475</Position>
<NPCAnimation>stsl</NPCAnimation>
</State>
<State>
<StateID>4</StateID>
<Room>MasterBedroom</Room>
<Position>610,0,475</Position>
<NPCAnimation>stsr</NPCAnimation>
</State>
<State>
<StateID>5</StateID>
<Room>MasterBedroom</Room>
<Position>610,0,475</Position>
<NPCAnimation>lift</NPCAnimation>
<AvailableActions>TALK</AvailableActions>
<Actions>
<TALK>
<TEXT>Good luck getting rid of Hugo the Giant...</TEXT>
</TALK>
</Actions>
</State>
<State>
<StateID>6</StateID>
<Room>MasterBath</Room>
<Position>600,0,340</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
<State>
<StateID>7</StateID>
<Room>MasterBath</Room>
<Position>600,0,340</Position>
<NPCAnimation>stsl</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
<State>
<StateID>8</StateID>
<Room>MasterBedroom</Room>
<Position>450,0,450</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
<State>
<StateID>9</StateID>
<Room>MasterBedroom</Room>
<Position>450,0,350</Position>
<NPCAnimation>sf</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
<State>
<StateID>10</StateID>
<Room>MasterBedroom</Room>
<Position>600,0,350</Position>
<NPCAnimation>ssl</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
<State>
<StateID>11</StateID>
<Room>MasterBedroom</Room>
<Position>400,0,350</Position>
<NPCAnimation>lift</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
<State>
<StateID>12</StateID>
<Room>MasterBedroom</Room>
<Position>500,0,440</Position>
<NPCAnimation>sb</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
<State>
<StateID>13</StateID>
<Room>MasterBedroom</Room>
<Position>500,0,550</Position>
<NPCAnimation>sb</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
<State>
<StateID>14</StateID>
<Room>MasterBedroom</Room>
<Position>525,0,465</Position>
<NPCAnimation>ssl</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
<State>
<StateID>15</StateID>
<Room>MasterBedroom</Room>
<Position>525,0,465</Position>
<NPCAnimation>stsl</NPCAnimation>
<AvailableActions></AvailableActions>
<Actions>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>200</ID>
<Name>Couch</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Room1</Room>
<MovieClipName>room1_couch2</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Eww... someone puked on the couch!^This needs to be cleaned up before I even think of searching underneath it!</INFO>
</LOOKAT>
<USE>
<EventID>200100</EventID>
</USE>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>200101</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>Room1</Room>
<MovieClipName>room1_couch2</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Now that I have the couch cleaned, I can search under it now.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>6</ARRAYCOL>
<ARRAYITEM>527</ARRAYITEM>
<ARRAYITEM>529</ARRAYITEM>
<ARRAYITEM>529</ARRAYITEM>
<ARRAYITEM>529</ARRAYITEM>
</SEARCH>
<USE>
<EventID>200100</EventID>
</USE>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>201</ID>
<Name>Refrigerator</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Kitchen</Room>
<MovieClipName>kitchen_refrig</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Looks like my refrigerator has been raided, but hopefully there's still a few things left in here...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>4</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>518</ARRAYITEM>
<ARRAYITEM>524</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>202</ID>
<Name>Computer</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>MasterBedroom</Room>
<MovieClipName>masterbedroom_computer</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Looks like my computer is still in good shape...^...but it looks very dusty.</INFO>
</LOOKAT>
<USE>
<EventID>200200</EventID>
</USE>
<USEITEM>
<Entity> <!-- Feather -->
<ID>525</ID>
<Event>400004</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>MasterBedroom</Room>
<MovieClipName>masterbedroom_computer</MovieClipName>
<AvailableActions>LOOK AT,USE</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Looks like my computer is still in good shape...</INFO>
</LOOKAT>
<USE>
<EventID>200201</EventID>
</USE>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>MasterBedroom</Room>
<MovieClipName>masterbedroom_computer</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Looks like my computer is still in good shape... and clean!</INFO>
</LOOKAT>
<USE>
<EventID>200200</EventID>
</USE>
<USEITEM>
<Entity> <!-- Feather -->
<ID>525</ID>
<Event>400000</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>203</ID>
<Name>Fireplace</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_fireplace</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The fireplace is currently on.^I probably could search the fireplace if I turn it off...</INFO>
</LOOKAT>
<USE>
<EventID>201105</EventID>
</USE>
<USEITEM>
<Entity> <!-- Candle -->
<ID>519</ID>
<Event>201107</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_fireplace</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The fireplace is currently off.^I probably could light something if I turn it on...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>3</ARRAYCOL>
<ARRAYITEM>502</ARRAYITEM>
</SEARCH>
<USE>
<EventID>201106</EventID>
</USE>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_fireplace</MovieClipName>
<AvailableActions>LOOK AT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I think I'm done with the fire place for the night...</INFO>
</LOOKAT>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>204</ID>
<Name>Spider Droid Table</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_droidtable</MovieClipName>
<AvailableActions>LOOK AT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I need to search inside this table...^...but this guy is creeping me out.^So I should get rid of him first...</INFO>
</LOOKAT>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_droidtable</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Without that weirdo around...^...I can now search inside this table.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>3</ARRAYCOL>
<ARRAYITEM>505</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>205</ID>
<Name>Cubby Shelf</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom2</Room>
<MovieClipName>guestroom2_cubbyshelf</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I think I put a bug net in here...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>503</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>206</ID>
<Name>Plant</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom1</Room>
<MovieClipName>hallway1_plant1</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Whoa, there's a spider on the plant!^This could be useful...^But I'm not touching that spider with my hand!</INFO>
</LOOKAT>
<USEITEM>
<Entity> <!-- Bug Net -->
<ID>503</ID>
<Event>200400</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>HallwayRoom1</Room>
<MovieClipName>hallway1_plant1</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Now that I have my bug net, I can search the plant.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
<ARRAYITEM>504</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>207</ID>
<Name>Cabinet</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom2</Room>
<MovieClipName>guestroom2_cabinet</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>This cabinet is locked.^Pretty sure I have a key for this cabinet in my Spider table.</INFO>
</LOOKAT>
<USEITEM>
<Entity> <!-- Cabinet Key -->
<ID>505</ID>
<Event>200500</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GuestRoom2</Room>
<MovieClipName>guestroom2_cabinet</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>This cabinet is now unlocked.^But it's looking pretty dusty...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>506</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Feather -->
<ID>525</ID>
<Event>400002</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>GuestRoom2</Room>
<MovieClipName>guestroom2_cabinet</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>This cabinet is now dust free!</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>506</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Feather -->
<ID>525</ID>
<Event>400000</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>208</ID>
<Name>Bench</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_bench1</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Ugh! ...someone got food all over this bench too!</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>508</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400008</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_bench1</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Okay his bench is now clean...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>4</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
<ARRAYITEM>508</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400000</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>209</ID>
<Name>Stereo</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Room1</Room>
<MovieClipName>room1_cdplayer</MovieClipName>
<AvailableActions>LOOK AT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My stereo...^...although it's playing some generic pop music right now...</INFO>
</LOOKAT>
<USEITEM>
<Entity> <!-- Mix CD -->
<ID>508</ID>
<Event>200101</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>Room1</Room>
<MovieClipName>room1_cdplayer</MovieClipName>
<AvailableActions>LOOK AT,USE</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My stereo...^...although it's playing some generic pop music right now...</INFO>
</LOOKAT>
<USE>
<EventID>200601</EventID>
</USE>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>Room1</Room>
<MovieClipName>room1_cdplayer</MovieClipName>
<AvailableActions>LOOK AT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I think this stereo is done for the night.</INFO>
</LOOKAT>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>210</ID>
<Name>Pool Table</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GameRoom</Room>
<MovieClipName>gameroom_pooltable</MovieClipName>
<AvailableActions>LOOK AT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My pool table...^...WAIT!^I see 30 SoBucks in the corner pocket.^If I can distract Jake, I can get the money.</INFO>
</LOOKAT>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GameRoom</Room>
<MovieClipName>gameroom_pooltable</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Great, now I can search my pool table.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>3</ARRAYCOL>
<ARRAYITEM>516</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>211</ID>
<Name>Arcade Game</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GameRoom</Room>
<MovieClipName>gameroom_minigame</MovieClipName>
<AvailableActions>LOOK AT,USE</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My rare arcade cabinet of BlockHeads Retro...^...developed by the underrated game developer Chris Evans!</INFO>
</LOOKAT>
<USE>
<EventID>200800</EventID>
</USE>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GameRoom</Room>
<MovieClipName>gameroom_minigame</MovieClipName>
<AvailableActions>LOOK AT,USE</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My rare arcade cabinet of BlockHeads Retro...^...developed by the underrated game developer Chris Evans!</INFO>
</LOOKAT>
<USE>
<EventID>200801</EventID>
</USE>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>212</ID>
<Name>Medicine Cabinet</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HalfBath</Room>
<MovieClipName>halfbath_cabinet</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Argg, my medicine cabinet has been almost completely raided!^I hope someone enjoyed my laxative...^Though I think I still have something in here...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>3</ARRAYCOL>
<ARRAYITEM>517</ARRAYITEM>
<ARRAYITEM>526</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>213</ID>
<Name>Dining Table</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Kitchen</Room>
<MovieClipName>kitchen_table</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>There seems to be a lot of stuff under the table...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>7</ARRAYCOL>
<ARRAYITEM>519</ARRAYITEM>
<ARRAYITEM>532</ARRAYITEM>
<ARRAYITEM>532</ARRAYITEM>
<ARRAYITEM>532</ARRAYITEM>
<ARRAYITEM>532</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>214</ID>
<Name>Drink</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>MasterBath</Room>
<MovieClipName>masterbath_glass1</MovieClipName>
<AvailableActions>LOOK AT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>This is an empty glass...</INFO>
</LOOKAT>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>MasterBath</Room>
<MovieClipName>masterbath_glass1</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>This is an empty glass... ...I should try filling it up...</INFO>
</LOOKAT>
<USEITEM>
<Entity> <!-- Laxative -->
<ID>523</ID>
<Text>I think I should put some soda into it first.</Text>
</Entity>
<Entity> <!-- Mountain Eww Soda -->
<ID>524</ID>
<Event>201301</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>3</StateID>
<Room>MasterBath</Room>
<MovieClipName>masterbath_glass1</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>This glass is filled with Mountain Eww Soda...^...maybe I should try giving it to Hugo now...</INFO>
</LOOKAT>
<USEITEM>
<Entity> <!-- Laxative -->
<ID>523</ID>
<Event>300000</Event>
</Entity>
<Entity> <!-- Mountain Eww Soda -->
<ID>524</ID>
<Text>I've already added soda to the glass...^...maybe I should try giving it to Hugo now...</Text>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>215</ID>
<Name>Toilet Paper</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>MasterBath</Room>
<MovieClipName>masterbath_toiletpaper</MovieClipName>
<AvailableActions>LOOK AT,USE</AvailableActions>
<Actions>
<LOOKAT>
<INFO>A full toilet paper roll.</INFO>
</LOOKAT>
<USE>
<EventID>201200</EventID>
</USE>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>MasterBath</Room>
<MovieClipName>masterbath_toiletpaper</MovieClipName>
<AvailableActions>LOOK AT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>There is about a half a roll left.^I probably shouldn't take any more...</INFO>
</LOOKAT>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>216</ID>
<Name>Cabinet</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_cabinet</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My cabinet for the guest room.^Though it's looking kind of dusty...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>3</ARRAYCOL>
</SEARCH>
<USEITEM>
<Entity> <!-- Feather -->
<ID>525</ID>
<Event>400001</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_cabinet</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My cabinet is now nice and clean.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>3</ARRAYCOL>
</SEARCH>
<USEITEM>
<Entity> <!-- Feather -->
<ID>525</ID>
<Event>400000</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>217</ID>
<Name>Couch</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Room1</Room>
<MovieClipName>room1_couch1</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Looks like there's a lot of trash under this couch.^But it's a big couch...^I should probaly wait until Veronica has a lot of patience...^...this could take a while.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>6</ARRAYCOL>
<ARRAYITEM>528</ARRAYITEM>
<ARRAYITEM>528</ARRAYITEM>
<ARRAYITEM>530</ARRAYITEM>
<ARRAYITEM>530</ARRAYITEM>
<ARRAYITEM>530</ARRAYITEM>
</SEARCH>
<USE>
<EventID>200100</EventID>
</USE>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>218</ID>
<Name>Couch</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Room1</Room>
<MovieClipName>room1_couch3</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Looks like there's a lot of trash under this couch.^But it's a big couch...^I should probaly wait until Veronica has a lot of patience...^...this could take a while.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>6</ARRAYCOL>
<ARRAYITEM>515</ARRAYITEM>
<ARRAYITEM>528</ARRAYITEM>
<ARRAYITEM>528</ARRAYITEM>
<ARRAYITEM>529</ARRAYITEM>
<ARRAYITEM>529</ARRAYITEM>
<ARRAYITEM>529</ARRAYITEM>
</SEARCH>
<USE>
<EventID>200100</EventID>
</USE>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>219</ID>
<Name>WiFi Adaptor</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Room1</Room>
<MovieClipName>room1_cpu</MovieClipName>
<AvailableActions>LOOK AT,USE</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The WiFi adaptor to the laptop...^...if I yank this he'll lose his Internet connection...</INFO>
</LOOKAT>
<USE>
<EventID>200202</EventID>
</USE>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>Room1</Room>
<MovieClipName>room1_cpu</MovieClipName>
<AvailableActions>LOOK AT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I probably should leave this WiFi adaptor unplugged...^...so no one else uses the Internet...</INFO>
</LOOKAT>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>220</ID>
<Name>Plant</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom1</Room>
<MovieClipName>hallway1_plant2</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>One of my many beautiful plants.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>221</ID>
<Name>Chair</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom1</Room>
<MovieClipName>hallway1_chair1</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Argg... ...there are food stains on my chair!</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>530</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400010</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>HallwayRoom1</Room>
<MovieClipName>hallway1_chair1</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The chair is now clean...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>530</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400000</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>222</ID>
<Name>Chair</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom1</Room>
<MovieClipName>hallway1_chair2</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>There are food stains on my chair!</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>529</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400011</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>HallwayRoom1</Room>
<MovieClipName>hallway1_chair2</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>There chair is now clean...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>529</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400000</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>223</ID>
<Name>Couch</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_couch</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The guest room couch...^...it looks like it's still in okay condition...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>5</ARRAYCOL>
<ARRAYITEM>529</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>224</ID>
<Name>Night Stand</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_nightstand</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The guest room couch...^...it looks like it's still in okay condition...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
<ARRAYITEM>528</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>225</ID>
<Name>Desk</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_desk</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The guest room desk...^...it looks like it's still in okay condition...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>1</ARRAYROW>
<ARRAYCOL>3</ARRAYCOL>
<ARRAYITEM>529</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>226</ID>
<Name>Guest Bed</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom1</Room>
<MovieClipName>guestroom1_bed</MovieClipName>
<AvailableActions>LOOK AT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The guest bed...^...I can see there's nothing under here..</INFO>
</LOOKAT>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>227</ID>
<Name>Guest Bed</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom2</Room>
<MovieClipName>guestroom2_bed</MovieClipName>
<AvailableActions>LOOK AT</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The guest bed...^...I can see there's nothing under here..</INFO>
</LOOKAT>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>228</ID>
<Name>Chair</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom2</Room>
<MovieClipName>guestroom2_chair1</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I think there's some trash under this chair...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>530</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>229</ID>
<Name>Chair</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom2</Room>
<MovieClipName>guestroom2_chair2</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I can't tell if there's something under this chair...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>230</ID>
<Name>Night Stand</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom2</Room>
<MovieClipName>guestroom2_nightstand</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I can't tell if there's something under this chair...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
<ARRAYITEM>530</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>230</ID>
<Name>Night Stand</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom2</Room>
<MovieClipName>guestroom2_nightstand</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I can't tell if there's something under this chair...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
<ARRAYITEM>530</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>231</ID>
<Name>Night Stand</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>MasterBedroom</Room>
<MovieClipName>masterbedroom_nightstand1</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My night stand...^...it still looks good fortunately.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>1</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>232</ID>
<Name>Night Stand</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>MasterBedroom</Room>
<MovieClipName>masterbedroom_nightstand2</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My night stand...^...it still looks good fortunately.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>1</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>528</ARRAYITEM>
<ARRAYITEM>528</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>233</ID>
<Name>King Size Bed</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>MasterBedroom</Room>
<MovieClipName>masterbedroom_bed</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My bed...^...where I wish the magic would happen more often...^...WAIT!^There's a food stain on my bed!^At least I hope it's a food stain...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>6</ARRAYCOL>
<ARRAYITEM>529</ARRAYITEM>
<ARRAYITEM>529</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400007</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>MasterBedroom</Room>
<MovieClipName>masterbedroom_bed</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Well my bed is clean now...^...oh yeah!</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>6</ARRAYCOL>
<ARRAYITEM>529</ARRAYITEM>
<ARRAYITEM>529</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400000</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>234</ID>
<Name>Couch</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom3</Room>
<MovieClipName>guestroom3_couch</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The guest room sofa...^...though it looks a bit damp from tears...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>6</ARRAYCOL>
<ARRAYITEM>531</ARRAYITEM>
<ARRAYITEM>531</ARRAYITEM>
<ARRAYITEM>531</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>235</ID>
<Name>Cabinet</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom3</Room>
<MovieClipName>guestroom3_cabinet</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The cabinet is locked.^But it doesn't look like anyone has touched this...^...so no need to open it.^However, it does look a little dusty...</INFO>
</LOOKAT>
<USEITEM>
<Entity> <!-- Feather -->
<ID>525</ID>
<Event>400003</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>GuestRoom3</Room>
<MovieClipName>guestroom3_cabinet</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The cabinet is locked.^But it doesn't look like anyone has touched this...^...so no need to open it.^At least it's nice and clean.</INFO>
</LOOKAT>
<USEITEM>
<Entity> <!-- Feather -->
<ID>525</ID>
<Event>400003</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>236</ID>
<Name>Guest Bed</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom3</Room>
<MovieClipName>guestroom3_bed</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The guest bed...^...still looks unused thankfully...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>3</ARRAYROW>
<ARRAYCOL>3</ARRAYCOL>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>237</ID>
<Name>Night Stand</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>GuestRoom3</Room>
<MovieClipName>guestroom3_nightstand</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The guest room night stand...^...still looks okay...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
<ARRAYITEM>533</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>238</ID>
<Name>Bench</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_bench2</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My hallway bench...^...and it looks there's smashed burger all over the seat!</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>4</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
<ARRAYITEM>530</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400009</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_bench2</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Okay this bench is now clean...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>4</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
<ARRAYITEM>530</ARRAYITEM>
</SEARCH>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400000</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>239</ID>
<Name>Plant</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_plant1</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>One of my many beautiful plants.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
<ARRAYITEM>528</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>240</ID>
<Name>Plant</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_plant2</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>One of my many beautiful plants.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>1</ARRAYCOL>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>241</ID>
<Name>Painting</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_painting</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>A Von Deasy painting...^...though it looks a bit dusty...</INFO>
</LOOKAT>
<USEITEM>
<Entity> <!-- Feather -->
<ID>525</ID>
<Event>400005</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_painting</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>A Von Deasy painting...^...and it looks pristine now!</INFO>
</LOOKAT>
<USEITEM>
<Entity> <!-- Feather -->
<ID>525</ID>
<Event>400000</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>242</ID>
<Name>Toilet</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HalfBath</Room>
<MovieClipName>halfbath_toilet</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Ugh this toilet is... ...Nasty!^What did that guy do!?</INFO>
</LOOKAT>
<USE>
<TEXT>Umm, now isn't the time...</TEXT>
</USE>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400006</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>HalfBath</Room>
<MovieClipName>halfbath_toilet</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Wow... ...I don't know how I cleaned that...^...but I did...</INFO>
</LOOKAT>
<USE>
</USE>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Event>400000</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>243</ID>
<Name>Trash</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HalfBath</Room>
<MovieClipName>halfbath_trash</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>...I wish more people use this...^...I should probably put any trash I find in the garbage cans around the house...</INFO>
</LOOKAT>
<USE>
</USE>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Text>I don't think cleaning the trash is necessary.</Text>
</Entity>
<Entity> <!-- Paper Cup -->
<ID>528</ID>
<Event>400014</Event>
</Entity>
<Entity> <!-- Paper Plate -->
<ID>529</ID>
<Event>400015</Event>
</Entity>
<Entity> <!-- Burger Wrapper -->
<ID>530</ID>
<Event>400016</Event>
</Entity>
<Entity> <!-- Snotty Tissue -->
<ID>531</ID>
<Event>400017</Event>
</Entity>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>532</ID>
<Text>Umm, I'm not going to throw away my nice ceramic dishes...^...I'm better off cleaning them in the sink or something.</Text>
</Entity>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>533</ID>
<Text>Umm, I'm not going to throw away my nice ceramic dishes...^...I'm better off cleaning them in the sink or something.</Text>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>244</ID>
<Name>Kitchen Sink</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Kitchen</Room>
<MovieClipName>kitchen_sink</MovieClipName>
<AvailableActions>LOOK AT,SEARCH,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>My kitchen sink...^...I can use this to clean dirty cups and plates...</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>500</ARRAYITEM>
</SEARCH>
<USE>
</USE>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Text>There's still detergent soap here...^...I don't need this to clean dishes.</Text>
</Entity>
<Entity> <!-- Paper Cup -->
<ID>528</ID>
<Text>There's no point washing this...^...I should just throw this in the trash.</Text>
</Entity>
<Entity> <!-- Paper Plate -->
<ID>529</ID>
<Text>There's no point washing this...^...I should just throw this in the trash.</Text>
</Entity>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>532</ID>
<Event>400012</Event>
</Entity>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>533</ID>
<Event>400013</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>245</ID>
<Name>Cabinet</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Kitchen</Room>
<MovieClipName>kitchen_cabinet</MovieClipName>
<AvailableActions>LOOK AT,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I keep my Virtual Reality game equipment in here.^Thankfully it's locked and no one has opened it.</INFO>
</LOOKAT>
<USEITEM>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>505</ID>
<Event>200701</Event>
</Entity>
</USEITEM>
</Actions>
</State>
<State>
<StateID>2</StateID>
<Room>Kitchen</Room>
<MovieClipName>kitchen_cabinet</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>I can now search this cabinet.</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>2</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>510</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>246</ID>
<Name>Sofa</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Kitchen</Room>
<MovieClipName>kitchen_sofa</MovieClipName>
<AvailableActions>LOOK AT,SEARCH</AvailableActions>
<Actions>
<LOOKAT>
<INFO>Ugh...^...looks like drinks have been spilled on this sofa!</INFO>
</LOOKAT>
<SEARCH>
<ARRAYROW>4</ARRAYROW>
<ARRAYCOL>2</ARRAYCOL>
<ARRAYITEM>533</ARRAYITEM>
<ARRAYITEM>533</ARRAYITEM>
</SEARCH>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>247</ID>
<Name>Trash Can</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom1</Room>
<MovieClipName>hallway1_trash</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>...I wish more people use this...^...I should probably put any trash I find in the garbage cans around the house...</INFO>
</LOOKAT>
<USE>
<TEXT>I should try throwing trash in here...</TEXT>
</USE>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Text>I don't think cleaning the trash is necessary.</Text>
</Entity>
<Entity> <!-- Paper Cup -->
<ID>528</ID>
<Event>400014</Event>
</Entity>
<Entity> <!-- Paper Plate -->
<ID>529</ID>
<Event>400015</Event>
</Entity>
<Entity> <!-- Burger Wrapper -->
<ID>530</ID>
<Event>400016</Event>
</Entity>
<Entity> <!-- Snotty Tissue -->
<ID>531</ID>
<Event>400017</Event>
</Entity>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>532</ID>
<Text>Umm, I'm not going to throw away my nice ceramic dishes...^...I'm better off cleaning them in the sink or something.</Text>
</Entity>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>533</ID>
<Text>Umm, I'm not going to throw away my nice ceramic dishes...^...I'm better off cleaning them in the sink or something.</Text>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>248</ID>
<Name>Trash Can</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_trash</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>...I wish more people use this...^...I should probably put any trash I find in the garbage cans around the house...</INFO>
</LOOKAT>
<USE>
<TEXT>I should try throwing trash in here...</TEXT>
</USE>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Text>I don't think cleaning the trash is necessary.</Text>
</Entity>
<Entity> <!-- Paper Cup -->
<ID>528</ID>
<Event>400014</Event>
</Entity>
<Entity> <!-- Paper Plate -->
<ID>529</ID>
<Event>400015</Event>
</Entity>
<Entity> <!-- Burger Wrapper -->
<ID>530</ID>
<Event>400016</Event>
</Entity>
<Entity> <!-- Snotty Tissue -->
<ID>531</ID>
<Event>400017</Event>
</Entity>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>532</ID>
<Text>Umm, I'm not going to throw away my nice ceramic dishes...^...I'm better off cleaning them in the sink or something.</Text>
</Entity>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>533</ID>
<Text>Umm, I'm not going to throw away my nice ceramic dishes...^...I'm better off cleaning them in the sink or something.</Text>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>249</ID>
<Name>Trash Can</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Kitchen</Room>
<MovieClipName>kitchen_trash</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>...I wish more people use this...^...I should probably put any trash I find in the garbage cans around the house...</INFO>
</LOOKAT>
<USE>
<TEXT>I should try throwing trash in here...</TEXT>
</USE>
<USEITEM>
<Entity> <!-- Spray Detergent -->
<ID>500</ID>
<Text>I don't think cleaning the trash is necessary.</Text>
</Entity>
<Entity> <!-- Paper Cup -->
<ID>528</ID>
<Event>400014</Event>
</Entity>
<Entity> <!-- Paper Plate -->
<ID>529</ID>
<Event>400015</Event>
</Entity>
<Entity> <!-- Burger Wrapper -->
<ID>530</ID>
<Event>400016</Event>
</Entity>
<Entity> <!-- Snotty Tissue -->
<ID>531</ID>
<Event>400017</Event>
</Entity>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>532</ID>
<Text>Umm, I'm not going to throw away my nice ceramic dishes...^...I'm better off cleaning them in the sink or something.</Text>
</Entity>
<Entity> <!-- Dirty Ceramic Plate -->
<ID>533</ID>
<Text>Umm, I'm not going to throw away my nice ceramic dishes...^...I'm better off cleaning them in the sink or something.</Text>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>300</ID>
<Name>Kitchen Door</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>Room1</Room>
<MovieClipName>room1_kitchendoor</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The door is locked for some reason...^...I need to find the key.</INFO>
</LOOKAT>
<USE>
<EventID>500000</EventID>
</USE>
<USEITEM>
<Entity> <!-- Kitchen Key -->
<ID>526</ID>
<Event>500001</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>301</ID>
<Name>Game Room Door</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_gameroomdoor</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The door is locked for some reason...^...I need to find the key.</INFO>
</LOOKAT>
<USE>
<EventID>500000</EventID>
</USE>
<USEITEM>
<Entity> <!-- Game Room Key -->
<ID>509</ID>
<Event>500002</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>302</ID>
<Name>Bathroom Door</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_halfbath</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The door is locked for some reason...^...I need to find the key.</INFO>
</LOOKAT>
<USE>
<EventID>500000</EventID>
</USE>
<USEITEM>
<Entity> <!-- HalfBath Key -->
<ID>507</ID>
<Event>500003</Event>
</Entity>
<Entity> <!-- Master Bathroom Key -->
<ID>527</ID>
<Text>Unfortunately this is the wrong bathroom key for this door...^...this key only works for the Master Bathroom door.^I need to use the other bathroom key...</Text>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>303</ID>
<Name>Guest Room Door</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom2</Room>
<MovieClipName>hallwayroom2_guestroom3</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The door is locked for some reason...^...I need to find the key.</INFO>
</LOOKAT>
<USE>
<EventID>500000</EventID>
</USE>
<USEITEM>
<Entity> <!-- Guest Room Key -->
<ID>512</ID>
<Event>500004</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>304</ID>
<Name>Master Bedroom Door</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>HallwayRoom1</Room>
<MovieClipName>hallway1_masterbedroomdoor</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The door is locked for some reason...^...I need to find the key.</INFO>
</LOOKAT>
<USE>
<EventID>500000</EventID>
</USE>
<USEITEM>
<Entity> <!-- Master Bedroom Door Key -->
<ID>501</ID>
<Event>500005</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>305</ID>
<Name>Master Bathroom Door</Name>
<Type>StaticObject</Type>
<State>
<StateID>1</StateID>
<Room>MasterBedroom</Room>
<MovieClipName>masterbedroom_bathroomdoor</MovieClipName>
<AvailableActions>LOOK AT,USE,USE ITEM</AvailableActions>
<Actions>
<LOOKAT>
<INFO>The door is locked for some reason...^...I need to find the key.</INFO>
</LOOKAT>
<USE>
<EventID>500000</EventID>
</USE>
<USEITEM>
<Entity> <!-- Master Bathroom Door Key -->
<ID>527</ID>
<Event>500006</Event>
</Entity>
</USEITEM>
</Actions>
</State>
</StoryEntity>
<StoryEntity>
<ID>400</ID>
<Name>Veronica</Name>
<Type>Girlfriend</Type>
<Puzzle> <!-- Zack on Laptop -->
<PuzzleID>1</PuzzleID>
<TEXT>I think we should try to get Zack off the computer somehow...</TEXT>
<TEXT>Maybe try looking around the laptop...^...and see if there is a way to disconnect the Internet connection.</TEXT>
<TEXT>Wow Toby, do I have to do all the thinking?^Maybe you should take a look at the WiFi adaptor behind the laptop...</TEXT>
</Puzzle>
<Puzzle> <!-- Phil and Janice -->
<PuzzleID>2</PuzzleID>
<TEXT>I think we should try looking for Phil's car keys...</TEXT>
<TEXT>Phil's girlfriend Janice is in one of the hallways...^...we should talk to her and find out where the car key is.</TEXT>
<TEXT>Toby you're beyond hope...^Let's go to the fireplace in one of the guest rooms...^...but be careful not to burn yourself searching!</TEXT>
</Puzzle>
<Puzzle> <!-- Get rid of Edwierd -->
<PuzzleID>3</PuzzleID>
<TEXT>I think we should try getting Edweird out of your guest room...^Something important might be in your spider table.</TEXT>
<TEXT>Edweird seems to like bugs...^...maybe we should check the plants for bugs...</TEXT>
<TEXT>Come on Toby...^...why don't you check your draws for something to check bugs with...</TEXT>
</Puzzle>
<Puzzle> <!-- Help Stacy -->
<PuzzleID>4</PuzzleID>
<TEXT>I think we should try helping Stacy in the guest room...</TEXT>
<TEXT>Perhaps we should look for the cabinet key...</TEXT>
<TEXT>Geez Toby...^...didn't say you kept the cabinet key in the spider table?</TEXT>
</Puzzle>
<Puzzle> <!-- Help Shaggy -->
<PuzzleID>5</PuzzleID>
<TEXT>We should probably talk to Shaggy in the hallway...</TEXT>
<TEXT>Perhaps we should look for the Mix CD in the big hallway...</TEXT>
<TEXT>Toby do I have to hold your hand on everything?^...check the benches in the big hallway for Shagg's Mix CD.</TEXT>
</Puzzle>
<Puzzle> <!-- Pool Table guys -->
<PuzzleID>6</PuzzleID>
<TEXT>We should probably talk to Lance in the Game Room...</TEXT>
<TEXT>Did you get the Kitchen key yet?^Perhaps you should check the bathroom...</TEXT>
<TEXT>Helpless Toby...^...why don't you check the kitchen for the VR gear?</TEXT>
</Puzzle>
<Puzzle> <!-- BlockHeads Retro Challenge -->
<PuzzleID>7</PuzzleID>
<TEXT>We should probably talk to Nate in the Game Room...</TEXT>
<TEXT>Perhaps you should try playing BlockHeads Retro...</TEXT>
<TEXT>You really are a baby today...^...isn't this your game?^Just keep playing until you get better...</TEXT>
</Puzzle>
<Puzzle> <!-- Using Camera -->
<PuzzleID>8</PuzzleID>
<TEXT>We should probably talk to Theodore in the Kitchen...</TEXT>
<TEXT>Perhaps we should look around the apartment...^...to find an embarrassing picture to take.</TEXT>
<TEXT>Oh come on Toby...^...do you really need help figuring this out?^If you don't know what humilating picture to take...^I can't help you.</TEXT>
</Puzzle>
<Puzzle> <!-- Burger Despot employee -->
<PuzzleID>9</PuzzleID>
<TEXT>We should probably talk to the burger guy in Kitchen...</TEXT>
<TEXT>Did you get the money from the pool table?</TEXT>
<TEXT>Be sure to check all the couches for spare change...</TEXT>
</Puzzle>
<Puzzle> <!-- Cindy -->
<PuzzleID>10</PuzzleID>
<TEXT>We should probably talk to Cindy in the guest room...</TEXT>
<TEXT>It shouldn't be too hard to find the items she's asking for...^...just look in the logical places...</TEXT>
<TEXT>Good grief Toby!^Just check the logical places...^For example, maybe you should look in the kitchen...^...for the water bottle and candle...</TEXT>
</Puzzle>
<Puzzle> <!-- Get Toilet Paper -->
<PuzzleID>11</PuzzleID>
<TEXT>We should probably look for toilet paper now...^...you know for the guy in the bathroom?</TEXT>
<TEXT>Maybe we should check your master bathroom for spare toilet paper.^Did you find the key yet?</TEXT>
</Puzzle>
<Puzzle> <!-- Hugo -->
<PuzzleID>12</PuzzleID>
<TEXT>We should probably talk to Hugo...</TEXT>
<TEXT>Maybe you should make him a special drink?</TEXT>
</Puzzle>
</StoryEntity>
<StoryEntity>
<ID>500</ID>
<Name>Spray Detergent</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>501</ID>
<Name>Master Bedroom Key</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>502</ID>
<Name>Car Key</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>503</ID>
<Name>Bug Net</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>504</ID>
<Name>Spider</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>505</ID>
<Name>Cabinet Key</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>506</ID>
<Name>Personal Letter</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>507</ID>
<Name>Bathroom Key</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>508</ID>
<Name>Mix CD</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>509</ID>
<Name>Game Room Key</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>510</ID>
<Name>Virtual Reality Gear</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>511</ID>
<Name>30 SoBucks</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>512</ID>
<Name>Guest Room Key</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>513</ID>
<Name>Camera Phone</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>514</ID>
<Name>50 SoBucks</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>515</ID>
<Name>20 SoBucks</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>516</ID>
<Name>30 SoBucks</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>517</ID>
<Name>Asprin</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>518</ID>
<Name>Bottled Water</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>519</ID>
<Name>Candle</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>520</ID>
<Name>Lit Candle</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>521</ID>
<Name>Do NoT Use</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>522</ID>
<Name>Toilet Paper</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>523</ID>
<Name>Laxative</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>524</ID>
<Name>Mountain Eww Soda</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>525</ID>
<Name>Feather Duster</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>526</ID>
<Name>Kitchen Key</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>527</ID>
<Name>Master Bathroom Key</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>528</ID>
<Name>Paper Cup Trash</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>529</ID>
<Name>Paper Plate Trash</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>530</ID>
<Name>Burger Wrapper Trash</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>531</ID>
<Name>Snot Filled Tissue</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>532</ID>
<Name>Dirty Ceramic Plate</Name>
<Type>PickupObject</Type>
</StoryEntity>
<StoryEntity>
<ID>533</ID>
<Name>Dirty Ceramic Cup</Name>
<Type>PickupObject</Type>
</StoryEntity>
</StoryEntities>
]]>
.toString();
_local2 = new XML(_local1);
return (_local2);
}
}
}//package com.uninvitedguests
Section 42
//StoryEventsXML (com.uninvitedguests.StoryEventsXML)
package com.uninvitedguests {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
public class StoryEventsXML {
function TheStoryEventsXML(){
var _local1:String;
var _local2:XML;
_local1 = <![CDATA[
<StoryEvents>
<Event> <!-- Test Event -->
<ID>1</ID>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>There's no time to sit on the couch!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>false</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<GotoNewRoom>
<NextRoom>Veronica</NextRoom>
<TeleportPos>There's no time to sit on the couch!</TeleportPos>
<Action>Female1</Action>
<NextEventID>false</NextEventID>
</GotoNewRoom>
</Phase>
<!--
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Fine fine, I'll sit here later...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>false</AutoClose>
<HighlightNPC>2</HighlightNPC>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<AddInventoryItem>508</AddInventoryItem> <!-- Mix CD
<RemoveInventoryItem>502</RemoveInventoryItem> <!-- Car Key
</Phase>
<Phase>
<PlaySound>PowPunch</PlaySound>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
-->
<!--
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>Circle</Name>
<PosX>250</PosX>
<PosY>250</PosY>
<Visible>true</Visible>
<Alpha>0.25</Alpha>
<GotoAndStop>1</GotoAndStop>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
-->
<Phase>
<MainCharacter>
<Name>Toby</Name>
<PosX>250</PosX>
<PosY>250</PosY>
<Action>sf</Action>
<Lock>true</Lock>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>2</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Give Toilet Paper to NPC -->
<ID>2</ID>
<Phase>
<Chat>
<Name>Party Guy</Name>
<Text>Great now I can wipe my butt!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>false</AutoClose>
<HighlightNPC>2</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- INTRO 1 -->
<ID>100100</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>We're just about here...^...I'm telling you my apartment is really nice...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>It's been a great date so far...^But we shall see...^...I have very high standards...^...now use the ARROW or WASD KEYS and let's get going...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- INTRO 2 -->
<ID>100200</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Why is my door open?!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- INTRO 3 -->
<ID>100300</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>... ... ...!^Why are these people in MY APARTMENT!?^Who is responsible for this???</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>Who cares who's responsible...^If this is indeed your apartment...^...then get rid of all these people!^I want you to myself!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PatienceMeterOn>true</PatienceMeterOn>
<UGMMeterOn>true</UGMMeterOn>
<ACMMeterOn>true</ACMMeterOn>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- TUTORIAL 1 -->
<ID>100400</ID>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<Action>sf</Action>
<Lock>1</Lock>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>Some people you can punch right away...^...but it seems other people will require additional work...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<Lock>0</Lock>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- TUTORIAL 2 -->
<ID>100500</ID>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<Action>sf</Action>
<Lock>1</Lock>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>Sometimes I lose patience...^But I can regain my patience if YOU do several things such as...^...showing me around the apartment...^...getting rid of the guests...^...and by cleaning the apartment.</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<Lock>0</Lock>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- TUTORIAL 3 -->
<ID>100600</ID>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<Action>sf</Action>
<Lock>1</Lock>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>If you need some help on how to get rid of certain guests...^...press the 'V' key and I'll give you some advice...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<Lock>0</Lock>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- TUTORIAL 4 -->
<ID>100700</ID>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<Action>sf</Action>
<Lock>1</Lock>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>Toby there is nothing sexier than a man who cleans!^You can upgrade my patience by cleaning this mess of an apartment.^You can start by putting the trash you find into a trash can...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<Lock>0</Lock>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<!-- ################## PUZLLE EVENTS ############# -->
<Event> <!-- Player Attempting to USE puked on Couch (eid - 200) -->
<ID>200100</ID>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>There's no time to sit on the couch!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>false</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM with Spray Detergent (eid 500) puked on Couch (eid - 200) -->
<ID>200101</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>This should do just the trick to clean this vomit covered couch!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>false</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanSpray</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>200</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE computer (eid - 202) -->
<ID>200200</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I don't have time to use the computer.^But maybe I should turn off the WiFi home network...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>false</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>202</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>100</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE computer (eid - 202) -->
<ID>200201</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Okay I'll turn back on the WiFi home network...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>false</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>202</EntityID>
<ChangeStateTo>1</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>100</EntityID>
<ChangeStateTo>1</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE Wifi Adaptor(eid - 219) -->
<ID>200202</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I'll just yank this WiFi adaptor from the Laptop...^...YOINK!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>100</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Zack</Name>
<Text>Hey man!? ....^What did you do that for?^... ... ...^But whatever...^...this party is lame anyway...^...take this feather duster too... ...it was itching my butt!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>100</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<AddInventoryItem>525</AddInventoryItem> <!-- Feather Duster -->
<ChangeEntityState>
<EntityID>219</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>Toby... ...go ahead and PUNCH this guy's lights out!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<SolvedPuzzle>1</SolvedPuzzle>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE ITEM Phil (eid - 101) -->
<ID>200300</ID>
<Phase>
<Chat>
<Name>Phil</Name>
<Text>Thanks man for finding my keys!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>101</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>502</RemoveInventoryItem> <!-- Car Key) -->
<ChangeEntityState>
<EntityID>101</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>102</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Janice</Name>
<Text>How did you find his keys???^I thought I burned them!!!^Do you realize this man is a selfish pig!^... A PIG!!!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>102</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Phil</Name>
<Text>I can't take anymore of this...^...Toby please punch me out now...^...I just ask that you toss her in the opposite direction!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>101</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<SolvedPuzzle>2</SolvedPuzzle>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE ITEM Plant(eid - 206) -->
<ID>200400</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Now I'll catch this little spidey...^...come here, spidey, spidey...^almost...^Argg, I can't reach it!^I should try searching this plant more...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>206</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE ITEM Edweird (eid - 103) Droid Table (eid 204) unlocks -->
<ID>200401</ID>
<Phase>
<Chat>
<Name>Edweird</Name>
<Text>Mmmm, yes...^This is quite gracious of you...^Let me hold this magnificent creature...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>103</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>103</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>504</RemoveInventoryItem> <!-- Spider) -->
<PlaySound>Eating</PlaySound>
<SleepToNextPhase>5000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Edweird</Name>
<Text>Now I'm one with the spider.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>103</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>103</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>Toby... ... ...^...I think you should get rid of this guy...^...like right now...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<SolvedPuzzle>3</SolvedPuzzle>
<ChangeEntityState>
<EntityID>204</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE ITEM Cabinet Key (eid - 505) on Cabinet (eid - 207) -->
<ID>200500</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Okay this key should open up the cabinet...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>LockOpen</PlaySound>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>THERE...^...now I can search inside it.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>207</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE ITEM Stacey (eid - 104) -->
<ID>200501</ID>
<Phase>
<Chat>
<Name>Stacey</Name>
<Text>My letter...^THANK YOU...^Here's your bathroom key.</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>104</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<AddInventoryItem>507</AddInventoryItem> <!-- Bathroom Key -->
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>506</RemoveInventoryItem> <!-- Personal Letter -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Stacey</Name>
<Text>Let's see what the letter says...^Hmmm...^Oh noo....^OH NOOOO!!!^He's breaking up with me!!!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>104</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>104</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>... ... ...^Umm... ...sorry to hear that...^...but I found your letter like you asked...^...so it's now time for me to escort you out!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<SolvedPuzzle>4</SolvedPuzzle>
<ChangeEntityState>
<EntityID>104</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE ITEM Stacey (eid - 104) -->
<ID>200600</ID>
<Phase>
<Chat>
<Name>Shaggy</Name>
<Text>Thanks man!^Now play this Mix CD in the stereo for Patrice!^The Love Sounds of Nature, volume 3!^It's my own creation!^Come see me after you play it...^...then I'll give you the key to the game room.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>105</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>209</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>105</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>106</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE ITEM Stacey (eid - 104) -->
<ID>200601</ID>
<Phase>
<PlaySound>StopBGMusic</PlaySound>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>NeedleScratch</PlaySound>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Attention...^This is a song dedication to Patrice...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Patrice</Name>
<Text>Oh like...that's me!^...everybody listen, like yeah!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>106</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>So...anyway...^...this is the Love Sounds of Nature by Shaggy.^Err... enjoy...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>NatureSounds</PlaySound>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SleepToNextPhase>4000</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>106</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>105</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SleepToNextPhase>6000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Patrice</Name>
<Text>This is so awful!!!^I'm so embarrassed! Please toss me out!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>106</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>209</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player TEXT EVENT with Shaggy -->
<ID>200602</ID>
<Phase>
<Chat>
<Name>Shaggy</Name>
<Text>She didn't take it well?^Oh man...^Well here's your key to the game room.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>105</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>508</RemoveInventoryItem> <!-- Mix CD -->
<AddInventoryItem>509</AddInventoryItem> <!-- Game Room Key -->
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Shaggy</Name>
<Text>...I'm going to go far away.^Please punch me out now!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>105</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>105</EntityID>
<ChangeStateTo>4</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SolvedPuzzle>5</SolvedPuzzle>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- USE ITEM on Lance (eid 108) -->
<ID>200700</ID>
<Phase>
<Chat>
<Name>Lance</Name>
<Text>Whoa whoa!^Don't punch me!^I think I can help you get rid of Jake over there.^Do you have a Virtual Reality gear set?</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>108</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Yes..^I have a set in the Kitchen...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Lance</Name>
<Text>Well go to the Kitchen and get the Virtual Gear...^...and I'll help distract Jake.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>108</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>108</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM Cabinet Key (eid - 505) on Cabinet (eid - 245) -->
<ID>200701</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Okay this key should open up the cabinet...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>LockOpen</PlaySound>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>THERE...^...now I can search inside it.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>245</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- USE ITEM on Jake (eid 107) -->
<ID>200702</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I got this virtual reality gear.^You can use this to play a VR game with Lance.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Jake</Name>
<Text>Now this is more like it!^I guess I won't have to beat you with this stick.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>107</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>107</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Lance</Name>
<Text>Excellent!^Now I have someone to play with!^Let's play Coin Catchers!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>108</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>510</RemoveInventoryItem> <!-- Virtual Gear -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>210</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>107</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>108</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SolvedPuzzle>6</SolvedPuzzle>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM Arcade Game (eid - 211) -->
<ID>200800</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Okay, let's see if I can beat this guy's top score.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<CustomCode>PlayBlockHeadsRetro</CustomCode>
<SleepToNextPhase>0</SleepToNextPhase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
</Phase>
</Event>
<Event> <!-- Player USE ITEM Arcade Game after Top Score is Beaten (eid - 211) -->
<ID>200801</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Well, I've already demonstrated my gaming superiority...^...but I guess I can always improve upon my top score.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<CustomCode>PlayBlockHeadsRetro</CustomCode>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- If player fails to beat Top Score -->
<ID>200802</ID>
<Phase>
<Chat>
<Name>Nate</Name>
<Text>Ha!...^That's it!?^I mock your pathetic attempt at arcade gaming!^Looks like I'll be holding on to this key for a long time.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>109</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>SHUT YOUR TRAP!^I'm just a bit rusty...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Nate</Name>
<Text>If you can't stand the bleeps, get out of the arcade!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>109</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>... ... ...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- If player beats Top Score -->
<ID>200803</ID>
<Phase>
<LockOptionsMenu>true</LockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Nate</Name>
<Text>No way...^NO WAY!!!^You beat my top score!!!^I'm in shock...^... ... ...^You must have used cheat codes...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>109</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Do you want to watch me beat your top score again?</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Nate</Name>
<Text>No that's okay...^... .... ...^Fine...^Here's your key to the guest room.^...but one day I'll embarrass you with my arcade gaming skills!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>109</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<AddInventoryItem>512</AddInventoryItem> <!-- Guest Room Key -->
<ChangeEntityState>
<EntityID>211</EntityID> <!-- Arcade Game -->
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>109</EntityID> <!-- Nate -->
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<CheckAchievement>TopGun</CheckAchievement>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SolvedPuzzle>7</SolvedPuzzle>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player TEXT EVENT with Theodore -->
<ID>200900</ID>
<Phase>
<Chat>
<Name>Theodore</Name>
<Text>Whoa... Whoa...^Before you kick me out... I have an offer!^I heard you need some cash...^I'll pay you to take a picture of someone in an embarrassing situation.^Why, you ask???^I'm starting a new blog about Public Humilation!^If it's Public and it's Humilating... ...it will be on my blog!^So go get me that picture! You can borrow my camera phone.^If it's good I'll pay you 50 SoBucks.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>111</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<AddInventoryItem>513</AddInventoryItem> <!-- Camera Phone -->
<ChangeEntityState>
<EntityID>111</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player TEXT EVENT with Theodore -->
<ID>200901</ID>
<Phase>
<Chat>
<Name>Theodore</Name>
<Text>Okay, let's see what you got...^Hmmm...^Sorry, I'm not impressed...^I need something that can go VIRAL!^Come back when you got something that's really humilating.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>111</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Walter -->
<ID>200902</ID>
<Phase>
<Chat>
<Name>Walter</Name>
<Text>You again...^Did you bring the tissue yet?^I'm actually not quite done yet...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>110</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>Fart1</PlaySound>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Walter</Name>
<Text>Oh my...^Sorry about that...^Wait...what!?^What are you doing!?^Why are you pointing that camera at me!?</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>110</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>CameraClick</PlaySound>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Walter</Name>
<Text>What kind of SICK PERVERT are you!?^It's bad enough that you unlocked the door...^...and leave me here with no toilet paper...^...now you're taking pictures of my shame!!!^This is so humiliating...^GET OUT!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>110</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>110</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>111</EntityID> <!-- Walter -->
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<CheckAchievement>NerveofaPerv</CheckAchievement>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player TEXT EVENT with Theodore -->
<ID>200903</ID>
<Phase>
<Chat>
<Name>Theodore</Name>
<Text>Okay, let's see what you got...^... ... ...^HAHAH! HAHAH! HAHAH!^Now this is Humilating!^And since we're at a party, it's Public!^PUBLIC HUMILATION!^...I almost feel sorry for him...^...but when I think about all the money I'll make!^Oh yeah, here's the 50 SoBucks I promised you...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>111</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<AddInventoryItem>514</AddInventoryItem> <!-- 50 SoBucks -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I feel dirty...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Theodore</Name>
<Text>Don't feel bad, he was an uninvited guest, right?^Serves him right...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>111</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>And so are you...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<!-- <RemoveInventoryItem>513</RemoveInventoryItem> Camera Phone -->
<ChangeEntityState>
<EntityID>111</EntityID>
<ChangeStateTo>4</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SolvedPuzzle>8</SolvedPuzzle>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player TEXT EVENT with Gilbert-->
<ID>201000</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Ummm..... ...can you get out of the way?</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Gilbert</Name>
<Text>Absolutely not!^First, I don't appreciate being locked in the kitchen!^Secondly, someone here ordered 80 Trans Phat Burgers.^I'm not leaving until I get 100 SoBucks.^I don't care where you get it from...^...if you don't pay me, I'll call the cops.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>112</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>112</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Gilbert-->
<ID>201001</ID>
<Phase>
<Chat>
<Name>Gilbert</Name>
<Text>Hmm... ...okay 50 SoBucks...^But you still need to cough up more...^...you need 50 more SoBucks to cover the bill.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>112</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>514</RemoveInventoryItem> <!-- 50 SoBucks -->
<ChangeEntityState>
<EntityID>112</EntityID>
<ChangeStateTo>5</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Gilbert-->
<ID>201002</ID>
<Phase>
<Chat>
<Name>Gilbert</Name>
<Text>Hmm... ...okay 20 SoBucks...^But you still need to cough up more...^...you need 80 more SoBucks to cover the bill.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>112</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>515</RemoveInventoryItem> <!-- 20 SoBucks -->
<ChangeEntityState>
<EntityID>112</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Gilbert-->
<ID>201003</ID>
<Phase>
<Chat>
<Name>Gilbert</Name>
<Text>Hmm... ...okay 30 SoBucks...^But you still need to cough up more...^...you need 70 more SoBucks to cover the bill.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>112</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>516</RemoveInventoryItem> <!-- 30 SoBucks -->
<ChangeEntityState>
<EntityID>112</EntityID>
<ChangeStateTo>4</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Gilbert-->
<ID>201004</ID>
<Phase>
<Chat>
<Name>Gilbert</Name>
<Text>Hmm... ...okay I've gotten 70 SoBucks from you so far...^But you still need to cough up more...^...you need 30 more SoBucks to cover the bill.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>112</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>515</RemoveInventoryItem> <!-- 20 SoBucks -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>514</RemoveInventoryItem> <!-- 50 SoBucks -->
<ChangeEntityState>
<EntityID>112</EntityID>
<ChangeStateTo>7</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Gilbert-->
<ID>201005</ID>
<Phase>
<Chat>
<Name>Gilbert</Name>
<Text>Hmm... ...okay I've gotten 50 SoBucks from you so far...^But you still need to cough up more...^...you need 50 more SoBucks to cover the bill.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>112</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>515</RemoveInventoryItem> <!-- 20 SoBucks -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>516</RemoveInventoryItem> <!-- 30 SoBucks -->
<ChangeEntityState>
<EntityID>112</EntityID>
<ChangeStateTo>6</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Gilbert-->
<ID>201006</ID>
<Phase>
<Chat>
<Name>Gilbert</Name>
<Text>Hmm... ...okay I've gotten 80 SoBucks from you so far...^But you still need to cough up more...^...you need 20 more SoBucks to cover the bill.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>112</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>514</RemoveInventoryItem> <!-- 50 SoBucks -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>516</RemoveInventoryItem> <!-- 30 SoBucks -->
<ChangeEntityState>
<EntityID>112</EntityID>
<ChangeStateTo>8</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Gilbert-->
<ID>201007</ID>
<Phase>
<Chat>
<Name>Gilbert</Name>
<Text>Hmm... ...okay I've gotten 100 SoBucks from you...^You're all paid up...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>112</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>514</RemoveInventoryItem> <!-- 50 SoBucks -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>515</RemoveInventoryItem> <!-- 20 SoBucks -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>516</RemoveInventoryItem> <!-- 30 SoBucks -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>112</EntityID>
<ChangeStateTo>9</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>KitchenCollis</Parent>
<Name>kitchen_blockade</Name>
<PosX>0</PosX>
<PosY>0</PosY>
</MovieClip>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<CheckAchievement>BurgerDebtRepaid</CheckAchievement>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<SolvedPuzzle>9</SolvedPuzzle>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player TEXT EVENT with Cindy -->
<ID>201100</ID>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>Why did you unlock the door???^I'm so depressed...^...and I have a really bad headache...^...could you do me one little favor before you toss me out?^...could I borrow some Asprin?</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>"Borrow"? ....^I'll just let you keep it...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>Oh thank you so much kind sir!^For your trouble I'll give you your Master Bedroom key...^I'll be here waiting with bated breath!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>113</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Cindy -->
<ID>201101</ID>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>Oh thank you so much...^...but...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>113</EntityID>
<ChangeStateTo>10</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1500</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>What's the problem?</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>I do appreciate you bringing me this pill of pain relief...^...but I have nothing to wash it down... ^...for my tears are not enough...^...bring me some bottled water...^...so that this pill may go down my throat peacefully as a lilly branch in a gentle stream...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Bottled water?^...fine...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>Oh thank you ever so much!^Again, I'll give you your Master Bedroom key when you're done!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>113</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>517</RemoveInventoryItem> <!-- Asprin -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Cindy -->
<ID>201102</ID>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>Oh this is perfect...^Thank you so much!^This should really help my headache...^...but...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>113</EntityID>
<ChangeStateTo>10</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1500</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Now what...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>A pill can only do so much...^I need some Aromatherapy to heal my mind...^...bring me a candle so its scent can put my mind at ease.</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>This is getting ridiculous...^...fine...^I'll get you a candle...^...but then you have to give me my bedroom key!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>Oh don't worry!^Thank you ever so much!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>113</EntityID>
<ChangeStateTo>4</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>518</RemoveInventoryItem> <!-- Bottled Water -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Cindy -->
<ID>201103</ID>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>You found a candle!^Oh that's wonderous!^It truly is!^...but...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>113</EntityID>
<ChangeStateTo>10</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1500</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Ah geez...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>I can't do much with an unlit candle!^Please borne a flame on this candle!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>No... this is too much...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>Oh Toby, let's just go light the candle...^...I feel sorry for her... ^...plus we need the bedroom key...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>...!^Okay...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>Oh thank you ever so much!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>113</EntityID>
<ChangeStateTo>4</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Cindy -->
<ID>201104</ID>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>Oh thank you ever so much!^I believe I can be truly healed now...^...oh here's the key to the Master Bedroom...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<AddInventoryItem>501</AddInventoryItem> <!-- Master Bedroom Key -->
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Cindy</Name>
<Text>...may the swallows sing you a beautiful song!^It's okay to toss me now... ...the forest animals shall catch me!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>113</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>113</EntityID>
<ChangeStateTo>5</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>520</RemoveInventoryItem> <!-- Lit Candle -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SolvedPuzzle>10</SolvedPuzzle>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE EVENT with Fireplace (Turn Off) -->
<ID>201105</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I'm going to turn off the fireplace, so I can search it...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>FlameOff</PlaySound>
<SleepToNextPhase>3000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Done...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>203</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE EVENT with Fireplace (Turn On) -->
<ID>201106</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I'm going to turn on the fireplace...^Maybe I can light something with it...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>FlameOn</PlaySound>
<SleepToNextPhase>4000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Done...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>203</EntityID>
<ChangeStateTo>1</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE EVENT with Fireplace (Turn On) -->
<ID>201107</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I'm going to "borne a flame" on this candle...^There... ...the candle is lit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>203</EntityID>
<ChangeStateTo>1</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<RemoveInventoryItem>519</RemoveInventoryItem> <!-- Candle -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<AddInventoryItem>520</AddInventoryItem> <!-- Lit Candle -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE EVENT with Toilet(Get Toilet Paper) -->
<ID>201200</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I don't really need to wipe my butt right now...^...but I'll take a half roll of toilet paper for the other bathroom.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<AddInventoryItem>522</AddInventoryItem> <!-- Toilet Paper -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Walter -->
<ID>201201</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Here is the toilet paper...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Walter</Name>
<Text>Oh wow... I thought you forgot about me...^...thanks...^.... .... ....^...can you give me some privacy while I wipe my...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>110</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>...okay, okay we'll just step outside for a mintute...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<GotoNewRoom>
<NextRoom>HallwayRoom2</NextRoom>
<TeleportPos>230,0,280</TeleportPos>
<Action>ssr</Action>
<NextEventID></NextEventID>
</GotoNewRoom>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>110</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>...so...^.... .... ...^la... dee... da...^...hmm... ....^...maybe he's done by now...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<GotoNewRoom>
<NextRoom>HalfBath</NextRoom>
<TeleportPos>520,0,450</TeleportPos>
<Action>ssl</Action>
<NextEventID></NextEventID>
</GotoNewRoom>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Walter</Name>
<Text>Okay I'm done...^Thanks again... ...you're okay after all.^Oh... ...umm...^...I had to borrow your laxative...^...you can have it back...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>110</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<AddInventoryItem>523</AddInventoryItem> <!-- Laxative -->
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Umm, thanks...^Now it's time for you to go...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<SolvedPuzzle>11</SolvedPuzzle>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player TALK EVENT with Hugo the Giant (eid 114) -->
<ID>201300</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>...umm ...get out of my bathroom!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Hugo</Name>
<Text>Me Hugo...^...you puny little man...^...this now Hugo bathroom.^...Hugo now going to hot-tub with hot girls...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>114</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>114</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Hugo</Name>
<Text>Gurahh... ...Grah...^Bring Hugo drink and Hugo might leave...^...just fill up cup on table...^...now slave!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>114</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>214</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Drink(Adding Mountown Eww to Drink) -->
<ID>201301</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Hopefully this goon will be satisified...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>214</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>114</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player Talk EVENT with Hugo (eid 114) -->
<ID>201302</ID>
<Phase>
<Chat>
<Name>Hugo</Name>
<Text>You filled cup with Hugo's favorite drink?^Very good slave.^Hugo will drink now.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>114</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>114</EntityID>
<ChangeStateTo>4</ChangeStateTo>
</ChangeEntityState>
<MovieClip>
<Parent>MasterBath</Parent>
<Name>masterbath_glass1</Name>
<Visible>false</Visible>
</MovieClip>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SleepToNextPhase>4000</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>114</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<MovieClip>
<Parent>MasterBath</Parent>
<Name>masterbath_glass1</Name>
<Visible>true</Visible>
</MovieClip>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Hugo</Name>
<Text>Gurahh!...^...give me more Mountown Eww!^...now slave!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>114</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>... ... ...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player TALK EVENT with Burgerman (eid 118) -->
<ID>201303</ID>
<Phase>
<Chat>
<Name>Burgerman</Name>
<Text>274...^275...^...Oh hello....</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>118</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Burgerman</Name>
<Text>Sorry about locking the door...^I did it for everybody's protection.^...Hugo the Giant is in your bathroom.^...and he's taken my girlfriends!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>118</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>... you're a superhero... ...of sorts.^Go and rescue them...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Burgerman</Name>
<Text>Sorry man, but these muscles are made for love, not war!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>118</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>4</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Burgerman</Name>
<Text>So sorry buddy, you're on your own.^But if you get rid of Hugo the Giant...^...I'll gladly take the girls away...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>118</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>5</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<!-- ##### THE ENDING SEQUENCE #### -->
<Event> <!-- Player TALK EVENT with Hugo the Giant (eid 114) -->
<ID>300000</ID>
<Phase>
<Chat>
<Name>Hugo</Name>
<Text>You filled cup Mountown Eww?^Very good slave.^Hugo will drink.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>114</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<Action>ssr</Action>
<PosX>400</PosX>
<PosY>425</PosY>
</MainCharacter>
<SleepToNextPhase>250</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>114</EntityID>
<ChangeStateTo>4</ChangeStateTo>
</ChangeEntityState>
<MovieClip>
<Parent>MasterBath</Parent>
<Name>masterbath_glass1</Name>
<Visible>false</Visible>
</MovieClip>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SleepToNextPhase>4000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Hugo</Name>
<Text>This taste different...^But Hugo likes it!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>114</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<Action>ssr</Action>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<SleepToNextPhase>4000</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>114</EntityID>
<ChangeStateTo>5</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Hugo</Name>
<Text>Hugo doesn't feel so good...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>114</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>Fart1</PlaySound>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Hugo</Name>
<Text>...Hugo stomach...^...Hugo is totally defenseless...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>114</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Defenseless, eh?</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Hugo</Name>
<Text>Yes, totally defenseless.^Hugo needs to poop...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>114</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>Fart2</PlaySound>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Hugo</Name>
<Text>...but Hugo can't move...^...and Hugo is wearing a SKIRT...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>114</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>OH NOOO...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<PosX>510</PosX>
<PosY>415</PosY>
<Action>sf</Action>
</MainCharacter>
<SleepToNextPhase>250</SleepToNextPhase>
</Phase>
<Phase>
<PunchNPC>114</PunchNPC>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<LockOptionsMenu>true</LockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>Oh Toby!!!^You're so manly!</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>6</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Burgerman</Name>
<Text>Toby, you got rid of Hugo the Giant...^...fantastic!^I'll take over from here...^Ladies... ...will you join me?</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>118</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>7</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>6</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>115</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>116</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>117</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Burgerman</Name>
<Text>We'll be heading out now...^But good job Toby...^...you got rid of all your uninvited guests!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>118</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PatienceMeterOn>false</PatienceMeterOn>
<UGMMeterOn>false</UGMMeterOn>
<ACMMeterOn>false</ACMMeterOn>
<MainCharacter>
<Name>Veronica</Name>
<Visible>0</Visible>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<GotoNewRoom>
<NextRoom>MasterBedroom</NextRoom>
<TeleportPos>600,0,455</TeleportPos>
<Action>ssl</Action>
<NextEventID></NextEventID>
</GotoNewRoom>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<PosX>300</PosX>
<PosY>450</PosY>
<Action>ssr</Action>
<Visible>1</Visible>
<Lock>1</Lock>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<CheckAchievement>LadiesMan</CheckAchievement>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>EndingMusic</PlaySound>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<LockOptionsMenu>true</LockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Veronica</Name>
<Text>Oh Toby...^...we're finally alone...</Text>
<VoiceType>Female1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Veronica</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<PosX>325</PosX>
</MainCharacter>
<SleepToNextPhase>1500</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<PosX>575</PosX>
</MainCharacter>
<SleepToNextPhase>1500</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<PosX>375</PosX>
</MainCharacter>
<SleepToNextPhase>1250</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<PosX>525</PosX>
</MainCharacter>
<SleepToNextPhase>1250</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<PosX>425</PosX>
</MainCharacter>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<PosX>475</PosX>
</MainCharacter>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I thought this moment would never come...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<PosX>430</PosX>
</MainCharacter>
<SleepToNextPhase>250</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<PosX>470</PosX>
</MainCharacter>
<SleepToNextPhase>250</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>NeedleScratch</PlaySound>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<LockOptionsMenu>true</LockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>8</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>250</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<PosX>400</PosX>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<PosX>500</PosX>
</MainCharacter>
<SleepToNextPhase>250</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Burgerman</Name>
<Text>Umm... ....sorry to interrupt...^...but the girls ditched me...^...apparently they didn't appreciate me leaving them locked in the bathroom.^...so I'll just hang out with you guys!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>118</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>No... you've got to be kidding....</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>ChaseMusic</PlaySound>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<Action>pnchb</Action>
<PosX>450</PosX>
<PosY>455</PosY>
</MainCharacter>
<SleepToNextPhase>250</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>9</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>10</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<Action>pnchr</Action>
<PosX>550</PosX>
<PosY>350</PosY>
</MainCharacter>
<SleepToNextPhase>250</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>11</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<Action>ssl</Action>
</MainCharacter>
<Chat>
<Name>Toby</Name>
<Text>Come back here you coward!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<Chat>
<Name>Burgerman</Name>
<Text>Hey relax... ...let's lift weights together!^Your lady wants to look at a real man!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>118</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<MainCharacter>
<Name>Veronica</Name>
<Action>sb</Action>
<PosX>500</PosX>
<PosY>485</PosY>
</MainCharacter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<Action>pnchl</Action>
<PosX>450</PosX>
<PosY>350</PosY>
</MainCharacter>
<SleepToNextPhase>250</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>12</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<Action>sf</Action>
<PosX>500</PosX>
<PosY>455</PosY>
</MainCharacter>
<SleepToNextPhase>250</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>13</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<PunchVeronica>true</PunchVeronica>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<Action>sf</Action>
</MainCharacter>
<Chat>
<Name>Toby</Name>
<Text>Wow...^...I just punched my date!^... .... ...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>14</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Burgerman</Name>
<Text>Don't worry about it man...^...I'm still here for you!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<HighlightNPC>118</HighlightNPC>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>118</EntityID>
<ChangeStateTo>15</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>1500</SleepToNextPhase>
</Phase>
<Phase>
<MainCharacter>
<Name>Toby</Name>
<Action>ssr</Action>
</MainCharacter>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<PunchNPC>118</PunchNPC>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase> <Phase>
<MainCharacter>
<Name>Toby</Name>
<Action>sf</Action>
</MainCharacter>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>*sigh*...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<CheckAchievement>PartysOver</CheckAchievement>
<SleepToNextPhase>6000</SleepToNextPhase>
</Phase>
<Phase>
<CustomCode>EndGame</CustomCode>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Cabinet in Guest Room1-->
<ID>400000</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Looks like I've cleaned it enough...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Cabinet in Guest Room1-->
<ID>400001</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>216</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanDusting</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Cabinet in Guest Room2-->
<ID>400002</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>207</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanDusting</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Cabinet in Guest Room3-->
<ID>400003</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>235</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanDusting</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Computer in Master Bedroom -->
<ID>400004</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>202</EntityID>
<ChangeStateTo>3</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanDusting</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Panting in Hallway2 -->
<ID>400005</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>241</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanDusting</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Toilet in HalfBath -->
<ID>400006</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>242</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanSpray</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Spray Detergen on Bed in Master Bedroom -->
<ID>400007</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>233</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanSpray</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Spray Detergen on Bench1 in Hallway2 -->
<ID>400008</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>208</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanSpray</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Spray Detergen on Bench2 in Hallway2 -->
<ID>400009</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>238</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanSpray</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Spray Detergen on Char1 in Hallway1 -->
<ID>400010</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>221</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanSpray</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Spray Detergen on Char2 in Hallway1 -->
<ID>400011</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<ChangeEntityState>
<EntityID>222</EntityID>
<ChangeStateTo>2</ChangeStateTo>
</ChangeEntityState>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanSpray</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Sink on Cermanic Plate in Kitchen -->
<ID>400012</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>532</RemoveInventoryItem> <!-- Ceramic Plate -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanDishes</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>4500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Sink on Cermanic Cup in Kitchen -->
<ID>400013</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Let's see if I can clean this up a bit...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>533</RemoveInventoryItem> <!-- Ceramic Cup -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanDishes</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>4500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Trash on Paper Cup in Kitchen -->
<ID>400014</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>In the trash this goes...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>528</RemoveInventoryItem> <!-- Ceramic Cup -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanTrash</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Trash on Paper Cup -->
<ID>400015</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I definitely won't be needing this...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>529</RemoveInventoryItem> <!-- Ceramic Cup -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanTrash</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Trash on Burger Wrapper -->
<ID>400016</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>This definitely belongs in the trash...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>530</RemoveInventoryItem> <!-- Ceramic Cup -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanTrash</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT with Trash on Burger Wrapper -->
<ID>400017</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>Eww this is nasty... ...yeah let's throw this away.</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<RemoveInventoryItem>531</RemoveInventoryItem> <!-- Ceramic Cup -->
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<ShowApartmentMeter>true</ShowApartmentMeter>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<PlaySound>CleanTrash</PlaySound>
<SleepToNextPhase>2500</SleepToNextPhase>
</Phase>
<Phase>
<AdjustApartmentMeter>1</AdjustApartmentMeter>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE Kitchen Door-->
<ID>500000</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>I can't open it!^The door is locked for some reason!</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT Kitchen Key with Kitchen Door-->
<ID>500001</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>This key should do the trick...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>LockOpen</PlaySound>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<MaxPatience>true</MaxPatience>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>room1_teleport04</Name>
<PosY>190</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>room1_kitchendoor</Name>
<PosY>-190</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<CheckAchievement>KitchenNightmares</CheckAchievement>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT Game Room Key with Game Room Door-->
<ID>500002</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>This key should do the trick...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>LockOpen</PlaySound>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<MaxPatience>true</MaxPatience>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>hallwayroom2_gameroomdoor</Name>
<PosX>0</PosX>
<PosY>0</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>hallwayroom2_teleport04</Name>
<PosX>75</PosX>
<PosY>549</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<CheckAchievement>ItsGameTime</CheckAchievement>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT HalfBath Key with HalfBath Door-->
<ID>500003</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>This key should do the trick...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>LockOpen</PlaySound>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<MaxPatience>true</MaxPatience>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>hallwayroom2_teleport03</Name>
<PosX>163</PosX>
<PosY>257</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>hallwayroom2_halfbath</Name>
<PosX>0</PosX>
<PosY>0</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<CheckAchievement>NoRighttoPrivacy</CheckAchievement>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT Guest Room Key with Guest Room Door-->
<ID>500004</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>This key should do the trick...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>LockOpen</PlaySound>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<MaxPatience>true</MaxPatience>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>hallwayroom2_teleport02</Name>
<PosX>277</PosX>
<PosY>204</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>hallwayroom2_guestroom3</Name>
<PosX>0</PosX>
<PosY>0</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT Master Bedroom Key with Master Bedroom Door-->
<ID>500005</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>This key should do the trick...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>LockOpen</PlaySound>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<MaxPatience>true</MaxPatience>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>hallwayroom1_teleport04</Name>
<PosX>854</PosX>
<PosY>362</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>hallway1_masterbedroomdoor</Name>
<PosX>0</PosX>
<PosY>0</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
<Event> <!-- Player USE ITEM EVENT Master Bedroom Key with Master Bedroom Bathroom Door-->
<ID>500006</ID>
<Phase>
<Chat>
<Name>Toby</Name>
<Text>This key should do the trick...</Text>
<VoiceType>Male1</VoiceType>
<AutoClose>true</AutoClose>
<Highlight>Toby</Highlight>
<UnlockOptionsMenu>false</UnlockOptionsMenu>
</Chat>
<GotoNextPhaseAfterChat>1</GotoNextPhaseAfterChat>
<LockMovement>true</LockMovement>
</Phase>
<Phase>
<PlaySound>LockOpen</PlaySound>
<SleepToNextPhase>2000</SleepToNextPhase>
</Phase>
<Phase>
<MaxPatience>true</MaxPatience>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>masterbedroom_teleport02</Name>
<PosX>827</PosX>
<PosY>503</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<MovieClip>
<Parent>Gamemap</Parent>
<Name>masterbedroom_bathroomdoor</Name>
<PosX>0</PosX>
<PosY>0</PosY>
</MovieClip>
<SleepToNextPhase>500</SleepToNextPhase>
</Phase>
<Phase>
<CheckAchievement>FinalFrontier</CheckAchievement>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
<Phase>
<UnlockOptionsMenu>true</UnlockOptionsMenu>
<SleepToNextPhase>0</SleepToNextPhase>
</Phase>
</Event>
</StoryEvents>
]]>
.toString();
_local2 = new XML(_local1);
return (_local2);
}
}
}//package com.uninvitedguests
Section 43
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const NO_USER:String = "NoUser";
public static const IO_ERROR:String = "IOError";
public static const ITEM_NEW:String = "ItemNew";
public static const ITEM_OWNED:String = "ItemOwned";
public static const STORE_ITEMS:String = "StoreItems";
public static const ERROR:String = "Error";
public static const STORE_SHOW:String = "StoreShow";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static var _inventory:MochiInventory;
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function get inventory():MochiInventory{
return (_inventory);
}
public static function showStore(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function requestFunding(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFunding", _arg1);
}
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_inventory = new MochiInventory();
});
addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_inventory = null;
});
}
}//package mochi.as3
Section 44
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function reencode():void{
var _local1:uint;
_local1 = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function toString():String{
var _local1:String;
_local1 = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function get value():Number{
return (Number(this.toString()));
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String;
_local3 = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi.as3
Section 45
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher)
package mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
}
}//package mochi.as3
Section 46
//MochiEvents (mochi.as3.MochiEvents)
package mochi.as3 {
import flash.display.*;
public class MochiEvents {
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const FORMAT_LONG:String = "LongForm";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived";
public static const FORMAT_SHORT:String = "ShortForm";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_CENTER:String = "ALIGN_C";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var gameStart:Number;
private static var levelStart:Number;
public static function endPlay():void{
MochiServices.send("events_clearRoundID", null, null, null);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function trackEvent(_arg1:String, _arg2=null):void{
MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{
var _local3:Object;
var _local4:Object;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
_local3.clip = _arg1;
MochiServices.send("events_setNotifications", _local3, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startPlay(_arg1:String="gameplay"):void{
MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null);
}
}
}//package mochi.as3
Section 47
//MochiInventory (mochi.as3.MochiInventory)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
public dynamic class MochiInventory extends Proxy {
private var _timer:Timer;
private var _names:Array;
private var _consumableProperties:Object;
private var _syncID:Number;
private var _storeSync:Object;
private var _outstandingID:Number;
private var _syncPending:Boolean;
public static const READY:String = "InvReady";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IoError";
private static const KEY_SALT:String = " syncMaint";
public static const WRITTEN:String = "InvWritten";
public static const NOT_READY:String = "InvNotReady";
public static const VALUE_ERROR:String = "InvValueError";
private static const CONSUMER_KEY:String = "MochiConsumables";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiInventory():void{
MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned);
MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut);
_storeSync = new Object();
_syncPending = false;
_outstandingID = 0;
_syncID = 0;
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, sync);
_timer.start();
if (MochiSocial.loggedIn){
loggedIn();
} else {
loggedOut();
};
}
private function newItems(_arg1:Object):void{
if (!this[(_arg1.id + KEY_SALT)]){
this[(_arg1.id + KEY_SALT)] = 0;
};
if (!this[_arg1.id]){
this[_arg1.id] = 0;
};
this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count);
this[_arg1.id] = (this[_arg1.id] + _arg1.count);
if (((_arg1.privateProperties) && (_arg1.privateProperties.consumable))){
if (!this[_arg1.privateProperties.tag]){
this[_arg1.privateProperties.tag] = 0;
};
this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count));
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (-1);
};
if (_consumableProperties[_arg1]){
return (MochiDigits(_consumableProperties[_arg1]).value);
};
return (undefined);
}
public function release():void{
MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (false);
};
if (_consumableProperties[_arg1] == undefined){
return (false);
};
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:MochiDigits;
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return;
};
if (!(_arg2 is Number)){
triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2});
return;
};
if (_consumableProperties[_arg1]){
_local3 = MochiDigits(_consumableProperties[_arg1]);
if (_local3.value == _arg2){
return;
};
_local3.value = _arg2;
} else {
_names.push(_arg1);
_consumableProperties[_arg1] = new MochiDigits(_arg2);
};
_syncID++;
}
private function sync(_arg1:Event=null):void{
var _local2:Object;
var _local3:String;
if (((_syncPending) || ((_syncID == _outstandingID)))){
return;
};
_outstandingID = _syncID;
_local2 = {};
for (_local3 in _consumableProperties) {
_local2[_local3] = MochiDigits(_consumableProperties[_local3]).value;
};
MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag);
_syncPending = true;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (_names[(_arg1 - 1)]);
}
private function loggedIn(_arg1:Object=null):void{
MochiUserData.get(CONSUMER_KEY, getConsumableBag);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
if (!_consumableProperties[_arg1]){
return (false);
};
_names.splice(_names.indexOf(_arg1), 1);
delete _consumableProperties[_arg1];
return (true);
}
private function itemOwned(_arg1:Object):void{
_storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count};
}
private function putConsumableBag(_arg1:MochiUserData):void{
_syncPending = false;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
_outstandingID = -1;
};
triggerEvent(WRITTEN, {});
}
private function getConsumableBag(_arg1:MochiUserData):void{
var _local2:String;
var _local3:Number;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
return;
};
_consumableProperties = {};
_names = new Array();
if (_arg1.data){
for (_local2 in _arg1.data) {
_names.push(_local2);
_consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]);
};
};
for (_local2 in _storeSync) {
_local3 = _storeSync[_local2].count;
if (_consumableProperties[(_local2 + KEY_SALT)]){
_local3 = (_local3 - _consumableProperties[(_local2 + KEY_SALT)].value);
};
if (_local3 == 0){
} else {
newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties});
};
};
triggerEvent(READY, {});
}
private function loggedOut(_arg1:Object=null):void{
_consumableProperties = null;
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 48
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiServices {
public static const CONNECTED:String = "onConnected";
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _queue:Array;
private static var _swfVersion:String;
private static var _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
private static var _nextCallbackID:Number;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var _callbacks:Object;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = _callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
//unresolved jump
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
};
};
};
delete _callbacks[cb];
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
};
if (_clip != null){
if (_callbacks != null){
_callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_nextCallbackID++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:MovieClip;
var _local8:LocalConnection;
var _local9:String;
var _local10:ByteArray;
var _local11:ByteArray;
var _local12:uint;
var _local13:uint;
var _local14:Loader;
_local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
_local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
_local6 = [0, 64, 0, 0, 0];
_local7 = new MovieClip();
_local8 = new LocalConnection();
_local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
_local10 = new ByteArray();
_local11 = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
_local12 = ((_local3.length + _local11.length) + 4);
_local13 = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
private static function detach(_arg1:Event):void{
var _local2:LoaderInfo;
_local2 = LoaderInfo(_arg1.target);
_local2.removeEventListener(Event.COMPLETE, detach);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.removeEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
private static function loadLCBridgeComplete(_arg1:Event):void{
var _local2:Loader;
_local2 = LoaderInfo(_arg1.target).loader;
_mochiLocalConnection = MovieClip(_local2.content);
listen();
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.9.2 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
var _local3:Number;
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
return;
};
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
//unresolved jump
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
//unresolved jump
};
return;
};
};
_local3 = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
return;
};
_local3++;
};
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_queue))){
while (_queue.length > 0) {
_local2 = _queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _callbacks[_local2.callbackID];
};
delete _callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(_arg1:Object):void{
var _local2:String;
var _local3:String;
_local2 = _arg1.target;
_local3 = _arg1.event;
switch (_local2){
case "services":
MochiServices.triggerEvent(_arg1.event, _arg1.args);
break;
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "social":
MochiSocial.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local2:Object;
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
_local2 = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var vars:Object;
var avm1Click:DisplayObject;
var s:String;
var i:Number;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
vars = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
i = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://link.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
var _local2:Rectangle;
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
_local2 = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_clip.parent){
_clip.parent.removeChild(_clip);
};
if (_arg1 != null){
if ((_arg1 is DisplayObjectContainer)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is DisplayObjectContainer)){
DisplayObjectContainer(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
MochiServices.disconnect();
MochiServices.onError("IOError");
}
public static function get childClip():Object{
return (_clip);
}
private static function initComChannels():void{
if (!_connected){
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift());
};
};
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
private static function loadLCBridge(_arg1:Object):void{
var _local2:Loader;
var _local3:String;
var _local4:URLRequest;
_local2 = new Loader();
_local3 = (_servURL + _mochiLC);
_local4 = new URLRequest(_local3);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local2.load(_local4);
_arg1.addChild(_local2);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var _local3:String;
var _local4:URLRequest;
var _local5:URLVariables;
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
_local3 = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local3 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local3);
_clip = new MovieClip();
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local4 = new URLRequest(_local3);
_local5 = new URLVariables();
_local5.listenLC = _listenChannelName;
_local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local5.api_version = getVersion();
if (widget){
_local5.widget = true;
};
_local4.data = _local5;
_loader.load(_local4);
_clip.addChild(_loader);
_sendChannel = new LocalConnection();
_queue = [];
_nextCallbackID = 0;
_callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function get clip():Object{
return (_container);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if ((clip is DisplayObject)){
if (clip.stage == null){
};
if (((!(_connected)) && ((_clip == null)))){
_connecting = true;
init(id, clip);
};
//unresolved jump
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
};
};
};
}
public static function bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
}
public static function connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
MochiServices.disconnect();
MochiServices.onError("IOError");
} else {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
};
}
}
}//package mochi.as3
Section 49
//MochiSocial (mochi.as3.MochiSocial)
package mochi.as3 {
public class MochiSocial {
public static const LOGGED_IN:String = "LoggedIn";
public static const ACTION_CANCELED:String = "onCancel";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const IO_ERROR:String = "IOError";
public static const NO_USER:String = "NoUser";
public static const FRIEND_LIST:String = "FriendsList";
public static const PROFILE_DATA:String = "ProfileData";
public static const GAMEPLAY_DATA:String = "GameplayData";
public static const ACTION_COMPLETE:String = "onComplete";
public static const LOGIN_SHOW:String = "LoginShow";
public static const PROFILE_HIDE:String = "ProfileHide";
public static const USER_INFO:String = "UserInfo";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const ERROR:String = "Error";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_HIDE:String = "LoginHide";
public static const LOGIN_SHOWN:String = "LoginShown";
public static var _user_info:Object = null;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function requestFan(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFan", _arg1);
}
public static function postToStream(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_postToStream", _arg1);
}
public static function getFriendsList(_arg1:Object=null):void{
MochiServices.send("social_getFriendsList", _arg1);
}
public static function requestLogin(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestLogin", _arg1);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("social_saveUserProperties", _arg1);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function inviteFriends(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_inviteFriends", _arg1);
}
public static function get loggedIn():Boolean{
return (!((_user_info == null)));
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_showLoginWidget", {options:_arg1});
}
public static function getAPIURL():String{
if (!_user_info){
return (null);
};
return (_user_info.api_url);
}
public static function hideLoginWidget():void{
MochiServices.send("social_hideLoginWidget");
}
public static function getAPIToken():String{
if (!_user_info){
return (null);
};
return (_user_info.api_token);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_user_info = _arg1;
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_user_info = null;
});
}
}//package mochi.as3
Section 50
//MochiUserData (mochi.as3.MochiUserData)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class MochiUserData extends EventDispatcher {
public var callback:Function;// = null
public var error:Event;// = null
public var key:String;// = null
public var operation:String;// = null
public var data;// = null
public var _loader:URLLoader;
public function MochiUserData(_arg1:String="", _arg2:Function=null){
key = null;
data = null;
error = null;
operation = null;
callback = null;
super();
this.key = _arg1;
this.callback = _arg2;
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString())));
}
public function putEvent(_arg1):void{
request("put", serialize(_arg1));
}
public function request(_arg1:String, _arg2:ByteArray):void{
var api_url:String;
var api_token:String;
var args:URLVariables;
var req:URLRequest;
var _operation = _arg1;
var _data = _arg2;
operation = _operation;
api_url = MochiSocial.getAPIURL();
api_token = MochiSocial.getAPIToken();
if ((((api_url == null)) || ((api_token == null)))){
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in"));
return;
};
_loader = new URLLoader();
args = new URLVariables();
args.op = _operation;
args.key = key;
req = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString()));
req.method = URLRequestMethod.POST;
req.contentType = "application/x-mochi-userdata";
req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)];
req.data = _data;
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
try {
_loader.load(req);
} catch(e:SecurityError) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString())));
};
}
public function performCallback():void{
try {
callback(this);
} catch(e:Error) {
};
}
public function serialize(_arg1):ByteArray{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.objectEncoding = ObjectEncoding.AMF3;
_local2.writeObject(_arg1);
_local2.compress();
return (_local2);
}
public function errorHandler(_arg1:IOErrorEvent):void{
data = null;
error = _arg1;
if (callback != null){
performCallback();
} else {
dispatchEvent(_arg1);
};
close();
}
public function completeHandler(_arg1:Event):void{
var event = _arg1;
try {
if (_loader.data.length){
data = deserialize(_loader.data);
} else {
data = null;
};
} catch(e:Error) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString())));
return;
};
if (callback != null){
performCallback();
} else {
dispatchEvent(event);
};
close();
}
public function getEvent():void{
request("get", serialize(null));
}
override public function toString():String{
return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]"));
}
public function close():void{
if (_loader){
_loader.removeEventListener(Event.COMPLETE, completeHandler);
_loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.close();
_loader = null;
};
error = null;
callback = null;
}
public function deserialize(_arg1:ByteArray){
_arg1.objectEncoding = ObjectEncoding.AMF3;
_arg1.uncompress();
return (_arg1.readObject());
}
public static function get(_arg1:String, _arg2:Function):void{
var _local3:MochiUserData;
_local3 = new MochiUserData(_arg1, _arg2);
_local3.getEvent();
}
public static function put(_arg1:String, _arg2, _arg3:Function):void{
var _local4:MochiUserData;
_local4 = new MochiUserData(_arg1, _arg3);
_local4.putEvent(_arg2);
}
}
}//package mochi.as3
Section 51
//AchievementListMC_15 (sociotown_uninvited_guests_v1_fla.AchievementListMC_15)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class AchievementListMC_15 extends MovieClip {
public var box11:MovieClip;
public var box12:MovieClip;
public var box13:MovieClip;
public var box14:MovieClip;
public var box16:MovieClip;
public var box17:MovieClip;
public var box18:MovieClip;
public var box19:MovieClip;
public var box15:MovieClip;
public var box10:MovieClip;
public var box20:MovieClip;
public var box22:MovieClip;
public var box21:MovieClip;
public var ladiesman:TextField;
public var achievement_back_button:SimpleButton;
public var box4:MovieClip;
public var box5:MovieClip;
public var box7:MovieClip;
public var box1:MovieClip;
public var box2:MovieClip;
public var box3:MovieClip;
public var box6:MovieClip;
public var box8:MovieClip;
public var box9:MovieClip;
public var clear_achievements:SimpleButton;
}
}//package sociotown_uninvited_guests_v1_fla
Section 52
//ApartmentHeaderMC_82 (sociotown_uninvited_guests_v1_fla.ApartmentHeaderMC_82)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class ApartmentHeaderMC_82 extends MovieClip {
public var text:TextField;
}
}//package sociotown_uninvited_guests_v1_fla
Section 53
//bhrGameBGMC_89 (sociotown_uninvited_guests_v1_fla.bhrGameBGMC_89)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class bhrGameBGMC_89 extends MovieClip {
public var title_logo:MovieClip;
public var tutorial:TextField;
public var top_score:TextField;
public var score:TextField;
public var timeup:MovieClip;
public var title_blockhead:MovieClip;
public var copyright:TextField;
public var time:TextField;
public var spacebar_text:MovieClip;
public var blockhead:MovieClip;
public var top_score_title_screen:TextField;
}
}//package sociotown_uninvited_guests_v1_fla
Section 54
//BlockHeadsRetroCharacterMC_94 (sociotown_uninvited_guests_v1_fla.BlockHeadsRetroCharacterMC_94)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
public dynamic class BlockHeadsRetroCharacterMC_94 extends MovieClip {
public var head:MovieClip;
}
}//package sociotown_uninvited_guests_v1_fla
Section 55
//CreditsBG_98 (sociotown_uninvited_guests_v1_fla.CreditsBG_98)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class CreditsBG_98 extends MovieClip {
public var credits_text:TextField;
}
}//package sociotown_uninvited_guests_v1_fla
Section 56
//GameMap_19 (sociotown_uninvited_guests_v1_fla.GameMap_19)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
public dynamic class GameMap_19 extends MovieClip {
public var guestroom1_droidtable:MovieClip;
public var room1_couch3:MovieClip;
public var hallway1_chair1:MovieClip;
public var guestroom1_couch:MovieClip;
public var gameroom_teleport01:MovieClip;
public var hallwayroom2_gameroomdoor:MovieClip;
public var guestroom3_teleport01:MovieClip;
public var hallway_teleport01:MovieClip;
public var guestroom1_bg:MovieClip;
public var kitchen_sink:MovieClip;
public var guestroom1_desk:MovieClip;
public var guestroom2_cubbyshelf:MovieClip;
public var guestroom2_chair2:MovieClip;
public var room1_bg:MovieClip;
public var masterbath_bg:MovieClip;
public var masterbedroom_bg:MovieClip;
public var guestroom2_chair1:MovieClip;
public var hallwayroom2_guestroom3:MovieClip;
public var hallwayroom1_bg:MovieClip;
public var guestroom3_couch:MovieClip;
public var guestroom3_nightstand:MovieClip;
public var masterbath_teleport01:MovieClip;
public var kitchen_refrig:MovieClip;
public var room1_cpu:MovieClip;
public var halfbath_teleport01:MovieClip;
public var hallway1_masterbedroomdoor:MovieClip;
public var guestroom1_bed:MovieClip;
public var guestroom2_bg:MovieClip;
public var masterbedroom_nightstand1:MovieClip;
public var masterbedroom_nightstand2:MovieClip;
public var masterbath_toiletpaper:MovieClip;
public var kitchen_cabinet:MovieClip;
public var halfbath_cabinet:MovieClip;
public var hallwayroom2_plant1:MovieClip;
public var hallwayroom2_plant2:MovieClip;
public var halfbath_toilet:MovieClip;
public var kitchen_bg:MovieClip;
public var guestroom2_teleport01:MovieClip;
public var hallway1_trash:MovieClip;
public var kitchen_trash:MovieClip;
public var masterbedroom_bathroomdoor:MovieClip;
public var hallwayroom2_bg:MovieClip;
public var hallwayroom2_painting:MovieClip;
public var guestroom1_cabinet:MovieClip;
public var guestroom3_cabinet:MovieClip;
public var masterbedroom_bed:MovieClip;
public var guestroom3_bg:MovieClip;
public var hallwayroom2_teleport02:MovieClip;
public var hallwayroom2_teleport04:MovieClip;
public var hallway_bg:MovieClip;
public var hallway1_plant2:MovieClip;
public var hallwayroom2_teleport03:MovieClip;
public var hallwayroom2_teleport01:MovieClip;
public var guestroom2_nightstand:MovieClip;
public var hallway1_plant1:MovieClip;
public var gameroom_pooltable:MovieClip;
public var room1_kitchendoor:MovieClip;
public var masterbath_glass1:MovieClip;
public var halfbath_trash:MovieClip;
public var guestroom1_teleport01:MovieClip;
public var gameroom_minigame:MovieClip;
public var guestroom1_fireplace:MovieClip;
public var kitchen_table:MovieClip;
public var masterbedroom_teleport01:MovieClip;
public var masterbedroom_teleport02:MovieClip;
public var room1_teleport01:MovieClip;
public var room1_teleport03:MovieClip;
public var room1_teleport02:MovieClip;
public var room1_teleport04:MovieClip;
public var guestroom3_bed:MovieClip;
public var hallwayroom2_bench1:MovieClip;
public var hallwayroom2_bench2:MovieClip;
public var hallwayroom1_teleport02:MovieClip;
public var hallwayroom1_teleport03:MovieClip;
public var hallwayroom1_teleport01:MovieClip;
public var hallwayroom1_teleport04:MovieClip;
public var halfbath_bg:MovieClip;
public var masterbedroom_computer:MovieClip;
public var kitchen_sofa:MovieClip;
public var guestroom1_nightstand:MovieClip;
public var hallwayroom2_trash:MovieClip;
public var hallwayroom2_halfbath:MovieClip;
public var kitchen_teleport01:MovieClip;
public var room1_cdplayer:MovieClip;
public var room1_couch2:MovieClip;
public var hallway1_chair2:MovieClip;
public var room1_couch1:MovieClip;
public var gameroom_bg:MovieClip;
public var guestroom2_cabinet:MovieClip;
}
}//package sociotown_uninvited_guests_v1_fla
Section 57
//ItemInventoryMC_86 (sociotown_uninvited_guests_v1_fla.ItemInventoryMC_86)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class ItemInventoryMC_86 extends MovieClip {
public var slot_1:TextField;
public var slot_2:TextField;
public var slot_3:TextField;
public var slot_4:TextField;
public var slot_6:TextField;
public var slot_7:TextField;
public var slot_5:TextField;
public var more:TextField;
public var close:TextField;
}
}//package sociotown_uninvited_guests_v1_fla
Section 58
//KitchenCollisMap_67 (sociotown_uninvited_guests_v1_fla.KitchenCollisMap_67)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
public dynamic class KitchenCollisMap_67 extends MovieClip {
public var kitchen_blockade:MovieClip;
}
}//package sociotown_uninvited_guests_v1_fla
Section 59
//MasterBathBackdropMC_42 (sociotown_uninvited_guests_v1_fla.MasterBathBackdropMC_42)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
public dynamic class MasterBathBackdropMC_42 extends MovieClip {
public var masterbath_glass1:MasterBath_Glass;
}
}//package sociotown_uninvited_guests_v1_fla
Section 60
//MessageBoxMC_87 (sociotown_uninvited_guests_v1_fla.MessageBoxMC_87)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class MessageBoxMC_87 extends MovieClip {
public var text:TextField;
}
}//package sociotown_uninvited_guests_v1_fla
Section 61
//OptionsMenuBG_70 (sociotown_uninvited_guests_v1_fla.OptionsMenuBG_70)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class OptionsMenuBG_70 extends MovieClip {
public var options_menu_key_toss:MovieClip;
public var options_menu_key_lookat:OptionsMenuKeyLookAt;
public var options_menu_key_punch:MovieClip;
public var options_entity_name:TextField;
public var options_menu_key_talk:MovieClip;
public var options_menu_key_search:OptionsMenuKeySearch;
public var options_menu_key_use:OptionsMenuKeyUse;
public var options_menu_key_useitem:MovieClip;
}
}//package sociotown_uninvited_guests_v1_fla
Section 62
//UIChatBubbleMC_85 (sociotown_uninvited_guests_v1_fla.UIChatBubbleMC_85)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UIChatBubbleMC_85 extends MovieClip {
public var ui_chat_bubble_text:TextField;
public var ui_chat_skip_text:TextField;
}
}//package sociotown_uninvited_guests_v1_fla
Section 63
//UninvitedGuestsHeaderMC_81 (sociotown_uninvited_guests_v1_fla.UninvitedGuestsHeaderMC_81)
package sociotown_uninvited_guests_v1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UninvitedGuestsHeaderMC_81 extends MovieClip {
public var text:TextField;
}
}//package sociotown_uninvited_guests_v1_fla
Section 64
//AchievementIconMC (AchievementIconMC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class AchievementIconMC extends MovieClip {
public var text:TextField;
public var medal_icon:MovieClip;
}
}//package
Section 65
//BlockHeadsRetroHeadPowerup (BlockHeadsRetroHeadPowerup)
package {
import flash.display.*;
public dynamic class BlockHeadsRetroHeadPowerup extends MovieClip {
}
}//package
Section 66
//BlockHeadsRetroMainSnd (BlockHeadsRetroMainSnd)
package {
import flash.media.*;
public dynamic class BlockHeadsRetroMainSnd extends Sound {
}
}//package
Section 67
//BlockHeadsRetroPowerUpSnd (BlockHeadsRetroPowerUpSnd)
package {
import flash.media.*;
public dynamic class BlockHeadsRetroPowerUpSnd extends Sound {
}
}//package
Section 68
//BlockHeadsRetroStealCrateMC (BlockHeadsRetroStealCrateMC)
package {
import flash.display.*;
public dynamic class BlockHeadsRetroStealCrateMC extends MovieClip {
}
}//package
Section 69
//BlockHeadsRetroSteelHitSnd (BlockHeadsRetroSteelHitSnd)
package {
import flash.media.*;
public dynamic class BlockHeadsRetroSteelHitSnd extends Sound {
}
}//package
Section 70
//BlockHeadsRetroTitleSnd (BlockHeadsRetroTitleSnd)
package {
import flash.media.*;
public dynamic class BlockHeadsRetroTitleSnd extends Sound {
}
}//package
Section 71
//BlockHeadsRetroWoodBreakSnd (BlockHeadsRetroWoodBreakSnd)
package {
import flash.media.*;
public dynamic class BlockHeadsRetroWoodBreakSnd extends Sound {
}
}//package
Section 72
//BlockHeadsRetroWoodCrackSnd (BlockHeadsRetroWoodCrackSnd)
package {
import flash.media.*;
public dynamic class BlockHeadsRetroWoodCrackSnd extends Sound {
}
}//package
Section 73
//BlockHeadsRetroWoodCrateMC (BlockHeadsRetroWoodCrateMC)
package {
import flash.display.*;
public dynamic class BlockHeadsRetroWoodCrateMC extends MovieClip {
}
}//package
Section 74
//CameraClickSnd (CameraClickSnd)
package {
import flash.media.*;
public dynamic class CameraClickSnd extends Sound {
}
}//package
Section 75
//CharShadowMovieClip (CharShadowMovieClip)
package {
import flash.display.*;
public dynamic class CharShadowMovieClip extends MovieClip {
}
}//package
Section 76
//ChaseMusicSnd (ChaseMusicSnd)
package {
import flash.media.*;
public dynamic class ChaseMusicSnd extends Sound {
}
}//package
Section 77
//CleanDishesSnd (CleanDishesSnd)
package {
import flash.media.*;
public dynamic class CleanDishesSnd extends Sound {
}
}//package
Section 78
//CleanDustingSnd (CleanDustingSnd)
package {
import flash.media.*;
public dynamic class CleanDustingSnd extends Sound {
}
}//package
Section 79
//CleanSpraySnd (CleanSpraySnd)
package {
import flash.media.*;
public dynamic class CleanSpraySnd extends Sound {
}
}//package
Section 80
//CleanTrashSnd (CleanTrashSnd)
package {
import flash.media.*;
public dynamic class CleanTrashSnd extends Sound {
}
}//package
Section 81
//EatingSnd (EatingSnd)
package {
import flash.media.*;
public dynamic class EatingSnd extends Sound {
}
}//package
Section 82
//EndingMusicSnd (EndingMusicSnd)
package {
import flash.media.*;
public dynamic class EndingMusicSnd extends Sound {
}
}//package
Section 83
//Fart1Snd (Fart1Snd)
package {
import flash.media.*;
public dynamic class Fart1Snd extends Sound {
}
}//package
Section 84
//Fart2Snd (Fart2Snd)
package {
import flash.media.*;
public dynamic class Fart2Snd extends Sound {
}
}//package
Section 85
//FemaleChatter1Snd (FemaleChatter1Snd)
package {
import flash.media.*;
public dynamic class FemaleChatter1Snd extends Sound {
}
}//package
Section 86
//FlameOffSnd (FlameOffSnd)
package {
import flash.media.*;
public dynamic class FlameOffSnd extends Sound {
}
}//package
Section 87
//FlameOnSnd (FlameOnSnd)
package {
import flash.media.*;
public dynamic class FlameOnSnd extends Sound {
}
}//package
Section 88
//LoaderBar (LoaderBar)
package {
import flash.display.*;
public dynamic class LoaderBar extends MovieClip {
}
}//package
Section 89
//LoaderBg (LoaderBg)
package {
import flash.display.*;
public dynamic class LoaderBg extends MovieClip {
}
}//package
Section 90
//LockOpenSnd (LockOpenSnd)
package {
import flash.media.*;
public dynamic class LockOpenSnd extends Sound {
}
}//package
Section 91
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import com.newgrounds.components.*;
import flash.utils.*;
import com.uninvitedguests.*;
import flash.text.*;
public dynamic class Main extends MovieClip {
public var ui_chat_bubble:MovieClip;
public var kitchen_collis_map:MovieClip;
public var gamemap:MovieClip;
public var apartment_header:MovieClip;
public var gLastMilliseconds:int;
public var __id0_:APIConnector;
public var free_mmo_button:SimpleButton;
public var achievement_button:SimpleButton;
public var hallway_collis_map:MovieClip;
public var newgame_button:SimpleButton;
public var sociotown_ending_logo:SimpleButton;
public var gameroom_collis_map:MovieClip;
public var guestroom3_collis_map:MovieClip;
public var title_veronica:Symbol1;
public var gTimeinterval:int;
public var play_button:SimpleButton;
public var black_screen:MovieClip;
public var credit_text:TextField;
public var options_menu_bg:MovieClip;
public var add_game:SimpleButton;
public var masterbath_collis_map:MovieClip;
public var veronica_patience_header:VeronicaPatienceMC;
public var sociotown_logo:SimpleButton;
public var halfbath_collis_map:MovieClip;
public var guestroom2_collis_map:MovieClip;
public var message_status_box:MovieClip;
public var EndingCredits:MovieClip;
public var inventory:MovieClip;
public var hallwayroom2_collis_map:MovieClip;
public var object_highlighter:MovieClip;
public var achievement_icon:AchievementIconMC;
public var title_toby:MovieClip;
public var title_bg:MovieClip;
public var veronica_heart2:MovieClip;
public var veronica_heart3:MovieClip;
public var veronica_heart4:MovieClip;
public var veronica_heart5:MovieClip;
public var veronica_heart6:MovieClip;
public var veronica_heart1:MovieClip;
public var guestroom1_collis_map:MovieClip;
public var achievement_list:MovieClip;
public var clear_save_data:SimpleButton;
public var continue_button:SimpleButton;
public var room1_collis_map:MovieClip;
public var arcadebhr:MovieClip;
public var hint_button:MovieClip;
public var loader_bar:LoaderBar;
public var masterbedroom_collis_map:MovieClip;
public var hallwayroom1_collis_map:MovieClip;
public var uninvited_guests_header:MovieClip;
public var progress_saved:MovieClip;
public var loader_bg:LoaderBg;
public function Main(){
var _local1:GameObjClass;
super();
this.addEventListener(Event.ENTER_FRAME, gameLoop);
_local1 = new GameObjClass(this);
__setProp___id0__Scene1_NewgroundsAPI_1();
}
function __setProp___id0__Scene1_NewgroundsAPI_1(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.movieId = "16534:QnbmT8oI";
__id0_.debugMode = false;
__id0_.encryptionKey = "ny60dFbfJgH5EIPVzFPJ6BDUvpywknLM";
__id0_.movieVersion = "";
__id0_.showConnectingPopup = false;
__id0_.useErrorPopup = false;
__id0_.useMedalPopup = false;
__id0_.useFakeSession = false;
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function gameLoop(_arg1:Event){
var _local2:int;
_local2 = getTimer();
gTimeinterval = (_local2 - gLastMilliseconds);
gLastMilliseconds = _local2;
}
}
}//package
Section 92
//MainCharacterMC (MainCharacterMC)
package {
import flash.display.*;
public dynamic class MainCharacterMC extends MovieClip {
}
}//package
Section 93
//MaleChatter1Snd (MaleChatter1Snd)
package {
import flash.media.*;
public dynamic class MaleChatter1Snd extends Sound {
}
}//package
Section 94
//MasterBath_Glass (MasterBath_Glass)
package {
import flash.display.*;
public dynamic class MasterBath_Glass extends MovieClip {
}
}//package
Section 95
//NatureSoundsSnd (NatureSoundsSnd)
package {
import flash.media.*;
public dynamic class NatureSoundsSnd extends Sound {
}
}//package
Section 96
//NeedleScratchSnd (NeedleScratchSnd)
package {
import flash.media.*;
public dynamic class NeedleScratchSnd extends Sound {
}
}//package
Section 97
//NewAchievementSnd (NewAchievementSnd)
package {
import flash.media.*;
public dynamic class NewAchievementSnd extends Sound {
}
}//package
Section 98
//NewgroundsAPIAsset_big_popup_background (NewgroundsAPIAsset_big_popup_background)
package {
import flash.display.*;
public dynamic class NewgroundsAPIAsset_big_popup_background extends MovieClip {
public var tl:MovieClip;
public var br:MovieClip;
public var tr:MovieClip;
public var l:MovieClip;
public var shadow:MovieClip;
public var r:MovieClip;
public var b:MovieClip;
public var bl:MovieClip;
public var t:MovieClip;
public var c:MovieClip;
}
}//package
Section 99
//NewItem1Snd (NewItem1Snd)
package {
import flash.media.*;
public dynamic class NewItem1Snd extends Sound {
}
}//package
Section 100
//NewItem2Snd (NewItem2Snd)
package {
import flash.media.*;
public dynamic class NewItem2Snd extends Sound {
}
}//package
Section 101
//NormalChatter1Snd (NormalChatter1Snd)
package {
import flash.media.*;
public dynamic class NormalChatter1Snd extends Sound {
}
}//package
Section 102
//NPCGeneric01MC (NPCGeneric01MC)
package {
import flash.display.*;
public dynamic class NPCGeneric01MC extends MovieClip {
}
}//package
Section 103
//NPCGeneric02MC (NPCGeneric02MC)
package {
import flash.display.*;
public dynamic class NPCGeneric02MC extends MovieClip {
}
}//package
Section 104
//NPCGeneric03MC (NPCGeneric03MC)
package {
import flash.display.*;
public dynamic class NPCGeneric03MC extends MovieClip {
}
}//package
Section 105
//NPCGeneric04MC (NPCGeneric04MC)
package {
import flash.display.*;
public dynamic class NPCGeneric04MC extends MovieClip {
}
}//package
Section 106
//NPCPuzzle01MC (NPCPuzzle01MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle01MC extends MovieClip {
}
}//package
Section 107
//NPCPuzzle02MC (NPCPuzzle02MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle02MC extends MovieClip {
}
}//package
Section 108
//NPCPuzzle03MC (NPCPuzzle03MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle03MC extends MovieClip {
}
}//package
Section 109
//NPCPuzzle04MC (NPCPuzzle04MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle04MC extends MovieClip {
}
}//package
Section 110
//NPCPuzzle05MC (NPCPuzzle05MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle05MC extends MovieClip {
}
}//package
Section 111
//NPCPuzzle06MC (NPCPuzzle06MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle06MC extends MovieClip {
}
}//package
Section 112
//NPCPuzzle07MC (NPCPuzzle07MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle07MC extends MovieClip {
}
}//package
Section 113
//NPCPuzzle08MC (NPCPuzzle08MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle08MC extends MovieClip {
}
}//package
Section 114
//NPCPuzzle09MC (NPCPuzzle09MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle09MC extends MovieClip {
}
}//package
Section 115
//NPCPuzzle10MC (NPCPuzzle10MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle10MC extends MovieClip {
}
}//package
Section 116
//NPCPuzzle11MC (NPCPuzzle11MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle11MC extends MovieClip {
}
}//package
Section 117
//NPCPuzzle12MC (NPCPuzzle12MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle12MC extends MovieClip {
}
}//package
Section 118
//NPCPuzzle13MC (NPCPuzzle13MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle13MC extends MovieClip {
}
}//package
Section 119
//NPCPuzzle14MC (NPCPuzzle14MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle14MC extends MovieClip {
}
}//package
Section 120
//NPCPuzzle15MC (NPCPuzzle15MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle15MC extends MovieClip {
}
}//package
Section 121
//NPCPuzzle16MC (NPCPuzzle16MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle16MC extends MovieClip {
}
}//package
Section 122
//NPCPuzzle17MC (NPCPuzzle17MC)
package {
import flash.display.*;
public dynamic class NPCPuzzle17MC extends MovieClip {
}
}//package
Section 123
//OptionsMenuKeyLookAt (OptionsMenuKeyLookAt)
package {
import flash.display.*;
public dynamic class OptionsMenuKeyLookAt extends MovieClip {
}
}//package
Section 124
//OptionsMenuKeySearch (OptionsMenuKeySearch)
package {
import flash.display.*;
public dynamic class OptionsMenuKeySearch extends MovieClip {
}
}//package
Section 125
//OptionsMenuKeyUse (OptionsMenuKeyUse)
package {
import flash.display.*;
public dynamic class OptionsMenuKeyUse extends MovieClip {
}
}//package
Section 126
//PowPunchSnd (PowPunchSnd)
package {
import flash.media.*;
public dynamic class PowPunchSnd extends Sound {
}
}//package
Section 127
//RoomTheme1MusicSnd (RoomTheme1MusicSnd)
package {
import flash.media.*;
public dynamic class RoomTheme1MusicSnd extends Sound {
}
}//package
Section 128
//RoomTheme2MusicSnd (RoomTheme2MusicSnd)
package {
import flash.media.*;
public dynamic class RoomTheme2MusicSnd extends Sound {
}
}//package
Section 129
//RoomTheme3MusicSnd (RoomTheme3MusicSnd)
package {
import flash.media.*;
public dynamic class RoomTheme3MusicSnd extends Sound {
}
}//package
Section 130
//RoomTheme4MusicSnd (RoomTheme4MusicSnd)
package {
import flash.media.*;
public dynamic class RoomTheme4MusicSnd extends Sound {
}
}//package
Section 131
//SearchGridBox (SearchGridBox)
package {
import flash.display.*;
public dynamic class SearchGridBox extends MovieClip {
}
}//package
Section 132
//SearchGridBoxExit (SearchGridBoxExit)
package {
import flash.display.*;
public dynamic class SearchGridBoxExit extends MovieClip {
}
}//package
Section 133
//SearchGridBoxMC (SearchGridBoxMC)
package {
import flash.display.*;
public dynamic class SearchGridBoxMC extends MovieClip {
}
}//package
Section 134
//SearchGridSearchIcon (SearchGridSearchIcon)
package {
import flash.display.*;
public dynamic class SearchGridSearchIcon extends MovieClip {
}
}//package
Section 135
//Symbol1 (Symbol1)
package {
import flash.display.*;
public dynamic class Symbol1 extends MovieClip {
}
}//package
Section 136
//TitleScreenMusicSnd (TitleScreenMusicSnd)
package {
import flash.media.*;
public dynamic class TitleScreenMusicSnd extends Sound {
}
}//package
Section 137
//VeronicaHeartMC (VeronicaHeartMC)
package {
import flash.display.*;
public dynamic class VeronicaHeartMC extends MovieClip {
}
}//package
Section 138
//VeronicaMC (VeronicaMC)
package {
import flash.display.*;
public dynamic class VeronicaMC extends MovieClip {
}
}//package
Section 139
//VeronicaPatienceMC (VeronicaPatienceMC)
package {
import flash.display.*;
public dynamic class VeronicaPatienceMC extends MovieClip {
}
}//package
Section 140
//ZoomawaySnd (ZoomawaySnd)
package {
import flash.media.*;
public dynamic class ZoomawaySnd extends Sound {
}
}//package